From 8ce2e122e372942036e96ed17e4af09a17135c8e Mon Sep 17 00:00:00 2001 From: Loic Minier Date: Tue, 10 Jul 2007 11:22:20 +0000 Subject: Move PYGTK_2_10_4 tag to the tags dir. * Move PYGTK_2_10_4 tag to the tags dir. svn path=/tags/git-migration-PYGTK_2_10_4; revision=2839 --- AUTHORS | 15 - COPYING | 504 - ChangeLog | 2284 -- ChangeLog.pre-2-0 | 6521 ----- ChangeLog.pre-2-6 | 3474 --- ChangeLog.pre-2-8 | 912 - MANIFEST.in | 11 - MAPPING | 170 - Makefile.am | 128 - NEWS | 1086 - PKG-INFO.in | 25 - README | 129 - THREADS | 119 - TODO | 12 - atk-types.defs | 403 - atk.defs | 3018 -- atk.override | 690 - atkmodule.c | 48 - atkrectangle.override | 265 - autogen.sh | 477 - codegen/Makefile.am | 23 - codegen/README.defs | 351 - codegen/__init__.py | 15 - codegen/argtypes.py | 1027 - codegen/code-coverage.py | 42 - codegen/codegen.py | 1707 -- codegen/createdefs.py | 17 - codegen/definitions.py | 547 - codegen/defsconvert.py | 130 - codegen/defsgen.py | 656 - codegen/defsparser.py | 153 - codegen/docextract.py | 185 - codegen/docextract_to_xml.py | 77 - codegen/docgen.py | 751 - codegen/h2def.py | 536 - codegen/mergedefs.py | 26 - codegen/missingdefs.py | 17 - codegen/mkskel.py | 89 - codegen/override.py | 281 - codegen/pygtk-codegen-2.0.in | 11 - codegen/reversewrapper.py | 851 - codegen/scanvirtuals.py | 54 - codegen/scmexpr.py | 143 - config.h.win32 | 6 - configure.in | 322 - docs/Makefile.am | 632 - docs/random/missing-symbols | 33 - docs/random/release-checklist | 30 - docs/random/update-bindings | 5 - docs/reference/ChangeLog | 2646 -- docs/reference/entities.docbook.in | 1 - docs/reference/pygtk-atk-classes.xml | 34 - docs/reference/pygtk-atk-constants.xml | 1464 - docs/reference/pygtk-atkaction.xml | 283 - docs/reference/pygtk-atkcomponent.xml | 568 - docs/reference/pygtk-atkdocument.xml | 91 - docs/reference/pygtk-atkeditabletext.xml | 281 - docs/reference/pygtk-atkgobjectaccessible.xml | 134 - docs/reference/pygtk-atkhyperlink.xml | 382 - docs/reference/pygtk-atkhypertext.xml | 201 - docs/reference/pygtk-atkimage.xml | 162 - docs/reference/pygtk-atkimplementor.xml | 62 - docs/reference/pygtk-atknoopobject.xml | 103 - docs/reference/pygtk-atknoopobjectfactory.xml | 89 - docs/reference/pygtk-atkobject.xml | 1110 - docs/reference/pygtk-atkobjectfactory.xml | 136 - docs/reference/pygtk-atkrectangle.xml | 134 - docs/reference/pygtk-atkregistry.xml | 219 - docs/reference/pygtk-atkrelation.xml | 298 - docs/reference/pygtk-atkrelationset.xml | 263 - docs/reference/pygtk-atkselection.xml | 322 - docs/reference/pygtk-atkstateset.xml | 473 - docs/reference/pygtk-atkstreamablecontent.xml | 141 - docs/reference/pygtk-atktable.xml | 1338 - docs/reference/pygtk-atktext.xml | 1275 - docs/reference/pygtk-atkvalue.xml | 144 - docs/reference/pygtk-gdk-classes.xml | 37 - docs/reference/pygtk-gdk-constants.xml | 2715 -- docs/reference/pygtk-gdk-functions.xml | 1537 - docs/reference/pygtk-gdkatom.xml | 182 - docs/reference/pygtk-gdkcairocontext.xml | 260 - docs/reference/pygtk-gdkcolor.xml | 210 - docs/reference/pygtk-gdkcolormap.xml | 488 - docs/reference/pygtk-gdkcursor.xml | 795 - docs/reference/pygtk-gdkdevice.xml | 663 - docs/reference/pygtk-gdkdisplay.xml | 1186 - docs/reference/pygtk-gdkdisplaymanager.xml | 279 - docs/reference/pygtk-gdkdragcontext.xml | 1146 - docs/reference/pygtk-gdkdrawable.xml | 2171 -- docs/reference/pygtk-gdkevent.xml | 2454 -- docs/reference/pygtk-gdkfont.xml | 521 - docs/reference/pygtk-gdkgc.xml | 1622 -- docs/reference/pygtk-gdkimage.xml | 281 - docs/reference/pygtk-gdkkeymap.xml | 858 - docs/reference/pygtk-gdkpangorenderer.xml | 404 - docs/reference/pygtk-gdkpixbuf.xml | 2915 -- docs/reference/pygtk-gdkpixbufanimation.xml | 264 - docs/reference/pygtk-gdkpixbufanimationiter.xml | 225 - docs/reference/pygtk-gdkpixbufloader.xml | 666 - docs/reference/pygtk-gdkpixmap.xml | 766 - docs/reference/pygtk-gdkrectangle.xml | 240 - docs/reference/pygtk-gdkregion.xml | 579 - docs/reference/pygtk-gdkscreen.xml | 1028 - docs/reference/pygtk-gdkvisual.xml | 716 - docs/reference/pygtk-gdkwindow.xml | 4414 --- docs/reference/pygtk-glade-classes.xml | 11 - docs/reference/pygtk-gladexml.xml | 541 - docs/reference/pygtk-gobject-classes.xml | 20 - docs/reference/pygtk-gobject-constants.xml | 495 - docs/reference/pygtk-gobject-functions.xml | 1373 - docs/reference/pygtk-gobject-gboxed.xml | 68 - docs/reference/pygtk-gobject-ginterface.xml | 38 - docs/reference/pygtk-gobject-gpointer.xml | 42 - docs/reference/pygtk-gobject-maincontext.xml | 152 - docs/reference/pygtk-gobject-mainloop.xml | 202 - docs/reference/pygtk-gobject.xml | 867 - docs/reference/pygtk-gtk-classes.xml | 192 - docs/reference/pygtk-gtk-constants.xml | 4188 --- docs/reference/pygtk-gtk-functions.xml | 1386 - docs/reference/pygtk-gtk-stock-items.xml | 1205 - docs/reference/pygtk-gtkaboutdialog.xml | 1212 - docs/reference/pygtk-gtkaccelgroup.xml | 855 - docs/reference/pygtk-gtkaccellabel.xml | 379 - docs/reference/pygtk-gtkaccelmap.xml | 688 - docs/reference/pygtk-gtkaccessible.xml | 75 - docs/reference/pygtk-gtkaction.xml | 1144 - docs/reference/pygtk-gtkactiongroup.xml | 1054 - docs/reference/pygtk-gtkadjustment.xml | 628 - docs/reference/pygtk-gtkalignment.xml | 402 - docs/reference/pygtk-gtkarrow.xml | 200 - docs/reference/pygtk-gtkaspectframe.xml | 293 - docs/reference/pygtk-gtkassistant.xml | 1179 - docs/reference/pygtk-gtkbin.xml | 135 - docs/reference/pygtk-gtkborder.xml | 99 - docs/reference/pygtk-gtkbox.xml | 706 - docs/reference/pygtk-gtkbutton.xml | 1207 - docs/reference/pygtk-gtkbuttonbox.xml | 346 - docs/reference/pygtk-gtkcalendar.xml | 991 - docs/reference/pygtk-gtkcelleditable.xml | 220 - docs/reference/pygtk-gtkcelllayout.xml | 385 - docs/reference/pygtk-gtkcellrenderer.xml | 790 - docs/reference/pygtk-gtkcellrendereraccel.xml | 296 - docs/reference/pygtk-gtkcellrenderercombo.xml | 147 - docs/reference/pygtk-gtkcellrendererpixbuf.xml | 164 - docs/reference/pygtk-gtkcellrendererprogress.xml | 134 - docs/reference/pygtk-gtkcellrendererspin.xml | 155 - docs/reference/pygtk-gtkcellrenderertext.xml | 538 - docs/reference/pygtk-gtkcellrenderertoggle.xml | 324 - docs/reference/pygtk-gtkcellview.xml | 467 - docs/reference/pygtk-gtkcheckbutton.xml | 165 - docs/reference/pygtk-gtkcheckmenuitem.xml | 471 - docs/reference/pygtk-gtkclipboard.xml | 1281 - docs/reference/pygtk-gtkcolorbutton.xml | 459 - docs/reference/pygtk-gtkcolorselection.xml | 661 - docs/reference/pygtk-gtkcolorselectiondialog.xml | 165 - docs/reference/pygtk-gtkcombo.xml | 435 - docs/reference/pygtk-gtkcombobox.xml | 1286 - docs/reference/pygtk-gtkcomboboxentry.xml | 344 - docs/reference/pygtk-gtkcontainer.xml | 1830 -- docs/reference/pygtk-gtkcurve.xml | 423 - docs/reference/pygtk-gtkdialog.xml | 914 - docs/reference/pygtk-gtkdrawingarea.xml | 161 - docs/reference/pygtk-gtkeditable.xml | 617 - docs/reference/pygtk-gtkentry.xml | 1568 -- docs/reference/pygtk-gtkentrycompletion.xml | 1148 - docs/reference/pygtk-gtkeventbox.xml | 283 - docs/reference/pygtk-gtkexpander.xml | 713 - docs/reference/pygtk-gtkfilechooser.xml | 2415 -- docs/reference/pygtk-gtkfilechooserbutton.xml | 448 - docs/reference/pygtk-gtkfilechooserdialog.xml | 167 - docs/reference/pygtk-gtkfilechooserwidget.xml | 137 - docs/reference/pygtk-gtkfilefilter.xml | 530 - docs/reference/pygtk-gtkfileselection.xml | 538 - docs/reference/pygtk-gtkfixed.xml | 318 - docs/reference/pygtk-gtkfontbutton.xml | 598 - docs/reference/pygtk-gtkfontselection.xml | 277 - docs/reference/pygtk-gtkfontselectiondialog.xml | 318 - docs/reference/pygtk-gtkframe.xml | 402 - docs/reference/pygtk-gtkgammacurve.xml | 180 - docs/reference/pygtk-gtkhandlebox.xml | 474 - docs/reference/pygtk-gtkhbox.xml | 124 - docs/reference/pygtk-gtkhbuttonbox.xml | 122 - docs/reference/pygtk-gtkhpaned.xml | 108 - docs/reference/pygtk-gtkhruler.xml | 106 - docs/reference/pygtk-gtkhscale.xml | 117 - docs/reference/pygtk-gtkhscrollbar.xml | 119 - docs/reference/pygtk-gtkhseparator.xml | 102 - docs/reference/pygtk-gtkiconfactory.xml | 269 - docs/reference/pygtk-gtkiconinfo.xml | 391 - docs/reference/pygtk-gtkiconset.xml | 282 - docs/reference/pygtk-gtkiconsource.xml | 976 - docs/reference/pygtk-gtkicontheme.xml | 892 - docs/reference/pygtk-gtkiconview.xml | 2408 -- docs/reference/pygtk-gtkimage.xml | 1163 - docs/reference/pygtk-gtkimagemenuitem.xml | 212 - docs/reference/pygtk-gtkimcontext.xml | 771 - docs/reference/pygtk-gtkimcontextsimple.xml | 133 - docs/reference/pygtk-gtkimmulticontext.xml | 117 - docs/reference/pygtk-gtkinputdialog.xml | 245 - docs/reference/pygtk-gtkinvisible.xml | 178 - docs/reference/pygtk-gtkitem.xml | 280 - docs/reference/pygtk-gtkitemfactory.xml | 676 - docs/reference/pygtk-gtklabel.xml | 1745 -- docs/reference/pygtk-gtklayout.xml | 603 - docs/reference/pygtk-gtklinkbutton.xml | 292 - docs/reference/pygtk-gtkliststore.xml | 860 - docs/reference/pygtk-gtkmenu.xml | 1007 - docs/reference/pygtk-gtkmenubar.xml | 301 - docs/reference/pygtk-gtkmenuitem.xml | 698 - docs/reference/pygtk-gtkmenushell.xml | 829 - docs/reference/pygtk-gtkmenutoolbutton.xml | 363 - docs/reference/pygtk-gtkmessagedialog.xml | 469 - docs/reference/pygtk-gtkmisc.xml | 246 - docs/reference/pygtk-gtknotebook.xml | 2455 -- docs/reference/pygtk-gtkobject.xml | 673 - docs/reference/pygtk-gtkoptionmenu.xml | 370 - docs/reference/pygtk-gtkpagesetup.xml | 817 - docs/reference/pygtk-gtkpagesetupunixdialog.xml | 260 - docs/reference/pygtk-gtkpaned.xml | 970 - docs/reference/pygtk-gtkpapersize.xml | 686 - docs/reference/pygtk-gtkplug.xml | 303 - docs/reference/pygtk-gtkprintcontext.xml | 428 - docs/reference/pygtk-gtkprinter.xml | 671 - docs/reference/pygtk-gtkprintjob.xml | 548 - docs/reference/pygtk-gtkprintoperation.xml | 1709 -- docs/reference/pygtk-gtkprintoperationpreview.xml | 236 - docs/reference/pygtk-gtkprintsettings.xml | 1954 -- docs/reference/pygtk-gtkprintunixdialog.xml | 467 - docs/reference/pygtk-gtkprogressbar.xml | 505 - docs/reference/pygtk-gtkradioaction.xml | 341 - docs/reference/pygtk-gtkradiobutton.xml | 323 - docs/reference/pygtk-gtkradiomenuitem.xml | 294 - docs/reference/pygtk-gtkradiotoolbutton.xml | 224 - docs/reference/pygtk-gtkrange.xml | 790 - docs/reference/pygtk-gtkrcstyle.xml | 979 - docs/reference/pygtk-gtkrecentchooser.xml | 1273 - docs/reference/pygtk-gtkrecentchooserdialog.xml | 197 - docs/reference/pygtk-gtkrecentchoosermenu.xml | 224 - docs/reference/pygtk-gtkrecentchooserwidget.xml | 139 - docs/reference/pygtk-gtkrecentfilter.xml | 509 - docs/reference/pygtk-gtkrecentinfo.xml | 681 - docs/reference/pygtk-gtkrecentmanager.xml | 719 - docs/reference/pygtk-gtkrequisition.xml | 125 - docs/reference/pygtk-gtkruler.xml | 308 - docs/reference/pygtk-gtkscale.xml | 455 - docs/reference/pygtk-gtkscrollbar.xml | 160 - docs/reference/pygtk-gtkscrolledwindow.xml | 1050 - docs/reference/pygtk-gtkselectiondata.xml | 1027 - docs/reference/pygtk-gtkseparator.xml | 69 - docs/reference/pygtk-gtkseparatormenuitem.xml | 100 - docs/reference/pygtk-gtkseparatortoolitem.xml | 212 - docs/reference/pygtk-gtksettings.xml | 740 - docs/reference/pygtk-gtksizegroup.xml | 349 - docs/reference/pygtk-gtksocket.xml | 316 - docs/reference/pygtk-gtkspinbutton.xml | 1250 - docs/reference/pygtk-gtkstatusbar.xml | 506 - docs/reference/pygtk-gtkstatusicon.xml | 1065 - docs/reference/pygtk-gtkstyle.xml | 2948 -- docs/reference/pygtk-gtktable.xml | 761 - docs/reference/pygtk-gtktearoffmenuitem.xml | 111 - docs/reference/pygtk-gtktextattributes.xml | 353 - docs/reference/pygtk-gtktextbuffer.xml | 3943 --- docs/reference/pygtk-gtktextchildanchor.xml | 142 - docs/reference/pygtk-gtktextiter.xml | 3110 -- docs/reference/pygtk-gtktextmark.xml | 226 - docs/reference/pygtk-gtktexttag.xml | 793 - docs/reference/pygtk-gtktexttagtable.xml | 443 - docs/reference/pygtk-gtktextview.xml | 3462 --- docs/reference/pygtk-gtktoggleaction.xml | 350 - docs/reference/pygtk-gtktogglebutton.xml | 463 - docs/reference/pygtk-gtktoggletoolbutton.xml | 266 - docs/reference/pygtk-gtktoolbar.xml | 2570 -- docs/reference/pygtk-gtktoolbutton.xml | 736 - docs/reference/pygtk-gtktoolitem.xml | 1167 - docs/reference/pygtk-gtktooltips.xml | 343 - docs/reference/pygtk-gtktreedragdest.xml | 135 - docs/reference/pygtk-gtktreedragsource.xml | 158 - docs/reference/pygtk-gtktreeiter.xml | 121 - docs/reference/pygtk-gtktreemodel.xml | 1579 -- docs/reference/pygtk-gtktreemodelfilter.xml | 542 - docs/reference/pygtk-gtktreemodelsort.xml | 425 - docs/reference/pygtk-gtktreerowreference.xml | 234 - docs/reference/pygtk-gtktreeselection.xml | 827 - docs/reference/pygtk-gtktreesortable.xml | 402 - docs/reference/pygtk-gtktreestore.xml | 878 - docs/reference/pygtk-gtktreeview.xml | 4245 --- docs/reference/pygtk-gtktreeviewcolumn.xml | 1868 -- docs/reference/pygtk-gtkuimanager.xml | 1334 - docs/reference/pygtk-gtkvbox.xml | 129 - docs/reference/pygtk-gtkvbuttonbox.xml | 131 - docs/reference/pygtk-gtkviewport.xml | 425 - docs/reference/pygtk-gtkvpaned.xml | 109 - docs/reference/pygtk-gtkvruler.xml | 108 - docs/reference/pygtk-gtkvscale.xml | 119 - docs/reference/pygtk-gtkvscrollbar.xml | 123 - docs/reference/pygtk-gtkvseparator.xml | 93 - docs/reference/pygtk-gtkwidget.xml | 9737 ------- docs/reference/pygtk-gtkwindow.xml | 4223 --- docs/reference/pygtk-gtkwindowgroup.xml | 141 - docs/reference/pygtk-hierarchy.xml | 230 - docs/reference/pygtk-introduction.xml | 515 - docs/reference/pygtk-pango-classes.xml | 33 - docs/reference/pygtk-pango-constants.xml | 770 - docs/reference/pygtk-pango-functions.xml | 248 - docs/reference/pygtk-pango-markup.xml | 215 - docs/reference/pygtk-pangoattribute.xml | 1797 -- docs/reference/pygtk-pangoattriter.xml | 250 - docs/reference/pygtk-pangoattrlist.xml | 399 - docs/reference/pygtk-pangocairo-classes.xml | 15 - docs/reference/pygtk-pangocairo-constants.xml | 43 - docs/reference/pygtk-pangocairo-functions.xml | 129 - docs/reference/pygtk-pangocairocairocontext.xml | 408 - docs/reference/pygtk-pangocairocairofontmap.xml | 217 - docs/reference/pygtk-pangocolor.xml | 116 - docs/reference/pygtk-pangocontext.xml | 448 - docs/reference/pygtk-pangofont.xml | 352 - docs/reference/pygtk-pangofontdescription.xml | 1154 - docs/reference/pygtk-pangofontface.xml | 138 - docs/reference/pygtk-pangofontfamily.xml | 148 - docs/reference/pygtk-pangofontmap.xml | 215 - docs/reference/pygtk-pangofontmetrics.xml | 164 - docs/reference/pygtk-pangofontset.xml | 172 - docs/reference/pygtk-pangofontsetsimple.xml | 149 - docs/reference/pygtk-pangoglyphstring.xml | 274 - docs/reference/pygtk-pangolanguage.xml | 277 - docs/reference/pygtk-pangolayout.xml | 1312 - docs/reference/pygtk-pangolayoutiter.xml | 473 - docs/reference/pygtk-pangolayoutline.xml | 262 - docs/reference/pygtk-pangorenderer.xml | 598 - docs/reference/pygtk-pangotabarray.xml | 290 - docs/reference/pygtk-pygtkgenericcellrenderer.xml | 112 - docs/reference/pygtk-pygtkgenerictreemodel.xml | 279 - docs/reference/pygtk-pygtktreemodelrow.xml | 189 - docs/reference/pygtk-pygtktreemodelrowiter.xml | 102 - docs/reference/pygtk-unixprint-classes.xml | 16 - docs/reference/pygtk-unixprint-constants.xml | 67 - docs/reference/pygtk-unixprint-functions.xml | 82 - docs/reference/pygtk2-ref.xml | 42 - examples/Makefile.am | 103 - examples/atk/atk-demo.py | 29 - examples/glade/README | 12 - examples/glade/autoconnect.py | 20 - examples/glade/glade-demo.py | 19 - examples/glade/test.glade | 127 - examples/glade/test2.glade | 27 - examples/gobject/editable-interface.py | 30 - examples/gobject/properties.py | 43 - examples/gobject/signal.py | 28 - examples/gtk/bin.py | 30 - examples/gtk/filechooser.py | 35 - examples/gtk/scrollable.py | 280 - examples/gtk/sizegroup.py | 48 - examples/gtk/testprint.py | 68 - examples/gtk/uimanager.py | 127 - examples/gtk/widget.py | 133 - examples/ide/README | 7 - examples/ide/break.xpm | 29 - examples/ide/browse.py | 119 - examples/ide/continue.xpm | 27 - examples/ide/dialogs.py | 58 - examples/ide/edit.py | 284 - examples/ide/edit.xpm | 38 - examples/ide/gtkcons.py | 330 - examples/ide/gtkdb.py | 434 - examples/ide/gtkprof.py | 133 - examples/ide/minibreak.xpm | 19 - examples/ide/next.xpm | 32 - examples/ide/pyide.py | 260 - examples/ide/quit.xpm | 36 - examples/ide/return.xpm | 35 - examples/ide/run.xpm | 28 - examples/ide/step.xpm | 35 - examples/pango/pangocairo-simple.py | 66 - examples/pango/utf8-demo.py | 68 - examples/pygtk-demo/demos/__init__.py | 25 - examples/pygtk-demo/demos/appwindow.py | 306 - examples/pygtk-demo/demos/buttonbox.py | 88 - examples/pygtk-demo/demos/changedisplay.py | 413 - examples/pygtk-demo/demos/colorsel.py | 73 - examples/pygtk-demo/demos/dialogs.py | 130 - examples/pygtk-demo/demos/dnd.py | 205 - examples/pygtk-demo/demos/dndpixmap.py | 259 - examples/pygtk-demo/demos/editable_cells.py | 166 - examples/pygtk-demo/demos/entry_completion.py | 76 - examples/pygtk-demo/demos/expander.py | 47 - examples/pygtk-demo/demos/hypertext.py | 184 - examples/pygtk-demo/demos/images.py | 306 - examples/pygtk-demo/demos/images/alphatest.png | Bin 26529 -> 0 bytes examples/pygtk-demo/demos/images/apple-red.png | Bin 3545 -> 0 bytes examples/pygtk-demo/demos/images/background.jpg | Bin 22219 -> 0 bytes examples/pygtk-demo/demos/images/floppybuddy.gif | Bin 5216 -> 0 bytes examples/pygtk-demo/demos/images/gnome-applets.png | Bin 3090 -> 0 bytes .../pygtk-demo/demos/images/gnome-calendar.png | Bin 2755 -> 0 bytes examples/pygtk-demo/demos/images/gnome-foot.png | Bin 2916 -> 0 bytes examples/pygtk-demo/demos/images/gnome-gimp.png | Bin 3410 -> 0 bytes examples/pygtk-demo/demos/images/gnome-gmush.png | Bin 3244 -> 0 bytes examples/pygtk-demo/demos/images/gnome-gsame.png | Bin 4263 -> 0 bytes examples/pygtk-demo/demos/images/gnu-keys.png | Bin 3852 -> 0 bytes examples/pygtk-demo/demos/images/gtk-logo-rgb.gif | Bin 6427 -> 0 bytes examples/pygtk-demo/demos/list_store.py | 141 - examples/pygtk-demo/demos/menu.py | 88 - examples/pygtk-demo/demos/panes.py | 124 - examples/pygtk-demo/demos/pixbufs.py | 200 - examples/pygtk-demo/demos/print_editor.py | 450 - examples/pygtk-demo/demos/sizegroup.py | 108 - examples/pygtk-demo/demos/statusicon.py | 31 - examples/pygtk-demo/demos/stock_browser.py | 270 - examples/pygtk-demo/demos/textview.py | 498 - examples/pygtk-demo/demos/tree_store.py | 334 - examples/pygtk-demo/demos/treemodel.py | 120 - examples/pygtk-demo/demos/ui_manager.py | 191 - examples/pygtk-demo/pygtk-demo.in | 7 - examples/pygtk-demo/pygtk-demo.py | 318 - examples/simple/README | 5 - examples/simple/dnd.py | 182 - examples/simple/dndpixmap.py | 259 - examples/simple/hello.py | 31 - examples/simple/scribble.py | 78 - examples/simple/simple.py | 29 - examples/simple/tooltip.py | 43 - gtk/Makefile.am | 191 - gtk/__init__.py | 139 - gtk/_lazyutils.py | 84 - gtk/compat.py | 71 - gtk/deprecation.py | 83 - gtk/gdk-2.10.defs | 260 - gtk/gdk-base-types.defs | 989 - gtk/gdk-base.defs | 6809 ----- gtk/gdk.override | 1493 - gtk/gdkcairo.override | 249 - gtk/gdkcolor.override | 201 - gtk/gdkdraw.override | 464 - gtk/gdkevent.override | 909 - gtk/gdkgc.override | 625 - gtk/gdkpixbuf.override | 767 - gtk/gdkrectangle.override | 216 - gtk/gdkwindow.override | 704 - gtk/gtk-2.10-types.defs | 376 - gtk/gtk-2.10.defs | 4122 --- gtk/gtk-base-types.defs | 2735 -- gtk/gtk-base.defs | 28041 ------------------- gtk/gtk-extrafuncs.defs | 110 - gtk/gtk-types.c | 1372 - gtk/gtk.override | 8293 ------ gtk/gtkclist.override | 359 - gtk/gtkcontainer.override | 1084 - gtk/gtkctree.override | 527 - gtk/gtkiconview.override | 336 - gtk/gtkmodule.c | 249 - gtk/gtkobject-support.c | 138 - gtk/gtkstyle.override | 277 - gtk/gtktextview.override | 1600 -- gtk/gtktoolbar.override | 578 - gtk/gtktreeview.override | 3322 --- gtk/gtkunixprint.defs | 408 - gtk/gtkunixprint.override | 236 - gtk/gtkunixprintmodule.c | 56 - gtk/gtkwidget.override | 575 - gtk/gtkwindow.override | 286 - gtk/keysyms.py | 1499 - gtk/libglade.defs | 196 - gtk/libglade.override | 549 - gtk/libglademodule.c | 48 - gtk/pygtk-private.h | 75 - gtk/pygtk.h | 85 - gtk/pygtkcellrenderer.c | 328 - gtk/pygtkcellrenderer.h | 44 - gtk/pygtktreemodel.c | 803 - gtk/pygtktreemodel.h | 50 - ltihooks.py | 60 - m4/jhflags.m4 | 21 - m4/python.m4 | 62 - pango-types.defs | 463 - pango.defs | 3053 -- pango.override | 2023 -- pangocairo.defs | 162 - pangocairo.override | 315 - pangocairomodule.c | 70 - pangomodule.c | 100 - pygobject-2.0.pc.in | 20 - pygtk-2.0.pc.in | 21 - pygtk.spec.in | 127 - pygtk_postinstall.py | 108 - setup.py | 320 - tests/Makefile.am | 33 - tests/common.py | 68 - tests/leak.glade | 29 - tests/runtests.py | 44 - tests/test_actiongroup.py | 129 - tests/test_api.py | 36 - tests/test_container.py | 56 - tests/test_conversion.py | 83 - tests/test_dialog.py | 35 - tests/test_enum.py | 229 - tests/test_gdk.py | 73 - tests/test_gdkevent.py | 22 - tests/test_glade.py | 33 - tests/test_liststore.py | 36 - tests/test_pango.py | 9 - tests/test_radiobutton.py | 98 - tests/test_style.py | 29 - tests/test_textview.py | 13 - tests/test_treeview.py | 27 - tests/testmodule.py | 7 - 504 files changed, 314364 deletions(-) delete mode 100644 AUTHORS delete mode 100644 COPYING delete mode 100644 ChangeLog delete mode 100644 ChangeLog.pre-2-0 delete mode 100644 ChangeLog.pre-2-6 delete mode 100644 ChangeLog.pre-2-8 delete mode 100644 MANIFEST.in delete mode 100644 MAPPING delete mode 100644 Makefile.am delete mode 100644 NEWS delete mode 100644 PKG-INFO.in delete mode 100644 README delete mode 100644 THREADS delete mode 100644 TODO delete mode 100644 atk-types.defs delete mode 100644 atk.defs delete mode 100644 atk.override delete mode 100644 atkmodule.c delete mode 100644 atkrectangle.override delete mode 100755 autogen.sh delete mode 100644 codegen/Makefile.am delete mode 100644 codegen/README.defs delete mode 100644 codegen/__init__.py delete mode 100644 codegen/argtypes.py delete mode 100755 codegen/code-coverage.py delete mode 100644 codegen/codegen.py delete mode 100644 codegen/createdefs.py delete mode 100644 codegen/definitions.py delete mode 100644 codegen/defsconvert.py delete mode 100644 codegen/defsgen.py delete mode 100644 codegen/defsparser.py delete mode 100644 codegen/docextract.py delete mode 100755 codegen/docextract_to_xml.py delete mode 100644 codegen/docgen.py delete mode 100755 codegen/h2def.py delete mode 100755 codegen/mergedefs.py delete mode 100755 codegen/missingdefs.py delete mode 100755 codegen/mkskel.py delete mode 100644 codegen/override.py delete mode 100644 codegen/pygtk-codegen-2.0.in delete mode 100644 codegen/reversewrapper.py delete mode 100755 codegen/scanvirtuals.py delete mode 100644 codegen/scmexpr.py delete mode 100644 config.h.win32 delete mode 100644 configure.in delete mode 100644 docs/Makefile.am delete mode 100644 docs/random/missing-symbols delete mode 100644 docs/random/release-checklist delete mode 100644 docs/random/update-bindings delete mode 100644 docs/reference/ChangeLog delete mode 100644 docs/reference/entities.docbook.in delete mode 100644 docs/reference/pygtk-atk-classes.xml delete mode 100644 docs/reference/pygtk-atk-constants.xml delete mode 100644 docs/reference/pygtk-atkaction.xml delete mode 100644 docs/reference/pygtk-atkcomponent.xml delete mode 100644 docs/reference/pygtk-atkdocument.xml delete mode 100644 docs/reference/pygtk-atkeditabletext.xml delete mode 100644 docs/reference/pygtk-atkgobjectaccessible.xml delete mode 100644 docs/reference/pygtk-atkhyperlink.xml delete mode 100644 docs/reference/pygtk-atkhypertext.xml delete mode 100644 docs/reference/pygtk-atkimage.xml delete mode 100644 docs/reference/pygtk-atkimplementor.xml delete mode 100644 docs/reference/pygtk-atknoopobject.xml delete mode 100644 docs/reference/pygtk-atknoopobjectfactory.xml delete mode 100644 docs/reference/pygtk-atkobject.xml delete mode 100644 docs/reference/pygtk-atkobjectfactory.xml delete mode 100644 docs/reference/pygtk-atkrectangle.xml delete mode 100644 docs/reference/pygtk-atkregistry.xml delete mode 100644 docs/reference/pygtk-atkrelation.xml delete mode 100644 docs/reference/pygtk-atkrelationset.xml delete mode 100644 docs/reference/pygtk-atkselection.xml delete mode 100644 docs/reference/pygtk-atkstateset.xml delete mode 100644 docs/reference/pygtk-atkstreamablecontent.xml delete mode 100644 docs/reference/pygtk-atktable.xml delete mode 100644 docs/reference/pygtk-atktext.xml delete mode 100644 docs/reference/pygtk-atkvalue.xml delete mode 100644 docs/reference/pygtk-gdk-classes.xml delete mode 100644 docs/reference/pygtk-gdk-constants.xml delete mode 100644 docs/reference/pygtk-gdk-functions.xml delete mode 100644 docs/reference/pygtk-gdkatom.xml delete mode 100644 docs/reference/pygtk-gdkcairocontext.xml delete mode 100644 docs/reference/pygtk-gdkcolor.xml delete mode 100644 docs/reference/pygtk-gdkcolormap.xml delete mode 100644 docs/reference/pygtk-gdkcursor.xml delete mode 100644 docs/reference/pygtk-gdkdevice.xml delete mode 100644 docs/reference/pygtk-gdkdisplay.xml delete mode 100644 docs/reference/pygtk-gdkdisplaymanager.xml delete mode 100644 docs/reference/pygtk-gdkdragcontext.xml delete mode 100644 docs/reference/pygtk-gdkdrawable.xml delete mode 100644 docs/reference/pygtk-gdkevent.xml delete mode 100644 docs/reference/pygtk-gdkfont.xml delete mode 100644 docs/reference/pygtk-gdkgc.xml delete mode 100644 docs/reference/pygtk-gdkimage.xml delete mode 100644 docs/reference/pygtk-gdkkeymap.xml delete mode 100644 docs/reference/pygtk-gdkpangorenderer.xml delete mode 100644 docs/reference/pygtk-gdkpixbuf.xml delete mode 100644 docs/reference/pygtk-gdkpixbufanimation.xml delete mode 100644 docs/reference/pygtk-gdkpixbufanimationiter.xml delete mode 100644 docs/reference/pygtk-gdkpixbufloader.xml delete mode 100644 docs/reference/pygtk-gdkpixmap.xml delete mode 100644 docs/reference/pygtk-gdkrectangle.xml delete mode 100644 docs/reference/pygtk-gdkregion.xml delete mode 100644 docs/reference/pygtk-gdkscreen.xml delete mode 100644 docs/reference/pygtk-gdkvisual.xml delete mode 100644 docs/reference/pygtk-gdkwindow.xml delete mode 100644 docs/reference/pygtk-glade-classes.xml delete mode 100644 docs/reference/pygtk-gladexml.xml delete mode 100644 docs/reference/pygtk-gobject-classes.xml delete mode 100644 docs/reference/pygtk-gobject-constants.xml delete mode 100644 docs/reference/pygtk-gobject-functions.xml delete mode 100644 docs/reference/pygtk-gobject-gboxed.xml delete mode 100644 docs/reference/pygtk-gobject-ginterface.xml delete mode 100644 docs/reference/pygtk-gobject-gpointer.xml delete mode 100644 docs/reference/pygtk-gobject-maincontext.xml delete mode 100644 docs/reference/pygtk-gobject-mainloop.xml delete mode 100644 docs/reference/pygtk-gobject.xml delete mode 100644 docs/reference/pygtk-gtk-classes.xml delete mode 100644 docs/reference/pygtk-gtk-constants.xml delete mode 100644 docs/reference/pygtk-gtk-functions.xml delete mode 100644 docs/reference/pygtk-gtk-stock-items.xml delete mode 100644 docs/reference/pygtk-gtkaboutdialog.xml delete mode 100644 docs/reference/pygtk-gtkaccelgroup.xml delete mode 100644 docs/reference/pygtk-gtkaccellabel.xml delete mode 100644 docs/reference/pygtk-gtkaccelmap.xml delete mode 100644 docs/reference/pygtk-gtkaccessible.xml delete mode 100644 docs/reference/pygtk-gtkaction.xml delete mode 100644 docs/reference/pygtk-gtkactiongroup.xml delete mode 100644 docs/reference/pygtk-gtkadjustment.xml delete mode 100644 docs/reference/pygtk-gtkalignment.xml delete mode 100644 docs/reference/pygtk-gtkarrow.xml delete mode 100644 docs/reference/pygtk-gtkaspectframe.xml delete mode 100644 docs/reference/pygtk-gtkassistant.xml delete mode 100644 docs/reference/pygtk-gtkbin.xml delete mode 100644 docs/reference/pygtk-gtkborder.xml delete mode 100644 docs/reference/pygtk-gtkbox.xml delete mode 100644 docs/reference/pygtk-gtkbutton.xml delete mode 100644 docs/reference/pygtk-gtkbuttonbox.xml delete mode 100644 docs/reference/pygtk-gtkcalendar.xml delete mode 100644 docs/reference/pygtk-gtkcelleditable.xml delete mode 100644 docs/reference/pygtk-gtkcelllayout.xml delete mode 100644 docs/reference/pygtk-gtkcellrenderer.xml delete mode 100644 docs/reference/pygtk-gtkcellrendereraccel.xml delete mode 100644 docs/reference/pygtk-gtkcellrenderercombo.xml delete mode 100644 docs/reference/pygtk-gtkcellrendererpixbuf.xml delete mode 100644 docs/reference/pygtk-gtkcellrendererprogress.xml delete mode 100644 docs/reference/pygtk-gtkcellrendererspin.xml delete mode 100644 docs/reference/pygtk-gtkcellrenderertext.xml delete mode 100644 docs/reference/pygtk-gtkcellrenderertoggle.xml delete mode 100644 docs/reference/pygtk-gtkcellview.xml delete mode 100644 docs/reference/pygtk-gtkcheckbutton.xml delete mode 100644 docs/reference/pygtk-gtkcheckmenuitem.xml delete mode 100644 docs/reference/pygtk-gtkclipboard.xml delete mode 100644 docs/reference/pygtk-gtkcolorbutton.xml delete mode 100644 docs/reference/pygtk-gtkcolorselection.xml delete mode 100644 docs/reference/pygtk-gtkcolorselectiondialog.xml delete mode 100644 docs/reference/pygtk-gtkcombo.xml delete mode 100644 docs/reference/pygtk-gtkcombobox.xml delete mode 100644 docs/reference/pygtk-gtkcomboboxentry.xml delete mode 100644 docs/reference/pygtk-gtkcontainer.xml delete mode 100644 docs/reference/pygtk-gtkcurve.xml delete mode 100644 docs/reference/pygtk-gtkdialog.xml delete mode 100644 docs/reference/pygtk-gtkdrawingarea.xml delete mode 100644 docs/reference/pygtk-gtkeditable.xml delete mode 100644 docs/reference/pygtk-gtkentry.xml delete mode 100644 docs/reference/pygtk-gtkentrycompletion.xml delete mode 100644 docs/reference/pygtk-gtkeventbox.xml delete mode 100644 docs/reference/pygtk-gtkexpander.xml delete mode 100644 docs/reference/pygtk-gtkfilechooser.xml delete mode 100644 docs/reference/pygtk-gtkfilechooserbutton.xml delete mode 100644 docs/reference/pygtk-gtkfilechooserdialog.xml delete mode 100644 docs/reference/pygtk-gtkfilechooserwidget.xml delete mode 100644 docs/reference/pygtk-gtkfilefilter.xml delete mode 100644 docs/reference/pygtk-gtkfileselection.xml delete mode 100644 docs/reference/pygtk-gtkfixed.xml delete mode 100644 docs/reference/pygtk-gtkfontbutton.xml delete mode 100644 docs/reference/pygtk-gtkfontselection.xml delete mode 100644 docs/reference/pygtk-gtkfontselectiondialog.xml delete mode 100644 docs/reference/pygtk-gtkframe.xml delete mode 100644 docs/reference/pygtk-gtkgammacurve.xml delete mode 100644 docs/reference/pygtk-gtkhandlebox.xml delete mode 100644 docs/reference/pygtk-gtkhbox.xml delete mode 100644 docs/reference/pygtk-gtkhbuttonbox.xml delete mode 100644 docs/reference/pygtk-gtkhpaned.xml delete mode 100644 docs/reference/pygtk-gtkhruler.xml delete mode 100644 docs/reference/pygtk-gtkhscale.xml delete mode 100644 docs/reference/pygtk-gtkhscrollbar.xml delete mode 100644 docs/reference/pygtk-gtkhseparator.xml delete mode 100644 docs/reference/pygtk-gtkiconfactory.xml delete mode 100644 docs/reference/pygtk-gtkiconinfo.xml delete mode 100644 docs/reference/pygtk-gtkiconset.xml delete mode 100644 docs/reference/pygtk-gtkiconsource.xml delete mode 100644 docs/reference/pygtk-gtkicontheme.xml delete mode 100644 docs/reference/pygtk-gtkiconview.xml delete mode 100644 docs/reference/pygtk-gtkimage.xml delete mode 100644 docs/reference/pygtk-gtkimagemenuitem.xml delete mode 100644 docs/reference/pygtk-gtkimcontext.xml delete mode 100644 docs/reference/pygtk-gtkimcontextsimple.xml delete mode 100644 docs/reference/pygtk-gtkimmulticontext.xml delete mode 100644 docs/reference/pygtk-gtkinputdialog.xml delete mode 100644 docs/reference/pygtk-gtkinvisible.xml delete mode 100644 docs/reference/pygtk-gtkitem.xml delete mode 100644 docs/reference/pygtk-gtkitemfactory.xml delete mode 100644 docs/reference/pygtk-gtklabel.xml delete mode 100644 docs/reference/pygtk-gtklayout.xml delete mode 100644 docs/reference/pygtk-gtklinkbutton.xml delete mode 100644 docs/reference/pygtk-gtkliststore.xml delete mode 100644 docs/reference/pygtk-gtkmenu.xml delete mode 100644 docs/reference/pygtk-gtkmenubar.xml delete mode 100644 docs/reference/pygtk-gtkmenuitem.xml delete mode 100644 docs/reference/pygtk-gtkmenushell.xml delete mode 100644 docs/reference/pygtk-gtkmenutoolbutton.xml delete mode 100644 docs/reference/pygtk-gtkmessagedialog.xml delete mode 100644 docs/reference/pygtk-gtkmisc.xml delete mode 100644 docs/reference/pygtk-gtknotebook.xml delete mode 100644 docs/reference/pygtk-gtkobject.xml delete mode 100644 docs/reference/pygtk-gtkoptionmenu.xml delete mode 100644 docs/reference/pygtk-gtkpagesetup.xml delete mode 100644 docs/reference/pygtk-gtkpagesetupunixdialog.xml delete mode 100644 docs/reference/pygtk-gtkpaned.xml delete mode 100644 docs/reference/pygtk-gtkpapersize.xml delete mode 100644 docs/reference/pygtk-gtkplug.xml delete mode 100644 docs/reference/pygtk-gtkprintcontext.xml delete mode 100644 docs/reference/pygtk-gtkprinter.xml delete mode 100644 docs/reference/pygtk-gtkprintjob.xml delete mode 100644 docs/reference/pygtk-gtkprintoperation.xml delete mode 100644 docs/reference/pygtk-gtkprintoperationpreview.xml delete mode 100644 docs/reference/pygtk-gtkprintsettings.xml delete mode 100644 docs/reference/pygtk-gtkprintunixdialog.xml delete mode 100644 docs/reference/pygtk-gtkprogressbar.xml delete mode 100644 docs/reference/pygtk-gtkradioaction.xml delete mode 100644 docs/reference/pygtk-gtkradiobutton.xml delete mode 100644 docs/reference/pygtk-gtkradiomenuitem.xml delete mode 100644 docs/reference/pygtk-gtkradiotoolbutton.xml delete mode 100644 docs/reference/pygtk-gtkrange.xml delete mode 100644 docs/reference/pygtk-gtkrcstyle.xml delete mode 100644 docs/reference/pygtk-gtkrecentchooser.xml delete mode 100644 docs/reference/pygtk-gtkrecentchooserdialog.xml delete mode 100644 docs/reference/pygtk-gtkrecentchoosermenu.xml delete mode 100644 docs/reference/pygtk-gtkrecentchooserwidget.xml delete mode 100644 docs/reference/pygtk-gtkrecentfilter.xml delete mode 100644 docs/reference/pygtk-gtkrecentinfo.xml delete mode 100644 docs/reference/pygtk-gtkrecentmanager.xml delete mode 100644 docs/reference/pygtk-gtkrequisition.xml delete mode 100644 docs/reference/pygtk-gtkruler.xml delete mode 100644 docs/reference/pygtk-gtkscale.xml delete mode 100644 docs/reference/pygtk-gtkscrollbar.xml delete mode 100644 docs/reference/pygtk-gtkscrolledwindow.xml delete mode 100644 docs/reference/pygtk-gtkselectiondata.xml delete mode 100644 docs/reference/pygtk-gtkseparator.xml delete mode 100644 docs/reference/pygtk-gtkseparatormenuitem.xml delete mode 100644 docs/reference/pygtk-gtkseparatortoolitem.xml delete mode 100644 docs/reference/pygtk-gtksettings.xml delete mode 100644 docs/reference/pygtk-gtksizegroup.xml delete mode 100644 docs/reference/pygtk-gtksocket.xml delete mode 100644 docs/reference/pygtk-gtkspinbutton.xml delete mode 100644 docs/reference/pygtk-gtkstatusbar.xml delete mode 100644 docs/reference/pygtk-gtkstatusicon.xml delete mode 100644 docs/reference/pygtk-gtkstyle.xml delete mode 100644 docs/reference/pygtk-gtktable.xml delete mode 100644 docs/reference/pygtk-gtktearoffmenuitem.xml delete mode 100644 docs/reference/pygtk-gtktextattributes.xml delete mode 100644 docs/reference/pygtk-gtktextbuffer.xml delete mode 100644 docs/reference/pygtk-gtktextchildanchor.xml delete mode 100644 docs/reference/pygtk-gtktextiter.xml delete mode 100644 docs/reference/pygtk-gtktextmark.xml delete mode 100644 docs/reference/pygtk-gtktexttag.xml delete mode 100644 docs/reference/pygtk-gtktexttagtable.xml delete mode 100644 docs/reference/pygtk-gtktextview.xml delete mode 100644 docs/reference/pygtk-gtktoggleaction.xml delete mode 100644 docs/reference/pygtk-gtktogglebutton.xml delete mode 100644 docs/reference/pygtk-gtktoggletoolbutton.xml delete mode 100644 docs/reference/pygtk-gtktoolbar.xml delete mode 100644 docs/reference/pygtk-gtktoolbutton.xml delete mode 100644 docs/reference/pygtk-gtktoolitem.xml delete mode 100644 docs/reference/pygtk-gtktooltips.xml delete mode 100644 docs/reference/pygtk-gtktreedragdest.xml delete mode 100644 docs/reference/pygtk-gtktreedragsource.xml delete mode 100644 docs/reference/pygtk-gtktreeiter.xml delete mode 100644 docs/reference/pygtk-gtktreemodel.xml delete mode 100644 docs/reference/pygtk-gtktreemodelfilter.xml delete mode 100644 docs/reference/pygtk-gtktreemodelsort.xml delete mode 100644 docs/reference/pygtk-gtktreerowreference.xml delete mode 100644 docs/reference/pygtk-gtktreeselection.xml delete mode 100644 docs/reference/pygtk-gtktreesortable.xml delete mode 100644 docs/reference/pygtk-gtktreestore.xml delete mode 100644 docs/reference/pygtk-gtktreeview.xml delete mode 100644 docs/reference/pygtk-gtktreeviewcolumn.xml delete mode 100644 docs/reference/pygtk-gtkuimanager.xml delete mode 100644 docs/reference/pygtk-gtkvbox.xml delete mode 100644 docs/reference/pygtk-gtkvbuttonbox.xml delete mode 100644 docs/reference/pygtk-gtkviewport.xml delete mode 100644 docs/reference/pygtk-gtkvpaned.xml delete mode 100644 docs/reference/pygtk-gtkvruler.xml delete mode 100644 docs/reference/pygtk-gtkvscale.xml delete mode 100644 docs/reference/pygtk-gtkvscrollbar.xml delete mode 100644 docs/reference/pygtk-gtkvseparator.xml delete mode 100644 docs/reference/pygtk-gtkwidget.xml delete mode 100644 docs/reference/pygtk-gtkwindow.xml delete mode 100644 docs/reference/pygtk-gtkwindowgroup.xml delete mode 100644 docs/reference/pygtk-hierarchy.xml delete mode 100644 docs/reference/pygtk-introduction.xml delete mode 100644 docs/reference/pygtk-pango-classes.xml delete mode 100644 docs/reference/pygtk-pango-constants.xml delete mode 100644 docs/reference/pygtk-pango-functions.xml delete mode 100644 docs/reference/pygtk-pango-markup.xml delete mode 100644 docs/reference/pygtk-pangoattribute.xml delete mode 100644 docs/reference/pygtk-pangoattriter.xml delete mode 100644 docs/reference/pygtk-pangoattrlist.xml delete mode 100644 docs/reference/pygtk-pangocairo-classes.xml delete mode 100644 docs/reference/pygtk-pangocairo-constants.xml delete mode 100644 docs/reference/pygtk-pangocairo-functions.xml delete mode 100644 docs/reference/pygtk-pangocairocairocontext.xml delete mode 100644 docs/reference/pygtk-pangocairocairofontmap.xml delete mode 100644 docs/reference/pygtk-pangocolor.xml delete mode 100644 docs/reference/pygtk-pangocontext.xml delete mode 100644 docs/reference/pygtk-pangofont.xml delete mode 100644 docs/reference/pygtk-pangofontdescription.xml delete mode 100644 docs/reference/pygtk-pangofontface.xml delete mode 100644 docs/reference/pygtk-pangofontfamily.xml delete mode 100644 docs/reference/pygtk-pangofontmap.xml delete mode 100644 docs/reference/pygtk-pangofontmetrics.xml delete mode 100644 docs/reference/pygtk-pangofontset.xml delete mode 100644 docs/reference/pygtk-pangofontsetsimple.xml delete mode 100644 docs/reference/pygtk-pangoglyphstring.xml delete mode 100644 docs/reference/pygtk-pangolanguage.xml delete mode 100644 docs/reference/pygtk-pangolayout.xml delete mode 100644 docs/reference/pygtk-pangolayoutiter.xml delete mode 100644 docs/reference/pygtk-pangolayoutline.xml delete mode 100644 docs/reference/pygtk-pangorenderer.xml delete mode 100644 docs/reference/pygtk-pangotabarray.xml delete mode 100644 docs/reference/pygtk-pygtkgenericcellrenderer.xml delete mode 100644 docs/reference/pygtk-pygtkgenerictreemodel.xml delete mode 100644 docs/reference/pygtk-pygtktreemodelrow.xml delete mode 100644 docs/reference/pygtk-pygtktreemodelrowiter.xml delete mode 100644 docs/reference/pygtk-unixprint-classes.xml delete mode 100644 docs/reference/pygtk-unixprint-constants.xml delete mode 100644 docs/reference/pygtk-unixprint-functions.xml delete mode 100644 docs/reference/pygtk2-ref.xml delete mode 100644 examples/Makefile.am delete mode 100644 examples/atk/atk-demo.py delete mode 100644 examples/glade/README delete mode 100644 examples/glade/autoconnect.py delete mode 100644 examples/glade/glade-demo.py delete mode 100644 examples/glade/test.glade delete mode 100644 examples/glade/test2.glade delete mode 100644 examples/gobject/editable-interface.py delete mode 100644 examples/gobject/properties.py delete mode 100644 examples/gobject/signal.py delete mode 100644 examples/gtk/bin.py delete mode 100644 examples/gtk/filechooser.py delete mode 100644 examples/gtk/scrollable.py delete mode 100644 examples/gtk/sizegroup.py delete mode 100644 examples/gtk/testprint.py delete mode 100644 examples/gtk/uimanager.py delete mode 100644 examples/gtk/widget.py delete mode 100644 examples/ide/README delete mode 100644 examples/ide/break.xpm delete mode 100755 examples/ide/browse.py delete mode 100644 examples/ide/continue.xpm delete mode 100644 examples/ide/dialogs.py delete mode 100644 examples/ide/edit.py delete mode 100644 examples/ide/edit.xpm delete mode 100755 examples/ide/gtkcons.py delete mode 100755 examples/ide/gtkdb.py delete mode 100755 examples/ide/gtkprof.py delete mode 100644 examples/ide/minibreak.xpm delete mode 100644 examples/ide/next.xpm delete mode 100755 examples/ide/pyide.py delete mode 100644 examples/ide/quit.xpm delete mode 100644 examples/ide/return.xpm delete mode 100644 examples/ide/run.xpm delete mode 100644 examples/ide/step.xpm delete mode 100644 examples/pango/pangocairo-simple.py delete mode 100644 examples/pango/utf8-demo.py delete mode 100644 examples/pygtk-demo/demos/__init__.py delete mode 100644 examples/pygtk-demo/demos/appwindow.py delete mode 100644 examples/pygtk-demo/demos/buttonbox.py delete mode 100644 examples/pygtk-demo/demos/changedisplay.py delete mode 100644 examples/pygtk-demo/demos/colorsel.py delete mode 100644 examples/pygtk-demo/demos/dialogs.py delete mode 100644 examples/pygtk-demo/demos/dnd.py delete mode 100644 examples/pygtk-demo/demos/dndpixmap.py delete mode 100644 examples/pygtk-demo/demos/editable_cells.py delete mode 100644 examples/pygtk-demo/demos/entry_completion.py delete mode 100644 examples/pygtk-demo/demos/expander.py delete mode 100644 examples/pygtk-demo/demos/hypertext.py delete mode 100644 examples/pygtk-demo/demos/images.py delete mode 100644 examples/pygtk-demo/demos/images/alphatest.png delete mode 100644 examples/pygtk-demo/demos/images/apple-red.png delete mode 100644 examples/pygtk-demo/demos/images/background.jpg delete mode 100644 examples/pygtk-demo/demos/images/floppybuddy.gif delete mode 100644 examples/pygtk-demo/demos/images/gnome-applets.png delete mode 100644 examples/pygtk-demo/demos/images/gnome-calendar.png delete mode 100644 examples/pygtk-demo/demos/images/gnome-foot.png delete mode 100644 examples/pygtk-demo/demos/images/gnome-gimp.png delete mode 100644 examples/pygtk-demo/demos/images/gnome-gmush.png delete mode 100644 examples/pygtk-demo/demos/images/gnome-gsame.png delete mode 100644 examples/pygtk-demo/demos/images/gnu-keys.png delete mode 100644 examples/pygtk-demo/demos/images/gtk-logo-rgb.gif delete mode 100644 examples/pygtk-demo/demos/list_store.py delete mode 100644 examples/pygtk-demo/demos/menu.py delete mode 100644 examples/pygtk-demo/demos/panes.py delete mode 100644 examples/pygtk-demo/demos/pixbufs.py delete mode 100644 examples/pygtk-demo/demos/print_editor.py delete mode 100644 examples/pygtk-demo/demos/sizegroup.py delete mode 100644 examples/pygtk-demo/demos/statusicon.py delete mode 100644 examples/pygtk-demo/demos/stock_browser.py delete mode 100644 examples/pygtk-demo/demos/textview.py delete mode 100644 examples/pygtk-demo/demos/tree_store.py delete mode 100644 examples/pygtk-demo/demos/treemodel.py delete mode 100644 examples/pygtk-demo/demos/ui_manager.py delete mode 100644 examples/pygtk-demo/pygtk-demo.in delete mode 100644 examples/pygtk-demo/pygtk-demo.py delete mode 100644 examples/simple/README delete mode 100644 examples/simple/dnd.py delete mode 100644 examples/simple/dndpixmap.py delete mode 100755 examples/simple/hello.py delete mode 100755 examples/simple/scribble.py delete mode 100755 examples/simple/simple.py delete mode 100755 examples/simple/tooltip.py delete mode 100644 gtk/Makefile.am delete mode 100644 gtk/__init__.py delete mode 100644 gtk/_lazyutils.py delete mode 100644 gtk/compat.py delete mode 100644 gtk/deprecation.py delete mode 100644 gtk/gdk-2.10.defs delete mode 100644 gtk/gdk-base-types.defs delete mode 100644 gtk/gdk-base.defs delete mode 100644 gtk/gdk.override delete mode 100644 gtk/gdkcairo.override delete mode 100644 gtk/gdkcolor.override delete mode 100644 gtk/gdkdraw.override delete mode 100644 gtk/gdkevent.override delete mode 100644 gtk/gdkgc.override delete mode 100644 gtk/gdkpixbuf.override delete mode 100644 gtk/gdkrectangle.override delete mode 100644 gtk/gdkwindow.override delete mode 100644 gtk/gtk-2.10-types.defs delete mode 100644 gtk/gtk-2.10.defs delete mode 100644 gtk/gtk-base-types.defs delete mode 100644 gtk/gtk-base.defs delete mode 100644 gtk/gtk-extrafuncs.defs delete mode 100644 gtk/gtk-types.c delete mode 100644 gtk/gtk.override delete mode 100644 gtk/gtkclist.override delete mode 100644 gtk/gtkcontainer.override delete mode 100644 gtk/gtkctree.override delete mode 100644 gtk/gtkiconview.override delete mode 100644 gtk/gtkmodule.c delete mode 100644 gtk/gtkobject-support.c delete mode 100644 gtk/gtkstyle.override delete mode 100644 gtk/gtktextview.override delete mode 100644 gtk/gtktoolbar.override delete mode 100644 gtk/gtktreeview.override delete mode 100644 gtk/gtkunixprint.defs delete mode 100644 gtk/gtkunixprint.override delete mode 100644 gtk/gtkunixprintmodule.c delete mode 100644 gtk/gtkwidget.override delete mode 100644 gtk/gtkwindow.override delete mode 100644 gtk/keysyms.py delete mode 100644 gtk/libglade.defs delete mode 100644 gtk/libglade.override delete mode 100644 gtk/libglademodule.c delete mode 100644 gtk/pygtk-private.h delete mode 100644 gtk/pygtk.h delete mode 100644 gtk/pygtkcellrenderer.c delete mode 100644 gtk/pygtkcellrenderer.h delete mode 100644 gtk/pygtktreemodel.c delete mode 100644 gtk/pygtktreemodel.h delete mode 100644 ltihooks.py delete mode 100644 m4/jhflags.m4 delete mode 100644 m4/python.m4 delete mode 100644 pango-types.defs delete mode 100644 pango.defs delete mode 100644 pango.override delete mode 100644 pangocairo.defs delete mode 100644 pangocairo.override delete mode 100644 pangocairomodule.c delete mode 100644 pangomodule.c delete mode 100644 pygobject-2.0.pc.in delete mode 100644 pygtk-2.0.pc.in delete mode 100644 pygtk.spec.in delete mode 100644 pygtk_postinstall.py delete mode 100755 setup.py delete mode 100644 tests/Makefile.am delete mode 100644 tests/common.py delete mode 100644 tests/leak.glade delete mode 100644 tests/runtests.py delete mode 100644 tests/test_actiongroup.py delete mode 100644 tests/test_api.py delete mode 100644 tests/test_container.py delete mode 100644 tests/test_conversion.py delete mode 100644 tests/test_dialog.py delete mode 100644 tests/test_enum.py delete mode 100644 tests/test_gdk.py delete mode 100644 tests/test_gdkevent.py delete mode 100644 tests/test_glade.py delete mode 100644 tests/test_liststore.py delete mode 100644 tests/test_pango.py delete mode 100644 tests/test_radiobutton.py delete mode 100644 tests/test_style.py delete mode 100644 tests/test_textview.py delete mode 100644 tests/test_treeview.py delete mode 100644 tests/testmodule.py diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index e0c43f6b..00000000 --- a/AUTHORS +++ /dev/null @@ -1,15 +0,0 @@ -Original Author -=============== -James Henstridge - -The PyGTK Team (in alphabetical order) -================================ -Gustavo J A M Carneiro -Johan Dahlin -John Finlay -James Henstridge -Xavier Ordoquy -Christian Robottom Reis - -There are many others who have contributed patches; we thank them, -PyGTK is much better because of them. diff --git a/COPYING b/COPYING deleted file mode 100644 index b1e3f5a2..00000000 --- a/COPYING +++ /dev/null @@ -1,504 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "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. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. 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 LIBRARY 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 -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index 440ed270..00000000 --- a/ChangeLog +++ /dev/null @@ -1,2284 +0,0 @@ -=== 2.10.4 === -2007-02-05 Johan Dahlin - - * NEWS: - - 2.10.4 - -2007-01-31 Gian Mario Tagliaretti - - * gtk/gtkcontainer.override: Fix a possible memory leak in - gtk.Container.child_get() (Fixes bug #404076) - -2007-01-31 Johan Dahlin - - * gtk/gtkcontainer.override (_wrap_gtk_container_class_list_child_properties): Undeprecate - -2007-01-20 Gustavo J. A. M. Carneiro - - * gtk/gdk.override (_wrap_gdk_display_close): Force keeping of a - reference to the display GObject even when we close() it. - - * tests/test_gdk.py (GdkTest.testDisplay): Johan's unit test with - minor modifications. - - * gtk/gdk.override (_wrap_gdk_display_close): Override and make it - aware that calling gdk_display_close unrefs the GdkDisplay. - -2007-01-18 Johan Dahlin - - * gtk/gdk-base.defs: allow None - -2007-01-09 Gustavo J. A. M. Carneiro - - * configure.ac: Turn the option --disable-docs into --enable-docs. - * docs/Makefile.am: Treat --enable-docs like --enable-gtk-doc in - gtk+, i.e. do not ever build docs unless requested, but always - install them if they are found already built. - -2006-12-21 Sebastien Bacher - - * codegen/Makefile.am: install createdefs.py, fix dsextras.py, - patch by Michael Bienia (Fixes #385934) - -2006-12-14 Kjartan Maraas - - * autogen.sh: Make it work with automake 1.10. - -2006-12-05 Gustavo J. A. M. Carneiro - - * gtk/gdkevent.override (_wrap_gdk_event_tp_setattr): For the - attribute "string", free the old string and g_strdup the new one; - spotted by John Ehresman. - Fixes bug #382428. - -2006-12-02 Manish Singh - - * codegen/codegen.py: fix code for generating defines in override - files, by using variables that actually exist in the context. - Fixes bug #381389. - -2006-11-25 Gustavo J. A. M. Carneiro - - * gtk/gtktreeview.override (pygtk_tree_foreach_marshal): Use - pygtk_boxed_unref_shared to unref py_iter. We need this because - the application may decided to keep a copy of the iterator passed - in to a gtk_tree_model_foreach callback. - -2006-11-19 Gustavo J. A. M. Carneiro - - * examples/Makefile.am (demo_PYTHON), - * examples/pygtk-demo/demos/statusicon.py: Add a gtk.StatusIcon - example by Nikos Kouremenos. - -2006-11-15 Johan Dahlin - - * gtk/__init__.py: Do not rebind sys.path, restore the old one. - Thanks to Jp Calderone for pointing out. - -2006-10-13 Paolo Borelli - - * gtk/gtktextview.override - (pygtk_text_buffer_register_serialize_format_cb): set return - value to NULL in the error codepath. - -2006-10-13 John Finlay - - * docs/Makefile.am (HTMLFILES): Remove - html/pygtk-reference-copyright.html. Fixes #361906 (Marc-Andre Lureau) - -2006-10-05 Cedric Gustin - - * setup.py: Initialize Templates and TemplateExtensions with - py_ssize_t_clean=True (required by codegen.SourceWriter). - -2006-10-03 Gustavo J. A. M. Carneiro - - * configure.in: Bump version. - -=== 2.10.3 === -2006-10-03 Gustavo J. A. M. Carneiro - - * NEWS: Update. - - * Makefile.am: - * atk.override: - * atkrectangle.override: - * codegen/argtypes.py: - * codegen/codegen.py: - * gtk/Makefile.am: - * gtk/gdk.override: - * gtk/gdkdraw.override: - * gtk/gdkpixbuf.override: - * gtk/gdkrectangle.override: - * gtk/gtk-types.c: (pygtk_style_helper_getitem), - (pygtk_style_helper_setitem), (pygtk_tree_model_row_getitem), - (pygtk_tree_model_row_setitem): - * gtk/gtk.override: - * gtk/gtkcontainer.override: - * gtk/gtktextview.override: - * gtk/gtktreeview.override: - * pango.override: - - Support Python 2.5 + 64-bit architectures (#337368). - -2006-10-03 Gustavo J. A. M. Carneiro - - * gtk/gtktreeview.override (pygtk_tree_sortable_sort_cb): Fix a - refcount problem accidentally introduced by me between 2.10.1 and - 2.10.2 :P - -2006-10-03 Gustavo J. A. M. Carneiro - - * configure.in: Post-release version bump. - -=== 2.10.2 === -2006-10-03 Gustavo J. A. M. Carneiro - - * NEWS: Update. - - * tests/test_treeview.py: Add unit test for bug #347273. - -2006-09-21 Cedric Gustin - - * pygtk_postinstall.py: Adapt the codegendir variable to the user - platform. Copy style.css from pygobject docs to pygtk docs. Run - fixxref on installed html files. Add functions to install - shortcuts in the Start menu to the reference manual (currently - disabled: see bug #353849). - * setup.py: Changed the way the VERSION macro is defined on - win32. Added 2.10 defs files for gdk and gtk when GTK+ 2.10 is - detected. Added gtk.keysyms, gtk._lazyutils, dsextras_gen and - codegen to the list of installed packages. Also install the html - reference documentation and run fixxref on the html files. - -2006-09-16 Gustavo J. A. M. Carneiro - - * gtk/pygtkcellrenderer.c (pygtk_generic_cell_renderer_activate): - Same fix as below. - - * gtk/gtktreeview.override (pygtk_tree_selection_foreach_marshal): - Use pygtk_boxed_unref_shared to fix a side-effect of fixing bug - #347273. - (pygtk_tree_sortable_sort_cb): Add a similar fix. - - * gtk/gtkobject-support.c (pygtk_boxed_unref_shared): Add a new - pygtk private API to unref a boxed type with a shared pointer. - -2006-09-12 John Ehresman - - * gtk/gtk.override (_wrap_gtk_clipboard_wait_for_rich_text): - Declare variable at start of code block - -2006-09-04 Johan Dahlin - - * configure.in: post release version bump. - -=== 2.10.1 === -2006-09-04 Johan Dahlin - - - * gtk/gtkmodule.c (init_gtk): Require pygobject 2.12.0 - - * configure.in: post release version bump. - -=== 2.10.0 === -2006-09-04 Johan Dahlin - - * configure.in: Bump version and require GTK+ 2.10 for 2.10 API - - * README (http): Update - - * NEWS: Update - -2006-08-21 Johan Dahlin - - * docs/Makefile.am: Get rid of build_stamp, include the generated html - documentation in the tarball. - -2006-08-14 John Finlay - - * docs/Makefile.am (CSS_FILES): - * docs/style.css: - * configure.in (PYGOBJECT_PYGDOCS): Copy style.css from pygobject docs - when installing docs. Fixes #351385 (Gian Mario Tagliaretti) - -2006-08-14 Johan Dahlin - - * gtk/__init__.py (_init): issue a warning instead of printing - to stdout, fixes #316877 regression. (Jeremey Katz) - -2006-08-12 John Finlay - - * docs/style.css: Add. - * docs/Makefile.am: Add install of style.css - -2006-08-10 John Finlay - - * configure.in: - * docs/Makefile.am: - * docs/reference/entities.docbook.in: - * docs/reference/pygtk2-ref.xml: - Use builddate.xml for the builddate entity and have builddate.xml be - updated when the docs are built not during configure time. - -2006-08-08 Johan Dahlin - - * configure.in: Post release version bump - -=== 2.9.6 === -2006-08-08 Johan Dahlin - - * README: Add PyGObject dependency - - * NEWS: Update - -2006-08-07 Gustavo J. A. M. Carneiro - - * codegen/argtypes.py: - * codegen/codegen.py: - * codegen/reversewrapper.py: - Introduce new ArgTypeError exceptions, use them everywhere to - raise catch codegen errors. Bare except: clauses are gone now. - -2006-08-07 Johan Dahlin - - * docs/Makefile.am ($(HTML_DATA)): Fix parallel build - (#350225, Ed Catmur) - -2006-08-07 Gustavo J. A. M. Carneiro - - * codegen/argtypes.py: Don't allow overwrite a argtype - registration unless the new kwarg 'overwrite' is True. - Fixes bug #350252. - -2006-08-07 Johan Dahlin - - * tests/test_treeview.py (TreeViewTest._test_default_attributes): Add - a test for #350252 - -2006-08-06 Johan Dahlin - - * docs/fixxref.py: Remove, it moved to PyGObject. - -2006-08-06 John Finlay - - * docs/fixxref.py (link_pat): Allow patterns that cross multiple lines. - -2006-08-06 Johan Dahlin - - * configure.in: Post release version bump - -=== PyGTK 2.9.5 === -2006-08-06 Johan Dahlin - - * NEWS: 2.9.5 - -2006-08-05 Johan Dahlin - - * gtk/Makefile.am (GDK_TYPES_DEFS): Always include 2.10 defs in - EXTRA_DIST, fixes (#350008, Joseph Sacco) - - * gtk/__init__.py (ver): Make it possible to reload the gtk+ module, - (#349026, Alexander Larsson) - - * tests/test_api.py (APITest.testGlade): Add a test - - * gtk/_lazyutils.py (LazyModule.__getattr__): Special case __members__ - to dir on the real module, fixes (#349892, John Finlay) - - * tests/test_api.py (APITest.testKeysyms): - Add a test - -2006-08-05 John Finlay - - * gtk/gtkunixprint.override (pygtk_custom_destroy_notify): Add this - back in. - -2006-08-04 Johan Dahlin - - * configure.in: post release version bump - -=== PyGTK 2.9.4 === -2006-08-04 Johan Dahlin - - * configure.in: - * docs/Makefile.am: - * docs/reference/entities.docbook.in: - * docs/reference/pygtk2-ref.xml: - Clean up the build date/version mess I created. - Now it's created during configure time and properly included in - the docbook files. Also make sure distcheck passes - -2006-08-04 Gustavo J. A. M. Carneiro - - * configure.in: Add hack to disable libtool checking for g++ and - g77 (copied from libglade). - -2006-07-31 John Finlay - - * codegen/defsgen.py: Add new program to generate .defs files using - the ctypes module to extract info from the GTK libraries. - -2006-07-30 John Finlay - - * gtk/gtkunixprint.override: Remove pygtk_custom_destroy_notify. - -2006-07-30 Gustavo J. A. M. Carneiro - - * codegen/codegen.py (SourceWriter.write_class): Simplify code - that generates the call to pygobject_register_class; Correct the - fallback value of bases_str. - -2006-07-28 Gustavo J. A. M. Carneiro - - * gtk/gtk.override (_wrap_gtk_print_context_get_cairo_context): - Someone forgot to rename the override function when gtk+ API - changed... - -2006-07-27 Rafael Ãvila de Espíndola - - reviewed by: Johan Dahlin - - * atkrectangle.override: - * gtk/gdk.override: - * gtk/gdkevent.override: - * gtk/gdkgc.override: - * gtk/gdkpixbuf.override: - * gtk/gtk-types.c: - * gtk/gtkcontainer.override: - * gtk/gtkmodule.c: - * gtk/gtktextview.override: - * gtk/libglade.override: - - Do not exports internal symbols, fixes #347825 - -2006-07-27 Gustavo J. A. M. Carneiro - - * gtk/gtk.override (_wrap_gtk_main): Copy paste some code from - pygobject/gobject/pygmainloop written by Mark McLoughlin, to check - for signals inside the gtk main loop. - - * gtk/gtkmodule.c (init_gtk): Remove the timer; no longer needed. - Fixes bug #348937: 100ms timeouts in pygtk. - -2006-07-25 Johan Dahlin - - * gtk/gtkmodule.c (init_gtk): - * pangomodule.c (initpango): Check the required - PyGObject version in runtime too. - -2006-07-24 John Finlay - - * atk.defs (atk_role_get_localized_name, atk_role_get_name): Define as - functions. - - * pango.defs (pango_script_get_sample_language): Define as function. - - * gtk/gtkunixprint.defs (details_acquired) - (gtk_print_capabilities_get_type, status_changed): Add. - - * gtk/gtk-base-types.defs (Editable): Add prerequisite. - - * pangocairo.override (*_get_type): ignore-glob - (pango_cairo_update_context, pango_cairo_create_layout) - (pango_cairo_update_layout, pango_cairo_show_glyph_string) - (pango_cairo_show_layout_line, pango_cairo_show_layout) - (pango_cairo_glyph_string_path, pango_cairo_layout_line_path) - (pango_cairo_layout_path): ignore. - - * pangocairo.defs (pango_cairo_update_context) - (pango_cairo_context_set_font_options) - (pango_cairo_context_get_font_options) - (pango_cairo_context_set_resolution) - (pango_cairo_context_get_resolution, pango_cairo_create_layout) - (pango_cairo_update_layout, pango_cairo_show_glyph_string) - (pango_cairo_show_layout_line, pango_cairo_show_layout) - (pango_cairo_glyph_string_path, pango_cairo_layout_line_path) - (pango_cairo_layout_path): Add. - - * pango.override (*_get_type, *_ref, *_unref, *_free): ignore-glob - (pango_default_break): ignore - - * pango.defs (pango_attr_shape_new_with_data, pango_default_break) - (pango_context_get_font_map, pango_context_set_matrix) - (pango_context_get_matrix, pango_itemize_with_base_dir) - (pango_coverage_new, pango_glyph_item_split, pango_glyph_item_free) - (pango_glyph_item_apply_attrs, pango_glyph_item_letter_space) - (pango_item_get_type, pango_item_new, pango_item_copy) - (pango_item_free, pango_item_split, pango_script_for_unichar) - (pango_script_iter_new, pango_script_iter_get_range) - (pango_script_iter_next, pango_script_iter_free) - (pango_script_get_sample_language, pango_script_includes_script) - (pango_matrix_get_type, pango_matrix_copy, pango_matrix_free) - (pango_matrix_translate, pango_matrix_scale, pango_matrix_rotate) - (pango_matrix_concat, pango_get_mirror_char, pango_unichar_direction) - (pango_find_base_dir): Add. Add virtuals. - (pango_font_metrics_new, pango_find_map, pango_map_get_engine) - (pango_map_get_engines, pango_module_register): Add with ifdef - PANGO_ENABLE_BACKEND - (pango_split_file_list, pango_trim_string, pango_read_line) - (pango_skip_space, pango_scan_word, pango_scan_string) - (pango_scan_int, pango_config_key_get, pango_lookup_aliases) - (pango_parse_style, pango_parse_variant, pango_parse_weight) - (pango_parse_stretch, pango_get_sysconf_subdirectory) - (pango_get_lib_subdirectory, pango_log2vis_get_embedding_levels) - (pango_get_sample_string, pango_is_zero_width): Add with ifdef - USE_PANGO_UTILS - - * pango-types.defs (WrapMode): Add PANGO_WRAP_WORD_CHAR. Reorganize. - -2006-07-23 John Finlay - - * atk.override (AtkObjectFactory__do_create_accessible) - (AtkObjectFactory__proxy_do_create_accessible) - (AtkUtil__do_add_global_event_listener) - (AtkUtil__proxy_do_add_global_event_listener) - (AtkUtil__do_remove_global_event_listener) - (AtkUtil__proxy_do_remove_global_event_listener) - (AtkUtil__do_add_key_event_listener) - (AtkUtil__proxy_do_add_key_event_listener) - (AtkUtil__do_remove_key_event_listener) - (AtkUtil__proxy_do_remove_key_event_listener): Ignore. - - * codegen/reversewrapper.py (StringReturn): Add const-gchar* as a - StringReturn match. - - * codegen/codegen.py (GInterfaceWrapper.write_virtuals): Don't write - interface_init if no proxies. - - * atk.defs: Add get_type defs from atk-enum-types.h. - Add virtuals for Action, Component, Document, EditableText, Hyperlink, - Hypertext, Image, ObjectFactory, ImplementorIface, Object, Selection, - StreamableContent, Table. Text, Util and Value. - - * gtk/Makefile.am (libglade.c, gtkunixprint.c): Add dependencies on - gtk-types.defs and gdk-types.defs - - * codegen/reversewrapper.py (PangoFontDescriptionReturn) - (PangoFontMetricsReturn, PangoLanguageReturn): Add - -2006-07-23 Gustavo J. A. M. Carneiro - - * gtk/Makefile.am: Remove back the install-exec-hook that removes _gtk.la. - -2006-07-23 Johan Dahlin - - * Makefile.am: - * gtk/Makefile.am: - * gtk/__init__.py: - * gtk/_gtk.py: - * gtk/_lazyutils.py: - * gtk/deprecation.py: - * gtk/gtk.override: - * gtk/gtkmodule.c: (init_gtk): - * gtk/libglademodule.c: (initglade): - - Revert dynamic namespaces, it is not possible - to solve it without breaking the ABI. - -2006-07-23 Gustavo J. A. M. Carneiro - - * gtk/_gtk.py: Add _PyGtk_API alias from _gtkimpl, for - compatibility reasons. - - * gtk/Makefile.am (install-exec-hook): Uninstall old _gtk.la, if - installed, else it may conflict with _gtkimpl.la. - -2006-07-22 John Finlay - - * atk.defs (atk_implementor_ref_accessible): Attach as - AtkImplementorIface method - - * atk-types.defs (AtkImplementorIface): Revert to registered name. - - * gtk/gtk-base-types.defs: Annotate interfaces with prerequisites - and objects with interface implementations - - * gtk/gtk-2.10-types.defs: Annotate interfaces with prerequisites - and objects with interface implementations. Reorganize. - - * codegen/reversewrapper.py (VoidReturn.write_conversion) - (DoubleReturn.write_conversion, GBoxedReturn.write_conversion): Use - failure_exception instead of failure_cleanup - (GtkTreePathReturn): Add. - - * gtk/gdk-base.defs (get_display_name, get_n_screens, get_screen) - (get_default_screen, closed): Add GdkDisplay virtual defs - (create_gc, draw_rectangle, draw_arc, draw_polygon, draw_text) - (draw_text_wc, draw_drawable, draw_points, draw_segments) - (draw_lines, draw_glyphs, draw_image, get_depth, get_size) - (set_colormap, get_colormap, get_visual, get_screen, get_image) - (get_clip_region, get_visible_region, get_composite_drawable) - (draw_pixbuf, draw_glyphs_transformed, draw_trapezoids) - (ref_cairo_surface): Add GdkDrawable virtual defs - (get_values, set_values, set_dashes): Add GdkGC virtual defs - (direction_changed, keys_changed): Add GdkKeymap virtual defs - (size_changed): Add GdkScreen virtual def - (gdk_pixbuf_animation_ref, pixbuf_animation_unref): Add - GdkPixbufAnimation method defs - (non_anim_new, is_static_image, get_static_image, get_size) - (get_iter): Add GdkPixbufAnimation method and virtual defs with - GDK_PIXBUF_ENABLE_BACKEND ifdef - (get_delay_time, get_pixbuf, on_currently_loading_frame, advance): Add - GdkPixbufAnimationIter virtual defs with GDK_PIXBUF_ENABLE_BACKEND - ifdef - (pixbuf_error_quark, pixbuf_get_type, ref, unref) - (pixbuf_new_from_file_at_scale, save_to_callbackv) - (save_to_buffer, save_to_bufferv): Add misc GdkPixbuf method and - function defs - (is_scalable, is_disabled, set_disabled, get_license): Add - GdkPixbufFormat methods defs - (set_option): Add GdkPixbuf method def with GDK_PIXBUF_ENABLE_BACKEND - ifdef - (size_prepared, area_prepared, area_updated, closed): Add - GdkPixbufLoader virtual defs - (serialize, deserialize, from_pixbuf, pixbuf_from_pixdata) - (to_csource): Add GdkPixdata method and function defs - - * gtk/gdk-2.10.defs (composited_changed): Add GdkScreen virtual def - - * gtk/gdk.override (gdk_pixbuf_from_pixdata, gdk_pixdata_*): Ignore - - * codegen/reversewrapper.py (GdkRegionPtrReturn): Add. - -2006-07-22 Gustavo J. A. M. Carneiro - - * Makefile.am (SUBDIRS): Make --disable-docs really work. - -2006-07-22 John Finlay - - * gtk/gdk-base.defs (gdk_pixbuf_simple_anim_add_frame) - (pixbuf_simple_anim_new, pixbuf_simple_anim_iter_get_type) - (pixbuf_simple_anim_get_type, gdk_pixbuf_flip): Add - - * gtk/gdk.override: Add #define for GDK_TYPE_PIXBUF_SIMPLE_ANIM_ITER. - - * gtk/gdk-base-types.defs (PixbufSimpleAnim) - (PixbufSimpleAnimIter, PixbufRotation): Add. - -2006-07-20 Johan Dahlin - - * gtk/gdk-base.defs: - Remove the leading gdk_ from a few functions. - -2006-07-20 John Finlay - - * docs/Makefile.am: Make builddate.xml dependent on REFERENCE_DEPS. - Make version.xml dependent on config.h. Add builddate.xml to pdf and - build-stamp dependencies. Clean pdf files. - -2006-07-20 Johan Dahlin - - * configure.ac: - * docs/Makefile.am: - * docs/reference/.cvsignore: - * docs/reference/version.xml.in: - Generate builddate.xml and version.xml at build time instead on - configure time, add proper dependencies. - -2006-07-20 Gustavo J. A. M. Carneiro - - * gtk/gtk-base.defs (lookup_icon, load_icon): Caller owns return. - Fixes leaks. - -2006-07-20 John Finlay - - * gtk/gtk.override (GtkObject__do_set_arg, GtkObject__do_get_arg) - (GtkObject__proxy_do_set_arg, GtkObject__proxy_do_get_arg): Ignore. - #341633 (Johan Dahlin) - - * gtk/gtk-types.c (pygtk_tree_model_row_getitem) - (pygtk_tree_model_row_setitem): Remove negative index readjustment - code. #311852 (Baiju M) - - * codegen/codegen.py (Coverage.printstats): Fix typo. - #341668 (Yevgen Muntyan) - -2006-07-19 John Finlay - - * gtk/gtktreeview.override (_wrap_gtk_tree_store_insert): Fix typo - - * docs/Makefile.am: Use more portable date generator. - -2006-07-19 Johan Dahlin - - * gtk/gtkmodule.c (init_gtkimpl): Don't register constants - * codegen/codegen.py: Make enum/flags lazily created too. - - * gtk/__init__.py: - * gtk/deprecation.py: - Make functions lazily loaded. - Make deprecation lazy too, to avoid refercing anything until it's called. - -2006-07-19 Gustavo J. A. M. Carneiro - - * atk.override (_wrap_atk_editable_text_set_run_attributes): Don't - ignore g_slist_append return value. - -2006-07-19 Rafael Espíndola - - reviewed by: Gustavo Carneiro - - * codegen/codegen.py: Mark generated PyTypeObject structures with - G_GNUC_INTERNAL to reduce the size of the PLT. Fixes #347825. - -2006-07-19 John Finlay - - * docs/fixxref.py: Add utility to fix links to pygobject docs. - - * docs/Makefile.am : Add reference/version.xml and - reference/builddate.xml for auto generated version and build date for - docs - - * docs/common.xsl: - * docs/devhelp.xsl: - * docs/html-style.xsl: - * docs/html.xsl: Remove. - - * configure.in (AC_CONFIG_FILES): Add docs/reference/version.xml - -2006-07-18 Johan Dahlin - - * docs/Makefile.am (HTMLdir): Install book in $datadir/gtk-doc/html - -2006-07-18 John Finlay - - * gtk/gtktreeview.override (pygtk_cell_data_func_marshal) - (pygtk_tree_selection_foreach_marshal, pygtk_tree_sortable_sort_cb) - (pygtk_tree_foreach_marshal, pygtk_tree_model_filter_visible_cb) - (pygtk_filter_modify_func_marshal) - (pygtk_set_search_equal_func_marshal): Don't copy TreeIter when passing - to callback. #347273 (Stefano Maggiolo) - (_wrap_gtk_tree_selection_set_select_function): Optionally provide full - info to callback. #340475 (Wouter Bolsterlee) - -2006-07-17 John Finlay - - * gtk/gtktreeview.override: - (_wrap_gtk_tree_store_set_column_types): Add. - (_wrap_gtk_tree_store_insert): Use gtk_tree_store_insert_with_valuesv. - - * gtk/_lazyutils.py (LazyNamespace.__getattribute__): Allow - 'from gtk import *' to work - -2006-07-17 Johan Dahlin - - * configure.in: - * docs/.cvsignore: - * docs/Makefile.am: - * docs/reference/pygtk2-ref.xml: - - Add non GObject parts of John Finlays reference manual - -2006-07-17 John Finlay - - * codegen/reversewrapper.py (GBoxedReturn.write_conversion): Specify - code arg is None - - * gtk/gtk-2.10.defs: Add additional virtual defs. - - * gtk/gtk-base.defs: Add additional virtual defs. - -2006-07-14 John Finlay - - * Makefile.am (.defs.c): Allow libglade and gtkunixprint code - generation in place. - -2006-07-13 John Finlay - - * gtk/gtk-2.10-types.defs (TargetList): Move from - gtk/gtk-base-types.defs - - * gtk/gtk-base-types.defs (AccelMap): Add. #337011 (Sebastian Pölsterl) - (TipsQuery, TargetList, TreePath, FileInfo, FilePath): Add. - - * gtk/gtk.override (_wrap_gtk_accel_map_foreach) - (_wrap_gtk_accel_map_foreach_unfiltered): Add. - Fixes #337011 (Sebastian Pölsterl) - (GtkTipsQuery, GtkTargetList, GtkTreePath, GtkFileInfo, GtkFilePath): - Ignore types. - - * codegen/codegen.py (SourceWriter.write_registers): Don't write - registers for ignored types. - (SourceWriter.write_type_declarations): Don't write type declarations - for ignored types. - -2006-07-13 Johan Dahlin - - * codegen/codegen.py: - * codegen/defsparser.py: - * configure.in: - * gtk/Makefile.am: - * gtk/__init__.py: - * gtk/_gtk.py: - * gtk/_lazyutils.py: - * gtk/deprecation.py: - * gtk/gtk.override: - * gtk/gtkmodule.c: (init_gtkimpl): - * gtk/libglade.override: - * gtk/libglademodule.c: (init_glade): - * gtk/pygtk.h: - * tests/common.py: - * tests/test_api.py: - Only load types in gtk when they are used, fixes #346946 - -2006-07-13 Gustavo J. A. M. Carneiro - - * tests/test_container.py: New unit test to - set/get_child_property, etc. by Lorenzo Gil Sanchez. - - * tests/Makefile.am (tests): Add test_container.py. - - * gtk/gtkcontainer.override - (_wrap_GtkContainer__proxy_do_set_child_property): Add missing - param. - - * gtk/gtkwidget.override (_wrap_gtk_widget_set_activate_signal) - (_wrap_gtk_widget_get_activate_signal): Add getter and setter for - GtkWidgetClass->activate_signal. Fixes #331445. - - * gtk/gtk.override (_wrap_gtk_action_set_menu_item_type): Add - class method to change GtkActionClass->menu_item_type. - (_wrap_gtk_action_set_tool_item_type): idem for tool_item_type. - Fixes #331355. - - * gtk/gtk-base.defs: Declare the missing - GtkAction.create_menu|tool_item virtuals. - - * examples/gtk/scrollable.py (Layout.do_size_allocate): Save the - allocation (#341509, Muntyan). - - * gtk/gtk.override (_wrap_GtkEditable__do_insert_text): Impl. - (_wrap_GtkEditable__do_get_selection_bounds): Impl. - - * gtk/gtk-base.defs (insert_text): Add direction information to - the position parameter of gtk.Editbale.insert_text virtual. - - * codegen/defsparser.py (IncludeParser.include): Fix including - absolute path names, #345073. - -2006-07-12 Gustavo J. A. M. Carneiro - - * NEWS: I forgot one NEWS item in the release :P - - * configure.in: Post release version bump. - -=== 2.9.3 === -2006-07-12 Gustavo J. A. M. Carneiro - - * NEWS: Update. - - * tests/Makefile.am: Copy a few more gtk module support files for - running tests. - - * tests/common.py: Don't hide import errors. - -2006-07-13 Johan Dahlin - - * gtk/gtk.override: Ignore gtk_recent_chooser_set_show_numbers and - gtk_recent_chooser_get_show_numbers, - see http://article.gmane.org/gmane.comp.gnome.language-bindings/805 - -2006-07-12 John Finlay - - * gtk/gtkunixprint.override (_wrap_gtk_enumerate_printers): Add. - -2006-07-11 John Finlay - - * gtk/gtkunixprint.defs (gtk_printer_accepts_pdf) - (gtk_printer_accepts_ps, gtk_enumerate_printers): Add. - - * gtk/gdk-base.defs (gdk_set_pointer_hooks): Remove dup. - -2006-07-10 John Finlay - - * gtk/gtk-base.defs (gtk_binding_entry_add_signal): Remove dup. - - * gtk/gdk-base-types.defs (GdkColorspace): Remove duplicate. - - * gtk/gdk-base.defs (gdk_color_change): Change to function to resolve - conflict with gdk_colormap_change. - (gdk_colormap_change): Note as deprecated. - (gdk_display_store_clipboard): Remove dup def - -2006-07-08 Gustavo J. A. M. Carneiro - - * gtk/gtk-base.defs (clipboard_get_for_display): Add - "(caller-owns-return nil)"; Fixes #343960. - -2006-07-07 John Finlay - - * gtk/gdk.override: Ignore-glob *_libgtk_only. Fixes #321476. - -2006-07-06 John Finlay - - * pango.override (_wrap_pango_attr_underline_color_new) - (_wrap_pango_attr_strikethrough_color_new) - (_wrap_pango_attr_size_new_absolute) - (_wrap_pango_attr_letter_spacing_new): Add. - - * pango.defs (AttrSizeAbsolute, AttrUnderlineColor) - (AttrStrikethroughColor, AttrLetterSpacing) - (pango_font_description_set_absolute_size) - (pango_font_description_get_size_is_absolute) - (pango_font_get_font_map): Add. - - * gtk/gtk.override (_wrap_gtk_color_selection_palette_to_string): - Allow colors to be a sequence. - - * atk.override (_wrap_atk_state_set_contains_states) - (_wrap_atk_state_set_add_states): Fix reference leaks. - -2006-07-06 Gustavo J. A. M. Carneiro - - * gtk/gtk.override (_wrap_gtk_color_selection_palette_to_string): - Check that argument is a list of gdk.Color. Fixes #346745. - -2006-07-06 John Finlay - - * atk.override (atk_text_free_ranges): Ignore. - (_wrap_atk_value_get_current_value) - (_wrap_atk_value_get_maximum_value) - (_wrap_atk_value_get_current_value) - (_wrap_atk_value_set_current_value): Add. - - * atkmodule.c (initatk): Add call to _pyatk_register_boxed_types() - - * Makefile.am (ATK_OVERRIDES): Add atkrectangle.override - - * atkrectangle.override: Add. - - * atk.override (_wrap_atk_text_get_text_at_offset) - (_wrap_atk_text_get_text_before_offset) - (_wrap_atk_text_get_character_extents) - (_wrap_atk_text_get_run_attributes) - (_wrap_atk_text_get_default_attributes) - (_wrap_atk_text_get_bounded_ranges, _wrap_atk_text_get_selection) - (_wrap_atk_text_get_range_extents): Add, - - * atk.defs (atk_rectangle_new): Add. - -2006-07-05 John Finlay - - * atk.override (_wrap_atk_state_set_contains_states) - (_wrap_atk_state_set_add_states): - (_wrap_atk_table_get_selected_rows) - (_wrap_atk_table_get_selected_columns): - (_wrap_atk_text_get_text_after_offset): Add. - - * atk.defs (atk_relation_type_get_name): Define as function instead - of method. - (atk_state_type_get_name): Define as function instead of method. - (atk_state_set_new): Fix typo. - - * atk.override (_wrap_atk_relation_get_target): Add. - (_wrap_atk_relation_new): Raise ValueError if targets is zero length. - -2006-07-05 Johan Dahlin - - * gtk/Makefile.am: - * gtk/__init__.py: - * gtk/_lazyutils.py: - * tests/Makefile.am: - * tests/test_api.py: - Add infrastructure to handle lazy loading. - Move keysyms to be loaded lazily. - Add API tests to make sure keysyms works. - -2006-07-05 Johan Dahlin - - * gtk/Makefile.am: - * gtk/__init__.py: - * gtk/deprecation.py: - Move deprecation related classes to a separate python file - -2006-06-27 John Finlay - - * atk-types.defs: Update defs for atk-1.8 - * atk.defs: Update defs for atk-1.8 - - * atk.override (_wrap_atk_component_get_size) - (_wrap_atk_component_get_size, _wrap_atk_component_get_extents) - (_wrap_atk_editable_text_set_run_attributes) - (_wrap_atk_editable_text_insert_text) - (_wrap_atk_image_get_image_position) - (_wrap_atk_image_get_image_position): Add - -2006-06-27 Gustavo J. A. M. Carneiro - - * gtk/gdk-2.10.defs, gtk/gdk-base.defs: It seems that all X11 - specific functions are available in gtk+ 2.8 too; moving them from - gdk-2.10.defs to gdk-base.defs. - - * gtk/gdkcairo.override (_wrap_gdk_cairo_rectangle): Missing - PyErr_Clear() when first protype parsing fails. - -2006-06-27 John Finlay - - * gtk/gtk-2.10.defs (GtkPrintOperationPreview, GtkRecentChooser): - Add virtual defs for these interfaces. - -2006-06-25 John Finlay - - * gtk/gtk-2.10.defs (gtk_status_icon_set_from_pixbuf): Allow pixbuf - to be None - (gtk_status_icon_set_tooltip): Allow tooltip_text to be None - (print_run_page_setup_dialog): Allow parent to be None. - - * gtk/gtk.override (_wrap_gtk_recent_manager_add_full): is_private - should be a boolean. - - * gtk/gtk-2.10-types.defs: Add RecentChooser and - PrintOperationPreview implements interface notations - -2006-06-25 Gustavo J. A. M. Carneiro - - * codegen/argtypes.py (ArgMatcher.register_enum, - (ArgMatcher.register_flag): Use IntArg to handle enums and flags - with no typecode. This is to avoid the compiler warning - "dereferencing type-punned pointer will break strict-aliasing - rules" when converting enums or flags with no typecode. - (EnumArg.enum): Typecast to gpointer, not gint*, to avoid gcc type - punning warnings. - (FlagsArg.flag): idem. - - * codegen/codegen.py (SourceWriter.write_enums): Typecast second - argument of PyModule_AddIntConstant to - (char*) to avoid const warning on python < 2.5. - -2006-06-25 John Finlay - - * gtk/gtkwidget.override (_wrap_gtk_widget_class_find_style_property): - Add. - -2006-06-24 John Finlay - - * gtk/gtk.override (_wrap_gtk_print_operation_get_error): - g_clear_error() is called in pyg_error_check() - - * gtk/gtk-2.10.defs (gtk_print_settings_set): Allow value to be NULL. - -2006-06-24 Gustavo J. A. M. Carneiro - - * gtk/gtk.override (_wrap_gtk_print_operation_get_error): - s/g_error_clear/g_clear_error/. - (_wrap_gtk_print_operation_get_error): Return the exception value, - not just error->message, so that the programmer can consult - error.domain and error.code in addition to error.message. - -2006-06-24 John Finlay - - * gtk/gtk.override (_wrap_gtk_print_operation_get_error): Return - the error message if any. - -2006-06-22 John Finlay - - * gtk/gtk-2.10-types.defs (PrintOperationPreview): Identify as an - interface. - - * gtk/gtk-2.10.defs (gtk_label_get_line_wrap_mode) - (gtk_label_set_line_wrap_mode): Add - - * gtk/gtk.override (_wrap_gtk_notebook_set_window_creation_hook): - Fix parse tuple format. - -2006-06-22 Frederic Peters - - * gtk/gtkunixprint.override (_wrap_gtk_print_job_send): update to - latest GTK+ API change. #345623 - -2006-06-20 Elijah Newren - - * gtk/gtk-2.10.defs (get_print_to_file, set_print_to_file): remove - these functions as the corresponding functions in gtk+ have - recently been removed as well. #345447 - -2006-06-15 John Finlay - - * gtk/gtk.override (_wrap_gtk_notebook_set_window_creation_hook): Add. - - * gtk/gdk.override (_wrap_gdk_screen_set_font_options) - (_wrap_gdk_screen_set_font_options): Add. - - * gtk/gtk-base.defs (accel_group_from_accel_closure): Remove duplicate. - - * gtk/gdk.override (gdk_atom_intern_static_string): Ignore - -2006-06-15 Gustavo J. A. M. Carneiro - - * configure.in: Post-release version bump. - -=== 2.9.2 === -2006-06-15 Gustavo J. A. M. Carneiro - - * examples/pygtk-demo/demos/print_editor.py: Update example to - API changes a couple of weeks ago. - - * NEWS: Update. - - * gtk/gtk-2.10.defs (target_list_add_rich_text_targets): Remove - "(of-object "GtkTargetList")", which is not valid for functions. - - * gtk/gtkunixprint.override (pygtk_print_job_complete_func_cb): - PycairoSurface_FromSurface API breakage happened since pycairo - 1.1.6, not 1.1.7. Fixes #344957. - -2006-06-14 John Finlay - - * gtk/gtktextview.override (_wrap_gtk_text_buffer_serialize) - (_wrap_gtk_text_buffer_register_deserialize_format) - (_wrap_gtk_text_buffer_register_serialize_format) - (_wrap_gtk_text_buffer_get_serialize_formats) - (_wrap_gtk_text_buffer_get_serialize_formats): Add. - - * codegen/argtypes.py (arg): Match const-guint8* as UCharArg - - * gtk/gtktextview.override (_wrap_gtk_text_buffer_deserialize) - (_wrap_gtk_text_buffer_deserialize): Add. - -2006-06-14 Gustavo J. A. M. Carneiro - - * codegen/defsparser.py (IncludeParser.include): Fix a small typo - that caused bug #344845. - -2006-06-14 John Finlay - - * gtk/gtktextview.override - (_wrap_gtk_text_buffer_get_copy_target_list) : Add, - - * gtk/gtk.override (_wrap_gtk_drag_dest_find_target) - (_wrap_gtk_drag_dest_get_target_list) - (_wrap_gtk_drag_dest_set_target_list, _wrap_gtk_drag_begin) - (_wrap_gtk_drag_source_get_target_list) - (_wrap_gtk_drag_source_set_target_list) - (_wrap_gtk_target_list_add_text_targets) - (_wrap_gtk_target_list_add_image_targets) - (_wrap_gtk_target_list_add_uri_targets) - (_wrap_gtk_target_list_add_rich_text_targets): - Use pygtk_target_list_from_sequence and pygtk_target_list_to_list. - - * gtk/gtkobject-support.c (pygtk_target_list_from_sequence) - (pygtk_target_list_to_list): Add. - -2006-06-13 John Finlay - - * gtk/gtk-2.10.defs (gtk_tree_view_set_search_entry): Allow entry arg - to default to None. - - * gtk/gtktreeview.override - (_wrap_gtk_tree_view_set_search_position_func): Add. - - * gtk/gtk-2.10.defs (gtk_target_list_add_rich_text_targets): Change - to function. - - * gtk/gtk.override (_wrap_gtk_target_list_add_rich_text_targets): Add. - -2006-06-14 Gustavo J. A. M. Carneiro - - * configure.in: Post-release version bump. - -=== 2.9.1 === -2006-06-14 Gustavo J. A. M. Carneiro - - * codegen/defsparser.py (IncludeParser.include), - * codegen/codegen.py (main): Add a -I option to specify a path to - search for .defs files. - - * gtk/Makefile.am (CREATEDEFS): Use $(top_srcdir) to find - createdefs.py. - (gtk.c): gtk.c depends also on gdk-types.defs. - (EXTRA_DIST): Add gtk-extrafuncs.defs. - - * codegen/Makefile.am (EXTRA_DIST): Add createdefs.py. - -2006-06-13 Gustavo J. A. M. Carneiro - - * gtk/gtkmodule.c (pygtk_add_extra_constants): Don't add - GTK_PAPER_* constants with gtk+ 2.8. - - * gtk/gtkunixprint.override (pygtk_print_job_complete_func_cb): - Make it conditionally compile with both pycairo >= 1.1.7 and - earlier versions. - - * configure.in: Explicitly require pycairo for module pangocairo. - Minimum pycairo version changed back to 1.0.2. - - * NEWS: Updated. - - * gtk/gdkcairo.override (_wrap_gdk_cairo_rectangle): Make - gdk.CairoContext.rectangle() also accept (x, y, width, height) - parameters to avoid violating the Liskov substitution principle, - since it redefines cairo.Context.rectangle() with a different - signature. - -2006-06-13 John Finlay - - * gtk/gtk.override (_wrap_gtk_menu_popup): Improve anti-leak code. - (_wrap_gtk_init_check, _wrap_gtk_init_check): Ignore. - - * gtk/pygtk-private.h: Add. pygdk_atom_vector_from_sequence - - * gtk/gtkobject-support.c (pygdk_atom_vector_from_sequence): Add. - - * gtk/gtk.override (_wrap_gtk_targets_include_rich_text) - (_wrap_gtk_targets_include_uri, _wrap_gtk_targets_include_text) - (_wrap_gtk_targets_include_image): Add. - -2006-06-12 John Finlay - - * gtk/gtkstyle.override (_wrap_gtk_style_lookup_color): Add. - - * gtk/gtk-2.10-types.defs (enum TreeViewGridLines): Add. - - * gtk/gtk-2.10.defs (gtk_tree_view_set_enable_tree_lines) - (gtk_tree_view_get_enable_tree_lines, gtk_tree_view_set_grid_lines) - (gtk_tree_view_get_grid_lines, gtk_tree_view_grid_lines_get_type) - (gtk_print_operation_action_get_type): Add. - - * gtk/gtk.override (_wrap_gtk_status_icon_position_menu) - (_wrap_gtk_status_icon_position_menu): Add. - (_wrap_gtk_menu_popup): Recode to support passing - gtk.status_icon_position_menu as a position function while maintaining - backward compatibility. - -2006-06-11 John Finlay - - * gtk/gtk.override (_wrap_gtk_recent_manager_get_items) - (_wrap_gtk_recent_manager_add_full): Add. - - * gtk/gtktreeview.override (gtk_tree_store_insert_with_values) - (gtk_tree_store_insert_with_valuesv): Ignore - - * gtk/gtk.override (_wrap_gtk_size_group_get_widgets): Fix bug. - (_wrap_gtk_recent_filter_add_custom) - (_wrap_gtk_recent_filter_filter): Add. - - * gtk/gtk-2.10.defs (register_serialize_tagset) - (register_deserialize_tagset): Allow NULL tagset_name arg. - - * gtk/gtk.override (_wrap_gtk_recent_chooser_dialog_new): Note as - new-constructor. - (_wrap_gtk_size_group_get_widgets): Add. - -2006-06-10 John Finlay - - * gtk/gtk-2.10.defs (gtk_recent_chooser_menu_new_for_manager) - (recent_chooser_widget_new_for_manager): Use new object constructor. - -2006-06-11 Gustavo J. A. M. Carneiro - - * configure.in: Check for the X11 GDK target. - - * gtk/gdk.override: Don't ignore gdk_x11_* any more. - - * gtk/gdk-2.10.defs: Add x11 specific functions, scanned from - gdkx.h, corrected (function->method), and made conditionally - compile only on the X11 GDK target. - - * gtk/gdk-base.defs: Removed x11 specific functions added by johan - after 2.8 (re-added in gdk-2.10.defs). - -2006-06-10 John Finlay - - * gtk/gtk-2.10.defs (gtk_recent_chooser_menu_new_for_manager) - (recent_chooser_widget_new_for_manager): : Set - as constructor and allow manager param to default to None. - - * gtk/gtk.override (_wrap_gtk_recent_chooser_dialog_new) - (_wrap_gtk_recent_info_get_application_info) - (_wrap_gtk_recent_info_get_groups) - (_wrap_gtk_recent_info_get_applications) - (_wrap_gtk_recent_chooser_set_sort_func) - (_wrap_gtk_recent_chooser_list_filters): Add. - (gtk_print_error_quark, gtk_recent_chooser_error_quark) - (gtk_recent_chooser_dialog_new_for_manager) - (gtk_recent_chooser_menu_new) - (gtk_recent_chooser_widget_new, gtk_recent_manager_error_quark): Ignore - -2006-06-09 John Finlay - - * gtk/gtk.override (_wrap_gtk_recent_chooser_get_items) - (_wrap_gtk_recent_chooser_get_uris): Add. - - * gtk/gtkiconview.override (_wrap_gtk_icon_view_selected_foreach): - Fix leaks. - - * gtk/gtktextview.override (_wrap_gtk_text_tag_table_foreach): - Fix leaks. - - * gtk/gtk.override (_wrap_gtk_print_settings_foreach) - (_wrap_gtk_print_settings_set_page_ranges) - (_wrap_gtk_print_settings_get_page_ranges): Add. - - * gtk/gtk-2.10.defs (gtk_button_set_image_position) - (gtk_button_get_image_position, gtk_print_context_set_cairo_context) - (gtk_print_operation_set_track_print_status) - (gtk_print_operation_set_show_progress) - (gtk_print_operation_set_allow_async) - (gtk_print_operation_set_custom_tab_label) - (gtk_print_operation_get_error, gtk_print_operation_cancel - (gtk_status_icon_get_geometry): Add. - (gtk_print_operation_set_default_page_setup) - (gtk_print_operation_set_print_settings): Allow default NULL arg. - - * gtk/gtk-2.10-types.defs: Add PrintOperationPreview, RecentFilter, - RecentInfo. Sync enums. - -2006-06-08 Frederic Peters - - * configure.in, gtk/gtkunixprint.override: Updated pycairo dependencies - from 0.5.0 to 1.1.7 since PycairoSurface_FromSurface signature changed. - - * gtk/gtk-2.10-types.defs, gtk/gtk-2.10.defs: Updated to new GTK+ - Printing API changes. - -2006-06-06 John Finlay - - * gtk/gtkunixprintmodule.c (initunixprint): - Add pygtkunixprint_add_constants() call. - - * gtk/gtkunixprint.defs: - * gtk/gtkunixprint.override: Add files for unixprint module. - - * gtk/Makefile.am: Add support for gtk.unixprint module. - - * configure.in: Add support for gtk.unixprint module. - -2006-06-06 Johan Dahlin - - * gtk/gtk-base.defs (set_mnemonic_widget): Allow widget to be null - -2006-06-05 John Finlay - - * gtk/gtk-2.10.defs (paper_size_new): Allow name to default to None. - - * gtk/gtkmodule.c (pygtk_add_extra_constants): Add GTK_PAPER_NAME - constants. - -2006-06-04 John Finlay - - * gtk/gtk.override (gtk_paper_size_free): Ignore - - * gtk/gtk-2.10.defs (gtk_message_dialog_set_image): Add. - - * gtk/gtk.override (_wrap_gtk_link_button_set_uri_hook): Add. - - * gtk/gtk-2.10.defs (input_shape_combine_mask): Allow shape_mask - to be None. - (gtk_link_button_new_with_label): Set as constructor for GtkLinkButton. - Allow label param to default to None. - -2006-06-04 Johan Dahlin - - * pango.override (_wrap_pango_tab_array_get_tabs): Fix two - leaks found by coverity. - -2006-06-04 John Finlay - - * gtk/gtk-2.10.defs (drag_dest_set_track_motion) - (drag_dest_get_track_motion): Change to methods of GtkWidget. - - * gtk/gtk.override (_wrap_gtk_clipboard_wait_for_rich_text) - (_wrap_gtk_clipboard_request_rich_text): Add. - - * codegen/argtypes.py (AtomArg.write_return): Fix leak in GdkAtom - return. - -2006-06-03 John Finlay - - * gtk/gtk-2.10.defs (gtk_assistant_set_page_header_image) - (gtk_assistant_set_page_side_image): Allow - pixbuf param to be None and optional. - (gtk_entry_set_inner_border): Allow border param to be None. - -2006-06-01 John Finlay - - * gtk/gtk.override (_wrap_gtk_assistant_set_forward_page_func): Add. - - * gtk/gdkevent.override (_wrap_gdk_event_tp_getattr): Output - "selection" as a gdk.OWNER_CHANGE member. - -2006-06-01 Gustavo J. A. M. Carneiro - - * gtk/gtk-2.10.defs: gtk_print_context_create_context renamed to - gtk_print_context_create_pango_context; - gtk_print_context_create_layout renamed to - gtk_print_context_create_pango_layout; - gtk_print_context_get_fontmap renamed to - gtk_print_context_get_pango_fontmap; gtk_print_context_get_cairo - renamed to gtk_print_context_get_cairo_context. - - * gtk/gtk.override - (_wrap_GtkCellLayout__proxy_do_set_cell_data_func): - s/Py_DECREF(py_ret)/Py_XDECREF(py_ret)/, thanks Paolo Borelli. - -2006-05-31 John Finlay - - * gtk/gdkdraw.override (_wrap_gdk_draw_layout_line): Add, - - * gtk/gdkcairo.override (_wrap_gdk_cairo_set_source_pixmap) - (_wrap_gdk_cairo_region, _wrap_gdk_cairo_rectangle): Add as methods. - - * gtk/gdk-base.defs (shape_combine_region): shape_region may be None. - - * gtk/gdk.override (gdk_region_destroy): Ignore. - -2006-05-26 John Finlay - - * gtk/gtk-base.defs (set_cursor): Allow IconView.set_cursor method - params 'cell' and 'start_editing' to be optional. - Fixes #343039 (Ross Burton) - -2006-05-20 Gustavo J. A. M. Carneiro - - * gtk/gtk.override (_wrap_GtkCellRenderer__do_get_size): Impl. - Fixes #339431. - -2006-05-20 John Finlay - - * pangocairo.override (_wrap_context_set_font_options): Allow - font_options param to be None. - -2006-05-20 Gustavo J. A. M. Carneiro - - * examples/pygtk-demo/demos/print_editor.py (begin_print): - s/set_nr_of_pages/set_n_pages/ (gtk api change). - -2006-05-18 John Finlay - - * gtk/gtk.override (clipboard_request_contents_cb) - (clipboard_clear_func, clipboard_get_func) - (clipboard_request_targets_cb, clipboard_request_image_cb): Fix - reference leaks (#342114). - -2006-05-17 Gustavo J. A. M. Carneiro - - * gtk/gtk.override (clipboard_request_text_cb): Fix reference - leaks (#342114). - -2006-05-14 Gustavo J. A. M. Carneiro - - * gtk/gtkcontainer.override - (_wrap_GtkContainer__proxy_do_set_child_property) - (_wrap_GtkContainer__proxy_do_get_child_property) - (_wrap_GtkContainer__do_set_child_property) - (_wrap_GtkContainer__do_get_child_property): Impl. Fixes #341641. - - * gtk/gtk.override (_wrap_GtkCellRenderer__proxy_do_get_size): Fix - reference leak on 'self' and 'py_ret'. - (_wrap_gtk_dialog_set_alternative_button_order): idem. - - * codegen/reversewrapper.py: Fix registration of StringReturn type - handler; fixes #341634. - -2006-05-14 Murray Cumming - - * gtk/gtk-2.10.defs: Updated to fix the build, because - - gtk_print_operation_set_nr_of_pages() changed to gtk_print_operation_set_n_pages() - - gtk_print_settings_get_num_copies() changed to gtk_print_settings_get_n_copies() - - gtk_print_settings_set_num_copies() changed to gtk_print_settings_set_n_copies() - - gtk_recent_manager_add_full() no longer has a GError* parameter. - -2006-05-10 Johan Dahlin - - * codegen/codegen.py: Refactor a big chunk into a class with methods. - - * Makefile.am: - * gtk/Makefile.am: Use PYCAIRO_CFLAGS - - * configure.in: Make pycairo a required dependency, make sure - the optional Gtk+ 2.10 dependency check work and only build - pangocairo if pycairo found and libglade if gtk can be built - -2006-05-08 Gustavo J. A. M. Carneiro - - * examples/pygtk-demo/demos/print_editor.py, - * examples/Makefile.am: Add Print Editor demo, originally found in - gtk+ sources and translated to Python. - - * gtk/gtk-2.10.defs: gtk.print_run_page_setup_dialog second - argument can be None/NULL. - -2006-05-07 Gustavo J. A. M. Carneiro - - * gtk/gtk.override (_wrap_add_log_handlers) - (_wrap_remove_log_handlers): Try to use - pyg_add_warning_redirection and pyg_disable_warning_redirections - if available. - - * pangomodule.c (initpango): idem. - - * examples/gtk/testprint.py: Add a python print demonstration, - based on testprint.c in gtk+ sources. It is missing a print - dialog, though... - - * examples/Makefile.am (EXTRA_DIST): add gtk/testprint.py. - - * gtk/gtk.override: Include pycairo. - (_wrap_gtk_print_context_get_cairo): Override to make - gtk.PrintContext return a gtk.gdk.CairoContext object instead of a - cairo.Context one. - - * configure.in: pycairo dependency no longer optional. - - * gtk/gtk-2.10-types.defs (PrintContext): Missing gtk.PrintContext. - - * gtk/gtk-2.10.defs: Make 'parent' parameter of - gtk_print_operation_run optional and None acceptable. - - * gtk/gtk-2.10-types.defs: Declare type gtk.PageSetup. - (PrintSettings): idem for gtk.PrintSettings. - (PaperSize): Add boxed gtk.PaperSize. - - * gtk/gdk.override (_wrap_gdk_bitmap_create_from_data) - (_wrap_gdk_pixmap_create_from_data): Override to fix a compilation - warning and add bounds check on the data parameter. - - * gtk/gdkcairo.override: Add explicit braces to keep gcc happy. - - * gtk/Makefile.am: Make sure the defs are regenerated when - configure runs, due to possible changes in gtk+ 2.10 detection. - (gtk.c): Make gtk.c depend on gdk-types.defs to force it to be - generated early. - (.defs.c): Remove the recursive make invocation, no longer needed. - - * gtk/Makefile.am (defs_DATA): Install gdk.defs, gtk.defs, - gdk-types.defs, and gtk-types.defs. Thanks Olav Vitters - Fixes bug #340920. - -2006-05-06 Johan Dahlin - - * codegen/createdefs.py: - * configure.in: - * gtk/Makefile.am: - * gtk/gdk-2.10.defs: - * gtk/gdk-base-types.defs: - * gtk/gdk-base.defs: - * gtk/gdk-types.defs: - * gtk/gdk.defs: - * gtk/gdk.override: - * gtk/gtk-2.10-types.defs: - * gtk/gtk-2.10.defs: - * gtk/gtk-base-types.defs: - * gtk/gtk-base.defs: - * gtk/gtk-types.defs: - * gtk/gtk.defs: - - Add conditional support for Gtk+ 2.10 add new api. - -2006-05-06 Johan Dahlin - - * codegen/h2def.py (main): Add support for filtering out definies - in existing files - - * gtk/gtk.override: Ignore a bunch of stuff - - * gtk/gtk.defs: Add deprecated, broken and unsupported API here, - to make it easier to merge in the future - - * codegen/override.py (Overrides.__parse_override): - * codegen/codegen.py (main): - Add ignore-type statement in override - - * codegen/h2def.py: Refactor to use OOP, remove duplicated code - -2006-05-01 John Ehresman - - * gtk/gdk-types.defs: - * gtk/gdk.defs: - * gtk/gdk.override - * gtk/gtk.defs: - * gtk/pygtk-private.h: - GdkRegion wrapper - -2006-05-01 John Ehresman - - * gtk/gtktreeview.override: Restore override for - TreeView.get_visible_rect - -2006-05-01 Yevgen Muntyan - - * codegen/reversewrapper.py (ReverseWrapper.generate): Missing () - in Py_BuildValue template string to force a tuple to be created - even when number of retvals is one. Reviewed by Gustavo. Fixes - Bug 340162 "Missing ()". - -2006-04-26 Johan Dahlin - - * gtk/gdk.override (_wrap_gdk_event_handler_set): - * gtk/gdk.defs (event_handler_set): - Wrap gdk_event_handler_set - - * gtk/Makefile.am: - * gtk/gdk.override: - * gtk/gdkcairo.override: - * gtk/gdkcolor.override: - * gtk/gdkdraw.override: - * gtk/gdkevent.override: - * gtk/gdkgc.override: - * gtk/gdkpixbuf.override: - * gtk/gdkrectangle.override: - * gtk/gdkwindow.override: - * gtk/gtktoolbar.override: - Split out a few more files - -2006-04-23 Gustavo J. A. M. Carneiro - - * codegen/codegen.py: - * codegen/definitions.py: Add support for (unblock-threads #t) in - functions and methods, which enables the generation of - pyg_(begin|end)_allow_threads around the C call. - - * codegen/argtypes.py (ObjectArg.write_return): Follow up on - #169204 to add support for const-Object as return type. This - fixes a build problem in pygda. - -2006-04-18 John Ehresman - - * setup.py: Remove support for building / installing gobject, pygtk.py, - and dsextras.py - -2006-04-16 Richard Hult - - * gtk/gtkmodule.c: - * gtk/gtk.override: Move locale.h include from gtkmodule.c here to - fix the build. - -2006-04-13 Johan Dahlin - - * gtk/gtkcontainer.override (pygtk_container_for_common): - Set an exception and jump out (Coverity) - - * gtk/gtk.override (_wrap_gtk_stock_list_ids): Decref py_item - after using it (Coverity) - -2006-04-06 Johan Dahlin - - * gtk/__init__.py (_init): Add log handlers here - (threads_init): Deprecated gtk.threads_*, gtk.gdk.threads_* should - be used instead, fixes #165927 (Steve Chaplin) - - * gtk/gtk.override (_wrap_remove_log_handlers): New function, - makes it possible to remove the handlers pygtk installs. - Fixes #323786 - - * gtk/gtkmodule.c (init_gtk): Refactor, move init_check... - (init_gtk): Move the log handlers to gtk.override - - * gtk/gtk.override (_wrap_gtk_init_check): ..to here - - * gtk/__init__.py: Refactor, call init_check() and print warning - if DISPLAY is not set. Fixes #316877 - -2006-04-05 Johan Dahlin - - * gtk/gtktreeview.override - (_wrap_gtk_tree_sortable_set_default_sort_func): Allow callback - to be set to None, found by Patrick O'Brien - - * tests/test_liststore.py (ListStoreTest.testSetDefaultSortFunc): - Add test - -2006-04-04 Johan Dahlin - - * configure.in: Post release version bump - -=== 2.9.0 === -2006-04-04 Johan Dahlin - - * NEWS: Update - -2006-04-04 John Ehresman - - reviewed by: Johan Dahlin - - * gtk/gtktreeview.override: - Make sure gtk.TreeView.cell_get_size() allows - the usage of the in argument. Fixes #326357 - -2006-04-03 Johan Dahlin - - * codegen/codegen.py: - Fit in 80 characters, do not use \ - - * codegen/argtypes.py: - * codegen/codegen.py: - * codegen/definitions.py: - * codegen/defsconvert.py: - * codegen/defsparser.py: - * codegen/docextract.py: - * codegen/docextract_to_xml.py: - * codegen/docgen.py: - * codegen/h2def.py: - * codegen/mkskel.py: - * codegen/override.py: - * codegen/reversewrapper.py: - * examples/glade/autoconnect.py: - * examples/gobject/editable-interface.py: - * examples/gobject/signal.py: - * examples/gtk/bin.py: - * examples/gtk/filechooser.py: - * examples/gtk/scrollable.py: - * examples/gtk/sizegroup.py: - * examples/gtk/uimanager.py: - * examples/ide/edit.py: - * examples/ide/gtkdb.py: - * examples/ide/gtkprof.py: - * examples/pango/pangocairo-simple.py: - * examples/pango/utf8-demo.py: - * examples/pygtk-demo/demos/changedisplay.py: - * examples/pygtk-demo/demos/dnd.py: - * examples/pygtk-demo/demos/dndpixmap.py: - * examples/pygtk-demo/demos/entry_completion.py: - * examples/pygtk-demo/demos/expander.py: - * examples/pygtk-demo/demos/hypertext.py: - * examples/pygtk-demo/demos/list_store.py: - * examples/pygtk-demo/demos/textview.py: - * examples/pygtk-demo/demos/tree_store.py: - * examples/pygtk-demo/demos/treemodel.py: - * examples/simple/dnd.py: - * examples/simple/dndpixmap.py: - * examples/simple/hello.py: - * examples/simple/scribble.py: - * examples/simple/simple.py: - * examples/simple/tooltip.py: - * gtk/__init__.py: - * gtk/compat.py: - * gtk/keysyms.py: - * ltihooks.py: - * setup.py: - * tests/common.py: - * tests/runtests.py: - * tests/test_actiongroup.py: - * tests/test_conversion.py: - * tests/test_dialog.py: - * tests/test_enum.py: - * tests/test_gdkevent.py: - * tests/test_liststore.py: - * tests/test_radiobutton.py: - * tests/test_style.py: - * tests/testmodule.py: - - Run reindent.py on all python code. - -2006-04-02 Johan Dahlin - - * gtk/gdk.defs (rotate_simple): Add gdk.Pixbuf.rotate_simple, - fixes #314164 (Karel Vervaeke) - - * examples/pygtk-demo/demos/treemodel.py: - Check for null, so it can be used with a model filter, - fixes #311459 (Stephen Kennedy) - - * examples/gtk/widget.py: Remove tabs fixes #325320 - (Dieter Verfaillie) - -2006-04-02 Gustavo J. A. M. Carneiro - - * gtk/gtk-types.c (PyGdkWindow_PropertyGet): Change property size - limit from 9999 to G_MAXLONG. Thanks Wander Boessenkool. - Fixes #327778. - - * pango.override (_wrap_pango_layout_line_index_to_x): First - keyword name should be index, not x_pos, as pointed out by John - Finlay. Fixes #316581. - - * gtk/gtk.defs: Mark gtk_tree_row_reference_free as deprecated. - Fixes #309811. - - * gtk/gtkcontainer.override - (_wrap_gtk_container_class_list_child_properties): Deprecate in - favour of gtk.Container.list_child_properties. - (_wrap_gtk_container_list_child_properties): Add - gtk.Container.list_child_properties as classmethod. - (_wrap_gtk_container_class_install_child_property): Deprecate in - favour of gtk.Container.install_child_property. - (_wrap_gtk_container_install_child_property): Add - gtk.Container.install_child_property as clasmethod. Fixes #308394. - - * gtk/gtktreeview.override: Remove gtk_tree_view_get_visible_rect - duplicate override. - - * gtk/gtk.override: Make the "new-constructor - GTK_TYPE_MESSAGE_DIALOG" declaration conditional on gtk+ >= 2.9, - to match the contents of the constructor. - -2006-04-02 Johan Dahlin - - * gtk/gdk.override (_wrap_gdk_draw_indexed_image): - wrap, Fixes #333431 (Hamish Moffatt) - * tests/test_gdk.py (GdkTest.testDrawIndexedImage): Add test - - * gtk/gtk.defs (spin): Set default value of increment to - 1, fixes #325452 (Sebastian Rittau) - - * pango.override: - * tests/Makefile.am: - * tests/test_pango.py: - - Set default markup accel marker to \x00, add tests, - Fixes #329658 (Johan Svedberg) - -2006-04-02 Ben Caradoc-Davies - - reviewed by: Johan - - * examples/pygtk-demo/demos/pixbufs.py: Remove - discontinuous motion, fixes #327931 - -2006-04-02 Johan Dahlin - - - * gtk/gtkmodule.c (init_gtk): GDK_PARENT_RELATIVE constant - - * gtk/gtk-types.c (pygtk_style_helper_setitem): Add support for - GDK_PARENT_RELATIVE in style pixmaps. - - Fixes #320248 (Nikos Kouremenos) - -2006-04-01 Gustavo J. A. M. Carneiro - - * codegen/override.py (Overrides.__parse_override): Check and - abort if a function is being overridden more than once. - -2006-04-01 Rauli Ruohonen - - * codegen/codegen.py (Wrapper.write_functions): Add missing 'data' - parameter when calling self.write_function. - - * pangocairo.override: Wrap pango_cairo_context_set_font_options - and pango_cairo_context_get_font_options. Fixes #328108. - - Reviewed by Gustavo Carneiro. - -2006-04-01 Gustavo J. A. M. Carneiro - - * codegen/codegen.py (Wrapper.write_virtuals): Use - PyObject_GetAttrString, not PyDict_GetItemString, fixes #327715. - - * gtk/pygtk.h, gtk/gtkmodule.c: Export pygtk_tree_path_to_pyobject - and pygtk_tree_path_from_pyobject as public APIs. Fixes #318021. - - * codegen/argtypes.py: Add suppport for const object args. - Patch by wollny@cbs.mpg.de, plus some additional changes for code - style improvements and a bug fix. Fixes #169204. - - * gtk/gtkmodule.c (_pygtk_log_func): Call g_log_default_handler - when python isn't initialized. Fixes #334188. - - * examples/Makefile.am (EXTRA_DIST): Ship new editable interface example. - - * examples/gobject/editable-interface.py: Add small example of - overriding GtkEditable interface method and chaining to parent. - - * codegen/codegen.py: Bug 334986: "Make it possible to - re-implement interfaces and chain to parent impl." - -2006-04-01 Johan Dahlin - - * codegen/h2def.py (proto_pat): Allow whitespace before - last parenthesis. Fixes #317124 - -2006-04-01 Gustavo J. A. M. Carneiro - - * gtk/gtk.defs (GtkSpinButton.input, GtkEditable.do_insert_text) - (GtkEditable.get_selection_bounds, - GtkMenuItem.toggle_size_request): Add (direction ...) specifiers - to these virtuals. Probably more of these are missing, though. - - * codegen/codegen.py, - * codegen/definitions.py, - * codegen/reversewrapper.py: - Add support for int* and double* (and basic infrastructure to - support other types in the future) parameters for "reverse - wrappers". To use this feature one needs to help the - codegenerator by adding (direction "out") or (direction "inout") to - the parameter definitions as appropriate. Fixes #335964. - -2006-04-01 John Finlay - - reviewed by: Johan - - * gtk/gdk.defs: - * gtk/gtk.defs: - * gtk/gtk.override: - * gtk/gtktextview.override: - * gtk/gtktreeview.override: - * gtk/gtkwidget.override: - Add missing bindings, fixes #316881 - -2006-04-01 Johan Dahlin - - * gtk/gdk.defs: Remove display_open_default_libgtk_only, - it should not be wrapped. - Fixes #321476 - -2006-04-01 Marco Cabizza - - reviewed by: Johan - - * gtk/gdk.defs: - add gdk_screen_get_rgba_colormap and gdk_screen_get_rgba_visual, - Fixes 328996 - -2006-04-01 Johan Dahlin - - * gtk/gtkmodule.c: (init_gtk): - * pangomodule.c: (initpango): - Set default encoding to utf-8 in pango instead of gtk. - Fixes #328031 - -2006-04-01 Johan Dahlin - - * Makefile.am: - * configure.in: - * dsextras.py: - * gobject/Makefile.am: - * gobject/gobjectmodule.c: - * gobject/pygboxed.c: - * gobject/pygenum.c: - * gobject/pygflags.c: - * gobject/pygiochannel.c: - * gobject/pygmaincontext.c: - * gobject/pygmainloop.c: - * gobject/pygobject.c: - * gobject/pygparamspec.c: - * gobject/pygpointer.c: - * gobject/pygsource.c: - * gobject/pygtype.c: - * gtk/Makefile.am: - * pygtk.py: - * tests/Makefile.am: - Remove gobject and depend on pygobject 2.10.0 - -2006-04-01 Johan Dahlin - - * codegen/codegen.py: Mark function, methods and getsets as const. - -2006-04-01 Gustavo J. A. M. Carneiro - - * gtk/gtk.override (_wrap_gtk_message_dialog_new): Add missing - "new-constructor GTK_TYPE_MESSAGE_DIALOG" codegen declaration. - - * codegen/codegen.py: Add support for docstrings in .defs. To use - it, add (docstring "foo bar") to class, function or method - definitions. Fixes bug #322843. - - * pangocairomodule.c (initpangocairo): Fix compiler warning. - - * m4/python.m4: Fix "underquoted definition of AM_CHECK_PYMOD" warning. - - * gtk/gtk.override (_wrap_gtk_message_dialog_new): On gtk+ 2.9, - fix constructor to allow subclassing. Fixes bug #312056. - -2006-03-30 Johan Dahlin - - * configure.in: Post release version bump - -=== PyGTK 2.8.5 === -2006-03-30 Johan Dahlin - - * NEWS: Update. - -2006-02-27 Gustavo J. A. M. Carneiro - - * tests/test_dialog.py (MessageDialogTest.testDialogLeak): Add - test for bug #332771. - - * tests/test_actiongroup.py (ActionGroupTest.timeout_cb): Use - self.assertEqual instead of plain assert. - - * gtk/gtk.override (gtk_dialog_new_with_buttons): Remove one too - many g_object_ref. Fixes Bug 332771: "gtk.Dialog leak". - -2006-02-20 Gustavo J. A. M. Carneiro - - * gtk/gdkcairo.override: Don't raise an exception if pangocairo - import fails, since in this case python itself had already raised - another exception with more information. - -2006-02-14 Johan Dahlin - - * gtk/gtkclist.override (_wrap_gtk_clist_new_with_titles): Fix typos, - found by Padraig Brady - -2006-02-06 Johan Dahlin - - * gtk/__init__.py (_is_pydoc): Do not print the deprecation warning - if we're running under pydoc. - -2006-01-26 Gustavo J. A. M. Carneiro - - * examples/pygtk-demo/demos/pixbufs.py (PixbufsDemo.expose_cb): - Remove the "FIXME: draw_rgb_image_dithalign seems not to be - available" comment. - - * gtk/gdk.override (_wrap_gdk_draw_rgb_image): Add comment - explaining why we always call gdk_draw_rgb_image_dithalign instead - of gdk_draw_rgb_image. - (_wrap_gdk_draw_gray_image): idem. - -2006-01-21 Gustavo J. A. M. Carneiro - - * gtk/gtk.defs (cell_view_new_with_text): Add - caller-owns-return to fix a reference leak. - (cell_view_new_with_markup): idem. - (cell_view_new_with_pixbuf): idem. - (combo_box_new_text): idem. - (combo_box_entry_new_with_model): idem. - (combo_box_entry_new_text): idem. - (expander_new_with_mnemonic): idem. - (file_chooser_button_new_with_backend): idem. - (file_chooser_button_new_with_dialog): idem. - (file_chooser_widget_new_with_backend): idem. - (gtk_font_button_new_with_font): idem. - (icon_set_new): idem. - (gtk_icon_view_new_with_model): idem. - (gtk_menu_tool_button_new_from_stock): idem. - (toggle_tool_button_new_from_stock): idem. - (tool_button_new_from_stock): idem. - - * gtk/gdk.defs (pixbuf_loader_new_with_mime_type): Add - caller-owns-return to fix a reference leak. - -2006-01-20 John Ehresman - - * gtk/gdk.override (_wrap_gdk_window_new): Bump ref count - on x11 so destroy() works as expected - - * tests/test_gdk.py: test for the above - -2006-01-19 Johan Dahlin - - * examples/Makefile.am: - Install examples - - * examples/gtk/widget.py: - Call unrealize too - - * examples/gtk/scrollable.py: - Add example of a scrollable widget - -2006-01-15 Christopher Aillon - - * gobject/gobjectmodule.c (pyg_strv_to_gvalue): - Don't call g_value_init since the other *_to_gvalue - methods expect an already inited GValue - -2006-01-11 Johan Dahlin - - * configure.in: Post release version bump - -=== PyGTK 2.8.4 === -2006-01-11 Johan Dahlin - - * NEWS: Update. - - * Makefile.am: Only install pygtk.pth if we're building gobject. - -2006-01-10 Johan Dahlin - - * gtk/gtk-types.defs (IconView): should implement gtk.CellLayout - -2006-01-09 Gustavo J. A. M. Carneiro - - * Makefile.am, - * configure.in, - * gtk/Makefile.am, - * tests/Makefile.am: Fix pygobject check; Add external pygobject - include dir to include path instead of the internal one if - compiling with pygobject 2.9. - - * Makefile.am: Don't build or install gobject bindings if - pygobject >= 2.9 was found. - - * configure.in: Check for pygobject 2.9; create an AM conditional - based on it. - -=== PyGTK 2.8.3 === -2006-01-04 Cedric Gustin - - * dsextras.py (Template.generate): Pass GLOBAL_MACROS (in - particular HAVE_PYCAIRO) to codegen DefsParser. - * setup.py: If pangocairo is enabled, add pycairo to the list of - packages required to build the GTK+ module. Also set HAVE_PYCAIRO. - -2005-12-24 Gustavo J. A. M. Carneiro - - * gobject/pygflags.c (pyg_flags_add): Tolerate module == NULL, - which may happen when called from pyg_flags_from_gtype if a - wrapper for the GFlags was not registered. - -2005-11-15 Johan Dahlin - - * gobject/pygobject.c (pygobject_new_with_interfaces): We always - need to free interfaces since its a null terminated array. - -2005-11-13 Johan Dahlin - - * gobject/gobjectmodule.c (pyg_type_register): Remove deprecation - warning. - -2005-11-13 Gustavo J. A. M. Carneiro - - * gtk/gtk.defs (gtk_image_new_from_stock) - (gtk_image_new_from_icon_set, image_new_from_animation) - (gtk_image_new_from_icon_name) - (gtk_radio_menu_item_new_from_widget) - (gtk_radio_menu_item_new_with_mnemonic_from_widget) - (gtk_radio_menu_item_new_with_label_from_widget): Add missing - "(caller-owns-return #t)" -- fixes mem leaks. - -2005-11-12 Gustavo J. A. M. Carneiro - - * gtk/gdk.override (_wrap_gdk_pixbuf_animation_iter_advance): - Missing g_object_unref(ret), since caller owns the return value. - -2005-11-11 Johan Dahlin - - * examples/gtk/sizegroup.py: New example. - -2005-11-09 Gustavo J. A. M. Carneiro - - * gobject/pygobject.c (CHECK_GOBJECT): Use %p formatter instead of 0x%x. - - * gobject/pygobject-private.h (pyg_gil_state_ensure) - (pyg_gil_state_release): Sync these macro definitions with the - version in pygobject.h, i.e. don't call pygobject API - replacements, call the Python API directly. - - * tests/Makefile.am (tests): Add test_glade.py. - - * tests/test_glade.py: Add this file which was missing from CVS. - - * gtk/gtk.defs (gtk_widget_render_icon): Add missing - "(caller-owns-return #t)" to plug a leak. - -2005-11-03 Manish Singh - - reviewed by: Johan Dahlin - - * gobject/gobjectmodule.c: (pyg_integer_richcompare): - * gobject/pygenum.c: (pyg_enum_richcompare): - * gobject/pygflags.c: (pyg_flags_richcompare): - * gobject/pygobject-private.h: - Prepare for Python 2.5 richcompare changes, fixes #320455. - -2005-11-02 Johan Dahlin - - * gtk/__init__.py: Remove '' from sys.path if it was added by - PySys_SetArgv in init_gtk. - -2005-10-15 Gustavo J. A. M. Carneiro - - * gtk/gtkobject-support.c (pygtk_custom_destroy_notify): Add - g_return_if_fail to catch user_data == NULL. - - * gtk/gtktreeview.override (pygtk_set_search_equal_func_marshal): - Add some NULL parameter checks. Use PyObject_IsTrue instead of - comparing agains PyTrue. - -2005-10-14 Johan Dahlin - - * tests/Makefile.am (tests): - * tests/test_gdk.py: Add test - - * gtk/gdk.defs (pixmap_create_from_data) - (bitmap_create_from_data): use guchar* instead of gchar, - fixes #318874 (Bob Gibbs) - -2005-10-09 Johan Dahlin - - * configure.in: post release version bump - -=== PyGTK 2.8.2 === -2005-10-04 Johan Dahlin - - * NEWS: Update - -2005-10-09 Johan Dahlin - - * gobject/pygiochannel.c: (pyg_iowatch_marshal): - Use GIL state instead of block/unblock. Fixes crasher found - by Ole Andre Valda RavnÃ¥s. - -2005-10-04 Johan Dahlin - - * configure.in: post release version bump - -=== PyGTK 2.8.1 === -2005-10-04 Johan Dahlin - - * NEWS: Update - -2005-10-03 Johan Dahlin - - * gobject/pygobject.c: (PyGProps_length): - * gtk/gdk.defs: - * gtk/gdk.override: - * gtk/gtk.defs: - * gtk/gtk.override: - Fix gcc 4.0 warnings. - -2005-10-02 Gustavo J. A. M. Carneiro - - * tests/test_properties.py (PropertyObject.__gproperties__) - (PropertyObject.do_get_property, PropertyObject.do_set_property) - (TestProperties.testUint64): Add guint64 property test case, by - Johan Dahlin. - - * gobject/pygtype.c (pyg_value_from_pyobject): Accept conversion - from PyInt (not just PyLong) to guint64. - (_wrap_g_type_wrapper__get_children): Fix sign/unsigned warning. - (_wrap_g_type_wrapper__get_interfaces): idem. - (pyg_value_from_pyobject): idem. - -2005-10-01 Gustavo J. A. M. Carneiro - - * tests/test_subtype.py (TestSubType.testGObjectNewError): Add new - test for the bug below. - - * gobject/gobjectmodule.c (pyg_object_new): don't unref/sink obj - if it is NULL. - -2005-09-29 Johan Dahlin - - * gobject/gobjectmodule.c: (pyg_type_name), (pyg_type_from_name), - (pyg_type_parent), (pyg_type_is_a), (pyg_type_children), - (pyg_type_interfaces): Undeprecate for now. - -2005-09-28 Gustavo J. A. M. Carneiro - - * tests/Makefile.am (tests): Add test_textview.py. - - * tests/test_textview.py: Test gtk.TextView.get_default_attributes(). - - * gtk/gtktextview.override - (_wrap_gtk_text_view_get_default_attributes): Override to - workaround gtk bug #317455. - - * pangomodule.c (initpango): Fix values of pango.SCALE_X_LARGE and - pango.SCALE_XX_LARGE. - -2005-09-25 Gustavo J. A. M. Carneiro - - * tests/Makefile.am (EXTRA_DIST): Add leak.glade. - - * tests/test_glade.py: Test case for the leak below. - - * gtk/libglade.override (connect_many): Fix a reference leak in 'tuple'. - -2005-09-22 Johan Dahlin - - * gobject/gobjectmodule.c: (pyg_type_from_name): - * gobject/pygobject.c: (pygobject_connect), - (pygobject_connect_after), (pygobject_connect_object), - (pygobject_connect_object_after), (pygobject_emit), - (pygobject_stop_emission): - Include the object and the name of the signal in TypeErrors - -2005-09-20 Johan Dahlin - - * gtk/gtk.defs (Entry.set_completion): Add null-ok - -2005-09-16 John Ehresman - - * gtk/gdk.override (_wrap_gdk_event_tp_setattr): Allow subwindow - to be set for enter & leave notify events. - -2005-09-16 John Ehresman - - * gobjectmodule.c (initgobject): Add gobject.Warning Warning subclass - and redirect all g_log messages for the "GLib", "Glib-GObject", and - "GThread" domains to the python warning system - - * pangomodule.c (initpango): Add pango.Warning Warning subclass - and redirect all g_log messages for the "Pango" domain to the - python warning system - - * gtkmodule.c (initgtk): Move gtk Warning subclass from the gdk - module to the gtk module and added redirections for g_log messages - for the "Gdk" and "GdkPixbuf" domains to the python warning system - - * gtk/__init__.py: Set gdk.Warning = gtk.Warning for backward - compatibility - -2005-09-13 Johan Dahlin - - * gtk/gdk.defs: - * gtk/gtk.defs: - * gtk/gtk.override: - * gtk/gtktextview.override: - * gtk/gtktreeview.override: - * gtk/gtkwidget.override: - - Revert Johns latest commit. - -2005-09-13 Gustavo J. A. M. Carneiro - - * gobject/gobjectmodule.c (add_properties): Append extra - information to the exception value strings to help contextualize - any errors that occur while registering properties. - -2005-09-06 John Finlay - - * gtk/gdk.defs (set_urgency_hint): Add. - - * gtk/gtktreeview.override (_wrap_gtk_tree_view_get_visible_range): - Add. - - * gtk/gtk.defs (set_drag_dest_item): Allow path to be None. - (get_visible_range): Add. - -2005-09-05 John Finlay - - * gtk/gtk.defs (set_cursor): Allow cell to be None - - * gtk/gtkwidget.override (_wrap_gtk_drag_source_set_icon_name1): Add. - - * gtk/gtk.defs (gtk_drag_source_set_icon_name): Add as a widget method - and deprecate function gtk.drag_source_set_icon_name. - - * gtk/gdk.defs (set_icon_name): Add. - - * gtk/gtktextview.override (_wrap_gtk_text_view_get_iter_at_position): - Add. - - * gtk/gtk.override (_wrap_gtk_clipboard_request_image): Add. - - * gtk/gtk.defs (gtk_alternative_dialog_button_order) - (gtk_clipboard_request_image, gtk_clipboard_wait_for_image) - (gtk_clipboard_set_image, gtk_clipboard_wait_is_image_available) - (drag_source_add_iamge_targets, drag_source_add_uri_targets): - Add defs. - -2005-09-02 Johan Dahlin - - * gobject/pygparamspec.c (pyg_param_spec_getattr): Sort all attributes - alphabetically, like python does. Set default value to None - (pyg_param_spec_getattr): Add default_values fallback, for backwards - compatibility. - -2005-09-02 Gustavo J. A. M. Carneiro - - * gobject/gobjectmodule.c (_wrap_pyg_type_register): Don't crash - when registering non-types. - - * tests/test_subtype.py: Test registering non-types raises - TypeError. - - Fixes #315100: "gobject.type_register crashes if parameter is not - a type." - -2005-09-02 Johan Dahlin - - * gobject/gobjectmodule.c: (pyg_signal_list_names): - Also include interfaces, fixes #315038 - -2005-09-02 Johan Dahlin - - * configure.in: post release version bump - - * Changelog.pre-2-8: Move old changelog - diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 deleted file mode 100644 index fe01f992..00000000 --- a/ChangeLog.pre-2-0 +++ /dev/null @@ -1,6521 +0,0 @@ -2003-09-01 James Henstridge - - * configure.in: increment version number. - - * NEWS: add news items. - -2003-08-31 James Henstridge - - * gtk/gtktreeview.override (pygtk_cell_data_func_marshal): get rid - of the last argument in the cunote->data==NULL case. - PyEval_CallFunction() was ignoring it anyway. Fixes bug #121100. - -2003-08-26 James Henstridge - - * PKG-INFO.in (Classifier): add PKG-INFO file for submission to - Python package index. - -2003-08-25 John Finlay - - * gtk/gtktextview.override - (_wrap_gtk_text_view_set_border_window_size): Add missing break to - switch (bug #120669). Patch by Doug Quale. - - * gtk/gdk.override (_wrap_gdk_pixbuf_loader_write) Allow count to - override buf_len if in range 0 to buf_len (bug #120680). - -2003-08-24 James Henstridge - - * NEWS: add news items. - - * configure.in: update version number. - - * gtk/gtktreeview.override (_wrap_gtk_tree_store_new): Fix typo - found by John Finlay (bug #120517). - - * gtk/gtk.defs (pack_start_defaults): mark deprecated in favour of - pack_start. Fixes bug #118715. - (pack_end_defaults): similar here. - (attach_defaults): similar here. - - * gtk/libglade.override (_wrap_glade_set_custom_handler): wrap - glade_set_custom_handler in a more direct way. Implementation - based on the one in bug #119138. - (_wrap_glade_set_custom_widget_callbacks): deprecate this - function, and make it coexist better with the new one. - -2003-08-15 Johan Dahlin - - * gtk/gtktreeview.override (_wrap_gtk_list_store_remove): Move to - autogenerated, since it need to return a GtkTreeIter. - -2003-08-02 James Henstridge - - * gtk/gdk.override (_wrap_gdk_pixbuf__get_pixel_array): fix up - order of dimensions in pixel array (bug #118839). - - * atk.override (NO_IMPORT_PYGOBJECT): define NO_IMPORT_PYGOBJECT - to get rid of multiple definitions of symbols. Patch from Naofumi - Yasufuku (bug #118835). - - * Makefile.am, gtk/Makefile.am (common_ldflags): switch the - -no-undefined switch back to being win32 only. In particular, - caused breakage on OS X. - -2003-07-31 James Henstridge - - * NEWS: add some news items. - - * configure.in: increment version number. - - * pygobject.c (pygobject_handler_is_connected): add wrapper (from - bug #118676). - - * pygtype.c (pyg_object_descr_doc_get): add a call to - PyType_Ready() to make sure the type is initialised (bug #118699). - -2003-07-26 James Henstridge - - * gtk/gdk.override: apply Elliot Lee's threading patch. Still - need to fix the remaining threading problems. - -2003-07-25 James Henstridge - - * gtk/gtktreeview.override - (_wrap_gtk_tree_view_get_dest_row_at_pos): add wrapper (bug #116133). - - * gtk/gtk.override (ignore): ignore some gtk_rc_* functions. - -2003-07-24 James Henstridge - - * gtk/pygtk.h (init_pygtk): same here. - - * pygobject.h (init_pygobject): convert fatal errors to normal - exceptions. - - * gtk/gtkglmodule.c (initgl): same here. - - * gtk/libglademodule.c (initglade): same here. - - * gtk/gtkmodule.c (init_gtk): same here. - - * atkmodule.c (initatk): same here. - - * pangomodule.c (initpango): same here. - - * gobjectmodule.c (initgobject): don't cause fatal errors if an - exception on init. - - * codegen/codegen.py (write_source): print an error message if it - isn't possible to import a particular name from the module. - - * autogen.sh (DIE): require Automake 1.7. - - * configure.in (AC_ARG_ENABLE): enable thread support by default. - -2003-07-23 James Henstridge - - * gtk/gtk.override (_wrap_gtk_dialog_add_buttons): add - add_buttons() method (bug #109620). - -2003-07-23 Ian McKellar - - * gtk/Makefile.am: build fix - -2003-07-22 James Henstridge - - * codegen/scmexpr.py (parse): print a real error if we find a - string or identifier outside of a s-expression (bug #104311). - - * gtk/gtktreeview.override: wrappers for tree model drag - source/dest functions from Emmanuele Bassi (bug #116133). - - * gtk/gtktreeview.override (_wrap_gtk_tree_model_rows_reordered): - add wrapper (from Arjan J. Molenaar, bug #116005). - - * gtk/Makefile.am: fix a bug I introduced into the makefile - yesterday, and fix dependencies for gtk.c. - -2003-07-20 John Finlay - - * gtk/gdk.override (gdk_window_new) Wrap gdk_window_new as a - constructor for gtk.gdk.Window(). Fixes #117860. - -2003-07-20 James Henstridge - - * gtk/Makefile.am: same here. - - * Makefile.am: change *module.so to *.so. Seems to be the - preferred extension these days ... - -2003-07-12 John Finlay - - * pango.override (_wrap_PANGO_ASCENT, _wrap_PANGO_DESCENT) - (_wrap_PANGO_LBEARING, _wrap_PANGO_RBEARING) - Add these function overrides. Fixes #116920. - - * pango.defs (PIXELS, ASCENT, DESCENT, LBEARING, RBEARING) - Add defs for these. Fixes #116920. - - * pangomodule.c (initpango) Add pango.SCALE constant. Fixes #116920. - - * pango.override (PangoAttrIterator) Add this type and its methods. - -2003-07-11 John Finlay - - * pango.override (pypango_attr_new) Add start and end args to specify - start_index and end_index values. - (pypango_attr_copy) Specify copying start_index and end_index. - (_wrap_pango_attr_*_new) Allow the pango.Attr* functions to optionally - specify start_index and end_index values. Fixes #116776. - - * pango.override (pypango_attr_tp_getattr) - (pypango_attr_get_type) Add these to provide pango.Attribute type - information and access to attribute type specific data. Fixes #116691. - - * pango.defs (pango_color_parse) Make this a constructor for - pango.Color. Fixes #116662. - - * pango.override (_wrap_pango_color_parse) Add constructor wrapper. - Fixes #116662. - - * gtk/gtk.defs (gtk_tree_model_sort_convert_iter_to_child_iter) - Allow sort_iter to be NULL. Fixes #113097 - (gtk_tree_model_sort_convert_child_iter_to_iter) - Allow child_iter to be NULL. Fixes #113097 - - * gtk/gtktreeview.override - (_wrap_gtk_tree_model_sort_convert_iter_to_child_iter) - Allow the child_iter to be NULL and return the converted iter but - allow child_iter to be passed in for backward compatibility. - Fixes #113097 - (_wrap_gtk_tree_model_sort_convert_child_iter_to_iter) - Allow the sort_iter to be NULL and return the converted iter but - allow sort_iter to be passed in for backward compatibility. - Fixes #113097 - -2003-07-03 James Henstridge - - * gtk/gtk.defs (GtkWindow.set_icon): allow passing None as the - icon (fixes bug #116072). - (GtkTreeViewColumn.set_widget): allow passing None for the column - header widget (fixes bug #115027). - - * gobjectmodule.c (pyg_error_check): change first block threads - instead of unblocking them here. (Looks like John forgot to check - this part in). - -2003-05-03 Naofumi Yasufuku - - Bug #110619: - - * dsextras.py (InstallLib.prepare): Fixed self.prefix - initialization for win32. - (BuildExt.init_extra_compile_args, BuildExt.build_extensions) - (BuildExt.build_extension): On win32, add MinGW GCC option for - MSVC compatible struct packing (gcc2: -fnative-struct, gcc3: - -mms-bitfields). - (BuildExt.modify_compiler, BuildExt.build_extensions): On win32, - remove '-static' linker option to prevent MinGW ld from trying to - link with MSVC import libraries. - - * setup.py: Changed list_files('codegen/*.py') to - list_files(os.path.join('codegen', '*.py')) for win32. - Fixed pygtk.h installation directory. - -2003-07-02 James Henstridge - - * dsextras.py (pkgc_version_check): remove "self.", fixing bug - 111002 (pointed out by Seth Nickell). - -2003-07-01 John Finlay - - * gtk/gtk.override (_wrap_gtk_button_box_get_child_size) - (_wrap_gtk_button_box_get_child_ipadding): Add deprecation warnings. - Fixes #110663. - - * gtk/gdk.override (_wrap_gdk_pixbuf_animation_get_iter) - (_wrap_gdk_pixbuf_animation_iter_advance): Add methods. Fixes #114616. - - * gtk/gdk.defs (gdk_pixmap_create_from_data): Allow NULL window arg. - Fixes #114661. - - * gtk/gdk.defs (gdk_rectangle_new): Add GdkRectangle constructor. - Partial fix for #114743. - - * gtk/gdk.override (_wrap_gdk_rectangle_union) - (_wrap_gdk_rectangle_intersect): Add keyword args and allow 4-tuple as - rectangle spec. Fixes #114743. - - * gtk/gdk.override (_wrap_gdk_window_get_frame_extents): Return a - GdkRectangle. Fixes #114817. - - * gtk/gdk.override (gdk_window_get_decorations): Add method. - Fixes #114821. - - * gtk/gdk.defs (gdk_window_shape_combine_mask): shape_mask can be NULL. - Fixes #114952. - - * gtk/gdk.override (_wrap_gdk_window_get_toplevels) - (_wrap_gdk_list_visuals): Add functions. Fixes #115046. - - * gtk/gtktextview.override (_wrap_gtk_text_buffer_set_text) - (_wrap_gtk_text_buffer_insert) - (_wrap_gtk_text_buffer_insert_at_cursor) - (_wrap_gtk_text_buffer_insert_interactive) - (_wrap_gtk_text_buffer_insert_interactive_at_cursor): - Raise a ValueError exception if specified length greater than text - length. Fixes #115154. - - * gtk/gtk.override (_wrap_gtk_accelerator_parse): Add function. - Fixes #115191. - - * gtk/gtk.override (_wrap_gtk_accel_map_lookup_entry): Add function. - Fixes #115194. - - * gtk/gtk.override (_wrap_gtk_accel_map_load_fd) - (_wrap_gtk_accel_map_save_fd): Allow fd arg to be a Python file object. - Fixes #115198. - - * gtk/gtk.override (_wrap_gtk_color_selection_palette_from_string) - (_wrap_gtk_color_selection_palette_to_string): Add first and fix - second. Fixes #115206. - - * gtk/gdk.defs (keyboard_ungrab) (rgb_get_colormap) (rgb_get_cmap): - Add first two defs and add deprecation to last def. Fixes #115502. - -2003-06-30 John Finlay - - * gobjectmodule.c (pyg_error_check) Replace first pyg_unblock_threads - with pyg_block_threads. Fixes #116284. - -2003-06-30 James Henstridge - - * gtk/pygtkcellrenderer.c: same here. - - * gtk/pygtktreemodel.c: don't explicitly import pygobject.h, so - that it gets included correctly by pygtk-private.h. This should - fix the Mac OS X build issues. - -2003-06-27 John Finlay - - * gtk/gdk.defs (gdk_draw_layout_with_colors): Add deprecation warning. - Fixes 113954. - - * gtk/gdk.defs (pixmap_new): Fix typo. Fixes #114659. - - * gtk/gdk.override (_wrap_gdk_draw_layout): Add optional args - background and foreground (GdkColor) default to NULL. Fixes 113954. - -2003-06-26 James Henstridge - - * (lots of stuff): add copyright notices, and update to LGPL 2.1. - -2003-06-23 Gustavo J. A. M. Carneiro - - * codegen/defsparser.py (DefsParser.ifdef): for some reason, the - list of arguments received now includes an extra empty string at - the beginning, so I corrected the indexes. - -2003-06-18 James Henstridge - - * gtk/gdk.override (_wrap_gdk_drawable__get_handle): fix bug - 114619 (the #define we were using was private). - -2003-06-12 Joe Shaw - - * gtk/gdk.override (_wrap_gdk_pixbuf_loader_write): Fix an invalid - python format string. - -2003-06-06 Johan Dahlin - - * gobjectmodule.c (get_handler_priority): Fix bogus strcmp. Thanks to - John Ehresman for spotting this. Fixes #110489 - -2003-06-05 Johan Dahlin - - * gtk/gdk.override (_wrap_gdk_colormap_alloc_color): Allow - allocating a color using an unallocated gdk.Color. Patch by John - Finlay, fixes #113858 - - * gtk/gtk.defs (iter_children): Allow null for parent. Fixes #113577 - - * gtk/libglade.defs (set_custom_widget_callbacks): Added - - * gtk/libglade.override (_wrap_glade_set_custom_widget_callbacks) - (_wrap_glade_set_custom_widget_callbacks): Impl. Patch by Ross - Burton. Fixes #113271 - - * gtk/gdk.override (_wrap_gdk_pixbuf_loader_write): Make last - argument optional. - (_wrap_gdk_pixbuf_loader_new_with_type): Make first argument - optional, so we can open without specifying a type. Fixes #114206. - (_wrap_gdk_gc_set_values, _wrap_gdk_gc_set_values): Impl. Patch by - John Finlay, fixes #114449 - - * gtk/gdk-types.defs (Drawable): Add xid and handle attributes. - - * gtk/gdk.override (_wrap_gdk_drawable__get_xid) - (_wrap_gdk_drawable__get_xid): Implement for X11 and win32. Patch - by jkluebs@luebsphoto.com, fixes #109105 - - * gtk/gtk.override (_wrap_gtk_adjustment_set_all): Undeprecate, - add keywords. Based upon patch by kohler@icir.org, fixes #105220 - - * gtk/gtk-extrafuncs.defs (set_all): Undeprecate. - - * gtk/gtk*.override: New files, splitted out from gtk.override - Fixes #103613 - - * gtk/Makefile.am (EXTRA_DIST): Add *.override here - - * codegen/override.py (Overrides.__parse_override): Added - "include" keyword, to be able to include files in override files. - Fixes #103611 - -2003-06-02 James Henstridge - - * gtk/gdk.override (_wrap_gdk_property_change): use short and long - instead of gint16 and gint32, so we don't break on 64 bit - platforms (Xlib uses those types, even though they don't match the - sizes). - If format==32 test if the type is ATOM or ATOM_PAIR, and if so - marshal the data into a (GdkAtom *) array instead of (long *). - Based on patch in bug 113860. - (_wrap_gdk_property_get): make similar changes to property_get. - (_wrap_gdk_property_get): the returned length is the length in - bytes, not number of elements. - -2003-05-30 Johan Dahlin - - * gtk/gtk.defs (set_transient_for, set_default, set_focus): Accept - None as argument. Patch by John Finlay, fixes #113675 - - * gtk/gtk.override (_wrap_gtk_window_get_frame_dimensions): - Impl. Patch by John Finlay, fixes #113568 - (_wrap_gtk_widget_get_size_request): Impl. Patch by John Finlay, - fixes #113572 - (_wrap_gtk_window_set_icon_list, _wrap_gtk_window_get_icon_list) - (_wrap_gtk_window_set_default_icon_list) - (_wrap_gtk_window_get_default_icon_list): Impl. Patch by John - Finlay, fixes # 113576 - (pygtk_container_for_common_marshal, pygtk_container_for_common) - (_wrap_gtk_label_get): Implement, share code with - GtkContainer.foreach, patch by Rui Lopes, fixes #113597 - - * gtk/gtk.defs (convert_path_to_child_path): Rename first argument - to sorted_path. Thanks to John Finlay, fixes #113102 - - * gtk/gtk.override (_wrap_gtk_text_tag_table_add): Raise - ValueError if the tag exists. Patch by - John Finlay, fixes #112796 - (_wrap_gtk_text_view_set_border_window_size): Raise exceptions if - size is under 0 or a wrong type is specified. Patch by John - Finlay, fixes #112880 - (_wrap_gtk_text_tag_table_remove): Raise ValueError if the tag - doesn't exist. Patch by John Finlay, fixes #112797 - (_wrap_gtk_tooltips_data_get): Impl. Patch by John Finlay, fixes - #112952 - - * gtk/gdk.defs (set_icon_stock): Fix typo. Thanks to John - Finlay. fixes #113928 - - * gtk/gdk.override (_wrap_gdk_devices_list): Impl. Patch by John - Finlay, fixes #113919 - - * gtk/gtk.override (_wrap_gtk_text_buffer_set_text) - (_wrap_gtk_text_buffer_insert) - (_wrap_gtk_text_buffer_insert_at_cursor) - (_wrap_gtk_text_buffer_insert_interactive) - (_wrap_gtk_text_buffer_insert_interactive_at_cursor): - - * gtk/gdk.defs (gc_new): - - * gtk/gdk.override (_wrap_gdk_gc_new2): Backwards compatibility, - based on patch by Jonathan Blandford, fixes #113861 - -2003-05-28 Johan Dahlin - - * codegen/defsparser.py (DefsParser.__init__): Make the third - argument optional. This broke distutils. - - * gobjectmodule.c, pygtype.c, gtk/gtk.override, - gtk/pygtkcellrenderer.c, pygtktreemodel.c: Remove unnecessary - calls to PyErr_Clear. It's not needed right after a - PyErr_Print. Thanks to Rui Lopes for spotting this. - -2003-05-28 James Henstridge - - * codegen/defsparser.py (IncludeParser.include): simplify. - - * codegen/scmexpr.py (parse): set up so that it takes a filename - as an argument. Also keep track of line numbers, so that more - useful error messages can be provided. - -2003-05-26 Gustavo J. A. M. Carneiro - - * codegen/codegen.py (main): Parse -Dkey[=val] options. - - * codegen/defsparser.py (DefsParser.__init__): Receive an - aditional 'defines' parameter, with a dictionary of all - -Dkey[=val] command-line options. - (DefsParser.ifdef): Handle (ifdef 'FOO ... ) - -2003-05-26 James Henstridge - - * codegen/scmexpr.py (parse): convert to a generator to allow - incremental parsing of defs files. - -2003-05-23 Gustavo J. A. M. Carneiro - - * codegen/defsparser.py (IncludeParser.include): Made - pygtk-codegen able to read from stdin, by specifying a single dash - (-) as file name. - -2003-05-07 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_radio_button_set_group, - _wrap_gtk_radio_button_set_group): Implement. Patch by John - Finlay, fixes #112054 and #112058. - (_wrap_gtk_ruler_get_range): Return a tuple of integers, not - doubles. Patch by John Finlay, fixes #111716. - (_wrap_gtk_image_get_pixmap, _wrap_gtk_image_get_image) - (_wrap_gtk_image_get_stock, _wrap_gtk_image_get) - (_wrap_gtk_image_get_pixbuf, _wrap_gtk_image_get_animation): - Implement. Patch by John Finlay, fixes #111400. - (_wrap_gtk_scrolled_window_get_policy): Implement. Patch by John - Finlay, fixes #112247. - (_wrap_gtk_text_buffer_get_iter_at_child_anchor): Implement, Patch - by John Finlay, fixes #112524. - - * gtk/gtk.defs (GtkImage.render_icon, set_image, - GtkStyle.render_icon): Allow None to be sent in. Patch by John - Finlay, fixes #111389 and #111416. - -2003-04-29 Johan Dahlin - - * gtk/Makefile.am (pygtk_PYTHON): Install dsextras. - -2003-04-27 Johan Dahlin - - * setup.py (py_modules): Install dsextras.py - -2003-04-12 Naofumi Yasufuku - - * pango.defs (pango_context_get_metrics): Allow language parameter - to be omitted to get the metrics for the entire font. - (pango_itemize): Allow cached_iter parameter to be omitted. - (pango_font_description_better_match): Allow old_match parameter - to be omitted to determine if new_match is a match at all. - (pango_font_get_metrics): Allow language parameter to be omitted - to get the metrics for the entire font. - (pango_layout_set_font_description): Allow 'None' desc parameter - to unset the current font description. - (pango_layout_set_tabs): Allow 'None' tabs parameter to reinstate - the default tabs. - (pango_language_matches): Changed to function. Allow 'None' - language parameter which matches nothing but '*'. - Fixes #109848 - -2003-03-24 James Henstridge - - * pygobject-private.h: add missing "extern" keyword (from Glyph's - patch). - -2003-03-23 James Henstridge - - * setup.py: increment version number. - - * NEWS: add news items. - - * configure.in (numpy check): fix up check for Numeric and - increment version number. - -2003-03-21 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_tree_store_new): - (_wrap_gtk_list_store_new): This two are constructors, not normal - function, therefor return -1 as error and 0 as success. - Also a big tab/trailing whitespace cleanup. (so the patch is a lot - larger than it should be) - -2003-03-19 Johan Dahlin - - * gtk/gdk.defs (get_option): Added. - -2003-03-13 James Henstridge - - * gobjectmodule.c: add doc comments. - - * pygobject.c: add doc comments. - - * pygboxed.c: add doc comments. - -2003-03-12 James Henstridge - - * pygtype.c: add some documentation. - -2003-03-11 James Henstridge - - * gtk/gdk.defs (set_back_pixmap): allow passing None for the - pixmap argument. - - * gtk/gtk.override (_wrap_gtk_main_iteration): return boolean - (either Py_True or Py_False). - (_wrap_gtk_main_iteration_do): same here. - (_wrap_gtk_im_context_filter_keypress): and here. - (_wrap_gtk_text_attributes__get_strikethrough): and here. - (_wrap_gtk_text_attributes__get_draw_bg): and here. - - * gtk/gtk.override (_wrap_gtk_tree_model_tp_setitem): add a - setitem routine for GtkTreeStore and GtkListStore. - (_wrap_gtk_list_store_insert): add second argument to allow - setting the values in the row when creating it. - (_wrap_gtk_list_store_insert_before): same here. - (_wrap_gtk_list_store_insert_after): and here. - (_wrap_gtk_list_store_prepend): and here. - (_wrap_gtk_list_store_append): and here. - (_wrap_gtk_tree_store_insert): and here. - (_wrap_gtk_tree_store_insert_before): and here. - (_wrap_gtk_tree_store_insert_after): and here. - (_wrap_gtk_tree_store_prepend): and here. - (_wrap_gtk_tree_store_append): and here. - - * gtk/pygtk-private.h (_pygtk_tree_model_set_row): add prototype. - - * gtk/gtk-types.c (pygtk_tree_path_from_pyobject): support - converting a path string to a GtkTreePath. - (_pygtk_tree_model_set_row): new helper function to set a row from - a sequence. - -2003-03-08 Johan Dahlin - - * gtk/gdk.defs (gdk_color_new): New placeholder function - (gc_new): Set as constructor for GdkGC - - * gtk/gdk.override (_wrap_gdk_color_tp_setattr) - (_wrap_gdk_color_new): Impl - -2003-03-06 James Henstridge - - * pygobject.c (pygobject_register_wrapper): the GObject should own - a ref to the wrapper. - (pygobject_new): get rid of the hasref code, and make sure that - the GObject owns a ref to the wrapper if we create it. - (pygobject_dealloc): get rid of the hasref code. If we get this - far, the wrapper is dead. - (pygobject_traverse): if the GObject's refcount == 1, then - traverse to self. - (pygobject_clear): clear self->obj and self->inst_dict. - (pygobject_register_class): set tp_clear() so that things actually - work. Without this, there was no tp_clear method for subclasses - of GObject. - - * pygobject.h: remove hasref member, hopefully not needed if - relying on cycle GC. - -2003-03-07 Johan Dahlin - - * gtk/gtk.defs (gtk_label_new_with_mnemonic, gtk_label_new) - (render_icon): Allow some parameters to be NULL. - - * gtk/gtk.override (_wrap_gtk_stock_lookup) - (_wrap_gtk_stock_list_ids) - (_wrap_gtk_tree_view_insert_column_with_data_func): Impl. - (ignore-glob): Remove gtk_accelerator_* - - * examples/pygtk-demo/demos/stock_browser.py: Ported from C - -2003-03-04 Jon Trowbridge - - * gtk/gtkmodule.c (python_do_pending_calls): Block threads while - we make our Py* calls. This prevents a 'no current thread' error - if you try to kill a program by typing ctrl-c in the console it - was launched from. - - * pygobject.c (pygobject_dealloc): Unblock threads before - invalidating our closures, since this might trigger a destructor - that needs to execute python code. - (pygobject_clear): Ditto. - - * pygboxed.c (pyg_boxed_dealloc): Unblock threads before freeing - the boxed type, since the destructor may need to execute python - code. - (pyg_boxed_new): Block threads while we make our Py* calls. - (pyg_pointer_new): Block threads while we make our Py* calls. - - * gobjectmodule.c (pyg_object_set_property): We need to block - threads before our call to pygobject_new. - (pyg_object_get_property): Ditto. - -2003-03-02 Johan Dahlin - - * gobjectmodule.c (pyg_io_add_watch): Fix function name in exception. - -2003-02-27 Johan Dahlin - - * dsextras.py (getstatusoutput): Small typo. - - * setup.py: Cut the doclines, to make the windows installer happy - -2003-02-26 Johan Dahlin - - * gtk/gdk.defs (invalidate_rect): Null is okay here. - Fixes #106295 (John Finlay). - - * gtk/gdk.override (_wrap_gdk_pixbuf_new_from_xpm_data): - Impl. Fixes #106292 (John Finlay) - - * pango.override (_wrap_pango_layout_set_text): Impl. Fixes - #106280 (John Finlay) - - * gtk/gtk.override: Added get implements for all TextAttribute - fields. Fixes #106279 (John Finlay). - - * gtk/gtk-types.defs (TextAttributes): Added fields. - - * setup.py, dsextras.py: Added win32 support and some - rearrangements. Largely based upon patch by Cedric Gustin. - - * gtk/gdk.defs (pointer_grab, pointer_ungrab, keyboard_grab) - (pointer_is_grabbed): Add. - - * gtk/gdk.defs: Add GDK_CURRENT_TIME as default value to all - functions that require a time argument - -2003-02-24 Gustavo J. A. M. Carneiro - - * gtk/libglade.override (_wrap_glade_bindtextdomain): Raise - exception if bindtextdomain() returns NULL. - - * gtk/libglade.defs (textdomain): Wrap the textdomain() function. - -2003-02-14 James Henstridge - - * configure.in (export_dynamic): add guard around the - export_dynamic flag from GTK_LIBS. (fixes bug 105728). - -=== PyGTK 1.99.15 === - -2003-02-08 Johan Dahlin - - * configure.in, setup.py: Upped version number - - * pygtk-2.0.pc.in (codegendir): Added. - - * setup.py: Added Numeric and gtkgl support (gtkgl untested). - - * dsextras.py: Updated. - - * gtk/libglade.override (connect_many): Add PyErr_Clear() - here. Since PyMapping_GetItemString will raise an AttributeError - if the handler can't be found. - -2003-01-31 James Henstridge - - * gtk/gdk.override (_wrap_gdk_draw_rgb_image): add implementation. - (_wrap_gdk_draw_rgb_32_image): add implementation. - (_wrap_gdk_draw_gray_image): add - (_wrap_gdk_draw_rgb_image, _wrap_gdk_draw_rgb_32_image): add xdith - and ydith optional arguments, providing the functionality of the - _dithalign variants. - -2003-01-30 Jon Trowbridge - - * gtk/gdk.override: Only call import_array if we HAVE_NUMPY. - -2003-01-30 James Henstridge - - * gtk/gdk.override (_wrap_gdk_pixbuf__get_pixel_array): add - wrapper that returns a NumPy array. - - * gtk/gdk-types.defs (Pixbuf): add a "pixel_array" member to - pixbuf object. - - * configure.in (enable_numpy): get rid of code detecting which - directory Numeric's arrayobject.h header is in. No point in - supporting ancient versions ... - -2003-01-30 Gustavo J. A. M. Carneiro - - * gtk/gtk-types.defs (Layout): Wrap bin_window. - -2003-01-24 Johan Dahlin - - * dsextras.py (InstallLib.add_template_option): Fix template bustage. - - * gtk/gtk.defs (set_from_image, set_from_file, set_from_pixbuf): - Allow NULL here too. This definitly fixes #103559 - -2003-01-23 Johan Dahlin - - * gtk/gtkmodule.c (init_gtk): Added a timeout that calls - python_do_pending_calls every 100 ms. - (python_do_pending_calls): Call PyErr_CheckSignals, so Ctrl-C - works as expected inside of gtk_main(). Fixes #72333 - -2003-01-21 Johan Dahlin - - * dsextras.py (Template.generate): Import codegen here instead, - needs to be fixed in the future though. - - * Makefile.am (EXTRA_DIST): Added dsextras.py - - * gobjectmodule.c: Add GMainContext bindings and complete the - GMainLoop bindings. Fixes #102362. - - * dsextras.py: Splitted out from setup.py. It should be reusable - for gnome-python and other extensions that uses pygtk. - Fixes #103615 - - * gtk/gtk.override (quit_handler_marshal): Added to here, was - generated before. This version handle threads better. Patch from - John Finlay, Fixes #103851. - -2003-01-20 Johan Dahlin - - * gtk/gdk.override (_wrap_gdk_event_tp_getattr): Added correct - __members__ to all different kind of GdkEvent's. This fixes the - dir() output, also reported as #103979 - -2003-01-19 Johan Dahlin - - * pygtk.py (_get_available_versions): Check if a directory is - empty before adding it to the path. Also added a few comments. - Fixes #103876 (Ross Burton). - -2003-01-18 Johan Dahlin - - * gtk/gtk.defs (drag_source_set_icon, set_from_pixmap): Null is - okay here. Fixes #103559 (John Finlay) - - * gtk/gtk.defs (begins_tag, ends_tag, toggles_tag): Add default - values. Fixes #103443 (John Finlay) - - * gtk/gdk.defs (bitmap_create_from_data): Change data parameter - from const-gchar to const-guchar. Fixes #103616 (Eddie Kohler) - - * setup.py: use os.path.join in a few more places - - * pygobject-private.h: Add PyGMainLoop struct and type - - * gobjectmodule.c (_wrap_g_main_loop_new, _wrap_g_main_loop_quit) - (_wrap_g_main_loop_is_running, _wrap_g_main_loop_run): Added - GMainLoop wrapper. - (initgobject): Register wrapper in gobject.MainLoop - - * setup.py: Check for the python version - (Template.generate): Use codegen directly instead of os.system() - -2003-01-17 Jon Trowbridge - - * pygobject.c (pygobject_dealloc): In my fix for bug #102756 on - 2003-01-08, I should have used calls to pyg_unblock_threads()/ - pyg_block_threads() instead of directly calling the - Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS macros. The macros - don't update our local thread lock counts, causing problems in - cases where the finalization of one object triggers the - finalization of another. (When I say "problems", I of course mean - "horrible crashes".) - - * gtk/gtk-types.c (pygtk_style_helper_dealloc, - pygtk_style_helper_setitem, pygtk_tree_model_row_dealloc, - pygtk_tree_model_row_iter_dealloc): See above. - -2003-01-16 Johan Dahlin - - * gtk/libglade.override (connect_many) Use PyObject_GetAttrString - as a fallback. Remove warning. - (_wrap_glade_xml_signal_autoconnect): Don't limit to PyDict_Type. - -2002-01-09 Joe Shaw - - * gtk/gtk.override (_wrap_gtk_icon_size_lookup): Wrap. The width - and height are returned as a tuple. - -2003-01-09 Joe Shaw - - * gtk/gtk.override (_wrap_gtk_file_selection_get_selections): - Added. Wraps the gtk_file_selection_get_selections() call which - has a gchar ** return type, so it wasn't being wrapped. - -2003-01-08 Johan Dahlin - - * setup.py: Make building with threading work (again). - -2003-01-08 Jon Trowbridge - - * pygobject.c (pygobject_dealloc): Wrap - Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS around the call to - g_object_unref. We need to do this because the object finalizers - might trigger other code that has to acquire the interpreter lock, - causing a deadlock. Fixes #102756. - - * gtk/gtk-types.c (pygtk_style_helper_dealloc): Wrap the call to - g_object_unref in Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS. - This should let us avoid other instances of bug #102756. - (pygtk_style_helper_setitem): Ditto. - (pygtk_tree_model_row_dealloc): Ditto. - (pygtk_tree_model_row_iter_dealloc): Ditto. - - * gtk/gdk.override (pygdk_unblock_threads, pygdk_unblock_threads): - Restored David I Lehn's patch (#98380). His patch was fine --- - it just caused bug #102756 to emerge. - -2003-01-07 Johan Dahlin - - * pygtk.py (_get_available_versions): Rewrite using glob.glob, - with python2.2 glob uses fnmatch.filter with is an optimized - version of what we did before. _get_available_versions is now - roughly 5 times faster. - - * gtk/gdk.override (pygdk_block_threads, pygdk_unblock_threads): - Reverted patch from David I Lehn (#98380) since it caused troubles - for other people. - - * gtk/gtk.defs (gtk_text_tag_new): Add default paramter. - - * pangomodule.c (initpango): Added SCALE_* constants, patch by - John Finlay, fixes #102731. - - * gtk/gtk.override (_wrap_gtk_text_buffer_create_tag): Modify to - accept keyword parameters, largely based upon patch by John - Finlay, fixes #102628 - - * gtk/gtk.defs (GtkTextBuffer.get_slice): default last parameter - to TRUE. #102607 - (GtkTextBuffer.get_text): ditto. #102607 - (GtkTextBuffer.create_mark): Default last param. to FALSE. #102627 - - * setup.py, MANIFEST.in: Added distutils support - - * Makefile.am (EXTRA_DIST): Added setup.py and MANIFEST.in here. - - * .cvsignore: Add build/dist/MANIFEST here - -2003-01-06 Jon Trowbridge - - * gtk/pygtktreemodel.c (pygtk_generic_tree_model_get_path): - pyg_unblock_threads was being called twice. - -2003-01-05 Johan Dahlin - - * gtk/libglade.override: protect config.h by an ifdef. - -2003-01-01 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_text_buffer_insert_at_cursor) - (_wrap_gtk_text_buffer_insert_at_cursor) - (_wrap_gtk_text_buffer_insert_interactive) - (_wrap_gtk_text_buffer_insert_interactive_at_cursor): Wrap, so you - don't have to specify the length of the string. For - consistency. (It's not slower since Python does always store the - length inside the PyStringObject struct). Patch (mostly) by - John Finlay, fixes #102186. - (_wrap_gtk_text_buffer_get_selection_bounds): Remove unused - keyword argument and not up-to-date comment. - - * gtk/gtk.defs (GtkTreeView.scroll_to_cell): Add default values. - - * gtk/gtk.override (_wrap_gtk_tree_selection_get_selected): Check - the mode before calling gtk_tree_selection_get_selected, this - avoids an abort() in gtk+. - - * pygtk.py: Updated to fix #102180, so .require() can be called - twice and won't do anything the second time (eg, not raise an - error) based upon patch by warner-gnome.bugzilla@lothar.com - -2002-12-29 Johan Dahlin - - * gtk/gtk.defs (set_cursor): Set default parameters. - -2002-12-28 Johan Dahlin - - * gobjectmodule.c, gtk/gtk.override, gtk/pygtkcellrenderer.c, - gtk/pygtktreemodel: Improve threading support by adding - pyg_thread_block/unblock around all PyObject_Call* and - g_object_refs. - Based upon patch by Jon Trowbridge. Fixes #99102. - - * gtk/gdk-types.defs (ColorSpace): Add. - - * gtk/gdk.defs (GdkRectangle.intersect, GdkRectangle.union, - gdk.atom_intern): Add - - * gtk/gdk.override (_wrap_gdk_rectangle_intersect): Impl. - (_wrap_gdk_rectangle_union): Impl. (doesn't follow the GDK api to - 100%, but this is much nicer from a python point of view) - -2002-12-28 Jeremy Katz - - * codegen/codegen.py - (GObjectWrapper.get_initial_constructor_substdict): - GtkInvisible is a toplevel like GtkWindow and needs to be handled - similarly for reference counting. - -2002-12-28 Johan Dahlin - - * gtk/gtk.defs: Added -1 as default to second parameter, patch by - John Finlay, fixes #102083. - -2002-12-28 James Henstridge - - * gtk/gtk.override (_wrap_gtk_text_buffer_set_text): get rid of - len argument all together. The first argument knows its length. - -2002-12-27 James Henstridge - - * NEWS: add news items. - - * gtk/__init__.py: if True and False constants don't exist in - __builtins__, add them. This way I can rely on them existing. - Define gtk.TRUE and gtk.FALSE to True and False. - (input_add_full): add extra compatibility name. - - * configure.in: increment version number. - -2002-12-26 James Henstridge - - * gtk/pygtktreemodel.c (pygtk_generic_tree_model_get_path): this - should have been calling on_get_path(), rather than - on_get_tree_path(). - -2002-12-25 James Henstridge - - * gtk/gtk.defs (GtkStyle.copy): caller owns return. - (GtkRcStyle.copy): same. - (GtkIconSet.copy): same. - (GtkIconSource.copy): same. - (GtkSelectionData.copy): same. - (GtkStockItem.copy): same. - (GtkBorder.copy): same. - (GtkTextIter.copy): same. - (GtkTextAttributes.copy): same. - (GtkTreePath.copy): same. - (GtkTreeIter.copy): same. - (GtkRequisition.copy): same. - - * gtk/gtk.override (_wrap_gtk_layout_get_size): don't return NULL - if user asks to register zero stock items. - -2002-12-24 James Henstridge - - * pygobject.c (pygobject_init): add abstract type check here too. - (pygobject_init): make this code more similar to pyg_object_new, - so that it is easier to fix bugs in the future. - (pygobject_chain_from_overridden): check if - g_signal_get_invocation_hint() returns NULL. - - * gobjectmodule.c (pyg_object_new): handle case of no keyword - arguments. - (pyg_object_new): refuse to instantiate an abstract type. - -2002-12-23 James Henstridge - - * autogen.sh (AUTOMAKE): use automake-1.7 in preference to 1.6. - - * configure.in (GLIB_LIBS): remove -export-dynamic from flags. - -2002-12-22 Johan Dahlin - - * gtk/gtk.override - (_wrap_gtk_text_view_get_location): Impl, - patch from John Finlay, fixes 101714. - (_wrap_gtk_text_view_get_line_at_y): Impl, - patch from John Finlay, fixes 101716. - (_wrap_gtk_text_view_get_line_yrange): Impl, - patch from John Finlay, fixes 101720. - (_wrap_gtk_text_view_get_iter_at_location): Impl, - patch from John Finlay, fixes 101722. - - * examples/pygtk-demo/demos/editable_cells.py: New demo. - * examples/pygtk-demo/pygtk-demo.py: Rearrange code a bit. - * examples/pygtk-demo/demos/*.py: Clean up a bit. - - * gtk/gtk.override - (_wrap_gtk_tree_view_insert_column_with_attributes): If the first - argument (position) is -1, the column will be inserted at the end - of the list, there for the new position will be columns - 1. If - the columns isn't 1, it will be inserted at the requested - position. This makes this function work again. - - -2002-12-19 Johan Dahlin - - * gtk/gdk.override: Integrate patch by David I. Lehn, improves - threading support, fixes #98380. - -2002-12-18 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_text_buffer_get_selection_bounds): - Impl, based upon patch by John Finlay, fixes #101499. - (_wrap_gtk_text_view_get_visible_rect): Impl, patch by John - Finlay, fixes #101503. - (_wrap_gtk_tree_view_get_visible_rect): Impl, patch by John - Finlay, fixes #101505. - (_wrap_gtk_tree_view_column_cell_get_size): Impl. - -2002-12-17 Johan Dahlin - - * gtk/gtk.defs (gtk_text_buffer_new): Add (default "NULL"), fixed - #101490 (John Finlay). - - * gtk/gtk.override: ignore gtk_text_view_new. - - * gtk/gtk.defs (gtk_text_view_new_with_buffer): Add null-ok. - Fixes #101489 (John Finlay). - -2002-12-11 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_tree_view_get_cursor): Make the - return value a bit more intelligent and only return what's requested. - (_wrap_gtk_tree_view_get_cursor): Another try, this time, don't - take any input arguments, always return a tuple with two items - (which could be None) - (_wrap_gtk_text_buffer_create_tag): Check if the tag exists before - inserting into the tag table. Fixes #100668. - -2002-12-10 Johan Dahlin - - * pango.defs (pango_tab_array_new): Add, and make constructor of - PangoTabArray. - -2002-12-08 Johan Dahlin - - * gtk/__init__.py (threads_enter): point to gdk.threads_leave, not - gdk.threads_enter! Fixes #100623. Thanks Jon Trowbridge. - - * gtk/gdk.override (_wrap_gdk_event_get_axis): Don't raise an - exception when leaving this function, instead look in - _PyGdkEvent_methods. (which raises an exception if it's not found) - (_wrap_gdk_event_get_axis, _wrap_gdk_event_get_coords) - (_wrap_gdk_event_get_root_coords): Impl. - -2002-12-05 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_tree_selection_get_selected): - Impl. Fixes #100389. - -2002-12-05 James Henstridge - - * gtk/gtk.defs (create_pango_context): caller owns return. - (create_pango_layout): caller owns return. - -2002-12-04 Johan Dahlin - - * pygtk.py (_get_available_versions): s/os.path.exists/os.path.isdir/ - - * gtk/gtk.override (_wrap_gtk_tree_store_set) - (_wrap_gtk_tree_store_new, _wrap_gtk_list_store_new) - (_wrap_gtk_list_store_set): Do an extra check for the number of - arguments. Fixes #100349 - - * pygtk-2.0.pc.in (Requires): Added gobject-2.0. Fixes #97727 - - * gtk/gtk.override (_wrap_gtk_tree_view_get_cursor): Impl. Fixes - #100077 (Dave Cook) - (_wrap_gtk_tree_model_iter_nth_child): Allow argument to be None, - fixes #99787. Thanks to Rob Melby for patch. - - * gtk/gdk.defs (keyval_name): add caller-owns-returns false, this - prevents the code generator from freeing the return value. Fixes - #100103 (Dave Cook) - - * gtk/gtk.override (_wrap_gtk_tree_view_get_cell_area) - (_wrap_gtk_tree_view_get_cell_area) - (_wrap_gtk_tree_view_get_background_area): Impl. Fixes #100301 (Dave Cook) - - * gtk/gtk.override (_wrap_gtk_tree_view_widget_to_tree_coords) - (_wrap_gtk_tree_view_tree_to_widget_coords): Impl. Fixes #100302 (Dave Cook) - -2002-12-02 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_tooltips__get_tips_data_list): Impl. - (_wrap_gtk_tooltips__get_tips_data_list): - -2002-11-28 Johan Dahlin - - * pygtk.py (_get_available_versions): If the directory doesn't - exist skip it. If not, it breaks when doing os.listdir. - -2002-11-24 James Henstridge - - * gtk/gtk.override (_wrap_gtk_tree_model_tp_getitem): allow you to - get a row object from a TreeIter as model[iter]. - - * gtk/gtk-types.c (pygtk_tree_model_row_get_iter): allow getting - an iter from a treemodel row object. - - * gtk/gdk.override (_wrap_gdk_pixmap_create_from_xpm_d): fix up - ParseTuple call arguments (bug 99400). - - * gtk/gtk.defs (create_mark): allow None to be passed for - mark_name argument (bug 99391). - -2002-11-20 Joe Shaw - - * gtk.override (_wrap_gtk_menu_attach_to_widget): Added. Fixes - #97963. - - * pygtktreemodel.c: Add wrap all calls to PyObject_CallMethod() in - pyg_block_threads() and pyg_unblock_threads(). Fixes #98344. - -2002-11-20 James Henstridge - - * codegen/argtypes.py (PyObjectArg): arg matcher for "PyObject*" - args, from bug #98822. - -2002-11-19 James Henstridge - - * gtk/libglade.override (_wrap_glade_xml_get_widget_prefix): add - wrapper. - - * gtk/gtkobject-support.c: get rid of pyg_handler_marshal and - pyg_input_marshal, which were the last bits of code using the old - GtkArg APIs in gtk. - - * gtk/gtk.override: remove wrappers for gtk_idle_add, - gtk_timeout_add and gtk_input_add. - (_wrap_gtk_quit_add): change so that it doesn't use - pyg_handler_marshal. - - * gtk/__init__.py: set the TRUE and FALSE constants to True and - False if possible. Fall back to 0/1 otherwise. - (*): bind idle, timeout and input functions to gobject equivalents. - - * gobjectmodule.c (get_handler_priority): helper function to get - priority value as a keyword argument. - (pyg_idle_add): convert priority arg to an optional keyword - argument. - (pyg_timeout_add): and here. - (pyg_io_add_watch): and here. - -2002-11-18 James Henstridge - - * gobjectmodule.c (pyg_idle_add): add a wrapper for g_idle_add. - (pyg_timeout_add): and a wrapper for g_timeout_add. - (pyg_io_add_watch): and a wrapper for g_io_add_watch. - (initgobject): add constants. - -2002-11-16 James Henstridge - - * pygobject.c (pygobject_connect_object): set up closure - correctly. Fix from bug #96922. - (pygobject_connect_object_after): and here. - - * gtk/gtk.override (_wrap_gtk_text_view_buffer_to_window_coords): - (_wrap_gtk_text_view_window_to_buffer_coords): wrap functions. - - * pango.override: fix up calls to pyg_enum_get_value() so that it - doesn't throw an exception when it shouldn't. - (_wrap_pango_layout_get_pixel_extents): call get_pixel_extents() - like it is supposed to. Fixes bug #93569. - - * pygtype.c (pyg_value_from_pyobject): if python object is None, - set GValue to NULL for boxed, pointer and GObject types. - (pyg_value_as_pyobject): convert G_TYPE_POINTER values to - gobject.GPointer python objects. - (pyg_value_as_pyobject): when converting G_TYPE_BOOLEAN values to - python objects, return one of Py_True or Py_False, so that Python - 2.3 will return an instance of bool. - - From patch on bug #96950 - - * gtk/gdk.override (_wrap_gdk_pixbuf_save): wrapper for - GdkPixbuf.save() - - * codegen/argtypes.py (GdkRectanglePtrArg.write_param): handle - GdkRectangle args with (null-ok) set. - - * gtk/gtk.defs (gtk.Style.paint_*): allow passing None for area, - widget and detail arguments. - - * codegen/docgen.py (DocbookDocWriter.write_method): wrap - in a element. - (DocbookDocWriter.write_constructor): same here. - (DocbookDocWriter.write_params): wrap parameter description in a - element to conform to docbook DTD better. - (DocbookDocWriter.write_params): add colon to end of terms, like - in gtk-doc output. - - * docs/pygtk-docs.xsl: small changes to produce output more - similar to new gtk-doc output. - -2002-11-15 James Henstridge - - * pango.defs (PangoContext.get_metrics): caller owns return value. - - * gtk/gtk.defs (GtkEntry.set_position): remove function, as it is - deprecated and shadows the recommended API. - -2002-11-11 Johan Dahlin - - * gtk/gtk.override: Ignore gtk_entry_select_region (It's deprecated, - gtk_editable_select_region should be used instead). thanks - Lars Wirzenius. - -2002-11-06 James Henstridge - - * codegen/argtypes.py (BoolArg.write_return): add bool arg that - returns Py_True or Py_False (which are instances of the boolean - type in Python 2.3). Partial fix for bug 95372. - -2002-11-04 Joe Shaw - - * gtk/pygtkcellrenderer.c (pygtk_generic_cell_renderer_get_size): - Prevent NULL dereference by passing in local variables to - PyArg_ParseTuple instead of our function arguments. - -2002-10-17 Johan Dahlin - - * gtk/gtk.override: s/arg/argument/ in exception strings. - (_wrap_gtk_box_query_child_packing): Use O! + PyGtkWidget_Type to - PyArg_ParseTuple... and check so child actually is a child, to - prevent returning uninitialized variables. - -2002-10-16 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_container_child_set_property) - (_wrap_gtk_container_child_get_property) - (_wrap_gtk_container_child_set) - (_wrap_gtk_container_child_get) - (_wrap_gtk_container_add_with_properties) - (_wrap_gtk_container_foreach): Impl. - -2002-09-05 Matt Wilson - - * gtk/gdk.defs (get_from_drawable): GdkPixbuf.get_from_drawable - doesn't actually leak pixbuf, remove caller-owns-return. - -2002-09-02 Matt Wilson - - * gtk/gdk.defs (get_from_drawable, copy, add_alpha, scale_simple - composite_color_simple): more caller-owns-return. - -2002-08-31 James Henstridge - - * codegen/docgen.py (DocbookDocWriter.write_params): separate out - the code that writes the variable list. - -2002-08-30 Sander Vesik - - * autogen.sh: use automake-1.6/aclocal-1.6 unless otherwise - requested - -2002-08-30 Matt Wilson - - * gtk/gdk.defs (pixbuf_new_from_file, pixbuf_new_from_data - pixbuf_new_from_xpm_data, pixbuf_new_from_inline): - caller-owns-return, to avoid leaking pixbufs - -2002-08-26 Joe Shaw - - * codegen/argtypes.py: Add gsize and gssize as valid integer - types. - -2002-08-26 James Henstridge - - * codegen/docgen.py (DocWriter.write_full_hierarchy): fix up - misspelling. - - * pygtype.c (pyg_value_from_pyobject): fix typo from when I was - applying Thomas's patch. - - * codegen/docgen.py (build_object_tree): show interfaces, boxes - and pointers in class heirachy. - (DocbookDocWriter.write_synopsis): show parent class for - interfaces, boxes and pointers in class synopsis. - - * gtk/gtk-types.defs (CellEditable): CellEditable is an interface, - not a GObject. - -2002-08-25 James Henstridge - - * codegen/docgen.py: lots of docbuild updates. - - * docs/pygtk-docs.xml: add driver file. - - * docs/build-docs.py: move file to docs directory. - - * NEWS: update news file. - - * configure.in: increment version number. - -2002-08-24 James Henstridge - - mingw32 patches from Cedric Gustin : - - * gtk/gtk.override: ignore more socket/plug functions on win32. - - * gtk/gdk.override: gdk_pixmap_lookup is not implemented on win32. - - * gtk/Makefile.am (common_ldflags): and here. - - * pango.override (PyPangoAttribute_Type): initialise tp_alloc and - tp_new in the init() function, rather than in the structure - definition itself. - - * Makefile.am (common_ldflags): pass -no-undefined if we are on - windows. - - * configure.in: turn on win32 DLL support, and add OS_WIN32 and - PLATFORM_WIN32 conditionals for use in makefiles. - -2002-08-21 Jon K Hellan - - * codegen/argtypes.py (arg): More char* variants. - -2002-08-20 James Henstridge - - * gtk/gdk.defs (gtk.gdk.Window.set_title): fix up typo. - -2002-08-20 Johan Dahlin - - Patch from Arjan J. Molenaar: - * gobjectmodule.c (pyg_type_register): Don't unref borrowed - references. - -2002-08-19 James Henstridge - - * codegen/codegen.py - (GObjectWrapper.get_initial_constructor_substdict): fix small - typo. - - * gtk/gtk.override (_wrap_gtk_dialog_new_with_buttons): ref the - widget after constructing it. - (_wrap_gtk_message_dialog_new): same here. - - * codegen/codegen.py - (GObjectWrapper.get_initial_constructor_substdict): add special - case code to ref() GtkWindow instances in their constructor, as we - don't own the initial reference (it is managed internally by - gtk+). This fixes bug #90213. - -2002-08-18 James Henstridge - - * pygtk.spec.in: update spec file. - - * gtk/Makefile.am: same here. - - * Makefile.am: install in a gtk-2.0 subdir of site-packages. - - * pygtk.py: new file to help with pygtk version parallel install. - - * gobjectmodule.c (pyg_object_set_property): unref object_wrapper. - (pyg_object_get_property): unref object_wrapper. (from patch by - Arjan Molenaar on bug #71021). - - * gtk/gtk.defs (TreeView.set_cursor): allow column to be None - (fixes bug #91043). - - * codegen/argtypes.py (ObjectArg.write_return): fix up generated - code. - - * gtk/gtk.override (_wrap_gtk_clist_new_with_titles): don't need - to manually sink. - (_wrap_gtk_tree_view_column_new): same here. - (_wrap_gtk_button_new): same here. - (_wrap_gtk_toggle_button_new): same here. - (_wrap_gtk_check_button_new): same here. - (_wrap_gtk_radio_button_new): same here. - (_wrap_gtk_list_item_new): same here. - (_wrap_gtk_menu_item_new): same here. - (_wrap_gtk_check_menu_item_new): same here. - (_wrap_gtk_radio_menu_item_new): same here. - (_wrap_gtk_image_menu_item_new): same here. - (_wrap_gtk_ctree_new_with_titles): same here. - (_wrap_gtk_dialog_new_with_buttons): same here. - (_wrap_gtk_message_dialog_new): same here. - (_wrap_gtk_progress_bar_new_with_adjustment): same here. - - * gtk/gtkmodule.c (sink_gtkobject): function to sink a GtkObject - if it is floating. - (init_gtk): register sink_gtkobject for sinking GtkObjects. - - * codegen/codegen.py - (GObjectWrapper.get_initial_constructor_substdict): get rid of - gtkobjectsink bit of code. - - * pygobject.c (pygobject_register_sinkfunc): new function to - register a function to get rid of the floating reference from an - object. - (sink_object): run a sinkfunc for an object if it has been - registered. - (pygobject_new): call sink_object - (pygobject_register_wrapper): call sink_object. - -Sat Aug 17 20:02:43 2002 Jonathan Blandford - - * codegen/argtypes.py (TimeTArg.write_param): Add a time_t - parameter type. - -2002-08-17 James Henstridge - - * pygtype.c (pyg_value_from_pyobject): allow None when converting - to string GValue (bug picked up by Thomas Leonard. - - * gtk/gtk.defs (scroll_to_cell): allow column to be None (bug #90398). - -2002-08-16 Johan Dahlin - - * gtk/gdk.defs: Add null-ok to GdkWindow.set_cursor. - Fixes #88463. - -2002-07-23 James Henstridge - - * configure.in: updated version number. - -2002-07-20 James Henstridge - - * gtk/pygtkcellrenderer.c (pygtk_generic_cell_renderer_*): fix up - arguments, and use "O" format code for PyObject_CallMethod -- - can't rely on "N" causing the argument to be unrefed. - - * gtk/gtk.override (_wrap_gtk_cell_renderer_get_size): cell_area - is an argument; not a return. - - * gtk/gtk.override (GtkTreeModel.tp_as_number): add nonzero method - to tree models, so that they evaluate to a truth value even if - they have zero elements. (at request of msw). - - * gtk/gtk-extrafuncs.defs, gtk/gtk.override: add GenericCellRenderer. - - * gtk/pygtkcellrenderer.[ch]: add "generic" cell renderer code, - based on jrb's work. - -2002-07-18 James Henstridge - - * gtk/Makefile.am (glademodule_la_LDFLAGS): fix up - -export-symbols-regex flag. - (glmodule_la_LDFLAGS): same here. - -2002-07-15 James Henstridge - - * gtk/gtk-types.c (pygtk_tree_model_row_getsets): add next, - parent, model and path attributes to row objects. - (pygtk_tree_model_row_methods): add an iterchildren() method to - row objects. - - * gtk/gtk.override (pygtk_register_classes): rather than #defines, - set the tp_as_mapping and tp_iter members of GtkListStore, etc in - the init func. - - * gtk/gtk.override (_wrap_gtk_list_store_tp_iter): iter(liststore) - returns a gtk.TreeModelRowIter object. - - * gtk/gtk-types.c (PyGtkTreeModelRowIter_Type): new iterator type - that returns a sequence of gtk.TreeModelRow objects for nodes - under a particular parent node. - -2002-07-13 James Henstridge - - * gtk/gtk.override (GtkListStore.tp_as_mapping): explicitly define - this, as PyType_Ready doesn't seem to inherit special methods from - secondary bases correctly. - (GtkTreeStore.tp_as_mapping): same here. - - * gtk/gtk-types.c (PyGdkRectangle_to_value): fix up argument - ordering bug. - - * gtk/gtk.override (_wrap_gtk_tree_model_tp_as_mapping): move - these mapping behaviours to the GtkTreeModel wrapper. - - * gtk/gtk-types.c (PyGtkTreeModelRow_Type): rename from - GtkListStoreRow, and extend so that it can handle setting cells - for tree stores. - - * build-docs.py (dg): parse template dirs for additional - documentation. - - * codegen/docgen.py (DocWriter.add_tmpldirs): add function to - extract docs in the tmpl files. - - * gtk/gtk.override (_wrap_gtk_list_store_tp_getitem): allow - subscripting of a GtkListStore to get row wrappers. - (_wrap_gtk_tree_model_get_iter_from_string): add override. - - * gtk/gtk-types.c: add PyGtkListStoreRow type, that represents a - row in a list store. - (_pygtk_register_boxed_types): set the ob_type member. - -2002-07-12 James Henstridge - - These changes help with win32 compat. - - * pygboxed.c (PyGBoxed_Type): set tp_alloc and tp_new to NULL. - (PyGPointer_Type): same here. - - * gobjectmodule.c (PyGInterface_Type): set tp_alloc and tp_new to - NULL. - (initgobject): set tp_new and tp_alloc for various types. - - * pygobject.c (PyGObject_Type): set tp_alloc and tp_new to NULL. - -2002-07-10 Murray Cumming - - * codegen/docextract_to_xml.py: Used jamesh's new extract_tmpl() - function to get the sgml tmpl files. This file is only used by - gtkmm at the moment, not pygtk itself. - -2002-07-10 James Henstridge - - * configure.in: increment version number to 1.99.11. - - * codegen/argtypes.py (GdkNativeWindow): add arg type. This one - also from Thomas Leonard. - - * gtk/gtk.defs (set_tip): allow tip_private to be NULL, and allow - it to be omitted. Fix suggested by Thomas Leonard - - - * gtk/gtkmodule.c (init_gtk): make sure LC_NUMERIC is set to C - after gtk_init_check(). - - * codegen/h2def.py (clean_func): apply patch by David Lehn - to correctly handle multi-line preprocessor - macros. From bug #81771. - (write_func): apply patch by Arjan Molenaar to write out - is-constructor-of lines for function definitions that look like - they might be constructors (doesn't catch every case, but is - better than nothing). From bug #80914. - -2002-07-09 James Henstridge - - * codegen/docextract.py (extract_tmpl): function to extract docs - from gtk-doc 'tmpl' files. Takes a list of tmpl/ directories as - an argument. Doesn't recurse. Fixes bug 86860. - - Reworking of Arjan Molenaar's (arjanmolenaar@hetnet.nl) patch from - bug 71435. - - * gtk/libglade.override (connect_one): watch the closure. - (connect_many): watch the closure. - - * gtk/gtk.override (_wrap_gtk_toolbar_append_item): watch closure - for signal. - (_wrap_gtk_toolbar_prepend_item): same here. - (_wrap_gtk_toolbar_insert_item): same here. - (_wrap_gtk_toolbar_insert_stock): same here. - (_wrap_gtk_toolbar_append_element): same here. - (_wrap_gtk_toolbar_prepend_element): same here. - (_wrap_gtk_toolbar_insert_element): same here. - - * pygobject.h (_PyGObject_Functions): add pygobject_watch_closure - to the list of exported functions. - - * pygobject.c (pygobject_watch_closure): new function to watch a - closure. We perform cyclic garbage collection on watched - closures. The closure will automatically be unwatched when it - gets invalidated. - (pygobject_traverse): traverse watched closures as well. - (pygobject_clear): invalidate all watched closures - (pygobject_dealloc): invalidate watched closures on dealloc too. - (PyGObject_Type): register the invalidate handler. - (pygobject_connect): watch the closure we connect here. - (pygobject_connect_after): same here.. - (pygobject_connect_object): same here. - (pygobject_connect_object_after): same here. - - * pygtype.c (pyg_closure_new): clean up closure on invalidate, - rather than finalize (on invalidate, we break references). - - * pygobject.h (PyGObject): add closures member to store references - to PyGClosures. - - - * gtk/gtk.override (_wrap_gtk_tree_model_iter_next): change so - that it returns the next item, rather than modifying the iter. - (_wrap_gtk_tree_model_iter_parent): add wrapper, so that we return - the parent iter. - (_wrap_gtk_tree_model_iter_nth_child): add wrapper. - -2002-07-08 James Henstridge - - * codegen/docextract.py (parse_tmpl): fix up simple loading of - tmpl files. - - * pygobject.c (pygobject_connect): apply another memory leak fix - from Arjan (from bug #87413). - (pygobject_connect_after): equivalent fix here. - (pygobject_connect_object): and here. - (pygobject_connect_object_after): and here. - - * gtk/gtk-types.c (PyGdkRectangle_to_value): add custom boxed - handlers for GDK_TYPE_RECTANGLE, so that 4-sequences can - automatically be marshaled to GdkRectangle values. - -2002-07-07 James Henstridge - - * pygobject.c (pygobject_get_refcount): add __grefcount__ property. - - * gtk/gdk.override (_wrap_gdk_event_tp_getattr): return a boxed - type for gdk.Event.area for expose events. - - * gtk/gtk.override (_wrap_gtk_widget_intersect): use - pygdk_rectangle_from_pyobject. - - * codegen/argtypes.py (arg): register GdkRectanglePtrArg handler - for "GtkAllocation*". - - * gtk/gtk.override (_wrap_gtk_paint_polygon): use - pygdk_rectangle_from_pyboejct to read rectangle argument. - (_wrap_gtk_widget_draw): remove overrides. Should be handled by - code generator. - (_wrap_gtk_widget_size_allocate): remove this override too. - - * codegen/argtypes.py (GtkTreePathArg.write_return): update to use - this function. - (ArgMatcher.register_boxed): short circuit if there is already a - handler for the boxed type (helps with setting custom handlers for - boxed types). - - * gtk/gtk-types.c (pygdk_rectangle_from_pyobject): new function to - parse a GdkRectangle from a PyObject. - - * gtk/pygtktreemodel.c (pygtk_generic_tree_model_get_path): print - a warning if the return value could not be converted to a - GtkTreePath. - - * gtk/gtk.override (_wrap_gtk_tree_model_get_value): don't assume - tree paths are tuples. - - * codegen/argtypes.py (GtkTreePathArg.write_param): fix up code - generator to get rid of assumption that tree paths are tuples, and - catch case where pygtk_tree_path_from_pyobject() returns NULL. - - * gtk/gtk-types.c (pygtk_tree_path_from_pyobject): change so that - we treat an integer PyObject as a tree path with a single index. - - * pygtype.c (pyg_closure_marshal): apply patch from Arjan Molenaar - that fixes a reference leak for the - argument tuple passed to the callback. - (pyg_signal_class_closure_marshal): apply similar fix here. - -Thu Jul 4 10:58:51 2002 Jonathan Blandford - - * gtk/gtk-types.defs (TreeModelSort): We also implement - GtkTreeSortable. - - * gtk/gtk.defs (gtk_tree_model_sort_new_with_model): get the right - is-constructor-of value. - -2002-06-30 James Henstridge - - * gtk/gtk.override (pygtk_menu_position): fix up menu position - func (fixes bug #85994). - -2002-06-27 James Henstridge - - * gtk/gtk.defs (check_version): caller does _not_ own the returned - string. Bug found by Anders Carlsson. - -2002-06-24 James Henstridge - - * gtk/gtk.defs (drag_source_set_icon_pixbuf): fix definition, as - reported by Thomas Leonard - -Sun Jun 23 11:10:30 2002 Jonathan Blandford - - * pygboxed.c: Add GBoxed::copy - - * pygobject.c (pygobject_init): take kwargs so we can pass - construct-only arguments to our initialization function. - -2002-06-23 James Henstridge - - * examples/simple/scribble.py: update example to work with current - PyGTK. - - * gtk/gtk.override (_wrap_gtk_tree_sortable_get_sort_column_id): - copy boxed arguments. - - * pygobject.h: fix up prototypes. - - * gobjectmodule.c (pyg_object_set_property): copy boxed arguments. - - * pygobject.c (pygobject_get_property): copy boxed arguments here. - (pygobject_emit): same here. - (pygobject_chain_from_overridden): same here. - - * pygtype.c (pyg_value_as_pyobject): add "copy_boxed" argument to - this function. - (pyg_closure_marshal): pass FALSE for copy_boxed argument. - (pyg_signal_class_closure_marshal): same here. - -2002-06-19 Matt Wilson - - * gtk/gtk.override (_wrap_gtk_ctree_insert_node): check the - correct value when setting the sibling. Patch from Tim Waugh - - -2002-06-18 Matt Wilson - - * gtk/gtk.override (_wrap_gtk_tree_sortable_get_sort_column_id): - implement GtkTreeSortable.get_sort_column_id - -2002-06-18 James Henstridge - - * gtk/gtkgl.override (_wrap_gtk_gl_area_share_new): constructors - return ints. - - * gtk/gdk.override, gtk/gtk.override: ignore all _ref() or - _unref() functions. - - * codegen/argtypes.py (BoxedArg.write_return): fix up handling of - ownsreturn for Boxed return types. - -2002-06-17 Matt Wilson - - * pygtype.c (pyg_value_as_pyobject): if a value holds a PyObject*, - the code that is getting the value is expecting a valid object. - Translate NULL pointers to Py_None. - -2002-06-17 Johan Dahlin - - * pango.defs: added PangoLayout.set_text - -Mon Jun 17 09:52:45 2002 Jonathan Blandford - - * gtk/gtk-types.defs: Add GtkRequisition - * gtk/gtk.override: Add GtkRequisition - -2002-06-15 James Henstridge - - * gobjectmodule.c (pyg_error_check): decref the exception instance - after raising the error. - -Fri Jun 7 12:39:27 2002 Jonathan Blandford - - * gtk/gtk.override (pygtk_tree_selection_foreach_marshal): fix - GtkTreeSelection::get_selected() - -2002-06-09 James Henstridge - - * codegen/argtypes.py (BoxedArg.write_param): if the ptype is - different to self.typecode, cast the event - - * gtk/gdk-types.defs (EventExpose): remove definition, as it - breaks stuff. - -2002-06-04 Matt Wilson - - * gtk/gtk-extrafuncs.defs (set_all): add GtkAdjustment.set_all - - * gtk/gtk.override (_wrap_gtk_adjustment_set_all): implement, for - compatibility with PyGtk 0.6.x. Mark it as deprecated. - (_wrap_gtk_adjustment__set_value) - (_wrap_gtk_adjustment__set_lower) - (_wrap_gtk_adjustment__set_upper) - (_wrap_gtk_adjustment__set_step_increment) - (_wrap_gtk_adjustment__set_page_increment) - (_wrap_gtk_adjustment__set_page_size): implement setters for - GtkAdjustment.{value, lower, upper, step_increment, - page_increment, set_page_size} - -2002-06-03 Matt Wilson - - * gtk/gtk.override - (_wrap_gtk_tree_view_insert_column_with_attributes): implement - (code mostly from jrb@redhat.com, minor fixups from me) - - * gtk/gdk-types.defs (EventExpose): added to make the code - generator write GdkEventExpose * for - _wrap_gtk_container_propagate_expose (gets rid of a warning) - -2002-05-31 Matt Wilson - - * examples/pygtk-demo/demos/list_store.py (fixed_toggled): the - path argument must be a tuple. Ints are not automatically - converted to tuples any more. - - * pygtype.c (pyg_value_as_pyobject): change the behavior of - G_TYPE_UINT to match the code generator's output on 32 bit - systems. - -2002-05-19 James Henstridge - - * gtk/Makefile.am (pygtk_PYTHON): install compat.py - -2002-05-18 Matt Wilson - - * gtk/gtk.override (_wrap_gtk_editable_insert_text): add length - and pos as keywords, allow user to override the length of text to - be added (like other text insert functions) - -2002-05-16 James Henstridge - - * pygtype.c (pyg_value_from_pyobject): add support for - G_TYPE_INTERFACE, provided the interface has a prereq on - G_TYPE_OBJECT. - (pyg_value_as_pyobject): same here. - -2002-05-14 James Henstridge - - * pygtype.c (pyg_value_from_pyobject): add handler for - G_TYPE_PARAM (fix bug #81695). - (pyg_value_as_pyobject): same in this function. - - * codegen/argtypes.py (ULongArg): use 'O!' format code, so we can - reduce the size of the extra code we output. - (Int64Arg): add arg handler (to solve bug #81694). - (UInt64Arg): add arg handler (bug #81694 again). - (ObjectArg.write_param): simplify output code using O! code for - the normal and default value cases. - -2002-05-13 James Henstridge - - * configure.in: increment version number. - - * codegen/definitions.py (MethodDef.__init__): skip the - caller_owns_return bit if no return value clause given. - (FunctionDef.__init__): same here. - -2002-05-12 James Henstridge - - * codegen/argtypes.py (ObjectArg.write_return): add handler for - ownsreturn case for GObjects. - (BoxedArg.write_return): and for boxed types ... - (GtkTreePathArg.write_return): handle ownsreturn. - -2002-05-10 James Henstridge - - * codegen/argtypes.py (StringArg.write_return): make this handler - actually look at the ownsreturn argument. This fixes a crasher - when reading string type attributes (it was freeing the struct - member!). - -2002-05-09 James Henstridge - - * gtk/gtkgl.defs: get rid of gtk_gl and gdk_gl prefix on some - functions. - - * codegen/codegen.py (Wrapper.write_function_wrapper): pass - caller_owns_return as argument to write_return. - (Wrapper.write_getsets): add extra arg to write_return() call. - - * codegen/argtypes.py (*.write_return): add an extra "ownsreturn" - argument to all write_return functions. - - * codegen/definitions.py (MethodDef.__init__): read a - caller_owns_return variable. It defaults to false if ommitted, - unless we have a string return. - (FunctionDef.__init__): same here, but also make - caller_owns_return true for constructors. - -2002-05-08 James Henstridge - - * gtk/gtk.override (_wrap_gtk_tree_model_get_value): fix typo. I - should test these things before committing. - -2002-05-05 James Henstridge - - * gtk/gtk.override (gtk_tree_sortable_set_sort_func): implement. - (gtk_tree_sortable_set_default_sort_func): implement. - - * gtk/compat.py: start of compatibility module. - - * gtk/gtk.override (_wrap_gtk_tree_model_foreach): fix up foreach - handler. - (_wrap_gtk_tree_model_get_iter): change to take a single argument - as the path, as discussed in bug 75811. - -2002-05-04 James Henstridge - - * Makefile.am (EXTRA_DIST): add extra files to dist (from bug - #79872). - - * gtk/gtk.defs (set_from_pixmap): allow NULL pointer passed for - mask. - - * gtk/gtk.override (pygtk_tree_foreach_marshal): pass model, path - and iter to the callback. - (_wrap_gtk_tree_model_foreach): implement. - -2002-04-29 Matt Wilson - - * codegen/argtypes.py (ULongArg): implemented an argtype to handle - guint32 (on 32 bit platformas) and gulong arguments such that - large values (>MAX_INT on 32 bit platforms) don't overflow. - -2002-04-25 Matt Wilson - - * gtk/gtk.defs (gtk_spin_button_new): s/gbutton/gdouble/ from Art Haas. - -2002-04-25 James Henstridge - - * codegen/argtypes.py (ArgMatcher.get): add hack to match - GdkEvent* and use the GdkEvent handler. - - * gtk/gtk.override (_wrap_gtk_text_iter_get_char): remove wrapper, - as arg type covers this case fine. - - * codegen/argtypes.py (GUniCharArg.write_return): add code for - handling gunichar returns. - (GUniCharArg.write_param): and support for gunichar parameters. - -2002-04-23 James Henstridge - - * gtk/gtk-types.c: remove old commented out GdkGC implementation. - -2002-04-22 James Henstridge - - * gtk/Makefile.am (EXTRA_DIST): same here. - - * Makefile.am (EXTRA_DIST): include windows make stuff. - - * gtk/gdk.override (_wrap_gdk_gc_tp_setattr): don't allow setting - attributes on GdkGC instances. Simplifies things a bit. - -2002-04-21 Hans Breuer - - * codegen/codegen.py : added parameter --errorfilename - to allow redirection of stderr even with clumsy windoze - shell - - * codegen/override.py : extended to allow 'sys.platform' - specific ignores - - * examples/pygtk-demo/demos/colorsel.py : use - color = gtk.gdk.color_parse("blue") - to get the initial color - - * examples/pygtk-demo/demos/draw.py : (new file) - demonstrating some simple drawing operations. It is - using the gtk.GC interface additions below. - - * gtk/gdk.override : implement GdkGC.tp_getattr, - GdkGC.tp_setattr and gdk_gc_set_dashes (ported from #if 0'ed - code in gtk/gtk-types.c (should be removed there ?) - - * gtk/gtk.override : ignore-win32 GTK_TYPE_PLUG - GTK_TYPE_SOCKET gtk_socket_new (the TYPE ignores do not work yet) - - * config.h.win32 makefile.msc pygtk/makefile.msc : - new files to build pygtk on windoze using the established - glib/build/win32 infrastructure - - * pygtk/gtk/gtk-fake-win32.c : (new file) implementing - gtk_plug_get_type() and gtk_socket_get_type(). It could - vanish if codegen/codegen.py has learned something like - 'ignore-class-$(sys.platform) or my GtkPlug/GtkSocket - patch gets accepted with Gtk. - - * gtk/gtkmodule.c : added a g_assert() to ensure importing - pygobject did work. - -2002-04-21 James Henstridge - - * gtk/gtk.override (_wrap_gtk_drag_dest_find_target): implement. - (_wrap_gtk_drag_dest_get_target_list): implement. - (_wrap_gtk_drag_dest_set_target_list): implement. - -2002-04-20 James Henstridge - - * gtk/gtk.override (_wrap_gtk_container_get_children): implement. - (_wrap_gtk_container_set_focus_chain): implement. - (_wrap_gtk_container_get_focus_chain): implement. - -2002-04-19 James Henstridge - - * gtk/gtk.override (_wrap_gtk_text_buffer_insert_with_tags): implement. - (_wrap_gtk_text_buffer_insert_with_tags_by_name): implement. - (_wrap_gtk_text_child_anchor_get_widgets): implement. - (_wrap_gtk_tree_view_column_get_cell_renderers): implement. - (_wrap_gtk_tree_view_column_set_attributes): implement. - -2002-04-18 James Henstridge - - * gtk/gtk.override (_wrap_gtk_selection_data_get_targets): implement. - (_wrap_gtk_tree_get_row_drag_data): implement. - (_wrap_gtk_im_context_get_preedit_string): implement. - (_wrap_gtk_im_context_filter_keypress): implement. - (_wrap_gtk_im_context_get_surrounding): implement. - (_wrap_gtk_paint_polygon): implement. - - * gtk/gtk-types.defs (CellEditable): add CellEditable interface. - - * codegen/h2def.py (strip_comments): add function to strip - comments, and get rest of script to use it. This one doesn't use - RE's, so it doesn't cause a stack overflow when parsing - atkobject.h. - - * gtk/libglade.defs (get_toplevel_names): remove def, as it isn't - in the libglade API anymore. - -2002-04-16 Matt Wilson - - * gtk/libglade.override (_wrap_glade_bindtextdomain): added - wrapper which will allow user to bind a textdomain. Also sets the - codeset to UTF-8 if bind_textdomain_codeset is available. - - * config.h.in: added HAVE_BIND_TEXTDOMAIN_CODESET - - * configure.in: check for bind_textdomain_codeset - - * gtk/libglade.defs (bindtextdomain): added extra function to - implement gtk.glade.bindtextdomain - - * gtk/gtk.override - (pygtk_cell_data_func_marshal, - _wrap_gtk_tree_view_column_set_cell_data_func): added wrapper for - GtkTreeViewColumn.set_cell_data_func from Jonathan Blandford - - -2002-04-17 James Henstridge - - * gtk/gtk.defs, gdk/gdk.defs: updates to match final gtk 2.0 APIs. - -2002-04-15 James Henstridge - - * pango.override: add a PangoAttribute wrapper type, constructors - for various attributes, and methods for inserting attributes in a - PangoAttrList. - - * pango.defs, gtk/gdk.defs: add missing definitions. - -2002-04-12 Xavier Ordoquy - - * configure.in: - * gtk/Makefile.am: - Added the gtk.gl module. - - * gtk/gtkgl.defs: - * gtk/gtkgl.override: - * gtk/gtkglmodule.c: (initgl): - Updated the gtkgl module and changed the name to gtk.gl - - * examples/gl/dots.py: - Updated example but still needs some work. - - * examples/gl/cone.py: - * examples/gl/gears.py: - Updated working examples. - -2002-04-10 James Henstridge - - * gtk/gtk.defs: remove deprecation messages for many GtkList and - GtkListItem methods, as they are still required for the non - deprecated GtkCombo. GtkList's constructor is still marked - deprecated. - - * gtk/gtk.override (_wrap_gtk_text_iter_get_char): don't raise an - exception for unicode chars > 0xffff if we have 32 bit unicode - chars in python. - -2002-04-08 James Henstridge - - * pango.override (_wrap_pango_glyph_string_get_logical_widths): - add wrapper. - (_wrap_pango_parse_markup): add wrapper. - -2002-03-28 Johan Dahlin - - * gtk/gdk.defs: Add functions from gdkkeys.h - - * gtk/gdk-types.defs: Add GdkKeymap object - -2002-03-22 James Henstridge - - * gtk/libglade.override (connect_many): don't decref the return - value of PyDict_GetItemString(). - -2002-03-22 Johan Dahlin - - * codegen/codegen.py: move type_tmpl to Wrapper class, saves 100 loc - -2002-03-22 James Henstridge - - * codegen/codegen.py: code generator refactoring. Reduces file - length by 500 lines, and fixes a few bugs in the process. - -2002-03-19 Matt Wilson - - * autogen.sh: allow override of autoconf and autoheader - - * gtk/gtk.defs (GtkTreeModel.get_iter_root): use the - gtk_tree_model_get_iter_first code, get_iter_root is going to be - deprecated. - (GtkTreeModel.get_iter_first): added - - * gtk/gtk.override (_wrap_gtk_tree_model_get_iter_root): check the - return value of gtk_tree_model_get_iter_root and return None if it - failed. Rename to _wrap_gtk_tree_model_get_iter_first. - - * codegen/codegen.py (write_class, write_interface, write_boxed - write_pointer): use overrides.is_already_included to prevent from - having the same override code included twice in one file. This - allows two methods to point to the same function. - - * codegen/override.py (Overrides.is_already_included): added a - function that returns true if the override code has been emitted - already. - -2002-03-11 Matt Wilson - - * gobjectmodule.c: remove pygobject_exception_notifiers and - pyg_fatal_exceptions_notify. - -2002-03-18 James Henstridge - - * pango.defs: remove indic functions -- they are part of the - semi-public engine API. - Remove pango-module functions -- backend API. - - * pango.override (_wrap_pango_layout_move_cursor_visually): implement. - (_wrap_pango_layout_xy_to_index): implement. - (_wrap_pango_layout_get_extents): implement. - (_wrap_pango_layout_get_pixel_extents): implement. - (_wrap_pango_layout_get_size): implement. - (_wrap_pango_layout_get_pixel_size): implement. - (_wrap_pango_glyph_string_extents): implement. - (_wrap_pango_glyph_string_extents_range): implement. - -2002-03-17 James Henstridge - - * pango.override (_wrap_pango_context_list_families): implement. - (_wrap_pango_font_get_glyph_extents): implement. - (_wrap_pango_font_family_list_faces): implement. - (_wrap_pango_font_map_list_families): implement. - (_wrap_pango_tab_array_get_tab): implement. - (_wrap_pango_tab_array_get_tabs): implement. - (_wrap_pango_layout_set_markup): implement. - (_wrap_pango_layout_set_markup_with_accel): implement. - (_wrap_pango_layout_index_to_pos): implement. - (_wrap_pango_layout_get_cursor_pos): implement. - - * gtk/gtk.override (ignore): ignore the GtkMenu append, insert and - prepend methods (they are deprecated and shadow the methods you - should use ...). - (_wrap_gtk_image_menu_item_new): add wrapper for GtkImageMenuItem - constructor (from bug 71893). - - * gtk/gdk.override (_wrap_gdk_pixbuf_get_pixels): implement - get_pixels to return the pixels as a string. - - * codegen/argtypes.py (GdkRectangleArg.write_return): fix up - problem with return type found by Peter Kese. - -2002-03-16 James Henstridge - - * pygtype.c (add_property_docs): fix up property listing. - - * gtk/libglade.override: add modulename directive. - - * gtk/gdk.override: add modulename directive. - - * gtk/gtk.override: add modulename directive. - - * atk.override: add modulename directive. - - * pango.override: add modulename directive. - - * codegen/codegen.py (write_class): if override.modulename is set, - put it into the classname. - (write_interface): same here. - (write_boxed): same here. - (write_pointer): same here. - - * codegen/override.py (Overrides.__parse_override): add support - for a "modulename" directive for overrides files. - - * gtk/gtk-types.c (PyGtkStyleHelper_Type): add module name to type - name, and remove the commented out obsolete GdkColormap - implementation. - - * gtk/gtk.override (_wrap_gtk_widget_get_pointer): return a - GdkRectangle instance. - - * gtk/gdk.override: implement setters for GdkRectangle attributes. - - * codegen/codegen.py (write_getsets): allow people to override the - setter without having to override the getter too. - (write_boxed_getsets): same here. - - * gtk/gdk.override: implement sequence behaviour for GdkRectangle - wrapper. - - * gtk/gdk-types.defs (Rectangle): add a GdkRectangle boxed type - definition. - - * pango.override (_wrap_pango_font_description_tp_compare): - override the compare slot to use pango_font_description_equal. - (_wrap_pango_font_description_tp_hash): and the hash function. - - * atk.override (_wrap_atk_relation_new): remove unused variable. - - * gtk/gtk-types.defs (Window): transient_parent field is a - GtkWindow, rather than a GtkWidget. - - * gtk/gtk.override (_wrap_gtk_ctree_node_tp_getattr): same here. - - * gtk/gdk.override (_wrap_gdk_event_tp_getattr): change to - "override-slot". - - * codegen/codegen.py (slots_list): a list of slots that we allow - overriding of. - (typetmpl): add extra substs for some slots. - (write_class): add code that sets up the slot substitutions. - (interfacetypetmpl): add slot substitutions. - (boxedtmpl): add slot substitutions. - (write_interface): add code to set slots. - (write_interface): add code to set slots, and get rid of the old - getattr handling. - - * codegen/override.py (Overrides.__parse_override): add support - for an "override-slot" section to overrides file for overriding a - slot in the PyTypeObject vtable. - - * gtk/gtk.override (_wrap_gtk_selection_data_get_text): add an - override for this -- it was the only one correctly making use of - - * codegen/argtypes.py (UCharArg.write_param): unimplement. - (guchar *) does not mean unicode, and often uchar returns are just - date (eg. pixbuf data). gtk_selection_data_get_text is the - exception. - -2002-03-15 James Henstridge - - * gtk/gdk.override (_wrap_gdk_colormap_alloc_color): new function - to allocate colours. - (_wrap_gdk_color_alloc): new wrapper that shows a deprecation - warning, and calls alloc_color. - -2002-03-10 James Henstridge - - * gtk/pygtktreemodel.c: apply Arjan Molenaar's patch to allow - selectively making the model leak free (although prone to crashing - if you aren't careful). - - * gtk/pygtktreemodel.h: add a leak_references member. - -2002-03-10 Johan Dahlin - - * gtk/gtk-types.defs (Window): Add 33 new fields - -2002-03-10 James Henstridge - - * gtk/gtk-types.c: remove commented out GtkStyle code, as the - GObject based code now provides all the missing features. - - * gtk/gtk.override: implement getters (and some setters) for - GtkStyle properties. - - * gtk/gtk-types.c (_pygtk_style_helper_new): upgrade the style - helper code to work with gtk 2.0. - - * gtk/gtk-types.defs (Style): add public fields of the GtkStyle - object. - - * codegen/codegen.py (write_getsets): allow adding setters for - overriden properties (just do a string search for the setter - function prototype). - (write_boxed_getsets): same here. - -2002-02-19 James Henstridge - - * gtk/gtk-types.defs (MessageDialog): add some fields for the - label and icon. These are marked private, but they are very - useful if you want to change the message in a dialog. - - * ChangeLog: spell Michele's name correctly (sorry!). - -2002-03-06 Johan Dahlin - - * gtk/gtkmodule.c (init_gtk): If sys.argv is NULL, don't call - PyList_Size and don't call PySys_SetArgv if argc and argv is NULL. - Bug fix so non gtk stock icons is correctly skipped. - -2002-02-28 Johan Dahlin - - * gtk/gdk.defs: Add functions from gdk-pixbuf-loader.h - - * gtk/gdk-types.defs: Add GdkPixbufLoader object - -2002-02-27 Matt Wilson - - * configure.in: increase micro version of package (1.99.8) - -2002-02-25 Johan Dahlin - - * examples/pygtk-demo/pygtk-demo.py: Use set_size_request instead of - set_usize - - * gtk/gtk.override (_wrap_gtk_widget_translate_coordinates): Impl - (_wrap_gtk_editable_get_selection_bounds): Impl - (_wrap_gtk_entry_get_layout_offsets): Impl - - * gtk/gtk.defs: Add GtkTreeView.columns_autosize - Remove GtkTreeViewColumn.cell_renderer/cell_focus/ - cell_draw_focus/cell_is_visible_cell_set_dirty - - * gtk/gtk-types.defs: Add a few fields - - * examples/pygtk-demo/demos/appwindow.py: clean up a bit and add - broken stock icon registration - -2002-02-21 Johan Dahlin - - * gtk/gtk.defs: Removed - gtk_tree_view_column_cell_render, - gtk_tree_view_column_cell_focus, - gtk_tree_view_column_cell_draw_focus and - gtk_tree_view_column_cell_set_dirty since they're now private - in gtk+. - -2002-02-18 James Henstridge - - * gtk/gtk.defs (create_item): remove defs for removed - GtkItemFactory functions. Fixes bug #69815. - -2002-02-12 Johan Dahlin - - * gobjectmodule.c (initgobject): Fix a leak - - * gtk/gtkmodule.c (init_gtk): Fix another one - -2002-02-06 Matt Wilson - - * gtk/gtk.override (_wrap_gtk_icon_set_get_sizes): added an - override that will allow making an empty iconset, thus allowing - you to add modified sources to it. - -2002-02-05 Johan Dahlin - - * examples/pygtk-demo/demos/list_store.py: add toggle for the check - box column. - -2002-02-05 James Henstridge - - * codegen/codegen.py (register_types): register pointer types as - well. - - * codegen/argtypes.py (PointerArg): handling for pointer arg - types. - (ArgMatcher.register_pointer): add function to register pointer - types. - - * gtk/gtk.override (_wrap_gtk_ctree__get_selection): GtkCTreeNode - is not a boxed type. - (_wrap_gtk_ctree_base_nodes): same. - (_wrap_gtk_ctree_insert_node): same. - (_wrap_gtk_ctree_find_by_row_data): same. - (_wrap_gtk_ctree_find_all_by_row_data): same. - (_wrap_gtk_ctree_node_get_text): same. - (_wrap_gtk_ctree_node_get_pixmap): same. - (_wrap_gtk_ctree_node_get_pixtext): same. - (_wrap_gtk_ctree_get_node_info): same. - (_wrap_gtk_ctree_node_set_row_data): same. - (_wrap_gtk_ctree_node_get_row_data): same here. - (_wrap_gtk_ctree_getattr): same here. - - * codegen/codegen.py (write_source): register pointer types as - pointers. - - * pango.override (_wrap_pango_font_description_new): ignore some - private (well, pango module API) functions. - - * gtk/gtk-types.defs (CTreeNode): make this a pointer type. - - * codegen/codegen.py (write_pointer_method): new method to write - methods for GPointer types. - (write_pointer_constructor): new function for writing constructor - for GPointer types. - (write_pointer_getsets): new function for writing getters for - pointer objects (this should be merged with the GObject and GBoxed - versions ...). - (write_pointer): add new function, which calls all the GPointer - related functions. - (write_source): write pointer types. - - * gobjectmodule.c (initgobject): actually ready the GPointer type. - - * gtk/gtk-types.defs (CTreeNode): get rid of fields here. They - will be covered by the custom getattr() function, so no need to - duplicate. - - * codegen/codegen.py (write_boxed_getsets): convert to use getsets - for boxed objects. - (write_boxed): use write_boxed_getsets() to write the getsets, - while allowing boxed objects to specify a getattr() function. - -2002-02-04 James Henstridge - - * gobjectmodule.c (initgobject): add GPointer to the module dict. - (pygobject_api_functions): and to the API vtable. - - * pygobject.h (pyg_constant_strip_prefix): and add it to the - public header. - - * pygobject-private.h (pyg_pointer_new): add stuff to private - header ... - - * pygboxed.c (PyGPointer): add code to handle base GPointer type. - - * codegen/defsparser.py (DefsParser.__init__): add self.pointers - attribute. - (DefsParser.define_pointer): handle (define-pointer ...). - (DefsParser.write_defs): handle pointer types. - - * codegen/definitions.py (PointerDef): new definition type for - G_TYPE_POINTER subclasses. - -2002-02-04 Richard Hestilow - - * gtk/gtk.override (gtk_cell_renderer_get_size, get_fixed_size): - Don't call pygobject_get, just pass in v->obj. - -2002-01-31 James Henstridge - - * configure.in: increment version number of package and - requirements. Change -ansi to -std=c9x to work arround potential - problems with gcc 2.95.x. - - * gtk/libglade.override (connect_one): fix up signature on - function. - (connect_many): same here. - -2002-01-28 James Henstridge - - * gobjectmodule.c (pyg_type_register): same code here, if __doc__ - hasn't already been set. - (initgobject): don't bother setting __doc__ on GObject here, as - pygobject_register_class() does this for us. - - * pygobject.c (pygobject_register_class): need to set the __doc__ - descriptor on every class, otherwise it gets lost. - -2002-01-24 James Henstridge - - * examples/pygtk-demo/demos/colorsel.py: - * examples/pygtk-demo/demos/dialogs.py: - * examples/pygtk-demo/demos/panes.py: - * examples/pygtk-demo/demos/sizegroup.py: add examples translated - by Michele Campeotto. - - * gtk/gtk.override (_wrap_gtk_stock_add): add gtk.stock_add() - function from Skip (bug 68363). - (_wrap_gtk_layout_get_size): add gtk.Layout.get_size() routine -- - from Skip (bug 68930) - (_wrap_gtk_frame_get_label): added function from Skip (bug 69024) - (_wrap_gtk_misc_get_alignment): same here. - (_wrap_gtk_ruler_get_range): same here. - - * examples/simple/simple.py: updated to use gobject.new(). - - * examples/simple/hello.py: updated version from Steve - George. (bug 67602) - - * pygtype.c (add_signal_docs): use g_string_append_printf(). - (add_property_docs): same here. - - * examples/simple/tooltip.py: updated version from Steve - George. (bug 67581). - -2002-01-23 James Henstridge - - * pygtype.c (object_doc_descr_get): fill in __doc__ descriptor - (add_property_docs): fix small bug. - (add_signal_docs): only get the class for a type if it is a - classed type. - - * gobjectmodule.c (initgobject): add __doc__ descriptor to GObject - and GInterface. Add __gdoc__ as a synonym because type.__doc__ - masks our descriptor sometimes :( - - * pygtype.c (object_doc_descr_get): skeleton of the __doc__ - descriptor. - (PyGObjectDoc_Type): type definition. - (pyg_object_descr_doc_get): function to create and return the - __doc__ descriptor (we only need one for all classes). - -2002-01-22 James Henstridge - - * pygobject.c: move GObject wrapper stuff here. - -2002-01-22 Johan Dahlin - - * codegen/codegen.py: Fix comments so jed can highlight correctly. - - * codegen/argtypes.py: Add GdkRectangleArg and GdkRectanglePtrArg - - * gtk/gtkgl.override: call pyg_block_threads instead of old - pygtk_block_threads. - - * gtk/gtk.override: Don't ignore gtk_paint* - - * gtk/gtk.defs: Remove Container.border_width - (GtkIconSet.icon_set_new_from_pixbuf): Make constructor of - GtkIconSet instead of gtk_icon_Set_new - (GtkStyle.draw_oval) (GtkStyle.draw_cross) (GtkStyle.draw_ramp) Remove. - (GtkStyle.draw_type): Add state_type parameter - - * gtk/gtk-types.defs (Widget): Add allocation field - (Container): add fields. - - * gtk/gdk-types.defs: Remove GdkRectangle - -2002-01-22 James Henstridge - - * pygtype.c: move closure stuff here. - - * gobjectmodule.c (initgobject): don't create boxed_marshal hash - table, and remove the type functions moved to pygtype.c. - - * pygtype.c: move GType stuff here from gobjectmodule.c. - (pyg_register_boxed_custom): store the custom boxed marshal - functions as GType data, rather than in a separate hash table. - -2002-01-21 James Henstridge - - * Makefile.am (gobjectmodule_la_SOURCES): list extra source files. - - * pygobject-private.h (pyg_boxed_new): new header for functions - shared between files in gobjectmodule. - - * pygboxed.c (pyg_register_boxed): move GBoxed handling code here. - -2002-01-21 Matt Wilson - - * gtk/gtk.override (_wrap_gtk_radio_button_get_group): implemented - GtkRadioButton.get_group - -2002-01-16 James Henstridge - - * gtk/gtk.override (_wrap_gtk_toolbar_append_element): remove '!' - signs that shouldn't have been there. - (_wrap_gtk_toolbar_prepend_element): same here. - (_wrap_gtk_toolbar_insert_element): and again. - -2002-01-14 James Henstridge - - * codegen/codegen.py (main): add a --load-types argument that runs - a python script before commencing code generation. The idea is to - allow loading of extra argument type handlers. - - * gtk/libglade.override (connect_one): s/ignore_glob/ignore-glob/ - -2002-1-13 Johan Dahlin - - * gtk/Makefile.am: Register gtk-types here, so XML.get_widget works. - -2002-01-12 James Henstridge - - * gobjectmodule.c (pyg_type_from_object): convert None, int, long, - float, str and object to GTypes. - - * gtk/gtkmodule.c (init_gtk): only raise a runtime error if we - can't initialise gtk. - -2002-01-11 Matt Wilson - - * Makefile.am (EXTRA_DIST): added appwindow.py - - * examples/pygtk-demo/demos/appwindow.py: added demo - - * gtk/gtk.override (_wrap_gtk_toolbar_insert_stock): removed - debugging code I didn't mean to check in. - - * gobjectmodule.c (pyg_closure_new): use PyTuple_SetItem to build - the tuple if extra_args isn't one. It's faster than using - abstractions and clarifies ownership rules, so we always incref - extra_args even if we're about to wrap it in a tuple. Fixes - crashes when passing callback functions into - GtkToolbar.{append_item,prepend_item,insert_item,insert_stock, - append_element} - -2002-01-11 Matt Wilson - - * codegen/argtypes.py (GtkTreePathArg.normal): added missing newline - - * gtk/gtk.defs (item_factory_path_from_widget): the return here - should be gconst-gchar*. The header in gtk is wrong, filed - #68527 against gtk. - - * gtk/gtk.override (pygtk_item_factory_cb): if the user passed - data to GtkItemFactory.create_items, call the callable with the - function data as the first parameter. - (_wrap_gtk_item_factory_create_items): take an optional - callback_data argument. Use PyGtkCustomNotify and - g_object_weak_ref to free up the reference to the callable and - data after the item factory is freed. - -2002-01-11 James Henstridge - - * codegen/h2def.py (find_obj_defs): handle typedef struct { ... } - style type defs, as used in bonobo. - -2002-01-09 Matt Wilson - - * codegen/argtypes.py (GtkTreePathArg.freepath): added missing - newline. - - * gtk/gtk.override (pygtk_tree_foreach_marshal, - pygtk_tree_selection_marshal): handle exceptions raised in - callback func. - -2002-01-08 James Henstridge - - * gtk/__init__.py (threads_*): provide these functions in the gtk - namespace as well as gtk.gdk. - -2002-01-07 James Henstridge - - * examples/pygtk-demo/demos/itemfactory.py (main): the F10 key is - used to start navigating the menu -- not alt. - - * gtk/gtk-types.c (PyGtkStyleHelper_Dealloc): use PyObject_DEL. - (PyGtkStyle_Dealloc): same here. - (PyGdkWindow_Dealloc): same here. - (PyGdkGC_Dealloc): same here. - (PyGdkColormap_Dealloc): same here. - (pygdk_atom_dealloc): same here. - - * gobjectmodule.c (pyg_type_wrapper_dealloc): use PyObject_DEL to - prevent segfaults with pymalloc. - (pyg_param_spec_dealloc): same here. - - * gtk/gtkmodule.c (init_gtk): get rid of g_thread_init() call -- - this occurs in gobjectmodule now. - - * gtk/gdk.override (pygdk_unblock_threads): give the function the - right name (duh). - - * configure.in (AM_PATH_GLIB_2_0): add $extra_mods - - * gobjectmodule.c (initgobject): initialise GThread if threading - is enabled at compile time (this doesn't initialise GDK threading - though -- you need to run gtk.gdk.threads_init for that). - - * gtk/gdk.override (_wrap_gdk_threads_enter): add overriden - implementation that allows threads while waiting, so some other - thread has a chance to give up the gdk lock. - - * gtk/gtkmodule.c (functions): remove stuff. - - * gtk/pygtk-private.h: remove definitions here as well. - - * gtk/pygtk.h (_PyGtk_FunctionStruct): remove destroy notify and - thread block stuff. - - * gtk/gtkobject-support.c: remove pygtk_destroy_notify. - - * gtk/gtk.override (pygtk_tree_foreach_marshal): move this - function here from gtkobject-support.c, and don't bother blocking - threads. - (_wrap_gtk_tree_selection_selected_foreach): same here -- don't - need to unblock threads. - (pygtk_tree_selection_marshal): move this function here from - gtkobject-support.c. Convert to use pyg_block_threads. - (_wrap_gtk_dialog_run): add overriden implementation that unblocks - threads. - (_wrap_gtk_main): use pyg_block_threads - (_wrap_gtk_main_iteration): same. - (_wrap_gtk_item_factory_create_items): same here. - (_wrap_gtk_menu_popup): same here. - (_wrap_gtk_clist_set_row_data): use pyg_destroy_notify - (_wrap_gtk_timeout_add): same here. - (_wrap_gtk_idle_add): same here. - (_wrap_gtk_quit_add): same here. - (_wrap_gtk_input_add_full): same here. - (_wrap_gtk_ctree_node_set_row_data): same here. - - * gtk/gtkobject-support.c: remove PyGTK_BLOCK_THREADS and - PyGTK_UNBLOCK_THREADS macros. - (pygtk_destroy_notify): use pyg_block_threads. - (pygtk_custom_destroy_notify): same. - (pygtk_handler_marshal): same. - (pygtk_input_marshal): same. - - * gtk/gdk.override (_wrap_gdk_threads_init): register gdk lock - based recursive threads block/unblock functions. If threading was - disabled at compile time, then this function will error out. - - * gtk/gdk.defs (threads_enter, threads_leave, threads_leave): add - functions. - - * gobjectmodule.c (functions): add destroy_notify here as well. - - * pygobject.h: add destroy_notify to the PyGObject_Functions - vtable. - - * gobjectmodule.c (pyg_set_thread_block_funcs): handler for - registering thread block/unblock funcs. - (pygobject_destroy_notify): block threads during DECREF call. - (pyg_closure_destroy): block threads during closure DECREF. - (pyg_closure_marshal): block threads when calling function. - (pyg_signal_class_closure_marshal): block threads. - (functions): add extra functions to vtable. - - * pygobject.h (struct _PyGObject_Functions): add thread - block/unblock slots to the API table. - -2002-01-03 Matt Wilson - - * Makefile.am (EXTRA_DIST): add missing demo files - - * examples/pygtk-demo/demos/itemfactory.py: added demo - - * gtk/gtk.override (_wrap_gtk_item_factory_create_items): accept a - sequence for the entries, not just a list. - -2002-01-03 Matt Wilson - - * examples/pygtk-demo/demos/list_store.py (create_model): remove - -1 from store.set call. - - * gtk/gtk.defs (GtkMenuBar.append, GtkMenuBar.prepend, - GtkMenuBar.insert): uncomment, just ignore these in gtk.override - - * gtk/gtk.override (ignore): ignore gtk_menu_bar_append, - gtk_menu_bar_insert, and gtk_menu_bar_prepend. - - * gtk/gtkmodule.c (init_gtk): remove unused v variable. - - * gtk/gtk-types.defs (DialogFlags): s/define-enum/define-flags/ - -2001-12-24 James Henstridge - - * Makefile.am (EXTRA_DIST): same here. - - * gtk/Makefile.am (EXTRA_DIST): include the defs files in the - dist, or things don't work. - -2001-12-24 Johan Dahlin - - * gtk/gtk.override: Remove window arg. - (_wrap_gtk_item_factory_create_items): Change PyArg_ParseTuple - format args a bit and reset cb and ent for every item. - -2001-12-24 James Henstridge - - * configure.in: define pygtk version and required package versions - as m4 macros at the top of the file rather than shell variables. - These can be put before the AC_INIT macro without problems. - (AM_PATH_PYTHON): require python 2.2 final. - -2001-12-21 James Henstridge - - * gtk/gdk.defs (gdk_colormap_change): comment out, as we have two - GdkColormap.change's. - - * gtk/gtk.defs (append): this is a method of menu - (prepend): same here. - (insert): same here. - (): now comment out the above three, as they shadow the methods - their deprecation messages recommend using. (problem picked out - by running xmllint over output docs). - - * codegen/docgen.py (DocbookDocWriter.__init__): add constructor - with a use_xml parameter, which turns on DocBook/XML output. - (DocbookDocWriter.create_filename): use ".xml" as extension if we - are writing DocBook/XML. - (DocbookDocWriter.output_toc): optionally write out the - DocBook/XML doctype. - - * codegen/docgen.py (DocWriter.output_interface_docs): new - function for outputting documentation about interfaces. - (DocWriter.output_docs): output interface definitions. - (DocbookDocWriter.write_heirachy): convert the list of interfaces - the class implements into a list. - -2001-12-20 James Henstridge - - * build-docs.py: script to generate documentation. - - * codegen/docgen.py (DocWriter.add_sourcedirs): new function for - scanning source dirs, pulled out of the constructor. - (DocWriter.output_docs): sort object defs by python name rather - than c anme. - - * codegen/docgen.py (DocWriter.__init__): don't actually load the - defs and overrides file in the constructor. - (DocWriter.add_docs): new method for parsing a (defs, overrides, - modulename) triple, -- the aim being to include docs for multiple - modules in one sgml document. Also, build up a map from C type - names to python names. - (DocbookDocWriter.__format_function): translate to python class - names. - (DocbookDocWriter.__format_symbol): same here. - (DocbookDocWriter.create_constructor_prototype): and here. - (DocbookDocWriter.write_heirachy): and here. - (DocbookDocWriter.write_method): and here. - - * codegen/scmexpr.py (Parser.startParsing): allow passing a - filename as the argument here. - - * codegen/override.py (Overrides.handle_file): don't make this - method private. - - * codegen/docextract.py (extract): add second argument doc_dict, - so that the function can be used to update an existing dictionary. - - * configure.in (minver): require 2.2c1 - - * gobjectmodule.c (pygobject_chain_from_overridden): fix for - updated API. - (pygobject_methods): just call the method "chain". - -2001-12-19 James Henstridge - - * codegen/docgen.py (DocWriter.output_object_docs): fix for - changes to the way parent types are listed in the defs format. - (DocWriter.create_method_prototype): of_object is only a string - now -- not a 2-tuple. - (DocbookDocWriter.make_method_ref): same here. - (DocbookDocWriter.__format_function): and here ... - (DocbookDocWriter.__format_symbol): and here :) - (DocbookDocWriter.write_method): again here. - -2001-12-18 James Henstridge - - * gobjectmodule.c (pyg_value_from_pyobject): add support for - int64/uint64. Fix up code for unsigned int/long to parse long - ints if necessary. - (pyg_value_as_pyobject): add support for int64/uint64, and get - UINT/ULONG to return python long ints if necessary, rather than - wrapping around. - - * Makefile.am (EXTRA_DIST): add new example to dist. - - * examples/gobject/properties.py: test program that implements a - few properties. - - * gobjectmodule.c (add_properties): new function for parsing the - __gproperties__ class attribute. - (create_property): helper routine for creating and installing the - new pspecs. - (pyg_type_register): add code to call add_properties if a - __gproperties__ attribute is found. - (pyg_object_class_init): set set_property/get_property methods in - vtable, and get rid of debug message. - (initgobject): add G_PARAM_* constants. - -2001-12-17 James Henstridge - - * gobjectmodule.c (pygobject_chain_from_overridden): add chaining - function. This will need to change when Tim makes the changes to - the chaining API. This was just to test that things worked - correctly (and they do). Possibly this should be renamed to just - GObject.chain() or GObject._chain(). - -2001-12-15 James Henstridge - - * gobjectmodule.c (add_signals): put the class ref/unref in here, - so it is only done once. The ref/unref is really needed for - adding signals as well, so that we don't end up with dups. - -2001-12-14 Johan Dahlin - - * gobjectmodule.c (initgobject): Add gobject.glib_version. - - * configure.in (PYGTK_MINOR_VERSION): Add and define - PYGTK_[MAJOR,MINOR,MACRO]_VERSION. Also add *_REQUIRED_VERSION - for dependencies. - - * gtk/gtkmodule.c (init_gtk): remove gtk_major_version, - gtk_minor_version and gtk_macro_version and replace them with - gtk_version, - Add pygtk_version. - -2001-12-14 James Henstridge - - * gobjectmodule.c (override_signal): another helper function for - overriding existing signals. Haven't done chaining support yet. - (add_signals): if value in __gsignals__ dict is None or - 'override', then call override_signal instead. - (override_signal): add g_type_class_ref() calls so that parent - signals are registered. - - * examples/gobject/signal.py: use __gsignals__ notation here. - - * gobjectmodule.c (create_signal, add_signals): helper routines - for handling __gsignals__ attribute of classes. - (pyg_type_register): add support for creating signals as part of - type registration. - -2001-12-14 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_window_get_position): - (_wrap_gtk_window_get_size): - (_wrap_gtk_window_get_default_size): Impl. - - * gtk/gtk-types.defs (FileSelection): Added fields. - - * gtk/gtk.defs (gtk_pixmap_new): Fix deprecation warning. GtkPixbuf->GdkPixbuf - * gtk/gtk.defs (set_usize): dito, set_default_size -> set_size_request - -2001-12-12 Matt Wilson - - * gobjectmodule.c (pyg_closure_marshal, - pyg_signal_class_closure_marshal): always print and clear the - exceptions in callback marshalers. People who want to catch these - exceptions and make them fatal should use sys.excepthook. - (pyg_fatal_exceptions_notify, pyg_fatal_exceptions_notify_add, - pyg_fatal_exceptions_remove): remove now unused functions. Also - remove them from the PyGObject_API. - - * gtk/pygtk.h (PyGtk_FatalExceptions): remove. - - * gtk/pygtk-private.h (PyGtk_FatalExceptions): remove. - - * gtk/gtkmodule.c (init_gtk): don't bother with - PYGTK_FATAL_EXCEPTIONS. - (pygtk_main_quit): remove unused code. - - * gtk/gtk.override (_wrap_gtk_item_factory_create_items, - _wrap_gtk_menu_popup): likewise, always print and clear the - exception. - -2001-12-11 Matt Wilson - - * gtk/gtk.defs: added deprecation messages - - * codegen/definitions.py (FunctionDef.write_defs, - MethodDef.write_defs): write out deprecation messages if they - exist - (MethodDef.__init__, FunctionDef.__init__): parse deprecated tags - in defs file, added some sanity checking and error reporting - - * codegen/codegen.py (write_method, write_constructor, - write_function): write out deprecation warning messages. - -2001-12-11 James Henstridge - - * atk.defs: remove atk_attribute_get_name/value (again). - -2001-12-10 Matt Wilson - - * gtk/libglade.defs: added missing defs. - - * atk.defs: add missing defs. - -2001-12-09 James Henstridge - - * atk.defs (text_attribute_get_name): rename. - (text_attribute_get_value): rename. - - * gtk/gtk.override (_wrap_gtk_input_add_full): use - PyObject_AsFileDescriptor to convert the first arg to the fd. - -2001-12-07 Matt Wilson - - * gtk/gtk.defs (GtkTable.get_row_spacing): one more missing defs - entry. - -2001-12-07 Matt Wilson - - * gtk/gtk.override (ignore-glob): ignore all functions that start - with _ - - * codegen/definitions.py (FunctionDef.merge): if a cname changed - from a method to a function, the merge would fail here. Handle - the exception. - - * codegen/argtypes.py, codegen/codegen.py: don't use + for - strings, use literal concatenation or """. - - * codegen/defsparser.py (DefsParser.printMissing): new function to - support missingdefs.py - - * codegen/missingdefs.py: new program to help find things missing - in .defs files - - * gtk/gtk.defs, gtk/gtk-types.defs: merged in missing entries in - the defs file. - -2001-12-06 Matt Wilson - - * codegen/argtypes.py (BoxedArg, CustomBoxedArg): for null-ok - functions, added "or None" to the error string. - - * gtk/gtk.defs (GtkTreeModel.iter_n_children, - GtkTreeModel.iter_nth_child): add null-ok to the special cased - iter parameters that mean 'root'. Reported by Robert Nikander. - -2001-12-05 Matt Wilson - - * codegen/codegen.py (write_function, write_method, - write_boxed_method): output the args and kwargs to the wrapper - function only if it takes arguments - -2001-12-05 Matt Wilson - - * codegen/argtypes.py (WrapperInfo): split get_varlist into - get_varlist and get_kwlist to avoid unused kwlists when generating - noarg functions. - - * codegen/codegen.py (write_boxed, write_functions, write_class, - write_interface): check to see if override function wants no args, - use METH_NOARGS if so. Also get the method flags from the various - function writers so they can ask to have noargs placed in their - flags - (write_function, write_method, write_boxed_method): write out the - parse args and keywords only if there are parameters to parse. - Return METH_NOARGS if we don't accept arguments, - METH_VARARGS|METH_KEYWORDS otherwise. - - * codegen/override.py (Overrides.is_overriden): keep a dictionary - of overrides that have the 'noargs' key in them. - - * gtk/gtkgl.override, gtk/gtk.override, gtk/gdk.override): removed - argument parsing from functions/methods that take no arguments, - mark them as noarg - - * examples/pygtk-demo/demos/list_store.py (create_model): use new - GtkListStore.set method. - -2001-12-04 Matt Wilson - - * gtk/gtk.override (_wrap_gtk_list_store_set, - _wrap_gtk_tree_store_set): added. - -2001-12-03 Matt Wilson - - * gtk/gtk.override (_wrap_gtk_rc_set_default_files, - _wrap_gtk_rc_get_default_files, _wrap_gtk_icon_set_get_sizes, - _wrap_gtk_cell_renderer_get_size, - _wrap_gtk_cell_renderer_get_fixed_size): added - - * codegen/argtypes.py (UCharArg.write_return): implemented. - - * codegen/codegen.py (exc_info): wrote a common function that - returns a descriptive string when wrapper generation goes wrong. - Modified codegen functions to call it on exception. - - * gtk/gtk.defs (rc_set_image_loader, ctree_node_from_cobject): - removed - -2001-12-02 James Henstridge - - * gtk/gtk.override (_wrap_gtk_text_buffer_create_tag): fix up - format string, from bug #65636 (Skip again). - - * gobjectmodule.c (pyg_type_wrapper_repr): fix up format string, - from bug #65640 (from Skip). - - * codegen/argtypes.py (GTypeArg.write_return): use pyg_error_check - to raise the exception. Now the domain and code elements of the - GError are available. - (GtkTreePathArg.write_param): add to codeafter in order to free - the tree path we created, fixing a leak. - - * gobjectmodule.c (initgobject): create a gobject.GError - exception. - (pyg_error_check): function for converting a GError into a - gobject.GError python exception. - -2001-12-01 James Henstridge - - * codegen/argtypes.py: change write_return methods to simply add a - "ret" variable to the varlist of the appropriate return type, and - add code for returning the correct value to codeafter code list. - (GErrorArg.write_param): add error handling code to the codeafter - code list. - - * codegen/codegen.py: s/extracode/codebefore/ - (*): get rid of the %(handlereturn)s stuff, and replace with "ret - = functioncall" statements, followed by %(codeafter)s. - - * codegen/codegen.py: update to use WrapperInfo. - - * codegen/argtypes.py: lots of changes to add a WrapperInfo class, - that replaces many of the arguments to the - write_param/write_return methods of ArgTypes. - -2001-11-30 James Henstridge - - * gobjectmodule.c (pygobject_register_class): get rid of - class_hash, and store the pointer to the python class with - g_type_set_qdata(). - (pygobject_lookup_class): look up python class with - g_type_get_qdata. - (pyg_object_class_init): a class_init function for types defined - in python. The python class is passed as the "class_data" - argument. Currently empty, but will be used to install - eg. get_property and set_property members. - (pyg_type_register): store pointer to class like we do for types - defined in C. - (initgobject): move the quark initialisations above the - registration of GObject. - -2001-11-29 Matt Wilson - - * gtk/libglade.defs (glade_xml_new): fname is actually required. - Added default to NULL for all arguments that are null-ok. - - * gtk/libglademodule.c: added missing #include pygobject.h. Why - does pygtk.h define NO_IMPORT_PYGOBJECT? - - * atk-types.defs: split atk types off into its own file - - * Makefile.am, gtk/Makefile.am: more Makefile cleanups - -2001-11-28 Matt Wilson - - * gtk/Makefile.am: removed disthook, marked autogenerated .c files - as nodist sources. - - * Makefile.am: likewise. Use a suffix rule instead of a pattern - rule for wider make compatibility. - - * gtk/gtk.override (_wrap_gtk_window_set_geometry_hints): added - min_aspect and max_aspect to the kwlist so that the kwlist length - matches the number of arguments in the argparse format string. - - * codegen/h2def.py (define_func): someone was thinking that a - re.split looked like string.split. Also fix the argument munger - that I broke the other day. - - * atk.override (_wrap_atk_relation_new): fixed the constructor so - it actually works - - * gtk/Makefile.am ($(srcdir)/gtk.c): get the atk types - - * gtk/gtk.override: import atk.Object as PyAtkObject_Type - - * Makefile.am (EXTRA_DIST): added examples/atk/atk-demo.py - - * atk.defs (relation_new): mark as constructor of AtkRelation - (atk_no_op_object_factory_new): mark as constructor of - AtkNoOpObjectFactory - -2001-11-27 Matt Wilson - - * atk.defs, atk.override, atkmodule.c: added start of atk wrapper - - * gtk/Makefile.am (DISTCLEANFILES): remove generated files - ($(srcdir)/gtk.c): modify targets to output generated files in the - builddir, not the srcdir. - ($(srcdir)/gdk.c): likewise. - ($(srcdir)/libglade.c): likewise. - - * codegen/h2def.py (define_func): add check to workaround broken - string.replace semantics on python 1.5 - - * codegen/codegen.py (write_enums): if the enum or flag doesn't - have a GType, just add those enum values listed in the defs file - by hand. - - * codegen/argtypes.py (ArgMatcher.register_enum): if defs file - doesn't specify a GType for the enum, use G_TYPE_NONE. - (ArgMatcher.register_flag): likewise. - - * gobjectmodule.c (pyg_enum_get_value): allow enums to pass - G_TYPE_NONE in as the type, disabling the string to value - conversion. - (pyg_flags_get_value): likewise. - (pyg_constant_strip_prefix): new function to combine common - codepath. - (pyg_enum_add_constants): use pyg_constant_strip_prefix - (pyg_flags_add_constants): likewise. - (functions): make pyg_constant_strip_prefix available to users of - pygobject - - * pygobject.h: added pyg_constant_strip_prefix wrapper - - * configure.in: added ATK test, subst for ATK_CFLAGS and ATK_LIBS. - - * Makefile.am (%.c): added generic codegen target for pango and - atk. Added DISTCLEANFILES so that generated files will be - removed. Added atk targets, cflags, ldflags. - -2001-11-26 Matt Wilson - - * configure.in: bump up required versions of gtk, pango, and glib. - -2001-11-26 Matt Wilson - - * configure.in: 1.99.5 - -2001-11-20 Matt Wilson - - * gtk/gtk.defs (GtkStyle.render_icon): change size argument type - to GtkIconSize. - (gtk_image_new_from_stock): likewise, change from constructor to - function, rename to image_new_from_stock. - (gtk_image_new_from_icon_set): likewise. - (gtk_image_new_from_animation): change from constructor to - function, rename to image_new_from_animation. Should these just - go in as an overloaded constructor for GtkImage()? - (icon_source_new): is-constructor-of GtkIconSource - (icon_set_new): is-constructor-of GtkIconSet - -2001-11-19 Matt Wilson - - * codegen/codegen.py (attrchecktmpl): fix indention. - (write_getsets): use the handler's error handling code snippits. - (write_boxed_getattr): likewise. - - * gobjectmodule.c (pyg_fatal_exceptions_notify_{add,remove}): - fixed think-o, don't store a pointer to the function pointer, just - store the function pointer. - - * pango.defs (PangoContext.add_font_map): renamed to set_font_map - (PangoFontMap.load_font): added context argument - -2001-11-17 Matt Wilson - - * gtk/gtk.defs: added GtkTreeView.get_columns, - GtkTreeView.move_column_after, GtkTreeView.map_expanded_rows, - GtkTreeView.row_expanded, GtkTreeView.get_cursor, - GtkTreeView.get_bin_window, GtkTreeView.enable_model_drag_source, - GtkTreeView.enable_model_drag_dest, GtkTreeView.set_enable_search, - GtkTreeView.get_enable_search, GtkTreeView.get_search_column, - GtkTreeView.set_search_column, GtkTreeView.get_search_equal_func, - GtkTreeView.set_search_equal_func, - GtkTreeView.set_destroy_count_func - -2001-11-17 Matt Wilson - - * codegen/codegen.py (write_*): pass in any error checking and - handling code snippets into the return function writer. Only add - keywords for arguments that are going to be parsed, Python 2.2 now - checks to make sure the kwlist length equals the paramspec. - - * codegen/argtypes.py: remove GtkCTreeNode custom registration, - it's a generic boxed type. Added a GErrorType requested in bug - #63980. This requires inserting possible error checking in each - type's write_return method. - - * gtk/gtk.defs (gtk_image_new_from_icon_set): changed size - argument from char* to GtkIconSize - (GtkIconSet.render_icon): likewise - - * gtk/gtk-types.defs (IconSet): added GtkIconSet boxed type - - * gtk/gtk.override (_wrap_gtk_tree_model_get_value): value is not - parsed, remove it from the kwlist. - -2001-11-16 Matt Wilson - - * gtk/gtk.override (_wrap_gtk_tree_view_get_path_at_pos): remove - window argument - - * gtk/gtk.defs (GtkTreeView.get_path_at_pos): remove window argument - - * gobjectmodule.c (pyg_param_spec_getattr, pyg_param_spec_repr): - s/g_param_get_{name,nick,blurb}/g_param_spec_get_{name,nick,blurb}/g - (pyg_fatal_exceptions_notify_remove): use the right type. - - * gtk/pygtk.h (init_pygtk): need to cast to the right type for - _PyGTK_API init. - -2001-11-15 Matt Wilson - - * gtk/gtk.defs (GtkEditable.insert_text): note default for - position to be 0. - - * gtk/gtkmodule.c (init_gtk): added gtk.major_version, - gtk.minor_version, and gtk.micro_version. #59830. - -2001-11-15 Matt Wilson - - * gtk/pygtk.h (init_pygtk): cast void* to _PyGtk_FunctionStruct* - when retrieving the API struct, #62872 - - * pygobject.h: added PyGFatalExceptionFunc typedef, API wrapper - for pyg_fatal_exceptions_{add,remove}. - - * gobjectmodule.c (pyg_boxed_new): return NULL on assertion - failures, #62814 - (pyg_closure_new): actually assign swap_data to the closure. - (pyg_fatal_exceptions_notify, pyg_fatal_exceptions_notify_add, - pyg_fatal_exceptions_remove): added mechanism for gobjectmodule using - modules to get a function called when a fatal exception happens in - closures, etc. - (pyg_closure_marshal, pyg_signal_class_closure_marshal): return - NULL if a gobjectmodule using module registered a fatal exception - function. - - * gtk/pygtk-private.h: added declarations for - pygtk_custom_destroy_notify, pygtk_tree_selection_marshal, - pygtk_tree_foreach_marshal. Added typedef for - PyGtkCustomNotify. #62814 - - * gtk/gtkmodule.c (init_gtk): register stock items, #62814. Set - up fatal exception stuff if PYGTK_FATAL_EXCEPTIONS is set. This - isn't 100% done yet, gtk mainloop specific functions still need - work. - - * gtk/gtkobject-support.c (pygtk_tree_selection_marshal): added, - #62814 - (pygtk_tree_foreach_marshal): added, #62814 - (pygtk_custom_destroy_notify): added, #62814 - - * gtk/gtk.override (_wrap_gtk_tree_selection_set_select_function): - added, #62814 - (_wrap_gtk_tree_selection_selected_foreach): added, #62814 - (_wrap_gtk_widget_path): added, #62393 - (_wrap_gtk_widget_class_path): added, #62393 - - * gtk/gtk.defs (GtkWidget.set_size_request): added, #62474 - (GtkTreeSelection.get_mode): added, #62474 - -2001-11-13 Matt Wilson - - * gtk/gtk.defs: removed GtkAccelGroup.accel_group_get_default, - GtkAccelLabel.get_accel_object, GtkAccelLabel.set_accel_object, - item_factory_parse_rc, item_factory_parse_rc_string, - GtkWidget.remove_accelerators, GtkWidget.accelerator_signal, - GtkWidget.lock_accelerators, GtkWidget.unlock_accelerators, - GtkWidget.accelerators_locked to reflect Tim's accelerator API - revamp checkin. - (GtkTreeDragDest.row_drop_possible): modified arguments to match - new API. - -2001-11-01 Matt Wilson - - * gtk/gtk.defs (GtkSelectionData.tree_set_row_drag_data): renamed - GtkSelectionData.data_set_tree_row, #60218 - (GtkSelectionData.tree_get_row_drag_data): renamed - GtkSelectionData.data_get_tree_row, #60218 - (GtkFontSelection.get_preview_text): constify return arg - (GtkFontSelectionDialog.get_preview_text): likewise. - (GtkSelectionData.set_text): added len parameter - -2001-10-31 Matt Wilson - - * gtk/gtk.defs (GtkTreeStore.clear): added - -2001-10-29 James Henstridge - - * gtk/gtk.defs: remove gtk_cell_renderer_toggle_[gs]et_active. - -2001-10-26 Matt Wilson - - * configure.in (AC_INIT): increase version to 1.99.4 - (AM_PATH_GLIB_2_0): change minver to 1.3.10 - (PKG_CHECK_MODULES): change pango requirement to >= 0.21 - (AM_PATH_GTK_2_0): change minver to 1.3.10 - -2001-10-25 James Henstridge - - * gobjectmodule.c (PyGObject_Type): include the module name in the - typename. - (PyGInterface_Type): same here. - (PyGBoxed_Type): same here. - (pygobject_register_class): when working out what name to put into - the module dictionary, strip off everything before the last dot, - so the type name can include the module. - - * configure.in (minver): require python 2.2b1 - - * gobjectmodule.c (initgobject): remove statements using - tp_defined (they are no longer needed). - -2001-10-23 Matt Wilson - - * codegen/codegen.py (boxedgetattrtmpl, write_boxed_getattr): at - the end of the getattr function, we must use Py_FindMethod. This - fixes GtkSelectionData's methods, and DnD works again. - - * codegen/h2def.py (clean_func): deal with const return types when - cleaning up function prototype - (proto_pat): add '-' to the ret group so that const- will work in - the return type - -2001-10-23 Matt Wilson - - * gtk/gtk.override (_wrap_gtk_text_iter_forward_search): use new - forward search API with flags enum in CVS. - (_wrap_gtk_text_iter_backward_search): likewise. - (_wrap_gtk_selection_data_set): use pygdk_atom_from_pyobject. - (_wrap_gtk_selection_add_targets): likewise. - - * gtk/pygtk-private.h (pygdk_atom_from_pyobject): added - declaration. - - * gtk/gtk.defs (GtkTextIter.forward_search): use new flags enum - (GtkTextIter.backward_search): likewise. - - * gtk/gdk.override (_wrap_gdk_gc_new_with_values): - s/GPOINTER_TO_INT/GDK_POINTER_TO_ATOM/ - (_wrap_gdk_property_get): use pygdk_atom_from_pyobject - (_wrap_gdk_property_change): likewise. - - * codegen/argtypes.py (AtomArg.write_param): use - pygdk_atom_from_pyobject when getting atom args - - * gtk/gtk-types.defs (TextSearchFlags): added new enum. - - * gtk/gtk-types.c (pygdk_atom_from_pyobject): implemented a - function to get a GdkAtom from a Python object - (PyGdkWindow_PropertyGet): use pygdk_atom_from_pyobject to get - atoms from args, not this two-try ParseTuple. - (PyGdkWindow_PropertyChange): likewise. - (PyGdkWindow_PropertyDelete): likewise. - - * gtk/gdk-types.defs (Selection): removed, no longer an enum - (Target): Likewise. - (SelectionType): Likewise. - -2001-10-22 Matt Wilson - - * gtk/gtk-types.c (pygdk_atom_number): remove numeric bits, - GdkAtom is now opaque. - - * gtk/gtk.defs (GtkTreeModelSort.set_model): removed, is static now. - (GtkTreeModelSort.convert_path): rename to - GtkTreeMOdelSort.convert_path_to_child_path - -2001-10-19 Matt Wilson - - * gtk/gtk.override (_wrap_gtk_tree_model_iter_children): override - GtkTreeModel.iter_children(parent) to return a new iter, like - GtkTreeModel.get_iter_root(). - -2001-10-18 Matt Wilson - - * gtk/gdk.defs (pixbuf_new_from_inline): rename from - pixbuf_new_from_stream to match gdk-pixbuf changes in CVS. - - * pygtk.spec.in (%files devel): get header from new location - - * Makefile.am (pkgincludedir): put pygobject.h in - $(includedir)/pygtk-2.0, not $(includedir)/pygtk-2.0/pygtk - -2001-10-16 Matt Wilson - - * codegen/h2def.py (define_func): convert all argument type - whitespace to '-'. - -2001-10-15 Matt Wilson - - * pygtk-2.0.pc.in (pygtkincludedir): move headers to a - version-specific directory so we can have old pygtk-devel and - pygtk2-devel installed at the same time. - - * Makefile.am (pkgincludedir): likewise - - * gtk/Makefile.am (pkgincludedir): likewise - - * pygtk.spec.in (%files devel): pick up the new header location - -2001-10-11 Matt Wilson - - * pygtk.spec.in (%files devel): fixed typo in devel filelist - (header) added macro that tests to see if we have libglade2 - (%files libglade) make the filelist a condition of that - (Name) changed name to 'pygtk2' to avoid name conflict with pygtk - -2001-10-11 Murray Cumming - - * h2def.py: Now it doesn't stop when it finds a function parameter - with a type but no name. The resulting define-* will be missing - that parameter, but at least the rest will have succeeded. - -2001-10-10 Matt Wilson - - * gobjectmodule.c (pygobject_dealloc): also go set up the reflist - if we're doing refcount debugging. - -2001-10-11 James Henstridge - - * gobjectmodule.c (pygobject_dealloc): if we are saving a - reference to the wrapper during dealloc (which is probably bad), - check if it is a heap type, and if so, incref its type, so that - subtype_dealloc() doesn't decref the type out from under us. This - problem was tracked down by Matt Wilson - -2001-10-09 James Henstridge - - * gtk/gtk-extrafuncs.defs (GenericTreeModel): fix up c-name. - - * examples/pygtk-demo/demos/treemodel.py (MyTreeModel): subclass - from gtk.GenericTreeModel. - - * pygtk.spec.in (Requires): add new files to spec file. - -2001-10-09 James Henstridge - - * pango-types.defs: move types. - - * gtk/Makefile.am: modify rules to take into account splitting out - the type definitions. --register arguments now only parse the - type defs and not the function defs, which should speed up the - build a bit. - - * gtk/gdk-types.defs: same here. - - * gtk/gtk.defs: and include gtk-types.defs here. - - * gtk/gtk-types.defs: move - define-{object,interface,enum,flags,boxed} defs to this file. - - * gtk/gtk-extrafuncs.defs (get_selection): and add it back here. - - * gtk/gtk.defs: remove gtk_list_get_selection function from this - file. - - * gtk/gtk-extrafuncs.defs (pygtk_generic_tree_model_new): similar - changes here. - - * gtk/pygtktreemodel.c: same changes here. - - * gtk/pygtktreemodel.h (pygtk_generic_tree_model_get_type): rename - to PyGtkGenericTreeModel, so that short name doesn't collide with - GtkTreeModel. - -2001-10-08 Matt Wilson - - * pygtk.spec.in: added specfile template - - * configure.in (AC_CONFIG_FILES): add pygtk.spec - - * Makefile.am (dist-hook): copy the spec file into the dist dest - dir - - * gtk/gtk.defs (ColorSelectionDialog): added colorsel, ok_button, - cancel_button, and help_button fields. - (GtkList.get_selection): marked as a PyGTK extension. - -2001-10-08 James Henstridge - - * pango.defs (pango_font_metrics_new): comment out, as it is only - for use by engines. - - * gtk/libglade.override: same here. - - * gtk/gdk.override: same here. - - * gtk/gtk.override: use import section here. - - * pango.override: use the new import stuff to get the reference to - the GObject type. - - * codegen/codegen.py (write_source): write out code based on the - import statements in the overrides file. Most modules have some - code like this, and this helps reduce the boilerplate code that - needs to be entered in. - - * codegen/override.py (Overrides.get_imports): add handlers for - "import" sections of the overrides file, which are used to get - references to the types in other modules. - -2001-10-06 James Henstridge - - * gtk/gtk.override (_wrap_gtk_list__get_selection): remove unused - variable (the line number on the gcc warning matched exactly!) - - * codegen/codegen.py (write_source): reset line numbering after - writing headers and init overrides. - (main): add --outfilename argument, for specifying the final name - of the file -- output is not written to this file. If argument is - not passed, derive from defs filename. - - * codegen/override.py (Overrides.__parse_override): add #line - outputs for headers and init type overrides. - - * codegen/codegen.py (main): pass the filename to overrides. - (FileOutput): wrapper class for file objects to keep track of line - numbers, so that #line statements can be written. - (write_class): write out #line statements for overriden - constructor and methods. - (write_getsets): write #line's for getsets. - (write_interface): write #line's for methods. - (write_boxed): write #line's for constructor and methods. - - * codegen/override.py (Overrides.__init__): rewrite the code that - reads in the overrides file, so it only splits on lines with only - '%%' in them. Also keep track of line numbers, so we know where - each section starts. - (Overrides.__parse_override): save the start line for 'override' - sections and 'override-attr' sections. - (Overrides.getstartline): new function to retrieve the start line - for a .overrides section. - (Overrides.__init__): take the filename rather than file handle as - argument. - -2001-10-05 Matt Wilson - - * gtk/gtk.override (_wrap_gtk_list__get_selection): implemented - function to return the selection. - (_wrap_gtk_list_get_selection): use above to implement a method - for getting the selection, like old pygtk. - - * gtk/gtk.defs (GtkList.get_selection): added function to be - compatible with previous versions. - (GtkList): added "selection" field - - * gobjectmodule.c (pyg_closure_new): too many tuples. - -2001-10-05 Matt Wilson - - * gobjectmodule.c (pygobject_emit): mask out - G_SIGNAL_TYPE_STATIC_SCOPE to fix signal emission. - -2001-10-05 Johan Dahlin - - * gobjectmodule.c (pyg_closure_new): Handle non-Tuple parameters. - - * gtk/gtk.override (_wrap_gtk_window_list_toplevels): Bound - (_wrap_gtk_toolbar_insert_stock): Bound. - - * gtk/gtk.defs (binding_entry_clear): rename from - gtk_bindings_entry_clear - (color_selection_palette_from_string): rename from - gtk_color_selection_palette_from_string - (set_border_width): Added - (set_resize_mode): Added - (get_children): Added - (children): Mark as deprecated - (get_focus_chain): Added - (get_focus_vadjustment): Added - (get_focus_hadjustment): Added - (gtk_container_add_child_arg_type): Removed - (gtk_container_query_child_args): Removed - (gtk_containerchild_getv): Removed - (gtk_container_child_setv): Removed - (gtk_container_add_with_args): Removed - (gtk_container_addv): Removed - (gtk_container_add_set): Removed - (gtk_container_add_get): Removed - (GtkContainer.child_set): Added - (GtkContainer.child_get): Added - (gtk_container_child_args_collect): Removed - (gtk_container_child_arg_get_info): Removed - (GtkDrawingArea.size): Mark as deprecated - (GtkEditable.get_editable): Added - (GtkEntry.new_with_max_length): Mark as deprecated - (GtkEntry.get_visibility): Added - (GtkEntry.get_invisible_char): Added - (GtkEntry.get_max_length): Added - (GtkFontSelection.get_font): Mark as deprecated - (GtkFontSelectionDialog.get_font): Mark as deprecated - (GtkFrame.get_label_widget): Added - (GtkFrame.get_label_align): Added - (GtkFrame.get_shadow_type): Added - (GtkGC.gc_get): Added - (gtk.gc_release): Rename from gtk_gc_release - (GtkHandleBox.get_shadow_type): Added - (GtkHandleBox.get_handle_position): Added - (GtkHandleBox.get_snap_edge): Added - (GtkHscale.new_with_range): Added - (GtkLayout.freeze): Mark as deprecated - (GtkLayout.thaw): Mark as deprecated - (GtkListStore.new): Fix parameters - (GtkListStore.newv): Added (needed?) - (GtkListStore.set): Added - (GtkListStore.clear): Added - (gtk_init_abi_check): Remove - (gtk_init_check_abi_check): Remove - (gtk_exit): Remove - (gtk.get_current_event_state): Added - (GtkMenu.get_tearoff_state): Added - (GtkMenu.get_title): Added - (gtk_rc_*): Rename to rc_* - (GtkToolbar.insert_stock): Added - (GtkToolbar.set_icon_size): Added - (GtkToolbar.unset_style): Added - (GtkToolbar.unset_icon_size): Added - (GtkToolbar.get_orientation): Added - (GtkToolbar.get_style): Added - (GtkToolbar.get_icon_size): Added - (GtkToolbar.get_tooltips): Added - (gtk_type_unique): Remove - (gtk_type_class): Remove - (gtk_type_new): Remove - (gtk_enum_get_values): Remove - (gtk_flags_get_values): Remove - (gtk_enum_find_value): Remove - (gtk_flags_find_value): Remove - (GtkViewport.get_shadow_type): Added - (GtkVscale.new_with_range): Added - -2001-10-05 Matt Wilson - - * gtk/gtk.override (_wrap_gtk_dialog_new_with_buttons): fixed - argument format string. - -2001-10-03 Matt Wilson - - * gtk/gdk.defs (Rectangle): added definition for GdkRectangle - -2001-10-04 Matthew Wilson - - * gtk/gtk.override (_wrap_gtk_toolbar_append_item): make user_data - optional - - * gtk/gtk.defs (GtkToolbar.append_item): make user_data optional - -2001-10-04 Matt Wilson - - * gtk/gtk.override (_wrap_gtk_item_factory_create_items): fixed - non-compiling function. - -2001-10-04 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_item_factory_create_items): Modify - ParseTuple to accept 6 argument, so we can use stock icons and gdkpixbufs. - (_wrap_gtk_spin_button_get_range): Bound. - (_wrap_gtk_spin_button_get_increments): Bound. - - * gtk/gtk.defs: rename gtk.gtk_* gtk.*. - -2001-10-04 James Henstridge - - * pygtk.spec: spec file changes. - - * gtk/gtk.defs (AccelGroup): this is an object now -- not a boxed. - -2001-10-03 Matt Wilson - - * gobjectmodule.c (pygobject_repr): tweak the repr such that - calling it on an uninitialized PyGObject won't segfault. Also - print the python class name. - -2001-10-02 Johan Dahlin - - * gtk/gdk.override (_wrap_gdk_color_parse): Added. - - * gtk/gtk.override (_wrap_gtk_label_get_selection_bounds): - (_wrap_gtk_label_get_layout_offsets): - (_wrap_gtk_button_box_get_child_size): - (_wrap_gtk_button_box_get_child_ipadding): Added. - - * gtk/gtk.defs - GtkAccelGroup.activate, attach, detach, groups_activate, add, - remove: - s/GtkObject/GObject/ - (gtk_adjustment_new) (GtkAdjustment.clamp_page): s/gfloat/gdouble/ - (GtkAdjustment.get_value): Added - (GtkBin.get_child): Added - (GtkBox.get_homogeneous): Added - (GtkCellRenderer.event): Removed - (GtkCellRenderer.activate): Added - (GtkCellRenderer.start_editing): Added - (GtkCellRenderer.set_fixed_size): Added - (GtkCellRenderer.get_fixed_size): Added - (GtkCheckMenuItem.get_activate): Added - (gtk_color_selection_get_type): Added - (gtk_color_selection_new): Added - Removed old functions from gtkbindings.h. - -2001-10-02 Matt Wilson - - * gtk/gdk.defs (gdk.screen_width): bound - (gdk.screen_height): bound - (gdk.screen_width_mm): bound - (gdk.screen_height_mm): bound - (gdk.flush): bound - (gdk.beep): bound - (gdk.set_double_click_time): bound - (gdk.gdk_window_get_toplevels): renamed to window_get_toplevels - (gdk.get_default_root_window): bound - (gdk.gdk_color_parse): renamed to color_parse - (gdk.gdk_drag_context_get_type): renamed to drag_context_get_type - (gdk.gdk_drag_context_new): renamed to drag_context_new - (gdk.gdk_gc_new): renamed to gc_new - (gdk.gdk_image_new_bitmap): renamed to image_new_bitmap - (gdk.gdk_device_get_type): renamed to device_get_type - (gdk.gdk_devices_list): renamed to devices_list - (gdk.device_free_history): renamed to device_free_history - (gdk.gdk_rgb_xpixel_from_rgb): renamed to rgb_xpixel_from_rgb - (gdk.gdk_rgb_gc_set_foreground): renamed to rgb_gc_set_foreground - (gdk.rgb_gc_set_background): renamed to rgb_gc_set_background - - * gobjectmodule.c (pygobject_dealloc): remove debugging message - James checked in. - - * gtk/gtk.override (_wrap_gtk_text_buffer_set_text): override - GtkBuffer.set_text so that you don't have to pass in the length. - - * codegen/argtypes.py (FlagsArg.write_param): preserve flags that - have a default value by short circuiting the conversion of NULL - Python flags to 0. - - * gobjectmodule.c (pyg_object_new): rewrote function to use - g_object_newv and instantiate the object after we check to make - sure the class handles all the properties passed. This solves the - problem of trying to destroy a GtkObject after creating it, which - can be a little tricky. - -2001-10-02 Matt Wilson - - * gobjectmodule.c (pyg_object_new): added a new gobject.new - function to create an object of any registered type with kwargs - property setting. - -2001-10-02 James Henstridge - - * gobjectmodule.c (pygobject_new): fix bug where we were INCREFing - the saved widget even in the hasref case (where we should be - passing ownership of the last reference). - -2001-10-02 Matt Wilson - - * gtk/gtk.override (_wrap_gtk_clist_new_with_titles): accept unicode - objects as well. - (_wrap_gtk_clist_prepend): likewise - (_wrap_gtk_clist_append): likewise - (_wrap_gtk_clist_insert): likewise - (_wrap_gtk_combo_set_popdown_strings): likewise - (_wrap_gtk_ctree_new_with_titles): likewise - (_wrap_gtk_ctree_insert_node): likewise - -2001-10-02 Johan Dahlin - - * gtk/gtk.defs: Added - GtkAccelLabel: get_accel_object, set_accel_object. - GtkButton: set_label, get_label, set_use_underline, - get_use_underline, set_use_stock, get_use_stock. - GtkLabel: get_attributes, set_label, get_label, set_use_markup, - get_use_markup, set_use_underline, get_use_underline, - get_justify - GtkRadioButton: get_group - GtkSpinButton: get_digits, get_increments, get_range, - get_update_policy, get_numeric, get_wrap, - get_snap_to_tickets, get_mode - -2001-10-01 Matt Wilson - - * codegen/codegen.py (write_boxed_getattr): added code to write - out __members__ attribute so that dir(foo) works on boxed types - -2001-10-01 Matthew Wilson - - * examples/pygtk-demo/demos/treemodel.py - (MyTreeModel.on_get_column_type): use gobject.TYPE_STRING instead - of hard coded values - -2001-09-30 James Henstridge - - * gobjectmodule.c (pygobject_dealloc): use plain old - PyObject_GC_Del, as the overridden tp_free seems to ignore the GC - header. - (pygobject_new): GC track wrappers created through pygobject_new. - - * configure.in: increment version number, and require gtk 1.3.9 - (we already required it before). - - * gobjectmodule.c (pygobject_new): initialise extra members. - Problem found by msw. - -2001-09-29 Matthew Wilson - - * examples/pygtk-demo/demos/dnd.py: port to new namespace - -2001-09-29 James Henstridge - - * gobjectmodule.c (pyg_param_spec_new): add a wrapper for a - GParamSpec. Currently it only exposes the base parameter info; - none of the extra info provided by derived param specs. - (pyg_object_class_list_properties): return a list of GParamSpec - objects, rather than just strings. - (pyg_value_as_pyobject): catch NULL strings. - - * configure.in (minver): require 2.2a4. - - * gtk/pygtktreemodel.c (pygtk_tree_model_get_column_type): use - pyg_type_from_object instead. Based on patch from Elliot. - - * gtk/gtk.override (_wrap_gtk_selection_data__get_data): convert - getter to a function to match codegen changes. - - * : merge in python22-branch (see changelog entries below). - -2001-09-25 James Henstridge - - * gobjectmodule.c (pygobject_get_dict): getter for __dict__ on - GObject wrappers. - (PyGObject_Type): include getsets list. - - * codegen/codegen.py (write_getsets): change "struct getsets" to - PyGetSetDef to match recent changes in python. - - * gtk/gdk.override (_wrap_gdk_device__get_axes): change to getter. - (_wrap_gdk_device__get_keys): turn into a getter. - (_wrap_gdk_drag_context__get_targets): same here. - - * gtk/gtk.override (_wrap_gtk_clist__get_selection): turn into a - getter. - (_wrap_gtk_ctree__get_selection): turn into a getter. - - * codegen/codegen.py (write_getsets): rename to write_getsets, and - don't allow overriding the whole routine, as it is implemented as - a number of smaller routines now. - (gettertmpl): rename from getattrtmpl. Refactor for handling - single attribute. - (write_getsets): finish conversion over to using getsets. - (write_class): call write_getsets instead. - (typetmpl): substitute %(getsets)s rather than %(getattr)s. - -2001-09-23 James Henstridge - - * gtk/__init__.py: don't import ExtensionClass. - - * gobjectmodule.c (object_gc_free): new function to free an GC - managed object. - (PyGObject_Type): use object_gc_free for the tp_free slot. - - * codegen/codegen.py (write_class): don't write getattr routine. - This is a temporary hack to see if things work. - - * gobjectmodule.c (pygobject_dealloc): handle case of destruction - when self->obj == NULL. - - * gtk/gtk.override (_wrap_gtk_clist_new_with_titles): return an - int. - (_wrap_gtk_tree_view_get_path_at_pos): same here. - (_wrap_gtk_button_new): same here. - (_wrap_gtk_toggle_button_new): same here. - (_wrap_gtk_check_button_new): same here. - (_wrap_gtk_radio_button_new): same here. - (_wrap_gtk_list_item_new): same here. - (_wrap_gtk_menu_item_new): same here. - (_wrap_gtk_check_menu_item_new): same here. - (_wrap_gtk_radio_menu_item_new): same here. - (_wrap_gtk_ctree_new_with_titles): same here. - (_wrap_gtk_dialog_new_with_buttons): same here. - (_wrap_gtk_message_dialog_new): same here. - (_wrap_gtk_message_dialog_new): same here. - - * gtk/gdk.override (_wrap_gdk_cursor_new): return an int. - - * pango.override (_wrap_pango_font_description_new): constructors - return ints. - - * codegen/codegen.py (write_constructor): small hack to convert - "return NULL;" to "return -1;" in constructors, as they should - return ints. - (write_boxed_constructor): same here. - -2001-09-22 James Henstridge - - * gtk/pygtk.h: remove traces of ExtensionClass. - - * gtk/libglade.override: s/PyExtensionClass/PyTypeObject/. - - * gtk/gtk-types.c (_pygtk_register_boxed_types): get rid of - mentions of ExtensionClass. - - * gtk/gdk.override: s/PyExtensionClass/PyTypeObject/. - - * gtk/gtk.override: s/PyExtensionClass/PyTypeObject/. - - * gobjectmodule.c (pygobject_traverse): implement a traverse - function for PyGObject. - (PyGObject_Type): add GC support. - (object_free): use PyObject_GC_Del to delete the memory. - (pygobject_dealloc): stop GC tracking the object here. - (pygobject_register_class): set a few more type fields here. - (pygobject_new): use PyObject_GC_New to allocate the object here. - (pygobject_dealloc): readd the 1-1 object/wrapper hack. It should - work as expected since adding GC support. - - * pango.override: s/PyExtensionClass/PyTypeObject/ - - * codegen/codegen.py (consttmpl): constructor template returns an - int. - (noconstructor): return int rather than PyObject. - (typetmpl): change def to be a PyTypeObject, with extra fields. - (interfacetypetmpl): same here. - (boxedconsttmpl): return int rather than pyobject. - (boxedtmpl): change def to PyTypeObject. - (write_class): put the constructor in the right place. - (write_boxed): put the constructor in the right place. - (write_source): don't include ExtensionClass.h, forward declare - type objects as PyTypeObjects, rather than PyExtensionClasses. - - * gobjectmodule.c (pygobject_register_class): set type->ob_type. - (pyg_register_boxed): same here. - (pyg_register_interface): same here. - (initgobject): set the ob_type member of PyGInterface_Type and - PyGBoxed_Type. - (pygobject__gobject_init__): add __gobject_init__ method, that - just calls pygobject_init. - (pygobject_methods): readd __gobject_init__ method. - -2001-09-21 James Henstridge - - * gobjectmodule.c (pygobject_register_class): convert to use - PyTypeObjects instead of ExtensionClass. - (pygobject_new): don't need to set inst_dict. Python takes care - of that for us. - (pyg_register_boxed): convert to 2.2. - (pyg_boxed_new): convert to 2.2. - (pyg_value_from_pyobject): get rid of ExtensionClass calls. - (pygobject_init): convert to 2.2. - - * pygobject.h: don't include ExtensionClass.h - - * configure.in (AM_PATH_PYTHON): require python 2.2. - - * Makefile.am: remove ExtensionClass. - -2001-09-28 Matt Wilson - - * gtk/gtk.defs (gtk_progress_bar_new_with_adjustment): mark as - constructor - - * gtk/gtk.override (_wrap_gtk_progress_bar_new_with_adjustment): - override constructor for ProgressBar to optionally take adjustment - -2001-09-27 Matt Wilson - - * gtk/gtk.defs (GtkTreeView.set_cursor): added new parameters. - - * gtk/pygtk-private.h: removed old PyGtkCTreeNode code, move to - generic generated code. - - * gtk/gtkmodule.c (_PyGtk_FunctionStruct): likewise - - * gtk/pygtk.h: likewise. - - * gtk/gtk-types.c: likewise. - - * gtk/gtk.override (_wrap_gtk_tree_store_get_root_iter): moved to - gtk_tree_model_get_iter_root. - (_wrap_gtk_ctree_node_from_cobject): removed - (_wrap_gtk_ctree_node_getattr): moved gtk-types.c getattr code to - generic boxed interface and placed here. - (_wrap_gtk_ctree_*): migrated to generic PyGBoxed for GtkCTreeNodes - -2001-09-26 Matt Wilson - - * gtk/gtkmodule.c (_PyGtk_FunctionStruct): removed PyGtkCTreeNode - functions - - * codegen/argtypes.py: remove GtkCTreeNode custom registration - - * gtk/gtk.defs (GtkContainer.queue_resize): remove, use - gtk_widget_queue_resize instead of gtk_container_queue_resize - (GtkContainer.child_composite_name): remove, this is private - (GtkContainer.clear_resize_widgets): likewise - (GtkTreeViewColumn.set_cell_renderer): remove, use - GtkTreeViewColumn.pack_start instead - (CTreeNode): added CTreeNode boxed definition - - * gtk/gtk.override (_wrap_gtk_tree_view_column_new): changed from - gtk_tree_view_column_set_renderer to gtk_tree_view_column_pack_start. - -2001-09-25 Matt Wilson - - * gtk/gtk.defs (get_has_resize_grip): bound - (set_has_resize_grip): bound - -2001-09-24 Matt Wilson - - * gtk/gdk.override (_wrap_gdk_pixbuf_render_pixmap_and_mask): - implemented GdkPixbuf.render_pixmap_and_mask. - - * gtk/gdk.defs (GdkPixbuf.render_pixmap_and_mask): set - alpha_threshold default to 127 - - * gtk/gtk.override (ignore): added gtk_entry_new to the big list - of ignores. - - * gtk/gtk.defs (gtk_entry_new_with_max_length): bound - (GtkCList.set_pixmap): default mask to NULL - -2001-09-24 Matt Wilson - - * gtk/gtk.defs (gtk_adjustment_new): added defaults to match - previous version, changed step_increment to step_incr and - page_increment to page_incr to match previous version. - (gtk_table_new): added defaults to match previous version. - -2001-09-22 Matthew Wilson - - * gtk/gtk.defs (ctree_node_from_cobject): added binding. - - * gtk/gtk.override (_wrap_gtk_ctree_node_from_cobject): added a - function to turn a PyCObject into a PyCListNodeObject object. - This is a hack until GtkCTreeNode becomes a boxed type. - -2001-09-21 Matthew Wilson - - * gtk/gtk.override (_wrap_gtk_ctree_new_with_titles): use the same - defaults as previous versions, make count and tree_column optional - (_wrap_gtk_clist_new_with_titles): likewise - -2001-09-21 Matt Wilson - - * codegen/argtypes.py (BoxedArg.write_return): handle returning - both a pointer to a boxed type and a boxed type itself - (ArgMatcher.register_boxed): register both pointers to boxed types - and boxed types themselves - - * gtk/gtk.defs (Style): add "black" and "white" fields. More to - do here later. - - * gtk/gtk.override (_wrap_gtk_radio_button_new): use - new_from_widget, not the group->group member when creating a new - button in a group. - -2001-09-20 James Henstridge - - * pango.defs (FontMetrics): uncomment this now it has a boxed type. - - * gtk/Makefile.am (EXTRA_DIST): add gdk.override to dist. - - * configure.in: update version number. - - * pygobject.h (_PyGObject_Functions.newgobj): rename from new, so - that the header is includable in C++ programs. - -2001-09-19 Matt Wilson - - * gtk/gtk.defs (gtk_message_dialog_new): define defaults - - * gtk/gtk.override (_wrap_gtk_message_dialog_new): override this - function so we can use "%s" as the format string and pass the - entire last argument as a string securely. - -2001-09-19 James Henstridge - - * pango.defs: update for newer Pango API. - -2001-09-19 James Henstridge - - * pango.defs (FontDescription): remove fields from - PangoFontDescription, as it is an opaque type now. - - * configure.in (ACLOCAL): require glib 1.3.8, pango 0.19 and gtk+ - 1.3.8. - -2001-09-18 Matt Wilson - - * gtk/gtk.override (_wrap_gtk_dialog_new_with_buttons): add a cast - in pointer comparison to squelch compiler warning. - -2001-09-18 Matt Wilson - - * gtk/gtk.defs (gtk_dialog_new_with_buttons): note the defaults in - the definition. - - * gtk/gtk.override (_wrap_gtk_dialog_new_with_buttons): implement - a full-featured constructor for GtkDialog that will allow flags - (as well as other parameters) to be passed in during object - construction. The form is a bit different than the C version, - which uses varargs. To pass a list of buttons at construction - time, pass a tuple of text/id pairs as the 4th argument or in the - buttons keyword. - - * gtk/gtk.defs (CTree): add selection to the fields - (GtkCTree::insert_node): note the defaults in the definition. - (GtkCTree::base_nodes): added base_nodes method back into GtkCTree - - * gtk/gtk.override (_wrap_gtk_ctree_insert_node): only require the - first three parameters and use the defaults from previous versions - for all the other values. - (override-attr GtkCTree.selection): implementation for getting the - selection of a CTree - (_wrap_gtk_ctree_base_nodes): ported old base_nodes method to new - binding. - - * gtk/gtk.defs (CList): add columns and selection to the fields - - * gtk/gtk.override (GtkCList.selection): implementation for - getting the selection of a CList - -2001-09-18 James Henstridge - - * gobjectmodule.c (pyg_object_class_list_properties): rename to - gobject.list_properties. - -2001-09-18 Matt Wilson - - * examples/pygtk-demo/demos/treemodel.py: fixed to work with new - namespace - - * gtk/gdk.defs (pixbuf_new_from_file): don't defined - gdk_pixbuf_new_from_file as a constructor of GdkPixbuf. Define it - as pixbuf_new_from_file to match pixbuf_new_from_stream. - - * gtk/gtk.defs (gtk_aspect_frame_new): add defaults to match old - behavior - (gtk_alignment_new): likewise - (GtkCTree::construct): likewise - (gtk_clist_new): likewise - (gtk_clist_new_with_titles): likewise - (gtk_ctree_new): likewise - (gtk_ctree_new_with_titles): likewise - (GtkImage::construct): use gtk_image_new to construct GtkImages - - this allows us to use more than just pixmaps to create them. - (gtk_image_new): new definition. - -2001-09-18 James Henstridge - - * pygobject.h (pyg_type_wrapper_new): export this function. - - * codegen/argtypes.py (GTypeArg.write_return): wrap GType return - values as PyGTypeWrappers rather than ints. - - * codegen/codegen.py (write_source): pass the typecode macros to - pygobject_register_class and pyg_register_interface rather than - references to the get_type functions. - - * pygobject.h (_PyGObject_Functions): fix up prototypes. - - * gobjectmodule.c (check_bases): check if the base class is an - extensionclass before poking around in class->bases. - (pyg_type_*): don't bother storing the _get_type() function for - lazy initialisation. Instead, just store the GType. Also, remove - code for coercing them into numbers. - (pygobject_register_class): take the type, rather that get_type - routine as an argument. - (pyg_register_interface): same here. - (pyg_type_from_object): don't accept types that convert to ints as - being equivalent to GTypes. - (pyg_register_boxed): set the __gtype__ attribute to a - PyGTypeWrapper. - (pyg_type_register): set __gtype__ to a PyGTypeWrapper. - (pyg_type_name): use pyg_type_from_name - (pyg_type_from_name): return a PyGTypeWrapper object. - (pyg_type_parent): update. - (pyg_type_is_a): update. - (pyg_type_children): update. - (pyg_type_interfaces): update. - (initgobject): set __gtype__ attributes to PyGTypeWrapper objects. - (initgobject): make type constants PyGTypeWrapper objects. - -2001-09-17 James Henstridge - - * gtk/gdk.override: don't #define these types to G_TYPE_INVALID, - as they are now valid. - - * gtk/gdk.defs: remove the FrameAction enum -- it is private to - the GIF loader module. - -2001-09-16 James Henstridge - - * gtk/Makefile.am (pygtk_PYTHON): install keysyms.py and not GDK.py - - * gtk/__init__.py: import keysyms, rather than GDK.py - - * gtk/gtk.defs: add missing enums. - - * gtk/gdk.defs: add missing enums. - - * gtk/GDK.py: remove this file. - - * gtk/keysyms.py: put all keysyms here. - -2001-09-15 James Henstridge - - * gtk/libglademodule.c (initglade): fix name of init function. - - * codegen/codegen.py (write_enums): don't write out the - add_constants fucntion if there are no enums/flags. - - * gtk/libglade.override (connect_many): fix small bug in - connection function. - - * gtk/Makefile.am (pygtk_PYTHON): don't install the GTK.py header. - (glademodule_la_SOURCES): rename the libglade module to gtk.glade. - - * pygtk.spec: update spec file, and add -devel sub package. - - * configure.in: use AC_HELP_STRING to format help strings, update - version number. - - * acinclude.m4: remove the AM_PATH_PYTHON macro, as it is in - automake 1.5. - - * Makefile.am: require automake 1.5 to build. - -2001-09-15 James Henstridge - - * gobjectmodule.c (pyg_enum_add_constants): allow '_' as start of - constant name. - (pyg_flags_add_constants): same here. - - * gtk/__init__.py (TRUE): don't import GTK. - - * gtk/gtkmodule.c (init_gtk): same here. - - * pangomodule.c (initpango): add constants to the pango module. - - * codegen/codegen.py (write_enums): new function that writes a - function to add constants for all the enums and flags in the - parser. - (write_source): call write_enums(). - - * gtk/gtkmodule.c (init_gtk): add test use of add_constants. - - * pygobject.h (_PyGObject_Functions): add new functions to header. - - * gobjectmodule.c (pyg_enum_add_constants): new function for - adding constants to a module dictionary from a particular GType. - (pyg_flags_add_constants): similar for flag types. - (functions): add to export function vtable. - -2001-09-14 James Henstridge - - * pygtk-2.0.pc.in (defsdir): fix up defsdir definition. - - * Makefile.am (pkginclude_HEADERS): install ExtensionClass.h - header (this can go when we switch over to python2.2 type/class - stuff. - - * pygobject.h (pyg_register_boxed_custom): same change. - - * gobjectmodule.c (pyg_register_boxed_custom): rename from - pyg_boxed_register to avoid confusion. - -2001-09-14 James Henstridge - - merge from short-class-names-branch - -2001-09-12 James Henstridge - - * codegen/codegen.py (write_class, write_interface): set the short - name as the class name here. - - * gobjectmodule.c (pygobject_register_class): pass ec->tp_name as - the name for the class passed to PyExtensionClass_Export*. - - * codegen/codegen.py (write_source): pass the C name to - pygobject_register_class again. - -2001-09-11 James Henstridge - - * gtk/__init__.py (create_pixmap): few fixups to get things to - import correctly. - - * gtk/gtkmodule.c (init_gtk): there is no _pygdk_register_boxed(). - - * gtk/libglade.override (init): same here. - - * gtk/gtk.override (init): same here. - - * gtk/gdk.override (init): use short class names here. - - * gtk/gtkmodule.c (init_gtk): initialise both the gtk._gtk and - gtk.gdk modules. - - * gtk/gtk.defs: don't include gdk.defs - - * gtk/gtk.override: remove all GDK override wrappers. - - * gtk/gdk.override: new file taking the overrides for GDK - functions. - - * codegen/codegen.py (write_source): register only the short name - of the GObject, interface or boxed type. - -2001-09-13 Johan Dahlin - - * gtk/gtk.defs (CellRendererTextPixbuf): removed. - (gtk_cell_renderer_text_pixbuf_get_type): removed. - (gtk_cell_renderer_text_pixbuf_new): removed. - (gtk_cell_renderer_text_iter_spew): removed. - (row_changed): Renamed. - (row_inserted): Renamed. - (row_has_child_toggled): Renamed. - (row_deleted): Renamed. - (rows_reordered): Renamed, and fixed. - (set_fixed_width): Renamed. - (get_fixed_width): Added. - - * gobjectmodule.c (initgobject): Adjust - g_boxed_type_register_static to compile under latest cvs. - -2001-09-10 Johan Dahlin - - * autogen.sh: add check and usage for AUTOMAKE and ACLOCAL. - -2001-09-06 James Henstridge - - * gtk/GTK.py: fix up enums. - - * gobjectmodule.c (pyg_closure_marshal): if return_value is NULL, - don't set it. - (pyg_signal_class_closure_marshal): same here. - - * gtk/gtk.defs: various updates to make it compile. - - * gtk/gtk-types.c (pygdk_atom_str): fallback to returning the repr - of the atom if we can't resolve its name, rather than returning - NULL. Patch from Skip. - - * gobjectmodule.c (pyg_value_from_pyobject): look at the - fundamental type in this function so we can use a switch statement - that catches the fundamental types easily, reducing the number of - type checks. - (pyg_value_as_pyobject): similar here. Also handle boolean types - using patch from Skip. - - * gtk/GDK.py: add extra constants from Skip. - -2001-08-23 James Henstridge - - * configure.in (build_libglade): add forth argument to - PKG_CHECK_MODULES call so that configure doesn't die a horrible - death when it can't find libglade. - -2001-08-22 James Henstridge - - * gtk/libglade.override: add signal connection function overrieds. - - * pygtk-2.0.pc.in: add a pkg-config data file that contains some - information about how to link other wrapper modules, and where - pygtk installs its defs files. - -2001-08-21 James Henstridge - - * configure.in (build_libglade): add checks for libglade. - - * gtk/libglade*: add the libglade module to the build - - * configure.in: update for autoconf 2.52 - - * gtk/gtk.defs: make GtkAccelGroup a GObject rather than a boxed - type. remove the gtk_tree_model_get_first function. - -2001-07-09 James Henstridge - - * gobjectmodule.c (initgobject): add a gobject.TYPE_PYOBJECT - constant for the PyObject boxed typecode. - -2001-07-08 James Henstridge - - * gobjectmodule.c (pyg_signal_new): fix argument type for - return_type. - (initgobject): register a "PyObject" boxed type with glib.. - (pyg_value_from_pyobject): if the value holds a PY_TYPE_OBJECT, - set the value directly. - (pyg_value_as_pyobject): special case the PY_TYPE_OBJECT case - again. - - * gtk/gdk.defs, gtk/gtk-extrafuncs.defs, gtk/gtk.defs: update to - new format. - - * pango.defs: update to new format. - - * codegen/codegen.py: various fixes to make it work with the new - defs format. - - * codegen/argtypes.py (ObjectArg.__init__): take the typecode as - an argument, and use it to deduce the cast macro (s/_TYPE_/_/). - (BoxedArg.__init__): take typecode as argument explicitly. - (EnumArg.__init__): take typecode as argument explicitly. - (FlagsArg.__init__): take typecode as argument explicitly. - (ArgMatcher.register_enum): pass typecode argument. - (ArgMatcher.register_flag): same here. - (ArgMatcher.register_object): same here. - (ArgMatcher.register_boxed): same here. - - * codegen/definitions.py (ObjectDef): update parser for new format. - (InterfaceDef): same here. - (EnumDef): same here. - (BoxedDef): same here. - (MethodDef): same here. - (FunctionDef): same here. - - * codegen/defsparser.py (DefsParser): add define- prefix to the - defs we look for. - - * codegen/defsconvert.py (convert): new program to convert v2 defs - to v3 defs. It will probably only work with files in the style - created by the h2def.py program. - -2001-07-07 James Henstridge - - * codegen/h2def.py (to_upper_str): add function to convert a type - name to upper case with underscores using the same algorithm as - gtk+ (with an extra rule to catch cases like GObject. - (typecode): function to create a typecode like GTK_TYPE_WIDGET - from the type name. - (write_obj_defs): output v3 defs. - (write_enum_defs): output v3 defs. - (define_func): replace 'G_CONST_RETURN ' to 'const-' for return - value. - (write_func): output v3 defs. - - * codegen/scmexpr.py (parse): make the parser ignore single - quotes, which are used in the new defs format. - -2001-07-03 James Henstridge - - * gtk/gtk.override (_wrap_gtk_list_store_new): fix up function - call. - (_wrap_gtk_tree_store_new): fix up function call. - - * configure.in (AC_OUTPUT): add pygtk-codegen-2.0 to list of files - to be processed. - - * codegen/codegen.py (register_types): fix typo s/parser/defsparser/ - - * gtk/Makefile.am ($(srcdir)/gtk.c): register types from - pango.defs. - - * gtk/gtk.override (init): import the PangoContext and PangoLayout - classes from the pango module. - -2001-07-02 James Henstridge - - * pango.defs: add is-constructor-of arguments to some defs, and - add fields to some object and boxed defs. - - * pango.override: add more overrides. - - * pango.defs: add more boxed type defs. - - * gtk/gtk.defs (dequeue_resize_handler): remove removed function. - - * codegen/override.py (Overrides.__parse_override): fix bug here. - string.find returns negative value on error -- not zero. - - * codegen/argtypes.py (GTypeArg.write_param): fix up arg handler. - - * Makefile.am (pangomodule_la_SOURCES): fix up makefile rules to - build the pango module. - - * pango.override: changes so that it builds properly. - - * configure.in: add line to check for pango and set PANGO_CFLAGS - and PANGO_LIBS. - - * Makefile.am (pangomodule_la_SOURCES): add rules to build pango - module. - - * pango.defs: - * pango.override: - * pangomodule.c: new files for the pango wrapper module. - -2001-07-01 James Henstridge - - * gobjectmodule.c (pyg_signal_list_names): function to list the - signals of an object type. From patch by Skip Montanaro - (pyg_object_class_list_properties): function to list the - properties of a GObject. Also from Skip. - - * gtk/gtk.override (_wrap_gtk_list_store_new): fix to use - gtk_list_store_newv. - (_wrap_gtk_tree_store_new): similar fix here. - -2001-06-30 James Henstridge - - * gtk/gtk-types.c: remove GdkDevice stuff from this file. - - * gtk/gtk.override: add attribute getters for some GdkDevice - attributes, and overrides for some GdkDevice methods. - (_wrap_gdk_event_getattr): change stuff for GdkDevices, as they - are now GObjects. - - * gtk/gdk.defs (Device): add device boxed type here. - - * gtk/gtk.override (_wrap_gtk_selection_add_targets): fix up to - use PyGBoxed version of GdkEvent. - - * gtk/gtk-types.c: remove GdkEvent stuff from here. Also delete - the commented out GdkDragContext code, as the current GObject - implementation has the same features now. - - * gtk/gtk.override (_wrap_gdk_event_getattr): implement the - getattr method for GdkEvents. - - * gtk/gdk.defs (Event): add boxed type here. - - * gobjectmodule.c (initgobject): remove g_type_init() argument. - - * gtk/gdk.defs (Visual): make GdkVisual a boxed. - - * gtk/gtk.override (GdkDragContext.targets): override getter for - this attribute. - (_wrap_gtk_list_store_new): comment out most of this function as - there is no way to construct a GtkListStore without C varargs as - of the last GtkTree related commit. - - * gtk/gtk-types.c: remove uses of GtkSelectionData. - - * gtk/gtk.override (GtkSelectionData.data): override the data - attribute for GtkSelectionData types. - (_wrap_gtk_selection_data_set): override method. - - * gtk/gtk.defs (SelectionData): add GtkSelectionData boxed type - here. - -2001-06-29 James Henstridge - - * codegen/codegen.py (write_getattr): add code to allow overriding - the getter for a single attribute. - (write_boxed_getattr): same here. - - * codegen/override.py (Overrides): add code to handle - "override_attr" statements in an overrides file. - - * codegen/codegen.py (write_getattr): add support for overriding - the complete getattr method for a GObject class. - (write_boxed_getattr): similar change here. - - * configure.in: require 1.3.7 versions of glib and gtk+. - (AC_ARG_ENABLE): fix --disable-thread argument. It was actually - looking for --disable-numpy, which causes all kinds of weirdness. - - * gtk/gtk.override (_wrap_gdk_cursor_new): constructor for - GdkCursor that handles both the standard and pixmap cases for - cursors. - - * gtk/gtk-types.c: remove GdkCursor related stuff from this file. - - * gtk/gdk.defs (Cursor): add boxed type for cursor. - (cursor_new): mark as constructor. - (cursor_new_from_pixmap): mark this one as a constructor as well. - -2001-06-27 James Henstridge - - * codegen/argtypes.py (arg): don't register a boxed handler for - GtkTextIter here. - - * gtk/gtk.override: add overrides for various GtkTextIter methods. - - * codegen/argtypes.py (BoxedArg.write_param): fix up variable type. - - * gtk/gtk.override (_wrap_gtk_text_iter_copy): implement text iter - copy function, and ignore the gtk_text_iter_free function (it - could cause troubles). - (*): replace function calls using the old GtkTextIter wrapper. - - * gtk/gtk.defs: update defs for GtkTextIter. - (TextIter): add text iter boxed type here. - - * examples/pygtk-demo/demos/toolbar.py (main): fix up toolbar - constructor. - - * examples/pygtk-demo/demos/treemodel.py: add on_get_iter() - method, and put tree view in a scrolled window. - - * gtk/pygtktreemodel.c (pygtk_tree_model_get_iter): add missing - function to GtkTreeModel implementation. - - * codegen/argtypes.py (arg): remove registrations for `custom' - boxed types for objects converted to PyGBoxed. - - * gtk/gtk.override: use PyGBoxed calls fro GtkTreeIters. - - * gtk/gtk-types.c: remove GtkTreeIter stuff from here. - - * gtk/gtk.defs (TreeIter): add boxed type here. - -2001-06-26 James Henstridge - - * gtk/gtk-types.c: remove traces of GdkColor from this file. - - * gtk/gtk.override: convert occurences of PyGdkColor_* with - correct PyGBoxed calls. - - * gtk/gdk.defs (Color): add GdkColor boxed type here. - -2001-06-25 James Henstridge - - * gtk/gtk.override (_wrap_gtk_binding_entry_add_signal): new - function, based on implementation from Skip. Some small cleanups - applied. - - * gtk/gtkobject-support.c: remove dead code for GtkArg handling, - etc. (also tidied up references to it in other files). - -2001-06-24 James Henstridge - - * gtk/gtk-types.c: removed all traces of GdkFont. - - * gtk/gdk.defs (Font): add boxed type for font. - - * gtk/gtk-types.c: removed all traces of GdkVisual. - - * gtk/gdk.defs (Visual): add boxed type for visual. - - * gtk/gtk-types.c: remove all traces of GtkAccelGroup from this - file -- GtkAccelGroup is now generated code. - - * gtk/gtk.defs (AccelGroup): add boxed type here. - -2001-06-23 James Henstridge - - * codegen/codegen.py: generate wrappers for boxed types as well. - - * codegen/defsparser.py (DefsParser.boxed): handle (boxed ...) - lines. - - * codegen/definitions.py (BoxedDef): add a class for holding a - Boxed definition. - - * gobjectmodule.c (pyg_signal_new): more fixups to use - pyg_type_from_object. - - * gtk/gtk.override (_wrap_gtk_accel_group_new): don't use - PyGtkAccelGroup_New (not sure why I am fixing this -- will change - soon anyway). - (_wrap_gtk_tree_store_set_value): use pyg_type_from_object here. - (_wrap_gtk_list_store_set_value): same here. - - * codegen/argtypes.py (CustomBoxedArg): rename from BoxedArg. - (BoxedArg): new code for standardised PyGBoxed handling. - (ArgMatcher.register_custom_boxed): rename from register_boxed - (ArgMatcher.register_boxed): new function for PyGBoxed types. - (arg): use ArgMatcher.register_boxed to register GtkAccelGroup. - - * pygobject.h (pyg_boxed_check): change macro to check against the - typecode, rather than python wrapper type. - -2001-06-22 James Henstridge - - * codegen/argtypes.py (GTypeArg.write_param): new arg type for - GType and GtkType args that uses pyg_type_from_object. - - * gobjectmodule.c (pyg_type_from_object): new function to get a - type code from various types of python objects (currently, integer - like objects, strings and other objects that have a __gtype__ - attribute). - (pygobject__init__): use pyg_type_from_object to get the object - type. - (pyg_signal_new): same here. - -2001-06-21 James Henstridge - - * gobjectmodule.c (pyg_boxed_getattro): allow getattr to work on - PyGBoxed types (while not overloading tp_getattr). We fall back - to tp_getattr if provided by the boxed type. - (pyg_register_boxed): make sure tp_getattro is set correctly. - - * gtk/gtk-types.c (_pygtk_register_boxed_types): convert - GtkAccelGroup to a PyGBoxed type. - - * gtk/gtkobject-support.c (pygtk_dict_as_container_args): comment - out, as container args have been switched to properties now. - -2001-06-19 James Henstridge - - * gobjectmodule.c (pyg_value_from_pyobject): handle PyGBoxed - types. - (pyg_value_as_pyobject): pass out PyGBoxed types if no custom - handler is found, rather than straight CObjects. Will need to do - something about cases where we want mutable values (ie. don't copy - the boxed type). - - * configure.in: require glib/gtk+ 1.3.6 - -2001-06-13 James Henstridge - - * gtk/gtk.defs (Dialog): add fields that were missing (pointed out - by Skip). - - * gtk/gtk.override: various updates to overrides file. - -2001-06-12 James Henstridge - - * gtk/gtk.override (_wrap_gtk_tree_view_get_path_at_pos): fix bug - when no keyword arguments are passed in. Bug found by Skip - Montanaro. - - * examples/pygtk-demo/pygtk-demo.py (create_list): correct signal - name. - - * gtk/gtk.defs: update for changes made to gtk. - -2001-06-09 James Henstridge - - * codegen/codegen.py (write_interface): remove the constructor - from interfaces. It is now provided by GInterface. - (write_source): use pyg_register_interface to register interfaces. - - * gobjectmodule.c (PyGInterface_Type): add a GInterface class that - is the base of all interfaces. It prevents subclassing of - interface objects, etc. - -2001-06-08 James Henstridge - - * gobjectmodule.c (pyg_register_boxed): function to register a new - boxed type ExtensionClass. - (pyg_boxed_new): new function to create wrapper instances for a - particular boxed type (given its typecode). - -2001-06-07 James Henstridge - - * pygobject.h (pyg_boxed_get): add prototypes for a PyGBoxed type - that will be used for all boxed types in pygtk (well, I can hope - :) - - * gobjectmodule.c (pyg_register_interface): new function to - register interfaces with. Makes sure I don't accidentally give - the interface a parent class :). Also adds a __gtype__ class - attribute similar to GObject classes. May also make interfaces - subclasses of GInterface at some point. - -2001-05-29 James Henstridge - - * codegen/Makefile.am: install the code generator - - * gtk/Makefile.am: install the pygtk.h header - - * Makefile.am: install the pygobject.h header - - * gtk/gdk.defs, gtk/gtk.defs, gtk/gtk-types.c: changes to make - things compile. - -2001-05-28 James Henstridge - - * codegen/codegen.py (write_source): add code to reorder object - definitions if necessary. To catch ordering problems in .defs - file. - -2001-05-27 James Henstridge - - * codegen/codegen.py (write_source): interfaces don't have - parents. - - * codegen/definitions.py (InterfaceDef.write_defs): don't look for - (parent ...) sections in interface definitions. - - * gtk/gtk.defs (Editable): interfaces don't have parents. - -2001-05-07 James Henstridge - - * examples/gobject/signal.py: register new types. - -2001-05-06 James Henstridge - - * gobjectmodule.c (pygobject__init__): make the __init__ function - choose what GType to pass to g_object_new based on the __gtype__ - attribute. - (pygobject_methods): make __gobject_init__ an alias for - GObject.__init__. - (pyg_type_register): new function for registering new GTypes. - (pyg_type_register): register the type as "module+class" rather - than "module.class", as the second form is considered bad (would - like to use the second form though. - - * configure.in: require 1.3.5 versions of glib and gtk+. - -2001-05-05 James Henstridge - - * codegen/docgen.py (DocbookDocWriter.output_toc): Produce kind of - nice docbook documentation. Example output available at - http://www.gnome.org/~james/pygtk-docs/. - -2001-05-03 James Henstridge - - * codegen/docgen.py (DocWriter): handle output of constructor and - method docs. Use overrides file so as not to output info about - methods we don't actually wrap. - - * codegen/Makefile.am (noinst_PYTHON): update file list. - - * codegen/__init__.py (__all__): update module list. - - * codegen/mergedefs.py: same here. - - * codegen/docgen.py (DocWriter.__init__): same here. - - * codegen/codegen.py: import defsparser instead. - - * codegen/defsparser.py: rename from parser.py. - -2001-05-01 James Henstridge - - * autogen.sh: fix up autogen script to call autoheader - - * gtk/gtk.defs: remove colorsel palette manipulation functions. - -2001-05-01 Matthew Wilson - - * acinclude.m4 (AM_PATH_PYTHON_JH): only run the AC_PATH_PROGS - check if we don't have a PYTHON environment variable set - - * autogen.sh: run autoheader - - * acinclude.m4 (AM_PATH_PYTHON_JH): s/AC_PATH_PROG/AC_PATH_PROGS/ - so we check for more than one python interpreter. - -2001-04-28 James Henstridge - - * Makefile.am, pygtk/Makefile.am: limit the symbols exported by - the various modules to just their module init function. - - * gtk/Makefile.am (_gtkmodule_la_LDFLAGS): only export the - init_gtk symbol. - - * examples/pygtk-demo/demos/toolbar.py (main): remove buttons that - called set_space_size method. - - * gtk/__init__.py: remove __all__ definition. It causes problems - with python 2.1. - - * gtk/gtk.override: updated GtkColorSelection method overrides - (ignore): remove gtk_entry_new from ignore list, as other entry - constructor is gone. - - * gtk/gtk.defs: updates to make it work with current gtk+ - -2001-04-21 James Henstridge - - * codegen/docgen.py, codegen/docextract.py: start of automatic - documentation generator. - -2001-04-08 James Henstridge - - * gtk/gtk.override: same here. - - * gtk/gtk-types.c (_pygtk_register_boxed_types): more fixups - - * gtk/gtkobject-support.c: lots of similar fixups. - - * codegen/argtypes.py (_enum_name): gdk type codes now seem to be - named GDK_TYPE_... and not GTK_TYPE_GDK_... - -2001-04-07 James Henstridge - - * gtk/gtk.defs: lots of defs file updates. - -2001-04-06 James Henstridge - - * codegen/h2def.py: add --onlyobjdefs flag to script. - -2001-03-30 James Henstridge - - * examples/pygtk-demo/demos/toolbar.py (main): toolbar demo. - - * examples/pygtk-demo/demos/buttonbox.py (main): add button box - demo. - - * examples/pygtk-demo: moved rewritten testgtk demo here, and make - changes to account for renamings in gtk. - - * gobjectmodule.c (pygobject_set_property): initialise the GValue - to { 0, }, so set_property actually works. - (pygobject_get_property): same here. - - * gtk/gtk.defs: updated enum/flag defs. - - * gtk/gdk.defs: updated enum/flag defs. - - * examples/gobject/signal.py (D.do_my_signal): add small example - of overriding class closure for a signal introduced from python - code. - - * codegen/h2def.py: add --onlyenums flag to only output enum defs. - -2001-03-27 James Henstridge - - * examples/gobject/signal.py: simple example program that adds a - signal to a class, connects a handler to an instance of that - class, and finally emits that signal. Messages are printed by - both the signal handler and class method closure. - - * gobjectmodule.c (pyg_signal_class_closure_marshal): convert - dashes in signal name to underscores. Why does g_siganl_name use - dashes? - (pyg_signal_class_closure_marshal): fix off by one error when - setting up the python argument tuple. The first element was - getting left uninitialised. Signals introduced in python now - work. - - * gtk/gtk.defs (GtkFileSelection.get_filename): return value is - const. - - * gtk/gtk.override (_wrap_gtk_list_store_set_value): change name. - (_wrap_gtk_tree_store_insert): change name. - - * gtk/gtk.defs (GtkListStore.set_value): change from set_cell to - set_value. - (GtkListStore.set_value): same here. - - * gobjectmodule.c (pyg_signal_class_closure_get): new function to - get the closure used as the `class closure' for signals. We only - need one, as we can get all the information we need from the - invocation hint. - (pyg_signal_new): new function to create new signals. Doesn't - work right yet. - -2001-03-26 James Henstridge - - * gobjectmodule.c (pygobject__class_init__): add some comments - about creating new GTypes here. - - * gobjectmodule.c: add type info functions to module. - -2001-03-24 James Henstridge - - * gtk/gtk-types.c (pygtk_text_iter_is_end): s/is_last/is_end/ - - * gobjectmodule.c (pyg_closure_new): - s/add_fnotify/add_finalize_notifier/ - - * gtk/gdk.defs, gtk/gtk.defs, gtk/gtk.override: various changes to - make it compile again. - -2001-03-18 James Henstridge - - * gtk/pygtktreemodel.c (pygtk_tree_model_class_init): signals are - now created in the gtktreemodel.c, so we don't need to. - - * gtk/gtk.defs (Adjustment): make parent GtkObject, as GtkData is - gone. - (GtkText): remove from binding. - - * codegen/codegen.py (write_source): pass in the get_type function - when registering classes. - (gettypetmpl): remove template. - (write_class): remove get_type method generator. Handled by __gtype__ - - * gobjectmodule.c (initgobject): add argument to g_type_init call. - (pyg_value_from_pyobject): use G_VALUE_HOLDS_* rather than - G_IS_VALUE_*. - (pyg_value_as_pyobject): same here. - (pygobject_register_class): add an argument that takes the - get_type function for the GObject. This is used to add a - __gtype__ attribute to the class (the get_type function is not - actually called until __gtype__ is accessed). - -2001-02-03 James Henstridge - - * gtk/pygtktreemodel.c (*): s/tree_node/user_data/ - - * gtk/gtk-types.c (pygtk_text_iter_forward_to_line_end): rename - function. - (pygtk_tree_iter_compare): fix compare function. - (pygtk_tree_iter_hash): fix hash function. - -2000-12-16 James Henstridge - - * gtk/gtk-types.c (pygtk_text_iter_forward_to_delimiters): rename - function. - -2000-12-14 James Henstridge - - * examples/testgtk/demos/menu.py (main): destroy window on - button's clicked signal rather than destroy signal. - - * gtk/gtk.defs: remove gtk_object_default_construct and - gtk_object_constructed. - - * gobjectmodule.c: change over to new notification functions. - - * gtk/gtk-types.c: rename functions. - - * gobjectmodule.c (pygobject_get_property): - (pygobject_set_property): change function names to match changes - in glib. - (...connect|emit): use g_signal_parse_name instead of - g_signal_lookup, so we can parse the detail out of the signal name - string. - -2000-12-07 James Henstridge - - * examples/testgtk/demos/treemodel.py (MyTreeModel.on_get_path): - fix small typo. - -2000-12-06 James Henstridge - - * gtk/pygtktreemodel.c: fix PyObject_CallMethod calls to add - parentheses around argument type list. - (pygtk_tree_model_get_flags): decref py_ret -- not Py_None - (pygtk_tree_model_get_n_columns): same here. - (pygtk_tree_model_get_column_type): same here. - (*): conditionally print out debugging messages. - - * examples/testgtk/demos/treemodel.py: simple test of - PyGtkTreeModel. - - * gtk/pygtktreemodel.c: set iter->tree_node to NULL when returning - FALSE, as GTK sometimes ignores the return value :( - - * codegen/codegen.py (interfacetypetmpl): don't set the interface - type as having an instance dictionary. - (write_interface): actually use interfacetypetmpl when writing out - the interface type def. - - * codegen/argtypes.py (_conv_special_cases): add a special case - for the underscore version of PyGtkTreeModel. - - * gtk/gtk.override: include pygtktreemodel.h - - * gtk/__init__.py: don't error out if we can't import ltihooks. - - * gtk/gtk-extrafuncs.defs: include defs for PyGtkTreeModel type. - - * gtk/Makefile.am (_gtkmodule_la_SOURCES): compile PyGtkTreeModel - into pygtk. - - * gtk/pygtktreemodel.c: fix errors. - - * gtk/pygtktreemodel.[ch]: check in initial leaky implementation - of the GtkTreeModel for use from python. Can't test it right now - because gtk head is broken. - -2000-11-29 James Henstridge - - * configure.in (enable_thread): update checks for glib/gtk+ to - require at least 1.3.2. - - * codegen/h2def.py (write_enum_defs): Havoc's enum handling patch. - - * TODO: add todo item about creating real GObject subclasses, and - add some info on the GInterface stuff. - - * examples/testgtk/testgtk.py (load_module): fix bug where - mod.__file__ is the .pyc file rather than the .py file. - - * gtk/gtk.defs: change parent type for some classes to GtkDialog - to match changes in gtk+. - - * gtk/Makefile.am (pysitedir, pyexecdir): fix up directory names. - It wasn't installing these files in a gtk/ subdirectory :( - -2000-11-16 James Henstridge - - * gtk/gtk.defs: make changes to make GtkEditable into an - interface. - - * examples/testgtk/demos/__init__.py (demos): create the list of - example modules on the fly, rather than having them hard coded - into a list. - -2000-11-11 James Henstridge - - * examples/testgtk/testgtk.py: start of a revamped testgtk - example, similar to the new one in gtk. - - * gtk/gtk-types.c (PyGdkEvent_New): guard against a NULL axes - member in the GdkEvent structure. - - * gtk/gtk.override (_wrap_gtk_tree_view_get_path_at_pos): - implementation of this function. - - * codegen/argtypes.py (GtkTreePathArg): add an arg matcher for - GtkTreePath objects, that represents them as tuples of integers. - - * gtk/gtk-types.c (_pygtk_register_boxed_types): add marshalers - for GtkTreeIter and GtkTreePath so they can be used from signal - handlers now. - - * gtk/gtk.override, gtk/gtk.defs: make name change for - GtkTreeStore constructor. - -2000-11-10 James Henstridge - - * gtk/gtk.override: ignore the gtk_tree_view_new function, so - gtk_tree_view_new_with_model gets chosen as the constructor. - (_wrap_gtk_tree_store_...): fix up the iterator creation methods - so that they can take NULL arguments. - (_wrap_gtk_tree_view_column_new): new implementation of this - constructor. Map keyword arguments to column attributes. - - * gtk/gtk.defs (gtk_tree_view_new_with_model, GtkTreeView.set_model): - Allow NULL to be passed in as the model argument. - - * gtk/gtk.override: add gtk_tree_model_get_{iter,path,value} - functions. - (_wrap_gtk_list_store_*): add constructor and set_cell - implementations, and impls of the insertion functions that return - the new GtkTreeIter, rather than treating it as an out argument. - (_wrap_gtk_list_store_set_cell): allow string versions of type - codes for convenience. - (_wrap_gtk_list_store_insert): directly access column_headers - structure member as the get_column_type method doesn't exist. - (_wrap_gtk_tree_store_*): constructor, set_cell and tree iter - creation methods added. Ignore [gs]et{,v}. - -2000-11-09 James Henstridge - - * gtk/gtk.defs (ListStore, TreeStore): these implement the - GtkTreeModel interface. - (TreeModel): add interface definition here. - - * codegen/codegen.py (register_types): register interfaces into - the argument type matcher. - (write_source): write out interface source. Register interface - class types before object types, as they may be used by objects. - (write_source): set multiple base classes if an object implements - an interface. - (write_interface): function to write out the code for an - interface. It is really a simplified version of write_class. - - * codegen/parser.py (DefsParser.interface): handle interface - clauses. - - * codegen/definitions.py (InterfaceDef): add a class for interface - definitions. - (ObjectDef): add support for an implements keyword. - - * codegen/codegen.py (write_source): change code generator to pass - bases in as a tuple rather than a single PyExtensionClass - structure. - - * pygobject.h: change prototype. - - * gobjectmodule.c (pygobject_register_class): allow for registerin - a type with multiple base classes. - -2000-11-08 James Henstridge - - * codegen/argtypes.py (_conv_special_cases): add a special case - for converting GObject -> G_OBJECT. - - * gobjectmodule.c (pygobject_connect*): g_signal_connect_closure - renaming. - - * codegen/argtypes.py (arg): add GtkTreeIter support. - - * gtk/gtk-types.c, gtk/pygtk.h, gtk/pygtk-private.h: add a - skeleton for the GtkTreeIter wrapper. - -2000-11-04 James Henstridge - - * TODO: todo file with a few items needed for the gtk 2.0 based - pygtk. - - * gtk/gtk.defs: add new GtkTree widget definitions. - (GtkTreeViewColumn.get_justification): comment out as it doesn't - exist. - -2000-11-02 James Henstridge - - * gtk/gtk-types.c (_pygtk_register_boxed_types): small changes to - handle GtkTextIter objects as arguments to signals, now that Havoc - made the appropriate changes in gtk. - -2000-10-30 James Henstridge - - * gobjectmodule.c (pyg_closure_marshal): reorder parameters to - make it work with latest glib. - (pygobject_connect*): pass 0 for the new detail parameter. Don't - know what it is for. - (pygobject_emit): pass 0 for detail parameter. - (pygobject_stop_emission): pass 0 for detail parameter. - - * gtk/gtkmodule.c (init_gtk): init as module gtk._gtk. Using just - _gtk doesn't seem to work with python 2.0 - -2000-10-29 James Henstridge - - * examples/ide/gtkcons.py: small changes to make example run. - - * gtk/gtk-types.c: add GtkTextIter.forward_search implementation. - - * gtk/gtk.override: more override functions. - - * gtk/gtkobject-support.c: remove some of the unused functions from - this file. - -2000-10-28 James Henstridge - - * gtk/gtk.override: override the functions used to initialise - GtkTextIter objects so that they return the iterator rather than - setting up an static GtkTextIter structure. - - * gtk/gtk.defs (TextMark): add missing GtkTextMark object. Don't - know why h2defs missed it. - ("gtk-extrafuncs.defs"): include gtk-extrafuncs.defs. - - * codegen/argtypes.py: add GdkDevice and GtkTextIter to list of - recognised boxed types. - - * gtk/gtk-types.c: add skeleton implementation of GtkTextIter. - - * gtk/pygtk.h, gtk/pygtk-private.h: add prototypes for GtkTextIter - wrapper. - - * gtk/gtk.override: ref and sink GtkObjects which have their - constructors listed in the overrides file. This should get rid of - the last few warnings on exit related to reference counting. - - * codegen/codegen.py: use the keyword module to check for method - and argument names that conflict with the python keywords. By - using this module, we shouldn't have problems with new keywords in - future versions of python. - -2000-10-27 James Henstridge - - * gobjectmodule.c (pygobject_emit): support for emiting signals on - GObjects from python. - - * codegen/codegen.py (write_constructor): sink GtkObjects. This - prevents us losing our reference to the object if it is sunk. - - * codegen/argtypes.py (ArgMatcher.object_is_a): function to check - if one object type is another type. - - * codegen/codegen.py (register_types): pass the parent type when - registering a new GObject type. - - * gtk/gtk-types.c (_pygtk_register_boxed_types): register - marshalers for the various boxed types, so that they work as - expected inside the signal handlers. - - * gobjectmodule.c (pygobject_repr): small change to match style of - other repr functions in python. - - * gtk/gtkmodule.c (init_gtk): only call g_thread_init() if pygtk - threading support is enabled. - - * configure.in (enable_thread): add configure checks so that - threading support can be disabled even if python was compiled with - it. It defaults to off for now because GSignal has some mutex - deadlocks at the moment. - -2000-10-26 James Henstridge - - * gtk/gtkmodule.c (init_gtk): remove gtk_signal_set_funcs call. - - * gobjectmodule.c (pyg_value_from_pyobject): default to using - CObject for unknown boxed values and pointer values. - (pyg_value_as_pyobject): same here. - (pygobject_connect*): Add signal connection functions. - - * gobjectmodule.c (pyg_boxed_register): new function for - registering functions to marshal boxed GValues to/from their - python wrappers. - (pyg_value_from_pyobject): add boxed support. - (pyg_value_as_pyobject): add boxed support. - (pyg_closure_new): new function to create a python GClosure. - (pyg_closure_destroy): cleanup function for a PyGClosure. - (pyg_closure_marshal): marshaler for PyGClosure. - (pyg_value_as_pyobject): add const to GValue argument. - - * pygobject.h: export a pyg_boxed_register function to register - new boxed types for use with pyg_value_from_pyobject and - pyg_value_as_pyobject. - -2000-10-25 James Henstridge - - * gtk/gtkmodule.c (init_gtk): set the default python character - encoding to UTF-8. - - * gtk/gtk.defs: more setting constructors and default arguments. - - * gtk/gtk.defs: more updates. - - * gobjectmodule.c (pygobject_getattro): return NULL on error. - This fixes the segfault :) - - * gtk/gtk.defs (Bin): add a field just to test pygobject_getattro. - It isn't working quite properly at the moment though :( - - * gobjectmodule.c (check_bases): class->bases is a tuple -- not a - list. - (check_bases): check if class->bases != NULL before using it :( - - * gtk/gtk.defs: comment out new tree widget stuff at hp and owen's - suggestion. - - * gtk/__init__.py: import gobject here as well to prevent weirdness. - - * gtk/gtk.defs: more updates, adding (is-constructor-of ...) and - (default "...") clauses. - - * gtk/gtk.override (_wrap_gtk_button_new): handle the accel_group - argument, and try to create a stock button if possible. - - * gtk/gtk.defs, gtk/gdk.defs: various small fixes. - - * gtk/gtk.override: fix lots of overrides to work with gtk 2.0 - -2000-10-24 James Henstridge - - * gtk/gdk.defs: remove unneeded gdk_input_* functions. - - * gtk/gtk.override: small updates. - - * gtk/gtk.defs: update with defs from all of gtk. - - * codegen/h2def.py (find_enum_defs): small fix to enums parsing. - - * gtk/gtk-types.c: add support for GdkDevice and convert function - names to lowercase. - - * gtk/gtkmodule.c: add GdkDevice stuff to PyGtk_API. - - * gtk/pygtk.h, gtk/pygtk-private.h: add GdkDevice to list of boxed - types. - -2000-10-23 James Henstridge - - * gobjectmodule.c: don't set the getattr method on objects if it - isn't already set. Also, install a getattro handler that will - perform the usual method/attribute lookup and then call the - getattr method for all base classes to allow specifying of class - specific attributes - -2000-07-03 James Henstridge - - * gtk/gtkmodule.c (init_gtk): actually initialise the gobject stuff - for gtk._gtk. - - * pygobject.h (pygobject_check): call the correct ExtensionClass - check macro. - (init_pygobject): small fixup here. - - * codegen/codegen.py (noconstructor): handle the null constructor - better. - (consttmpl): use pygobject_register_wrapper. - (getattrtmpl): make the getattr function raise an exception on - unhandled attributes. I will use a tp_getattro function to bind - all the getattr functions of base classes together. - - * gtk/gtk-types.c (_pygtk_register_boxed_types): commented out the - object implementations for types that have been converted to - GObjects. - - * gtk/gtkobject-support.c: commented out some of this code to get - it to compile again. Also converted some functions over to GObject. - - * codegen/argtypes.py (EnumArg,FlagsArg): use the version from gobject. - - * gtk/gtkmodule.c: update - - * gtk/gtk.override: fix up the overrides for the new gdk.defs stuff. - (GTK_TYPE_GDK_*): add some dummy defines to make things compile until - the gdk-pixbuf enums are added to - - * codegen/argtypes.py (ObjectArg.write_param): use PyGObject - rather than PyGtk_Object. - - * pygobject.h (pygobject_check): add check function. Just a wrapper - around ExtensionClassSubclassInstance. - - * codegen/codegen.py: updated to use PyGObject rather than - PyGtk_Object. - - * gtk/gtk.defs: removed most of the stuff here so I can test out - the gdk stuff. - - * gtk/gdk.defs: updated to gdk-1.3. A lot of stuff in here. - - * codegen/h2def.py (verbose): remove the special case for GtkObject. - (find_obj_defs): amend regexes so that GObject is considered a valid - object name. - -2000-06-29 James Henstridge - - * gobjectmodule.c: use pygobject.h. - (pygobject_[gs]et_param): free the GValue afterwards so as not to - leak memory. - - * pygobject.h: header for modules that want to use GObject. - -2000-06-28 James Henstridge - - * gobjectmodule.c: add get_data / set_data methods. - Add get_param / set_param methods. - (pygobject__init__): simple init function for GObjects. Doesn't - handle params yet. - (pygobject_register_wrapper): don't ref the GObject -- it isn't like - GtkObjects where we ref/sink them. - (pygobject_queue_param_changed): add queue_param_changed method. - -2000-06-27 James Henstridge - - * gobjectmodule.c (pygobject_dealloc): start of gobject wrapper. - -2000-06-19 Frederic Gobry - - * gdkimlibmodule.c: do an actual call to create_from_array instead - of create_from_data, and fixed broken test on alpha channel - -2000-04-15 James Henstridge - - * gtkmodule.c: move gtk_set_locale here, and set LC_NUMERIC back to - "C" after call. Python's numeric locale should be fixed on C. - -2000-04-07 James Henstridge - - * NEWS: added news items. - - * pygtk.spec, configure.in: updated version number. - - * configure.in (enable_numpy): added --disable-numpy argument that - disables numeric python support even if numpy is found. - - * gtkmodule.c (PyGdkWindow_{Pointer,Keyboard}{Grab,Ungrab}): new - GdkWindow methods. - - * gtk.py (rc_reparse_all): fix spelling mistake. - (GtkTreeItem.__getattr__): fix bug reported by Aaron Digulla. - - * generate/gtklists.defs (gtk_clist_get_selectable): fix bug in - return type. - -2000-04-06 James Henstridge - - * (lots of files): switch over to using libtool and automake-1.4a. - -2000-03-13 James Henstridge - - * pyglade/__init__.py: remove python-1.4 ni stuff, and put in a - warning message that you should think of switching over to libglade. - - * pygtk.spec: incremented version number. Code gtk+ dependency into - spec file. Made auxillary packages depend on the pygtk package of - the same version. - - * configure.in: incremented version number. Incremented minimum - required GTK+ so that when threading is compiled in we don't get - problems caused by using old buggy versions of GTK+. - - * gtkmodule.c (PyGdkWindow_PropertyChange): fixed the 32 bit data - part of the case statement correctly this time :) - -2000-03-08 James Henstridge - - * gtkmodule.c (PyGdkWindow_PropertyChange): fixed up problem in - property_change method that could cause a crash if data of - size 16 or 32 was set. - (PyGtkStyleHelper_SetItem): added missing return that could cause - a fallthrough to the g_assert_not_reached() call when setting a - bg_pixmap element on a GtkStyle. - -2000-03-03 James Henstridge - - The following is from Paul Clifford - - * libglade.py (GladeXML.signal_autoconnect): pass all the extra - arguments to autoconnect. - - * libglademodule.c (connect_many): don't exit if the handler is - a tuple instead of a function. - - The following fixes are from John Ehresman - - * gtk.py (GtkWidget.set_scroll_adjustments): return the value to - user. - - * gtkmodule.c (GtkArg_AsPyObject): check if GtkObject is not NULL. - (_wrap_gtk_clist_get_pixmap, _gtk_clist_get_pixtext): check that - returned pixmap is not NULL. - (_wrap_gtk_ctree_node_get_pixmap, _gtk_ctree_node_get_pixtext): check - that returned pixmap is not NULL. - - * gtk.py (GtkToolbar): wrap callbacks when inserting a toolbar item. - (GtkNotebook.set_menu_label_text): fixed typo - (GtkTreeItem.__getattr__): wrap subtree attribute. - -2000-03-01 Frederic Gobry - - * gtkmodule.c (PyGtkSelectionData_GetAttr): added .length field, - so that it is possible to check for invalid selection during - copy/paste. - -2000-02-23 Frederic Gobry - - * gtkmodule (GtkRet_FromPyObject): added missing break in switch. - -2000-02-21 James Henstridge - - * gtk.py (GtkTable.resize): added missing function. Patch from - wrobell . - - * generate/gtkcontainers.defs (gtk_table_resize): added missing - function. - -2000-02-20 James Henstridge - - * gtk.py (GtkCList.get_[hv]adjustment): apply fix from Martin - Preishuber. - -2000-02-16 James Henstridge - - * configure.in, pygtk.spec: updated version to 0.6.4 - -2000-01-27 Elliot Lee - * gtk.py: s/sel/self/ in GtkSpinButton.get_adjustment() - -2000-01-26 James Henstridge - - * gtk.py (GtkObject.__hash__): use C level GtkObject for hash - function. - (GtkAccelGroup.__cmp__): use C level object for comparisons. - (GtkAccelGroup.__hash__): use C level object for hashing. - - * gtkmodule.c: added hash functions for many object types. - -2000-01-25 Kelly Lynn Martin - - * gtk.py (gdk_beep): new wrapper - * gtkmodule.c (_wrap_gdk_beep): new implementation - -2000-01-21 Matt Wilson - - * generate/generate.py: add a hack to allow a null-ok flag on the - return type. This lets us create wrappers which return None if - the C function returns NULL. - - * generate/gtklists.defs (gtk_ctree_node_nth): return None when - gtk_ctree_node_nth returns NULL. - -2000-01-20 Matt Wilson - - * gtkmodule.c (PyGtk_New): disable object sinking for now, until - we rework the .def file and generation routines to know which - functions are creators. - -2000-01-20 Matt Wilson - - * gtk.py (GtkCList.row_move): s/soure_row/source_row/g typo - -2000-01-17 Matt Wilson - - * gtkmodule.c: following changes from ChiDeok Hwang - - - * gtkmodule.c (_wrap_gtk_adjustment_set_all): parse the 6 optional - arguments. - - * gtkmodule.c (_wrap_gtk_widget_draw, - _wrap_gtk_widget_size_allocate, _wrap_gtk_widget_intersect, - _wrap_gdk_color_alloc): fix PyArg_ParseTuple format strings to use - shorts instead of ints where necessary. - - * gtkmodule.c (_wrap_gtk_toolbar_insert_item): check to make sure - callback isn't Py_None before Py_INCREF() - - * gtkmodule.c (_wrap_gtk_toolbar_insert_item, - _wrap_gtk_toolbar_append_item, _wrap_gtk_toolbar_prepend_item): - fix broken ParseTuple specification strings. - - * gtkmodule.c (_wrap_gtk_clist_get_selection): use - GPOINTER_TO_UINT to get row. - -2000-01-17 Matt Wilson - - * libglademodule.c (connect_one, _wrap_glade_xml_signal_connect): - don't INCREF objects passed into Py_BuildValue as they are - INCREF'ed for you automatically. Pass new PyObjects in with 'N' - to consume the reference. - - * gtkmodule.c (PyGtk_New): sink the object upon creation. We - don't want floating GtkObjects. - - * gtkmodule.c: general cleanups, testing for success of PyObject - creation, reference count fixes. Several functions used - Py_BuildValue with 'O' format strings. This increfs the object - passed into the tuple where. When using Py*New in Py_BuildValue, - use 'N' in the format string to consume the reference of the new - object. - -2000-01-05 Matt Wilson - - * gdkimlibmodule.c, gtkglmodule.c, gtkmodule.c: Patch from ChiDeok - Hwang to decref PyObjects retrieved by - PySequence_GetItem. - -1999-12-18 Matt Wilson - - * gtkmodule.c (_wrap_gtk_clist_get_rows): removed function - - * generate/gtklists.defs (GtkCList): add field for rows - -1999-12-16 Matt Wilson - - * gtk.py (GtkCList.__getattr__): oops - left out the _gtk. part - -1999-12-15 Matt Wilson - - * gtk.py (GdkColor): added a function to create a GdkColor - object. You should use this if you don't want to allocate a color - before passing it into functions that don't need an allocated - color. - - * gtkmodule.c (_wrap_gdk_color_new, PyGdkColor_GetAttr): add a - functions to create and modify a GdkColor object. - -1999-12-15 Matt Wilson - - * gtk.py (GtkCList.__getattr__): added 'rows' attribute. - - * gtkmodule.c (_wrap_gtk_clist_get_rows): added wrapper to get - number of rows in a clist - - * gtkmodule.c (PyGtkStyle_New): If the GtkStyle passed in is NULL, - return a None object. This is a bit of a hack, but without it - you'll fail NULL assertions when you attach to the style_set - signal. - - * generate/gtkmisc.defs (gtk_pixmap_new): mask is null-ok. - - * generate/gtklists.defs (gtk_clist_set_pixmap): likewise. - - * pygtk.h (PyGdkBitmap_Check): define PyGdkBitmap_Check to be the - same as PyGdkWindow_Check. - - * gtkmodule.c: -Wall cleanups - - * libglademodule.c (init_libglade): removed unused variable - - * gdkimlibmodule.c (_wrap_gdk_imlib_init): s/static/static int/ - -1999-12-12 Matt Wilson - - * generate/generate.py (FunctionDefsParser.define_func): added new - string_or_null type to check for NULL when passing strings back - -1999-09-30 James Henstridge - - * pygtk.spec: updated spec file. - - * NEWS: added news items - - * configure.in: updated version number. - - * libglademodule.c: don't segfault when a widget name does not exist. - -1999-09-28 James Henstridge - - * libglade.py: enable gnome functionality if it is available. - - * gtk.py (GtkEditable.__getattr__): added accessors to GtkEditable. - - * generate/gtkedit.defs (GtkEditable): added accessors for some - fields of the GtkEditable. - - * gtkmodule.c: added _raise, lower and input_get_pointer methods to - the GdkWindow wrapper. - - * gtk.py (GtkAspectFrame.__init__): fixed prototype for GtkAspectFrame - -1999-08-25 Matt Wilson - - * gtkmodule.c (_wrap_gdk_char_width): added wrapper for gdk_char_width - * gtk.py (gdk_char_width): added wrapper for gdk_char_width - -1999-08-09 James Henstridge - - * pygtk.spec: updated spec file, and added subpackages pygtk-glarea - and pygtk-libglade. Also incremented version number. - -1999-08-08 James Henstridge - - * NEWS: updated news file. - - * configure.in: increased version number to 0.6.2. - - * gdkimlibmodule.c (_wrap_gdk_imlib_image_get_array): make sure that - the image data is not freed while the returned array is in use, so - that we don't get into an inconsistent state. - - * gtk.py: added gdkrgb functions to this file. - - * gtkmodule.c: added the gdkrgb functions for drawing rgb and greyscale - images. - (gdk_draw_array): a new function that will draw a numpy array to a - drawable with gdkrgb. It is written so that it can handle slicing - on the first two axes -- it does not handle non contiguous data on - the third axis. - -1999-08-04 Matt Wilson - - * GdkImlib.py (create_image_from_xpm): new wrapper for creating - imlib images from xpm data - - * gdkimlibmodule.c (_wrap_gdk_imlib_create_image_from_xpm): New - wrapper - -1999-08-03 James Henstridge - - * description.py (GdkWindow): added descriptions of the new routines. - - * gtkmodule.c (GdkWindow.property_{get,change,delete}): new functions - for manipulating the properties on a window. - - * gtk.py (_window_foreign_new, _root_window): added wrappers for - the new functions. - - * gtkmodule.c: added xid attribute to GdkWindow's, and added functions - gdk_window_foreign_new and gdk_get_root_win. The second function is - simply a wrapper that returns a GdkWindow for the root window. - -1999-08-02 James Henstridge - - * libglade.py: new file that wraps the _libglade module. - - * libglademodule.c: handle connecting to another object correctly. - - * gtkmodule.c: added support for passing an object for - gtk_signal_connect_object type behaviour. - (_wrap_gtk_signal_connect_object) - (_wrap_gtk_signal_connect_object_after): new wrappers. - - * gtk.py (idle_add, timeout_add, quit_add): pass extra arguments to - the callback. - - * libglademodule.c (_wrap_glade_xml_signal_connect): fixed a small - problem with reference counting here. - - * gtkmodule.c: added support for passing arguments to timeout, quit - and idle functions. - -1999-08-01 James Henstridge - - * pyglade/build.py (optionmenu_new): a small fix from David Cole. - - * configure.in: added tests to see if libglade is installed. - - * libglademodule.c: the rest of the libglade module - - * generate/libglade.defs: a .defs file for libglade. - -1999-07-31 James Henstridge - - * gtkmodule.c: put in Paul Fisher's enhancements to the threading - code. It should now work better with multiple threads calling - GTK+ routines (remember to use threads_enter/threads_leave), and - doesn't reintroduce the global interpreter lock problems that - Duncan's original code worked around. - - * configure.in: added a check for the numpy header. - - * GdkImlib.py: added wrappers for the numpy routines. - - * gdkimlibmodule.c: added Travis Oliphant's Numeric python stuff to - the imlib module. - -1999-07-20 Matt Wilson - - * gtk.py (gdk_flush): new wrapper - * gtkmodule.c (_wrap_gdk_flush): new implementation - -1999-07-19 James Henstridge - - * gtk.py (GtkAdjustment.set_all): a wrapper for the new function. - - * gtkmodule.c (_wrap_gtk_adjustment_set_all): simple wrapper for - setting values on an adjustment. - - * gtk.py (GtkCList.get_column_width): a wrapper for this new function. - - * gtkmodule.c (_wrap_gtk_clist_get_column_width): a function to get - the column width for a column in a clist. - - * gtk.py (_filtprops): convert GtkAccelGroup and GdkImlibImage types - back to the C equivalents. This makes adding GnomeCanvasImage items - to the GnomeCanvas easier. - (GtkCTree.node_get_selectable): added wrapper function. - -1999-07-18 James Henstridge - - * gtkmodule.c (_wrap_gdk_threads_enter): don't use PyGTK_BLOCK_THREADS, - since it should only be called outside the gtk main loop. Instead - use Py_BEGIN_ALLOW_THREADS. - - * examples/gl/*: new examples of use of gtkgl. - - * gtkgl.py: renamed from GtkGL.py. - - * gtkglmodule.c (_wrap_gtk_gl_area_new, _wrap_gtk_gl_area_share_new): - fixed small typo. - - * GtkGL.py: added constants. - -1999-07-15 James Henstridge - - * configure.in, Makefile.am: added tests for gtkglarea. - - * GtkGL.py: python wrapper for the GtkGLArea widget, and a few extra - functions for use with the widget. - - * generate/gtkgl.defs, gtkglmodule.c: added wrapper for gtkglarea. - -1999-07-14 James Henstridge - - * gdkimlibmodule.c: modified to use the pygdkimlib.h header. - - * pygdkimlib.h: new file similar to pygtk.h, but for _gdkimlib module. - - * gdkimlibmodule.c: modified to use the pygtk.h header. - - * gtkmodule.c: modified file to use the pygtk.h header, and set - up the _gtk._PyGtk_API object correctly. - - * pygtk.h: a new file with a similar use to the arrayobject.h in - numeric python. I will convert over to using this in pygtk and - gnome-python. - -1999-07-13 James Henstridge - - * gtkmodule.c (_wrap_gdk_threads_enter): unblock threads when waiting - for the GDK lock. This allows other threads to unlock it, and should - prevent some deadlocks. - - * gtkmodule.c (gtk_main_iteration, gtk_events_pending): removed code - to unlock gtk thread -- Owen fixed this properly in gtk. - -1999-07-12 James Henstridge - - * gtk.py: fixed a few bugs reported by Ville Lauriki. - - * generate/gtkmenus.defs (gtk_item_factory_add_foreign): fix a typo. - - * gtkmodule.c: fixed problems if gdk_atom_name returns NULL. - - (_wrap_gtk_main_iteration, _wrap_gtk_events_pending): added - GDK_THREADS_LEAVE() and GDK_THREADS_ENTER() calls round these - functions. Without this, it deadlocks if threads are enabled. - - * generate/gtklists.defs (GtkTreeItem): added wrapper for - treeitem->subtree attribute. - - * pyglade/build.py (text_new): small fix. - -1999-05-19 James Henstridge - - * NEWS: added news about changes in this version. - - * configure.in, pygtk.spec: updated version number to 0.6.1. - -1999-05-13 James Henstridge - - * gtkmodule.c (PyGtk_item_factory_cb): forgot to wrap the function - call in PyGTK_{,UN}BLOCK_THREADS -- this was causing seg faults - for people with threading built into their python. - (PyGtk_MenuPosition): similar fix. - -1999-04-25 James Henstridge - - * gtk.py (GtkWidget.get_allocation): a wrapper for the new function. - - * gtkmodule.c: added a routine for getting the allocation of a widget. - -1999-04-22 James Henstridge - - * NEWS: added a summary of the new features. - - * pygtk.spec: upped version number. - - * configure.in: upped version number to 0.6.0. I think thread support - is a big enough feature to bump it up to 0.6. - -1999-04-21 James Henstridge - - * gtk.py (create_bitmap_from_data): added new wrapper. - - * gtkmodule.c: added gdk_bitmap_create_from_data function. Also - export PyGtk_BlockThreads and PyGtk_UnblockThreads through the - _private dictionary, so they can be used from within other modules - (gnome-python in particular). - -1999-04-20 James Henstridge - - * pygtk.spec: updated package version number. - - * configure.in: added a check for the python thread module. If it - is found, then also link _gtkmodule to the gthread library. - Incremented minimum GTK version to 1.2.1. - Incremented version to 0.5.13. - - * gtkmodule.c: call g_thread_init if python was built with thread - support. This is required to turn thread support on inside gdk/gtk. - - * gtk.py: added new functions. - (GtkList.insert_items): this function wasn't looking at the internal - GtkObject for the children to insert, so would fail. - - * generate/gtkbase.defs (gtk_widget_accelerators_locked): new func. - - * generate/gtkmenus.defs (gtk_item_factory_add_foreign): new func. - (gtk_menu_get_accel_group): new func. - (gtk_menu_reorder_child): new func. - (gtk_menu_shell_deselect): new func. - - * gtkmodule.c (_wrap_gtk_combo_set_popdown_strings): accept any - sequence for the second argument, rather than just lists. - (_wrap_gtk_init): check the return value, and throw an exception - when a connection to the X server could not be made, rather than - exiting. - - * gtk.py: got rid of some warnings when pygtk is imported when - DISPLAY is not set. Not completely necessary, but it doesn't hurt. - (GtkObject.remove_data) fixed small bug pointed out by Duncan Grisby. - -1999-04-08 James Henstridge - - * gtk.py (threads_enter,threads_leave): export these two new functions. - - * gtkmodule.c: applied a modified version of Duncan Grisby's threading - patch. The changes were mainly inlining some of the code with macros - and making it so that the extra code was not added unless python - was compiled with thread support. Also added wrappers for - gdk_thread_enter and gdk_thread_leave. - - * gtk.py (GtkList.{,un}select_item): fixed small bug reported by - Ben Darnell. - - * gtkmodule.c: fixed some small bugs in gtk_ctree stuff. Thanks go - to Chi-Deok Hwang. Also fixed the bug in gtk_clist where I copy - and pasted from. - - * gtk.py (GtkNotebook.set_tab_label_text): Small typo. Fix from - Toby D. Reeves. - -1999-03-13 James Henstridge - - * examples/testgtk/testgtk.py: Applied some fixes from Chi-Deok Hwang - to this example. Mainly clean ups needed because of me not changing - testgtk with the rest of pygtk. - -1999-03-12 James Henstridge - - * configure.in, pygtk.spec: increased version number to 0.5.12. - - * gtkmodule.c: added optional support for not catching exceptions in - callbacks. This way it should be a lot easier to debug a pygtk - program with pdb. - - * gtkmodule.c, gtk.py: a few fixes for problems sent in by - Chi-Deok Hwang. This includes a fix to GtkWidget.event(), - assignments to GtkStyle attributes throwing exceptions, - font loading getting reference counting correct and throwing - exceptions for bad font names and allowing None to be passed - as a colour to GnomeCanvasItem.set() (the fix is in pygtk). - - * generate/gtklists.defs (gtk_ctree_new): I had missed this - function in previous releases. - -1999-02-24 James Henstridge - - * gtk.py: made changes to match those in the defs files and _gtk. - - * description.py (GdkGC.set_dashes): describe new GdkGC method. - - * generate/gtkcontainers.defs: removed gtk_window_set{focus,default}, - since these are internal to GtkWindow. Also added - gtk_handle_box_set_handle_position and gtk_handle_box_set_snap_edge. - - * gtkmodule.c: added gtk_widget_get_child_requisition. - (PyGdkGC_GetAttr): added method GdkGC.set_dashes to set the dash - pattern for this GC. - -1999-02-23 James Henstridge - - * pyglade/build.py: added some code to get the option menu creation - code working. - - * pyglade/xmlparse.py: check if xmllib is included in the standard - python library, use it for the XML parser -- it is much more complete, - and doesn't barf on some valid XML files like the old one does. If - xmllib is not found, the old parser is used. - - * README, Makefile.am, pygtk.spec: added references to the MAPPING - file. - - * MAPPING: new file describing the mapping of GTK+ onto python as - pygtk does it. - -1999-02-22 James Henstridge - - * description.py (GdkCursor): added information about this type. - - * gtk.py: commented out the __getattr__, __setattr__ and __delattr__ - methods of GtkObject. There were too many things that broke because - of these changes. If I can get these to work correctly in the - future, I will consider re-enabling it, but not till then. - - * examples/testgtk/testgtk.py (create_cursor_test): added a cursor - test to the python testgtk. It is adapted from the translation sent - in by Osamu Tanimoto. - - * gtkmodule.c: fixed a bit of bad copy'n'paste in the GC part of the - style wrapper code. Thanks go to Osamu Tanimoto . - (PyGdkCursor_GetAttr): now GdkCursor objects have a type attribute - that returns the type number for the object, and a name attribute - that gives a string representation of that type number. - -1999-02-20 James Henstridge - - * gtk.py (GtkTooltips.set_tip): made tip_private argument optional. - (GtkObject.__[gs]etattr__, GtkObject.__delattr__): added some more - fixes to this code so that it shouldn't throw exceptions as much - when it shouldn't. - - * gtkmodule.c: PyGdkEvent_New wasn't interpreting GDK_BUTTON_RELEASE - events correctly. Also some fix ups for gtk_menu_popup. - - * generate/gtkcontainers.defs (gtk_container_set_focus_child): allow - null child argument. - -1999-02-19 James Henstridge - - * gtk.py: added __getattr__ and __setattr__ methods to GtkObject so - that you can set data on a GtkObject directly in a persistent way - (reference counting problems prevent pygtk from always passing the - same python object to a callback). These functions ignore attributes - starting with an underscore. - Also modified all the other __getattr__ methods to call their - parent class's __getattr__ method when they fail instead of - raising an exception. - - * gtk.py: some changes to make use of the new null-ok flags. - - * generate/*.defs: added some null-ok tags where appropriate. - - * gtkmodule.c: removed gtk_frame_new, as the null-ok change in - generate.py makes it unnecessary. Also gtk_spin_button_new_no_adj - has been removed because it is no longer necessary. - - * generate/generate.py (FunctionDefsParser.define_func): altered the - code generation routines so that they recognise the (null-ok) tag in - the .defs file. This should give a lot more flexibility to the - generator, and allow me to move some of the special case code in - gtkmodule.c back to the .defs files. The null-ok tag is currently - only recognised for string, object and boxed type arguments. - - * gtkmodule.c: fixes to the gtk_window_set_geometry_hints function to - throw an exception for bad aspect values. Also let it understand - integers for aspect values. - Also fixed up gtk_menu_popup so that you could give None for a few - more arguments. - -1999-02-16 James Henstridge - - * description.py: added documentation about GtkStyle changes to this - pseudo module. - - * gtkmodule.c: added a new python type GtkStyleHelper that is used - by python GtkStyle objects as a sequence type that alows us to write - back to the arrays in the GtkStyle object. I have also made it - possible to update the font and (black|white){,_gc}. I also added - a GtkStyle.copy() method. This gives the user everything they need - to alter styles inside their applications. I still believe that - rc files are better, but there seem to be a lot of people who want - this functionality. - - * gtkmodule.c (_wrap_gtk_window_set_geometry_hints): made changes so - apect ratios can be set to integers. Also made it throw an exception - for aspect ratios of zero, since this caused my X server to crash - a few times. - -1999-02-15 James Henstridge - - * gtk.py (GtkPaned.set_position): added function. - - * generate/gtkcontainers.defs (gtk_paned_set_position): added new - function - -1999-02-14 James Henstridge - - * gtk.py: added GtkWindow.set_geometry_hints to match below addition. - - * gtkmodule.c: added gtk_window_set_geometry_hints. - -1999-02-08 James Henstridge - - * description.py (GdkWindow.depth): documented presence of this - attribute. - - * gtk.py (GtkFileSelection.complete): I had left out the argument in - this prototype. Fixed now. - -1999-02-04 James Henstridge - - * gtk.py (create_pixmap_from_xpm,create_pixmap_from_xpm_d): altered - these functions to use the gdk_pixmap_colormap_create variants if - the first argument is a GtkWidget or GtkStyle. This means you - don't have to realise the widget before creating pixmaps from it. - (GtkCheckMenuItem.set_state, GtkToggleButton.set_state): removed - these compatibility routines so they don't mask GtkWidget.set_state. - - * gtkmodule.c: moved gtk_item_factory_get_widget here so I can catch - NULL returns and convert them to None returns. Also added the - depth attribute to GdkWindow objects. - Also added gdk_pixmap_colormap_create_* variants. These can be used - if you only have a colormap reference, rather than a window. - - * GtkExtra.py: there were a couple of calls to - GtkContainer.border_width which is deprecated. - - * examples/testgtk/testgtk.py: fixes to dnd code in this example. I - hadn't looked at it since Owen made the dnd changes. - - * examples/simple/tooltip2.py: fixed small bug pointed out by Markus - Oberhumer. - - * pyglade/build.py (clist_new): fixes to make it parse after clist - changes. - -1999-02-02 James Henstridge - - * generate/gtklists.defs, gtk.py: added GtkCList.focus_row. - - * _gdkimlibmodule.c, GdkImlib.py: added push_visual and pop_visual, - that can be used to easily set GTK to use the imlib visual/colormap - combination. - - * gtkmodule.c: the PyObject -> GtkArg conversion routines were not - catching some exceptions that they generated. This would cause - wierd problems if you passed the wrong argument types to signal - handlers. This was found by Chi-Deok Hwang - - * examples/simple/dnd.py, examples/simple/dndpixmaps.py: and example - of drag and drop contributed by Chi-Deok Hwang - - * gtkmodule.c: added gtk_ctree_get_selection, that returns nodes - rather than pointers. - - * gtk.py: made changes to reflect those below. Also added - GtkWidget.get_colormap() (it was missing previously). - - * generate/gtkedit.defs (gtk_spin_button_update): added function. - - * generate/gtkmenus.defs (gtk_check_menu_item_set_active): function - renaming. - (gtk_menu_set_title): added function. - - * generate/gtkmisc.defs (gtk_toggle_button_[sg]et_active): added - functions, and removed gtk_toggle_button_set_state. - -1999-01-27 James Henstridge - - * gtkmodule.c: fixed some typos in _wrap_gtk_ctree_get_row_data and - _wrap_gtk_ctree_base_nodes. This fix was sent to me by Jim - Robinson . - -1999-01-26 James Henstridge - - * gtk.py: fixed typo in GtkProgress.configure. - -1999-01-22 James Henstridge - - * gdkimlibmodule.c: (_wrap_gdk_imlib_create_image_from_data): function - would raise an exception if there was a null in the data or alpha - arguments. Also added some sanity checks on the lengths of data - and alpha. This patch was submitted by Toby D. Reeves. - -1999-01-21 James Henstridge - - * examples/testgtk/testgtk.py (create_scrolled_windows): changed - a call to GtkContainer.add to GtkScrolledWindow.add_with_viewport. - - * gtk.py (GtkPacker.add): Added defaults for the arguments. - -1999-01-11 James Henstridge - - * gtk.py (GtkProgress.get_current_percentage): fixed function call - - * gtk.py (GtkScrolledWindow): changed so it inherits from GtkBin - instead of GtkContainer, to match changes in GTK. - - * GDK.py (DRAG_PROTO_ROOTWIN): Added the constant. - - * gtkmodule.c: forgot to include GTK_TYPE_DOUBLE in one of the GtkArg - processing routines. Also fixed a problem for events with a NULL - window. - -1998-12-24 James Henstridge - - * gdkimlibmodule.c(_wrap_gdk_imlib_get_rgb_height): I accidentally - returned rgb_width instead of rgb_height. This bug report was from - Osamu Tanimoto . - -1998-12-22 James Henstridge - - * GtkExtra.py: modified the signal connect bit in the MenuFactory - code so it is a bit more sane. - -1998-12-21 James Henstridge - - * pygtk.spec: updated version here as well. - - * README: updated required GTK version to 1.1.9 - - * configure.in: Updated version for pygtk to 0.5.9, increased - GTK version check to 1.1.9. - -1998-12-20 James Henstridge - - * gtkmodule.c, generate/gtkmisc.defs: moved gtk_preview_draw_row here - because python's string conversion routines do not like nuls in a - string, but you quite often want them in image data. - -1998-12-17 James Henstridge - - * examples/*/*.py: changed calls to GtkLabel.set to GtkLabel.set_text. - - * gtk.py: made changes to reflect those below. - - * generate/gtkbase.defs (gtk_widget_set_app_paintable): added this - stub. - - * generate/gtkmisc.defs (gtk_label_set_text): renamed gtk_label_set to - this, added gtk_label_set_line_wrap. - - * generate/gtkdnd.defs: Added gtk_drag_source_unset. - - * generate/gtklists.defs: moved reordering function stubs from ctree - to clist. - - * generate/gtkcontainers.defs: removed GtkDrawWindow. Added - gtk_paned_pack[12] - - * GtkExtra.py (MenuFactory.create): wasn't passing extra arguments - onto signal connect. Bug fix from Sam Tannous - - * gtkmodule.c: Applied some fixes to the ctree code from - A.Hartgers@phys.tue.nl - -1998-12-09 James Henstridge - - * gtk.py, generate/gtkmisc.defs, GTK.py: Added - gtk_toolbar_set_space_style and the required enum. - -1998-12-08 James Henstridge - - * gtkmodule.c: fixed up the toolbar functions, so they also use - gtk_signal_connect_full, and now return the added child, like - the C functions do. - - * examples/testgtk/testgtk.py: fixed up some stuff in the main - function and clist test. - - * gtk.py, generate/gtkcontainers.defs: added - gtk_window_set_transient_for and gtk_window_set_default_size. - - * gtkmodule.c: Changed to use _full functions instead of _interp - functions. Also made gtk_signal_connect and friends use the - gtk_signal_connect_full function rather than the default marshaller - method. - -1998-12-07 James Henstridge - - * generate/gtkcontainers.defs (gtk_viewport_new): Accept NULL - arguments for adjustments of a viewport. This is the correct - fix for Michael's other patch. - - * examples/*/*.py: got rid of deprecation messages. Put scrolled - windows round all clists. - - * pyglade/build.py: Fixes a bug in scrolledwindow_new pointed out - by Michael Hudson. Also made some changes so that it doesn't use - any deprecated functions. - - * gtkmodule.c: fixed two typos pointed out by Michael Hudson - -1998-12-05 James Henstridge - - * gtkmodule.c, generate/*.defs, gtk.py: updated to latest CVS. This - includes the function name changes Tim Janik introduced. I have - added backward compatibility wrappers for the old functions in gtk.py, - which also print out a deprecation message. - -1998-12-01 James Henstridge - - * gtk.py (GtkLayout): I had left a few remnants from when this class - was in gnome.ui. This is now fixed. - -1998-11-29 James Henstridge - - * description.py: Added a description of the GtkCTreeNode type. - - * gtk.py (GtkCTree): Added the GtkCTree class to this layer. - Hopefully I haven't made any mistakes. - -1998-11-28 James Henstridge - - * generate/gtklists.defs: added entries for GtkCTree. - - * gtkmodule.c: Added the GtkCTreeNode type. It exports some of the - attributes of the GtkCTreeRow associated with the node. Specifically, - the parent, next sibling links, and a list of children. This should - be enough attributes to make the type useful. - Also added extra functions for GtkCTree. - -1998-11-27 James Henstridge - - * generate/gtk*.defs: updated for GTK+-1.1.5. - - * gtkmodule.c: added the PyGtk_RegisterBoxed function, exported through - the _private dictionary. This allows adding extra boxed types so they - will be recognised in signal handlers and the like. - - * gtk.py: this file used to be Gtkinter.py. People should make this - change in their programs. Also updated for changes to the API. - - * Gtkinter.py: new file. Simply does a "from gtk import *", so old - programs will still run properly. - - * examples/*/*.py, pyglade/*.py, GdkImlib.py, GtkExtra.py: changed - occurences of Gtkinter to gtk. - -1998-11-17 James Henstridge - - * GdkImlib.py: missed a closing parenthesis. This caused problems. - - * generate/gtk.defs(gtk_rc_add_*_style): removed these functions. - They weren't exported by Gtkinter, and their declaration has changed - in newer GTK+'s. Now pygtk should compile with both GTK+-1.1.3 and - CVS GTK (tested for a 1998-11-16 checkout). - - * configure.in, NEWS: bumped version up to 0.5.5, and made new release. - - * generate/gtkmisc.defs, Gtkinter.py: added the GtkCalendar widget. - -1998-11-15 James Henstridge - - * gtkmodule.c: added GdkCursor type. - - * gtkmodule.c(GdkWindow.set_cursor): function to set cursor for window - - * generate/gtk.defs (gtk_cursor_*): new functions to create cursors - - * gtkmodule.c(gtk_pixmap_create_from_xpm_d): new function to create - a GdkPixmap from a list of strings (XPM data). This allows you to - store pixmaps inline with your program for distribution. - - * gdkimlibmodule.c: export the GdkImlibImageType, and a _private - dictionary that holds exported functions. I should be able to - add the GdkImlibImage dependent functions to _gnomeui now. - - * GDK.py, GTK.py: updated with new constants. - - * examples/simple/*1.py: stopped importing _gtkbase, and don't call - _gtk.pygtk_init(). - - * pyglade/build.py: added menu widgets to the interface building code. - - * pygtk.spec: new file -- an RPM spec file for this package. - - * NEWS: add information about this new version. - -1998-11-15 James Henstridge - - * gtkmodule.c: added GdkAtom handling. There is now a special type for - GdkAtoms that can be cast to string and int with str() and int() - respectively, and it supports coercions, so it should act like an - int in most cases. Functions that take GdkAtom's as arguments - actually take ints, so backward compatibility is kept, but functions - that return GdkAtoms now return this special type. - - * gtkmodule.c, generate/gtkdnd.defs, Gtkinter.py: added the new DnD - code, and support for selections. The gtk_selection_* functions have - been mapped to GtkWidget.selection_*, and the gtk_drag_* functions - have been mapped to GtkWidget.drag_* - - * GdkImlib.py: added function create_image_from_data, so you can - create an image from raw RGB data. Also added the Image.get_pixmap - method, which is like Image.make_pixmap, except it returns the - GdkPixmap,GdkBitmap pair, instead of a GtkPixmap widget. - -1998-11-14 James Henstridge - - * generate/*.defs: changes to bring pygtk up to date with GTK+-1.1.3 - -1998-11-13 James Henstridge - - * gtkmodule.c: added wrappers for GdkDragContext and GtkSelectionData. - Also removed all the old DnD GdkEvent mappings, and added the - GdkEventDND mapping. This should be enough to get the new Dnd signals - working. - - * generate/gtkbase.defs, gtkmodule.c(_wrap_gtk_widget_dnd_*): removed - the old gtk_widget_dnd_* functions from the bindings. - -1998-11-10 James Henstridge - - * build system: Converted over to using automake. Note thay some - modifications have been made to the original version of automake, - so you will need to apply my patches if you want to modify pygtk. - - * swigsrc/*: removed. I am now using some code generation tools - that take .defs files as input. - - * gdkimlibmodule.c: got rid of all the swig stuff, and cleaned up the - code a bit. This has reduced the source code size by half. - -1998-11-10 James Henstridge - - * ChangeLog: started change log. Old Changelog file has been moved - to NEWS - - * NEWS: used to be Changelog - diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 deleted file mode 100644 index 4d6ed4c7..00000000 --- a/ChangeLog.pre-2-6 +++ /dev/null @@ -1,3474 +0,0 @@ -2005-05-09 Johan Dahlin - - * configure.in: Post release version bump - -=== PyGTK 2.6.2 === -2005-05-09 Johan Dahlin - - * gobject/pygenum.c (pyg_enum_new): Complain if ret is NULL, - Fixes #303524. - - * gobject/pygflags.c (pyg_flags_new): Change exception format to - be consistent with the one in enum - - * gtk/gtk.override: Allow None to be passed in to: - set_group for RadioAction.set_group(), RadioToolButton.set_group() - and RadioMenuItem.set_group(). Fixes #170514 - - * tests/test_radiobutton.py: Refactor and add unittests for - RadioAction, RadioToolButton and RadioMenuItem. - -2005-05-09 Mark McLoughlin - - Fix for bug #303573 - "exceptions raised in a child watch - handler are silently swallowed" - - * gobject/gobjectmodule.c: - (child_watch_func), - (_pyg_spawn_async_callback): if PyObject_CallFunction() - returns NULL, print a traceback of the exception. - - * tests/test_mainloop.py: add testcase. - - * tests/Makefile.am: add test_mainloop.py - - Reviewed by Johan Dahlin - -2005-05-03 Gustavo J. A. M. Carneiro - - * gtk/gdk.override (_wrap_gdk_event_tp_setattr): Fix setter for - "window" attribute: don't unblock threads around g_bject_ref; - g_object_unref previous event.window. Fixes #302622. - - * tests/Makefile.am (tests): Add test_gdkevent.py. - - * tests/test_gdkevent.py: Add a test for gtk.gdk.Event.window setter. - -2005-04-12 Gustavo J. A. M. Carneiro - - * tests/runtests.py (program): Fix indentation and a "name - 'program' is not defined" exception. - - * codegen/argtypes.py: Treat guint and gsize as python longs, with - appropriate parameter conversion formats and return conversion - functions. Also treat gssize as long long on LLP64 architectures - (thanks jamesh). Correctly parse "long" parameters on LP64 - architectures. Fixes #300012: "Handling of guint, gsize, gssize, - and glong in pygtk is broken". - -2005-03-27 John Finlay - - * gtk/gtk.override (_wrap_gtk_dialog_set_alternative_button_order): - Really check in the code. Fixes #171771 (Manish Singh) - -2005-03-20 Johan Dahlin - - * gtk/gtktreeview.override (_wrap_gtk_list_store_insert): - Regression, allow the second argument to be unspecified, fixes - #171027 (Ulrik Svensson) - - * tests/test_liststore.py: Add 2 new tests - -2005-03-17 Johan Dahlin - - * gtk/gtkmodule.c (init_gtk): Regression, don't crash if sys.argv - isn't set. - -2005-03-16 Johan Dahlin - - * tests/test_radiobutton.py (RadioButtonTest): New test. - - * tests: Renamed *.py to test_*.py - - * gtk/gtk.override: Allow argument to RadioButtion.set_radio_group - to be empty, fixes #170514 (Lorenzo Gil Sanchez) - -2005-03-15 Johan Dahlin - - * configure.in: Post release version bump - -=== PyGTK 2.6.1 === -2005-03-15 Johan Dahlin - - * codegen/codegen.py: Check arguments if we have no arguments. - Fixes bug #170266 (Doug Quale) - - * gtk/gdk.override: - * gtk/gtktreeview.override: gcc4 patches stolen from redhat - - * NEWS: Updated - -2005-03-14 Anders Carlsson - - * codegen/reversewrapper.py: - Remove an extra * in the declaration and cast of GObject - types. - -2005-03-14 Johan Dahlin - - * gobject/pygparamspec.c (pyg_param_spec_getattr): In case the - enum is not registered, set enum_class or flag_class to None - -2005-03-13 Johan Dahlin - - * gtk/gtktreeview.override (_wrap_gtk_tree_store_reorder): Ditto - -2005-03-13 Richard Hult - - * gtk/gtktreeview.override (_wrap_gtk_list_store_reorder): You - don't own a ref on the return value from PyList_GetItem so don't - decrease the ref count. - -2005-03-10 Johan Dahlin - - * gtk/gtktreeview.override: - (_wrap_gtk_list_store_insert): Use - gtk_list_store_insert_with_valuesv, improves performance - when using a sorted list. - - * configure.in: Post release version bump - -=== PyGTK 2.6.0 === -2005-03-07 Johan Dahlin - - * README: Remove ftp.gtk.org url - - * NEWS: Updated. - -2005-03-04 Manish Singh - - * configure.in: document micro_version as micro version. - - * gtk/gtktreeview.override - * gtk/libglade.override: get rid of a couple unnecessary G_OBJECT() - casts. - -2005-02-23 Cedric Gustin - - * gobject/pygtype.c (add_property_docs): Use G_CONST_RETURN with a - gchar* return value. - -2005-02-23 Johan Dahlin - - * configure.in: post release version bump - - * examples: Don't use gtk.TRUE/gtk.FALSE anymore. - -=== PyGTK 2.5.4 === -2005-02-23 Johan Dahlin - - * README, NEWS: Update - -2005-02-23 Cedric Gustin - - * setup.py: Move the install_template call for pygobject-2.0.pc.in - to the right place in the script. Also define PLATFORM_WIN32 on - win32. Fixes bug #150616. - * codegen/codegen.py: Do not write the 'pygtk class init' function - for objects whose type is explicitly ignored (like GtkPlug and - GtkSocket on win32). Otherwise, it generates glib-warnings related - to calls to g_object_set_qdata with a NULL 'node'. - * gobject/pygtype.c: Do not use g_string_append_printf with a NULL - argument, as it crashes on win32. Fixes bug #166546. - * gtk/gtk.override: Add GtkSocket__proxy_do_plug_added, - GtkSocket__proxy_do_plug_removed and GtkPlug__proxy_do_embedded to - the ignore-win32 list. - -2005-02-15 Johan Dahlin - - * gtk/__init__.py: Deprecate gtk.TRUE and gtk.FALSE - -2005-02-17 Gustavo J. A. M. Carneiro - - * examples/pygtk-demo/pygtk-demo.in: New, frontend script to - launch pygtk demo. - - * examples/Makefile.am: Install the pygtk demo. - - * examples/pygtk-demo/demos/appwindow.py - (ApplicationMainWindowDemo.activate_about) - (ApplicationMainWindowDemo.__create_action_group): Popup a simple - AboutDialog on Help->About. - -2005-02-15 Johan Dahlin - - * configure.in: Fix logic when displaying modules not built, - Thanks to Abel Daniel for pointing out. - * gtk/gtk.defs: Undeprecate gtk.icon_size_get_name and - gtk.icon_size_lookup and remove broken methods. - -2005-02-13 Gustavo J. A. M. Carneiro - - * gtk/gtk.defs: Reorder all the (define-virtual...) declarations, - putting them right after the method declarations of the respective - objects. - -2005-02-10 Mark McLoughlin - - * gobject/pygmainloop.c: (pyg_restore_current_main_loop): - don't pass a NULL value to PyThread_set_key_value() - causes - an assertion failure with python 2.4. - -2005-02-09 Mark McLoughlin - - Fix for bug #154779 - Python signal handlers don't - get executed while you're sitting in the main loop. - - * gobject/pygmainloop.c: - (pyg_save_current_main_loop), - (pyg_restore_current_main_loop), - (pyg_get_current_main_loop): functions for keeping - track of the currently running main loop. A version - using TLS and another using a global variable, depending - on whether DISABLE_THREADING is defined - (pyg_signal_watch_prepare), (pyg_signal_watch_check), - (pyg_signal_watch_dispatch), (pyg_signal_watch_new): - a GSource which runs the python signal handlers whenever - the mainloop is interrupted by signal delivery. - (pyg_main_loop_new), (pyg_main_loop_dealloc): add and - remove the source. - (_wrap_g_main_loop_run): push/pop the currently running - main loop. - - * gobject/pygobject-private.h: add a pointer for the - source to PyGMainLoop. - - * gobject/Makefile.am: add -DPLATFORM_WIN32 to cflags - if building on Windows. - -2005-01-10 Johan Dahlin - - * configure.in: post release version bump - -=== PyGTK 2.5.3 === -2005-01-22 Gustavo J. A. M. Carneiro - - * gtk/gtkmodule.c (init_gtk): Do some type checking on sys.argv - before using it. Fixes #163209. - - * gtk/gdk.override: Override slots tp_getattro and tp_setattro of - GdkGC instead of tp_setattr and tp_getattr. Fixes #159468. - - * codegen/codegen.py: Allow override of tp_getattro and - tp_setattro (non-deprecated variants of tp_getattr and - tp_setattr). - - * gobject/pygflags.c (pyg_flags_new): Check that __gtype__ is - PyGTypeWrapper_Type, not PyGEnum_Type. - (pyg_flags_add): Set a custom __gtype__ for the new flags class. - (pyg_flags_new): Remove "value out of range" check, it makes no - sense in flags. - (pyg_flags_new): Check for NULL return from PyDict_GetItem and set - exception. - - * gobject/pygenum.c (pyg_enum_add): Set a custom __gtype__ for the - new enum class. - (pyg_enum_new): Check that __gtype__ is PyGTypeWrapper_Type, not - PyGEnum_Type. - - * gobject/pygflags.c (pyg_flags_add): Idem. - - * gobject/pygenum.c (pyg_enum_add): Unset the flag - Py_TPFLAGS_BASETYPE in newly created enum type. Set tp_new, which - somehow was not being inherited. - - Fixes #154372. - -2005-01-22 Mark McLoughlin - - * gobject/gobjectmodule.c (pyg_type_register): Fix reference leak - to the module string; Appends the serial number to the type name, - even if the module name can't be looked up. Fixes #164441. - -2005-01-18 Gustavo J. A. M. Carneiro - - * codegen/reversewrapper.py (IntParam.convert_c2py): Don't bother - checking if PyInt_FromLong fails. - (DoubleParam.convert_c2py): Don't bother checking if - PyFloat_FromDouble fails. - (DoubleReturn.write_conversion): Check return value type. - (IntReturn.write_conversion): idem. - (StringReturn.write_conversion): idem. - (VoidReturn.write_conversion): idem. - - * gtk/gtkmodule.c (init_gtk): On Python >= 2.4, don't call - setlocale(LC_NUMERIC, "C"), as it breaks the locale module. Fixes - #164451. - -2005-01-16 Gustavo J. A. M. Carneiro - - * gobject/gobjectmodule.c (pyg_type_register): Use tp_base field - of each base type to compare with PyGInterface_Type, instead of - PyObject_IsSubclass, because we don't want a class defined as - class Foo(GObject, SomeInterface) to be itself considered an - interface when in turn it is subclassed. - (pyg_type_register): Make "Interface type %s has no python - implementation support" a warning instead of exception. This - really isn't a fatal error and some programs seem to be using - interfaces in weird ways. - - * codegen/reversewrapper.py (ReverseWrapper.generate): Rename - variable PyGILState_STATE state to __py_state to avoid possible - name collision with function parameters. - -2005-01-13 John Finlay - - * gtk/gdk.override (_wrap_gdk_pixmap_colormap_create_from_xpm) - (_wrap_gdk_pixmap_create_from_xpm_d) - (_wrap_gdk_pixmap_colormap_create_from_xpm_d): Allow first arg - to be a GdkDrawable. #159282 - -2005-01-13 Johan Dahlin - - * gtk/Makefile.am: Allow it to be built using automake 1.8. Fixes - bug 163932 - - * codegen/codegen.py: Only declare the object when it's needed. - Fixes some more compiler warnings. - -2005-01-10 Gustavo J. A. M. Carneiro - - * codegen/codegen.py (Wrapper.write_virtuals): Don't raise - exception if a do_xxx method is defined and the corresponding - virtual is not supported, since we may have a signal with the same - name and the user may be trying to override it. - Fixes #163606: override size_allocate doesn't work. - - * gobject/pygobject.h, gobject/pygobject-private.h: Revert change - from 2005-01-09 by me to define pyg_threads_enabled as - PyEval_ThreadsInitialized() on Python 2.4 and define - pyg_begin|end_allow_threads as Py_BEGIN|END_ALLOW_THREADS. Fixes - #163612: segmentation fault on pygtk-demo. - -2005-01-10 Johan Dahlin - - * configure.in: post release version bump - * docs/random/release-checklist: - Update - -=== PyGTK 2.5.2 === -2005-01-10 Johan Dahlin - - * autogen.sh: Check for automake-1.9 aswell, fixes 162396 - (Raphael Kubo da Costa) - -2005-01-10 Johan Dahlin - - * .cvsignore: - * Makefile.am: - * configure.in: - * gtk/Makefile.am: - * pygtk-2.0.pc.in: - * setup.py: - * tests/common.py: - * tests/testhelpermodule.c: Make the build of - atk, pango and gtk conditional. Fixes bug #74144. - -2005-01-10 Johan Dahlin - - * tests/Makefile.am: - * tests/common.py: - * tests/runtests.py: - * tests/test_thread.py: Make testsuite work and do things - the way they were supposed to be done from the beginning. - -2005-01-10 Gustavo J. A. M. Carneiro - - * gtk/gtk.override - (_wrap_GtkCellLayout__proxy_do_set_cell_data_func): Implement - proxy function for virtual 'set_cell_data_func' of interface - GtkCellLayout. - -2005-01-09 Gustavo J. A. M. Carneiro - - * gobject/pygtype.c (pyg_value_from_pyobject): Handle conversion - of python sequence to G_TYPE_VALUE_ARRAY GValue. - (pyg_param_gvalue_from_pyobject): idem. - Patch by jylefort@brutele.be; Fixes #160452. - - * gtk/gdk.override (_wrap_gdk_pixmap_create_from_xpm): - Accept GdkDrawable instead of GdkWindow as first argument. Fixes - #159282. - -2005-01-09 Tim Evans - - * gtk/gtk.defs (gtk_get_current_event): Add (caller-owns-return #t). - - * gtk/gtk.override (_wrap_gtk_get_current_event_state): Impl. - - Reviewed by Gustavo Carneiro. Fixes #159397. - -2005-01-09 Gustavo J. A. M. Carneiro - - * gobject/pygtype.c (pyg_value_from_pyobject): Be consistent about - not raising an exception on error return. - Patch by jylefort@brutele.be, fixes #160595. - - * tests/Makefile.am (tests): Add test_subprocess.py. - - * tests/test_subprocess.py: Unit test for gobject.spawn_async and - gobject.child_watch_add. - - * gobject/gobjectmodule.c (pyg_spawn_async): Add wrapper for - g_spawn_async_with_pipes. - (pyg_child_watch_add): Add wrapper for g_child_watch_add_full. - - * gobject/pygobject.h, gobject/pygobject-private.h: Define - pyg_threads_enabled as PyEval_ThreadsInitialized() on Python 2.4, - so that it is no longer required to call gobject.threads_init on - that platform. Also define pyg_begin|end_allow_threads as - Py_BEGIN|END_ALLOW_THREADS, since these functions are rarely - invoked, thus represent a minimal overhead. - - * gobject/gobjectmodule.c (pyg_type_register): Return the type - being registered, to make gobject.type_register usable as Python - 2.4 @decorator. - - * codegen/codegen.py (Wrapper.write_constructor): Move writing of - pygobject_no_constuctor to the new methods - write_default_constructor (when no constructor is declared in the - .defs) and write_noconstructor (when a constructor is declared but - could not be generated). - (GObjectWrapper.write_default_constructor): Override to return - '0'. This makes the constructor for GObjects become - GObject.__init__ by default, unless there is a constructor - function in the .defs and it could not be generated for some - reason. - - * gtk/pygtkcellrenderer.c (pygtk_generic_cell_renderer_new): - Deprecate GtkGenericCellRenderer, since all virtual methods of - GtkCellRenderer are now supported. - - * gtk/gtk.override (_wrap_GtkCellRenderer__proxy_do_get_size): - Override, implementation copied from PyGtkGenericCellRenderer, - with minor adjustments/fixes. - -2005-01-09 Gustavo J. A. M. Carneiro - - * gobject/gobjectmodule.c (pyg_type_register): Look for - GInterface's among tb_bases and register implementation support - for them. - (pyg_register_interface_info): Add. Registers a GInterfaceInfo* - containing python proxy implementation with a GInterface GType. - - * gobject/pygobject.h (pyg_register_interface_info): Add. - - * gtk/gtk-types.defs (Editable): Add (vtable "GtkEditableClass"), - because the GtkEditable vtable structure name is GtkEditableClass - instead of GtkEditableIface. - - * codegen/definitions.py (InterfaceDef.__init__): Add/parse vtable - attribute, to contain the C structure name of the virtual table of - an interface. If not given, the vtable name defaults to (c_name + - "Iface"). Add attribute interface_info, to hold the - GInterfaceInfo variable for the interface. - - * codegen/reversewrapper.py (GEnumReturn.write_conversion): Add - missing code=None parameter. - (GFlagsReturn.write_conversion): idem. - - * codegen/codegen.py: Add global iproxies_coverage to track - coverage statistics of interface proxies. - (Wrapper.write_methods): Split out writing virtual method - accessors to a separate method (write_virtual_accessors). - (GInterfaceWrapper.write_virtual_accessors): Override to disable - writing virtual accessors for interfaces. - (GInterfaceWrapper.write_virtuals): Override to generate interface - virtuals, interface_init function, and interface_info structure. - (write_registers): Call pyg_register_interface_info for interfaces - with some implementation support. - - * gtk/gtk.defs: Add (define-virtual ...) declarations for all - interface virtual methods in gtk. - - Fixes #154974: Interface implementation support. - -2005-01-09 Gustavo J. A. M. Carneiro - - * codegen/reversewrapper.py (GBoxedParam.convert_c2py): When the C - type begins with const, force python wrapper to create a copy of - the boxed value, and typecast to avoid const warning. - - * codegen/codegen.py (Wrapper.write_virtuals): In the generated - class_init function, don't declare the variable 'klass' if it is - not needed. - -2005-01-08 Adam Hooper - - * tests/test_actiongroup.py: - - Add test script for bug #162874. - -2005-01-08 Adam Hooper - - reviewed by: Johan Dahlin - - * gtk/gtk.override: Py_DECREF action in - gtk_action_group_add_*actions. This should disconnect all the - groups from the callbacks when destroyed. Fixes bug 162874 - -2005-01-08 Johan Dahlin - - * Makefile.am: Add pygtk_postinstall.py - * docs/random/missing-symbols: Updated - * gtk/__init__.py: Deprecate gtk.idle_add and friends. - * gtk/gtk.defs: Merge in 2.6 api, for GtkLabel functions, - thanks to Gian Mario Tagliaretti, fixes bug #163296 - * tests/test_thread.py: Don't use gtk.idle_add - -2005-01-08 Gustavo J. A. M. Carneiro - - * codegen/reversewrapper.py (GFlagsReturn, GFlagsParam): Add type - handlers for GFlags in reverse wrappers. - (GtkTreePathParam): Add type handler for GtkTreePath* param. - -2005-01-08 Gustavo J. A. M. Carneiro - - * gtk/gtk.override: Declare PyGdkDevice_Type, now needed for some - virtual method. - - * gtk/gtk.defs: Add a bunch of virtual method declarations for all - non-deprecated gtk widgets. - - * gobject/pygobject.h: Add pyg_register_class_init to the API - vtable and as macro, and PyGClassInitFunc typedef. - - * gobject/gobjectmodule.c (initgobject): Create - pygobject_class_init_key, a GQuark that indentifiers the - class_init data for a GType class. - (pyg_register_class_init): Add, registers a class intialization - function of type "int (*PyGClassInitFunc) (gpointer gclass, - PyTypeObject *pyclass);" - (pyg_run_class_init): Add, runs a stack of class initialization - functions for a newly registered GObject class. - (pyg_type_register): Call pyg_run_class_init right after the type - is registered. - Add pyg_register_class_init to pygobject_api_functions. - - * codegen/scanvirtuals.py: An utility script to scan for virtual - methods in header files. At the moment it is not very intelligent - and doesn't distinguish between virtual methods and interface - definitions. - - * codegen/defsparser.py (DefsParser.__init__): Initialize - attribute 'virtuals', to hold list of object's virtual methods. - (DefsParser.define_virtual): Adds a new virtual method. - (DefsParser.find_virtuals): Returns list of virtual methods of an - object. - - * codegen/definitions.py (ObjectDef.__init__): Add a - class_init_func member variable. Rename class MethodDef to - MethodDefBase, subclass MethodDefBase as MethodDef, move code that - checks for presence of 'c_name' from MethodDefBase into MethodDef. - (MethodDefBase.write_defs): Rename to _write_defs, and don't write - the initial "(define-method ...". - (MethodDef.write_defs): Write the "(define-method ..." here, then - call _write_defs to write the remaining. - (VirtualDef): New class to information of an object's virtual - method. It inherits from MethodBaseDef. - - * codegen/codegen.py: Add class Coverage, to track and display - coverage statistics. Add globals functions_coverage, - methods_coverage, vproxies_coverage, and vaccessors_coverage. - (Wrapper.virtual_accessor_tmpl): Add template for virtual method - "accessor", which is a classmethod that calls a GObject virtual - method for GType corresponding to the class of the method. This - is used in virtual method implementations for chaining to parent - classes. - (Wrapper.write_class): Call self.write_virtuals() in the end, to - write virtual method proxies. - (Wrapper.write_function_wrapper): Don't overwrite - subsdict['cname'] if it already has a value, since we need to pass - a different function name when generating virtual method - accessors. - (Wrapper.write_methods): Update coverage statistics in - methods_coverage. - (Wrapper.write_methods): Generate virtual metho accessor - functions, as classmethods. - (Wrapper.write_virtuals): Generate virtual method proxies using - the reverse wrapper generator. Also generates a class_init - function to register the virtual proxies with the object class, - but only for those virtuals that appear to be actually implemented - in python code to avoid calling into python code for nothing. - (Wrapper.write_functions): Update coverage statistics in - functions_coverage. - (write_registers): Generate code to call pyg_register_class_init - if the object has a class init function. - (main): Print all coverage statistics at the end of code generation. - - * codegen/argtypes.py (ArgMatcher.register_reverse) - (ArgMatcher.register_reverse_ret, ArgMatcher.get_reverse) - (ArgMatcher.get_reverse_ret): New APIs to register and lookup - reverse wrappers type handlers. - - * codegen/Makefile.am (codegen_PYTHON): Add reversewrapper.py. - - * codegen/reversewrapper.py: New code to generate 'reverse - wrappers', i.e. wrappers that are called from C, call into Python, - and then return the python return value back to C. - - Fixes #145314: Overriding GTK+ virtual methods. - -2004-12-26 John Finlay - - * gtk/gdk.override (_wrap_gdk_event_tp_setattr): Fix garbled code - and allow message_type to be set. Fixes #162292. - (Raphael Kubo da Costa) - -2004-12-23 John Finlay - - * gtk/gdk.defs (render_to_drawable, render_to_drawable_alpha): Add - drprecation warnings. Fixes #162097 (Steve Chaplin) - - * gtk/gtk.override (_wrap_gtk_dialog_set_alternative_button_order): - Implement - -2004-12-23 Johan Dahlin - - * gtk/__init__.py: Improve deprecation warnings, to display correct - lines (stacklevel should 2, not 1 which is default) - -2004-12-23 Johan Dahlin - - * configure.in: Post release version bump - -=== PyGtk 2.5.1 === -2004-12-23 Johan Dahlin - - * NEWS: - * README: Updated - -2004-12-02 Cedric Gustin - - Reviewed by: Johan Dahlin - Fixes #150616 - - * dsextras.py: Added InstallData class. Changed template options - to ${prefix}/include|lib|bin|share. Added get_m4_define function - to parse pygtk version strings in configure.in. - - * setup.py: Added pygtk_postinstall bdist_wininst - option. distutils now uses InstallData as install_data - class. pygtk-2.0.pc and pygtk-codegen-2.0 are installed as data - instead of lib/extensions. This fixes a bdist_wininst installer on - win32. - - * pygtk_postinstall.py: Initial release. - -2004-12-23 Johan Dahlin - - * docs/random/release-checklist: New document - - * docs/random/missing-symbols: New document - - * examples/atk/atk-demo.py: - * examples/ide/browse.py: - * examples/ide/gtkcons.py: - * examples/neil/notebook.py: - * examples/pango/utf8-demo.py: - * examples/pygtk-demo/demos/dnd.py: - * examples/pygtk-demo/demos/editable_cells.py: - * examples/pygtk-demo/demos/list_store.py: - * examples/simple/dnd.py: - * examples/simple/scribble.py: - - Use stock items and other fixes for examples. - Fixes #156402 (Alan Horkan) - -2004-12-23 Johan Dahlin - - * autogen.sh: set srcdir to dirname $0, fixes out of source tree - builds. Fixes #158360 (Marco Pesenti Gritti) - -2004-12-22 Johan Dahlin - - * PKG-INFO.in: Update - - * configure.in: Require glib/gtk+ 2.6, pango, atk 1.8, export - PYGTK_[MAJOR,MINOR_MICRO]_VERSION - - * gtk/gtk.defs: Make it build again by removing removed functions - -2004-12-12 Gustavo J. A. M. Carneiro - - * codegen/argtypes.py (arg): Add 'GTime' argtype matcher, which is - defined as gint32 by glib, thus handled as a normal python int. - -2004-12-10 John Ehresman - - * gobject/pygobject.h: Change PY_HEXVERSION to PY_VERSION_HEX - -2004-12-04 John Finlay - - * pango-types.defs (LayoutIter): Add. - - * pango.defs (pango_layout_iter_get_type): Add. - - * pango.override (_wrap_pango_layout_iter_get_line_yrange) - (_wrap_pango_layout_iter_get_layout_extents) - (_wrap_pango_layout_iter_get_run_extents) - (_wrap_pango_layout_iter_get_line_extents) - (_wrap_pango_layout_iter_get_cluster_extents) - (_wrap_pango_layout_iter_get_char_extents): Implement. - -2004-12-04 Gustavo J. A. M. Carneiro - - * gtk/gtk.defs: Remove gtk_file_chooser_button_[gs]et_active wrappers. - (set_cell_data): Remove, also removed from gtk+. - -2004-11-29 Johan Dahlin - - * configure.in: Post release version bump - -=== PyGtk 2.5.0 === -2004-11-29 Johan Dahlin - - * NEWS: Update - -2004-11-23 Johan Dahlin - - * gobject/pygobject.c (pygobject_register_sinkfunc): Make sure - type is a type and sinkfunc isn't NULL. - -2004-11-16 John Finlay - - * gtk/gtk.override (_wrap_gtk_about_dialog_set_url_hook) - (_wrap_gtk_about_dialog_set_email_hook) - (_wrap_gtk_target_list_add_uri_targets) - (_wrap_gtk_target_list_add_image_targets) - (_wrap_gtk_target_list_add_text_targets): Implement. - - * gtk/gtk.defs (gtk_target_list_add_text_targets) - (gtk_target_list_add_image_targets) - (gtk_target_list_add_uri_targets): Define as functions. - -2004-11-15 John Finlay - - * gtk/gdk.override (_wrap_gdk_display_store_clipboard): Implement. - - * gtk/gdk.defs (drag_drop_succeeded): Define as method of - GdkDragContext. - - * gobject/pygflags.c (pyg_flags_repr): Print long int value if enum - string not found. Fixes #158417. (modifed patch from Tim Evans) - - * gtk/gtk.defs (set_icon_name): Allow name to be NULL - - * gtk/gtktreeview.override - (_wrap_gtk_tree_view_set_row_separator_func): Implement. - (gtk_tree_view_get_row_separator_func): Ignore. - - * gtk/gdk.override Complete changes to return strings instead of - atoms except for intern_atom. - -2004-11-14 John Finlay - - * gtk/gtk.defs (gtk_selection_data_targets_include_image): Add def. - - * configure.in Require GTK+ 2.5.5. - - * gtk/gtk.override (_wrap_gtk_message_dialog_new): Fix bug. - (_wrap_gtk_message_dialog_format_secondary_text) - (_wrap_gtk_message_dialog_format_secondary_markup): Implement. - - * gtk/gtk.defs (gtk_menu_tool_button_set_arrow_tooltip): - Allow tip args to be NULL. - - * gtk/gtk.override (_wrap_gtk_menu_tool_button_new): Implement. - (gtk_menu_tool_button_new_from_stock): Ignore - - * gtk/gtkwidget.override - (_wrap_gtk_menu_get_for_attach_widget): Implement as method of Widget - * gtk/gtk.defs (gtk_menu_get_for_attach_widget): Define as method - of Widget. - - * pango-types.defs (EllipsizeMode): Add. - -2004-11-14 Gustavo J. A. M. Carneiro - - * codegen/definitions.py (FunctionDef.write_defs): Write - caller-owns-return. - (MethodDef.write_defs): idem. - (MethodDef.merge): Merge flags 'caller_owns_return' and - 'vargargs'; if parameter parmerge is false, return right after - copying old parameter list, to effectively avoid merging. - (FunctionDef.merge): idem. - - * codegen/h2def.py (split_prefix_pat): Allow prefix to begin with - more than one capital letter. Fixes splitting of GConfXxx names. - -2004-11-14 John Finlay - - * gtk/gtk.override (_wrap_gtk_image_get_icon_name): Implement. - - * gtk/gtk.defs (gtk_image_new_from_icon_name): Change function - name to gtk.image_new_from_icon_name. - -2004-11-13 John Finlay - - * gtk/gtk.override (_wrap_gtk_icon_view_selected_foreach) - (_wrap_gtk_icon_view_get_selected_items): Implement. - - * gtk/gtk.defs (set_model): Set arg optional default NULL. - - * gtk/gtk.override (_wrap_gtk_icon_theme_get_icon_sizes): Implement. - (_wrap_gtk_icon_view_new): Implement. - (gtk_file_chooser_button_new_with_dialog): Ignore. - (_wrap_gtk_file_chooser_button_new) Fix bug and add variant. - -2004-11-12 John Finlay - - * gtk/gtk.override (_wrap_gtk_file_chooser_button_new): Implement - with optional backend arg. - (gtk_file_chooser_button_new_with_backend): Ignore. - - * gobject/gobjectmodule.c (pyg_signal_list_ids) - (pyg_signal_lookup, pyg_signal_name, pyg_signal_query): Add signal - introspection functions - -2004-11-10 John Finlay - - * gtk/gtk.override (_wrap_gtk_clipboard_set_can_store): Implement. - (_wrap_gtk_combo_box_set_row_separator_func): Implement - (gtk_combo_box_get_row_separator_func): Ignore. - -2004-11-09 John Finlay - - * gtk/gtk.override (_wrap_gtk_cell_view_set_value) - (_wrap_gtk_cell_view_set_values): Implement. - (_wrap_gtk_cell_view_get_cell_renderers): Implement. - (_wrap_gtk_cell_view_get_size_of_row): Implement. - - * gtk/gtk-types.defs (CellView): Implements GtkCellLayout - - * gtk/gtk.defs Add functions for CellRendererCombo and - CellRendererProgress - - * gtk/gtk-types.defs Add CellRendererCombo and CellRendererProgress - - * gtk/gdk.defs (alternative_dialog_button_order): Add as method of - GdkScreen - - * gtk/gtk.defs (alternative_dialog_button_order): Remove. - -2004-11-08 John Finlay - - * configure.in Require less onerous GTK+ 2.5.4 build dependencies - - * gtk/gtk.defs (set_logo_icon_name, set_logo) - (set_translator_credits, set_website_label, set_website) - (set_license, set_comments, set_copyright, set_version): - Allow arg to be None. - -2004-11-07 John Finlay - - * gtk/gtk.defs (gtk_about_dialog_set_name) Allow name to be None - to use default app name. - - * gobject/gobjectmodule.c (_pyg_strv_from_gvalue) Avoid segfault - when argv is NULL. - - * gtk/gtk.override (_wrap__gtk_drag_source_set_target_list) - (_wrap_gtk_drag_source_get_target_list) Implement. Fixes #157554. - - * gtk/gtk.defs (drag_source_set_target_list) - (drag_source_get_target_list) Add. Fixes #157554. - - * gtk/gdk.override (_wrap_gdk_event_tp_setattr) Add missing return. - Fixes #157571 with slightly modified patch from rubensr. - -2004-11-07 Johan Dahlin - - * gtk/gtk.defs (drag_source_add_text_targets) - (drag_dest_add_uri_targets, drag_dest_add_image_targets) - (drag_dest_add_text_targets): Make methods of them, fixes #157554 - - * gtk/gtk.override (_wrap_gtk_selection_data_get_uris) - (_wrap_gtk_selection_data_set_uris): Impl. - -2004-11-07 Gustavo J. A. M. Carneiro - - * codegen/definitions.py (FunctionDef.write_defs): write (varargs - #t) when appropriate. - (MethodDef.write_defs): idem. - (FunctionDef.merge): Refactor/fix and add 'parmerge' argument. - - * codegen/defsparser.py (DefsParser.merge): Add parameter - parmerge, to inidicate if we want parameter lists merging or not. - - * codegen/mergedefs.py: Parse command line options with optparse; - accept option -p to indicate we want to update parameter lists of - existing methods/functions; by default parameter lists are not merged. - - * codegen/h2def.py (proto_pat): Accept \s* between ( and start of - argument list. Fixes parsing of - libgnomeui-2.0/libgnomeui/gnome-scores.h, and others. - -2004-11-06 Hans Breuer - - * config.h.win32 makefile.msc gobject/makefile.msc - gtk/makefile.msc : updated - pygtk is working fine - with msvc (but requires -DDISABLE_THREADING), Thanks! - -2004-11-06 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_about_dialog_get_artists) - (_wrap_gtk_about_dialog_set_artists) - (_wrap_gtk_about_dialog_get_documenters) - (_wrap_gtk_about_dialog_set_documenters) - (_wrap_gtk_about_dialog_get_authors) - (_wrap_gtk_about_dialog_set_authors): Impl. - -2004-11-06 Johan Dahlin - - * configure.in: - * gtk/gdk.defs: - * gtk/gtk-types.defs: - * gtk/gtk.defs: - - Bump version to 2.5.0 and merge in gdk/gtk+ changes from cvs head. - - New gtk objects: - - GtkAboutDialog, GtkFileChooserButton, GtkIconView, GtkCellView, - GtkMenuToolButton - - New gtk functions: - - gtk_about_dialog_get_artists - gtk_about_dialog_get_authors - gtk_about_dialog_get_comments - gtk_about_dialog_get_copyright - gtk_about_dialog_get_documenters - gtk_about_dialog_get_license - gtk_about_dialog_get_logo - gtk_about_dialog_get_name - gtk_about_dialog_get_translator_credits - gtk_about_dialog_get_version - gtk_about_dialog_get_website - gtk_about_dialog_get_website_label - gtk_about_dialog_new - gtk_about_dialog_set_artists - gtk_about_dialog_set_authors - gtk_about_dialog_set_comments - gtk_about_dialog_set_copyright - gtk_about_dialog_set_documenters - gtk_about_dialog_set_email_hook - gtk_about_dialog_set_license - gtk_about_dialog_set_logo - gtk_about_dialog_set_name - gtk_about_dialog_set_translator_credits - gtk_about_dialog_set_url_hook - gtk_about_dialog_set_version - gtk_about_dialog_set_website - gtk_about_dialog_set_website_label - gtk_accelerator_get_label - gtk_action_group_translate_string - gtk_action_set_sensitive - gtk_action_set_visible - gtk_alternative_dialog_button_order - gtk_cell_renderer_combo_new - gtk_cell_renderer_progress_new - gtk_cell_view_get_cell_renderers - gtk_cell_view_get_size_of_row - gtk_cell_view_new - gtk_cell_view_new_with_markup - gtk_cell_view_new_with_pixbuf - gtk_cell_view_new_with_text - gtk_cell_view_set_background_color - gtk_cell_view_set_displayed_row - gtk_cell_view_set_model - gtk_cell_view_set_value - gtk_cell_view_set_values - gtk_clipboard_set_can_store - gtk_clipboard_store - gtk_clipboard_wait_is_target_available - gtk_combo_box_get_active_text - gtk_combo_box_get_column_span_column - gtk_combo_box_get_focus_on_click - gtk_combo_box_get_popup_accessible - gtk_combo_box_get_row_separator_func - gtk_combo_box_get_row_span_column - gtk_combo_box_get_wrap_width - gtk_combo_box_set_add_tearoffs - gtk_combo_box_set_focus_on_click - gtk_combo_box_set_row_separator_func - gtk_dialog_set_alternative_button_order - gtk_drag_dest_add_image_targets - gtk_drag_dest_add_text_targets - gtk_drag_dest_add_uri_targets - gtk_drag_source_add_text_targets - gtk_entry_completion_get_inline_completion - gtk_entry_completion_get_popup_completion - gtk_entry_completion_get_text_column - gtk_entry_completion_insert_prefix - gtk_entry_completion_set_inline_completion - gtk_entry_completion_set_popup_completion - gtk_file_chooser_button_get_active - gtk_file_chooser_button_get_title - gtk_file_chooser_button_get_width_chars - gtk_file_chooser_button_new - gtk_file_chooser_button_new_with_backend - gtk_file_chooser_button_new_with_dialog - gtk_file_chooser_button_set_active - gtk_file_chooser_button_set_title - gtk_file_chooser_button_set_width_chars - gtk_file_chooser_get_show_hidden - gtk_file_chooser_set_show_hidden - gtk_icon_theme_get_icon_sizes - gtk_icon_view_get_markup_column - gtk_icon_view_get_model - gtk_icon_view_get_orientation - gtk_icon_view_get_path_at_pos - gtk_icon_view_get_pixbuf_column - gtk_icon_view_get_selected_items - gtk_icon_view_get_selection_mode - gtk_icon_view_get_text_column - gtk_icon_view_item_activated - gtk_icon_view_new - gtk_icon_view_new_with_model - gtk_icon_view_path_is_selected - gtk_icon_view_selected_foreach - gtk_icon_view_select_all - gtk_icon_view_select_path - gtk_icon_view_set_markup_column - gtk_icon_view_set_model - gtk_icon_view_set_orientation - gtk_icon_view_set_pixbuf_column - gtk_icon_view_set_selection_mode - gtk_icon_view_set_text_column - gtk_icon_view_unselect_all - gtk_icon_view_unselect_path - gtk_image_get_icon_name - gtk_image_get_pixel_size - gtk_image_new_from_icon_name - gtk_image_set_from_icon_name - gtk_image_set_pixel_size - gtk_label_get_ellipsize - gtk_label_get_width_chars - gtk_label_set_ellipsize - gtk_label_set_width_chars - gtk_menu_get_for_attach_widget - gtk_menu_tool_button_get_menu - gtk_menu_tool_button_new - gtk_menu_tool_button_new_from_stock - gtk_menu_tool_button_set_menu - gtk_message_dialog_format_secondary_markup - gtk_message_dialog_format_secondary_text - gtk_selection_data_get_pixbuf - gtk_selection_data_get_uris - gtk_selection_data_set_pixbuf - gtk_selection_data_set_uris - gtk_show_about_dialog - gtk_target_list_add_image_targets - gtk_target_list_add_text_targets - gtk_target_list_add_uri_targets - gtk_text_buffer_backspace - gtk_tool_item_rebuild_menu - gtk_tree_view_get_fixed_height_mode - gtk_tree_view_get_hover_expand - gtk_tree_view_get_hover_selection - gtk_tree_view_get_row_separator_func - gtk_tree_view_set_fixed_height_mode - gtk_tree_view_set_hover_expand - gtk_tree_view_set_hover_selection - gtk_tree_view_set_row_separator_func - gtk_window_get_focus_on_map - gtk_window_get_icon_name - gtk_window_set_default_icon_name - gtk_window_set_focus_on_map - gtk_window_set_icon_name - - New gdk functions: - - gdk_display_request_selection_notification - gdk_display_store_clipboard - gdk_display_supports_clipboard_persistence - gdk_display_supports_selection_notification - gdk_drag_drop_succeeded - gdk_window_configure_finished - gdk_window_enable_synchronized_configure - gdk_window_set_focus_on_map - - -2004-11-04 Johan Dahlin - - * configure.in: post release version bump - -=== PyGtk 2.4.0 === -2004-11-04 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_dialog_add_buttons): Use - PyTuple_GetSlice and PyArg_ParseTuple here, so we can get the same - behavior as in add_button. Reported by Maciej Katafiasz, fixes #156707 - - * tests/test_dialog.py: Add test for it - - * examples/gtk/filechooser.py: Fix typo - - * examples/gtk/uimanager.py: Simplify - - * tests/Makefile.am: - * tests/gtype.py: - * tests/test-thread.c: - * tests/test-thread.h: - * tests/test-unknown.c: - * tests/test-unknown.h: - * tests/test_unknown.py: - * tests/testhelpermodule.c: - - Add tests for dynamic/unknown objects and interfaces. - -2004-10-28 John Finlay - - * gtk/gtk.defs (gtk_combo_box_set_model) - (gtk_entry_completion_set_model) Allow model to be None and to - default to None similar to gtk_tree_view_set_model. - Fixes #155247 (Olivier Aubert). - -2004-10-22 Gustavo J. A. M. Carneiro - - * gtk/gtk.override (_wrap_gtk_alignment_new): Change all - gtk.Alignment constructor parameter default values back to 0, as - it was before pygtk 2.4. - -2004-10-21 Gustavo J. A. M. Carneiro - - * gtk/gtk.override (_wrap_gtk_adjustment_new): Change all - gtk.Adjustment constructor parameter default values back to 0, as - it was before pygtk 2.4. - -2004-10-13 Gustavo J. A. M. Carneiro - - * gobject/pygobject.h: s/typename/typename_/, because typename is - a C++ keyword. - Add G_BEGIN_DECLS / G_END_DECLS. - Fixes #155304: pygobject.h cannot be included in C++ programs. - -2004-10-05 Johan Dahlin - - * gtk/libglade.override (pyglade_xml_lookup_type): Fix silly silly - bug. When using typedict for a glade.XML object, AttributeErrors - set when calling PyMapping_GetItemString on a dictionary isn't - reset. - - I wonder why nobody tried this before? Sigh. At least it's my - fault, so I have no one else to blame, even though I'm trying hard - -2004-10-03 John Finlay - - * examples/pygtk-demo/demos/dnd.py Fix popup dest code and - use gobject timeout functions. - -2004-10-03 Johan Dahlin - - * configure.in: Post release version bump - -=== PyGtk 2.4.0 === -2004-10-03 Johan Dahlin - - * NEWS: Update - -2004-10-01 John Finlay - - * examples/pygtk-demo/* Replace the pygtk-demo with the new - version written by Maik Hertha. Fixes #138823. - -2004-09-27 John Ehresman - - * gobject/gobjectmodule.c (pyg_enable_threads): Allow gtk_main to - be invoked from a thread created by the threading module by - requiring the GIL be held when pyg_enable_threads is invoked. - -=== PyGtk 2.3.97 === -2004-09-28 Johan Dahlin - - * NEWS: Update - - * gobject/gobjectmodule.c: - * gobject/pygobject-private.h: - * gobject/pygobject.h: - * tests/test_thread.py: - * tests/testhelpermodule.c: - - Apply slighly modified fix from bug 149845 - This is make threading usable for both users of the threading - module and users that requires interaction with threads from - other extension modules. - -2004-09-28 Johan Dahlin - - * tests/testhelpermodule.c: - * tests/test_thread.py: Add thread stuff, that emits stuff from - another thread and does some enum magic. - -2004-09-27 John Ehresman - - * gobject/gobjectmodule.c: New functions exposed through - _PyGObject_Functions to work around bugs in the PyGILState - api's - * gobject/pygobject.h: idem - * gobject/pygobject-private.h: idem - * gtk/gtk.override (_wrap_gtk_main): add pyg_enable_threads() - call to ensure thread state for thread invoking this function - is remembered. Only call pyg_enable_threads() here if threads - were previously enabled - -2004-09-27 John Ehresman - - * tests/common.py: catch ImportError if glade is not found - and set glade to None - -2004-09-27 Johan Dahlin - - * tests/testhelper.c: Small c module to help testing - - * codegen/codegen.py: Revert parts of - Gustavos changes, so the size of interfaces are correct. - - * tests/test_subtype.py: tests for this, use testhelper here - aswell - -2004-09-26 Gustavo J. A. M. Carneiro - - * gobject/pygobject-private.h, gobject/pygobject.h: Make - PyGClosure structure semi-public, for gnome-python. - -2004-09-25 Johan Dahlin - - * tests/test_signal.py: Move some tests from gtype and rename from - signal.py - -2004-09-25 Gustavo J. A. M. Carneiro - - * tests/gtype.py (GTypeTest.testGObjectInvalidSignalOverride): New - test with test case in #153718. - - * gobject/gobjectmodule.c (pyg_type_register): - PyDict_GetItemString returnes a borrowed reference, therefore - remove Py_DECREF(gsignals) and Py_DECREF(gproperties) everywhere. - - Fixes bug 153718: exception in overriden gsignals causes ref count - problems. - -2004-09-24 James Henstridge - - * gtk/gdk.override (_wrap_gdk_color_parse): initialise the - GdkColor struct to zeroes, so we don't get a random value in the - "pixel" field after parsing the colour string. - -2004-09-22 John Ehresman - - * gtk/gdk.override: (_wrap_gdk_color_new): pass int variables - to ParseTupleAndKeywords and then assign to GdkColor fields - -2004-09-17 Johan Dahlin - - * gobject/pygflags.c: Filter out 0 values - - * Makefile.am: - * docs/Makefile.am: Revert documentation changes - -2004-08-28 Gustavo J. A. M. Carneiro - - * gtk/gtk.override (_wrap_gtk_bin_tp_init): override, chain to parent type. - (_wrap_gtk_item_tp_init): idem. - (_wrap_gtk_box_tp_init): idem. - (_wrap_gtk_button_box_tp_init): idem. - (_wrap_gtk_separator_tp_init): idem. - (_wrap_gtk_separator_tp_init): idem. - Partially fixes #150698. - -2004-08-27 Xavier Ordoquy - - * gtk/gtk.override: raise a TypeError if an action callback - isn't callable. - -2004-08-24 Gustavo J. A. M. Carneiro - - * gtk/gtk.defs: Clarify the DeprecationWarning messages in - gtk.Progress methods. - -2004-08-22 Gustavo J. A. M. Carneiro - - * examples/gtk/widget.py (PyGtkWidget.__init__): Call - gtk.Widget.__init__ instead of __gobject_init__. - - * gtk/gtkwidget.override (_wrap_gtk_widget_new): Override, chain - to parent type. Fixes bug #150698. - -Sun Aug 22 09:47:12 2004 Owen Taylor - - * gtk/gtktreeview.override (_wrap_gtk_list_store_reorder): Don't - access private 'length' field of GtkTreeStore, rather use - gtk_tree_model_iter_n_children(). - -2004-08-21 John Finlay - - * gtk/gtk.override (_wrap_gtk_font_button_new) Fix property name. - -2004-08-19 John Finlay - - * examples/simple/dnd.py - * examples/simple.scribble.py Update. - - * examples/ide/pyide.py - * examples/ide/browse.py - * examples/ide/edit.py - * examples/ide/gtkcons.py - * examples/ide/gtkdb.py - * examples/ide/gtkprof.py - Update ide example program files. - * examples/ide/dialogs.py Add helper dialogs. - -2004-08-16 Gustavo J. A. M. Carneiro - - * examples/pygtk-demo/demos/entrycompletion.py: Add - GtkEntryCompletion example, by Fernando San Martín Woerner. - - * examples/Makefile.am (EXTRA_DIST): Add fsmw's entrycompletion.py - example. - - * codegen/codegen.py (GObjectWrapper.get_initial_class_substdict) - (GInterfaceWrapper.get_initial_class_substdict) - (GBoxedWrapper.get_initial_class_substdict) - (GPointerWrapper.get_initial_class_substdict): Refactor substdict - code: move most common items to parent class, and just override a - few in subclasses. Set default value for slot tp_flags. - - * gobject/pygobject.c (pygobject_register_class): Remove hardcoded - ( and unnecessary ) initialization of slots tp_dealloc, - tp_traverse, tp_clear, tp_flags, tp_weaklistoffset, and - tp_dictoffset. They will naturally inherit from parent type if unset. - - * codegen/codegen.py - (GObjectWrapper.write_property_based_constructor): honor flag - caller-owns-return. - (Wrapper): Allow override of tp_traverse, tp_clear, tp_dealloc, tp_flags. - (Wrapper.write_class): Allow slots listed by - get_initial_*_substdict to be overridden. - -2004-08-14 John Finlay - - * gobject/pygenum.c (pyg_enum_repr) Match enum values to avoid - segfaults when enum minimum isn't 0 and values aren't a continuous - sequence. - -Wed Aug 11 11:43:07 2004 Jonathan Blandford - - * Makefile.am: - * gtk/Makefile.am: use $(pyexecdir) instead of $(pythondir) - as the module as a whole should be installed in the same place, - #149849 - -2004-08-10 Johan Dahlin - - * Makefile.am (dist-nodoc): New target - - * docs/ref: Adding Johns reference manual - - * docs/: (incomplete) buildsystem for documentation and removing - old documentation - -2004-08-08 John Finlay - - * gobject/pygflags.c (pyg_flags_add) Return NULL when no stub. - -2004-08-06 Johan Dahlin - - * configure.in (ACLOCAL): - - * setup.py (MICRO_VERSION): Post release version bump - - -=== PyGtk 2.3.96 === -2004-08-06 Johan Dahlin - * NEWS: Update. - - * gobject/pygflags.c (pyg_flags_from_gtype): Don't comment out the - fallback, it break the test. (Wow, the testsuite caught another bug!) - - * tests/enum.py: Additional tests. - - * gobject/pygenum.c (pyg_enum_repr): Don't use g_enum_get_value, - use enum_class->values[n].value_name instead. Also check if the - value is NULL or not. This makes gtk.icon_size_register work a - little bit better. - - * codegen/codegen.py (Wrapper.write_methods): Use methflags - argument for defines instead of discarding it - -2004-08-04 John Finlay - - * codegen/argtypes.py Return string instead of Atom. - - * gtk/gtk.override (_wrap_gtk_selection_data_get_targets) - (_wrap_gtk_drag_dest_find_target) - (_wrap_gtk_drag_dest_get_target_list) - (_wrap_gtk_clipboard_wait_for_targets) - (clipboard_request_targets_cb) - Return string(s) instead of Atom(s). - - * gtk/gtkmodule.c (init_gtk) Add string instead of Atom using - add_atom. - -2004-08-04 Johan Dahlin - - * tests/enum.py (EnumTest.testOutofBounds): New test. - - * gobject/pygflags.c (pyg_flags_from_gtype): - * gobject/pygenum.c (pyg_enum_from_gtype): Don't segfault on - unknown values. - -2004-08-04 John Finlay - - * gtk/gtk.override (_wrap_gtk_stock_lookup) - (_wrap_gtk_accelerator_parse) (gtk_accel_map_lookup_entry) - Use flags instead of enum. - - gtk/gdk.override (_wrap_gdk_event_tp_getattr) - Return flags instead of ints for event members. - (_wrap_gdk_device_get_state) (_wrap_gdk_window_get_pointer) - (_wrap_gdk_display_get_pointer) (_wrap_gdk_event_get_state) - (_wrap_gdk_keymap_translate_keyboard_state) - Return flags instead of ints - -2004-08-04 Gustavo J. A. M. Carneiro - - * everywhere: s/PyGILState_Ensure/pyg_gil_state_ensure; - s/PyGILState_Relase/pyg_gil_state_release; - s/Py_BEGIN_ALLOW_THREADS/pyg_begin_allow_threads; - s/Py_END_ALLOW_THREADS/pyg_end_allow_threads; - - * gobject/pygobject-private.h, gobject/pygobject.h: Add new macros - pyg_threads_enabled, pyg_gil_state_ensure, pyg_gil_state_release, - pyg_begin_allow_threads, - pyg_end_allow_threads. pyg_threads_enabled indicates whether - threads are currently enabled. The others just mimick the - equivalent python functions, except that they do nothing when - threads are not enabled. - - * gobject/pygobject.h: Add boolean flag to pygobject API structure - indicating whether threading is activated; also add enable_threads - api entry point. - - * gobject/gobjectmodule.c (pyg_enable_threads): New pygobject API - function to activate pygtk thread awareness. - (pyg_threads_init): gobject.threads_init(), calls pyg_enable_threads. - -2004-08-04 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_accel_map_lookup_entry): - GdkModifierType is flags not an enum. - - * gobject/pygenum.c (pyg_enum_from_gtype): Don't crash if its not - an enum - - * gobject/pygflags.c (pyg_flags_from_gtype): Don't crash if its - not flags - -2004-08-03 Gustavo J. A. M. Carneiro - - * gobject/pygobject.c (pygobject_emit): Remove unused variable _save - - * gtk/gtkmodule.c (_pygtk_log_func): Aquire GIL. - -2004-08-03 Johan Dahlin - - * gobject/pygenum.c (pyg_enum_from_gtype): Create a new GType on - the fly if there isn't one for the GType. - (pyg_enum_add): Allow module to be NULL. - - * codegen/argtypes.py: - * gobject/gobjectmodule.c: (pyg_source_remove): - * gobject/pygmaincontext.c: (_wrap_g_main_context_iteration), - (_wrap_g_main_context_pending): - * gobject/pygmainloop.c: (_wrap_g_main_loop_is_running): - * gobject/pygobject.c: (pygobject_handler_is_connected): - * gobject/pygparamspec.c: (pyg_param_spec_getattr): - * gobject/pygtype.c: (pyg_value_as_pyobject): - * gtk/gdk.override: - * gtk/gtk.override: - * gtk/gtktextview.override: - * gtk/gtkwidget.override: - * pango.override: Add better support for boolean type now when - we can require 2.3. Fixes bug 149121 - -2004-08-03 Johan Dahlin - - * gtk/pygtktreemodel.c: Clean up most functions here to have only - one return path. - - * gobject/pygobject.c (pygobject_emit): Protect g_value_unset by - UNBLOCK/BLOCK_THREADS since it might call pygobject_free which - will result in a deadlock. - - * gobject/gobjectmodule.c (pyg_thread_init): New function, move - thread initalization stuff in here. - - * All over the place: Kill pyg_block/unblock_threads and use - PyGILState and Py_BEGIN/END_ALLOW_THREADS. - - unblock [code] block calls are replaced by Py_BEGIN/END and - block [code] unblock calls are replaced by PyGILState. - -2004-08-03 Xavier Ordoquy - - * autogen.sh: Takes ACLOCAL_FLAGS into account. - Fixes #149115 (Mariano Suárez-Alvarez) - -2004-08-02 John Finlay - - * gtk/gtk.defs (gtk_expander_new) (gtk_expander_new_with_mnemonic) - label can be None - make label optional - (gtk_expander_set_label) (gtk_expander_set_label_widget) - label and label_widget can be None - -2004-08-02 Johan Dahlin - - * configure.in: Post release version bump - - * setup.py (MICRO_VERSION): - -=== PyGtk 2.3.95 === -2004-08-02 Johan Dahlin - - * NEWS: Update - - * gobject/gobjectmodule.c (initgobject): Call - PyEval_InitThreads. Perhaps its something that always should be - called. - - * README (Author): Add a requirements section - - * configure.in: Require Python 2.3 - - * setup.py (version): Ditto - - * gobject/pygtype.c, gobject/pygobject.h: Remove 2.2 compat. - - * All over the place: Add support for PyGILState. - -2004-07-30 John Finlay - - * gtk/gtk.override (_wrap_gtk_adjustment_new) Impl. - Rearrange arg_names and prop_names so value is last. - Fixes #148860 (Steve Chaplin). - -2004-07-29 John Ehresman - - * setup.py: Remove --enable-threading from argv before calling - distutils - -2004-07-29 John Finlay - - * gtk/gtk.override (_wrap_gtk_action_get_proxies) - slist should not be freed. Fixes 148801. (Abel Daniel) - -2004-07-29 John Ehresman - - * setup.py: Add --disable-numeric option to disable numeric support - even when the runtime check finds it - -2004-04-01 Scott Tai - - Reviewed by: Johan Dahlin - - * gtk/gdk.override: Remove ignore for win32, the functions are now - implemented on win32 fixes bug 138804 - -2004-06-14 Benjamin Otte - - Reviewed by: Johan Dahlin : - - * codegen/h2def.py (write_func): only remove the first occurence of - the object name, we don't want to mess up the function name, - fixes bug 144363 - -2004-07-29 John Finlay - - * gtk/gtktreeview.override (_wrap_gtk_list_store_insert_before) - (_wrap_gtk_list_store_insert_after) Allow sibling to be None. - Fixes #148751 (Steve Chaplin) - - * gtk/pygtktreemodel.c Fix reference leaks. Fixes#148748. Thanks - to Tim Evans. - -2004-07-29 Johan Dahlin - - * tests/gtype.py (GTypeTest.checkType): Use - gobject.type_name,type_from_name for testing instead of GtkListStore. - -2004-07-28 John Finlay - - * gtk/gtktreeview.override (_wrap_gtk_tree_view_get_cursor) - (_wrap_gtk_tree_sortable_get_sort_column_id) - (_wrap_gtk_tree_view_get_drag_dest_row) - (_wrap_gtk_tree_view_get_dest_row_at_pos) - Fix reference leaks. - - * gtk/gtk.override (_wrap_gtk_box_query_child_packing) - (_wrap_gtk_notebook_query_tab_label_packing) - (_wrap_gtk_tooltips__get_active_tips_data) - (_wrap_gtk_tooltips__get_tips_data_list) - (_wrap_gtk_image_get_pixmap) (_wrap_gtk_image_get_image) - (_wrap_gtk_image_get_stock) (_wrap_gtk_image_get_icon_set) - (_wrap_gtk_scrolled_window_get_policy) - (_wrap_gtk_tooltips_data_get) (_wrap_gtk_accel_map_lookup_entry) - Fix reference leaks. - - * pango.override (pypango_attr_iterator_get_font) - Fix reference leaks. - -2004-07-28 Johan Dahlin - - * gobject/pygenum.c (pyg_enum_compare): - * gobject/pygflags.c (pyg_flags_compare): Reverse operator, it was - wrong before, spotted by Abel Daniel - - * tests/enum.py (FlagsTest.testComparision) - (FlagsTest.testComparision): New tests - - * gobject/pygtype.c (pyg_type_from_object): If we're on python - 2.3, also check for PyBool_Type. Fixes #148684 (Steve Chaplin) - - * tests/gtype.py (GTypeTest.testBoolType): New test - -2004-07-27 John Finlay - - * gtk/gtk-types.c (pygdk_atom_compare) Remove. - (pygdk_atom_richcompare) Implement with comparison to strings. - (PyGdkAtom_Type) Set tp_compare to 0 and tp_richcompare to - pygdk_atom_richcompare. - Allow an Atom to be compared with a string. Fixes #148564. - -2004-07-26 Johan Dahlin - - * acinclude.m4: Remove, replaced with: - - * m4/jhflags.m4: New file, includes compiler macros - - * m4/python.m4: New file, includes python macros - - * autogen.sh: Copy over autogen.sh from gnome-common.h - - * gtk/__init__.py: Readd _gobject, but warn if it's used - -2004-07-25 John Finlay - - * gtk/pygtktreemodel.c (pygtk_generic_tree_model_get_value) - Skip pyg_value_from_pyobject() if return value is Py_None. - Fixes #148230. - -2004-07-23 John Finlay - - * gtk/gtk.override (clipboard_request_text_cb) Fix bug when no text. - (clipboard_request_targets_cb) Fix bug when no targets. - -2004-07-23 Gustavo J. A. M. Carneiro - - * gtk/gtk.override (_wrap_gtk_list_item_new): Add deprecation warning. - - * codegen/codegen.py (write_property_based_constructor): Honor the - "deprecated" option. - -2004-07-23 John Finlay - - * gtk/gtk.override (_wrap_gtk_dialog_new_with_buttons) - (_wrap_gtk_message_dialog_new) - Use pyg_flags_get_value(). - - * gtk/gtk-types.defs (TextSearchFlags) Fix typo. - - * gtk/gtktextview.override (_wrap_gtk_text_iter_forward_search) - (_wrap_gtk_text_iter_backward_search) - Use pyg_flags_get_value. - - * gtk/gtk-extrafuncs.defs (flags) (set_flags) (unset_flags) - Use GtkWidgetFlags as args and return value. - -2004-07-22 Johan Dahlin - - * setup.py (MICRO_VERSION): - * configure.in: Post release version bump - -=== PyGtk 2.3.94 === -2004-07-22 Johan Dahlin - - * NEWS: Update - -2004-07-21 Johan Dahlin - - * gobject/pygflags.c (pyg_flags_get_first_value_name) - (pyg_flags_get_first_value_nick): Add, so Lorenzo can introspect - flags properly too - (pyg_flags_get_value_names, pyg_flags_get_value_nicks): Make this - a little bit more useful. All values can still be fetch - through __flags_values__ - - * tests/enum.py: Improve and extend to test most enum/flags operations - -2004-07-20 John Finlay - - * codegen/codegen.py (write_enums) Fix bug causing segfault when - loading pango module. - -2004-07-20 Lorenzo Gil Sanchez - - * gtk/gtk.override (_wrap_gtk_file_chooser_dialog_new): fixed a - compilation error: 'window' variable should be 'parent' - -2004-07-20 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_file_chooser_dialog_new): Simplify, - fix name in exceptions and remove warning. - - * gobject/pygenum.c (pyg_enum_from_gtype): Fall back to int for - unregistered enums. - - * gobject/pygflags.c (pyg_flags_from_gtype): Ditto - - * gobject/gobjectmodule.c (initgobject): Rename back to MainLoop, MainContext - -2004-07-19 Gustavo J. A. M. Carneiro - - * gtk/libglade.override (_wrap_glade_xml_new): Allow pydict to be unset. - -2004-07-19 Johan Dahlin - - * setup.py (MICRO_VERSION): - * configure.in: Post release version bump - -=== PyGtk 2.3.93 === -2004-07-19 Johan Dahlin - - * NEWS: Update - - * gtk/gtk.override (_wrap_gtk_dialog_new_with_buttons): Return - 1/0, instead of flagvalue/0 to avoid GObject complains. - (_wrap_gtk_dialog_run): Simplify - - * gtk/libglade.override: Subclass GladeXML so we can wrap - lookup_type. Add a new optional argument to GladeXML.__init__ that - is a mapping object that will be used to translate types. Thanks - to Gustavo for helping out. This should make kiko somewhat - happy. Fixes bug 140071 - - * tests/enum.py (EnumTest.testWindowGetState): Fix, a window is - really WITHDRAWN if it's not SHOWN and not ICONIFIED... - - * tests/common.py: Add .. and ../gobject when distcheck isn't ran - - * gobject/pygenum.c: Use a dict instead of a tuple for - __enum_values__, so we can handle negative enum values (eg: GDK_NOTHING) - - * gobject/pyflags.c: Ditto for __flag_values__ - - * gobject/pygparamspec.c (pyg_param_spec_getattr): reference count fixing - - * gobject/Makefile.am: - * setup.py: - * makefile.msc: Update, why do I even bother to update 3 different - build systems? - - * gobject/: Split out GParamSpec, GMainLoop, GMainContext and - GPointer to separate files. Also remove *.h files and go back to - the old scheme (everything in pygobject.h) - - * description.py: Remove, out of date since 0.6.x! - - * tests/Makefile.am, tests/common.py: Make distcheck pass - -2004-07-18 John Ehresman - - * gobject/pygflags.c, gobject/pygenum.c, gobject/gobjectmodule.c - (initgobject): Remove references to &PyInt_Type from static type - struct initialization and manually set it before PyType_Ready calls - - * makefile.msc, gtk/makefile.msc, gobject/makefile.msc: VC++ makefile - changes for new directory layout - -2004-07-18 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_action_group_add_radio_actions) - (_wrap_gtk_action_group_add_toggle_actions) - (_wrap_gtk_action_group_add_actions): Add optional user_data argument. - - * gobject/pygflags.c (pyg_flags_get_value_nicks) - (pyg_flags_get_value_names): New getters - - * gobject/pygenum.c (pyg_enum_get_value_nick) - (pyg_enum_get_value_name): New getters - - * gobject/gobjectmodule.c (pyg_param_spec_getattr): add enum_class - and flags_class properties. - -2004-07-18 Gustavo J. A. M. Carneiro - - * gtk/gtk.defs (gtk_combo_new): Add deprectation warning. - (gtk_item_factory_new): idem. - (gtk_list_item_new): idem. - (gtk_list_item_new_with_label): idem. - (gtk_option_menu_new): idem. - - * gtk/gtkclist.override (_wrap_gtk_clist_new_with_titles): Give - deprecation warning. - - * gtk/gtkctree.override (_wrap_gtk_ctree_new_with_titles): Give - deprecation warning. - - * gtk/gtk.defs (plug_new_for_display): Deprecate, since the - regular gtk.Plug constructor can accept a GdkDisplay now. - - * gtk/gtk.override (_wrap_gtk_plug_new): Override constructor, - convert to g_object_new based; Add optional parameter 'display', - available since Gtk 2.2. - - * gtk/gtktreeview.override (_wrap_gtk_tree_view_column_new): - Convert constructor to property based. - - * gtk/gtk.defs (gtk_vscrollbar_new): Convert constructor to - property based. - (gtk_tree_view_new_with_model): idem. - (gtk_text_view_new_with_buffer): idem. - - * gtk/gtk.override (_wrap_gtk_pixmap_new): Override - _wrap_gtk_pixmap_new, construct with g_object_new. - -2004-07-17 Johan Dahlin - - * tests/enum.py: add, forgot it in last commit - - * gobject/: Move gobject source files in here. - -2004-07-17 Gustavo J. A. M. Carneiro - - * gtk/gtk.override (_wrap_gtk_dialog_new_with_buttons): Don't pass - 'parent' property if no parent is given or is None. - -2004-07-17 Johan Dahlin - - * codegen/codegen.py: - * codegen/argtypes.py: Update for enums - - * pygtype.c (pyg_value_as_pyobject): Use new enum/flag functions - - * pygenum.[ch]: Handle GFlag - - * pygflags.[ch]: Handle GFlag - - * atk-types.defs: Fix gtype-id for all enums - - * gobjectmodule.c (initgobject): Clean up and add convinience macros - - * tests/enum.py: New file - - * tests/common.py: New file, also stole from gst-python - -2004-07-17 Gustavo J. A. M. Carneiro - - * gtk/gtk.override (_wrap_gtk_table_new): Override to allow rows - and columns default to 1, unlike the underlying gtk/C API which - defaults to 0. - -2004-07-15 John Finlay - - * gtk/gtk.override (_wrap_gtk_menu_item_new): Use AccelLabel instead - of Label and dup MenuItem creation process. - (_wrap_gtk_check_menu_item_new): idem - (_wrap_gtk_radio_menu_item_new): idem. - (_wrap_gtk_button_new): Set "use_underline" to TRUE when stock item - (_wrap_gtk_check_button_new): Add optional argument - 'use_underline', defaulting to TRUE. - (_wrap_gtk_radio_button_new): idem. - (_wrap_gtk_toggle_button_new): idem. - (_wrap_gtk_message_dialog_new) Fix erroneous error message. - #147421 - -2004-07-15 Gustavo J. A. M. Carneiro - - * gtk/gtk.override (_wrap_gtk_menu_item_new): add optional argument - 'use_underline', defaulting to True. - (_wrap_gtk_radio_check_menu_item_new): idem. - (_wrap_gtk_radio_menu_item_new): idem. - (_wrap_gtk_button_new): idem. - Fixes #147421. - -2004-07-13 Gustavo J. A. M. Carneiro - - * gtk/gtk.override (_wrap_gtk_button_new): Construct with - g_object_new. - (_wrap_gtk_toggle_button_new): idem. - (_wrap_gtk_check_button_new): idem. - (_wrap_gtk_radio_button_new): idem. - (_wrap_gtk_menu_item_new): idem. - (_wrap_gtk_check_menu_item_new): idem. - (_wrap_gtk_radio_menu_item_new): idem. - (_wrap_gtk_check_menu_item_new): idem. - (_wrap_gtk_progress_bar_new_with_adjustment): idem. - (_wrap_gtk_file_chooser_new): idem. - (_wrap_gtk_color_button_new): idem. - (_wrap_gtk_combo_box_new): idem. - (_wrap_gtk_combo_box_entry_new): idem. - (_wrap_gtk_file_chooser_widget_new): idem. - (_wrap_gtk_font_button_new): idem. - (_wrap_gtk_radio_tool_button_new): idem. - (_wrap_gtk_toggle_tool__button_new): idem. - (_wrap_gtk_tool_button_new): idem. - (_wrap_gtk_entry_new): idem. - (_wrap_gtk_dialog_new_with_buttons): idem. - - (_wrap_gtk_image_menu_item_new): Raise exception if attempted to - subclass this object without calling __gobject_init__. - (_wrap_gtk_message_dialog_new): idem. - -2004-07-12 John Finlay - - * gtk/gtkwindow.override (set_geometry_hints) Fix arg format string. - Fixes #147458. Thanks to Theo Reed. - -2004-07-10 Johan Dahlin - - * tests/runtests.py: New script to run all tests in one take - - * tests/Makefile.am: autotoolify - - * tests/signal.py: New simple test taken from - examples/gobject/signal.py - -2004-07-08 Gustavo J. A. M. Carneiro - - * gtk/gtk.defs: Change to most constructors to property based. - - * codegen/codegen.py (GObjectWrapper.write_property_based_constructor): - Handle propname != argname cases. - - * codegen/definitions.py (FunctionDef.__init__): Parse (argname - "xxx") inside properties list, to support argname != propname. - (Property.__init__): Accept new argname parameter. - -2004-07-07 Gustavo J. A. M. Carneiro - - * codegen/definitions.py (FunctionDef.write_defs): Handle new - properties syntax. - - * gtk/gdk.override (_wrap_gdk_colormap_alloc_color): Raise - ValueError instead of TypeError if unable to parse colour - specification. - (_wrap_gdk_color_parse): idem. Fixes #144862. - -2004-07-04 John Finlay - - * gtk/gtktreeview.override (_wrap_gtk_tree_model_rows_reordered) - Allow None, () or "" for top level path. - -2004-07-04 Gustavo J. A. M. Carneiro - - * gtk/gtk.defs (gtk_hbox_new): Change constructor to property based. - - * gobjectmodule.c (pyg_parse_constructor_args): Helper function - invoked from the generated constructors. - - * codegen/codegen.py (Wrapper.write_constructor): Delegate to - self.write_property_based_constructor() when appropriate. - (GObjectWrapper.write_property_based_constructor): New constructor - generator, that writes constructors that use g_object_newv and - pass constructor arguments as properties. - - * codegen/definitions.py (Parameter): New Parameter class, to hold - the items in (parameter ...). Emulates tuple for compatibility, - but is more extensible. - (Property): New property class, to hold (property ...) items. - (FunctionDef.__init__): Parse (property ...), for new property - based constructors. - -2004-07-04 John Finlay - - * gtk/gtktreeview.override (_wrap_gtk_tree_store_new) Fix typo. - (_wrap_gtk_tree_model_rows_reordered) Allow None for path and iter - to allow reordering top level rows. Fixes #143834. - John Ehresman's patch with mods. - -2004-07-04 John Ehresman - - * tests directory: unit tests - -2004-07-04 Gustavo J. A. M. Carneiro - - * gtk/gtktreeview.override (_wrap_gtk_tree_store_new): Use - g_object_newv to create instance, thus allowing subclassing - without __gobject_init__. - - * gtk/gtkmodule.c (init_gtk): Register new warning category, - GtkWarning. Register a log handler for Gtk warnings that issues a - python warning using GtkWarning category. - -2004-07-04 John Ehresman - - * codegen/argtypes.py (GUniCharArg): Use the converter function - pyg_pyobj_to_unichar_conv to parse gunichar parameters, instead of - templated code. - - * pygtype.c (pyg_pyobj_to_unichar_conv): impl. - - * pygobject.h, gobjectmodule.c: Add pyg_pyobj_to_unichar_conv to list of - exported functions. - -2004-07-04 Gustavo J. A. M. Carneiro - - * gtk/gdk.override (_wrap_gdk_colormap_query_color): Implement - gdk.Colormap.query_color. - - * gtk/gdk.defs (query_color): Add gdk.Colormap.query_color. - - * gtk/gtktreeview.override (pygtk_set_search_equal_func_marshal): - Column is integer, not PyGObject! :-/ - -2004-07-03 John Finlay - - * gtk/gtk.defs - * gtk/gtk-extrafuncs.defs I goofed in placing the GenericTreeModel - methods. Now they should be in the right place. - - * gtk/gtktreeview.override Ignore gtk_tree_view_get_search_equal_func. - - * gtk/pygtktreemodel.c - * gtk/pygtktreemodel.h - * gtk/gtk.defs - Add stamp to GenericTreeModel to use in detecting valid TreeIters. - Add invalidate_iters() method to allow custom tree models to - manage TreeIters when not persistent. - Add iter_is_valid() method to allow apps to determine if a TreeIter - for a custom tree model is valid. - -2004-07-03 Ross Burton - - * gtk/gdk.defs: Add gdk_pixbuf_new_subpixbuf. - -2004-07-03 Gustavo J. A. M. Carneiro - - * gtk/gtktreeview.override (_wrap_gtk_list_store_new): Construct - object with g_object_newv, then call - gtk_list_store_set_column_types(). Fixes #123037. - (_wrap_gtk_tree_view_set_search_equal_func): Impl. Most code is - copy-paste from - _wrap_gtk_tree_view_set_column_drag_function. Fixes #145342. - (_wrap_gtk_tree_selection_get_selected_rows): Initialize model to - NULL, to avoid crash when the tree is empty. - -2004-06-29 Lorenzo Gil Sanchez - - * setup.py: changed the version to 2.3.93 so we can build it on Windows - with correct version information. - -2004-06-28 Gustavo J. A. M. Carneiro - - * gtk/gdk.override (_wrap_gdk_window_set_user_data): Fixup and do - some real testing of last changes, to make this really safe using - a pair of mutual weak references between the widget and its - window. Fixes #145091. - -2004-06-27 Gustavo J. A. M. Carneiro - - * codegen/definitions.py - (Definition.guess_return_value_ownership): new method (name to - guess default value for caller_owns_return. - (MethodDef.__init__): Call guess_return_value_ownership here. - (FunctionDef.__init__): And here as well. - (get_valid_scheme_definitions): new function to filter out invalid - elements in a definition. - (ObjectDef.__init__): Use get_valid_scheme_definitions here. - (InterfaceDef.__init__): and here - (EnumDef.__init__): here too - (BoxedDef.__init__): and here - (PointerDef.__init__): here as well - (MethodDef.__init__): idem - (FunctionDef.__init__): idem - Paches by Scott Tsai, with a bit of refactoring by me. - - * gtk/gdk.override (_wrap_gdk_color_parse): Raise TypeError when - color cannot be parsed. Fixes #144862. - - * gtk/gtk.override (_wrap_gtk_adjustment__set_value): Use - pygtk_util_pyobject_as_double to convert the value. - (_wrap_gtk_adjustment__set_lower): idem - (_wrap_gtk_adjustment__set_upper): idem - (_wrap_gtk_adjustment__set_step_increment): idem - (_wrap_gtk_adjustment__set_page_increment): idem - (_wrap_gtk_adjustment__set_page_size): idem - (pygtk_util_pyobject_as_double): New utility function to convert - any numeric object to C double. - - * gtk/gdk.override (_wrap_gdk_window_set_user_data): Raise - TypeError instead of value error when user data is not of - gtk.Widget type. - (_wrap_gdk_window_set_user_data): Add weak reference to the widget - for increased safety, just in case the widget is ever destroyed - before the window, however unlikely that may be... - -2004-06-26 Lorenzo Gil Sanchez - - * gtk/gdk.override (_wrap_gdk_window_set_user_data): only allow - GtkWidgets to be the user data - (_wrap_gdk_display_list_devices): only get GtkWidgets to be simetric - with _wrap_gdk_window_set_user_data - - * gtk/gtk.defs : modified the parameters of some GtkNotebook methods - so they can accept NULL arguments - - * gtk/gtk.override: removed the _wrap_gtk_notebook_insert_page and - _wrap_gtk_notebook_set_tab_label since they are not needed anymore with - the changes to gtk/gtk.defs - -2004-06-20 Scott Tsai - - * codegen/argtypes.py (ObjectArg.write_return): Check for NULL - GObject before unreffing. Fixes Bug 137086 (gtk.gdk.window_lookup - assertion). (reviewed by Gustavo Carneiro) - -2004-06-20 Gustavo J. A. M. Carneiro - - * gtk/gtkmodule.c (init_gtk): Just like GtkWindow, register custom - sink function for GtkInvisible type. - - * codegen/codegen.py - (GObjectWrapper.get_initial_constructor_substdict): Removed - special treatment of GtkInvisible, no longer needed. - - * gtk/gtkmodule.c (sink_gtkinvisible): Copy-paste from sink_gtkwindow. - - * pygobject.c (pygobject_new_with_interfaces): Add hack to - workaround python tp_(get|set)attr slot inheritance bug. Fixes - pygtk bug #144135 (gtk.gdk.GC attributes not working). - -2004-06-18 Lorenzo Gil Sanchez - - * gtk/gdk.override (_wrap_gdk_window_get_user_data): finally I got it - working with Gustavo's help - - * gtk/gdk.override (_wrap_gdk_window_get_user_data): make it compile - again - - * gtk/gdk.defs (get_user_data): added so we can implement - _wrap_gdk_window_get_user_data - - * gtk/gdk.override (_wrap_gdk_window_get_user_data): implemented so - we can retrieve the GtkWidget of a GdkWindow. By the way, is it - possible to know if a gpointer is a PyObject? - - * gtk/gtk.override (_wrap_gtk_notebook_insert_page): allow to insert - pages without a tab_label widget (i.e None) so a default one is created - by GTK+. - (_wrap_gtk_notebook_set_tab_label): allow to set a None tab_label - widget so a default one is created by GTK+ - -2004-06-14 John Finlay - - * gtk/gtk.override (_wrap_gtk_clipboard_set_with_data) - (_wrap_gtk_drag_dest_set) (_wrap_gtk_drag_dest_find_target) - (_wrap_gtk_drag_dest_set_target_list) (_wrap_gtk_drag_source_set) - (_wrap_gtk_drag_begin) (_wrap_gtk_selection_add_targets) - Avoid segfault if first item in a py_targets tuple is None by - forcing first item to be a string. - (_wrap_gtk_drag_dest_get_target_list) target_list should not - be unreffed. - -2004-06-14 Lorenzo Gil Sanchez - - * gtk/gtkwidget.override (_wrap_gtk_widget_hide_on_delete): added dummy - args so you can do win.connect ('delete-event', win.hide_on_delete) - -2004-06-13 Gustavo J. A. M. Carneiro - - * gtk/gtkmodule.c (sink_gtkobject, init_gtk): Add custom sink - function, that increments reference count of newly created - GtkWindow's. Solution provided by James Henstridge, code by Jon - Trowbridge. Fixes "Bug 122569: gtk.Window derived class segfaults." - - * codegen/codegen.py - (GObjectWrapper.get_initial_constructor_substdict): Special - treatment for GtkWindow no longer necessary due to the custom sink - function. - -2004-06-12 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_accel_groups_from_object): For Kiko. - -2004-06-11 Johan Dahlin - - * gtk/gdk.override (pygdk_filter_func_marshal): Return a - GdkEventType and not a PyObject. Fixes bug 143420 (Tim Evans). - -2004-06-09 John Finlay - - * gtk/gtk.override (_wrap_gtk_action_group_add_radio_actions) - Fix bug preventing callback being connected. Fixes #144022. Thanks - to Steve Chaplin. - -2004-06-09 Lorenzo Gil Sanchez - - * examples/gtk/widget.py (PyGtkWidget.do_size_request): change the - allocation parameter to requisition so we have a more clear example. - -2004-06-07 Gustavo J. A. M. Carneiro - - * examples/gtk/widget.py: Don't manually send configure events. - Instead, override size-request, taking the exact size of the text - and border width into consideration. - -2004-06-06 Johan Dahlin - - * gtk/gdk.override (_wrap_gdk_event_tp_setattr): Add - GDK_PROPERTY_NOTIFY attributes. - -2004-06-04 Johan Dahlin - - * gobjectmodule.c (pyg_param_spec_getattr): Add support for - paramspec.default_value for GParamSpec types that support it - -2004-06-04 Lorenzo Gil Sanchez - - * gobjectmodule.c (initgobject): added gobject.TYPE_UNICHAR - -2004-06-04 Johan Dahlin - - * gtk/gtkwidget.override (_wrap_gtk_widget_class_install_style_property): Impl - - * gtk/gtkcontainer.override - (_wrap_gtk_container_class_list_child_properties): Rename first - kwlist argument to klass (from widget), class should be a - GObjectClass and not a GtkWidgetClass - (_wrap_gtk_container_class_install_child_property): Impl. - - * gtk/gtk.defs: Change a couple of methods to functions and set - correct class - - * pygobject.h: Add pyg_param_spec_from_object - - * gobjectmodule.c (create_property): Don't install the property - here, return it instead. And don't require a GObjectClass as argument - (pyg_param_spec_from_object): New function - (add_properties): Update to new create_property - (pygobject_api_functions): Export pyg_param_spec_from_object - - * gtk/gtkcontainer.override - (_wrap_gtk_container_class_list_child_properties): Implement for Lorenzo. - - * gtk/gdk.override (_wrap_gdk_event_tp_setattr): Fix up *_CHECK calls - - * examples/gtk/widget.py: Add a new example of subclassing a GtkWidget. - - * Makefile.am (EXTRA_DIST): Add widget.py - - * pygobject.c (pygobject_new): guard object_ref call - - * examples/gtk/uimanager.py: Some more polishing, it'll never be finished! - - * gtk/gtkwidget.override (_wrap_gtk_widget__set_allocation): Impl. - (_wrap_gtk_widget__set_window): Impl. - - * gtk/gtkclist.override (_wrap_gtk_clist_new_with_titles): put - all clist overrides here. - - * gtk/gtk.override (_wrap_gtk_paint_polygon): Move gtk_widgets_* - ignore definitions to gtkwidget.override and clist_* to - gtkclist.override - (_wrap_gtk_action_group_add_actions): guard ref call - (_wrap_gtk_action_group_add_toggle_actions): ditto - (_wrap_gtk_action_group_add_radio_actions): ditto - - * gtk/gtk-types.c (_pygtk_style_helper_new): guard ref call. - - * gtk/gdk.override (_wrap_gdk_event_tp_setattr): Impl. - (I'll have nightmares about this code) - (_wrap_gdk_window_new): Clean up a little bit: Proper use of enums - and set a boolean to b instead of i. Block unref calls for thread - safety issues. - (_wrap_gdk_window_set_user_data): Impl. This is also a hairy - implementation: If it's a GtkWidget, get the GObject, otherwise - put the real pyobject in there. Maybe we should just always put - the widget in there. - (_wrap_gdk_window_add_filter): Thread safety. - -2004-05-30 John Finlay - - * gtk/gtktreeview.override (_wrap_gtk_tree_store_reorder) Fix - bug I inserted in check for GtkTreeIter. - -2004-05-29 John Finlay - - * gtk/gtktreeview.override - (_wrap_gtk_tree_view_set_column_drag_function) Add. Fixes #127504. - -2004-05-28 John Finlay - - * gtk/gtkcontainer.override (_wrap_gtk_container_child_set) - (_wrap_gtk_container_child_get) - (_wrap_gtk_container_add_with_properties) Check that at least - one arg is passed to method to avoid segfault. - - * gtk/gtk.override (_wrap_gtk_entry_new) - * gtk/gtk.defs (gtk_entry_new) (gtk_entry_new_with_max_length) - Apply patch from Scott Tsai. Fixes #139190. - -2004-05-28 Johan Dahlin - - * examples/gtk/uimanager.py: Add a toolbar and fix shortcuts. - -2004-05-27 John Finlay - - * gtk/gtktreeview.override - Ignore: gtk_tree_view_column_pack_start - gtk_tree_view_column_pack_end - gtk_tree_view_column_clear - gtk_tree_view_column_set_attributes - these are now covered by the - GtkCellLayout interface. Couldn't do the same for - gtk_tree_view_column_add_attribute and - gtk_tree_view_column_clear_attributes due to backward compatibility. - -2004-05-25 John Finlay - - * examples/gtk/filechooser.py Fix bug #140946. - -2004-05-24 John Finlay - - * gtk/gtktreeview.override - (_wrap_gtk_tree_view_column_set_cell_data_func) Change this override - to override gtk_cell_layout_set_cell_data_func - covers all objects - that implement GtkCellLayout in GTK+ 2.4 including GtkTreeViewColumn.. - Ignore gtk_tree_view_column_set_cell_data_func. - -2004-05-24 Johan Dahlin - - * gtk/gdk.override (_wrap_gdk_keymap_translate_keyboard_state): - Remove double ;, fixes compilation with gcc 2.95.3 on FreeBSD. - -2004-05-22 Johan Dahlin - - * NEWS: Don't lie about the release date. - - * configure.in: post release version bump - -=== PyGtk 2.3.92 === -2004-05-22 Johan Dahlin - - * NEWS: Update - -2004-05-21 Johan Dahlin - - * gobjectmodule.c (initgobject): Add gobject.pygtk_version - (_wrap_g_main_context_iteration): block/unblock - (_wrap_g_main_loop_run): ditto - -2004-05-21 John Finlay - - * gtk/gtk-types.c (_pygtk_tree_model_remove_row) Add function to - help in row removal from sort and filter models using del - (_pygtk_tree_model_set_row) Add support for TreeModelSort and - TreeModelFilter setting row values. - - * gtk/pygtk-private.h (_pygtk_tree_model_remove_row) Add declaration. - - * gtk/gtktreeview.override (_wrap_gtk_tree_model_tp_setitem) Use - _pygtk_tree_model_remove_row() helper function. - (_wrap_gtk_tree_model_filter_set_modify_func) Add. - Add support to TreeModelSort and TreeModelFilter for Python mapping, - number and iter protocols. - -2004-05-20 John Finlay - - * gtk/gtk.defs (gtk_tree_view_column_pack_start) - (gtk_tree_view_column_pack_end) Allow expand param to default to TRUE. - -2004-05-18 John Finlay - - * gtk/gtktreeview.override (_wrap_gtk_list_store_remove) Remove - this override - generated code is good. - - * pygobject.c (pygobject_new_with_interfaces) Add new type to the - module dict as is done for built-in types. - - * codegen/argtypes.py Fix bug in non-null default parselist - of ObjectArg. Add default handling for AtomArg. - - * gtk/gtk.defs (gtk_clipboard_get_for_display) - (gtk_clipboard_get) Allow args to use default values. - -2004-05-16 John Finlay - - * gtk/gtktreeview.override (_wrap_gtk_tree_selection_select_range) - Raise TypeError if selection mode is not gtk.SELECTION_MULTIPLE - -2004-05-15 John Finlay - - * gtk/gtktreeview.override (_wrap_gtk_tree_selection_select_all) - Raise TypeError if selection mode is not gtk.SELECTION_MULTIPLE - -2004-05-13 John Finlay - - * gtk/gtk.defs (gtk_selection_data_set_text) Default the text len - param to -1. - -2004-05-11 John Finlay - - * gtk/gtktreeview.override - (_wrap_gtk_tree_view_column_set_cell_data_func) Allow func to - be None to unset the function. - -2004-05-10 John Finlay - - * pygobject.c (pygobject_new) Bump refcount of types created by - pygobject_new_with_interfaces. Fixes #141042 - - * gtk/gtk.defs (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) These return gint in GTK+ 2.4. - -2004-05-07 John Finlay - - * gtk/gtktreeview.override (_wrap_gtk_tree_model_get) Add. - -2004-05-03 John Finlay - - * gtk/gtktextview.override (_wrap_gtk_text_iter_forward_find_char) - (_wrap_gtk_text_iter_backward_find_char) Add. - - * gtk/gtktreeview.override (_wrap_gtk_tree_store_reorder) Add. - (_wrap_gtk_list_store_reorder) Throw exception if indices out of - range. - - * gtk/gtk.override (gtk_accel_group_connect) - (gtk_accel_group_disconnect) (gtk_clipboard_set_with_owner) - (gtk_clist_set_compare_func) (gtk_color_selection_set_color) - (gtk_color_selection_get_color) (gtk_ctree_set_drag_compare_func) - Ignore these methods - either deprecated or not needed. - (_wrap_gtk_menu_item_toggle_size_request) Add. - -2004-05-03 Johan Dahlin - - * codegen/codegen.py (Wrapper): Add support for tp_as_buffer. - -2004-04-25 John Finlay - - * pango.defs (pango_language_from_string) Rework as a constructor - for pango.Language. - (pango_language_matches) Rework this as a method for pango.Language. - (pango_language_to_string) Add this as a method. - - * pango.override (_wrap_pango_language_from_string1) - (_wrap_pango_language_matches1) Add these to support deprecated - pango_language functions. - -2004-04-24 John Finlay - - * pango.override (_wrap_pango_attr_list_filter) Add. - (pypango_attr_iterator_get_attrs) Fix memory leak. - - * pango.defs (pango_font_face_list_sizes) Add definition. - - * pango.override (_wrap_pango_font_face_list_sizes) Add. - - * pango.defs (pango_font_family_is_monospace) Add definition. - - * pango.override (_wrap_pango_font_family_is_monospace) - Add two defines to avoid compilation warnings for this function. - - * pango.defs (pango_fontset_foreach) Add definition. - - * pango.override (_wrap_pango_fontset_foreach) Add. - - * pango-types.defs (PangoFontsetSimple) Add class. - - * pang_defs (pango_fontset_simple_new) - (pango_fontset_simple_append) (pango_fontset_simple_size) - Add methods for PangoFontsetSimple. - -2004-04-23 John Finlay - - * gtk/gdk.defs (gdk_window_set_accept_focus) (gdk_window_get_group) - Add definitions. - - * pango.defs (pango_attr_fallback_new) Add definition for AttrFallback. - - * pango.override (_wrap_pango_attr_fallback_new) Add. - (pypango_attr_tp_getattr) Add get attribute processing for - AttrFallback. - - * pango.defs (pango_attr_iterator_get_attrs) Add definition. - - * pango.override (pypango_attr_iterator_get_attrs) Add method. - -2004-04-22 John Finlay - - * gtk/gdk.override (_wrap_gdk_pixbuf_get_file_info) Add. - - * gtk/gdk.defs (gtk_pixbuf_get_file_info) Add definition. - - * gtk/gdk.defs (gdk_pixbuf_loader_set_size) - (gdk_pixbuf_loader_get_format) - (gdk_pixbuf_loader_new_with_mime_type) Add definitions. - (gdk_pixbuf_loader_new) Add deprecation warning - - * gtk/gdk.override (gdk_pixbuf_loader_get_format) Add. - - * gtk/gdk.override (gdk_query_depths) (gdk_query_visual_types) - Add these functions. - - * gtk/gdk.override (gdk_window_at_pointer) Add. - - * gtk/gdk.override (gdk_window_at_pointer) Should return None if - not on known window. - -2004-04-20 John Finlay - - * gtk/gdk.defs (gtk_colormap_get_screen) Add. - - * gtk/gdk.override (_wrap_gdk_cursor_new) Add 2 more ways of creating - a cursor corresponding to gdk_cursor_new_from_pixbuf and - gdk_cursor_new_for_display. - - * gtk/gdk.override (_wrap_gdk_display_get_maximal_cursor_size) Add. - - * gtk/gdk.defs (gdk_display_pointer_ungrab) - (gdk_display_keyboard_ungrab) Let time_ param default to - GDK_CURRENT_TIME. - - * gtk/gdk.defs (gdk_drawable_draw_pixbuf) Add default value of -1 for - the width and height params. - gc param can be NULL. - - * gtk/gdk.override (_wrap_gdk_event_get_state) Add. - - * gtk/gdk.override (_wrap_gdk_keyval_convert_case) - (_wrap_gdk_keymap_get_entries_for_keyval) - (_wrap_gdk_keymap_get_entries_for_keycode) - (_wrap_gdk_keymap_lookup_key) - (_wrap_gdk_keymap_translate_keyboard_state) Add. - -2004-04-19 John Finlay - - * gtk/gtktreeview.override - (_wrap_gtk_tree_view_column_cell_get_position) Add. - - * gtk/gtk.defs (gtk_ui_manager_add_ui) Allow param action to be NULL. - - * gtk/gtkwidget.override (_wrap_gtk_widget_style_get_property) - (_wrap_gtk_widget_class_list_style_properties) Add keyword arg - processing. - - * gtk/gtk.override (_wrap_gtk_widget_list_mnemonic_labels) Add. - - * gtk/gdk.override (_wrap_gdk_event_tp_getattr) Add "group" attribute - for GDK_KEY_PRESS and GDK_KEY_RELEASE event objects. Fix member list - build value bug. - -2004-04-18 John Finlay - - * gtk/gtktreeview.override - (_wrap_gtk_tree_model_filter_set_visible_func) Add. - (_wrap_gtk_tree_model_filter_convert_child_iter_to_iter) Return the - iter instead of passing it in. Throw exceptions on errors. - (_wrap_gtk_tree_model_filter_convert_iter_to_child_iter) Return the - child iter instead of passing it in. - - * gtk/gtktreeview.override (gtk_tree_row_reference_new_proxy) - (gtk_tree_row_reference_inserted) - (gtk_tree_row_reference_deleted) - (gtk_tree_row_reference_reordered) Ignore these. - - * gtk/gtk.defs (gtk_tree_store_move_after) - (gtk_tree_store_move_before) Allow position param to be NULL. - - * gtk/gtk.defs (gtk_tree_view_move_column_after) Allow base_column - to be NULL. - -2004-04-18 Gustavo J. A. M. Carneiro - - * gobjectmodule.c (pyg_type_register): Make sure we have a unique - GType name by appending -v to the name. Allows - registering multiple python classes with the same name in the same - module. - -2004-04-17 John Finlay - - * gtk/gtk.defs Add GtkToolItem constructor and method definitions. - - * gtk/gtk.defs (gtk_tool_item_set_proxy_menu_item) Allow menu_item - to be NULL. - (gtk_tool_item_set_tooltip) Allow parameters tip_text and tip_private - to be NULL. Default these to NULL. - - * gtk/gtk.defs Make gtk_tooltips_get_info_from_tip_window a method - of GtkWindow. - - * gtk/gtk.override (_wrap_gtk_tooltips_get_info_from_tip_window) Add. - - * codegen/argtypes.py (GtkTreePath) Remove extra older null assignment - - the one assuming a tree path is a tuple. - - * gtk/gtk.defs (gtk_tree_model_filter_new) Allow root param to - default to NULL. - -2004-04-16 John Finlay - - * gtk/gtk.override Expanded gtk_draw_* since it excluded new - gtk_draw_insertion_cursor function. - - * gtk/gtk.override Add definition of PyGdkDrawable_Type - - * gtk/gtk.defs (gtk_draw_insertion_cursor) area can be NULL. - (gtk_text_buffer_paste_clipboard) override_location can be NULL. - - * gtk/gtktextview.override (_wrap_gtk_text_tag_table_foreach) Add. - - * gtk/gtk.override (_wrap_gtk_toggle_tool_button_new) Allow an - optional stock_id parameter. - (gtk_toggle_tool_button_new_from_stock) Ignore. - - * gtk/gtk.defs (gtk_toolbar_insert) (gtk_toolbar_get_item_index) - (gtk_toolbar_get_n_items) (gtk_toolbar_get_nth_item) - (gtk_toolbar_get_drop_index) (gtk_toolbar_set_drop_highlight_item) - (gtk_toolbar_set_show_arrow) (gtk_toolbar_get_show_arrow) - (gtk_toolbar_get_relief_style) Add new toolbar methods from GTK+ 2.4 - - (gtk_toolbar_append_item) (gtk_toolbar_prepend_item) - (gtk_toolbar_insert_item) (gtk_toolbar_insert_stock) - (gtk_toolbar_append_space) (gtk_toolbar_prepend_space) - (gtk_toolbar_insert_space) (gtk_toolbar_remove_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_icon_size) (gtk_toolbar_unset_icon_size) - Add deprecations for these old toolbar methods. - - * gtk/gtk.override (_wrap_gtk_toolbar_append_item) - (_wrap_gtk_toolbar_prepend_item) (_wrap_gtk_toolbar_insert_item) - (_wrap_gtk_toolbar_insert_stock) (_wrap_gtk_toolbar_append_element) - (_wrap_gtk_toolbar_prepend_element) (_wrap_gtk_toolbar_insert_element) - Add deprecation warnings. - - * gtk/gtk.defs (gtk_toolbar_set_drop_highlight_item) Allow - tool_item parameter to be NULL - - * gtk/gtk.defs Add GtkToolButton constructor and method definitions. - - * gtk/gtk.override (_wrap_gtk_tool_button_new) Allow specifying - stock_id or icon_widget - label combination. - -2004-04-16 Johan Dahlin - - * configure.in: Post release version bump - -=== PyGtk 2.3.91 === -2004-04-16 Johan Dahlin - - * NEWS: Update - -2004-04-15 Gustavo J. A. M. Carneiro - - * pygboxed.c (PyGBoxed_Type, PyGPointer_Type): idem. - - * pygobject.c (PyGObject_Type): idem. - - * gobjectmodule.c (PyGInterface_Type): Typecast tp_free slot to - 'freefunc' to avoid compiler warning. - - * pygobject.h: Conditionally make an alias for function type - 'destructor' called 'freefunc', for backward compatibility with - those poor souls still stuck with Python 2.2. - - * codegen/codegen.py (Wrapper): change typecast of tp_free slot - from destructor to freefunc, for compatibility with Python 2.3. - -2004-04-15 John Finlay - - * gtk/gtk.defs Add defs for GtkRadioAction - - * gtk/gtk.override (_wrap_gtk_radio_action_set_group) - (_wrap_gtk_radio_action_get_group) Add. - - * gtk/gtk.defs Add defs for GtkRadioToolButton - - * gtk/gtk.override (_wrap_gtk_radio_tool_button_new) - (_wrap_gtk_radio_tool_button_set_group) - (_wrap_gtk_radio_tool_button_get_group) Add. - - * gtk/gtk.override (_wrap_gtk_scale_get_layout_offsets) Add. - - * gtk/gtk.defs (gtk_selection_owner_set_for_display) Allow widget - param to be NULL. - -2004-04-14 John Finlay - - * gtk/gtk.override (_wrap_gtk_icon_size_lookup_for_settings) Add. - - * gtk/gtk.override (_wrap_gtk_icon_theme_get_search_path) - (_wrap_gtk_icon_theme_set_search_path) Add. - - * gtk/gtk.override (_wrap_gtk_icon_theme_list_icons) Add. - - * gtk/gtk-types.defs (IconInfo) Add GtkIconInfo boxed type. - - * gtk/gtk.defs (gtk_icon_info_copy) Add (caller-owns-return #t) - - * gtk/gtk.override (_wrap_gtk_icon_info_get_embedded_rect) Add. - (_wrap_gtk_icon_info_get_attach_points) Add. - - * gtk/gtk.defs (gtk_list_store_move_sfter) Allow position to be NULL - (gtk_list_store_move_before) Allow position to be NULL - - * gtk/gtk.defs (gtk_menu_set_screen) Allow screen to be NULL. - -2004-04-13 Johan Dahlin - - * gobjectmodule.c (pyg_register_interface): Move quark_to_string - to initgobject - - * codegen/codegen.py: Add support for tp_new - -2004-04-13 John Finlay - - * gtk/gtk.override (_wrap_gtk_clipboard_wait_for_targets) Add. - - * gtk/gtk.override (_wrap_gtk_clipboard_request_contents) - (_wrap_gtk_clipboard_request_text) - (_wrap_gtk_clipboard_request_targets) Add. - - * gtk/gtk.defs More gtk_ function cleanup. - -2004-04-12 John Finlay - - * gtk/gtk.override (_wrap_gtk_action_group_add_radio_actions) Fix - bugs in connecting callback to first radio action. - -2004-04-12 Johan Dahlin - - * pygtk.spec.in: Update, with help of Jason Tackaberry and Thomas - Vander Stichele - -2004-04-11 Johan Dahlin - - * NEWS: Add 2.3.90 stuff here, forgot to do it! - - * AUTHORS: Update, add the current active developers here - - * pygobject.c (pygobject_new_with_interfaces): New function. - (pygobject_lookup_class): Modify so we're not traversing parents - for unknown types but instead creating new types when they're not - registered. We're also using pygobject_new_with_interfaces so - interfaces gets attached correctly. Partial fix for bug 129032 - - * gobjectmodule.c: Add quark and attach the PyTypeObject for - GInterfaces. - - * pygobject-private.h: Make PyGInterface_Type and - pyginterface_type_key public - -2004-04-10 John Finlay - - * gtk/gtk.override (_wrap_gtk_action_group_add_toggle_actions) Make - method more like C API - add is_active processing. - (_wrap_gtk_action_group_add_radio_actions) Make method more like C API - - remove per item callback processing, add value and on_change - parameters and processing. - Add Runtime exceptions. - - * gtk/gtk.defs (gtk_clipboard_set_text) Allow len param to default to - -1 - calculates text length. - -2004-04-10 Johan Dahlin - - * gtk/__init__.py: Move GtkDeprecatedWarning ... - Remove global module import and do it in the class _Deprecated and - delete _Deprecated when done. - (_Deprecated.__repr__): Add. - - * gtk/gtkmodule.c: ... here, and rename it to DeprecatedWarning - -2004-04-10 Gustavo J. A. M. Carneiro - - * configure.in: Bump version up to 2.3.91. - - * examples/pygtk-demo/demos/images.py: Add 'Images' demo ported to - python by Joey Tsai (see bug #100873). - - * Makefile.am (EXTRA_DIST): Add floppybuddy.gif and alphatest.png, - copied from gtk+, for pygtk-demo. - -2004-04-09 John Finlay - - * gtk/gtk.defs (gtk_action_group_add_action_with_accel) The accelerator - can be NULL to force stock accel usage. - -2004-04-09 Gustavo J. A. M. Carneiro - - * pygtype.c (pyg_value_as_pyobject): Convert GValueArray to python - list, not tuple, as per comment in bug 129966. - - * gobjectmodule.c (initgobject, _pyg_strv_from_gvalue) - (_pyg_strv_to_gvalue): Register GValue<->PyObject conversion - functions for boxed type G_TYPE_STRV. Code is taken from - gnome-python (bonobomodule.c), except that conversion to python - object creates python list instead of tuple, as per comment in bug - 129966. - -2004-04-09 Johan Dahlin - - * gtk/__init__.py: Add deprecation warnings for all deprecated functions. - -2004-04-08 John Finlay - - * gtk/gtk.override (_wrap_gtk_file_filter_filter) Add. - (_wrap_gtk_file_filter_add_custom) Add. - - * gtk/gtk.override (_wrap_gtk_font_button_new) Add to allow optional - fontname parameter. - - * gtk/gtk.override (_wrap_gtk_action_get_proxies) Add. - -2004-04-07 John Finlay - - * gtk/gtk.override (_wrap_gtk_file_chooser_widget_new) Add to allow - action and backend as optional parameters similar to - _wrap_gtk_file_chooser_dialog_new. - -2004-04-07 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_color_button_get_color): Remove - unused variable. - - * configure.in: Nicer error messages (pytk-2-2 branch instead of gnome-gtk-1-2) - - * codegen/codegen.py (Wrapper.write_methods): Use the methods name - (instead of the "c" name) so we get a nicer output. - -2004-04-06 John Finlay - - * gtk/gtk.override (_wrap_gtk_file_chooser_get_filenames) - (_wrap_gtk_file_chooser_get_uris) - (_wrap_gtk_file_chooser_list_filters) - (_wrap_gtk_file_chooser_list_shortcut_folder_uris) - (_wrap_gtk_file_chooser_list_shortcut_folders) Add. - - * gtk/gdk.defs (gdk_pixbuf_new_from_file_at_size) Add. - -2004-04-05 Johan Dahlin - - * gtk/gtk.defs (gtk_entry_new_with_max_length): Remove deprecation flag - -2004-04-05 John Finlay - - * gtk/gtk.override (_wrap_gtk_combo_box_entry_new) Allow a TreeModel - and text column to be optionally specified when creating a - ComboBoxEntry. Allow model parameter to be None. - (_wrap_gtk_combo_box_new) Allow model parameter to be None. - - * gtk/gtk.override (_wrap_gtk_entry_completion_set_match_func) Add. - -2004-04-04 John Finlay - - * gtk/gtk.defs Removed gtk_ from various define-function definitions - so that the function naming is consistent i.e. gtk.function instead - of gtk.gtk_function: gtk_accel_map_add_entry, - gtk_binding_parse_binding, gtk_combo_box_new_text, - gtk_combo_box_entry_new_text, gtk_file_system_error_quark, - gtk_file_paths_sort, gtk_file_paths_copy, gtk_file_paths_free, - gtk_icon_theme_error_quark, gtk_icon_theme_get_default, - gtk_icon_theme_get_for_screen, gtk_icon_theme_add_builtin_icon, - gtk_preview_get_info, gtk_tooltips_data_get, - gtk_tree_path_new_from_string, gtk_tree_path_new_from_indices and - gtk_tree_path_new_first. - - * gtk/gtk.override (_wrap_gtk_tooltips_data_get1) Add deprecation - warning for gtk.gtk_tooltips_data_get(). - - * gtk/gtk.defs (gtk_cell_layout_pack_start) - (gtk_cell_layout_pack_end) Allow the expand param to default to TRUE. - -2004-04-04 Gustavo J. A. M. Carneiro - - * gtk/gdk.override (_wrap_gdk_window_new): If compiling for win32 - platform, add a g_object_ref for the newly created GdkWindow. - Thanks John Ehresman. Fixes #122755. - - * gtk/Makefile.am (_gtk_la_CFLAGS): Add -DPLATFORM_WIN32 depending - on PLATFORM_WIN32 AM conditional. - -2004-04-04 Johan Dahlin - - * gtk/gtk.defs (icon_set_new): Is not a constructor, patch from - Scott Tsai, fixes bug 138576 - -2004-04-03 John Finlay - - * gtk/gtk.override (_wrap_gtk_color_button_new) Implement with - gtk_color_button_new_with_color() to allow optionally specifying - a GdkColor. - - * gtk/gtk.override (_wrap_gtk_color_button_get_color) Return a - GdkColor instead of passing in a GdkColor to be filled in. - - * gtk/gtk-types.defs Added CellLayout interface and references to it - for ComboBox, ComboBoxEntry, TreeViewColumn and EntryCompletion. - - * gtk/gtk.override (_wrap_gtk_combo_box_new) Allow a TreeModel to be - optionally specified when creating a ComboBox. - (_wrap_gtk_combo_box_get_active_iter) Return a TreeIter pointing at the - active item or None if no active item. - - * gtk/gtk.override (_wrap_gtk_cell_layout_set_attributes) Added. - -2004-04-02 Gustavo J. A. M. Carneiro - - * acconfig.h: This file is deprecated in newer automake. Removed. - -2004-04-02 Johan Dahlin - - * pygtk-2.0.pc.in (pyexecdir): Add - - * gtk/gtktreeview.override: Update ignore - - * gtk/gtk.override (_wrap_gtk_action_group_list_actions) - (_wrap_gtk_action_group_add_toogle_actions) - (_wrap_gtk_action_group_add_radio_actions): Impl. - Update ignore - -2004-04-01 John Finlay - - * gtk/gtk.override (_wrap_gtk_accel_group_connect_by_path) Add. - (_wrap_gtk_file_chooser_dialog_new) Fix small bug. - -2004-03-31 John Finlay - - * gtk/gtk.override (_wrap_gtk_alignment_get_padding) Add. - -=== PyGtk 2.3.90 === - -2004-03-30 Johan Dahlin - - * examples/gtk/filechooser.py (response): Updated, call dialog.destroy() - - * examples/gtk/uimanager.py: New example - - * gtk/gtk.override (_wrap_gtk_ui_manager_add_ui_from_string): - Override, get rid of second argument. - - * gtk/gtk.defs (gtk_ui_manager_new): is Constructor of - GtkUIManager, not GtkUiManager. - - * gtk/gtk.override (_wrap_gtk_action_group_add_actions): Impl - -2004-03-28 Xavier Ordoquy - - * gtk/gtk-types.defs: Fixes #138476 . Added the Layout class - (Patch from scottt) - -2004-03-29 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_file_chooser_dialog_new): Add - backend as fifth argument - (_wrap_gtk_progress_bar_new_with_adjustment): Fix constructor, it - should return an int, not a PyObject. - - * gtk/gtk.defs: Remove GtkText, GtkTree and GtkTreeItem. - - * gtk/gtktreeview.override (_wrap_gtk_list_store_set): Impl. - - * gtk/gtk.override (_wrap_gtk_button_get_alignment): Impl. - (_wrap_gtk_ui_manager_get_toplevels): Impl. - -2004-03-28 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_file_chooser_dialog_new): Impl, - based on gtk_dialog_new - - * Makefile.am: Add example to EXTRA_DIST - - * examples/gtk/filechooser.py (filter): New example - -2004-03-28 Xavier Ordoquy - - * gtk/gtk.defs: Updated to match gtk 2.4 API. - -2004-03-28 Johan Dahlin - - * gtk/gtk-types.defs (TreeModelFilter): implements - GtkTreeModel and GtkTreeDragSource - (FileFilter): Add - (FileChooserDialog): implements GtkFileChooser - (FileChooser): Add. - - * gtk/gdk.defs, gtk/gdk.defs: Merge in some changes from 2.4. - - * gtk/gtk-types.defs: Gtk+ 2.4 API and remove GtkTextLayout (which - was accidentally added) - - * configure.in: Require glib 2.4, gtk+ 2.4 and libglade 2.3.6. - - * codegen/h2def.py: Add a new option to be able to separate - output of objects and functions - - * gtk/gtk-types.defs: Sort and remove ifdef HAVE_GTK24 for - GtkTextSearchFlags - - * gtk/gtk.override: Remove unneedded ignore statement - - * gtk/pygtkcellrenderer.h: Cleanup - - * gtk/pygtktreemodel.h: Ditto - - * gtk/gtktreeview.override: Add a prototype for - pygtk_cell_data_func_marshal - -2004-03-27 Johan Dahlin - - * gtk/gtk.defs (widget_list_style_properties): This is a function, - not a method. - - * pygobject-private.h, pygobject.h, gobjectmodule.c: - Make PyGParamSpec_Type and pyg_param_spec_new part of the public API. - - * gtk/gtkwidget.override (_wrap_gtk_widget_style_get_property) - (_wrap_gtk_widget_class_list_style_properties): Impl. Fixes - bug 138104 - - * setup.py: Removed installation of libglade and libxml2 DLLs on - win32 (these are now part of the dropline installer). - patch by Cedric Gustin, fixed bug 136731 - - * gtk/gtk.override (_wrap_gtk_main_quit): Override, this does - two things differently from the old (auto generated) version, - first it checks if gtk_main_level() is non zero and raises a - RuntimeError if it's not. It also allows arguments and completely - ignores them, this is closer to the old 0.6.x behavior and - suitable for usage like this: obj.connect(signal, gtk.main_quit), - fixes bug 136705 - - * gtk/gtkmodule.c (python_do_pending_calls): Check gtk_main_level - before calling gtk_main_quit, since it might be called outside of - a mainloop (eg, gtk.main_iteration). Avoids warnings on the console - as found in example in bug 138163 - -2004-03-25 Johan Dahlin - - * examples/glade/autoconnect.py: New small example - -2004-03-22 Xavier Ordoquy - - * gtk/gtk.defs: Removed the _gtk_* functions as the are private - and not exported in the module. - -2004-03-22 Xavier Ordoquy - - * codegen/h2def.py: Added the interface detection (interface -*Iface- - inheriting from GTypeInterface) - -2004-03-20 Gustavo J. A. M. Carneiro - - * gtk/gtkmodule.c (init_gtk): Define constants for the predefined - atoms listed in . Fixes #137091 ("constants" - for selection atoms). - - * gtk/gdk.override (_wrap_gdk_atom_intern): Override; return - Py_None if gdk_atom_intern returns GDK_NONE. Fixes #137093 - "gtk.gdk.atom_intern always creates an atom". - (headers): Add protype for have_numpy() to avoid later - implicit declaration warning. - -2004-03-18 Xavier Ordoquy - - * codegen/h2def.py: Added the interface detection (class - inheriting from GTypeInterface) - -2004-03-18 Xavier Ordoquy - - * gtk/gtk.defs: Cosmetic changes to match h2def output exactly - in order to ease further merges. - -2004-03-12 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_accel_group_connect_group): - -2004-03-12 Xavier Ordoquy - - Fixes #136811 (h2def ignores some functions) - * codegen/h2def.py: skips the extern "C" - -=== PyGTK 2.2.0 === - -2004-03-11 Johan Dahlin - - * configure.in: Bump version - - * setup.py (MINOR_VERSION): Bump version - - * NEWS: Update - -2004-03-09 Xavier Ordoquy - - * codegen/code-coverage.py: utility to scan the unmatched symbols - from the binded libraries. Written by James Henstridge (see bug - #71465) - -2004-03-09 Xavier Ordoquy - - Fixes #136597 (gtkgl still referenced in build files) - * gtk/.cvsignore: - * gtk/makefile.msc: - Removed references to gtkgl. - -2004-03-09 Johan Dahlin - - * gtk/gdk.override (pygdk_filter_func_marshal): Impl. - (_wrap_gdk_window_add_filter): Impl. - -2004-03-08 Gustavo J. A. M. Carneiro - - * configure.in: Remove leftover definition of gtkgl_required_version. - - * gobjectmodule.c (pyg_enum_add_constants): Delegate to - pyg_flags_add_constants if the GType is really a flags type - instead of enum. - (pyg_flags_add_constants): Delegate to pyg_enum_add_constants if - the GType is really a enum type instead of flags. Based on John - Ehresman's patch. Fixes (better) #136204 (GtkTextSearchFlags warning). - -2004-03-07 Hagen Moebius - - * codegen/docextract.py: avoid the non-uniform behavior of gtk-doc - to have an imaginary "returns" parameter. it is converted into the - -tag. - -2004-03-07 Gustavo J. A. M. Carneiro - - * examples/pygtk-demo/gtk-logo-rgb.gif, - * Makefile.am (EXTRA_DIST): Add gtk-logo-rgb.gif, because of stock - icon registration example. - - * examples/pygtk-demo/demos/appwindow.py: Fix stock icon - registration. - -2004-03-06 John Ehresman - - * gtk/gtktreeview.override (map_expanded_rows_cb) - (_wrap_gtk_tree_view_map_expanded_rows): Wrapper for - GtkTreeView.map_expanded_rows. Fixes #136309. Review and minor - enhancement by Gustavo Carneiro. - - * gtk/pygtktreemodel.c (pygtk_generic_tree_model_iface_init) - (pygtk_generic_tree_model_unref_node) - (pygtk_generic_tree_model_ref_node): Add support for optional - TreeModel ref_node & unref_node callbacks. Fixes #136312. - Reviewed by Gustavo Carneiro. - - * gtk/gtktreeview.override (pygtk_cell_data_func_marshal): Fix - reference problem on cunote->data. Fixes #136306 - ( pygtk_cell_data_func_marshal ref counting in 2.2.0rc1 ). - Reviewed by Gustavo Caneiro. - -2004-03-06 Gustavo J. A. M. Carneiro - - * gtk/makefile.msc: use PYGTK_CODEGEN_DEFINES here too. - - * gtk/gtk-types.defs: Make TextSearchFlags an enum or flags type, - conditional on HAVE_GTK24 being defined. Fixes #136204. - - * gtk/Makefile.am (.defs.c): Pass $(PYGTK_CODEGEN_DEFINES) to code - generator, for conditional compiling of GTK+ 2.4 features. - - * configure.in: Check for gtk+ >= 2.3.4 and, if found, define - PYGTK_CODEGEN_DEFINES="-DHAVE_GTK24". - - * codegen/defsparser.py (DefsParser.ifndef): Implement (ifndef - ...) - (DefsParser.ifdef): args no longer includes the function name - (ifdef) as first element of list, so needed to offset indices to - make it work again. - (DefsParser.ifndef): idem. - -2004-03-05 Johan Dahlin - - * codegen/codegen.py (Wrapper.write_constructor): Cleaning up - write_source and starting to refactor Wrapper a little bit, to - avoid so much code duplication - - * gtk/gdk.override (_wrap_gdk_pixbuf_fill): This should fix both - bug 136205 and bug 136205. We're now allowing both long and int - and converts them properly. - -2004-03-04 Johan Dahlin - - * gtk/gdk.override (_wrap_gdk_pixbuf_get_pixels_array): New function - (_wrap_gdk_pixbuf_get_pixels_array): Deprecate, in favor of - .get_pixels_array(), based on Patch by Tim Evans, fixes bug 90255 - - * pygobject.c (pygobject_chain_from_overridden): - * pygtype.c (pyg_signal_class_closure_marshal): Fixes for bug - 132704, Patch by John Ehresman. - - * gtk/gdk.override (have_numpy): New function, to initialize/check numpy - (_wrap_gdk_pixbuf__get_pixel_array): Use it here - (_wrap_gdk_pixbuf_new_from_array): and here - Patch by Tim Evans, fixed bug 122786 - -2004-03-03 Graham Carlyle - - * gobjectmodule.c (pyobject_free): block/unblock threads around - Py_DECREF, because we may not hold the interpreter lock at this - point. Fixes #135963 (gc of gtk.ListStore aborts intrepeter after - gtk.threads_init() called). Reviewed by Gustavo Carneiro. - -2004-03-02 Johan Dahlin - - * gtk/gdk.override (_wrap_gdk_event_tp_getattr): Add - GdkEventKey.hardware_code. Fixes bug 129032, patch by Laur Ivan. - -2004-03-01 Johan Dahlin - - * codegen/codegen.py (Wrapper.write_methods): Check for defined - methods in the override file. - (Wrapper.write_functions): Ditto for functions - - * codegen/override.py (Overrides.__parse_override): Clean up a - little and add some docstrings. Also add a new keyword, define - (Overrides.get_functions, Overrides.get_defines_for) - (Overrides.function, Overrides.define): New methods. - -2004-02-28 Gustavo J. A. M. Carneiro - - * gtk/gtk.override (_wrap_gtk_accel_group_connect): Add wrapper - for gtk_accel_group_connect. - -2004-02-24 Gustavo J. A. M. Carneiro - - * gtk/gtkmodule.c, gtk/pygtk.h: Make pygdk_rectangle_from_pyobject - a public API function. Fixes #135279. - -2004-02-24 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_stock_list_ids): Plug a leak. - - * pygobject.c (pygobject_chain_from_overridden): signa->signal - -2004-02-23 Gustavo J. A. M. Carneiro - - * gtk/gdk.defs (GdkDrawable.get_image): Add caller-owns-return, as - suggested by John D. Hunter. Fixes #133681. - - * gtk/gtk.override (_wrap_gtk_menu_popup): accept large long - integers for the 'time' argument. - -2004-02-23 Xavier Ordoquy - - * Makefile.am: - * gtk/Makefile.am: applied patch from Naofumi Yasufuku. Fixes - bug 121339 (dsextras.py installation directory). - -2004-02-22 Gustavo J. A. M. Carneiro - - * gtk/gdk.override (_wrap_gdk_pixbuf_new_from_array) - (_wrap_gdk_pixbuf_new_from_array): apply Tim Evans' patch to - create pixbuf from data (string) or from a Numeric Python array. - -2004-02-22 Xavier Ordoquy - - * codegen/h2def.py: don't expect a whitespace after the type name - Fixes bug #128988, patch from Jon Willeke. - -2004-02-19 Gustavo J. A. M. Carneiro - - * gtk/gtktreeview.override (pygtk_cell_data_func_marshal): Fix - multiple python object reference leaks. - -2004-02-14 Gustavo J. A. M. Carneiro - - * gtk/gtk.override (_wrap_gtk_binding_entry_remove): impl. - - * gtk/gtk.defs (binding_entry_remove): remove gtk_ prefix from - function name. - -2004-02-10 Seth Nickell - - Reviewed by: random luser - - * gtk/gdk.override: - - Change type of argument in signature for gdk.event_get_axis - from "d" to "i" so that get_axis works - -2004-01-14 Johan Dahlin - - * gtk/pygtktreemodel.c (pygtk_generic_tree_model_iter_n_children): - Allow iter to be set to NULL, based on patch by Don Allingham - Fixes bug 125172 - -2003-12-24 Gustavo J. A. M. Carneiro - - * pygtype.c (pyg_value_as_pyobject): Add special handling for - GValueArray, converting it to a tuple while calling - pyg_value_as_pyobject recursively for each inner value. - -2003-12-23 James Henstridge - - * gtk/gtktreeview.override - (pygtk_tree_selection_get_selected_rows): implement (fixes bug - #111489). - - * codegen/h2def.py (clean_func): apply patch from Jon Willeke - to strip out eg. G_BEGIN_DECLS, - which was tripping up some of the following regexps (fixes bug - #129414). - - * pygobject.c (pygobject_get_property): explicitly check if the - property is readable first, and raise an exception otherwise - (pygobject_set_property): check if property is readable (fixes bug - #121544). - -2003-12-22 James Henstridge - - * setup.py: distutils fixes from Alif Wahid - (bug #123014). - - * gtk/gdk.override (ignore-win32): ignore gdk_font_get_display. - - * gtk/gtk.override (ignore): ignore plug construct functions. - (ignore-win32): ignore gtk_plug_new_for_display. - - * gtk/gdk.defs (pixmap_foreign_new_for_display): caller owns return. - (pixmap_foreign_new): same here (bug #129754). - (window_foreign_new): same here. - (window_foreign_new_for_display): same here. - -2003-12-20 Gustavo J. A. M. Carneiro - - * codegen/codegen.py (Wrapper.get_initial_constructor_substdict): - now receives the constructor FunctionDef as argument. - (Wrapper.write_constructor): Pass the constructor - get_initial_constructor_substdict. - (GObjectWrapper.get_initial_constructor_substdict): Receive/pass - constructor argument. If constructor's caller_owns_return flag is - set to #f, add an extra g_object_ref(self->obj). - (GBoxedWrapper.get_initial_constructor_sub): Receive/pass extra - constructor argument. - (GPointerWrapper.get_initial_constructor_substdict): idem. - -2003-12-17 James Henstridge - - * gtk/gtk-types.defs (TextSearchFlags): GtkTextSearchFlags is a - flags value, rather than an enum. - -2003-12-16 James Henstridge - - * configure.in (CFLAGS): add -fno-strict-aliasing to CFLAGS if the - compiler supports it. The Python API breaks some of the strict - aliasing rules. - - * acinclude.m4 (JH_ADD_CFLAG): new macro to check whether the - compiler supports a particular cflag. - - * codegen/codegen.py - (GInterface.get_initial_class_substdict): GInterface wrappers - should be sizeof(PyObject), since they are mixins. - -2003-12-19 Johan Dahlin - - * gtk/gdk.defs (fill): Change to guint32. Patch by - hyriand@thegraveyard.org. Fixes 121611. - - * gtk/pygtkcellrenderer.c - (pygtk_generic_cell_renderer_start_editing): Allow return values - that are NULL. Patch by Tim Evans, fixes #122786 - - * gtk/gtktreeview.override (_wrap_gtk_tree_model_iter_children): - Allow parent to be None. Patch by Benjamin CAMA, fixes #124593 - - * gtk/gtk.defs: Allow all GdkColor arguments for - gtk_widget_modify_* to be null. Patch by jkluebs@luebsphoto.com, - fixes #127178 - (GtkTreeView.expand_row): Set return value to gboolean. Patch by - Doug Quale, fixes #126406 - -2003-12-18 Johan Dahlin - - * gtk/gtk.defs (set_tip): Allow null for tip_text. Patch by John - Ehresman, fixes #128623. - - * gtk/pygtktreemodel.c: handle None iterator values. Patch by John - Ehresman, fixes #126479. - -2003-12-09 Johan Dahlin - - * gtk/gtktreeview.override (_wrap_gtk_list_store_reorder): Impl. - -2003-12-05 Johan Dahlin - - * gtk/gtktreeview.override (pygtk_tree_selection_foreach_marshal): - Increase the ref count on Py_None (#128448, Vsevolod Fedorov) - - * gtk/gtk-types.c (pygtk_tree_model_row_get_parent): Swap parent - and child argument. (#123605, patch by Steve Chaplin) - -2003-10-23 Johan Dahlin - - * gtk/gtk.override (_wrap_gtk_item_factory_create_items): Use - GdkPixbuf objects instead of raw strings, Thanks to Rob Melby for - the patch, #123456 - - * gtk/gtkwidget.override (_wrap_gtk_widget_size_request): pass - back the values instead of pointers to them. Thanks to Rob Melby - for the patch, #125272 - -2003-09-17 James Henstridge - - * gtk/gtk.override (_wrap_gtk_clipboard_set_with_data): wrap - function. - -2003-09-16 James Henstridge - - * gtk/gdk.override (_wrap_gdk_window_set_geometry_hints): add wrapper. - (gdk_window_peek_children): ignore. - (_wrap_gdk_window_set_icon_list): add wrapper. - (_wrap_gdk_screen_get_setting): add wrapper (this one spews lots - of warnings though. Not sure how to fix properly). - -2003-09-15 James Henstridge - - * gtk/gdk.override (_wrap_gdk_display_get_window_at_pointer): add - wrapper. - (_wrap_gdk_drag_find_window_for_screen): add wrapper. - - * gtk/gtkgl*: remove files. - - * gtk/Makefile.am: remove gtkgl binding. - - * configure.in (build_gtkgl): remove gtkgl bindings. - -2003-09-04 James Henstridge - - * gtk/gtk.override (headers): add defs for GdkDisplay and GdkScreen - - * gtk/gtk.defs, gtk/gtk-types.defs: update for 2.2 APIs. Covers - bug #113224, #113908, #117929 and #121031. - - * gtk/gdk.override (_wrap_gdk_pixbuf_get_formats): implement - function. Returns a list of dictionaries (bug #118253). - -2003-09-03 James Henstridge - - * gtk/gdk.override: add some overrides for GdkDisplay and GdkScreen. - - * gtk/Makefile.am (gtk_overrides): gtk.c doesn't depend on - gdk.override. - - * gtk/gdk.override: hack so that GDK_DISPLAY() is the cast macro. - - * gtk/gdk.defs, gtk/gdk-types.defs: incorporate new 2.2 APIs. - - * configure.in: set version number to 2.1.0 so that it differs - from the 2.0 branch. - -2003-09-02 James Henstridge - - * ChangeLog.pre-2-0: rename old change log. - diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 deleted file mode 100644 index 0a0041cb..00000000 --- a/ChangeLog.pre-2-8 +++ /dev/null @@ -1,912 +0,0 @@ -=== PyGTK 2.8.0 === -2005-09-02 Johan Dahlin - - * autogen.sh: Sync with gnome-common. Require automake 1.8. - Fixes #314128 and #311958 - - * Makefile.am: - * gobject/makefile.msc: - * gtk/Makefile.am: - * gtk/makefile.msc: - * makefile.msc: - Remove old .msc files, which are outdated and unused. - -2005-08-30 Tim Evans - - * gtk/gtk.defs: Fix the start_editing virtual of GtkCellRenderer. - Closes bug #314806. Review by Gustavo Carneiro. - - * codegen/reversewrapper.py (GdkRectanglePtrParam.convert_c2py): - This conversion always produced bogus values and possibly even - segfaults, due to 'f' formart char vs passing integer values. - Fixed to use pyg_boxed_new instead. - Fixes bug 314801: "bad conversion of GdkRectangle to PyObject in - reversewrapper.py" Reviewed by Gustavo Carneiro. - -2005-08-29 John Ehresman - - * gobject/pygobject.c (pygobjectmeta_register): Remove unneeded - g_strdup. - -2005-08-26 Johan Dahlin - - * atk-types.defs (ImplementorIface): Make it a type on dynamically - created subclasses implementing the interface to possibly avoid - MRO issues. - - * gobject/gobjectmodule.c (pyg_signal_list_ids): Refactor to - allow us to list signals on interfaces. - - * tests/test_signal.py (TestList): Two new tests. - -2005-08-25 Gustavo J. A. M. Carneiro - - * gobject/gobjectmodule.c (pyg_type_register): Don't g_free - type_name parameter, otherwise it will cause a double-free elsewhere. - - * gobject/pygobject-private.h: Add const to char * parameter of - pyg_type_register. - - * gobject/pygobject.c (pygobject_new_with_interfaces): Py_INCREF - objects being added to a tuple in a couple of places, because - PyTuple_SetItem steals a reference. Fix 'bases' and 'dict' - reference leaks. - -2005-08-24 John Ehresman - - * gobject/pygobject.c: In the meta-class __init__ method, - register a class as a gtype iff __gsignals__, __gproperties__, - or __gtype_name__ is defined in the leaf class's tp_dict. - -2005-08-24 Johan Dahlin - - * configure.in: Post release version bump - -=== PyGTK 2.7.4 === -2005-08-24 Johan Dahlin - - * NEWS: Update - - * README: Update - -2005-08-24 John Ehresman - - * setup.py: Added sources so gobject module will compile, fixed - enable/disable thread support, and changed default so thread - support is enabled unless --disable-threading is specified - - * gobject/gobjectmodule.c, gobject/pygobject.c: Set - PyGObject_MetaType.tp_base in module initialization to keep - VC++ happy - -2005-08-24 Johan Dahlin - - * tests/test_conversion.py (Tests.testUIntArg): Add test for - Table.attach which takes uint arguments. - - * codegen/argtypes.py (UIntArg.write_param): - One more take on fixing #300012, this time unsigned int conversion, - patch by Gustavo. - -2005-08-18 John Finlay - - * gtk/gtk.override (_wrap_gtk_selection_data_get_targets) - (_wrap_gtk_drag_dest_get_target_list) - (_wrap_gtk_drag_dest_set_target_list) - (clipboard_request_contents_cb) - (_wrap_gtk_clipboard_request_targets) - (_wrap_gtk_drag_source_set_target_list) - (_wrap_gtk_target_list_add_image_targets) - (_wrap_gtk_target_list_add_uri_targets) : - * gtk/gdk.override (_wrap_gdk_event_tp_getattr) - (_wrap_gdk_gc_new_with_values, _wrap_gdk_property_get) - (_wrap_gdk_property_change): - * gtk/gtkmodule.c (add_atom): Fix memory leak with gdk_atom_name() - Fixes #313861 (Christian Persch) - -2005-08-16 Stepan Kasal - - * pygobject-2.0.pc.in, pygtk-2.0.pc.in: Add datarootdir - variable, for compatibility with future Autoconf releases. - * codegen/pygtk-codegen-2.0.in: Likewise. - -2005-08-16 Johan Dahlin - - * gtk/gtkcontainer.override: Override gtk.Container.do_forall. - * examples/gtk/bin.py: Simple example how it should work. - -2005-08-12 Christopher Aillon - - * gtk/gtk.defs: - gtk.accelerator_get_default_mod_mask () returns a - GtkModifierType, not a guint. - -2005-08-12 Christopher Aillon - - * gobject/pygtype.c: - pyg_flags_get_value () should accept longs as input - -2005-08-10 Johan Dahlin - - * configure.in: Post release version bump - -=== PyGTK 2.7.3 === -2005-08-10 Johan Dahlin - - * NEWS: Update - -2005-08-10 Gustavo J. A. M. Carneiro - - * gtk/gdk.override, gtk/gdk.defs: It was discovered by pycairo - folks that cairo_surface_create_for_pixbuf doesn't work at all. - -2005-08-10 Johan Dahlin - - * gtk/gtkcontainer.override (_wrap_gtk_container_nb_nonzero): Always - return 1, so if hbox always returns true. - -2005-08-09 Andy Wingo - - * gobject/pygobject.c (pygobject_new_with_interfaces): Use the - generic setattr protocol instead of getting the module's - dictionary and using setitem. Fixes bug #312999. - -2005-08-05 Gustavo J. A. M. Carneiro - - * codegen/reversewrapper.py (GObjectReturn.write_conversion): Add - type checking: raise exception and return NULL if the returned - PyObject isn't a PyGObject. - (ReverseWrapper.write_code): Add support for code that raises an - exception in the failure code path. - -2005-08-02 Johan Dahlin - - * gtk/Makefile.am - * Makefile.am: Big makefile cleanup. Fix a couple of bugs - meanwhile, most noticable, always install include *.defs in - EXTRA_DIST and only install them when their target is built. - -2005-08-02 Johan Dahlin - - * configure.in: Post release version bump - -=== PyGTK 2.7.2 === -2005-07-30 Johan Dahlin - - * NEWS: Updated - -2005-08-02 Mark McLoughlin - - Fixes bug #312337 - - * gobject/gobjectmodule.c: (_wrap_pyg_type_register): - Make the "already registered" warning a deprecation warning - with a more detailed hint on what it means. - -2005-08-01 Manish Singh - - * gobject/pygobject-private.h - * gobject/pygmaincontext.c: Add a convenience function - (pyg_main_context_new) to create a PyGMainContext from a - GMainContext. Takes care of refing the supplied GMainContext - as well. - - * gobject/gobjectmodule.c (pyg_main_context_default) - * gobject/pygmainloop.c (_wrap_g_main_loop_get_context) - * gobject/pygsource.c (pyg_source_get_context): use the new - convenience function here. This fixes bug #312259. - -2005-07-31 Gustavo J. A. M. Carneiro - - * gobject/gobjectmodule.c (pyg_object_new): Call - pygobject_new_full instead of pygobject_new to disable sinking. - Instead, call pygobject_sink after g_object_unref, so that the - sink functions run with the expected reference count and do their - work accordingly. - - * gobject/pygobject-private.h: New internal API pygobject_sink. - - * gobject/pygobject.c (pygobject_sink), - (pygobject_register_wrapper, pygobject_new_full): sink_object - renamed to pygobject_sink and made internal API. - - * tests/test_subtype.py: Add tests to check reference count of - windows, with or without subclassing, from gobject.new or from - constructor. - -2005-07-30 Gustavo J. A. M. Carneiro - - * gtk/gdk.override (_wrap_gdk_event_free): Deprecate - gtk.gdk.Event.free and make it do nothing. - - * gobject/gobjectmodule.c (_wrap_pyg_type_register): Fix test to - see if the class has already been registered. Don't issue a - DeprecationWarning; instead, just issue a Warning when trying to - register a class that is already registered. - -2005-07-30 Johan Dahlin - - * gobject/gobjectmodule.c (initgobject): Don't register PyObject - unconditionally, fixes #303797 (Yevgen Muntyan) - -2005-07-30 Gustavo J. A. M. Carneiro - - * gtk/gtk.override (_wrap_gtk_icon_source_free) - (_wrap_gtk_requisition_free, _wrap_gtk_tree_iter_free) - (_wrap_gtk_tree_row_reference_free, _wrap_gtk_border_free): - Override free() methods of boxed types to make them do nothing and - issue a deprecation warning. - Fixes Bug 306095: In pygtk 2.6.x calling free() on GtkIconInfo - object causes a double free or corruption error. - - * tests/test_subtype.py (TestSubType.testMassiveGtkSubclassing): - Add new test that attempts to subclass every possible class in the - gtk module, minus a couple of deprecated ones. - - * codegen/codegen.py (write_registers): Warn here about - constructors that need to be updated. - - * gobject/gobjectmodule.c (pyg_type_register): Don't warn about - needing to update a constructor to new API. Warn in the code - generator instead. - - * gtk/gtk.override: Use the new new-constructor override command - to declare custom constructors conforming to the new API, instead - of init commands. - - * codegen/codegen.py (Wrapper.write_constructor): When writing an - overridden constructor, check if it is declared to support the new - API, in which case set self.objinfo.has_new_constructor_api to True. - (GObjectWrapper.write_default_constructor): For GObjects with no - constructor (abstract objects), inherit - objinfo.has_new_constructor_api from the parent type, since - tp_init is also inheritted (hence the need to reorder the classes). - - * codegen/override.py (Overrides.__parse_override): Add override - command "new-constructor GType" to declare that a constructor - conforms to the new API. - - * codegen/codegen.py (write_classes): Reorder classes to put - parent types before their children. - - * gtk/gtkwidget.override, gtk/gtk.override: Don't override - GtkMisc.tp_init, GtkBin.tp_init, GtkItem.tp_init, GtkBox.tp_init, - GtkButtonBox.tp_init, and GtkWidget.tp_init just to chain to - parent tp_init. At some point in pygtk 2.6 development this - became redundant. Ignore gtk_widget_new so that a - pygobject_no_constructor tp_init isn't generated for it. - - Fixes Bug 311309: subclassing gtk.Bin reports.... - -2005-07-30 Johan Dahlin - - * Makefile.am: - * gtk/Makefile.am: - Install defs files conditionally, fixes #312037 - -2005-07-25 Johan Dahlin - - * tests/test_subtype.py: - * tests/testhelpermodule.c: (test_type_get_type), - (_wrap_get_unknown), (_wrap_test_g_object_new), (inittesthelper): - Clean up tests, we don't need a C binding to access tp_basicsize, - clean up the C tests, quite a bit aswell. - -2005-07-22 Johan Dahlin - - * gtk/Makefile.am: - * gtk/gtk-fake-win32.c: - * gtk/gtk.override: - * setup.py: - - GtkPlug & GtkSocket is now available on win32, so remove hacks. - -2005-07-22 Johan Dahlin - - * configure.in: Post release version bump - -=== PyGTK 2.7.1 === -2005-07-22 Johan Dahlin - - * NEWS: - * README: - * configure.in: Update requirements - - * tests/test_radiobutton.py (RadioToolButtonTest): Re-enable - - * tests/test_dialog.py (MessageDialogTest.testSubclass): Add tests, for - #311226. - -2005-07-22 Gustavo J. A. M. Carneiro - - * gobject/pygobject.c (pygobjectmeta_register): Don't - automatically register gtype if neither one of __gtype_name__, - __properties__, or __gsignals__ is defined in the class - dictionary. Fixes #311226. - -2005-07-17 Johan Dahlin - - * gobject/pygobject.c: (pygobject_new_full), (pygobject_dealloc), - (pygobject_clear): - * gtk/gdk.override: - * gtk/gtk-types.c: (_pygtk_style_helper_new), - (pygtk_style_helper_dealloc), (pygtk_style_helper_setitem), - (pygtk_tree_model_row_dealloc), - (pygtk_tree_model_row_iter_dealloc): - * gtk/gtk.override: - * gtk/gtkwidget.override: - We have atomic ref counting in glib now, remove block/unblocking - around reference counting. - - * gobject/pygobject.h: - * gobject/gobjectmodule.c (pyg_gil_state_ensure_py23) - (pyg_gil_state_release_py23): Remove pre python 2.3.5 compatibility. - Simplifies thread handling. - - * configure.in: Require glib/gtk+ 2.7.3 - - * gtk/gtk.defs (get_model, set_do_overwrite_confirmation) - (get_do_overwrite_confirmation, queue_resize, get_visible_range): Add - - * gtk/gtk-types.defs (FileChooserError): Add. - -2005-07-15 Johan Dahlin - - * gobject/gobjectmodule.c: (create_property): - Allow enums to be specified in the constructor - * gobject/pygparamspec.c: (pyg_param_spec_getattr): - Return flags or enum object for pspec.default_value - * tests/test_enum.py: Remove usage of assert statement, - add default_value test, both for flags and enum - -2005-07-10 Johan Dahlin - - * configure.in: Post release version bump - -=== PyGTK 2.7.0 === -2005-07-10 Johan Dahlin - - * configure.in: Bump glib/gtk+ requirements - - * NEWS: Updated - - * README: Updated - -2005-07-10 Gustavo J. A. M. Carneiro - - * gobject/pygiochannel.c (py_io_channel_win32_poll) - (py_io_channel_win32_make_pollfd): Change to use the new PyGPollFD - type instead of tuples. - - * gobject/pygsource.c (pyg_poll_fd_dealloc): Change DECREF to - XDECREF on self->fd_obj. Moved PyGPollFD structure into - pygobject-private.h, to make it accessible from pygiochannel.c. - -2005-07-10 Johan Dahlin - - * gtk/gtkwidget.override (_wrap_gtk_widget_set_set_scroll_adjustments_signal) - (_wrap_gtk_widget_set_set_scroll_adjustments_signal): Impl. - Patch by Gustavo, fixes #155679 - - * tests/test_signal.py (TestOldStyleOverride): - Add unittests. Lazy Gustavo. - - * gtk/gtkwidget.override (_wrap_gtk_widget_list_accel_closures): - Remove until we decide what we should return. - - * gobject/pygobject.c: (PyGProps_setattro), - (pygobject_set_property): - * tests/test_properties.py: - Raise an exception if a construct only property is set after - construction time. Refactor property setting code and add some - more tests. - -2005-07-10 Manish Singh - - * gobject/pygobject-private.h - * gobject/gobjectmodule.c - * gobject/Makefile.am - * gobject/pygsource.c: GSource wrapper, allows for pure python - GSource implementations, as well as objectifying Idle and Timeout - sources. - - * tests/Makefile.am - * tests/test_source.py: Add test for the above. - - * gobject/gobjectmodule.c: timeout_add should take an explicit - unsigned value. Also wrap g_get_current_time and g_main_depth. - - * gobject/pygiochannel.c (py_io_channel_write_chars): fix thread - unblock/block logic. - -2005-07-10 Gustavo J. A. M. Carneiro - - * gtk/gdk.defs, - * gtk/gdk.override (cairo_surface_create_for_pixbuf): Add utility - function cairo_surface_create_for_pixbuf, copy-pasted from - pycairo (cairo/cairogtkmodule.c). - - * codegen/override.py (Overrides), - * codegen/codegen.py (Wrapper.get_methflags): Add support for - static/classmethod and METH_O overrides. - -2005-07-09 Johan Dahlin - - * gtk/gtkwidget.override (_wrap_gtk_widget_list_accel_closures): Impl. - - * gtk/gtk.defs: Remove gtk_ prefix on a couple of (unwrapped) functions - - * gtk/gtk-types.defs: - (IconViewDropPosition, PackDirection): Add. - - * gtk/gtkiconview.override: - (_wrap_gtk_icon_view_enable_model_drag_dest) - (_wrap_gtk_icon_view_enable_model_drag_source) - (_wrap_gtk_icon_view_get_dest_item_at_pos) - (_wrap_gtk_icon_view_get_drag_dest_item) - (_wrap_gtk_icon_view_get_cursor) - (_wrap_gtk_icon_view_get_visible_range) - (_wrap_gtk_icon_view_get_item_at_pos): Impl. - -2005-07-09 Gustavo J. A. M. Carneiro - - * codegen/codegen.py: - * codegen/definitions.py: - * gobject/gobjectmodule.c: (pygobject_init_wrapper_set), - (pygobject_init_wrapper_get), (pygobject__g_instance_init), - (pyg_type_register), (pyg_object_new), (pygobject_constructv), - (pygobject_construct), (pyg_set_object_has_new_constructor), - (initgobject): - * gobject/pygobject-private.h: - * gobject/pygobject.c: (pygobject_new_full), (pygobject_new), - (pygobject_init): - * gobject/pygobject.h: - * gtk/gtk.override: - * tests/Makefile.am: - * tests/runtests.py: - * tests/test_properties.py: - * tests/test_subtype.py: - * tests/testhelpermodule.c: (py_label_get_type), - (test_type_get_type), (_wrap_create_test_type), - (_wrap_test_g_object_new): - * tests/testmodule.py: - Bug 161177: Allow creation of python classes from g_object_new. - -2005-07-09 Johan Dahlin - - * gtk/gtkcontainer.override: Implement tp_iter and - tp_as_sequence.sq_length. - -2005-07-09 Gustavo J. A. M. Carneiro - - * gobject/pygobject.c: Correct ob_size and tp_basicsize mixup in - PyGProps[Iter]. - -2005-07-08 Johan Dahlin - - * configure.in: - * gtk/Makefile.am: - * gtk/gdk-types.defs: - * gtk/gdk.defs: - * gtk/gdk.override: - * gtk/gtk.defs: - * pango-types.defs: - * pango.defs: - Merge new Gdk & Gtk API. pango.Renderer and functions/methods also - added. Bump required glib,gtk & pango versions. - -2005-07-08 Johan Dahlin - - * gobject/gobjectmodule.c: (initgobject): - * gobject/pygobject-private.h: - * gobject/pygobject.c: (pyg_props_iter_dealloc), - (pygobject_props_iter_next), (PyGProps_dealloc), - (build_parameter_list), (PyGProps_getattro), (PyGProps_setattro), - (pygobject_props_traverse), (pygobject_props_get_iter), - (PyGProps_length), (pyg_props_descr_descr_get): - * tests/Makefile.am: - Add GObject support, patch mostly based on Iñaki and Gustavos work. - Unittests added, fixes #81879 - -2005-07-07 Johan Dahlin - - * gobject/gobjectmodule.c: (initgobject): - * gobject/pygobject-private.h: - * gobject/pygobject.h: - * gobject/pygtype.c: (pyg_type_lookup), - (pyg_register_gtype_custom), (pyg_value_from_pyobject), - (pyg_value_as_pyobject): - Rename pyg_register_boxed_custom to pyg_register_gtype_custom. - Add note about private fields in exported API structure. - Based on patch by Edward Hervey, fixes #309625 - -2005-07-05 Johan Dahlin - - * gobject/gobjectmodule.c: (pyg_type_name), (pyg_type_from_name), - (pyg_type_parent), (pyg_type_is_a), (pyg_type_children), - (pyg_type_interfaces), (get_type_name_for_class), (initgobject): - * gobject/pygtype.c: (_wrap_g_type_is_a), (pyg_type_wrapper_init): - * tests/test_enum.py: - * tests/test_gtype.py: - * tests/test_unknown.py: - Add GType.is_a and deprecate gobject.type_* - Update tests - and make GType.is_a/gobject.type_is_a return a bool instead of int - -2005-07-05 Johan Dahlin - - * gobject/gobjectmodule.c: (_wrap_pyg_type_register), - (get_type_name_for_class), (pyg_type_register): - * gobject/pygobject-private.h: - * gobject/pygobject.c: (pygobjectmeta_register), - (pygobjectmeta_init): - * tests/test_gtype.py: - Add support for specifying name for a GObject subclass, - using __gtype_name__. Add a unittest. Fixes #169498 - -2005-07-04 Johan Dahlin - - * gobject/gobjectmodule.c: (initgobject): Add GType to gobject - namespace - * gobject/pygtype.c: (_wrap_g_type_wrapper__get_pytype), - (_wrap_g_type_wrapper__get_name), - (_wrap_g_type_wrapper__get_parent), - (_wrap_g_type_wrapper__get_fundamental), - (_wrap_g_type_wrapper__get_children), - (_wrap_g_type_wrapper__get_interfaces), - (_wrap_g_type_wrapper__get_depth), (_wrap_g_type_is_interface), - (_wrap_g_type_is_classed), (_wrap_g_type_is_instantiatable), - (_wrap_g_type_is_derivable), (_wrap_g_type_is_deep_derivable), - (_wrap_g_type_is_abstract), (_wrap_g_type_is_value_abstract), - (_wrap_g_type_is_value_type), (_wrap_g_type_has_value_table), - (_wrap_g_type_from_name): - Wrap a number of GType utility functions - -2005-07-04 Johan Dahlin - - * gobject/gobjectmodule.c: (pyg_object_new): - * tests/test_conversion.py: - Use pyg_param_gvalue_from_pyobject in gobject.new, fixes - unichar parameters specified from the constructor. - Added unittests. - -2005-07-02 Gustavo J. A. M. Carneiro - - * gtk/gtkmodule.c (init_gtk): Check for cairo module import - failure. - - * pangocairomodule.c (initpangocairo): Check for cairo module - import failure. - -Fri Jul 1 18:51:15 PDT 2005 Manish Singh - - * gobject/pygmaincontext.c: unref the underlying GMainContext upon - object destruction. Some minor cleanups as well. - -2005-07-01 Johan Dahlin - - * gobject/pygtype.c: Extend to add some new fields, add a getter - for GType.type, which points to the python registered type - of a PyGTypeWrapper. - - * gobject/gobjectmodule.c (initgobject): And register PyGTypeWrapper, - a side effect is that dir(gtype) also works now. - -2005-06-27 John Finlay - - * gtk/gtk.override (_wrap_gtk_file_chooser_dialog_new) - (_wrap_gtk_dialog_new): Allow defaults to be specified explicitly to - the constructor. Fixes #309108 (Steve Chaplin) - -2005-06-21 Johan Dahlin - - * gobject/pygparamspec.c: (pygenum_from_pspec), - (pygflags_from_pspec): Try to register unknown enums and flags on the fly. - Fixes #308536, patch by Edward Hervey - * gobject/pygflags.c: (pyg_flags_add): Make module optional. - -2005-06-20 Gustavo J. A. M. Carneiro - - * gobject/gobjectmodule.c (add_signals): Return a new dictionary - to replace __gsignals__, whith signal names canonicalized - (s/-/_/), for the signals that are being overridden, so that the - class_init functions can safely check for them. - - * codegen/codegen.py (Wrapper.write_virtuals): Before overriding - virtual method, check if the corresponding signal is already being - overridden. - - * gobject/gobjectmodule.c (pyg_type_register): Instead of deleting - __gsignals__, replace it with a dict containing only overridden - signals, as returned by add_signals(). This is so that class init - functions can inspect the signals that are being overridden. - __gsignals__ then get's deleted only after running - pyg_run_class_init. - - Fixes Bug 308097: Overriden realize gets called twice. - - * codegen/reversewrapper.py: Register GtkAllocation* as an alias - for GdkRectangle*. Fixes #Bug 308099: No GtkWidget proxy handler - for do_size_allocate. - - * codegen/argtypes.py (ULongArg): Use the new (python 2.3) 'k' - template char to convert unsigned long, so that parsing of ULong - parameters accepts both int and long python values. Add new - UInt32Arg argtype for guint32, subclassing ULongArg and adding - range checking on platforms that require it. As a side effect, - guint32 return values are now always translated to python longs - ( before they would be longs on 32-bit systems, or ints on 64-bit - systems ). - -2005-06-20 Mark McLoughlin - - Fixes bug #308384 - - * gtk/gdk.override: make gtk.gdk.Window.set_user_data() - accept None - -2005-06-20 Johan Dahlin - - * gobject/pygobject.c (pygobject_new_with_interfaces): Fix - typo in documentation string. Fixes #171910 (Tuure Laurinolli - and Gian Mario Tagliaretti) - -2005-06-17 Gustavo J. A. M. Carneiro - - * examples/pango/pangocairo-simple.py (main): Demonstrate how to - output PDF file from the same drawing subroutine. - -2005-06-14 Johan Dahlin - - * examples/ide/edit.py: Improve demo, patch by - Fernando San Martin Woerner, fixes #171148 - -2005-06-09 Cedric Gustin - - * setup.py : Define HAVE_BIND_TEXTDOMAIN_CODESET on win32. - -2005-06-09 Manish Singh - - * gobject/pygobject.h - * gtk/pygtk.h: Use G_STMT_START/END for init_ defines. - -2005-06-07 Gustavo J. A. M. Carneiro - - * pango.override (pypango_item_get_type): Define boxed type for - PangoItem. - (_wrap_pango_layout_line__get_runs): Override/implement getter for - pango.LayoutLine.runs. - - * pango-types.defs (LayoutLine): Add PangoLayoutLine fields. - (Item): Declare PangoItem as boxed type. - -2005-06-06 Gustavo J. A. M. Carneiro - - * examples/gtk/widget.py: Render the sample widget with cairo, if - possible. - - * examples/pango/pangocairo-simple.py: cairosimple.c example - ported to python. - - * examples/Makefile.am (EXTRA_DIST): Add pango/pangocairo-simple.py. - - * codegen/argtypes.py (CairoArg.write_return): Add cairo_t* argtype. - - * gtk/Makefile.am (EXTRA_DIST): Add gdkcairo.override. - - * gtk/gdk.defs: Optionally define method cairo_create of - gtk.gdk.Drawable. - - * gtk/gdk.override (_wrap_gdk_cairo_create): Wrap gdk_cairo_create - as method cairo_create of gtk.gdk.Drawable. - - * gtk/gdkcairo.override: If pycairo is available, define type - gtk.gdk.CairoContext as a subclass of pangocairo.CairoContext with - some additional methods. - - * configure.in: Check for libraries to build pangocairo module. - Check for dependencies to optionally build gtk module with cairo - support. - - * Makefile.am, pangocairomodule.c, pangocairo.defs, - * pangocairo.override: Python bindings for the new libpangocairo. - - * codegen/codegen.py (Wrapper.write_getsets): Add support for - structured fields. For example, a field 'bar' inside a structure - 'foo' is declared in the defs as "foo.bar" and mapped as "foo_bar" - python attribute. - - * codegen/codegen.py, codegen/override.py: Add a 'body' override - section type, which includes code after headers, imports, and type - declarations. Useful if you write code that depends on imported - or declared types. - -2005-05-30 Johan Dahlin - - * gtk/gdk.defs (pixbuf_get_from_drawable): Add. We can't remove - the old method. - - * gtk/gdk.override (_wrap_gdk_pixbuf_get_from_drawable2): - Rename it to ...2 and copy it to the override file since the code - generator can't handle two functions with the same name - -2005-05-31 Gustavo J. A. M. Carneiro - - * pango.override (pypango_layout_line_get_type): Fix copy function. - -2005-05-29 Gustavo J. A. M. Carneiro - - * pango.override (_wrap_pango_layout_line_x_to_index) - (_wrap_pango_layout_line_index_to_x) - (_wrap_pango_layout_line_get_extents) - (_wrap_pango_layout_line_get_pixel_extents): Impl. - - * gtk/gdk.override: Ignore gdk_draw_layout_line and - gdk_draw_layout_line_with_colors, at least for now. - - * pango-types.defs (LayoutLine): Declare LayoutLine as boxed type. - - * pango.defs: pango_layout_line_ref and unref should not be - exposed as python API. - - * pango.override (PANGO_TYPE_LAYOUT_LINE): Register boxed type for - PangoLayoutLine, unless it's already defined. - - * pango.defs: Add defs for - pango_font_metrics_get_underline_thickness, - pango_font_metrics_get_underline_position, - pango_font_metrics_get_strikethrough_thickness, and - pango_font_metrics_get_strikethrough_position. - - * gobject/pygobject.c (pygobjectmeta_init): Don't register types - that are already registered (have a __gtype__ attribute). - -2005-05-28 Manish Singh - - * gobject/pygiochannel.c (pyg_iowatch_marshal): Pass the GIOCondition - to PyObject_CallFunction. - -2005-05-28 Johan Dahlin - - * gobject/gobjectmodule.c: (initgobject): - * gobject/pygobject-private.h: - * gobject/pygtype.c: (pyg_register_boxed_custom): - Sort quark names. Rename pyg_boxed_marshal_key to pygboxed_marshal_key. - Don't set the keys twice - -2005-05-28 Gustavo J. A. M. Carneiro - - * gobject/pygpointer.c (pyg_register_pointer): change quark name - from pointer_type_id to pygpointer_class_key, for consistency; - assume it to be already registered. - - * gobject/pygenum.c (pyg_enum_add): pygenum_class_id is already - registered. - - * gobject/pygtype.c (pyg_register_boxed_custom): - pyg_boxed_marshal_key is already registered. - - * gobject/pygobject.c (pygobject_register_class): - pygobject_class_key is already registered. - (pygobject_register_wrapper): pygobject_wrapper_key is already - registered. - (pygobject_new_with_interfaces): idem. - (pygobject_new): pygobject_wrapper_key is already registered. - - * gobject/pygboxed.c (pyg_register_boxed): Don't register - boxed_type_id, use pygboxed_type_key instead, which is assumed to - be already registered. - - * gobject/gobjectmodule.c (initgobject): Register all the gquarks. - (global): Remove the *_id static const strings, they are redundant now. - - * gobject/pygobject-private.h: Declare all the global gquarks. - -2005-05-25 Manish Singh - - * gobject/pygiochannel.c: Pass gsize to GIOChannel functions that - expect them. - -2005-05-25 Gustavo J. A. M. Carneiro - - * examples/gtk/widget.py (PyGtkWidget.do_realize): move_resize() - window here as well. - (PyGtkWidget.do_expose_event): Fix rectangle coordinates. - (frame): Put custom widget in a frame (Christian Kirbach). - -2005-05-22 Gustavo J. A. M. Carneiro - - * tests/test_signal.py: Update tests to deal with automatic - registration. - - * examples/gobject/signal.py: Update example to not call - gobject.type_register anymore. - - * gobject/pygobject.c: Add PyGObject_MetaType impl. - (pygobject_register_class): Set the metaclass of new types to - &PyGObject_MetaType. - - * gobject/gobjectmodule.c (pyg_type_register): split in two - functions; one (pyg_type_register) that does all the work and - return 0 on success or -1 on error; the other one - ( _wrap_pyg_type_register ) does the python argument parsing and - calls the first one. - (initgobject): Register the new PyGObject_MetaType type, which is - a metaclass that automatically registers user defined GObject - subclasses. - - Fixes #128765: GObject metaclass. - -2005-05-22 Gustavo J. A. M. Carneiro - - * gobject/gobjectmodule.c: Wrap g_markup_escape_text. Fixes #164665. - - * gtk/gtk.defs: Add gtk.EntryCompletion.get_text_column. - Patch by Gian Mario Tagliaretti. - - * gtk/gdk.defs (save_to_callback): Add. - - * gtk/gdk.override (_wrap_gdk_pixbuf_save_to_callback): Wrap - gdk_pixbuf_save_to_callback. Fixes #172445. - - * gobject/pygiochannel.c: Add; implements GIOChannel wrappers. - Fixes #139176: GIOChannel wrapper. - - * gobject/gobjectmodule.c (initgobject): Register IOChannel type - and some constants. - - * gtk/gdk.defs: Add functions notify_startup_complete, - get_display_arg_name, get_program_class, set_program_class, and - get_display. Fixes #167412. - -2005-05-22 Tim Evans - - * gtk/gtktreeview.override - (_wrap_gtk_tree_view_map_expanded_rows): Don't unref borrowed - reference data.user_data. Reviewed by Gustavo Carneiro; Fixes - #165373 (crash due to extra Py_XDECREF in - gtk.TreeView.map_expanded_rows) - -2005-05-17 Manish Singh - - * gobject/pygparamspec.c (pyg_param_spec_getattr): make it build - again (missing }) - -2005-05-17 Johan Dahlin - - * gobject/pygparamspec.c: (pygenum_from_pspec), - (pygflags_from_pspec): Improve GParamSpec wrapping, fixes - bug #170614 - -2005-05-17 Benjamin Otte - - reviewed by: Johan Dahlin - - * gobject/gobjectmodule.c: (pyg_register_class_init), - (pyg_run_class_init): Allow multiple calls to - pyg_register_class_init, fixes bug #304353 - -2005-05-17 Benjamin Otte - - reviewed by: Johan Dahlin - - * gobject/gobjectmodule.c: - * gobject/pygobject-private.h: - * gobject/pygobject.h: - * gobject/pygtype.c: (pyg_closure_marshal), - (pyg_closure_set_exception_handler): Adds exception handling - support to closures, fixes bug #304357 - -2005-05-17 Johan Dahlin - - * configure.in: Bump version to 2.7.0 - - * pango-types.defs (EllipsizeMode): Remove commas - - * pango.defs (get_font_description, get_ellipsize, set_ellipsize): - Add - -2005-05-17 Johan Dahlin - - * ChangeLog.pre-2-6: Rename old ChangeLog - diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 5048948f..00000000 --- a/MANIFEST.in +++ /dev/null @@ -1,11 +0,0 @@ -exclude atk.c pango.c gtk/gtk.c gtk/gdk.c gtk/libglade.c -include ChangeLog AUTHORS COPYING MAPPING NEWS README THREADS TODO -include MANIFEST.in -include pygobject.h pygobject-private.h -include *.defs *.override -include pygtk.py pygtk-2.0.pc.in -include dsextras.py -recursive-include gtk *.override *.defs *.h -recursive-include codegen README.defs *.py pygtk-codegen-2.0.in -recursive-include examples README *.py *.xpm -global-exclude */CVS/* .cvsignore diff --git a/MAPPING b/MAPPING deleted file mode 100644 index fb758e46..00000000 --- a/MAPPING +++ /dev/null @@ -1,170 +0,0 @@ -The mapping of GTK+ onto Python -=============================== - -This file documents the mapping of the C GTK+ functions and types in -the pygtk package. If you want just enough information on how to use -C documentation to help you program with pygtk or help you read or -translate GTK+ programs written in C, then see the "Mapping of GTK+ -functions to gtk.py" section. - - -The _gtk module -=============== - -This module is almost a direct mapping of the GTK+ functions. It has -no object oriented constructs and is the part written in C. Large -parts of it are generated from .defs files (which are also used in the -guile and perl bindings), while some is written in hand crafted C. -Note that this module is mainly a convenience that makes it easier to -code the higher level gtk.py. - -There are a number of types defined by this module. The main one is a -wrapper for GtkObject and all its descendants. This type is just a -wrapper round the pointer, and calls gtk_object_ref on creation, and -gtk_object_unref on destruction (hence the C structure will not be -freed while python has a reference to it). - -For all the functions in _gtk that take GtkObject descendents as -arguments, the type conversion is done automatically (so you don't -have to call GTK_WIDGET or GTK_CONTAINER type macros). So at this -level, reference counting and type casting has already been taken care -of. - -Also a number of other types are defined in this module. For these -objects, there are relatively few functions and attributes specific to -the individual types, so I have spent some time writing nice -interfaces to them. Outlines of the available attributes and methods -of these types are available in the file description.py, which is -distributed with pygtk. These types include: - GtkCTreeNode - GtkStyle - GtkSelectionData - GdkAtom - GdkColor - GdkColormap - GdkCursor - GdkDragContext - GdkEvent - GdkFont - GdkGC - GdkWindow (aka GdkDrawable aka GdkPixmap aka GdkBitmap) - -Also, for the functions defined in _gtk, enumerations and flags are -handled specially. Where an enumeration value is to be passed to a -function, you can give it an integer representing its value, or a -string representing the name. For the list of names that can be used, -see the file gtk.defs that comes with the GTK+ distribution. The -(define-enum) and (define-flags) sections list the possible values. -For flags, you can pass any value that would be accepted as an enum -value in adition to a tuple of strings, which would be converted to -their corresponding numeric values and ORed together. - -GTK.py and GDK.py -================= - -These python modules define the numerical values for the host of enums -and flags in gtk and gdk respectively. The GTK_ prefix has been -removed from the gtk enums, and the GDK_ prefix from the GDK ones -(where this would leave the identifier starting with a digit, an -underscore has been prepended). This way if you do an "import GTK", -you reference the constants with a gtk prefix (eg GTK.STATE_NORMAL), -or if you do a "from GTK import *" you can access the constants via -shorter names (eg STATE_NORMAL). - -With _gtk, GTK.py and GDK.py, you should be able to write programs -that quite closely resemble the what they would look like in C (minus -type casts and occasional referencing/dereferencing). - -gtk.py -====== - -This module is meant to be the high level interface that will be used -by most programmers. It defines a number of classes that mirror the -class heirachy of the GtkObject descendents found in GTK+. Each of -these classes has an _o attribute which points to an instance of the -GtkObject wrapper type from _gtk. - -Because of reference counting problems (we don't want the GTK object -to die while we have a reference to the python one, and we don't want -the python one to die while we have a reference to the GTK object -- -circular reference alert :), there will usually be more than one of -these python wrappers existing for a single GtkObject (ie. a 1 to many -relationship). The bigest example of this is signal handlers where a -different object will always be passed in. This means that any -attributes you set on the object (ie. obj.foo = "bar") will not be -visible inside the callback. You can get round this by using the -object data mechanisms: - obj.set_data("string_tag", data) - data = obj.get_data("string_tag") - -This data will be accessible to every instance pointing to a single -GtkObject. - -Since there are two times you may want to create instances of these -classes, there are two ways to call their constructors: - - as normal to create a new C level object. - - as 'GtkSomething(_obj=obj)', which does not create a new C level - object, but creates a new python instance that represents the C - level object wrapped by obj. - -The second way of creating instances is done by giving default values -for all the constructor arguments, and adding "_obj=None" to the end -of the argument list. Then the first line of the constructor is set -to: - if _obj: self._o = _obj; return - -Mapping of GTK+ functions to gtk.py -=================================== - -For each GtkObject descendent, there is a python class of the same -name. It will list the C class's superclass as its superclass. For -each desendant, say GtkSomething, there will be a function defined in -GTK+ called gtk_something_new() or similar. This is mapped to the -constructor for the class. - -There are usually a number of other functions starting with -gtk_something_ in GTK+. These functions will generally take an -instance of GtkSomething as the first argument. These map to methods -of the python class. So the following: - gtk_something_method(GtkSomething *something, args, ...) -maps to this: - something.method(args, ...) - -Note that this means that methods of the parent class are accessed as -easily as those of the actual class. - -There are a few special cases of course. For instance, all the -gtk_drag_*() functions have been mapped to GtkWidget.drag_*(), and the -gtk_selection_*() functions have been mapped to -GtkWidget.selection_*(). - -The object argument mechanisms are also implemented in pygtk. You can -query and change these properties on an already instantiated object -using the mapping behaviour similar to the way you can in Tkinter (eg -label_widget['label'] = 'Hello' will change a label's text). You can -also create new objects and setting their object arguments at creation -time with the new() method. The first argument should be the class -object for the instance you want. The rest of the arguments should be -keyword arguments specifying the object arguments you want to set (eg -label = new(GtkLabel, label='Hello')). - -There are also a number of other functions not associated with any -particular class that are accessible through the global scope of the -gtk.py module. It is probably easiest to read the end of gtk.py to -get a feel for these functions. - -gtk.py also imports the GTK constants with "from GTK import *", and -the GDK constants with "import GDK". The reasons for using "from GTK -import *" are partly for convenience and partly because thats how I -did it when I first wrote pygtk :) - -Conclusions -=========== - -That about sums up the language mapping in pygtk. The best way of -learning how to program in pygtk is to read sample code. Take a look -at the examples/ directory, and go through the examples there. - -If you think something is missing from this document, please mail me -at . - diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 55083dbe..00000000 --- a/Makefile.am +++ /dev/null @@ -1,128 +0,0 @@ -AUTOMAKE_OPTIONS = 1.7 - -if BUILD_GTK - GTK_SUBDIR = gtk -endif - -SUBDIRS = codegen . $(GTK_SUBDIR) examples tests docs - -PLATFORM_VERSION = 2.0 - -CLEANFILES = -EXTRA_DIST = \ - ChangeLog.pre-2-0 \ - ChangeLog.pre-2-6 \ - config.h.win32 \ - MANIFEST.in \ - MAPPING \ - pygtk.spec \ - pygtk.spec.in \ - pygtk-$(PLATFORM_VERSION).pc.in \ - pygtk_postinstall.py \ - PKG-INFO \ - PKG-INFO.in \ - setup.py \ - THREADS - -INCLUDES = \ - $(PYTHON_INCLUDES) \ - $(PYGOBJECT_CFLAGS) \ - $(GLIB_CFLAGS) \ - -I$(srcdir)/gtk - -# pkg-config files -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = -pkgconfig_DATA += pygtk-$(PLATFORM_VERSION).pc - -# defs files -defsdir = $(pkgdatadir)/$(PLATFORM_VERSION)/defs -defs_DATA = - -# python -pyexec_LTLIBRARIES = -noinst_PYTHON = ltihooks.py - -# pygtk scripts -pkgpythondir = $(pyexecdir)/gtk-2.0 - -# pygtk extension modules -pkgpyexecdir = $(pyexecdir)/gtk-2.0 -pkgpyexec_LTLIBRARIES = - -# linker flags -common_ldflags = -module -avoid-version -if PLATFORM_WIN32 -common_ldflags += -no-undefined -endif - -# atk module -ATK_DEFS = atk.defs atk-types.defs -ATK_OVERRIDES = atk.override atkrectangle.override -CLEANFILES += atk.c -EXTRA_DIST += $(ATK_DEFS) $(ATK_OVERRIDES) -atk.c: $(ATK_DEFS) $(ATK_OVERRIDES) -atk_la_CFLAGS = $(ATK_CFLAGS) -atk_la_LIBADD = $(ATK_LIBS) -atk_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initatk -atk_la_SOURCES = atkmodule.c -nodist_atk_la_SOURCES = atk.c -if BUILD_ATK -pkgpyexec_LTLIBRARIES += atk.la -defs_DATA += $(ATK_DEFS) -endif - -# pango module -PANGO_DEFS = pango.defs pango-types.defs -CLEANFILES += pango.c -EXTRA_DIST += $(PANGO_DEFS) pango.override -pango.c: $(PANGO_DEFS) pango.override -pango_la_CFLAGS = $(PANGO_CFLAGS) -pango_la_LIBADD = $(PANGO_LIBS) -pango_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initpango -pango_la_SOURCES = pangomodule.c -nodist_pango_la_SOURCES = pango.c -if BUILD_PANGO -pkgpyexec_LTLIBRARIES += pango.la -defs_DATA += $(PANGO_DEFS) -endif - -# pangocairo module -PANGOCAIRO_DEFS = pangocairo.defs pangocairo.override -CLEANFILES += pangocairo.c -EXTRA_DIST += $(PANGOCAIRO_DEFS) pangocairo.override -pangocairo.c: $(PANGOCAIRO_DEFS) pangocairo.override -pangocairo_la_CFLAGS = $(PYCAIRO_CFLAGS) $(PANGOCAIRO_CFLAGS) -pangocairo_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initpangocairo -pangocairo_la_LIBADD = $(PANGOCAIRO_LIBS) -pangocairo_la_SOURCES = pangocairomodule.c -nodist_pangocairo_la_SOURCES = pangocairo.c -if BUILD_PANGOCAIRO -pkgpyexec_LTLIBRARIES += pangocairo.la -defs_DATA += $(PANGOCAIRO_DEFS) -endif - -# code generator -.defs.c: - (cd $(srcdir)\ - && $(PYTHON) codegen/codegen.py \ - --py_ssize_t-clean \ - --register pango-types.defs \ - --register atk-types.defs \ - --register gtk/gtk-base-types.defs \ - --override $*.override \ - --prefix py$(*F) $*.defs) > $(*D)/gen-$(*F).c \ - && cp $(*D)/gen-$(*F).c $(*D)/$(*F).c \ - && rm -f $(*D)/gen-$(*F).c - -snap: - $(MAKE) dist distdir=$(PACKAGE)-SNAP-`date +"%Y%m%d"` - -doc-dist: - mkdir pygtk - cp -r docs/html/*.html pygtk - cp -r docs/html/*.sgml pygtk - cp -r docs/html/*.devhelp pygtk - cp -r $(PYGOBJECT_PYGDOCS)/style.css pygtk - tar cfz $(PACKAGE)-docs.tar.gz pygtk - rm -fr pygtk diff --git a/NEWS b/NEWS deleted file mode 100644 index 5bb92015..00000000 --- a/NEWS +++ /dev/null @@ -1,1086 +0,0 @@ -pygtk-2.10.4 4-februrary-2007 - - Documentation build fixes (John Finlay, Gustavo) - - Return NULL on error in TextBuffer.register_serialize_format - (Paolo Borelli) - - Do not overwrite sys.argv (JP Calderone) - - Add status icon example (Nikos Kouremenos) - - Make it possible to remove rows in the gtk.TreeModel.foreach - callback (Gustavo) - - Code generator fix for %define (#381389, Manish Singh) - - Duplicate GdkEvent.string member when setting it (#382428, - Gustavo, John Ehresman) - - Make it possible to use automake 1.10 (Kjartan Maraas) - - distutils build fixes (#385934, Sebastien Bacher, Michael Bienia) - - Allow None to be passed into gdk.Display (Johan) - - Undeprecate gtk.container_class_list_child_properties (Johan) - - Fix memory leak in gtk.Container.child_get (Gian Mario Tagliaretti) - -pygtk-2.10.3 3-october-2006 - - Fix a crasher bug introduced in 2.10.2 (Gustavo) - - Make PyGTK work with Python 2.5 and 64-bit (#337368, Gustavo) - (when used in conjunction with the soon-to-be-released PyGObject 2.12.2) - -pygtk-2.10.2 3-october-2006 - - distutils / win32 compilation fixes (Cedric Gustin) - - gtk.TreeSelection.selected_foreach bug fix (#347273, Gustavo) - - Fix compilation older C compilers (John Ehresman) - -pygtk-2.10.0 4-september-2006 - - Issue a warning when a DISPLAY is not set (#316877, Johan, Jeremey Katz) - - Copy style.css from pygobject docs when installing docs. - (#351385 Gian Mario Tagliaretti) - - Include the built docs in the tarball (Johan) - -pygtk-2.9.6 8-august-2006 - - GtkTreePath can be converted from integers again (#350252, Gustavo, - Sebastien Bacher) - - Fix parallel build (#350225, Ed Catmur) - - Reduce exception abuse in code generator (Gustavo) - - Documentation improvements (Johan, John) - -pygtk-2.9.5 6-august-2006 - - Make it possible to build with GTK+ 2.10 (#350008, Joseph Sacco) - - Make sure dir(gtk.keysyms) work again (#349892, Johan, John) - - reloading the gtk module works again (#349026, Johan, Alexander Larsson) - -pygtk-2.9.4 4-august-2006 - - Include John Finlay's PyGTK reference manual (Johan, John) - - Setters and getters for GtkWidget.activate_signal (#331445, Gustavo) - - GtkToolItemType setter/getter (#331355, Gustavo) - - Code generator fixes (Gustavo, Johan, John, Yevgen Muntyan, Gustavo) - - Add more gtk+ 2.10 API (#337011, John, Sebastian Pölsterl) - - Don't copy treeiters in callbacks (#347273, John, Stefano Maggiolo) - - Provide full information for GtkTreeSelection.set_select_function - (#340475 John, Wouter Bolsterlee) - - Export less symbols and reduce the size of the libraries (#347825, - Rafael Espíndola) - - Allow negative values for GtkTreeModel.set/getitem (#311852, Baiju M) - - Much improved interface/virtual method support (John) - - Remove evil 100ms timeout timer (#348937, Gustavo) - -pygtk-2.9.3 12-july-2006 - - Update to latest gtk+ 2.10 API changes (#345447, #345623, Newren, Peters) - - Many more new gtk+ 2.10 APIs wrapped (Finlay) - - Wrap gtk_widget_class_find_style_property (Finlay) - - gtk.gdk.CairoContext.rectangle bug fix (Gustavo) - - Update defs for atk 1.8 (Finlay) - - Misc. module cleanups (Dahlin) - - New pango APIs wrapped (Finlay) - - Fix refcount error in gtk.Clipboard (#343960, Gustavo, Finlay) - - Enable GDK X11-specific APIs available also with gtk+ 2.8 (Gustavo) - - Lazy loading of the gtk.keysyms module (Johan Dahlin) - -pygtk-2.9.2 15-june-2006 - - Fix a codegen bug that prevent build of other extensions (344845, Gustavo) - - Builds with pycairo 1.1.6 (344957, Gustavo) - - gtk.TextBuffer rich text copy and serialization (Finlay) - - Correct Print Editor example (Gustavo) - -pygtk-2.9.1 13-june-2006 - - Allow gtk.TreeSortable.set_default_sort_func callback to be None - (Johan, Patrick O'Brien) - - Add API to unset the g_log handlers (#323786, Johan) - - Allow the gtk module to be imported without DISPLAY (#316877, Johan) - - Code cleanup and fixes considering Coverity reports (Johan) - - Add codegen support for const-Object return type (#169204, Gustavo) - - Add codgen support for unblocking threads around method calls (Gustavo) - - Wrap gdk_event_handler_set (Johan) - - Codegen reverse wrapper bug fix (#340162, Yevgen Muntyan) - - Wrap GdkRegion (John Ehresman) - - Add codegen support for ignore-type statement in override (Johan) - - Add conditional support for gtk+ 2.10 API, especially printing - (Johan, Finlay, Gustavo) - - Complete the support for gtk.Container virtual methods (#341641, Gustavo) - - Fix misc. reference leaks (Finlay, Gustavo) - - Allow None parameter in pangocairo.CairoContext.set_font_options (Finlay) - - Complete the support for gtk.CellRenderer virtual methods (#339431, Gustavo) - - IconView.set_cursor method params 'cell' and 'start_editing' - made optional (#343039, Ross Burton, Finlay) - - Wrap a few more gdk_cairo_* methods (Finlay) - - Add a 'selection' field to gdk.OWNER_CHANGE events (Finlay) - - Allow None in gtk.Entry.set_inner_border() (Finlay) - - gtk.Clipboard rich text methods (Finlay) - - Add gtk.MessageDialog.set_image() (Finlay) - - Wrap gtk_link_button_set_uri_hook() (Finlay) - - Allow None in gtk.Widget.input_shape_combine_mask() (Finlay) - - Allow gtk.LinkButton() constructor to optionally receive a label (Finlay) - - Allow None in gtk.Label.set_mnemonic_widget() (Johan) - - Wrap a bunch of X11 specific gdk methods (Gustavo) - - Add gtk.SizeGroup.get_widgets() (Finlay) - - Wrap gtk_style_lookup_color() (Finlay) - - Wrap a bunch of gtk treeview grid lines methods (Finlay) - - Better Drag and drop API support (Finlay) - - Add -I option to codegen (defs search path) (Gustavo) - -pygtk-2.9.0 04-april-2006 - - Remove gobject, pygobject is now a hard dependency - - Set encoding in pango instead of gtk (328031) - - Wrap gdk.Screen.get_rgba_colormap/get_rgbma_visual (328996, - Marco Cabizza) - - Remove private gtk wrappers (321476) - - Add a bunch of missing wrappers (316881, John Finlay) - - Add inout support in reverse wrappers (335964, Gustavo) - - Update h2defs to allow whitespace before parenthesis (317124) - - Make it possible to reimplement interfaces (334986, Gustavo) - - Allow log_handler to be called when python is not initialized - (334188, Gustavo) - - Support for const object args (wollny@cbs.mpg.de, Gustavo) - - Export pygtk tree model api (318021, Gustavo) - - Allow overrides to be in base classes (327715, Gustavo) - - Wrap a pango cairo font options acecssors (328108, - Rauli Ruohonen) - - Add GDK_PARENT_RELATIVE relative handling (320248, Johan, - Nikos Kouremenos) - - Improve pixbuf demo (327931, Ben Caradoc-Davies) - - Set default markup accel marker to \x00 - (329658, Johan, Johan Svedberg) - - Set 1 as default argument to SpinButton.spin() (325452, - Sebastian Rittau) - - Wrap gdk.Drawable.gdk_draw_indexed_image (333431, - Johan, Hamish Moffatt) - - Mark rowreference.free() as deprecated (309811, Gustavo) - - Rename name of first keyword argument to pango.LayoutLine.index_to_x - (316581, Gustavo, John Finlay) - - Run reindent on all python code (325320, Johan) - - Improve generictreemodel example (311459, Steven Kennedy) - - Wrap gdk.Pixbuf.rotate_simple (314164, Karel Vervaeke) - - Use in argument in gtk.TreeView.cell_get_size (326357, John Ehresman) - -pygtk-2.8.5: 30-march-2006 - - String list bug fix (Christopher Aillon) - - Improved examples (Johan) - - Proper refcounting in gdk.Window constructor (John Ehresman) - - Fix a bunch of reference leaks (Gustavo) - - __init__.py fixes for pydoc (Johan) - - gtk.Dialog.new_with_buttons leak (#332771, Gustavo) - -pygtk-2.8.4: 11-january-2006 - - Re-include gobject wrappers if pygobject is not found (Gustavo, Johan) - - gtk.IconView should implement GtkCellLayout (Johan) - - Always install pygtk-2.0.pc - -pygtk-2.8.3: 09-january-2006 - - Split out gobject wrappers into a separate module and - depend on pygobject 2.9.0 (Johan) - - Bug fixes (Bob Gibbs, Johan, Gustavo) - - Size group example (Johan) - - Plug mem leaks (Gustavo) - - Build cairo on win32 (Cedric) - -pygtk-2.8.2: 09-october-2005 - - GIOChannel thread fix (Johan, Ole Andre Vadla Ravnås) - -pygtk-2.8.1: 03-october-2005 - - Bug fixes (Gustavo, Johan) - - Improve exceptions when registering properties (Gustavo) - - Extend warnings (John Ehresman) - - Raise exception when working on uninitialized objects (Johan) - - Plug libglade leak (Gustavo) - - Undeprecate a few gobject functions (Johan) - - UINT64 buf fixes (Gustavo, Johan) - - GCC 4.0 warnings (Johan) - -pygtk-2.8.0: 03-september-2005 - - GObject metaclass bugfix (John Ehresman) - - Double free fix in type_register (Gustavo) - - Make it buildable srcdir != buildir (Johan) - - Improve GdkRectangle conversion (Tim Evans, Gustavo) - - Use automake 1.8 (Johan) - -pygtk-2.7.4: 24-august-2005 - - Container.do_forall implementable in subclasses (Johan) - - Bug fixes (John Finlay, Christian Persch, Christopher Allion, - Johan, Gustavo) - - Build fixes (Stepan Kasal, John Ehresman, Johan) - -pygtk-2.7.3: 10-august-2005 - - Build fixes (Johan) - - Code generator fixes (Gustavo) - - Bug fixes (Johan, Andy, Gustavo) - -pygtk-2.7.2: 02-august-2005 - - Subclass/type registration bug fixes (Gustavo) - - Allow gobject to be initialized twice (Yevgen Muntyan) - - Deprecating warning bug fixes (Mark McLoughlin) - - Bug fixes (Sebastien Bacher, Gustavo, Johan, Manish) - -pygtk-2.7.1: 21-july-2005 - - Update API to Gtk+ 2.7.3 (Johan) - - Threading, Enum fixes (Johan - - Registration fixes (Gustavo) - - Make use of atomic ref counting in glib (Johan) - -pygtk-2.7.0: 10-july-2005 - - GIOChannel wrapper (Gustavo, John Ehresman, Manish) - - GSource wrapper (Manish) - - Allow creation of python classes through gobject.new (Gustavo, - John Ehresman, Benjamin Otte) - - Improved GObject property support (Gustavo, Iñaki, Johan) - - Improved ParamSpec wrapping (Johan) - - Add gdkcairo and pangocairo wrapping, depends on pycairo (Gustavo) - - 2.8 API updates (Johan) - - Add GObject metaclass, making type_register unnecessary (Gustavo) - - C++ compilation fixes (Manish) - - Handle longs/ints better (Gustavo) - - Support new GType fundamentals (Edward Hervey, Johan) - - Improved GType wrapping (Johan) - - Support for specifying GType name (Johan) - - GtkContainer iterator support (Johan) - - Support for subclasses that implements scrolling (Gustavo, Johan) - - Bug fixes/Misc fixes (Steve Chaplin, Tim Evans, John Finlay, - Cedric Gustin, Edward Hervey, Christian Kirbach, Tuure Laurinolli, - Benjamin Otte, Manish Singh, Gian Mario Tagliaretti, - Fernando San Martin Woerner) - -pygtk-2.6.2: 9-may-2005 - - Allow None to be sent in to set_group radio widgets (Johan, Lorenzo) - - guint/gsize as longs (Gustavo) - - Check for exceptions in child_watch (Mark McLoughlin) - - Bug fixes (Johan, Manish Singh, John Finaly) - -pygtk-2.6.1: 15-march-2005 - - GtkListStore.insert optimization (Johan) - - GtkTreeStore/GtkListStore.reorder leak fix (Johan, Richard Hult) - - GParamSpec bug fix (Johan) - - Code generator improvements (Anders Carlsson, Johan, Doug Quale) - - GCC4 build fixes - -pygtk-2.6.0: 07-march-2005 - - win32 fixes (Cedric Gustin) - - remove unnecessary casting (Manish Singh) - - updated examples (Johan) - -pygtk-2.5.4: 23-february-2005 - - Much improved GMainloop support (Mark McLoughlin) - - Install pygtk-demo (Gustavo) - - Deprecate gtk.TRUE/gtk.FALSE (Johan) - - win32 build fixes (Cedric Gustin) - -pygtk-2.5.3: 23-january-2005 - - Revert some threading changes (Gustavo) - - Build improvements (Johan) - - Improve pixmap functions (John F) - - GObject type registration fixes (Gustavo) - - Code generator fixes (Johan, Gustavo) - - Plug mem leaks (Mark McLoughlin) - - Flag/Enum bug fixes (Gustavo) - -pygtk-2.5.2: 10-january-2005 - - Improved deprecation messages (Johan) - - gtk.idle_add, gtk.timout_add, and others are now - deprecated (Johan) - - Overriding GTK+ virtual methods (Gustavo) - - Interfaces now implementation (Gustavo) - - 2.6 merge (Johan, Gian Mario Tagliaretti) - - Bug fixes (Adam Hooper, John Finlay, Gustavo, Johan, Tim Evans) - - Build system improvens (Johan) - -pygtk-2.5.1: 23-december-2004 - - Remove API removed in Gtk+ 2.6.0 (Gustavo, Johan) - - Implement pango.LayoutIter (John) - - Build fixes (Johan, Marco Pensenti Gritti) - - Update examples (Alan Horkan) - - distutils/win32 fixes (Cedric Gustin) - -pygtk-2.5.0: 29-november-2004 - - Port to Gtk+ 2.5.x (Johan, John) - - Code generator improvements (Gustavo) - -pygtk-2.4.1: 04-november-2004 - - Bug fixes (Johan, Gustavo, John Finlay) - - Allow the headers to be parsable by a C++ compiler - - Updated examples (Johan, John) -pygtk-2.4.0: 03-october-2004 - - Updated examples (John Finlay) - - Tiny threading bug fix (John Ehresman) - -pygtk-2.3.97: 28-september-2004 - - Threading fixes (Gustavo, Johan, John E) - - Other bug fixes (Gustavo, James, Johan, John, Ehresman, - John Finaly, Owen Taylor and Xaiver Ordoquy) - - x86_64 build fixes (Jonathan Blandford) - - Updated examples (John Finlay) - -pygtk-2.3.96: 06-august-2004 - - Threading fixes (Johan, Gustavo) - - Bug fixes (John, Johan, Gustavo) - - GEnum/GFlags wrapping improvements - - GdkAtom string wrapping (John) - - Better boolean support (since we now can require 2.3) - -pygtk-2.3.95: 02-august-2004 - - Flags/Enum fixes (John, Johan) - - Bug Fixes (John, John E, Johan, Gustavo) - - Improved threading support (Johan) - -pygtk-2.3.94: 21-july-2004 - - bug fixed (Gustavo, Johan, John, Lorenzo) - - small enum additions for gazpacho (Johan) - - rename GMainLoop, GMainContext back to MainLoop and MainContext - -pygtk-2.3.93: 19-july-2004 - - GtkTreeView updates (John Finlay) - - New examples (Johan) - - GEnum/GFlags wrapping (Johan) - - New (using g_object_new) constructors (Gustavo) - - GParamSpec API, for GtkWidget and GtkContainer (Johan) - - Unichar/Unicode support (Lorenzo, John Ehresman) - - Widget subclassing (Johan, Gustavo, Lorenzo) - - GdkEvents changable (Johan) - - Warnings (Gustavo, Johan) - - Many bugfixes (John Finlay, John Ehresman, Johan, Lorenzo, Gustavo) - - Win32/FreeBSD/distutils build fixes (John, Johan) - -pygtk-2.3.92: 22-may-2004 - - Deprecate old function (John Finlay) - - Add missing 2.4 api for pango, gdk and gtk (John Finlay): - PangoAttrList, PangoFontset, PangoFontFamily, - GdkWindow, GdkPixbuf, GdkPixbufLoader, GtkClipboard, - GtkTreeView, GtkTreeModel, GtkToolbar - - Reference counting fixes (John) - - gobject type registration improvements (Gustavo) - -pygtk-2.3.91: 16-april-2004 - - Continue to wrap 2.4 api: GtkActionGroup, - GtkColorButton, GtkCellLayout, GtkComboBox, GtkFileChooser, - GtkFontButton, GtkIconInfo, Gtk*ToolButton (John Finlay, Johan) - - ref GdkWindows on win32 (John Ehresman, Gustavo) - - Clean up defs (John) - - Deprecate 0.6.x compatibility functions (Johan) - - Convert GValueArray to list, not tuple (Gustavo) - - Add new demos (Joey Tsai) - - Create unknown types on the fly, with interfaces (Johan) - - Update spec (Jason Tackaberry, Thomas Vander Stichele) - - Support tp_new (Johan) - -pygtk-2.3.90: 30-march-2004 - - Merge in changes for Gtk+ 2.4 (Johan, Xavier) - - GtkUIManager, GtkFileChooser, GtkTreeModelFilter, - GtkActionGroup, GtkAction, GtkToolbar etc - - Export GParamSpec in GObject and support style properties - - Distutils win32 fixes (Cedric Gustin) - - Fix mainloop related warnings (bug 136731, bug 136705) - - Updated examples (Johan) - - gdk.atom_intern (Gustavo) - - Code generator fixes (Xavier) - -pygtk-2.2.0: 11-march-2004 - - Added support for GTK+ 2.2 APIs, GdkDisplay, GdkScreen, - GdkClipboard and GtkWindow (James) - - Better and more flexible support for TreeModel and TreeView API - (Don Allingham, Benjamin Cama, John Ehresman, Johan, - jkluebs@luebsphoto.com) - - Better support for gtk.gdk.Pixbuf integration with - Numerical arrays (Tim Evans) - - Better support for Pygtk generation tools (codegen, m4 macros, - h2def, Makefile.am ...) (James, Jon Willeke, Xavier, Johan) - - Removed gtkgl bindings (James) - - Added gtk.gdk.Eventkey.hardware_code (Johan) - - Added gtk.binding_entry_remove and gtk.accel_group_connect (Gustavo) - - Don't allow reading non readable properties (James) - - And lots of bug fixes: gdk.event_get_axis (Seth Nickell), - distutils (Alif Wahid), mem leaks, gtk.Menu.popup (Gustavo) - -pygtk-2.0.0: 1-September-2003 - - Roll version number over to 2.0. - - Small fix to gtk.TextView.set_border_window_size() method. - - Miscelaneous bug fixes. - -pygtk-1.99.18: 24-August-2003 - - Fix up a duplicate symbol bug in the atk module, that was - causing build problems on MacOS X (hopefully the last such - problem). - - add gtk.glade.set_custom_handler() API, that provides more - info to the custom widget callback. Deprecate - set_custom_widget_callbacks(). - - some other bug fixes. - -pygtk-1.99.17: 31-July-2003 - - Threading support is compiled in by default now. It is - necessary to call gtk.threads_init() in order to make use of - threading though. There have been a number of fixes to the - threading support too. - - Fix up some problems with multiple definitions of global - variables in gobject module, that was causing problems on - Mac OS X. - - Wrappers for many new APIs (John Finlay, Naofumi Yasufuku, - Johan Dahlin and others). - - Improvements to the code generator to give better error - messages. - - Some fixes to property APIs to work correctly on 64 bit - systems, and to handle ATOM type properties. - - Fix copyright headers on source files. - -pygtk-1.99.16: 23-March-2003 - - various new functions wrapped. - - More threding fixes (Jon Trowbridge) - - Reworking of the single instance per GObject code to work - better with the Python cycle GC. - - more updates to the simplified Python tree model API. - - fix error handling in constructors for GtkTreeStore and - GtkListStore. - - add some inline comments for the APIs for extending pygtk to - handle other widget sets. - -pygtk-1.99.15: 08-February-2003 - - distutils support - - Code generator improvements (Jeremy Katz) - - Threading fixes (Lots of people) - - API additions to GtkTextBuffer, GtkTextView and GtkFileSelection - - GMainLoop/GMainContext support, you can now run input_add, - timeout_add without importing gtk. - - libglade now support passing in an instance to signal_autoconnect - - pygtk.py import speedup. - - Many many bugs fixed. - -pygtk-1.99.14: 27-December-2002 - - update to newer auto-tools (autoconf-2.57, automake-1.7.2, - libtool-1.4.3). - - many bug fixes and additions of missing APIs. - - fix doc generation scripts to match the new style of gtk-doc - documentation. - - make code generator return either Py_True or Py_False for - boolean return functions. This change is only noticable - with Python 2.3 alphas. - - removal of wrappers for deprecated functions where the - deprecated method shadowed the replacement. - - wrappers for idle_add, timeout_add, io_add_watch and - source_remove to gobject module. Compatibility names are - provided in the gtk module. - - Many tree and text view wrapper updates from Johan Dahlin and - John Finlay. - - leak fixes. - - Updated examples, including demo for editable cells. - - Improved threading support. - - Api additions for GdkEvents, TreeSelection, GtkTooltips, libglade, - GtkContainer. - -pygtk-1.99.13: 24-August-2002 - - Support parallel install with pygtk >= 0.6.10 - - fix initial reference handling for derived GObjects. This - also uncovered a few other reference leaks. - - Other reference leak fixes from Arjan. - - Support building out of the box on windows with mingw32 from - Cedric Gustin. - -pygtk-1.99.12: 23-July-2002 - - more win32 compat updates. - - simple tree model interfaces added. - - added generic cell renderer type. - -pygtk-1.99.11: 10-July-2002 - - int64/uint64 arg handlers in code generator. - - some reference leak fixes. - - get signal handlers to participate in cyclic garbage - collection (thanks to Arjan Molenaar). - - correctly reset LC_NUMERIC to "C" when initialising the gtk - module. - -pygtk-1.99.10: 13-May-2002 - - support new arg types in code generator. - - handle (caller-owns-return) in code generator. - - add gtk.compat module that provides similar naming to gtk - 1.2 modules. - -pygtk-1.99.9: 23-April-2002 - - Some win32 compatibility fixes merged in from Hans. - - update defs file to match final gtk 2.0 APIs. - - added gtk.gl wrapper. - - refactored code generator, fixing a number of bugs in the - process. - -pygtk-1.99.8: 18-March-2002 - - Implement lots of stuff in Pango module. - - make class names include module name so that help() output - looks nicer. - - lots of other functions added. - -pygtk-1.99.7: 31-January-2002 - - add (broken) threading support. Will need fixing one day. - - make safe for use with PyMalloc. - - split gobjectmodule.c into a number of files. - -pygtk-1.99.6: 24-December-2001 - - add scripts for generating documentation for pygtk. - - add __gsignals__ and __gproperties__ sepcial class - attributes for defining new signals and properties for an - object. - - better support for GError. - - start of ATK wrapper (msw). - -pygtk-1.99.5: 26-November-2001 - - lots of updates. - -pygtk-1.99.4: 29-October-2001 - - fix up GObject last ref handling for derived types. - - other fixes. - -pygtk-1.99.3: 9-October-2001 - - Rename the PyGtkTreeModel to PyGtkGenericTreeModel to avoid - name conflicts. - - many method wrappers added. - - more reference fixes. - - adjust code generator so that it outputs #line directives. - - move defintions of types (as opposed to functions/methods) - to separate files to improve compilation speed. - -pygtk-1.99.2: 29-September-2001 - - switch from ExtensionClass to use Python 2.2's type/class - unification. - - require Python 2.2a4 - -pygtk-1.99.1: 20-September-2001 - - always use the GType wrapper type to represent GTypes, - rather than using ints. - - automatically populate modules with constants via - introspection. - - Switch from gtk.GtkFoo naming to gtk.Foo. - -pygtk-1.99.0: 10-September-2001 - - First cut tarball for 2.0 branch. Lots and lots of changes - (since branching in April 2000). - - Uses ExtensionClass, and implement GObject wrappers in C - code, rather than the two stage wrapper like the 1.2 branch. - - ----- GTK-1.2 branch ---- - -pygtk-0.6.11: 23-August-2002 - - Fix up libtool patch for older binutils'. - - a few bug fixes in some GtkWidget methods. - -pygtk-0.6.10: 22-August-2002 - - Fix up segfaults when using with a Python compiled with - pymalloc. - - various new wrapper functions added. - - Raise exception if gtk_init() fails. - - bug fixes. - - Support parallel install with PyGTK 2.0. - -pygtk-0.6.9: 3-Janyary-2002 - - always check the return value of functions for NULL values. - This fixes a number of problems which caused crashes on - exit. - - add pygt_version and gtk_version variables. - - update to autoconf-2.52/automake-1.5 - - many bug fixes (see ChangeLog). - -pygtk-0.6.8: 23-April-2001 - - bug fixes to GtkNotebook, GtkCList. - - add some missing methods to GtkWidget - - a gdk-pixbuf wrapper module. - - install the code generator, so that other wrappers can use - it as well. - -pygtk-0.6.7: 16-February-2001 - - added --disable-thread configure argument to turn off thread - support even when compiling with a threaded python. - - resets LC_NUMERIC back to "C" after calling gtk_set_locale, - as this is the standard setting for python, no matter what - the locale. - - various other bug fixes. - -pygtk-0.6.6: 7-April-2000 - - switched over to using the CVS version of automake rather than - my `pyautomake' patches, as CVS automake now has the python - support integrated. Libtool is now used to build the extensions, - so if there are problems on your platform, it is a libtool - problem :) - - typo fixes. - - new pointer_(un)grab and keyboard_(un)grab methods for GdkWindow. - -pygtk-0.6.5: 13-March-2000 - - more reference leaks fixed. - - crashes when changing window properties with 16 or 32 bit data - formats fixed. - - some libglade wrapper fixes. - - various other fixes. - -pygtk-0.6.4: 16-February-2000 - - gnome-python now requires python >= 1.5.2, as it uses the 'N' - format tag for PyArg_ParseTuple. - - Reference leak fixes. - - A few new features. - -pygtk-0.6.3: 30-September-1999 - - if the new gnome-python is installed, the libglade module will load - the gnome support. Make sure you remember to import gnome.ui if the - glade file contains any gnome widgets. - - New methods for GdkWindow objects -- lower, _raise (for stacking - order manipulation) and input_get_pointer (for XInput stuff). - - A few other bugs have been fixed as well. See ChangeLog for details. - -pygtk-0.6.2: 9-August-1999 - - Threading should work correctly with multiple threads accessing - GTK (assuming they use threads_enter/leave). Thanks go to Matt - Wilson and Paul Fisher for this code. - - A pygtk.h header file is now installed that should make it easier - to write extensions to pygtk. - - There is now optional support for the gtkglarea widget and the - libglade library now. - - There is support for gdkrgb functions for rendering rgb and greyscale - image data to a drawable. - - Optional support for numpy arrays. You can create a GdkImlibImage - from a numpy array, and manipulate an image's data as an array. - Also there is a gdk_draw_array wrapper that uses gdkrgb to render - an array to a drawable. The code for the imlib stuff is based on - stuff submitted by Travis Oliphant. - - The GdkWindow type now has some methods for manipulating properties, - and has an xid attribute for getting the X window ID of the window. - - idle_add and timeout_add can now pass extra parameters to the - callback, like you can do for signals. Also added a wrapper - for signal handlers similar to gtk_signal_connect_object. - -pygtk-0.6.1: 22-May-1999 - - Fixed a few bugs to do with the threading patches I applied in the - last release. Threading should now work correctly. - -pygtk-0.6.0: 25-April-1999 - - updated for gtk+-1.2.1. - - You can now write multithreaded programs in python (if python was - compiled with thread support enabled, of course). This feature - is thanks to Duncan Grisby . - To use the multithreading, write your program as normal, but - before calling any GTK routines from outside the GTK thread (ie. - not from a signal handler or timeout/idle func), call threads_enter() - before hand, and threads_leave() after. - - Various bug fixes. - -pygtk-0.5.11: 24-February-1999 - - Updated for gtk+-1.1.16 - - Changes to the style code, so that you can now write to the - attributes. There is also a copy() method, which can be used - so you don't change the style on other objects. - - Some changes so some functions which are supposed to accept NULL - arguments will accept None in place of a boxed/string/object - argument. - - Added a file MAPPING that describes the mapping of GTK onto python. - - Various bug fixes. - - Pyglade XML parser made more robust. - -pygtk-0.5.10: 9-February-1999 - - Updated for gtk+-1.1.14/15. - - Fixed up some selection problems. - - Added DnD example translated by Chi-Deok Hwang. - - Some ctree fixes. - - Some function renamings. - - more functionality in the pixmap creation routines (you can create - a pixmap if you have a GdkColormap but no GdkWindow). - - added GdkWindow.depth attribute. - -pygtk-0.5.9: - - Updated for gtk+-1.1.9 - -pygtk-0.5.8: 10-December-1998 - - I made a mistake during building the last package. I ran - cvs co pygtk; aclocal; automake --add-missing; autoconf; configure - followed by make dist. Unfortunately, since there was no configure - file when I ran automake, it didn't get added to the dist list. - - Updated the spec files to match new version. - -pygtk-0.5.7: 9-December-1998 - - Updated for gtk+-1.1.6. Probably not much will change between now - and 1.2. - - Added GtkCTree, GtkLayout, GtkPlug and GtkSocket widgets. - - There has been a renaming of a number of commonly used functions. - if you use gtk.py, the old names still work, but give a warning. - To get a list of the name changes, see the file - $(prefix)/include/gtk/gtkcompat.h - - signal connection now uses the gtk_signal_connect_full function, - rather than relying on the default marshaller. - - The append, prepend and insert methods of the toolbar now return - the widget that was added, like the C equivalents do. - -pygtk-0.5.6: 27-November-1998 - - Updated for gtk+-1.1.5. - - Renamed Gtkinter.py to gtk.py. This follows the naming scheme of - other modules more closely, and is easier for people who prefer to - use "import ...". It is also not a big change for people who - use "from ... import *". I have included a simple Gtkinter.py - module for backward compatibility. - - Added a private function PyGtk_RegisterBoxed that can be used to add - extra boxed types to the list of those registered in the callback - marshals and the like. - -pygtk-0.5.5: 17-November-1998 - - Fixed a small bug in GdkImlib that caused a syntax error (I should - have picked this up for the last release). - - Removed some function wrappers that are not used anywhere, in order - to get pygtk to compile cleanly on newer CVS GTK's. - - I forgot to include the wrappings for the new GtkCalendar widget in - the previous release. It is in this one. - -pygtk-0.5.4: 15-November-1998 - - updated for gtk+-1.1.3 (so you will need glib-1.1.4 as well). This - release adds support for the new DnD functions, support for - selection (through the gtk_selection_* functions, which I have - mapped to GtkWidget.selection_*) and GdkAtoms, and support for - GdkCursors. - - To create a new cursor, use the cursor_new or cursor_new_from_pixmap - function, and then call the GdkWindow.set_cursor method to attach - it to a window. - - Added create_pixmap_from_xpm_d function that allows you to embed - XPM data into your program for easier distribution. - - Updated the GdkImlib module to the features found in imlib-1.8. - - Changed the build system, so SWIG is no longer needed. Also now - using a modified version of automake to generate the makefiles. - - Updated the pyglade code to handle menus and the like. - -pygtk-0.5.3: 27-September-1998 - - Updated for GTK+-1.1.2 (note that this version of gtk requires - glib-1.1.3). This version adds the support for the tearoff menus - and keyboard navigation of menus (if you use item factory). - - This is the version of pygtk you will need for the pygnome wrapper - for gnome v0.30 (when I finish writing them). - - added events_pending function. Now you can use code like: - while events_pending(): - mainiteration() - to be sure that a scrollbar has been updated. - - I have updated the examples/neil/*.py examples to use the - GtkItemFactory class. This shows how to make keyboard navigable - menus. - - Fixed a typo in GtkWindow.set_focus - - Fixed signal handler wrapper, so that handlers that return GtkObject - classes get the return type converted back to the lower level - GtkObjects. Also fixed _gtkbasemodule.c, so that return values from - signals get returned to GTK properly. These fixes should allow - people to use the GnomeMDI wrappers in pygnome if you change - there signal definitions to use GTK_TYPE_OBJECT rather than - GTK_TYPE_POINTER (I will ask the author to make this change). - -pygtk-0.5.2: 31-August-1998 - - fixed the ancestory for the GtkScrolledWindow class, fixed the - GtkPreview constructor. Fixed some more spots in _gtkmodule.i - where I'd used int types instead of the correct enumeration. - - added the pyglade package. This will allow you to put a bit of - code behind interfaces built with GLADE, which can be found at - http://www.comp.lancs.ac.uk/~damon/builder/index.html - In my current code, I have implemented most widgets on the - palette, although the .glade file reader is a bit fragile. Note - that this package is not a code generator (yet). It reads the - interface description and builds the interface at runtime. This - way you can keep the interface separate from the implementation. - For an example of use, check the examples/glade directory. - - Added support for the GtkItemFactory. Still no support for the - GtkCTree -- even if I did put in support for it, the signal - definitions define the GtkCTreeNode's as pointers, making it - almost useless. - -pygtk-0.5.1: 19-August-1998 - - fix a small bug in configure script that prevented building. - -pygtk-0.5.0: 18-August-1998 - - Updated for GTK+-1.1.1 - - Replaced GtkAcceleratorTable with GtkAccelGroup. - - Made use of the GtkFlagInfo and GtkEnumInfo structures. You can now - specify enum values by a string as well as by a number. Flag values - can be given as strings, or as a tuple of strings or numbers that - are ORed together. - - Added GtkAccelLabel, GtkFontSelection, GtkFontSelectionDialog, - GtkPacker and GtkProgress widgets. Also updated the methods on all - the other objects. I haven't yet done GtkCTree or GtkItemFactory. - - Fixed the gtk_widget_size_request wrapper - it now returns the size - requisition as a (w,h) tuple. - - I have split gtkmodule into _gtkbasemodule and _gtkmodule. The code - in _gtkbase is no longer generated. I have gone through and removed - uneeded code put in by swig. This reduced the size of that piece - of source by 25%. Hopefuly this will speed up some of the core - functions a bit. If you use Gtkinter, this change is invisible. - If you use gtkmodule directly, change: - from gtk import * - to - from _gtkbase import * - from _gtk import * - pygtk_init() - The pygtk_init function is part of the _gtk module, and is called - to tell it about all the types in _gtkbase. (it should be called - by the module's init routine, but I can't find out how to make that - happen. - - Updated the Gtkinter.new command. Now widget arguments don't get - the widget name prepended, so I have changed the function from - accepting the arguments as a dictionary to accepting them as - keyword arguments. (eg you can do new(GtkWindow, title="title", - allow_shrink=FALSE)). On a side note, the GTK_IS_*() functions - have been removed from gtkmodule and added in gtk_*_get_type() - functions. You can get the functionality of the removed functions - with something like GTK_CHECK_TYPE(obj, gtk_*_get_type()). - -pygtk-0.4.5: 5-August-1998 - - This may be the last gtk v1.0 release of pygtk. If you have anymore - nagging bugs, tell me now, or they won't be fixed in a version that - can compile for gtk v1.0 (I will be moving to gtk v1.1) - - Fixed some small bugs which I got bug reports about, but forgot to - patch (in draw_polygon, GtkDrawingArea.draw_polygon and load_fontset) - Also added the font argument to draw_string,draw_text. This was - what was causing those problems. - - Now gtk_set_locale is called when Gtkinter is loaded. This will - make pygtk more useful for languages with non-latin character sets - (eg Japanese). - - Fixed up new_gc, so that if you don't pass it any arguments, it - doesn't cause your program to segfault. - - Made GtkObject.connect and GtkObject.connect_after var arg functions. - Any extra arguments passed will be added to the argument list for - the signal handler. - - Added some attributes to the GdkFont object. You can now access - the ascent and descent attributes, and call the width and measure - methods, which both take a string as an argument. - -pygtk-0.4.4: 17-June-1998 - - Updated for gtk+-1.0.4, although it will work with gtk+-1.0.2 (No - new features were added between these releases). - - Fixed the date on the last changelog entry :( - - Added the file description.py. It contains a breif description - of some of the objects used in Gtkinter, such as GtkStyle's, - GdkColors, GdkGC's and so on. It is structured as a python module, - but is not intended to be imported. It can be used as a small - reference. - - Added variable GtkCList.selection, and method - GtkCList.get_selection_info. These should help using clists, and - help trap double clicks in a clist, since you can now do something - like this: - row, col = clist.get_selection_info(event.x, event.y) - in a signal handler (maybe button_press). - - Changed the GdkWindow destroy function to call gdk_pixmap_unref, if - the window was a pixmap. This gets rid of the annoying warning - when you close scribble.py. - - pointer types and unknown boxed types are now passed as Python - C objects in signal handlers. This is so wrappers for add on - widgets that use pointer arguments can write code to convert - the pointers to a more usable format. - - Changed the behaviour of the PyObject -> GtkArg routines so that - that they use python's conversion routines. Now you can pass a - class instance which has a __int__ method in place of an integer - in those routines (it implicitly uses int(o) on the instance). - - Added method GtkObject.emit, which acts like gtk_signal_emit. Now - widget.show() and widget.emit('show') are equivalent (although the - first is faster). Now you should be able to use rulers properly. - The specification is GtkObject.emit(signal_name, arg1, ...). It - returns whatever the signal handler was supposed to. The rulers - example in the testgtk.py program has been fixed, and gives an - example of the GtkObject.emit method. - - Added test of statusbar in testgtk.py. (The code was submited by - Andrew Kuchling ) - - Fixed hude memory leak in GdkEvent initialisation -- when adding - items to a dictionary with PyDict_SetItemString, the third argument - is INCREF'd. I was forgetting to DECREF it after finishing with - it. - - Added method GdkWindow.new_gc. It takes keyword arguments with - names matching the fields of the structure GdkGCValues, defined - in gdk/gdktypes.h. It creates a gc for that window with the - given attributes. Also, the GdkGC type now has the same attributes - as the GdkGCValues structure, and they can be read and set. - - Added a wrapper for the GdkColormap type. It can be accessed as a - sequence (eg len(cmap), a = cmap[42], print cmap[:10]). The - sequence items are colours. Also, the GtkStyle and GdkWindow types - now also have the attribute colormap, which can be used for accessing - the colormap. Also, the GdkColor type now has the attributes red, - green, blue and pixel. - The colormap also has a single method -- GdkColormap.alloc. It can - either be called with a string argument (a colour name), or three - integers (RGB components). It does the same thing as the function - color_alloc (in fact, color_alloc is now implemented using it). - -pygtk-0.4.3: 7-May-1998 - - Updated for gtk+-1.0.1. This version of pygtk will not work with - earlier versions. (You should upgrade anyway, since this version - plugs some security holes and memory leaks). - - Updated the GdkImlib module to take advntage of new features found - in Imlib 1.3. You can now save images into just about any format. - - Added the types GdkWindow and GdkGC. Also changed some of the - functions like gtk_widget_shape_combine_mask to take their correct - arguments. This will not break any code written with Gtkinter, - as I have put in backward compatibility. However, if you used any - of these functions in code that directly accessed the gtk module, - you may have to recode some of your work. - I have updated some of the testgtk.py examples. You will notice - that the toolbar example loads quicker, since the test.xpm is only - read off disk once. - - Added the gdk_draw_* functions, and wrote wrappers for them as - methods of the GtkDrawingArea class. See examples/simple/scribble.py - for an example of using pixmaps and the drawing area. - -pygtk-0.4.2: 22-April-1998 - - Updated for gtk+-1.0.0. Since there have been no API changes - between 0.99.10 and 1.0.0, it should work with that version as well. - - Updated the configure script. It now uses the gtk-config script to - work out the cflags and libraries for GTK. If gtk-config is not on - the path, you can pass configure an argument something like - --with-gtk-config=/subdir/gtk-config. - - You can now specify the path name for the python executable (if it - isn't on the path) with the --with-python=/subdir/python argument. - - There is now a 'make install' option. It should work with both - python 1.4 and 1.5.x. It defaults to installing scripts the - $(prefix)/lib/site-python, with $(prefix)/lib/python$(version) as - a backup, and shared modules in $(prefix)/lib/python$(version) - /site-packages with $(prefix)/lib/python$(version)/lib-dynload and - $(prefix)/lib/python$(version)/sharedmodules as backup locations. - It also checks that the directory is in python's search path before - making the choice. - If you have installed previous versions of pygtk, it is probably a - good idea to remove those files before running 'make install', as - the locations chosen by this routine may be different from where - you installed previous versions. - - Changed the gtk_init function slightly, so it doesn't immediately - call the gtk_*get_type functions, instead deferring this till the - first call to gtk_object_new. This shouldn't affect anyone's - programs, other than making loading slightly quicker. - - Also added support for return types for signals (this only breaks - compatibility if your handlers didn't return None or 0 or whatever). - You should now be able to do things like returning TRUE from a - delete_event signal handler to prevent a window being destroyed. - - Added some functions for GtkCurve's and GtkPreview's that were - previously missing. - - Fixed some of the typemap stuff. GtkAspectFrame, GtkToolQuery and - GtkCList.get_row_data now work properly. Also fixed a few similar - problems in GdkImlib. - -pygtk-0.4.1: 6-April-1998 - - This archive is slightly smaller than the previous version, because - I accidently included some unneeded files. (The package isn't - missing anything that is required). - - Updated for gtk+-0.99.9. Note that the previous version of pygtk - works fine with 0.99.9, so this release is mainly new features. - - There is now a mailing list for pygtk. To subscribe, send mail to - pygtk-request@daa.com.au, with the word subscribe in the body. - There is also a web site at http://www.daa.com.au/~james/pygtk/, - although it isn't very interesting yet. - - updated the examples/ide/gtkcons.py to take advantage of word - wrapping in the text widget. - - Added a function to export the Python types used in Gtkinter, so - other python bindings (such as the imlib one) can use them. - (It should be possible to do gnome bindings -- I will look at that - in a little while). - - Added support for gdk_imlib. Note that this does not change - what libraries are required to build Gtkinter. If you don't - have gdk_imlib, the configure script will notice, and decide not - to build support for it. If you have gdk_imlib, and don't want to - build it, you can pass configure the argument --without-imlib. - - Added the directory examples/imlib, and a simple multi format - image viewer called examples/imlib/view.py. This example requires - the imlib bindings to have been built. - -pygtk-0.4.0: 23-Mar-1998 - - Updated for gtk+-0.99.8, so won't work with older versions (although - your old pygtk programs will still work). - - Added support quit handlers and input handlers. - - Fixed a long standing bug in idle/timeout/quit function reactivation. - Before, in order for an idle or timeout function to be reactivated, - it needed to call idle_add or timeout_add again. Now they just have - to return TRUE (like in C). This simplifies these functions - substantially. The old behaviour still works. - If you are using gtk+-0.99.7, you will find that timeout handlers - don't work. This is caused by a bug in GTK, which was fixed in - gtk+-0.99.8. - - Found that GtkPixamp.__init__, GtkCList.set_pixtmap and GtkCList. - set_pixtext all kept references to the pixmaps when they shouldn't. - This is now fixed. - - Added the module GtkExtra, which contains some convenience routines - for writing pygtk programs. It includes an implementation of the - menu factory (allows creation of arbitrary sized menus with about - four function calls), and single function call interfaces for - handling message boxes, file selection dialogs and input boxes. - - Added the module GDK.py, that contains relevant constants from GDK. - It is automatically imported by Gtkinter, so it is possible to do - things like widget.set_events(GDK.ALL_EVENTS_MASK) - - Added a crude integrated development environment (pyide.py) that - pulls together the debugger, profiler, console and editor examples - in the examples/ide directory. - - Added a function colour_alloc (or color_alloc) that can be used to - allocate new colours for use in the text widget and others. - - Added the drag and drop functions (finally). Check the example in - testgtk.py for the details. - - Added GtkWidget.shape_combine_mask, which takes a pixmap as its first - argument, and uses its mask as the shape mask. - - Added the GtkCList.{set,get}_row_data functions. - -pygtk-0.3.0: 10-Mar-1998 - - Updated for gtk+-0.99.4. This means that it will not compile - properly with previous versions. These incompatibilities are - justified since according to the authors of gtk, gtk+-0.99.4 is - very close to what 1.0.0 will look like. - - Joined the reference counting revolution :) This doesn't affect - anyone's programs, since reference counting (like type casting) is - handled automatically by pygtk. - - Check out the examples/ide directory. It contains a Gtkinter front - end to the python debugger and profiler and also a graphical - python console (which now works with different fonts and everything. - - Added more of the functions I left out from previous versions. I - still haven't fiddled round with dnd yet. - - Fixed the gtk_object_get function (I had an '=' instead of a '=='). - You can now use Gtkinter objects as dictionaries. An example is - >>> win = GtkWindow(WINDOW_TOPLEVEL) - >>> # next line is equivalent to win['GtkWindow::title'] = 'a' - >>> win.set_title("a") - >>> win['GtkWindow::title'] - 'a' - - Added the object data facility. You can use GtkObject.set_data, - get_data and remove_data to manipulate it. - - Added gtk_window_set_icon and gtk_window_set_icon_name. They are - wrappers for the gdk counterparts. The functions are also exposed - in Gtkinter as GtkWindow.set_icon[_name]. The set_icon function - takes a GtkPixmap as its argumnet, extracts the GdkPixmap and mask - from it and calls gtk_object_sink on the GtkPixmap, in case it never - gets packed in another widget. - - Similar wrappers are given for GtkCList.set_pixmap and - GtkCList.set_pixtext. Once again, you pass a GtkPixmap instead of - a GdkPixmap/GdkBitmap pair. - -pygtk-0.2.0: 12-Feb-1998 - - Fixed tooltips properly this time. Now you need to keep a reference - to the GtkTooltips object for as long as you want to display those - tips. - - Added the example examples/testgtk/testgtk.py. This is a - translation of the example with the same name that comes with the - gtk distribution. The plus side of this is that I found and fixed - many bits of pygtk that were either broken or missing. (eg. - getting the selection of a list, connecting signals for a toolbar) - - Added an example of using trees (examples/ide/browse.py). This one - shows how you might set up a file manager where you only create - as much of the tree as you are using. - - Altered the signal handling behaviour so that the arguments to - a signal handler are converted to their Gtkinter equivalents. - - Pygtk should be complete enough for writing applications the size of - ones you might use guile-gtk for, and as far as I know is the most - complete out of the other python-gtk bindings I know of. - -pygtk-0.1.1: 4-Feb-1998 - - I accidentally broke tooltips in the previous version in such a way - that you would get a seg fault when creating a GtkTooltips object. - This has been fixed. - - Added a new example called gtkcons.py. This is a simple interactive - Python session in a GTK window. Currently it has some bugs, the - most prominent being that the first character of output from a - command remains hidden until the next command is executed. It - also demonstrates GtkHandleBox's. - -pygtk-0.1.0: 2-Feb-1998 - - Changed the copyright to LGPL. (There is no point in making it - more free, since this is the lisence on GTK itself). - - Integrated some changes sent in by Neil Schemenauer - . (Mainly spelling mistakes in - Gtkinter.py, and a number of extra examples). The new examples - are TAppli*.py and notebook.py. - - Updated package for gtk+-0.99.3. (updates include addition of - GtkCList, GtkCombo, GtkHandleBox, GtkStatusbar and GtkToolbar). - - Updated the GTK.py, the constants module. - - Updated the GtkStyle and GdkEvent types. You can now get the - different colours of a style, and you can access the relevant - information associated with a given type of GdkEvent. This means - that you can now use signals that look at button clicks or key - strokes. - - Added support for GtkAcceleratorTable and GtkTooltips in - Gtkinter.py. The types GdkColor, GdkEvent, GdkFont and GtkStyle - don't have wrappers, but are clean enough to be used without any. - - Added the GtkText.insert method. There is also a - GtkText.insert_defaults that takes a single string argument. - -pygtk-0.0.2: 21-Jan-1998 - - Added file Gtkinter.py. This gives an object oriented - interface to gtk accessable from Python. This is still not - quite complete. - - Added some example programs in the examples directory - - Decided to release the code -- I wonder if anyone will use it? - -pygtk-0.0.1: (never released) - - first release - - contains basic functionality of gtk through use of SWIG diff --git a/PKG-INFO.in b/PKG-INFO.in deleted file mode 100644 index bda78b98..00000000 --- a/PKG-INFO.in +++ /dev/null @@ -1,25 +0,0 @@ -Metadata-Version: 1.0 -Name: PyGTK -Version: @VERSION@ -Summary: Python bindings for GTK -Home-page: http://www.pygtk.org/ -Author: James Henstridge -Author-email: james@daa.com.au -Maintainer: Johan Dahlin -Maintainer-email: johan@gnome.org -License: GNU LGPL -Download-url: ftp://ftp.gnome.org/pub/GNOME/sources/pygtk/@PYGTK_MAJOR_VERSION@.@PYGTK_MINOR_VERSION@/pygtk-@VERSION@.tar.gz -Description: PyGTK allows you to write full featured GTK programs in - Python. It is targetted at GTK 2.x, and can be used in - conjunction with gnome-python to write Gnome applications. -Platform: POSIX, Windows -Classifier: Development Status :: 5 - Production/Stable -Classifier: Environment :: X11 Applications :: GTK -Classifier: Environment :: Win32 (MS Windows) -Classifier: Intended Audience :: Developers -Classifier: License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL) -Classifier: Operating System :: POSIX -Classifier: Operating System :: Microsoft :: Windows -Classifier: Programming Language :: C -Classifier: Programming Language :: Python -Classifier: Topic :: Software Development :: Libraries :: Python Modules diff --git a/README b/README deleted file mode 100644 index 5ab4890a..00000000 --- a/README +++ /dev/null @@ -1,129 +0,0 @@ -PyGTK -===== -Original author: James Henstridge -Current maintainer: Johan Dahlin - -This archive contains modules that allow you to use gtk in Python -programs. At present, it is a fairly complete set of bindings. -Despite the low version number, this piece of software is quite -useful, and is usable to write moderately complex programs. (see the -examples directory for some examples of the simpler programs you could -write). - -If you have any enhancements or bug reports, please file them in -bugzilla at: - http://bugzilla.gnome.org/enter_bug.cgi?product=pygtk - -If you have a patch, file the bug first and then use the "create new -attachment" link on the bug's info page. My preferred format for -patches is unified diff format (ie. diff -u). Please don't send me -diffs which don't have any context, as these make it very difficult to -see what the patch does. - -What's new in PyGTK 2.10 -======================== - -See the wiki page for an overview of the features in PyGTK 2.10: - -http://live.gnome.org/PyGTK/WhatsNew210 - -New Versions -============ - -New versions of this package can be found at: - http://ftp.gnome.org/pub/GNOME/sources/pygtk/ - - -Mailing list -============ - -There is a mailing list for pygtk. You can subscribe to it through -the web interface: - http://www.daa.com.au/mailman/listinfo/pygtk - - -Requirements -============ - * C compiler (GCC and MSVC supported) - * Python 2.3.5 or higher - * PyGObject 2.12.1 or higher - * Glib 2.8.0 or higher - * GTK+ 2.8.0 or higher (optional) or - GTK+ 2.10.0 or higher for 2.10 API - * libglade 2.5.0 or higher (optional) - * pycairo 0.5.0 or higher (optional) - * Numeric (optional) - -This release is supporting the following GTK+ releases: - - 2.8.x - 2.10.x - -To include support for the 2.10 API you'll need GTK+ 2.10.0 etc. - -Copyright Information -===================== - -This software is covered by the GNU Lesser General Public Licence -(version 2.1, or if you choose, a later version). Basically just don't -say you wrote bits you didn't. - -Compilation -=========== - -PyGTK uses the standard autotools for the build infrastructure. To -build, it should be as simple as running: - - $ ./configure --prefix= - $ make - $ make install - -If your Python interpreter isn't in the path, or is not called -"python", you can set the PYTHON environment variable to the full path -of the interpreter: - - $ PYTHON=/prefix/bin/python - $ export PYTHON - -If configure can't find GTK+, you may need to set the PKG_CONFIG_PATH -environment variable to help it find the libraries. - -The "make install" target will generate normal and optimised bytecode -for all the .py files. - -Note. If you're installing to another prefix than the one where python -is installed you'll need to set the PYTHONPATH variable to the -$prefix/lib/pythonX.Y/site-packages directory created by -the PyGTK installation. - -Upgrading from 0.6.x -==================== - -The API has changed a fair bit compared to the 0.6.x releases of pygtk -in response to feedback from the mailing list. The main changes are: - - no low level procedural interface. The extension now implements - the object oriented API directly, rather than layering it on top - of a procedural API. - - class names have been shortened. Eg. instead of gtk.GtkWindow, we - now have gtk.Window. - - GDK classes and functions have been moved to the "gtk.gdk" module. - - the GTK and GDK modules have been removed, with their constants - being moved into the "gtk" and "gtk.gdk" modules. - - -Tests -===== - -After having compiled and installed pygtk, you may want to test them. -There are a number of example programs available in the examples/ -subdirectory. - - -Getting Help -============ - -If you have questions about programming with PyGTK, you might want to -send a message to the mailing list (information on subscribing is -above). Alternatively, your question may be answered in the FAQ: - - http://www.async.com.br/faq/pygtk/?req=index diff --git a/THREADS b/THREADS deleted file mode 100644 index f45b2b16..00000000 --- a/THREADS +++ /dev/null @@ -1,119 +0,0 @@ --*- mode: text; mode: auto-fill -*- - -Requirements to get threading to work with pygtk2 -================================================= - -Python side ------------ -* Python has a global interpreter lock, so no two threads can execute - code at the same time. - -* In order to execute python code, you need to hold the interpreter - lock, and have the correct PyThreadState object set - (PyThreadState_Swap is used for this). As a convenience, the - following functions can be used: - void PyEval_AcquireThread(PyThreadState *tstate); - void PyEval_ReleaseThread(PyThreadState *tstate); - -* When C functions are called from python, the global interpreter lock - is held. If the function blocks, then no python code can execute in - other threads during this time. Python provides two macros to allow - threads to run while the function executes: - Py_BEGIN_ALLOW_THREADS - Py_END_ALLOW_THREADS - between these two macro calls, the global interpreter lock is - released, and the current thread state is set to NULL. This means - that in order to execute python code, AcquireThread must be called. - -GLib side ---------- -* The glib main loop function blocks, so we need to allow threads so - that other threads don't hang while in the event loop. - -* Destroy notifies and signal handlers may be called in response to - some function call (such as GObject.set_data or GtkButton.clicked), - or while the main loop is running. In the first case, the global - interpreter lock will be held, and a thread state will be acquired. - In the second case, the global interpreter lock will not be held by - us and there will be a NULL thread state. Example: ----- Cut Here ---- - import gtk - ... - b = gtk.GtkButton("Click me") - def f(button): - ... some python code ... - b.connect("clicked", f) - b.clicked() # the signal handler f is called with the interpreter - # lock held - ... - gtk.main() # if the button is clicked while in the main loop, the - # interpreter lock may be held by someone else ----- Cut Here ---- - -* We need to have a valid thread state before executing one of these - callbacks, or bad things happen. - -* Ideally, the solution chosen should work at the GObject level, - rather than GTK/GDK level. - -* In gtk 1.2 based PyGTK, we used a bit of code from Paul Fisher to - handle this problem. It relied on the global GDK lock to serialise - requests to unblock threading. As the GObject functions do not rely - on a global lock being held, we can't use this. Here is the - existing code: ----- Cut Here ---- -/* The threading code has been enhanced to be a little better with multiple - * threads accessing GTK+. Here are some notes on the changes by - * Paul Fisher: - * - * If threading is enabled, we create a recursive version of Python's - * global interpreter mutex using TSD. This scheme makes it possible, - * although rather hackish, for any thread to make a call into PyGTK, - * as long as the GDK lock is held (that is, Python code is wrapped - * around a threads_{enter,leave} pair). - * - * A viable alternative would be to wrap each and every GTK call, at - * the Python/C level, with Py_{BEGIN,END}_ALLOW_THREADS. However, - * given the nature of Python threading, this option is not - * particularly appealing. - */ - -static GStaticPrivate pythreadstate_key = G_STATIC_PRIVATE_INIT; -static GStaticPrivate counter_key = G_STATIC_PRIVATE_INIT; - -/* The global Python lock will be grabbed by Python when entering a - * Python/C function; thus, the initial lock count will always be one. - */ -# define INITIAL_LOCK_COUNT 1 -# define PyGTK_BLOCK_THREADS \ - { \ - gint counter = GPOINTER_TO_INT(g_static_private_get(&counter_key)); \ - if (counter == -INITIAL_LOCK_COUNT) { \ - PyThreadState *_save; \ - _save = g_static_private_get(&pythreadstate_key); \ - Py_BLOCK_THREADS; \ - } \ - counter++; \ - g_static_private_set(&counter_key, GINT_TO_POINTER(counter), NULL); \ - } - -# define PyGTK_UNBLOCK_THREADS \ - { \ - gint counter = GPOINTER_TO_INT(g_static_private_get(&counter_key)); \ - counter--; \ - if (counter == -INITIAL_LOCK_COUNT) { \ - PyThreadState *_save; \ - Py_UNBLOCK_THREADS; \ - g_static_private_set(&pythreadstate_key, _save, NULL); \ - } \ - g_static_private_set(&counter_key, GINT_TO_POINTER(counter), NULL); \ - } ----- Cut Here ---- - -* One possible solution is to wrap every single pygtk call in - Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS calls. This would - probably be quite slow. - -* Can Paul Fisher's code be modified to work without needing the GDK - lock for serialisation? - diff --git a/TODO b/TODO deleted file mode 100644 index bc578301..00000000 --- a/TODO +++ /dev/null @@ -1,12 +0,0 @@ -This list is out of date. Query bugzilla.gnome.org for an up to date -list. - -Things to do for the gtk 2.0 based release - -- fix up threading to work with GObject/GSignal/GClosure. See the - THREADS file for more info on what is required. - -- Implement a new PyGtkTreeModel GObject type that can be the base for - new tree models defined in Python. Need to look at how the - GtkTreeIter->tree_node lifetime is handled, as it doesn't look like - anything is called to let us know that that data should be unrefed. diff --git a/atk-types.defs b/atk-types.defs deleted file mode 100644 index becb6ed2..00000000 --- a/atk-types.defs +++ /dev/null @@ -1,403 +0,0 @@ -;; -*- scheme -*- -; object definitions ... -(define-object Hyperlink - (in-module "Atk") - (parent "GObject") - (c-name "AtkHyperlink") - (gtype-id "ATK_TYPE_HYPERLINK") -) - -(define-object GObjectAccessible - (in-module "Atk") - (parent "AtkObject") - (c-name "AtkGObjectAccessible") - (gtype-id "ATK_TYPE_GOBJECT_ACCESSIBLE") -) - -(define-object Object - (in-module "Atk") - (parent "GObject") - (c-name "AtkObject") - (gtype-id "ATK_TYPE_OBJECT") -) - -(define-object NoOpObject - (in-module "Atk") - (parent "AtkObject") - (c-name "AtkNoOpObject") - (gtype-id "ATK_TYPE_NO_OP_OBJECT") -) - -(define-object ObjectFactory - (in-module "Atk") - (parent "GObject") - (c-name "AtkObjectFactory") - (gtype-id "ATK_TYPE_OBJECT_FACTORY") -) - -(define-object NoOpObjectFactory - (in-module "Atk") - (parent "AtkObjectFactory") - (c-name "AtkNoOpObjectFactory") - (gtype-id "ATK_TYPE_NO_OP_OBJECT_FACTORY") -) - -(define-object Registry - (in-module "Atk") - (parent "GObject") - (c-name "AtkRegistry") - (gtype-id "ATK_TYPE_REGISTRY") -) - -(define-object Relation - (in-module "Atk") - (parent "GObject") - (c-name "AtkRelation") - (gtype-id "ATK_TYPE_RELATION") -) - -(define-object RelationSet - (in-module "Atk") - (parent "GObject") - (c-name "AtkRelationSet") - (gtype-id "ATK_TYPE_RELATION_SET") -) - -(define-object StateSet - (in-module "Atk") - (parent "GObject") - (c-name "AtkStateSet") - (gtype-id "ATK_TYPE_STATE_SET") -) - -(define-object Util - (in-module "Atk") - (parent "GObject") - (c-name "AtkUtil") - (gtype-id "ATK_TYPE_UTIL") -) - -(define-interface Action - (in-module "Atk") - (c-name "AtkAction") - (gtype-id "ATK_TYPE_ACTION") -) - -(define-interface Component - (in-module "Atk") - (c-name "AtkComponent") - (gtype-id "ATK_TYPE_COMPONENT") -) - -(define-interface Document - (in-module "Atk") - (c-name "AtkDocument") - (gtype-id "ATK_TYPE_DOCUMENT") -) - -(define-interface EditableText - (in-module "Atk") - (c-name "AtkEditableText") - (gtype-id "ATK_TYPE_EDITABLE_TEXT") -) - -(define-interface Hypertext - (in-module "Atk") - (c-name "AtkHypertext") - (gtype-id "ATK_TYPE_HYPERTEXT") -) - -(define-interface Image - (in-module "Atk") - (c-name "AtkImage") - (gtype-id "ATK_TYPE_IMAGE") -) - -(define-interface ImplementorIface - (in-module "Atk") - (c-name "AtkImplementorIface") - (gtype-id "ATK_TYPE_IMPLEMENTOR") -) - -(define-interface Selection - (in-module "Atk") - (c-name "AtkSelection") - (gtype-id "ATK_TYPE_SELECTION") -) - -(define-interface StreamableContent - (in-module "Atk") - (c-name "AtkStreamableContent") - (gtype-id "ATK_TYPE_STREAMABLE_CONTENT") -) - -(define-interface Table - (in-module "Atk") - (c-name "AtkTable") - (gtype-id "ATK_TYPE_TABLE") -) - -(define-interface Text - (in-module "Atk") - (c-name "AtkText") - (gtype-id "ATK_TYPE_TEXT") -) - -(define-interface Value - (in-module "Atk") - (c-name "AtkValue") - (gtype-id "ATK_TYPE_VALUE") -) - -(define-boxed Rectangle - (in-module "Atk") - (c-name "AtkRectangle") - (gtype-id "ATK_TYPE_RECTANGLE") - (fields - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -;; Enumerations and flags ... - -(define-enum Role - (in-module "Atk") - (c-name "AtkRole") - (gtype-id "ATK_TYPE_ROLE") - (values - '("invalid" "ATK_ROLE_INVALID") - '("accel-label" "ATK_ROLE_ACCEL_LABEL") - '("alert" "ATK_ROLE_ALERT") - '("animation" "ATK_ROLE_ANIMATION") - '("arrow" "ATK_ROLE_ARROW") - '("calendar" "ATK_ROLE_CALENDAR") - '("canvas" "ATK_ROLE_CANVAS") - '("check-box" "ATK_ROLE_CHECK_BOX") - '("check-menu-item" "ATK_ROLE_CHECK_MENU_ITEM") - '("color-chooser" "ATK_ROLE_COLOR_CHOOSER") - '("column-header" "ATK_ROLE_COLUMN_HEADER") - '("combo-box" "ATK_ROLE_COMBO_BOX") - '("date-editor" "ATK_ROLE_DATE_EDITOR") - '("desktop-icon" "ATK_ROLE_DESKTOP_ICON") - '("desktop-frame" "ATK_ROLE_DESKTOP_FRAME") - '("dial" "ATK_ROLE_DIAL") - '("dialog" "ATK_ROLE_DIALOG") - '("directory-pane" "ATK_ROLE_DIRECTORY_PANE") - '("drawing-area" "ATK_ROLE_DRAWING_AREA") - '("file-chooser" "ATK_ROLE_FILE_CHOOSER") - '("filler" "ATK_ROLE_FILLER") - '("font-chooser" "ATK_ROLE_FONT_CHOOSER") - '("frame" "ATK_ROLE_FRAME") - '("glass-pane" "ATK_ROLE_GLASS_PANE") - '("html-container" "ATK_ROLE_HTML_CONTAINER") - '("icon" "ATK_ROLE_ICON") - '("image" "ATK_ROLE_IMAGE") - '("internal-frame" "ATK_ROLE_INTERNAL_FRAME") - '("label" "ATK_ROLE_LABEL") - '("layered-pane" "ATK_ROLE_LAYERED_PANE") - '("list" "ATK_ROLE_LIST") - '("list-item" "ATK_ROLE_LIST_ITEM") - '("menu" "ATK_ROLE_MENU") - '("menu-bar" "ATK_ROLE_MENU_BAR") - '("menu-item" "ATK_ROLE_MENU_ITEM") - '("option-pane" "ATK_ROLE_OPTION_PANE") - '("page-tab" "ATK_ROLE_PAGE_TAB") - '("page-tab-list" "ATK_ROLE_PAGE_TAB_LIST") - '("panel" "ATK_ROLE_PANEL") - '("password-text" "ATK_ROLE_PASSWORD_TEXT") - '("popup-menu" "ATK_ROLE_POPUP_MENU") - '("progress-bar" "ATK_ROLE_PROGRESS_BAR") - '("push-button" "ATK_ROLE_PUSH_BUTTON") - '("radio-button" "ATK_ROLE_RADIO_BUTTON") - '("radio-menu-item" "ATK_ROLE_RADIO_MENU_ITEM") - '("root-pane" "ATK_ROLE_ROOT_PANE") - '("row-header" "ATK_ROLE_ROW_HEADER") - '("scroll-bar" "ATK_ROLE_SCROLL_BAR") - '("scroll-pane" "ATK_ROLE_SCROLL_PANE") - '("separator" "ATK_ROLE_SEPARATOR") - '("slider" "ATK_ROLE_SLIDER") - '("split-pane" "ATK_ROLE_SPLIT_PANE") - '("spin-button" "ATK_ROLE_SPIN_BUTTON") - '("statusbar" "ATK_ROLE_STATUSBAR") - '("table" "ATK_ROLE_TABLE") - '("table-cell" "ATK_ROLE_TABLE_CELL") - '("table-column-header" "ATK_ROLE_TABLE_COLUMN_HEADER") - '("table-row-header" "ATK_ROLE_TABLE_ROW_HEADER") - '("tear-off-menu-item" "ATK_ROLE_TEAR_OFF_MENU_ITEM") - '("terminal" "ATK_ROLE_TERMINAL") - '("text" "ATK_ROLE_TEXT") - '("toggle-button" "ATK_ROLE_TOGGLE_BUTTON") - '("tool-bar" "ATK_ROLE_TOOL_BAR") - '("tool-tip" "ATK_ROLE_TOOL_TIP") - '("tree" "ATK_ROLE_TREE") - '("tree-table" "ATK_ROLE_TREE_TABLE") - '("unknown" "ATK_ROLE_UNKNOWN") - '("viewport" "ATK_ROLE_VIEWPORT") - '("window" "ATK_ROLE_WINDOW") - '("last-defined" "ATK_ROLE_LAST_DEFINED") - ) -) - -(define-enum Layer - (in-module "Atk") - (c-name "AtkLayer") - (gtype-id "ATK_TYPE_LAYER") - (values - '("invalid" "ATK_LAYER_INVALID") - '("background" "ATK_LAYER_BACKGROUND") - '("canvas" "ATK_LAYER_CANVAS") - '("widget" "ATK_LAYER_WIDGET") - '("mdi" "ATK_LAYER_MDI") - '("popup" "ATK_LAYER_POPUP") - '("overlay" "ATK_LAYER_OVERLAY") - ) -) - -(define-enum RelationType - (in-module "Atk") - (c-name "AtkRelationType") - (gtype-id "ATK_TYPE_RELATION_TYPE") - (values - '("null" "ATK_RELATION_NULL") - '("controlled-by" "ATK_RELATION_CONTROLLED_BY") - '("controller-for" "ATK_RELATION_CONTROLLER_FOR") - '("label-for" "ATK_RELATION_LABEL_FOR") - '("labelled-by" "ATK_RELATION_LABELLED_BY") - '("member-of" "ATK_RELATION_MEMBER_OF") - '("node-child-of" "ATK_RELATION_NODE_CHILD_OF") - '("last-defined" "ATK_RELATION_LAST_DEFINED") - ) -) - -(define-enum StateType - (in-module "Atk") - (c-name "AtkStateType") - (gtype-id "ATK_TYPE_STATE_TYPE") - (values - '("invalid" "ATK_STATE_INVALID") - '("active" "ATK_STATE_ACTIVE") - '("armed" "ATK_STATE_ARMED") - '("busy" "ATK_STATE_BUSY") - '("checked" "ATK_STATE_CHECKED") - '("defunct" "ATK_STATE_DEFUNCT") - '("editable" "ATK_STATE_EDITABLE") - '("enabled" "ATK_STATE_ENABLED") - '("expandable" "ATK_STATE_EXPANDABLE") - '("expanded" "ATK_STATE_EXPANDED") - '("focusable" "ATK_STATE_FOCUSABLE") - '("focused" "ATK_STATE_FOCUSED") - '("horizontal" "ATK_STATE_HORIZONTAL") - '("iconified" "ATK_STATE_ICONIFIED") - '("modal" "ATK_STATE_MODAL") - '("multi-line" "ATK_STATE_MULTI_LINE") - '("multiselectable" "ATK_STATE_MULTISELECTABLE") - '("opaque" "ATK_STATE_OPAQUE") - '("pressed" "ATK_STATE_PRESSED") - '("resizable" "ATK_STATE_RESIZABLE") - '("selectable" "ATK_STATE_SELECTABLE") - '("selected" "ATK_STATE_SELECTED") - '("sensitive" "ATK_STATE_SENSITIVE") - '("showing" "ATK_STATE_SHOWING") - '("single-line" "ATK_STATE_SINGLE_LINE") - '("stale" "ATK_STATE_STALE") - '("transient" "ATK_STATE_TRANSIENT") - '("vertical" "ATK_STATE_VERTICAL") - '("visible" "ATK_STATE_VISIBLE") - '("last-defined" "ATK_STATE_LAST_DEFINED") - ) -) - -(define-enum TextAttribute - (in-module "Atk") - (c-name "AtkTextAttribute") - (gtype-id "ATK_TYPE_TEXT_ATTRIBUTE") - (values - '("left-margin" "ATK_TEXT_ATTR_LEFT_MARGIN") - '("right-margin" "ATK_TEXT_ATTR_RIGHT_MARGIN") - '("indent" "ATK_TEXT_ATTR_INDENT") - '("invisible" "ATK_TEXT_ATTR_INVISIBLE") - '("editable" "ATK_TEXT_ATTR_EDITABLE") - '("pixels-above-lines" "ATK_TEXT_ATTR_PIXELS_ABOVE_LINES") - '("pixels-below-lines" "ATK_TEXT_ATTR_PIXELS_BELOW_LINES") - '("pixels-inside-wrap" "ATK_TEXT_ATTR_PIXELS_INSIDE_WRAP") - '("bg-full-height" "ATK_TEXT_ATTR_BG_FULL_HEIGHT") - '("rise" "ATK_TEXT_ATTR_RISE") - '("underline" "ATK_TEXT_ATTR_UNDERLINE") - '("strikethrough" "ATK_TEXT_ATTR_STRIKETHROUGH") - '("size" "ATK_TEXT_ATTR_SIZE") - '("scale" "ATK_TEXT_ATTR_SCALE") - '("weight" "ATK_TEXT_ATTR_WEIGHT") - '("language" "ATK_TEXT_ATTR_LANGUAGE") - '("family-name" "ATK_TEXT_ATTR_FAMILY_NAME") - '("bg-color" "ATK_TEXT_ATTR_BG_COLOR") - '("fg-color" "ATK_TEXT_ATTR_FG_COLOR") - '("bg-stipple" "ATK_TEXT_ATTR_BG_STIPPLE") - '("fg-stipple" "ATK_TEXT_ATTR_FG_STIPPLE") - '("wrap-mode" "ATK_TEXT_ATTR_WRAP_MODE") - '("direction" "ATK_TEXT_ATTR_DIRECTION") - '("justification" "ATK_TEXT_ATTR_JUSTIFICATION") - '("stretch" "ATK_TEXT_ATTR_STRETCH") - '("variant" "ATK_TEXT_ATTR_VARIANT") - '("style" "ATK_TEXT_ATTR_STYLE") - ) -) - -(define-enum TextBoundary - (in-module "Atk") - (c-name "AtkTextBoundary") - (gtype-id "ATK_TYPE_TEXT_BOUNDARY") - (values - '("char" "ATK_TEXT_BOUNDARY_CHAR") - '("word-start" "ATK_TEXT_BOUNDARY_WORD_START") - '("word-end" "ATK_TEXT_BOUNDARY_WORD_END") - '("sentence-start" "ATK_TEXT_BOUNDARY_SENTENCE_START") - '("sentence-end" "ATK_TEXT_BOUNDARY_SENTENCE_END") - '("line-start" "ATK_TEXT_BOUNDARY_LINE_START") - '("line-end" "ATK_TEXT_BOUNDARY_LINE_END") - ) -) - -(define-enum KeyEventType - (in-module "Atk") - (c-name "AtkKeyEventType") - (gtype-id "ATK_TYPE_KEY_EVENT_TYPE") - (values - '("press" "ATK_KEY_EVENT_PRESS") - '("release" "ATK_KEY_EVENT_RELEASE") - '("last-defined" "ATK_KEY_EVENT_LAST_DEFINED") - ) -) - -(define-enum CoordType - (in-module "Atk") - (c-name "AtkCoordType") - (gtype-id "ATK_TYPE_COORD_TYPE") - (values - '("screen" "ATK_XY_SCREEN") - '("window" "ATK_XY_WINDOW") - ) -) -(define-flags HyperlinkStateFlags - (in-module "Atk") - (c-name "AtkHyperlinkStateFlags") - (gtype-id "ATK_TYPE_HYPERLINK_STATE_FLAGS") - (values - '("e" "ATK_HYPERLINK_IS_INLINE") - ) -) - -(define-enum TextClipType - (in-module "Atk") - (c-name "AtkTextClipType") - (gtype-id "ATK_TYPE_TEXT_CLIP_TYPE") - (values - '("none" "ATK_TEXT_CLIP_NONE") - '("min" "ATK_TEXT_CLIP_MIN") - '("max" "ATK_TEXT_CLIP_MAX") - '("both" "ATK_TEXT_CLIP_BOTH") - ) -) - diff --git a/atk.defs b/atk.defs deleted file mode 100644 index 191b0f6d..00000000 --- a/atk.defs +++ /dev/null @@ -1,3018 +0,0 @@ -;; -*- scheme -*- - -(include "atk-types.defs") - -;; From atk-enum-types.h - -(define-function hyperlink_state_flags_get_type - (c-name "atk_hyperlink_state_flags_get_type") - (return-type "GType") -) - -(define-function role_get_type - (c-name "atk_role_get_type") - (return-type "GType") -) - -(define-function layer_get_type - (c-name "atk_layer_get_type") - (return-type "GType") -) - -(define-function relation_type_get_type - (c-name "atk_relation_type_get_type") - (return-type "GType") -) - -(define-function state_type_get_type - (c-name "atk_state_type_get_type") - (return-type "GType") -) - -(define-function text_attribute_get_type - (c-name "atk_text_attribute_get_type") - (return-type "GType") -) - -(define-function text_boundary_get_type - (c-name "atk_text_boundary_get_type") - (return-type "GType") -) - -(define-function text_clip_type_get_type - (c-name "atk_text_clip_type_get_type") - (return-type "GType") -) - -(define-function key_event_type_get_type - (c-name "atk_key_event_type_get_type") - (return-type "GType") -) - -(define-function coord_type_get_type - (c-name "atk_coord_type_get_type") - (return-type "GType") -) - - - -;; From /usr/include/atk-1.0/atk/atkaction.h - -(define-function atk_action_get_type - (c-name "atk_action_get_type") - (return-type "GType") - (parameters - ) -) - -(define-method do_action - (of-object "AtkAction") - (c-name "atk_action_do_action") - (return-type "gboolean") - (parameters - '("gint" "i") - ) -) - -(define-method get_n_actions - (of-object "AtkAction") - (c-name "atk_action_get_n_actions") - (return-type "gint") -) - -(define-method get_description - (of-object "AtkAction") - (c-name "atk_action_get_description") - (return-type "const-gchar*") - (parameters - '("gint" "i") - ) -) - -(define-method get_name - (of-object "AtkAction") - (c-name "atk_action_get_name") - (return-type "const-gchar*") - (parameters - '("gint" "i") - ) -) - -(define-method get_keybinding - (of-object "AtkAction") - (c-name "atk_action_get_keybinding") - (return-type "const-gchar*") - (parameters - '("gint" "i") - ) -) - -(define-method set_description - (of-object "AtkAction") - (c-name "atk_action_set_description") - (return-type "gboolean") - (parameters - '("gint" "i") - '("const-gchar*" "desc") - ) -) - -(define-method get_localized_name - (of-object "AtkAction") - (c-name "atk_action_get_localized_name") - (return-type "const-gchar*") - (parameters - '("gint" "i") - ) -) - -(define-virtual do_action - (of-object "AtkAction") - (return-type "gboolean") - (parameters - '("gint" "i") - ) -) - -(define-virtual get_n_actions - (of-object "AtkAction") - (return-type "gint") -) - -(define-virtual get_description - (of-object "AtkAction") - (return-type "const-gchar*") - (parameters - '("gint" "i") - ) -) - -(define-virtual get_name - (of-object "AtkAction") - (return-type "const-gchar*") - (parameters - '("gint" "i") - ) -) - -(define-virtual get_keybinding - (of-object "AtkAction") - (return-type "const-gchar*") - (parameters - '("gint" "i") - ) -) - -(define-virtual set_description - (of-object "AtkAction") - (return-type "gboolean") - (parameters - '("gint" "i") - '("const-gchar*" "desc") - ) -) - -(define-virtual get_localized_name - (of-object "AtkAction") - (return-type "const-gchar*") - (parameters - '("gint" "i") - ) -) - - - -;; From /usr/include/atk-1.0/atk/atkcomponent.h - -(define-function atk_component_get_type - (c-name "atk_component_get_type") - (return-type "GType") - (parameters - ) -) - -(define-method add_focus_handler - (of-object "AtkComponent") - (c-name "atk_component_add_focus_handler") - (return-type "guint") - (parameters - '("AtkFocusHandler" "handler") - ) -) - -(define-method contains - (of-object "AtkComponent") - (c-name "atk_component_contains") - (return-type "gboolean") - (parameters - '("gint" "x") - '("gint" "y") - '("AtkCoordType" "coord_type") - ) -) - -(define-method ref_accessible_at_point - (of-object "AtkComponent") - (c-name "atk_component_ref_accessible_at_point") - (return-type "AtkObject*") - (parameters - '("gint" "x") - '("gint" "y") - '("AtkCoordType" "coord_type") - ) -) - -(define-method get_extents - (of-object "AtkComponent") - (c-name "atk_component_get_extents") - (return-type "none") - (parameters - '("gint*" "x") - '("gint*" "y") - '("gint*" "width") - '("gint*" "height") - '("AtkCoordType" "coord_type") - ) -) - -(define-method get_position - (of-object "AtkComponent") - (c-name "atk_component_get_position") - (return-type "none") - (parameters - '("gint*" "x") - '("gint*" "y") - '("AtkCoordType" "coord_type") - ) -) - -(define-method get_size - (of-object "AtkComponent") - (c-name "atk_component_get_size") - (return-type "none") - (parameters - '("gint*" "width") - '("gint*" "height") - ) -) - -(define-method grab_focus - (of-object "AtkComponent") - (c-name "atk_component_grab_focus") - (return-type "gboolean") -) - -(define-method remove_focus_handler - (of-object "AtkComponent") - (c-name "atk_component_remove_focus_handler") - (return-type "none") - (parameters - '("guint" "handler_id") - ) -) - -(define-method set_extents - (of-object "AtkComponent") - (c-name "atk_component_set_extents") - (return-type "gboolean") - (parameters - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("AtkCoordType" "coord_type") - ) -) - -(define-method set_position - (of-object "AtkComponent") - (c-name "atk_component_set_position") - (return-type "gboolean") - (parameters - '("gint" "x") - '("gint" "y") - '("AtkCoordType" "coord_type") - ) -) - -(define-method set_size - (of-object "AtkComponent") - (c-name "atk_component_set_size") - (return-type "gboolean") - (parameters - '("gint" "width") - '("gint" "height") - ) -) - -(define-function rectangle_get_type - (c-name "atk_rectangle_get_type") - (return-type "GType") -) - -(define-method get_layer - (of-object "AtkComponent") - (c-name "atk_component_get_layer") - (return-type "AtkLayer") -) - -(define-method get_mdi_zorder - (of-object "AtkComponent") - (c-name "atk_component_get_mdi_zorder") - (return-type "gint") -) - -(define-virtual add_focus_handler - (of-object "AtkComponent") - (return-type "guint") - (parameters - '("AtkFocusHandler" "handler") - ) -) - -(define-virtual contains - (of-object "AtkComponent") - (return-type "gboolean") - (parameters - '("gint" "x") - '("gint" "y") - '("AtkCoordType" "coord_type") - ) -) - -(define-virtual ref_accessible_at_point - (of-object "AtkComponent") - (return-type "AtkObject*") - (parameters - '("gint" "x") - '("gint" "y") - '("AtkCoordType" "coord_type") - ) -) - -(define-virtual get_extents - (of-object "AtkComponent") - (return-type "none") - (parameters - '("gint*" "x") - '("gint*" "y") - '("gint*" "width") - '("gint*" "height") - '("AtkCoordType" "coord_type") - ) -) - -(define-virtual get_position - (of-object "AtkComponent") - (return-type "none") - (parameters - '("gint*" "x") - '("gint*" "y") - '("AtkCoordType" "coord_type") - ) -) - -(define-virtual get_size - (of-object "AtkComponent") - (return-type "none") - (parameters - '("gint*" "width") - '("gint*" "height") - ) -) - -(define-virtual grab_focus - (of-object "AtkComponent") - (return-type "gboolean") -) - -(define-virtual remove_focus_handler - (of-object "AtkComponent") - (return-type "none") - (parameters - '("guint" "handler_id") - ) -) - -(define-virtual set_extents - (of-object "AtkComponent") - (return-type "gboolean") - (parameters - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("AtkCoordType" "coord_type") - ) -) - -(define-virtual set_position - (of-object "AtkComponent") - (return-type "gboolean") - (parameters - '("gint" "x") - '("gint" "y") - '("AtkCoordType" "coord_type") - ) -) - -(define-virtual set_size - (of-object "AtkComponent") - (return-type "gboolean") - (parameters - '("gint" "width") - '("gint" "height") - ) -) - -(define-virtual get_layer - (of-object "AtkComponent") - (return-type "AtkLayer") -) - -(define-virtual get_mdi_zorder - (of-object "AtkComponent") - (return-type "gint") -) - -(define-virtual bounds_changed - (of-object "AtkComponent") - (return-type "none") - (parameters - '("AtkRectangle*" "bounds") - ) -) - - - -;; From /usr/include/atk-1.0/atk/atkdocument.h - -(define-function atk_document_get_type - (c-name "atk_document_get_type") - (return-type "GType") -) - -(define-method get_document_type - (of-object "AtkDocument") - (c-name "atk_document_get_document_type") - (return-type "const-gchar*") -) - -(define-method get_document - (of-object "AtkDocument") - (c-name "atk_document_get_document") - (return-type "gpointer") -) - -(define-virtual get_document_type - (of-object "AtkDocument") - (return-type "const-gchar*") -) - -(define-virtual get_document - (of-object "AtkDocument") - (return-type "gpointer") -) - - - -;; From /usr/include/atk-1.0/atk/atkeditabletext.h - -(define-function atk_editable_text_get_type - (c-name "atk_editable_text_get_type") - (return-type "GType") -) - -(define-method set_run_attributes - (of-object "AtkEditableText") - (c-name "atk_editable_text_set_run_attributes") - (return-type "gboolean") - (parameters - '("AtkAttributeSet*" "attrib_set") - '("gint" "start_offset") - '("gint" "end_offset") - ) -) - -(define-method set_text_contents - (of-object "AtkEditableText") - (c-name "atk_editable_text_set_text_contents") - (return-type "none") - (parameters - '("const-gchar*" "string") - ) -) - -(define-method insert_text - (of-object "AtkEditableText") - (c-name "atk_editable_text_insert_text") - (return-type "none") - (parameters - '("const-gchar*" "string") - '("gint" "length") - '("gint*" "position") - ) -) - -(define-method copy_text - (of-object "AtkEditableText") - (c-name "atk_editable_text_copy_text") - (return-type "none") - (parameters - '("gint" "start_pos") - '("gint" "end_pos") - ) -) - -(define-method cut_text - (of-object "AtkEditableText") - (c-name "atk_editable_text_cut_text") - (return-type "none") - (parameters - '("gint" "start_pos") - '("gint" "end_pos") - ) -) - -(define-method delete_text - (of-object "AtkEditableText") - (c-name "atk_editable_text_delete_text") - (return-type "none") - (parameters - '("gint" "start_pos") - '("gint" "end_pos") - ) -) - -(define-method paste_text - (of-object "AtkEditableText") - (c-name "atk_editable_text_paste_text") - (return-type "none") - (parameters - '("gint" "position") - ) -) - -(define-virtual set_run_attributes - (of-object "AtkEditableText") - (return-type "gboolean") - (parameters - '("AtkAttributeSet*" "attrib_set") - '("gint" "start_offset") - '("gint" "end_offset") - ) -) - -(define-virtual set_text_contents - (of-object "AtkEditableText") - (return-type "none") - (parameters - '("const-gchar*" "string") - ) -) - -(define-virtual insert_text - (of-object "AtkEditableText") - (return-type "none") - (parameters - '("const-gchar*" "string") - '("gint" "length") - '("gint*" "position") - ) -) - -(define-virtual copy_text - (of-object "AtkEditableText") - (return-type "none") - (parameters - '("gint" "start_pos") - '("gint" "end_pos") - ) -) - -(define-virtual cut_text - (of-object "AtkEditableText") - (return-type "none") - (parameters - '("gint" "start_pos") - '("gint" "end_pos") - ) -) - -(define-virtual delete_text - (of-object "AtkEditableText") - (return-type "none") - (parameters - '("gint" "start_pos") - '("gint" "end_pos") - ) -) - -(define-virtual paste_text - (of-object "AtkEditableText") - (return-type "none") - (parameters - '("gint" "position") - ) -) - - - -;; From atkgobjectaccessible.h - -(define-function gobject_accessible_get_type - (c-name "atk_gobject_accessible_get_type") - (return-type "GType") -) - -(define-function gobject_accessible_for_object - (c-name "atk_gobject_accessible_for_object") - (return-type "AtkObject*") - (parameters - '("GObject*" "obj") - ) -) - -(define-method get_object - (of-object "AtkGObjectAccessible") - (c-name "atk_gobject_accessible_get_object") - (return-type "GObject*") -) - - - -;; From /usr/include/atk-1.0/atk/atk.h - - - -;; From /usr/include/atk-1.0/atk/atkhyperlink.h - -(define-function atk_hyperlink_get_type - (c-name "atk_hyperlink_get_type") - (return-type "GType") -) - -(define-method get_uri - (of-object "AtkHyperlink") - (c-name "atk_hyperlink_get_uri") - (return-type "gchar*") - (parameters - '("gint" "i") - ) -) - -(define-method get_object - (of-object "AtkHyperlink") - (c-name "atk_hyperlink_get_object") - (return-type "AtkObject*") - (parameters - '("gint" "i") - ) -) - -(define-method get_end_index - (of-object "AtkHyperlink") - (c-name "atk_hyperlink_get_end_index") - (return-type "gint") -) - -(define-method get_start_index - (of-object "AtkHyperlink") - (c-name "atk_hyperlink_get_start_index") - (return-type "gint") -) - -(define-method is_valid - (of-object "AtkHyperlink") - (c-name "atk_hyperlink_is_valid") - (return-type "gboolean") -) - -(define-method get_n_anchors - (of-object "AtkHyperlink") - (c-name "atk_hyperlink_get_n_anchors") - (return-type "gint") -) - -(define-method is_inline - (of-object "AtkHyperlink") - (c-name "atk_hyperlink_is_inline") - (return-type "gboolean") -) - -(define-method is_selected_link - (of-object "AtkHyperlink") - (c-name "atk_hyperlink_is_selected_link") - (return-type "gboolean") -) - -(define-virtual get_uri - (of-object "AtkHyperlink") - (return-type "gchar*") - (parameters - '("gint" "i") - ) -) - -(define-virtual get_object - (of-object "AtkHyperlink") - (return-type "AtkObject*") - (parameters - '("gint" "i") - ) -) - -(define-virtual get_end_index - (of-object "AtkHyperlink") - (return-type "gint") -) - -(define-virtual get_start_index - (of-object "AtkHyperlink") - (return-type "gint") -) - -(define-virtual is_valid - (of-object "AtkHyperlink") - (return-type "gboolean") -) - -(define-virtual get_n_anchors - (of-object "AtkHyperlink") - (return-type "gint") -) - -(define-virtual link_state - (of-object "AtkHyperlink") - (return-type "guint") -) - -(define-virtual is_selected_link - (of-object "AtkHyperlink") - (return-type "gboolean") -) - -(define-virtual link_activated - (of-object "AtkHyperlink") - (return-type "none") -) - - - -;; From /usr/include/atk-1.0/atk/atkhypertext.h - -(define-function atk_hypertext_get_type - (c-name "atk_hypertext_get_type") - (return-type "GType") -) - -(define-method get_link - (of-object "AtkHypertext") - (c-name "atk_hypertext_get_link") - (return-type "AtkHyperlink*") - (parameters - '("gint" "link_index") - ) -) - -(define-method get_n_links - (of-object "AtkHypertext") - (c-name "atk_hypertext_get_n_links") - (return-type "gint") -) - -(define-method get_link_index - (of-object "AtkHypertext") - (c-name "atk_hypertext_get_link_index") - (return-type "gint") - (parameters - '("gint" "char_index") - ) -) - -(define-virtual get_link - (of-object "AtkHypertext") - (return-type "AtkHyperlink*") - (parameters - '("gint" "link_index") - ) -) - -(define-virtual get_n_links - (of-object "AtkHypertext") - (return-type "gint") -) - -(define-virtual get_link_index - (of-object "AtkHypertext") - (return-type "gint") - (parameters - '("gint" "char_index") - ) -) - -(define-virtual link_selected - (of-object "AtkHypertext") - (return-type "none") - (parameters - '("gint" "link_index") - ) -) - - - -;; From /usr/include/atk-1.0/atk/atkimage.h - -(define-function atk_image_get_type - (c-name "atk_image_get_type") - (return-type "GType") -) - -(define-method get_image_description - (of-object "AtkImage") - (c-name "atk_image_get_image_description") - (return-type "const-gchar*") -) - -(define-method get_image_size - (of-object "AtkImage") - (c-name "atk_image_get_image_size") - (return-type "none") - (parameters - '("gint*" "width") - '("gint*" "height") - ) -) - -(define-method set_image_description - (of-object "AtkImage") - (c-name "atk_image_set_image_description") - (return-type "gboolean") - (parameters - '("const-gchar*" "description") - ) -) - -(define-method get_image_position - (of-object "AtkImage") - (c-name "atk_image_get_image_position") - (return-type "none") - (parameters - '("gint*" "x") - '("gint*" "y") - '("AtkCoordType" "coord_type") - ) -) - -(define-virtual get_image_position - (of-object "AtkImage") - (return-type "none") - (parameters - '("gint*" "x") - '("gint*" "y") - '("AtkCoordType" "coord_type") - ) -) - -(define-virtual get_image_description - (of-object "AtkImage") - (return-type "const-gchar*") -) - -(define-virtual get_image_size - (of-object "AtkImage") - (return-type "none") - (parameters - '("gint*" "width") - '("gint*" "height") - ) -) - -(define-virtual set_image_description - (of-object "AtkImage") - (return-type "gboolean") - (parameters - '("const-gchar*" "description") - ) -) - - - -;; From /usr/include/atk-1.0/atk/atknoopobjectfactory.h - -(define-function atk_no_op_object_factory_get_type - (c-name "atk_no_op_object_factory_get_type") - (return-type "GType") - (parameters - ) -) - -(define-function atk_no_op_object_factory_new - (c-name "atk_no_op_object_factory_new") - (return-type "AtkObjectFactory*") - (is-constructor-of AtkNoOpObjectFactory) - (parameters - ) -) - - - -;; From /usr/include/atk-1.0/atk/atknoopobject.h - -(define-function atk_no_op_object_get_type - (c-name "atk_no_op_object_get_type") - (return-type "GType") -) - -(define-function atk_no_op_object_new - (c-name "atk_no_op_object_new") - (return-type "AtkNoOpObject*") - (is-constructor-of AtkNoOpObject) - (parameters - '("GObject*" "obj") - ) -) - - - -;; From /usr/include/atk-1.0/atk/atkobjectfactory.h - -(define-function atk_object_factory_get_type - (c-name "atk_object_factory_get_type") - (return-type "GType") - (parameters - ) -) - -(define-method create_accessible - (of-object "AtkObjectFactory") - (c-name "atk_object_factory_create_accessible") - (return-type "AtkObject*") - (parameters - '("GObject*" "obj") - ) -) - -(define-method invalidate - (of-object "AtkObjectFactory") - (c-name "atk_object_factory_invalidate") - (return-type "none") -) - -(define-method get_accessible_type - (of-object "AtkObjectFactory") - (c-name "atk_object_factory_get_accessible_type") - (return-type "GType") -) - -(define-virtual create_accessible - (of-object "AtkObjectFactory") - (return-type "AtkObject*") -) - -(define-virtual invalidate - (of-object "AtkObjectFactory") - (return-type "none") -) - - - -;; From /usr/include/atk-1.0/atk/atkobject.h - -(define-function atk_object_get_type - (c-name "atk_object_get_type") - (return-type "GType") -) - -(define-function atk_implementor_get_type - (c-name "atk_implementor_get_type") - (return-type "GType") -) - -(define-method ref_accessible - (of-object "AtkImplementorIface") - (c-name "atk_implementor_ref_accessible") - (return-type "AtkObject*") -) - -(define-virtual ref_accessible - (of-object "AtkImplementor") - (return-type "AtkObject*") -) - -(define-method get_name - (of-object "AtkObject") - (c-name "atk_object_get_name") - (return-type "const-gchar*") -) - -(define-method get_description - (of-object "AtkObject") - (c-name "atk_object_get_description") - (return-type "const-gchar*") -) - -(define-method get_parent - (of-object "AtkObject") - (c-name "atk_object_get_parent") - (return-type "AtkObject*") -) - -(define-method get_n_accessible_children - (of-object "AtkObject") - (c-name "atk_object_get_n_accessible_children") - (return-type "gint") -) - -(define-method ref_accessible_child - (of-object "AtkObject") - (c-name "atk_object_ref_accessible_child") - (return-type "AtkObject*") - (parameters - '("gint" "i") - ) -) - -(define-method ref_relation_set - (of-object "AtkObject") - (c-name "atk_object_ref_relation_set") - (return-type "AtkRelationSet*") -) - -(define-method get_role - (of-object "AtkObject") - (c-name "atk_object_get_role") - (return-type "AtkRole") -) - -(define-method get_layer - (of-object "AtkObject") - (c-name "atk_object_get_layer") - (return-type "AtkLayer") -) - -(define-method get_mdi_zorder - (of-object "AtkObject") - (c-name "atk_object_get_mdi_zorder") - (return-type "gint") -) - -(define-method ref_state_set - (of-object "AtkObject") - (c-name "atk_object_ref_state_set") - (return-type "AtkStateSet*") -) - -(define-method get_index_in_parent - (of-object "AtkObject") - (c-name "atk_object_get_index_in_parent") - (return-type "gint") -) - -(define-method set_name - (of-object "AtkObject") - (c-name "atk_object_set_name") - (return-type "none") - (parameters - '("const-gchar*" "name") - ) -) - -(define-method set_description - (of-object "AtkObject") - (c-name "atk_object_set_description") - (return-type "none") - (parameters - '("const-gchar*" "description") - ) -) - -(define-method set_parent - (of-object "AtkObject") - (c-name "atk_object_set_parent") - (return-type "none") - (parameters - '("AtkObject*" "parent") - ) -) - -(define-method set_role - (of-object "AtkObject") - (c-name "atk_object_set_role") - (return-type "none") - (parameters - '("AtkRole" "role") - ) -) - -(define-method connect_property_change_handler - (of-object "AtkObject") - (c-name "atk_object_connect_property_change_handler") - (return-type "guint") - (parameters - '("AtkPropertyChangeHandler*" "handler") - ) -) - -(define-method remove_property_change_handler - (of-object "AtkObject") - (c-name "atk_object_remove_property_change_handler") - (return-type "none") - (parameters - '("guint" "handler_id") - ) -) - -(define-method notify_state_change - (of-object "AtkObject") - (c-name "atk_object_notify_state_change") - (return-type "none") - (parameters - '("AtkState" "state") - '("gboolean" "value") - ) -) - -(define-virtual get_name - (of-object "AtkObject") - (return-type "const-gchar*") -) - -(define-virtual get_description - (of-object "AtkObject") - (return-type "const-gchar*") -) - -(define-virtual get_parent - (of-object "AtkObject") - (return-type "AtkObject*") -) - -(define-virtual get_n_children - (of-object "AtkObject") - (return-type "gint") -) - -(define-virtual ref_child - (of-object "AtkObject") - (return-type "AtkObject*") - (parameters - '("gint" "i") - ) -) - -(define-virtual get_index_in_parent - (of-object "AtkObject") - (return-type "gint") -) - -(define-virtual ref_relation_set - (of-object "AtkObject") - (return-type "AtkRelationSet*") -) - -(define-virtual get_role - (of-object "AtkObject") - (return-type "AtkRole") -) - -(define-virtual get_layer - (of-object "AtkObject") - (return-type "AtkLayer") -) - -(define-virtual get_mdi_zorder - (of-object "AtkObject") - (return-type "gint") -) - -(define-virtual ref_state_set - (of-object "AtkObject") - (return-type "AtkStateSet*") -) - -(define-virtual set_name - (of-object "AtkObject") - (return-type "none") - (parameters - '("const-gchar*" "name") - ) -) - -(define-virtual set_description - (of-object "AtkObject") - (return-type "none") - (parameters - '("const-gchar*" "description") - ) -) - -(define-virtual set_parent - (of-object "AtkObject") - (return-type "none") - (parameters - '("AtkObject*" "parent") - ) -) - -(define-virtual set_role - (of-object "AtkObject") - (return-type "none") - (parameters - '("AtkRole" "role") - ) -) - -(define-virtual connect_property_change_handler - (of-object "AtkObject") - (return-type "guint") - (parameters - '("AtkPropertyChangeHandler*" "handler") - ) -) - -(define-virtual remove_property_change_handler - (of-object "AtkObject") - (return-type "none") - (parameters - '("guint" "handler_id") - ) -) - -(define-virtual initialize - (of-object "AtkObject") - (return-type "none") - (parameters - '("gpointer" "data") - ) -) - -(define-virtual children_changed - (of-object "AtkObject") - (return-type "none") - (parameters - '("guint" "change_index") - '("gpointer" "changed_child") - ) -) - -(define-virtual focus_event - (of-object "AtkObject") - (return-type "none") - (parameters - '("gboolean" "focus_in") - ) -) - -(define-virtual property_change - (of-object "AtkObject") - (return-type "none") - (parameters - '("AtkPropertyValues*" "values") - ) -) - -(define-virtual state_change - (of-object "AtkObject") - (return-type "none") - (parameters - '("const-gchar*" "name") - '("gboolean" "state_set") - ) -) - -(define-virtual visible_data_changed - (of-object "AtkObject") - (return-type "none") -) - -(define-virtual active_descendant_changed - (of-object "AtkObject") - (return-type "none") - (parameters - '("gpointer*" "child") - ) -) - -(define-function role_register - (c-name "atk_role_register") - (return-type "AtkRole") - (parameters - '("const-gchar*" "name") - ) -) - -(define-method initialize - (of-object "AtkObject") - (c-name "atk_object_initialize") - (return-type "none") - (parameters - '("gpointer" "data") - ) -) - -(define-method add_relationship - (of-object "AtkObject") - (c-name "atk_object_add_relationship") - (return-type "gboolean") - (parameters - '("AtkRelationType" "relationship") - '("AtkObject*" "target") - ) -) - -(define-method remove_relationship - (of-object "AtkObject") - (c-name "atk_object_remove_relationship") - (return-type "gboolean") - (parameters - '("AtkRelationType" "relationship") - '("AtkObject*" "target") - ) -) - -(define-function role_get_localized_name - (c-name "atk_role_get_localized_name") - (return-type "const-gchar*") - (parameters - '("AtkRole" "role") - ) -) - - - -;; From /usr/include/atk-1.0/atk/atkregistry.h - -(define-function atk_registry_get_type - (c-name "atk_registry_get_type") - (return-type "GType") -) - -(define-method set_factory_type - (of-object "AtkRegistry") - (c-name "atk_registry_set_factory_type") - (return-type "none") - (parameters - '("GType" "type") - '("GType" "factory_type") - ) -) - -(define-method get_factory_type - (of-object "AtkRegistry") - (c-name "atk_registry_get_factory_type") - (return-type "GType") - (parameters - '("GType" "type") - ) -) - -(define-method get_factory - (of-object "AtkRegistry") - (c-name "atk_registry_get_factory") - (return-type "AtkObjectFactory*") - (parameters - '("GType" "type") - ) -) - -(define-function get_default_registry - (c-name "atk_get_default_registry") - (return-type "AtkRegistry*") - (parameters - ) -) - - - -;; From /usr/include/atk-1.0/atk/atkrelation.h - -(define-function atk_relation_get_type - (c-name "atk_relation_get_type") - (return-type "GType") -) - -(define-function relation_type_register - (c-name "atk_relation_type_register") - (return-type "AtkRelationType") - (parameters - '("const-gchar*" "name") - ) -) - -(define-function relation_type_get_name - (c-name "atk_relation_type_get_name") - (return-type "const-gchar*") - (parameters - '("AtkRelationType" "relationship") - ) -) - -(define-function relation_type_for_name - (c-name "atk_relation_type_for_name") - (return-type "AtkRelationType") - (parameters - '("const-gchar*" "name") - ) -) - -(define-function relation_new - (c-name "atk_relation_new") - (return-type "AtkRelation*") - (is-constructor-of AtkRelation) - (parameters - '("AtkObject**" "targets") - '("gint" "n_targets") - '("AtkRelationType" "relationship") - ) -) - -(define-method get_relation_type - (of-object "AtkRelation") - (c-name "atk_relation_get_relation_type") - (return-type "AtkRelationType") -) - -(define-method get_target - (of-object "AtkRelation") - (c-name "atk_relation_get_target") - (return-type "GPtrArray*") -) - - - -;; From /usr/include/atk-1.0/atk/atkrelationset.h - -(define-function atk_relation_set_get_type - (c-name "atk_relation_set_get_type") - (return-type "GType") -) - -(define-function relation_set_new - (c-name "atk_relation_set_new") - (is-constructor-of AtkRelationSet) - (return-type "AtkRelationSet*") -) - -(define-method contains - (of-object "AtkRelationSet") - (c-name "atk_relation_set_contains") - (return-type "gboolean") - (parameters - '("AtkRelationType" "relationship") - ) -) - -(define-method remove - (of-object "AtkRelationSet") - (c-name "atk_relation_set_remove") - (return-type "none") - (parameters - '("AtkRelation*" "relation") - ) -) - -(define-method add - (of-object "AtkRelationSet") - (c-name "atk_relation_set_add") - (return-type "none") - (parameters - '("AtkRelation*" "relation") - ) -) - -(define-method get_n_relations - (of-object "AtkRelationSet") - (c-name "atk_relation_set_get_n_relations") - (return-type "gint") -) - -(define-method get_relation - (of-object "AtkRelationSet") - (c-name "atk_relation_set_get_relation") - (return-type "AtkRelation*") - (parameters - '("gint" "i") - ) -) - -(define-method get_relation_by_type - (of-object "AtkRelationSet") - (c-name "atk_relation_set_get_relation_by_type") - (return-type "AtkRelation*") - (parameters - '("AtkRelationType" "relationship") - ) -) - - - -;; From /usr/include/atk-1.0/atk/atkselection.h - -(define-function atk_selection_get_type - (c-name "atk_selection_get_type") - (return-type "GType") - (parameters - ) -) - -(define-method add_selection - (of-object "AtkSelection") - (c-name "atk_selection_add_selection") - (return-type "gboolean") - (parameters - '("gint" "i") - ) -) - -(define-method clear_selection - (of-object "AtkSelection") - (c-name "atk_selection_clear_selection") - (return-type "gboolean") -) - -(define-method ref_selection - (of-object "AtkSelection") - (c-name "atk_selection_ref_selection") - (return-type "AtkObject*") - (parameters - '("gint" "i") - ) -) - -(define-method get_selection_count - (of-object "AtkSelection") - (c-name "atk_selection_get_selection_count") - (return-type "gint") -) - -(define-method is_child_selected - (of-object "AtkSelection") - (c-name "atk_selection_is_child_selected") - (return-type "gboolean") - (parameters - '("gint" "i") - ) -) - -(define-method remove_selection - (of-object "AtkSelection") - (c-name "atk_selection_remove_selection") - (return-type "gboolean") - (parameters - '("gint" "i") - ) -) - -(define-method select_all_selection - (of-object "AtkSelection") - (c-name "atk_selection_select_all_selection") - (return-type "gboolean") -) - -(define-virtual add_selection - (of-object "AtkSelection") - (return-type "gboolean") - (parameters - '("gint" "i") - ) -) - -(define-virtual clear_selection - (of-object "AtkSelection") - (return-type "gboolean") -) - -(define-virtual ref_selection - (of-object "AtkSelection") - (return-type "AtkObject*") - (parameters - '("gint" "i") - ) -) - -(define-virtual get_selection_count - (of-object "AtkSelection") - (return-type "gint") -) - -(define-virtual is_child_selected - (of-object "AtkSelection") - (return-type "gboolean") - (parameters - '("gint" "i") - ) -) - -(define-virtual remove_selection - (of-object "AtkSelection") - (return-type "gboolean") - (parameters - '("gint" "i") - ) -) - -(define-virtual select_all_selection - (of-object "AtkSelection") - (return-type "gboolean") -) - -(define-virtual selection_changed - (of-object "AtkSelection") - (return-type "none") -) - - - -;; From /usr/include/atk-1.0/atk/atkstate.h - -(define-function state_type_register - (c-name "atk_state_type_register") - (return-type "AtkStateType") - (parameters - '("const-gchar*" "name") - ) -) - -(define-function state_type_get_name - (c-name "atk_state_type_get_name") - (return-type "const-gchar*") - (parameters - '("AtkStateType" "type") - ) -) - -(define-function state_type_for_name - (c-name "atk_state_type_for_name") - (return-type "AtkStateType") - (parameters - '("const-gchar*" "name") - ) -) - - - -;; From /usr/include/atk-1.0/atk/atkstateset.h - -(define-function atk_state_set_get_type - (c-name "atk_state_set_get_type") - (return-type "GType") -) - -(define-function atk_state_set_new - (c-name "atk_state_set_new") - (is-constructor-of "AtkStateSet") - (return-type "AtkStateSet*") -) - -(define-method is_empty - (of-object "AtkStateSet") - (c-name "atk_state_set_is_empty") - (return-type "gboolean") -) - -(define-method add_state - (of-object "AtkStateSet") - (c-name "atk_state_set_add_state") - (return-type "gboolean") - (parameters - '("AtkStateType" "type") - ) -) - -(define-method add_states - (of-object "AtkStateSet") - (c-name "atk_state_set_add_states") - (return-type "none") - (parameters - '("AtkStateType*" "types") - '("gint" "n_types") - ) -) - -(define-method clear_states - (of-object "AtkStateSet") - (c-name "atk_state_set_clear_states") - (return-type "none") -) - -(define-method contains_state - (of-object "AtkStateSet") - (c-name "atk_state_set_contains_state") - (return-type "gboolean") - (parameters - '("AtkStateType" "type") - ) -) - -(define-method contains_states - (of-object "AtkStateSet") - (c-name "atk_state_set_contains_states") - (return-type "gboolean") - (parameters - '("AtkStateType*" "types") - '("gint" "n_types") - ) -) - -(define-method remove_state - (of-object "AtkStateSet") - (c-name "atk_state_set_remove_state") - (return-type "gboolean") - (parameters - '("AtkStateType" "type") - ) -) - -(define-method and_sets - (of-object "AtkStateSet") - (c-name "atk_state_set_and_sets") - (return-type "AtkStateSet*") - (parameters - '("AtkStateSet*" "compare_set") - ) -) - -(define-method or_sets - (of-object "AtkStateSet") - (c-name "atk_state_set_or_sets") - (return-type "AtkStateSet*") - (parameters - '("AtkStateSet*" "compare_set") - ) -) - -(define-method xor_sets - (of-object "AtkStateSet") - (c-name "atk_state_set_xor_sets") - (return-type "AtkStateSet*") - (parameters - '("AtkStateSet*" "compare_set") - ) -) - - - -;; From /usr/include/atk-1.0/atk/atkstreamablecontent.h - -(define-function atk_streamable_content_get_type - (c-name "atk_streamable_content_get_type") - (return-type "GType") -) - -(define-method get_n_mime_types - (of-object "AtkStreamableContent") - (c-name "atk_streamable_content_get_n_mime_types") - (return-type "gint") -) - -(define-method get_mime_type - (of-object "AtkStreamableContent") - (c-name "atk_streamable_content_get_mime_type") - (return-type "const-gchar*") - (parameters - '("gint" "i") - ) -) - -(define-method get_stream - (of-object "AtkStreamableContent") - (c-name "atk_streamable_content_get_stream") - (return-type "GIOChannel*") - (parameters - '("const-gchar*" "mime_type") - ) -) - -(define-virtual get_n_mime_types - (of-object "AtkStreamableContent") - (return-type "gint") -) - -(define-virtual get_mime_type - (of-object "AtkStreamableContent") - (return-type "const-gchar*") - (parameters - '("gint" "i") - ) -) - -(define-virtual get_stream - (of-object "AtkStreamableContent") - (return-type "GIOChannel*") - (parameters - '("const-gchar*" "mime_type") - ) -) - - - -;; From /usr/include/atk-1.0/atk/atktable.h - -(define-function atk_table_get_type - (c-name "atk_table_get_type") - (return-type "GType") - (parameters - ) -) - -(define-method ref_at - (of-object "AtkTable") - (c-name "atk_table_ref_at") - (return-type "AtkObject*") - (parameters - '("gint" "row") - '("gint" "column") - ) -) - -(define-method get_index_at - (of-object "AtkTable") - (c-name "atk_table_get_index_at") - (return-type "gint") - (parameters - '("gint" "row") - '("gint" "column") - ) -) - -(define-method get_column_at_index - (of-object "AtkTable") - (c-name "atk_table_get_column_at_index") - (return-type "gint") - (parameters - '("gint" "index") - ) -) - -(define-method get_row_at_index - (of-object "AtkTable") - (c-name "atk_table_get_row_at_index") - (return-type "gint") - (parameters - '("gint" "index") - ) -) - -(define-method get_n_columns - (of-object "AtkTable") - (c-name "atk_table_get_n_columns") - (return-type "gint") -) - -(define-method get_n_rows - (of-object "AtkTable") - (c-name "atk_table_get_n_rows") - (return-type "gint") -) - -(define-method get_column_extent_at - (of-object "AtkTable") - (c-name "atk_table_get_column_extent_at") - (return-type "gint") - (parameters - '("gint" "row") - '("gint" "column") - ) -) - -(define-method get_row_extent_at - (of-object "AtkTable") - (c-name "atk_table_get_row_extent_at") - (return-type "gint") - (parameters - '("gint" "row") - '("gint" "column") - ) -) - -(define-method get_caption - (of-object "AtkTable") - (c-name "atk_table_get_caption") - (return-type "AtkObject*") -) - -(define-method get_column_description - (of-object "AtkTable") - (c-name "atk_table_get_column_description") - (return-type "const-gchar*") - (parameters - '("gint" "column") - ) -) - -(define-method get_column_header - (of-object "AtkTable") - (c-name "atk_table_get_column_header") - (return-type "AtkObject*") - (parameters - '("gint" "column") - ) -) - -(define-method get_row_description - (of-object "AtkTable") - (c-name "atk_table_get_row_description") - (return-type "const-gchar*") - (parameters - '("gint" "row") - ) -) - -(define-method get_row_header - (of-object "AtkTable") - (c-name "atk_table_get_row_header") - (return-type "AtkObject*") - (parameters - '("gint" "row") - ) -) - -(define-method get_summary - (of-object "AtkTable") - (c-name "atk_table_get_summary") - (return-type "AtkObject*") -) - -(define-method set_caption - (of-object "AtkTable") - (c-name "atk_table_set_caption") - (return-type "none") - (parameters - '("AtkObject*" "caption") - ) -) - -(define-method set_column_description - (of-object "AtkTable") - (c-name "atk_table_set_column_description") - (return-type "none") - (parameters - '("gint" "column") - '("const-gchar*" "description") - ) -) - -(define-method set_column_header - (of-object "AtkTable") - (c-name "atk_table_set_column_header") - (return-type "none") - (parameters - '("gint" "column") - '("AtkObject*" "header") - ) -) - -(define-method set_row_description - (of-object "AtkTable") - (c-name "atk_table_set_row_description") - (return-type "none") - (parameters - '("gint" "row") - '("const-gchar*" "description") - ) -) - -(define-method set_row_header - (of-object "AtkTable") - (c-name "atk_table_set_row_header") - (return-type "none") - (parameters - '("gint" "row") - '("AtkObject*" "header") - ) -) - -(define-method set_summary - (of-object "AtkTable") - (c-name "atk_table_set_summary") - (return-type "none") - (parameters - '("AtkObject*" "accessible") - ) -) - -(define-method get_selected_columns - (of-object "AtkTable") - (c-name "atk_table_get_selected_columns") - (return-type "gint") - (parameters - '("gint**" "selected") - ) -) - -(define-method get_selected_rows - (of-object "AtkTable") - (c-name "atk_table_get_selected_rows") - (return-type "gint") - (parameters - '("gint**" "selected") - ) -) - -(define-method is_column_selected - (of-object "AtkTable") - (c-name "atk_table_is_column_selected") - (return-type "gboolean") - (parameters - '("gint" "column") - ) -) - -(define-method is_row_selected - (of-object "AtkTable") - (c-name "atk_table_is_row_selected") - (return-type "gboolean") - (parameters - '("gint" "row") - ) -) - -(define-method is_selected - (of-object "AtkTable") - (c-name "atk_table_is_selected") - (return-type "gboolean") - (parameters - '("gint" "row") - '("gint" "column") - ) -) - -(define-method add_row_selection - (of-object "AtkTable") - (c-name "atk_table_add_row_selection") - (return-type "gboolean") - (parameters - '("gint" "row") - ) -) - -(define-method remove_row_selection - (of-object "AtkTable") - (c-name "atk_table_remove_row_selection") - (return-type "gboolean") - (parameters - '("gint" "row") - ) -) - -(define-method add_column_selection - (of-object "AtkTable") - (c-name "atk_table_add_column_selection") - (return-type "gboolean") - (parameters - '("gint" "column") - ) -) - -(define-method remove_column_selection - (of-object "AtkTable") - (c-name "atk_table_remove_column_selection") - (return-type "gboolean") - (parameters - '("gint" "column") - ) -) - -(define-virtual ref_at - (of-object "AtkTable") - (return-type "AtkObject*") - (parameters - '("gint" "row") - '("gint" "column") - ) -) - -(define-virtual get_index_at - (of-object "AtkTable") - (return-type "gint") - (parameters - '("gint" "row") - '("gint" "column") - ) -) - -(define-virtual get_column_at_index - (of-object "AtkTable") - (return-type "gint") - (parameters - '("gint" "index") - ) -) - -(define-virtual get_row_at_index - (of-object "AtkTable") - (return-type "gint") - (parameters - '("gint" "index") - ) -) - -(define-virtual get_n_columns - (of-object "AtkTable") - (return-type "gint") -) - -(define-virtual get_n_rows - (of-object "AtkTable") - (return-type "gint") -) - -(define-virtual get_column_extent_at - (of-object "AtkTable") - (return-type "gint") - (parameters - '("gint" "row") - '("gint" "column") - ) -) - -(define-virtual get_row_extent_at - (of-object "AtkTable") - (return-type "gint") - (parameters - '("gint" "row") - '("gint" "column") - ) -) - -(define-virtual get_caption - (of-object "AtkTable") - (return-type "AtkObject*") -) - -(define-virtual get_column_description - (of-object "AtkTable") - (return-type "const-gchar*") - (parameters - '("gint" "column") - ) -) - -(define-virtual get_column_header - (of-object "AtkTable") - (return-type "AtkObject*") - (parameters - '("gint" "column") - ) -) - -(define-virtual get_row_description - (of-object "AtkTable") - (return-type "const-gchar*") - (parameters - '("gint" "row") - ) -) - -(define-virtual get_row_header - (of-object "AtkTable") - (return-type "AtkObject*") - (parameters - '("gint" "row") - ) -) - -(define-virtual get_summary - (of-object "AtkTable") - (return-type "AtkObject*") -) - -(define-virtual set_caption - (of-object "AtkTable") - (return-type "none") - (parameters - '("AtkObject*" "caption") - ) -) - -(define-virtual set_column_description - (of-object "AtkTable") - (return-type "none") - (parameters - '("gint" "column") - '("const-gchar*" "description") - ) -) - -(define-virtual set_column_header - (of-object "AtkTable") - (return-type "none") - (parameters - '("gint" "column") - '("AtkObject*" "header") - ) -) - -(define-virtual set_row_description - (of-object "AtkTable") - (return-type "none") - (parameters - '("gint" "row") - '("const-gchar*" "description") - ) -) - -(define-virtual set_row_header - (of-object "AtkTable") - (return-type "none") - (parameters - '("gint" "row") - '("AtkObject*" "header") - ) -) - -(define-virtual set_summary - (of-object "AtkTable") - (return-type "none") - (parameters - '("AtkObject*" "accessible") - ) -) - -(define-virtual get_selected_columns - (of-object "AtkTable") - (return-type "gint") - (parameters - '("gint**" "selected") - ) -) - -(define-virtual get_selected_rows - (of-object "AtkTable") - (return-type "gint") - (parameters - '("gint**" "selected") - ) -) - -(define-virtual is_column_selected - (of-object "AtkTable") - (return-type "gboolean") - (parameters - '("gint" "column") - ) -) - -(define-virtual is_row_selected - (of-object "AtkTable") - (return-type "gboolean") - (parameters - '("gint" "row") - ) -) - -(define-virtual is_selected - (of-object "AtkTable") - (return-type "gboolean") - (parameters - '("gint" "row") - '("gint" "column") - ) -) - -(define-virtual add_row_selection - (of-object "AtkTable") - (return-type "gboolean") - (parameters - '("gint" "row") - ) -) - -(define-virtual remove_row_selection - (of-object "AtkTable") - (return-type "gboolean") - (parameters - '("gint" "row") - ) -) - -(define-virtual add_column_selection - (of-object "AtkTable") - (return-type "gboolean") - (parameters - '("gint" "column") - ) -) - -(define-virtual remove_column_selection - (of-object "AtkTable") - (return-type "gboolean") - (parameters - '("gint" "column") - ) -) - -(define-virtual row_inserted - (of-object "AtkTable") - (return-type "none") - (parameters - '("gint" "row") - '("gint" "num_inserted") - ) -) - -(define-virtual column_inserted - (of-object "AtkTable") - (return-type "none") - (parameters - '("gint" "column") - '("gint" "num_inserted") - ) -) - -(define-virtual row_deleted - (of-object "AtkTable") - (return-type "none") - (parameters - '("gint" "row") - '("gint" "num_deleted") - ) -) - -(define-virtual column_deleted - (of-object "AtkTable") - (return-type "none") - (parameters - '("gint" "column") - '("gint" "num_deleted") - ) -) - -(define-virtual row_reordered - (of-object "AtkTable") - (return-type "none") -) - -(define-virtual column_reordered - (of-object "AtkTable") - (return-type "none") -) - -(define-virtual model_changed - (of-object "AtkTable") - (return-type "none") -) - - - -;; From /usr/include/atk-1.0/atk/atktext.h - -(define-function atk_text_get_type - (c-name "atk_text_get_type") - (return-type "GType") -) - -(define-method get_text - (of-object "AtkText") - (c-name "atk_text_get_text") - (return-type "gchar*") - (parameters - '("gint" "start_offset") - '("gint" "end_offset") - ) -) - -(define-method get_character_at_offset - (of-object "AtkText") - (c-name "atk_text_get_character_at_offset") - (return-type "gunichar") - (parameters - '("gint" "offset") - ) -) - -(define-method get_text_after_offset - (of-object "AtkText") - (c-name "atk_text_get_text_after_offset") - (return-type "gchar*") - (parameters - '("gint" "offset") - '("AtkTextBoundary" "boundary_type") - '("gint*" "start_offset") - '("gint*" "end_offset") - ) -) - -(define-method get_text_at_offset - (of-object "AtkText") - (c-name "atk_text_get_text_at_offset") - (return-type "gchar*") - (parameters - '("gint" "offset") - '("AtkTextBoundary" "boundary_type") - '("gint*" "start_offset") - '("gint*" "end_offset") - ) -) - -(define-method get_text_before_offset - (of-object "AtkText") - (c-name "atk_text_get_text_before_offset") - (return-type "gchar*") - (parameters - '("gint" "offset") - '("AtkTextBoundary" "boundary_type") - '("gint*" "start_offset") - '("gint*" "end_offset") - ) -) - -(define-method get_caret_offset - (of-object "AtkText") - (c-name "atk_text_get_caret_offset") - (return-type "gint") -) - -(define-method get_character_extents - (of-object "AtkText") - (c-name "atk_text_get_character_extents") - (return-type "none") - (parameters - '("gint" "offset") - '("gint*" "x") - '("gint*" "y") - '("gint*" "width") - '("gint*" "height") - '("AtkCoordType" "coords") - ) -) - -(define-method get_run_attributes - (of-object "AtkText") - (c-name "atk_text_get_run_attributes") - (return-type "AtkAttributeSet*") - (parameters - '("gint" "offset") - '("gint*" "start_offset") - '("gint*" "end_offset") - ) -) - -(define-method get_default_attributes - (of-object "AtkText") - (c-name "atk_text_get_default_attributes") - (return-type "AtkAttributeSet*") -) - -(define-method get_character_count - (of-object "AtkText") - (c-name "atk_text_get_character_count") - (return-type "gint") -) - -(define-method get_offset_at_point - (of-object "AtkText") - (c-name "atk_text_get_offset_at_point") - (return-type "gint") - (parameters - '("gint" "x") - '("gint" "y") - '("AtkCoordType" "coords") - ) -) - -(define-method get_n_selections - (of-object "AtkText") - (c-name "atk_text_get_n_selections") - (return-type "gint") -) - -(define-method get_selection - (of-object "AtkText") - (c-name "atk_text_get_selection") - (return-type "gchar*") - (parameters - '("gint" "selection_num") - '("gint*" "start_offset") - '("gint*" "end_offset") - ) -) - -(define-method add_selection - (of-object "AtkText") - (c-name "atk_text_add_selection") - (return-type "gboolean") - (parameters - '("gint" "start_offset") - '("gint" "end_offset") - ) -) - -(define-method remove_selection - (of-object "AtkText") - (c-name "atk_text_remove_selection") - (return-type "gboolean") - (parameters - '("gint" "selection_num") - ) -) - -(define-method set_selection - (of-object "AtkText") - (c-name "atk_text_set_selection") - (return-type "gboolean") - (parameters - '("gint" "selection_num") - '("gint" "start_offset") - '("gint" "end_offset") - ) -) - -(define-method set_caret_offset - (of-object "AtkText") - (c-name "atk_text_set_caret_offset") - (return-type "gboolean") - (parameters - '("gint" "offset") - ) -) - -(define-method get_range_extents - (of-object "AtkText") - (c-name "atk_text_get_range_extents") - (return-type "none") - (parameters - '("gint" "start_offset") - '("gint" "end_offset") - '("AtkCoordType" "coord_type") - '("AtkTextRectangle*" "rect") - ) -) - -(define-method get_bounded_ranges - (of-object "AtkText") - (c-name "atk_text_get_bounded_ranges") - (return-type "AtkTextRange**") - (parameters - '("AtkTextRectangle*" "rect") - '("AtkCoordType" "coord_type") - '("AtkTextClipType" "x_clip_type") - '("AtkTextClipType" "y_clip_type") - ) -) - -(define-function text_free_ranges - (c-name "atk_text_free_ranges") - (return-type "none") - (parameters - '("AtkTextRange**" "ranges") - ) -) - -(define-method free - (of-object "AtkAttributeSet") - (c-name "atk_attribute_set_free") - (return-type "none") -) - -(define-function text_attribute_get_name - (c-name "atk_text_attribute_get_name") - (return-type "const-gchar*") - (parameters - '("AtkTextAttribute" "attr") - ) -) - -(define-function text_attribute_get_value - (c-name "atk_text_attribute_get_value") - (return-type "const-gchar*") - (parameters - '("AtkTextAttribute" "attr") - '("gint" "index") - ) -) - -(define-function text_attribute_register - (c-name "atk_text_attribute_register") - (return-type "AtkTextAttribute") - (parameters - '("const-gchar*" "name") - ) -) - -(define-function text_attribute_for_name - (c-name "atk_text_attribute_for_name") - (return-type "AtkTextAttribute") - (parameters - '("const-gchar*" "name") - ) -) - -(define-virtual get_text - (of-object "AtkText") - (return-type "gchar*") - (parameters - '("gint" "start_offset") - '("gint" "end_offset") - ) -) - -(define-virtual get_text_after_offset - (of-object "AtkText") - (return-type "gchar*") - (parameters - '("gint" "offset") - '("AtkTextBoundary" "boundary_type") - '("gint*" "start_offset") - '("gint*" "end_offset") - ) -) - -(define-virtual get_text_at_offset - (of-object "AtkText") - (return-type "gchar*") - (parameters - '("gint" "offset") - '("AtkTextBoundary" "boundary_type") - '("gint*" "start_offset") - '("gint*" "end_offset") - ) -) - -(define-virtual get_character_at_offset - (of-object "AtkText") - (return-type "gunichar") - (parameters - '("gint" "offset") - ) -) - -(define-virtual get_text_before_offset - (of-object "AtkText") - (return-type "gchar*") - (parameters - '("gint" "offset") - '("AtkTextBoundary" "boundary_type") - '("gint*" "start_offset") - '("gint*" "end_offset") - ) -) - -(define-virtual get_caret_offset - (of-object "AtkText") - (return-type "gint") -) - -(define-virtual get_run_attributes - (of-object "AtkText") - (return-type "AtkAttributeSet*") - (parameters - '("gint" "offset") - '("gint*" "start_offset") - '("gint*" "end_offset") - ) -) - -(define-virtual get_default_attributes - (of-object "AtkText") - (return-type "AtkAttributeSet*") -) - -(define-virtual get_character_extents - (of-object "AtkText") - (return-type "none") - (parameters - '("gint" "offset") - '("gint*" "x") - '("gint*" "y") - '("gint*" "width") - '("gint*" "height") - '("AtkCoordType" "coords") - ) -) - -(define-virtual get_character_count - (of-object "AtkText") - (return-type "gint") -) - -(define-virtual get_offset_at_point - (of-object "AtkText") - (return-type "gint") - (parameters - '("gint" "x") - '("gint" "y") - '("AtkCoordType" "coords") - ) -) - -(define-virtual get_n_selections - (of-object "AtkText") - (return-type "gint") -) - -(define-virtual get_selection - (of-object "AtkText") - (return-type "gchar*") - (parameters - '("gint" "selection_num") - '("gint*" "start_offset") - '("gint*" "end_offset") - ) -) - -(define-virtual add_selection - (of-object "AtkText") - (return-type "gboolean") - (parameters - '("gint" "start_offset") - '("gint" "end_offset") - ) -) - -(define-virtual remove_selection - (of-object "AtkText") - (return-type "gboolean") - (parameters - '("gint" "selection_num") - ) -) - -(define-virtual set_selection - (of-object "AtkText") - (return-type "gboolean") - (parameters - '("gint" "selection_num") - '("gint" "start_offset") - '("gint" "end_offset") - ) -) - -(define-virtual set_caret_offset - (of-object "AtkText") - (return-type "gboolean") - (parameters - '("gint" "offset") - ) -) - -(define-virtual text_changed - (of-object "AtkText") - (return-type "none") - (parameters - '("gint" "position") - '("gint" "length") - ) -) - -(define-virtual text_caret_moved - (of-object "AtkText") - (return-type "none") - (parameters - '("gint" "location") - ) -) - -(define-virtual text_selection_changed - (of-object "AtkText") - (return-type "none") -) - -(define-virtual text_attributes_changed - (of-object "AtkText") - (return-type "none") -) - -(define-virtual get_range_extents - (of-object "AtkText") - (return-type "none") - (parameters - '("gint" "start_offset") - '("gint" "end_offset") - '("AtkCoordType" "coord_type") - '("AtkTextRectangle*" "rect") - ) -) - -(define-virtual get_bounded_ranges - (of-object "AtkText") - (return-type "AtkTextRange**") - (parameters - '("AtkTextRectangle*" "rect") - '("AtkCoordType" "coord_type") - '("AtkTextClipType" "x_clip_type") - '("AtkTextClipType" "y_clip_type") - ) -) - - - -;; From /usr/include/atk-1.0/atk/atkutil.h - -(define-function atk_util_get_type - (c-name "atk_util_get_type") - (return-type "GType") -) - -(define-function add_focus_tracker - (c-name "atk_add_focus_tracker") - (return-type "guint") - (parameters - '("AtkEventListener" "focus_tracker") - ) -) - -(define-function remove_focus_tracker - (c-name "atk_remove_focus_tracker") - (return-type "none") - (parameters - '("guint" "tracker_id") - ) -) - -(define-function focus_tracker_init - (c-name "atk_focus_tracker_init") - (return-type "none") - (parameters - '("AtkEventListenerInit" "add_function") - ) -) - -(define-function focus_tracker_notify - (c-name "atk_focus_tracker_notify") - (return-type "none") - (parameters - '("AtkObject*" "object") - ) -) - -(define-function add_global_event_listener - (c-name "atk_add_global_event_listener") - (return-type "guint") - (parameters - '("GSignalEmissionHook" "listener") - '("const-gchar*" "event_type") - ) -) - -(define-function remove_global_event_listener - (c-name "atk_remove_global_event_listener") - (return-type "none") - (parameters - '("guint" "listener_id") - ) -) - -(define-function add_key_event_listener - (c-name "atk_add_key_event_listener") - (return-type "guint") - (parameters - '("AtkKeySnoopFunc" "listener") - '("gpointer" "data") - ) -) - -(define-function remove_key_event_listener - (c-name "atk_remove_key_event_listener") - (return-type "none") - (parameters - '("guint" "listener_id") - ) -) - -(define-function get_root - (c-name "atk_get_root") - (return-type "AtkObject*") -) - -(define-function get_toolkit_name - (c-name "atk_get_toolkit_name") - (return-type "const-gchar*") -) - -(define-function get_toolkit_version - (c-name "atk_get_toolkit_version") - (return-type "const-gchar*") -) - -(define-function get_focus_object - (c-name "atk_get_focus_object") - (return-type "AtkObject*") -) - -(define-virtual add_global_event_listener - (of-object "AtkUtil") - (return-type "guint") - (parameters - '("const-gchar*" "event_type") - ) -) - -(define-virtual remove_global_event_listener - (of-object "AtkUtil") - (return-type "none") -) - -(define-virtual add_key_event_listener - (of-object "AtkUtil") - (return-type "guint") - (parameters - '("gpointer" "data") - ) -) - -(define-virtual remove_key_event_listener - (of-object "AtkUtil") - (return-type "none") -) - - - -;; From /usr/include/atk-1.0/atk/atkvalue.h - -(define-function atk_value_get_type - (c-name "atk_value_get_type") - (return-type "GType") -) - -(define-method get_current_value - (of-object "AtkValue") - (c-name "atk_value_get_current_value") - (return-type "none") - (parameters - '("GValue*" "value") - ) -) - -(define-method get_maximum_value - (of-object "AtkValue") - (c-name "atk_value_get_maximum_value") - (return-type "none") - (parameters - '("GValue*" "value") - ) -) - -(define-method get_minimum_value - (of-object "AtkValue") - (c-name "atk_value_get_minimum_value") - (return-type "none") - (parameters - '("GValue*" "value") - ) -) - -(define-method set_current_value - (of-object "AtkValue") - (c-name "atk_value_set_current_value") - (return-type "gboolean") - (parameters - '("const-GValue*" "value") - ) -) - -(define-virtual get_current_value - (of-object "AtkValue") - (return-type "none") - (parameters - '("GValue*" "value") - ) -) - -(define-virtual get_maximum_value - (of-object "AtkValue") - (return-type "none") - (parameters - '("GValue*" "value") - ) -) - -(define-virtual get_minimum_value - (of-object "AtkValue") - (return-type "none") - (parameters - '("GValue*" "value") - ) -) - -(define-virtual set_current_value - (of-object "AtkValue") - (return-type "gboolean") - (parameters - '("const-GValue*" "value") - ) -) - -(define-function role_get_name - (c-name "atk_role_get_name") - (return-type "const-gchar*") - (parameters - '("AtkRole" "role") - ) -) - -(define-function role_for_name - (c-name "atk_role_for_name") - (return-type "AtkRole") - (parameters - '("const-gchar*" "name") - ) -) - -(define-function rectangle_new - (c-name "atk_rectangle_new") - (is-constructor-of "AtkRectangle") - (return-type "AtkRectangle") -) - diff --git a/atk.override b/atk.override deleted file mode 100644 index 7cb7beb9..00000000 --- a/atk.override +++ /dev/null @@ -1,690 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * atk.override: overrides for the ATK library - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -headers -#define NO_IMPORT_PYGOBJECT -#include "pygobject.h" -#include -#include -#include -#include - -%% -include - atkrectangle.override -%% -modulename atk -%% -import gobject.GObject as PyGObject_Type -%% -ignore - atk_text_free_ranges - AtkObjectFactory__do_create_accessible - AtkObjectFactory__proxy_do_create_accessible - AtkUtil__do_add_global_event_listener - AtkUtil__proxy_do_add_global_event_listener - AtkUtil__do_remove_global_event_listener - AtkUtil__proxy_do_remove_global_event_listener - AtkUtil__do_add_key_event_listener - AtkUtil__proxy_do_add_key_event_listener - AtkUtil__do_remove_key_event_listener - AtkUtil__proxy_do_remove_key_event_listener -%% -ignore-glob - *_get_type -%% -override atk_relation_new kwargs -static int -_wrap_atk_relation_new (PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "targets", "relationship", NULL }; - AtkObject **targets; - int relationship, count, i; - PyObject *py_targets; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "Oi:relation_new", kwlist, - &py_targets, &relationship)) - return -1; - - if (!PySequence_Check(py_targets)) { - PyErr_SetString(PyExc_TypeError, - "targets argument must be a non-empty sequence"); - return -1; - } - - if ((count = PySequence_Length(py_targets)) == 0) { - PyErr_SetString(PyExc_ValueError, - "targets argument must be a non-empty sequence"); - return -1; - } - targets = g_new(AtkObject *, count); - for (i = 0; i < count; i++) { - PyObject *item = PySequence_GetItem(py_targets, i); - Py_DECREF(item); /* PySequence_GetItem INCREF's */ - if (!pygobject_check(item, &PyAtkObject_Type)) { - PyErr_SetString(PyExc_TypeError, "targets argument must be a sequence of AtkObjects."); - g_free(targets); - return -1; - } - - targets[i] = (AtkObject *) pygobject_get(item); - } - - self->obj = (GObject *) atk_relation_new(targets, count, relationship); - - g_free(targets); - - pygobject_register_wrapper((PyObject *) self); - return 0; -} -%% -override atk_component_get_extents kwargs -static PyObject * -_wrap_atk_component_get_extents(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "coord_type", NULL }; - gint x, y, width, height; - AtkCoordType coord_type; - PyObject *py_coord_type; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:atk.Component.get_extents", kwlist, - &py_coord_type)) - return NULL; - - if (pyg_enum_get_value(ATK_TYPE_COORD_TYPE, py_coord_type, - (gint *)&coord_type)) - return NULL; - atk_component_get_extents(ATK_COMPONENT(self->obj), &x, &y, &width, - &height, coord_type); - return Py_BuildValue("(iiii)", x, y, width, height); -} -%% -override atk_component_get_position kwargs -static PyObject * -_wrap_atk_component_get_position(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "coord_type", NULL }; - gint x, y; - AtkCoordType coord_type; - PyObject *py_coord_type; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:atk.Component.get_position", kwlist, - &py_coord_type)) - return NULL; - - if (pyg_enum_get_value(ATK_TYPE_COORD_TYPE, py_coord_type, - (gint *)&coord_type)) - return NULL; - atk_component_get_position(ATK_COMPONENT(self->obj), &x, &y, coord_type); - return Py_BuildValue("(ii)", x, y); -} -%% -override atk_component_get_size noargs -static PyObject * -_wrap_atk_component_get_size(PyGObject *self) -{ - gint width, height; - - atk_component_get_size(ATK_COMPONENT(self->obj), &width, &height); - return Py_BuildValue("(ii)", width, height); -} -%% -override atk_editable_text_set_run_attributes kwargs -static PyObject * -_wrap_atk_editable_text_set_run_attributes(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "attrib_set", "start_offset", "end_offset", - NULL }; - gint start, end, n_attrs, i; - gboolean ret; - AtkAttributeSet *attrib_set = NULL; - PyObject *py_attrib_set; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "Oii:atk.EditableText.set_run_attributes", - kwlist, &py_attrib_set, &start, &end)) - return NULL; - - - if (!(py_attrib_set = PySequence_Fast(py_attrib_set, - "attrib_set must be a sequence"))) - return NULL; - - n_attrs = PySequence_Fast_GET_SIZE(py_attrib_set); - for (i = 0; i < n_attrs; i++) { - PyObject *item = PySequence_Fast_GET_ITEM(py_attrib_set, i); - AtkAttribute *attr = g_new0(AtkAttribute, 1); - if (!PyArg_ParseTuple(item, "ss", &attr->name, &attr->value)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "attrib_set items should be (string,string)"); - g_free(attr); - g_slist_foreach(attrib_set, (GFunc)g_free, NULL); - g_slist_free(attrib_set); - Py_DECREF(py_attrib_set); - return NULL; - } - attrib_set = g_slist_append(attrib_set, attr); - } - ret = atk_editable_text_set_run_attributes(ATK_EDITABLE_TEXT(self->obj), - attrib_set, start, end); - - g_slist_foreach(attrib_set, (GFunc)g_free, NULL); - g_slist_free(attrib_set); - Py_DECREF(py_attrib_set); - return PyBool_FromLong(ret); -} -%% -override atk_editable_text_insert_text kwargs -static PyObject * -_wrap_atk_editable_text_insert_text(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "string", "length", "position", - NULL }; - gint length, position; - const gchar *string; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "sii:atk.EditableText.insert_text", - kwlist, &string, &length, &position)) - return NULL; - - atk_editable_text_insert_text(ATK_EDITABLE_TEXT(self->obj), - string, length, &position); - return PyInt_FromLong(position); -} -%% -override atk_image_get_image_size noargs -static PyObject * -_wrap_atk_image_get_image_size(PyGObject *self) -{ - gint width, height; - - atk_image_get_image_size(ATK_IMAGE(self->obj), &width, &height); - return Py_BuildValue("(ii)", width, height); -} -%% -override atk_image_get_image_position kwargs -static PyObject * -_wrap_atk_image_get_image_position(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "coord_type", NULL }; - gint x, y; - AtkCoordType coord_type; - PyObject *py_coord_type; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:atk.Image.get_image_position", kwlist, - &py_coord_type)) - return NULL; - - if (pyg_enum_get_value(ATK_TYPE_COORD_TYPE, py_coord_type, - (gint *)&coord_type)) - return NULL; - atk_image_get_image_position(ATK_IMAGE(self->obj), &x, &y, coord_type); - return Py_BuildValue("(ii)", x, y); -} -%% -override atk_relation_get_target noargs -static PyObject * -_wrap_atk_relation_get_target (PyGObject *self) -{ - GPtrArray * trgtarray; - AtkObject **targets; - int i; - PyObject *py_targets; - - trgtarray = atk_relation_get_target(ATK_RELATION(self->obj)); - py_targets = PyList_New(trgtarray->len); - targets = (AtkObject**)trgtarray->pdata; - for (i = 0; i < trgtarray->len; i++) { - PyObject *item = pygobject_new((GObject*)targets[i]); - PyList_SetItem(py_targets, i, item); - } - return py_targets; -} -%% -override atk_state_set_add_states kwargs -static PyObject * -_wrap_atk_state_set_add_states(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "types", NULL }; - AtkStateType *types; - gint count, i; - PyObject *py_types; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:atk.StateSet.add_states", - kwlist, &py_types)) - return NULL; - - if (!(py_types = PySequence_Fast(py_types, "types must be a sequence"))) - return NULL; - - count = PySequence_Fast_GET_SIZE(py_types); - types = g_new0(AtkStateType, count); - for (i = 0; i < count; i++) { - if (pyg_enum_get_value(ATK_TYPE_STATE_TYPE, - PySequence_Fast_GET_ITEM(py_types, i), - (gpointer)&types[i])) { - Py_DECREF(py_types); - return NULL; - } - } - atk_state_set_add_states(ATK_STATE_SET(self->obj), types, count); - - Py_DECREF(py_types); - Py_INCREF(Py_None); - return Py_None; -} -%% -override atk_state_set_contains_states kwargs -static PyObject * -_wrap_atk_state_set_contains_states(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "types", NULL }; - AtkStateType *types; - gint count, i; - gboolean ret; - PyObject *py_types, *py_ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:atk.StateSet.contains_states", - kwlist, &py_types)) - return NULL; - - if (!(py_types = PySequence_Fast(py_types, "types must be a sequence"))) - return NULL; - - count = PySequence_Fast_GET_SIZE(py_types); - types = g_new0(AtkStateType, count); - for (i = 0; i < count; i++) { - if (pyg_enum_get_value(ATK_TYPE_STATE_TYPE, - PySequence_Fast_GET_ITEM(py_types, i), - (gpointer)&types[i])) { - Py_DECREF(py_types); - return NULL; - } - } - ret = atk_state_set_contains_states(ATK_STATE_SET(self->obj), types, - count); - if (ret) - py_ret = Py_True; - else - py_ret = Py_False; - - Py_DECREF(py_types); - Py_INCREF(py_ret); - return py_ret; -} -%% -override atk_table_get_selected_columns noargs -static PyObject * -_wrap_atk_table_get_selected_columns(PyGObject *self) -{ - gint *selected, ret, i; - PyObject *py_selected; - - ret = atk_table_get_selected_columns(ATK_TABLE(self->obj), &selected); - py_selected = PyTuple_New(ret); - for (i = 0; i < ret; i++) { - PyTuple_SetItem(py_selected, i, PyInt_FromLong(selected[i])); - } - - g_free(selected); - return py_selected; -} -%% -override atk_table_get_selected_rows noargs -static PyObject * -_wrap_atk_table_get_selected_rows(PyGObject *self) -{ - gint *selected, ret, i; - PyObject *py_selected; - - ret = atk_table_get_selected_rows(ATK_TABLE(self->obj), &selected); - py_selected = PyTuple_New(ret); - for (i = 0; i < ret; i++) { - PyTuple_SetItem(py_selected, i, PyInt_FromLong(selected[i])); - } - - g_free(selected); - return py_selected; -} -%% -override atk_text_get_text_after_offset kwargs -static PyObject * -_wrap_atk_text_get_text_after_offset(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "offset", "boundary_type", NULL }; - gchar *text; - gint start, end, offset; - AtkTextBoundary boundary; - PyObject *py_boundary; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "iO:atk.Text.get_text_after_offset", - kwlist, &offset, &py_boundary)) - return NULL; - - if (pyg_enum_get_value(ATK_TYPE_TEXT_BOUNDARY, py_boundary, - (gpointer)&boundary)) - return NULL; - - text = atk_text_get_text_after_offset(ATK_TEXT(self->obj), - offset, boundary, &start, &end); - return Py_BuildValue("(s#ii)", text, (Py_ssize_t) (end - start), start, end); -} -%% -override atk_text_get_text_at_offset kwargs -static PyObject * -_wrap_atk_text_get_text_at_offset(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "offset", "boundary_type", NULL }; - gchar *text; - gint start, end, offset; - AtkTextBoundary boundary; - PyObject *py_boundary; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "iO:atk.Text.get_text_at_offset", - kwlist, &offset, &py_boundary)) - return NULL; - - if (pyg_enum_get_value(ATK_TYPE_TEXT_BOUNDARY, py_boundary, - (gpointer)&boundary)) - return NULL; - - text = atk_text_get_text_at_offset(ATK_TEXT(self->obj), - offset, boundary, &start, &end); - return Py_BuildValue("(s#ii)", text, (Py_ssize_t) (end - start), start, end); -} -%% -override atk_text_get_text_before_offset kwargs -static PyObject * -_wrap_atk_text_get_text_before_offset(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "offset", "boundary_type", NULL }; - gchar *text; - gint start, end, offset; - AtkTextBoundary boundary; - PyObject *py_boundary; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "iO:atk.Text.get_text_before_offset", - kwlist, &offset, &py_boundary)) - return NULL; - - if (pyg_enum_get_value(ATK_TYPE_TEXT_BOUNDARY, py_boundary, - (gpointer)&boundary)) - return NULL; - - text = atk_text_get_text_before_offset(ATK_TEXT(self->obj), - offset, boundary, &start, &end); - return Py_BuildValue("(s#ii)", text, (Py_ssize_t) (end - start), start, end); -} -%% -override atk_text_get_character_extents kwargs -static PyObject * -_wrap_atk_text_get_character_extents(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "offset", "coords", NULL }; - gint offset, x, y, width, height; - AtkCoordType coords; - PyObject *py_coords; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "iO:atk.Text.get_character_extents", - kwlist, &offset, &py_coords)) - return NULL; - - if (pyg_enum_get_value(ATK_TYPE_COORD_TYPE, py_coords, - (gpointer)&coords)) - return NULL; - - atk_text_get_character_extents(ATK_TEXT(self->obj), offset, - &x, &y, &width, &height, coords); - return Py_BuildValue("(iiii)", x, y, width, height); -} -%% -override atk_text_get_run_attributes kwargs -static PyObject * -_wrap_atk_text_get_run_attributes(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "offset", NULL }; - gint offset, start, end; - AtkAttributeSet *attribs; - PyObject *py_attribs; - gint count, i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "iO:atk.Text.get_run_attributes", - kwlist, &offset)) - return NULL; - - attribs = atk_text_get_run_attributes(ATK_TEXT(self->obj), offset, - &start, &end); - count = g_slist_length(attribs); - py_attribs = PyTuple_New(count); - for (i = 0; i < count; i++) { - AtkAttribute *attr = g_slist_nth_data(attribs, i); - PyTuple_SetItem(py_attribs, i, Py_BuildValue("(ss)", attr->name, - attr->value)); - } - atk_attribute_set_free(attribs); - return Py_BuildValue("(Nii)", py_attribs, start, end); -} -%% -override atk_text_get_default_attributes noargs -static PyObject * -_wrap_atk_text_get_default_attributes(PyGObject *self) -{ - AtkAttributeSet *attribs; - PyObject *py_attribs; - gint count, i; - - attribs = atk_text_get_default_attributes(ATK_TEXT(self->obj)); - count = g_slist_length(attribs); - py_attribs = PyTuple_New(count); - for (i = 0; i < count; i++) { - AtkAttribute *attr = g_slist_nth_data(attribs, i); - PyTuple_SetItem(py_attribs, i, Py_BuildValue("(ss)", attr->name, - attr->value)); - } - atk_attribute_set_free(attribs); - return py_attribs; -} -%% -override atk_text_get_bounded_ranges kwargs -static PyObject * -_wrap_atk_text_get_bounded_ranges(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "rect", "coord_type", "x_clip_type", - "y_clip_type", NULL }; - AtkRectangle rect; - AtkCoordType coord; - AtkTextClipType x_clip, y_clip; - AtkTextRange **ranges, *range; - PyObject *py_rect, *py_coord, *py_x_clip, *py_y_clip, *py_ranges; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OOOO:atk.Text.get_bounded_ranges", - kwlist, &py_rect, &py_coord, &py_x_clip, - &py_y_clip)) - return NULL; - - if (pyatk_rectangle_from_pyobject(py_rect, &rect)) - return NULL; - if (pyg_enum_get_value(ATK_TYPE_COORD_TYPE, py_coord, (gpointer)&coord)) - return NULL; - if (pyg_enum_get_value(ATK_TYPE_TEXT_CLIP_TYPE, py_x_clip, - (gpointer)&x_clip)) - return NULL; - if (pyg_enum_get_value(ATK_TYPE_TEXT_CLIP_TYPE, py_y_clip, - (gpointer)&y_clip)) - return NULL; - - ranges = atk_text_get_bounded_ranges(ATK_TEXT(self->obj), - (AtkTextRectangle*)&rect, coord, - x_clip, y_clip); - py_ranges = PyList_New(0); - while ((range = *ranges++)) { - PyObject *py_range; - py_rect = pyg_boxed_new(ATK_TYPE_RECTANGLE, - (AtkRectangle*)&range->bounds, TRUE, TRUE); - py_range = Py_BuildValue("(Niis)", py_rect, range->start_offset, - range->end_offset, range->content); - PyList_Append(py_ranges, py_range); - Py_DECREF(py_range); - } - atk_text_free_ranges(ranges); - - return py_ranges; -} -%% -override atk_text_get_selection kwargs -static PyObject * -_wrap_atk_text_get_selection(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "selection_num", NULL }; - gchar *text; - gint start, end, selection_num; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "iO:atk.Text.get_selection", - kwlist, &selection_num)) - return NULL; - - text = atk_text_get_selection(ATK_TEXT(self->obj), - selection_num, &start, &end); - return Py_BuildValue("(s#ii)", text, (Py_ssize_t) (end - start), start, end); -} -%% -override atk_text_get_range_extents kwargs -static PyObject * -_wrap_atk_text_get_range_extents(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "start_offset", "end_offset", "coord_type", - NULL }; - gint start, end; - AtkCoordType coord; - AtkTextRectangle rect; - PyObject *py_coord; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "iiO:atk.Text.get_range_extents", - kwlist, &start, &end, &py_coord)) - return NULL; - - if (pyg_enum_get_value(ATK_TYPE_COORD_TYPE, py_coord, - (gpointer)&coord)) - return NULL; - - atk_text_get_range_extents(ATK_TEXT(self->obj), start, end, coord, &rect); - return pyg_boxed_new(ATK_TYPE_RECTANGLE, (AtkRectangle*)&rect, TRUE, TRUE); -} -%% -override atk_value_get_current_value noargs -static PyObject * -_wrap_atk_value_get_current_value(PyGObject *self) -{ - GValue value = { 0, }; - PyObject *ret; - - atk_value_get_current_value(ATK_VALUE(self->obj), &value); - ret = pyg_value_as_pyobject(&value, TRUE); - g_value_unset(&value); - return ret; -} -%% -override atk_value_get_maximum_value noargs -static PyObject * -_wrap_atk_value_get_maximum_value(PyGObject *self) -{ - GValue value = { 0, }; - PyObject *ret; - - atk_value_get_maximum_value(ATK_VALUE(self->obj), &value); - ret = pyg_value_as_pyobject(&value, TRUE); - g_value_unset(&value); - return ret; -} -%% -override atk_value_get_minimum_value noargs -static PyObject * -_wrap_atk_value_get_minimum_value(PyGObject *self) -{ - GValue value = { 0, }; - PyObject *ret; - - atk_value_get_minimum_value(ATK_VALUE(self->obj), &value); - ret = pyg_value_as_pyobject(&value, TRUE); - g_value_unset(&value); - return ret; -} -%% -override atk_value_set_current_value kwargs -static PyObject * -_wrap_atk_value_set_current_value(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "value", NULL }; - GValue value = { 0, }; - PyObject *ret, *py_value; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:atk.Value.set_current_value", - kwlist, &py_value)) - return NULL; - - if (pyg_value_from_pyobject(&value, py_value)) { - PyErr_SetString(PyExc_TypeError, "unable to convert value"); - return NULL; - } - - if (atk_value_set_current_value(ATK_VALUE(self->obj), &value)) - ret = Py_True; - else - ret = Py_False; - - g_value_unset(&value); - Py_INCREF(ret); - return ret; -} diff --git a/atkmodule.c b/atkmodule.c deleted file mode 100644 index 91c447a9..00000000 --- a/atkmodule.c +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * atkmodule.c: module wrapping the ATK library. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -/* include this first, before NO_IMPORT_PYGOBJECT is defined */ -#include - -void pyatk_register_classes (PyObject *d); -void pyatk_add_constants(PyObject *module, const gchar *strip_prefix); -void _pyatk_register_boxed_types(void); - -extern PyMethodDef pyatk_functions[]; - -DL_EXPORT(void) -initatk(void) -{ - PyObject *m, *d; - - init_pygobject (); - - m = Py_InitModule ("atk", pyatk_functions); - d = PyModule_GetDict (m); - _pyatk_register_boxed_types(); - pyatk_register_classes (d); - pyatk_add_constants(m, "ATK_"); -} diff --git a/atkrectangle.override b/atkrectangle.override deleted file mode 100644 index 4b2c01ae..00000000 --- a/atkrectangle.override +++ /dev/null @@ -1,265 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 2006 John Finlay - * - * atkrectangle.override: atk.Rectangle overrides - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -headers - -static gboolean -pyatk_rectangle_from_pyobject(PyObject *object, AtkRectangle *rectangle) -{ - g_return_val_if_fail(rectangle != NULL, FALSE); - - if (pyg_boxed_check(object, ATK_TYPE_RECTANGLE)) { - *rectangle = *pyg_boxed_get(object, AtkRectangle); - return TRUE; - } - if (PyArg_ParseTuple(object, "iiii", &rectangle->x, &rectangle->y, - &rectangle->width, &rectangle->height)) { - return TRUE; - } - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, "could not convert to AtkRectangle"); - return FALSE; -} - -static PyObject * -PyAtkRectangle_from_value(const GValue *value) -{ - AtkRectangle *rect = (AtkRectangle *)g_value_get_boxed(value); - - return pyg_boxed_new(ATK_TYPE_RECTANGLE, rect, TRUE, TRUE); -} -static int -PyAtkRectangle_to_value(GValue *value, PyObject *object) -{ - AtkRectangle rect; - - if (!pyatk_rectangle_from_pyobject(object, &rect)) - return -1; - - g_value_set_boxed(value, &rect); - return 0; -} - -void -_pyatk_register_boxed_types(void) -{ - pyg_register_boxed_custom(ATK_TYPE_RECTANGLE, - PyAtkRectangle_from_value, - PyAtkRectangle_to_value); -} -%% -override atk_rectangle_new kwargs -static int -_wrap_atk_rectangle_new(PyGBoxed *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "x", "y", "width", "height", NULL }; - AtkRectangle rect = {0, 0, 0, 0}; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|iiii:AtkRectangle.__init__", - kwlist, &(rect.x), &(rect.y), - &(rect.width), &(rect.height))) - return -1; - - self->boxed = g_boxed_copy(ATK_TYPE_RECTANGLE, &rect); - self->free_on_dealloc = TRUE; - self->gtype = ATK_TYPE_RECTANGLE; - - return 0; -} -%% -override-slot AtkRectangle.tp_as_sequence -static Py_ssize_t -_wrap_atk_rectangle_length(PyGBoxed *self) -{ - return 4; -} -static PyObject * -_wrap_atk_rectangle_getitem(PyGBoxed *self, Py_ssize_t pos) -{ - AtkRectangle *rect; - - if (pos < 0) pos += 4; - if (pos < 0 || pos >= 4) { - PyErr_SetString(PyExc_IndexError, "index out of range"); - return NULL; - } - rect = pyg_boxed_get(self, AtkRectangle); - switch (pos) { - case 0: return PyInt_FromLong(rect->x); - case 1: return PyInt_FromLong(rect->y); - case 2: return PyInt_FromLong(rect->width); - case 3: return PyInt_FromLong(rect->height); - default: - g_assert_not_reached(); - return NULL; - } -} -static int -_wrap_atk_rectangle_setitem(PyGBoxed *self, Py_ssize_t pos, PyObject *value) -{ - AtkRectangle *rect; - gint val; - - if (pos < 0) pos += 4; - if (pos < 0 || pos >= 4) { - PyErr_SetString(PyExc_IndexError, "index out of range"); - return -1; - } - rect = pyg_boxed_get(self, AtkRectangle); - val = PyInt_AsLong(value); - if (PyErr_Occurred()) - return -1; - switch(pos) { - case 0: rect->x = val; break; - case 1: rect->y = val; break; - case 2: rect->width = val; break; - case 3: rect->height = val; break; - default: - g_assert_not_reached(); - return -1; - } - return 0; -} -static PySequenceMethods _wrap_atk_rectangle_tp_as_sequence = { - (lenfunc)_wrap_atk_rectangle_length, /* sq_length */ - 0, /* sq_concat */ - 0, /* sq_repeat */ - (ssizeargfunc)_wrap_atk_rectangle_getitem, /* sq_item */ - 0, /* sq_slice */ - (ssizeobjargproc)_wrap_atk_rectangle_setitem, /* sq_ass_item */ - 0, /* sq_contains */ - 0, /* sq_inplace_concat */ - 0 /* sq_inplace_repeat */ -}; -%% -override-attr AtkRectangle.x -static int -_wrap_atk_rectangle__set_x(PyGBoxed *self, PyObject *value, void *closure) -{ - gint val; - - val = PyInt_AsLong(value); - if (PyErr_Occurred()) - return -1; - pyg_boxed_get(self, AtkRectangle)->x = val; - return 0; -} -%% -override-attr AtkRectangle.y -static int -_wrap_atk_rectangle__set_y(PyGBoxed *self, PyObject *value, void *closure) -{ - gint val; - - val = PyInt_AsLong(value); - if (PyErr_Occurred()) - return -1; - pyg_boxed_get(self, AtkRectangle)->y = val; - return 0; -} -%% -override-attr AtkRectangle.width -static int -_wrap_atk_rectangle__set_width(PyGBoxed *self, PyObject *value, void *closure) -{ - gint val; - - val = PyInt_AsLong(value); - if (PyErr_Occurred()) - return -1; - pyg_boxed_get(self, AtkRectangle)->width = val; - return 0; -} -%% -override-attr AtkRectangle.height -static int -_wrap_atk_rectangle__set_height(PyGBoxed *self, PyObject *value, void *closure) -{ - gint val; - - val = PyInt_AsLong(value); - if (PyErr_Occurred()) - return -1; - pyg_boxed_get(self, AtkRectangle)->height = val; - return 0; -} -%% -override atk_rectangle_intersect kwargs -static PyObject * -_wrap_atk_rectangle_intersect(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "src", NULL }; - PyObject *py_src; - AtkRectangle src, dest = {0, 0, 0, 0}; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:AtkRectangle.intersect", - kwlist, &py_src)) { - return NULL; - } - - if (!pyg_boxed_check(py_src, ATK_TYPE_RECTANGLE)) { - if (!pyatk_rectangle_from_pyobject(py_src, &src)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "src must be a AtkRectangle or 4-tuple"); - return NULL; - } - } else { - src = *pyg_boxed_get(py_src, AtkRectangle); - } - - atk_rectangle_intersect(pyg_boxed_get(self, AtkRectangle), &src, &dest); - - return pyg_boxed_new(ATK_TYPE_RECTANGLE, &dest, TRUE, TRUE); -} -%% -override atk_rectangle_union kwargs -static PyObject * -_wrap_atk_rectangle_union(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "src", NULL }; - PyObject *py_src; - AtkRectangle src, dest; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:AtkRectangle.union", - kwlist, &py_src)) { - return NULL; - } - - if (!pyg_boxed_check(py_src, ATK_TYPE_RECTANGLE)) { - if (!pyatk_rectangle_from_pyobject(py_src, &src)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "src must be a AtkRectangle or 4-tuple"); - return NULL; - } - } else { - src = *pyg_boxed_get(py_src, AtkRectangle); - } - - atk_rectangle_union(pyg_boxed_get(self, AtkRectangle), &src, &dest); - - return pyg_boxed_new(ATK_TYPE_RECTANGLE, &dest, TRUE, TRUE); -} diff --git a/autogen.sh b/autogen.sh deleted file mode 100755 index 51ae4903..00000000 --- a/autogen.sh +++ /dev/null @@ -1,477 +0,0 @@ -#!/bin/sh -# Run this to generate all the initial makefiles, etc. - -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. - -REQUIRED_AUTOMAKE_VERSION=1.8 - -PKG_NAME="PyGTK" -ACLOCAL_FLAGS="-I `pwd`/m4 $ACLOCAL_FLAGS" - -#name of package -PKG_NAME=${PKG_NAME:-Package} -srcdir=${srcdir:-.} - -# default version requirements ... -REQUIRED_AUTOCONF_VERSION=${REQUIRED_AUTOCONF_VERSION:-2.53} -REQUIRED_AUTOMAKE_VERSION=${REQUIRED_AUTOMAKE_VERSION:-1.4} -REQUIRED_LIBTOOL_VERSION=${REQUIRED_LIBTOOL_VERSION:-1.4.3} -REQUIRED_GETTEXT_VERSION=${REQUIRED_GETTEXT_VERSION:-0.10.40} -REQUIRED_GLIB_GETTEXT_VERSION=${REQUIRED_GLIB_GETTEXT_VERSION:-2.2.0} -REQUIRED_INTLTOOL_VERSION=${REQUIRED_INTLTOOL_VERSION:-0.25} -REQUIRED_PKG_CONFIG_VERSION=${REQUIRED_PKG_CONFIG_VERSION:-0.14.0} -REQUIRED_GTK_DOC_VERSION=${REQUIRED_GTK_DOC_VERSION:-1.0} -REQUIRED_DOC_COMMON_VERSION=${REQUIRED_DOC_COMMON_VERSION:-2.3.0} -REQUIRED_GNOME_DOC_UTILS_VERSION=${REQUIRED_GNOME_DOC_UTILS_VERSION:-0.3.2} - -# a list of required m4 macros. Package can set an initial value -REQUIRED_M4MACROS=${REQUIRED_M4MACROS:-} -FORBIDDEN_M4MACROS=${FORBIDDEN_M4MACROS:-} - -# Not all echo versions allow -n, so we check what is possible. This test is -# based on the one in autoconf. -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ;; - *c*,* ) ECHO_N=-n ;; - *) ECHO_N= ;; -esac - -# some terminal codes ... -boldface="`tput bold 2>/dev/null`" -normal="`tput sgr0 2>/dev/null`" -printbold() { - echo $ECHO_N "$boldface" - echo "$@" - echo $ECHO_N "$normal" -} -printerr() { - echo "$@" >&2 -} - -# Usage: -# compare_versions MIN_VERSION ACTUAL_VERSION -# returns true if ACTUAL_VERSION >= MIN_VERSION -compare_versions() { - ch_min_version=$1 - ch_actual_version=$2 - ch_status=0 - IFS="${IFS= }"; ch_save_IFS="$IFS"; IFS="." - set $ch_actual_version - for ch_min in $ch_min_version; do - ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes - if [ -z "$ch_min" ]; then break; fi - if [ -z "$ch_cur" ]; then ch_status=1; break; fi - if [ $ch_cur -gt $ch_min ]; then break; fi - if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi - done - IFS="$ch_save_IFS" - return $ch_status -} - -# Usage: -# version_check PACKAGE VARIABLE CHECKPROGS MIN_VERSION SOURCE -# checks to see if the package is available -version_check() { - vc_package=$1 - vc_variable=$2 - vc_checkprogs=$3 - vc_min_version=$4 - vc_source=$5 - vc_status=1 - - vc_checkprog=`eval echo "\\$$vc_variable"` - if [ -n "$vc_checkprog" ]; then - printbold "using $vc_checkprog for $vc_package" - return 0 - fi - - if test "x$vc_package" = "xautomake" -a "x$vc_min_version" = "x1.4"; then - vc_comparator="=" - else - vc_comparator=">=" - fi - printbold "checking for $vc_package $vc_comparator $vc_min_version..." - for vc_checkprog in $vc_checkprogs; do - echo $ECHO_N " testing $vc_checkprog... " - if $vc_checkprog --version < /dev/null > /dev/null 2>&1; then - vc_actual_version=`$vc_checkprog --version | head -n 1 | \ - sed 's/^.*[ ]\([0-9.]*[a-z]*\).*$/\1/'` - if compare_versions $vc_min_version $vc_actual_version; then - echo "found $vc_actual_version" - # set variables - eval "$vc_variable=$vc_checkprog; \ - ${vc_variable}_VERSION=$vc_actual_version" - vc_status=0 - break - else - echo "too old (found version $vc_actual_version)" - fi - else - echo "not found." - fi - done - if [ "$vc_status" != 0 ]; then - printerr "***Error***: You must have $vc_package $vc_comparator $vc_min_version installed" - printerr " to build $PKG_NAME. Download the appropriate package for" - printerr " from your distribution or get the source tarball at" - printerr " $vc_source" - printerr - fi - return $vc_status -} - -# Usage: -# require_m4macro filename.m4 -# adds filename.m4 to the list of required macros -require_m4macro() { - case "$REQUIRED_M4MACROS" in - $1\ * | *\ $1\ * | *\ $1) ;; - *) REQUIRED_M4MACROS="$REQUIRED_M4MACROS $1" ;; - esac -} - -forbid_m4macro() { - case "$FORBIDDEN_M4MACROS" in - $1\ * | *\ $1\ * | *\ $1) ;; - *) FORBIDDEN_M4MACROS="$FORBIDDEN_M4MACROS $1" ;; - esac -} - -# Usage: -# add_to_cm_macrodirs dirname -# Adds the dir to $cm_macrodirs, if it's not there yet. -add_to_cm_macrodirs() { - case $cm_macrodirs in - "$1 "* | *" $1 "* | *" $1") ;; - *) cm_macrodirs="$cm_macrodirs $1";; - esac -} - -# Usage: -# check_m4macros -# Checks that all the requested macro files are in the aclocal macro path -# Uses REQUIRED_M4MACROS and ACLOCAL variables. -check_m4macros() { - # construct list of macro directories - cm_macrodirs=`$ACLOCAL --print-ac-dir` - # aclocal also searches a version specific dir, eg. /usr/share/aclocal-1.9 - # but it contains only Automake's own macros, so we can ignore it. - - # Read the dirlist file, supported by Automake >= 1.7. - if compare_versions 1.7 $AUTOMAKE_VERSION && [ -s $cm_macrodirs/dirlist ]; then - cm_dirlist=`sed 's/[ ]*#.*//;/^$/d' $cm_macrodirs/dirlist` - if [ -n "$cm_dirlist" ] ; then - for cm_dir in $cm_dirlist; do - if [ -d $cm_dir ]; then - add_to_cm_macrodirs $cm_dir - fi - done - fi - fi - - # Parse $ACLOCAL_FLAGS - set - $ACLOCAL_FLAGS - while [ $# -gt 0 ]; do - if [ "$1" = "-I" ]; then - add_to_cm_macrodirs "$2" - shift - fi - shift - done - - cm_status=0 - if [ -n "$REQUIRED_M4MACROS" ]; then - printbold "Checking for required M4 macros..." - # check that each macro file is in one of the macro dirs - for cm_macro in $REQUIRED_M4MACROS; do - cm_macrofound=false - for cm_dir in $cm_macrodirs; do - if [ -f "$cm_dir/$cm_macro" ]; then - cm_macrofound=true - break - fi - # The macro dir in Cygwin environments may contain a file - # called dirlist containing other directories to look in. - if [ -f "$cm_dir/dirlist" ]; then - for cm_otherdir in `cat $cm_dir/dirlist`; do - if [ -f "$cm_otherdir/$cm_macro" ]; then - cm_macrofound=true - break - fi - done - fi - done - if $cm_macrofound; then - : - else - printerr " $cm_macro not found" - cm_status=1 - fi - done - fi - if [ -n "$FORBIDDEN_M4MACROS" ]; then - printbold "Checking for forbidden M4 macros..." - # check that each macro file is in one of the macro dirs - for cm_macro in $FORBIDDEN_M4MACROS; do - cm_macrofound=false - for cm_dir in $cm_macrodirs; do - if [ -f "$cm_dir/$cm_macro" ]; then - cm_macrofound=true - break - fi - done - if $cm_macrofound; then - printerr " $cm_macro found (should be cleared from macros dir)" - cm_status=1 - fi - done - fi - if [ "$cm_status" != 0 ]; then - printerr "***Error***: some autoconf macros required to build $PKG_NAME" - printerr " were not found in your aclocal path, or some forbidden" - printerr " macros were found. Perhaps you need to adjust your" - printerr " ACLOCAL_FLAGS?" - printerr - fi - return $cm_status -} - -# try to catch the case where the macros2/ directory hasn't been cleared out. -forbid_m4macro gnome-cxx-check.m4 - -want_libtool=false -want_gettext=false -want_glib_gettext=false -want_intltool=false -want_pkg_config=false -want_gtk_doc=false -want_gnome_doc_utils=false - -configure_files="`find $srcdir -name '{arch}' -prune -o -name configure.ac -print -o -name configure.in -print`" -for configure_ac in $configure_files; do - if grep "^A[CM]_PROG_LIBTOOL" $configure_ac >/dev/null || - grep "^LT_INIT" $configure_ac >/dev/null; then - want_libtool=true - fi - if grep "^AM_GNU_GETTEXT" $configure_ac >/dev/null; then - want_gettext=true - fi - if grep "^AM_GLIB_GNU_GETTEXT" $configure_ac >/dev/null; then - want_glib_gettext=true - fi - if grep "^AC_PROG_INTLTOOL" $configure_ac >/dev/null || - grep "^IT_PROG_INTLTOOL" $configure_ac >/dev/null; then - want_intltool=true - fi - if grep "^PKG_CHECK_MODULES" $configure_ac >/dev/null; then - want_pkg_config=true - fi - if grep "^GTK_DOC_CHECK" $configure_ac >/dev/null; then - want_gtk_doc=true - fi - if grep "^GNOME_DOC_INIT" $configure_ac >/dev/null; then - want_gnome_doc_utils=true - fi - - # check to make sure gnome-common macros can be found ... - if grep "^GNOME_COMMON_INIT" $configure_ac >/dev/null || - grep "^GNOME_DEBUG_CHECK" $configure_ac >/dev/null || - grep "^GNOME_MAINTAINER_MODE_DEFINES" $configure_ac >/dev/null; then - require_m4macro gnome-common.m4 - fi - if grep "^GNOME_COMPILE_WARNINGS" $configure_ac >/dev/null || - grep "^GNOME_CXX_WARNINGS" $configure_ac >/dev/null; then - require_m4macro gnome-compiler-flags.m4 - fi -done - -DIE=0 - -#tell Mandrake autoconf wrapper we want autoconf 2.5x, not 2.13 -WANT_AUTOCONF_2_5=1 -export WANT_AUTOCONF_2_5 -version_check autoconf AUTOCONF 'autoconf2.50 autoconf autoconf-2.53' $REQUIRED_AUTOCONF_VERSION \ - "http://ftp.gnu.org/pub/gnu/autoconf/autoconf-$REQUIRED_AUTOCONF_VERSION.tar.gz" || DIE=1 -AUTOHEADER=`echo $AUTOCONF | sed s/autoconf/autoheader/` - -case $REQUIRED_AUTOMAKE_VERSION in - 1.4*) automake_progs="automake-1.4" ;; - 1.5*) automake_progs="automake-1.5 automake-1.6 automake-1.7 automake-1.8 automake-1.9 automake-1.10" ;; - 1.6*) automake_progs="automake-1.6 automake-1.7 automake-1.8 automake-1.9 automake-1.10" ;; - 1.7*) automake_progs="automake-1.7 automake-1.8 automake-1.9 automake-1.10" ;; - 1.8*) automake_progs="automake-1.8 automake-1.9 automake-1.10" ;; - 1.9*) automake_progs="automake-1.9 automake-1-10" ;; - 1.10*) automake_progs="automake-1.10" ;; -esac -version_check automake AUTOMAKE "$automake_progs" $REQUIRED_AUTOMAKE_VERSION \ - "http://ftp.gnu.org/pub/gnu/automake/automake-$REQUIRED_AUTOMAKE_VERSION.tar.gz" || DIE=1 -ACLOCAL=`echo $AUTOMAKE | sed s/automake/aclocal/` - -if $want_libtool; then - version_check libtool LIBTOOLIZE libtoolize $REQUIRED_LIBTOOL_VERSION \ - "http://ftp.gnu.org/pub/gnu/libtool/libtool-$REQUIRED_LIBTOOL_VERSION.tar.gz" || DIE=1 - require_m4macro libtool.m4 -fi - -if $want_gettext; then - version_check gettext GETTEXTIZE gettextize $REQUIRED_GETTEXT_VERSION \ - "http://ftp.gnu.org/pub/gnu/gettext/gettext-$REQUIRED_GETTEXT_VERSION.tar.gz" || DIE=1 - require_m4macro gettext.m4 -fi - -if $want_glib_gettext; then - version_check glib-gettext GLIB_GETTEXTIZE glib-gettextize $REQUIRED_GLIB_GETTEXT_VERSION \ - "ftp://ftp.gtk.org/pub/gtk/v2.2/glib-$REQUIRED_GLIB_GETTEXT_VERSION.tar.gz" || DIE=1 - require_m4macro glib-gettext.m4 -fi - -if $want_intltool; then - version_check intltool INTLTOOLIZE intltoolize $REQUIRED_INTLTOOL_VERSION \ - "http://ftp.gnome.org/pub/GNOME/sources/intltool/" || DIE=1 - require_m4macro intltool.m4 -fi - -if $want_pkg_config; then - version_check pkg-config PKG_CONFIG pkg-config $REQUIRED_PKG_CONFIG_VERSION \ - "'http://www.freedesktop.org/software/pkgconfig/releases/pkgconfig-$REQUIRED_PKG_CONFIG_VERSION.tar.gz" || DIE=1 - require_m4macro pkg.m4 -fi - -if $want_gtk_doc; then - version_check gtk-doc GTKDOCIZE gtkdocize $REQUIRED_GTK_DOC_VERSION \ - "http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/" || DIE=1 - require_m4macro gtk-doc.m4 -fi - -if $want_gnome_doc_utils; then - version_check gnome-doc-utils GNOME_DOC_PREPARE gnome-doc-prepare $REQUIRED_GNOME_DOC_UTILS_VERSION \ - "http://ftp.gnome.org/pub/GNOME/sources/gnome-doc-utils/" || DIE=1 -fi - -if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then - version_check gnome-common DOC_COMMON gnome-doc-common \ - $REQUIRED_DOC_COMMON_VERSION " " || DIE=1 -fi - -check_m4macros || DIE=1 - -if [ "$DIE" -eq 1 ]; then - exit 1 -fi - -if [ "$#" = 0 ]; then - printerr "**Warning**: I am going to run \`configure' with no arguments." - printerr "If you wish to pass any to it, please specify them on the" - printerr \`$0\'" command line." - printerr -fi - -topdir=`pwd` -for configure_ac in $configure_files; do - dirname=`dirname $configure_ac` - basename=`basename $configure_ac` - if [ -f $dirname/NO-AUTO-GEN ]; then - echo skipping $dirname -- flagged as no auto-gen - elif [ ! -w $dirname ]; then - echo skipping $dirname -- directory is read only - else - printbold "Processing $configure_ac" - cd $dirname - - # Note that the order these tools are called should match what - # autoconf's "autoupdate" package does. See bug 138584 for - # details. - - # programs that might install new macros get run before aclocal - if grep "^A[CM]_PROG_LIBTOOL" $basename >/dev/null || - grep "^LT_INIT" $basename >/dev/null; then - printbold "Running $LIBTOOLIZE..." - $LIBTOOLIZE --force --copy || exit 1 - fi - - if grep "^AM_GLIB_GNU_GETTEXT" $basename >/dev/null; then - printbold "Running $GLIB_GETTEXTIZE... Ignore non-fatal messages." - echo "no" | $GLIB_GETTEXTIZE --force --copy || exit 1 - elif grep "^AM_GNU_GETTEXT" $basename >/dev/null; then - if grep "^AM_GNU_GETTEXT_VERSION" $basename > /dev/null; then - printbold "Running autopoint..." - autopoint --force || exit 1 - else - printbold "Running $GETTEXTIZE... Ignore non-fatal messages." - echo "no" | $GETTEXTIZE --force --copy || exit 1 - fi - fi - - if grep "^AC_PROG_INTLTOOL" $basename >/dev/null || - grep "^IT_PROG_INTLTOOL" $basename >/dev/null; then - printbold "Running $INTLTOOLIZE..." - $INTLTOOLIZE --force --copy --automake || exit 1 - fi - if grep "^GTK_DOC_CHECK" $basename >/dev/null; then - printbold "Running $GTKDOCIZE..." - $GTKDOCIZE --copy || exit 1 - fi - - if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then - printbold "Running gnome-doc-common..." - gnome-doc-common --copy || exit 1 - fi - if grep "^GNOME_DOC_INIT" $basename >/dev/null; then - printbold "Running $GNOME_DOC_PREPARE..." - $GNOME_DOC_PREPARE --force --copy || exit 1 - fi - - # Now run aclocal to pull in any additional macros needed - - # if the AC_CONFIG_MACRO_DIR() macro is used, pass that - # directory to aclocal. - m4dir=`cat "$basename" | grep '^AC_CONFIG_MACRO_DIR' | sed -n -e 's/AC_CONFIG_MACRO_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q` - if [ -n "$m4dir" ]; then - m4dir="-I $m4dir" - fi - printbold "Running $ACLOCAL..." - $ACLOCAL $m4dir $ACLOCAL_FLAGS || exit 1 - - if grep "GNOME_AUTOGEN_OBSOLETE" aclocal.m4 >/dev/null; then - printerr "*** obsolete gnome macros were used in $configure_ac" - fi - - # Now that all the macros are sorted, run autoconf and autoheader ... - printbold "Running $AUTOCONF..." - $AUTOCONF || exit 1 - if grep "^A[CM]_CONFIG_HEADER" $basename >/dev/null; then - printbold "Running $AUTOHEADER..." - $AUTOHEADER || exit 1 - # this prevents automake from thinking config.h.in is out of - # date, since autoheader doesn't touch the file if it doesn't - # change. - test -f config.h.in && touch config.h.in - fi - - # Finally, run automake to create the makefiles ... - printbold "Running $AUTOMAKE..." - cp -pf COPYING COPYING.autogen_bak - cp -pf INSTALL INSTALL.autogen_bak - if [ $REQUIRED_AUTOMAKE_VERSION != 1.4 ]; then - $AUTOMAKE --gnu --add-missing --force --copy || exit 1 - else - $AUTOMAKE --gnu --add-missing --copy || exit 1 - fi - cmp COPYING COPYING.autogen_bak || cp -pf COPYING.autogen_bak COPYING - cmp INSTALL INSTALL.autogen_bak || cp -pf INSTALL.autogen_bak INSTALL - rm -f COPYING.autogen_bak INSTALL.autogen_bak - - cd "$topdir" - fi -done - -conf_flags="--enable-maintainer-mode" - -if test x$NOCONFIGURE = x; then - printbold Running $srcdir/configure $conf_flags "$@" ... - $srcdir/configure $conf_flags "$@" \ - && echo Now type \`make\' to compile $PKG_NAME || exit 1 -else - echo Skipping configure process. -fi diff --git a/codegen/Makefile.am b/codegen/Makefile.am deleted file mode 100644 index 350b1369..00000000 --- a/codegen/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -PLATFORM_VERSION = 2.0 - -bin_SCRIPTS = pygtk-codegen-$(PLATFORM_VERSION) - -codegendir = $(pkgdatadir)/$(PLATFORM_VERSION)/codegen - -codegen_PYTHON = \ - __init__.py \ - argtypes.py \ - reversewrapper.py \ - codegen.py \ - definitions.py \ - defsparser.py \ - docextract.py \ - docgen.py \ - h2def.py \ - createdefs.py \ - mergedefs.py \ - mkskel.py \ - override.py \ - scmexpr.py - -EXTRA_DIST = README.defs pygtk-codegen-$(PLATFORM_VERSION).in diff --git a/codegen/README.defs b/codegen/README.defs deleted file mode 100644 index 5f7957ef..00000000 --- a/codegen/README.defs +++ /dev/null @@ -1,351 +0,0 @@ - ChangeLog for this draft: - - caller-owns-return attribute on functions/methods - - include gtk-type-id in the type alias system - - c-name for types converted to in-c-name out-c-name inout-c-name - - merge unref-func and destroy-func for boxed types into release-func - - - split structs out of boxed types - - c-declaration field - - special "native" type alias; bail and use C declaration when - necessary - - defined objects and boxeds automatically create a module - - make constructors functions and not methods, in appropriate - object/boxed module - - Draft ========================= - - The overall syntax is: - - (type-of-thing-being-defined name-used-to-refer-to-this-thing - (attribute-name attribute-value-depending-on-the-attribute) - (attribute-name attribute-value-depending-on-the-attribute) - (attribute-name attribute-value-depending-on-the-attribute)) - - Some definitions can have a c-declaration field that gives the C code - we parsed to arrive at the definition. The c-declaration is a quoted - string because it can contain parentheses and such. - - Defined types and their attributes: - - === - (module module-name - (submodule-of module-name)) ;; submodule is optional - - Ex: (module Gtk) - Ex: (module Rgb - (submodule-of Gdk)) - - modules are later referred to with a list of module names, like - (Gdk Rgb) or (Gtk) - - Object and boxed type definitions automatically create a submodule. - For example, GtkCList creates the module (module CList (submodule-of - (Gtk))) which is referred to as module (Gtk CList). - - === - - (type - (alias some-unique-identifier) - (in-module module-name) ;; optional, gchar* is not in a module - (gtk-type-id gtk-type-system-id) ;; optional, absent if this is not - ;; in the type system - (in-c-name name-of-symbol-in-C) - (out-c-name name-of-symbol-in-C) - (inout-c-name name-of-symbol-in-C)) - - Ex: (type - (alias string) - (gtk-type-id GTK_TYPE_STRING) - (in-c-name const-gchar*) - (out-c-name gchar**) ;; actually I'm not sure how strings work - out/inout - (inout-c-name gchar*)) - - ;; This one would be implied by the (object) def for GtkWidget I - ;; think - (type) is only required for types that are not implied - ;; by other definitions, such as int/boolean/etc. - - (type - (alias GtkWidget) - (in-module (Gtk)) - (gtk-type-id GTK_TYPE_WIDGET) - (in-c-name GtkWidget*) - (inout-c-name GtkWidget*) - (out-c-name GtkWidget**)) - - "Type" bindings are automatically assumed for objects, boxed types, - etc. as defined below. - - The alias field is used to refer to the type later on. - - If the C type has spaces they are converted to hyphens after - compressing all syntactically significant whitespace to a single - space: - (type - (alias const-gchar* - (c-name const-gchar*))) - - So hyphens have to go back to spaces for binding generators that - output C code. - - Whenever a type alias can be used, it is also possible to use the - keyword "native", which implies that the type in question is too - C-specific to represent. Then a c-declaration will typically be - available for use. - - C types containing [] or () are function pointers or arrays. For - arrays that don't specify a size, we just treat them as pointers. For - function pointers, we need special (type) syntax/attributes of some - kind, but since there basically aren't any of these right now in the - libs we care about we can just ignore them. For arrays that specify a - size ditto, you would handle them by adding an (array-size) attribute - or something or using the "native" keyword and skipping the (type) - stuff. - - === - (object object-name - (in-module module-name-list) - (parent object-name optional-module-name-if-different) - (abstract boolean-is-abstract-class) ;; omit for default of #f - (c-name name-of-the-object-in-C) - (field (type-and-name type-alias-of-struct-field - name-of-struct-field) - (access read-or-write-or-readwrite))) - - - Ex: (object Widget - (in-module (Gtk)) - (parent Object) ;; could say (parent Object (Gtk)) - (abstract #t) - (c-name GtkWidget) - (field (type-and-name GdkWindow* window) (access read))) - - An "object" declaration automatically implies the type definition: - - (type - (alias concat-module-elements-and-object-name) - (in-c-name pointer-to-c-name) - (out-c-name pointer-to-pointer-to-c-name) - (inout-c-name pointer-to-c-name)) - - Ex: - (type (alias GtkWidget) - (in-c-name GtkWidget*) - (out-c-name GtkWidget**) - (inout-c-name GtkWidget*)) - - It also implies a module that is the name broken into parts: - (module CTree - (submodule-of Gtk)) - - === - - (function function-name - (in-module module-name-list) ;; "static methods" go in their - ;; object's module - (is-constructor-of object-type-alias) ;; optional, marks a - constructor - (c-name function-name) - (return-type return-value-type) ;; defaults to void - (caller-owns-return boolean-value) ;; defaults to #f - (parameter in-or-out-or-inout - (type-and-name parameter-type-alias parameter-name) - (c-declaration "c-type-and-name")) ;; c-declaration only - required - ;; if the type alias is - "native" - (varargs #t) ;; has varargs at the end - ) - - Ex: - (function init - (in-module (Gdk Rgb) - (c-name gdk_rgb_init))) - - Ex: - (function new - (in-module (Gdk Rgb Cmap)) - (is-constructor-of GdkRgbCmap) - (c-name gdk_rgb_cmap_new) - (return-type GdkRgbCmap) - (caller-owns-return #t) ;; perhaps this could be implied by - is-constructor-of - (parameter in (type-and-name array-of-guint32 colors)) - (parameter in (type-and-name gint n_colors))) - - Ex: - (function config_set_set_handler - (in-module (Gnome)) - (c-name gnome_config_set_set_handler) - (parameter in (type-and-name native func) - (c-declaration "void (*func)(void*)")) - (parameter in (type-and-name gpointer data))) - - === - (method method-name - (of-object object-name module-name) - ;; retval/arg attributes as for (function), but with first parameter - - ;; omitted for non-constructors - ) - - Ex: - (method set_text - (of-object Label (Gtk)) - (parameter (type-and-name const-gchar* str))) - - === - (object-argument arg-name - (of-object object-we-are-an-argument-of optional-objects-module) - (type argument-type) ;; not sure what to put for type - ;; flags all default to #f - (readable bool-value) - (writeable bool-value) - (run-action bool-value) - (construct-only bool-value)) - - Ex: - (object-argument label - (of-object Label (Gtk)) - (type gchar*) ;; ???? - (readable #t) - (writeable #t)) - - === - (signal signal-name - (of-object object-we-are-a-signal-of optional-objects-module) - ;; return value and parameters as for a function, omitting the - object - ;; and user data parameters - - ;; what other properties matter for a signal? - ) - - Ex: - (signal select_row - (of-object CList (Gtk)) - ;; return type defaults to void - (parameter in (type-and-name gint row)) - (parameter in (type-and-name gint column)) - (parameter in (type-and-name GdkEvent* event))) - - === - (enum enum-name - (in-module modname) - (c-name name-in-c) - (value (name value-name-noprefixes-hyphen-lowercase) (c-name - value-c-name))) - - Ex: - - (enum DirectionType - (in-module Gtk) - (c-name GtkDirectionType) - (value (name tab-forward) (c-name GTK_DIR_TAB_FORWARD)) - (value (name tab-backward) (c-name GTK_DIR_TAB_BACKWARD)) - (value (name up) (c-name GTK_DIR_UP)) - (value (name down) (c-name GTK_DIR_DOWN)) - (value (name left) (c-name GTK_DIR_LEFT)) - (value (name right) (c-name GTK_DIR_RIGHT))) - - (enum Pos - (in-module (Gtk CTree)) - (c-name GtkCTreePos) - (value (name before) (c-name GTK_CTREE_POS_BEFORE)) - (value (name as-child) (c-name GTK_CTREE_POS_AS_CHILD)) - (value (name after) (c-name GTK_CTREE_POS_AFTER))) - - === - (flags) is just like enum, but some bindings may wrap enums and flags - differently. - - === - - (boxed boxed-name - (in-module modname) - (c-name c-name) - (ref-func func-to-increase-refcount) - (copy-func func-to-copy) - (release-func func-to-destroy-or-decrement-refcount) - (field (type-and-name type-alias-of-struct-field - name-of-struct-field) (access access-rule))) - - It is never OK to use memcpy() to copy a boxed type, or use - malloc()/free() to alloc/free one. - - Ex: - - (boxed Pixmap - (in-module (Gdk)) - (c-name GdkPixmap) - (ref-func pixmap_ref) - (unref-func pixmap_unref)) - - An "object" declaration automatically implies the type definition: - - (type - (alias concat-module-elements-and-boxed-name) - (in-c-name pointer-to-c-name) - (out-c-name pointer-to-pointer-to-c-name) - (inout-c-name pointer-to-c-name)) - - Ex: - (type (alias GdkPixmap) - (in-c-name GdkPixmap*) - (out-c-name GdkPixmap**) - (inout-c-name GdkPixmap*)) - - === - - (struct struct-name - (in-module modname) - (c-name c-name) - (field (type-and-name type-alias-of-struct-field - name-of-struct-field) (access access-rule))) - - Ex: - (struct Rectangle - (in-module (Gdk)) - (c-name GdkRectangle) - (field (type-and-name gint16 x) (access readwrite)) - (field (type-and-name gint16 y) (access readwrite)) - (field (type-and-name guint16 width) (access readwrite)) - (field (type-and-name guint16 height) (access readwrite))) - - Implies GdkRectangle type alias: - - (type (alias GdkRectangle) - (in-c-name GdkRectangle*) - (out-c-name GdkRectangle*) ;; note - not the same as boxed - types - (inout-c-name GdkRectangle*)) - - === - - (user-function name - (in-module module) - (c-name c-typedef-name) - ;; return-type and parameters as for (function) - ) - - Ex: - - (user-function PrintFunc - (in-module (Gtk)) - (parameter in (type-and-name gpointer func_data)) - (parameter in (type-and-name gchar* str))) - - === - - (typedef new-name - (in-module module) - (c-name c-full-name) - (orig-type alias-of-orig-type)) - - Ex: - - (typedef Type - (in-module (Gtk)) - (c-name GtkType) - (orig-type guint)) - diff --git a/codegen/__init__.py b/codegen/__init__.py deleted file mode 100644 index cfa896ee..00000000 --- a/codegen/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# -*- Mode: Python; py-indent-offset: 4 -*- - -__all__ = [ - 'argtypes', - 'codegen', - 'definitions', - 'defsparser', - 'docextract', - 'docgen', - 'h2def', - 'mergedefs', - 'mkskel', - 'override', - 'scmexpr' -] diff --git a/codegen/argtypes.py b/codegen/argtypes.py deleted file mode 100644 index 3f145baa..00000000 --- a/codegen/argtypes.py +++ /dev/null @@ -1,1027 +0,0 @@ -# -*- Mode: Python; py-indent-offset: 4 -*- -import string -import keyword -import struct - -py_ssize_t_clean = False - -class ArgTypeError(Exception): - pass - -class ArgTypeNotFoundError(ArgTypeError): - pass - -class ArgTypeConfigurationError(ArgTypeError): - pass - - -class VarList: - """Nicely format a C variable list""" - def __init__(self): - self.vars = {} - def add(self, ctype, name): - if self.vars.has_key(ctype): - self.vars[ctype] = self.vars[ctype] + (name,) - else: - self.vars[ctype] = (name,) - def __str__(self): - ret = [] - for type in self.vars.keys(): - ret.append(' ') - ret.append(type) - ret.append(' ') - ret.append(string.join(self.vars[type], ', ')) - ret.append(';\n') - if ret: - ret.append('\n') - return string.join(ret, '') - return '' - -class WrapperInfo: - """A class that holds information about variable defs, code - snippets, etcd for use in writing out the function/method - wrapper.""" - def __init__(self): - self.varlist = VarList() - self.parsestr = '' - self.parselist = ['', 'kwlist'] - self.codebefore = [] - self.codeafter = [] - self.arglist = [] - self.kwlist = [] - def get_parselist(self): - return string.join(self.parselist, ', ') - def get_codebefore(self): - return string.join(self.codebefore, '') - def get_codeafter(self): - return string.join(self.codeafter, '') - def get_arglist(self): - return string.join(self.arglist, ', ') - def get_varlist(self): - return str(self.varlist) - def get_kwlist(self): - ret = ' static char *kwlist[] = { %s };\n' % \ - string.join(self.kwlist + [ 'NULL' ], ', ') - if not self.get_varlist(): - ret = ret + '\n' - return ret - - def add_parselist(self, codes, parseargs, keywords): - self.parsestr = self.parsestr + codes - for arg in parseargs: - self.parselist.append(arg) - for kw in keywords: - if keyword.iskeyword(kw): - kw = kw + '_' - self.kwlist.append('"%s"' % kw) - -class ArgType: - def write_param(self, ptype, pname, pdflt, pnull, info): - """Add code to the WrapperInfo instance to handle - parameter.""" - raise RuntimeError, "write_param not implemented for %s" % \ - self.__class__.__name__ - def write_return(self, ptype, ownsreturn, info): - """Adds a variable named ret of the return type to - info.varlist, and add any required code to info.codeafter to - convert the return value to a python object.""" - raise RuntimeError, "write_return not implemented for %s" % \ - self.__class__.__name__ - -class NoneArg(ArgType): - def write_return(self, ptype, ownsreturn, info): - info.codeafter.append(' Py_INCREF(Py_None);\n' + - ' return Py_None;') - -class StringArg(ArgType): - def write_param(self, ptype, pname, pdflt, pnull, info): - if pdflt: - if pdflt != 'NULL': pdflt = '"' + pdflt + '"' - info.varlist.add('char', '*' + pname + ' = ' + pdflt) - else: - info.varlist.add('char', '*' + pname) - info.arglist.append(pname) - if pnull: - info.add_parselist('z', ['&' + pname], [pname]) - else: - info.add_parselist('s', ['&' + pname], [pname]) - def write_return(self, ptype, ownsreturn, info): - if ownsreturn: - # have to free result ... - info.varlist.add('gchar', '*ret') - info.codeafter.append(' if (ret) {\n' + - ' PyObject *py_ret = PyString_FromString(ret);\n' + - ' g_free(ret);\n' + - ' return py_ret;\n' + - ' }\n' + - ' Py_INCREF(Py_None);\n' + - ' return Py_None;') - else: - info.varlist.add('const gchar', '*ret') - info.codeafter.append(' if (ret)\n' + - ' return PyString_FromString(ret);\n'+ - ' Py_INCREF(Py_None);\n' + - ' return Py_None;') - -class UCharArg(ArgType): - # allows strings with embedded NULLs. - def write_param(self, ptype, pname, pdflt, pnull, info): - if pdflt: - info.varlist.add('guchar', '*' + pname + ' = "' + pdflt + '"') - else: - info.varlist.add('guchar', '*' + pname) - if py_ssize_t_clean: - info.varlist.add('Py_ssize_t', pname + '_len') - else: - info.varlist.add('int', pname + '_len') - info.arglist.append(pname) - if pnull: - info.add_parselist('z#', ['&' + pname, '&' + pname + '_len'], - [pname]) - else: - info.add_parselist('s#', ['&' + pname, '&' + pname + '_len'], - [pname]) - -class CharArg(ArgType): - def write_param(self, ptype, pname, pdflt, pnull, info): - if pdflt: - info.varlist.add('char', pname + " = '" + pdflt + "'") - else: - info.varlist.add('char', pname) - info.arglist.append(pname) - info.add_parselist('c', ['&' + pname], [pname]) - def write_return(self, ptype, ownsreturn, info): - info.varlist.add('gchar', 'ret') - info.codeafter.append(' return PyString_FromStringAndSize(&ret, 1);') -class GUniCharArg(ArgType): - ret_tmpl = ('#if !defined(Py_UNICODE_SIZE) || Py_UNICODE_SIZE == 2\n' - ' if (ret > 0xffff) {\n' - ' PyErr_SetString(PyExc_RuntimeError, "returned character can not be represented in 16-bit unicode");\n' - ' return NULL;\n' - ' }\n' - '#endif\n' - ' py_ret = (Py_UNICODE)ret;\n' - ' return PyUnicode_FromUnicode(&py_ret, 1);\n') - def write_param(self, ptype, pname, pdflt, pnull, info): - if pdflt: - info.varlist.add('gunichar', pname + " = '" + pdflt + "'") - else: - info.varlist.add('gunichar', pname) - info.arglist.append(pname) - info.add_parselist('O&', ['pyg_pyobj_to_unichar_conv', '&' + pname], [pname]) - def write_return(self, ptype, ownsreturn, info): - info.varlist.add('gunichar', 'ret') - info.varlist.add('Py_UNICODE', 'py_ret') - info.codeafter.append(self.ret_tmpl) - - -class IntArg(ArgType): - def write_param(self, ptype, pname, pdflt, pnull, info): - if pdflt: - info.varlist.add('int', pname + ' = ' + pdflt) - else: - info.varlist.add('int', pname) - info.arglist.append(pname) - info.add_parselist('i', ['&' + pname], [pname]) - def write_return(self, ptype, ownsreturn, info): - info.varlist.add('int', 'ret') - info.codeafter.append(' return PyInt_FromLong(ret);') - -class UIntArg(ArgType): - dflt = (' if (py_%(name)s) {\n' - ' if (PyLong_Check(py_%(name)s))\n' - ' %(name)s = PyLong_AsUnsignedLong(py_%(name)s);\n' - ' else if (PyInt_Check(py_%(name)s))\n' - ' %(name)s = PyInt_AsLong(py_%(name)s);\n' - ' else\n' - ' PyErr_SetString(PyExc_TypeError, "Parameter \'%(name)s\' must be an int or a long");\n' - ' if (PyErr_Occurred())\n' - ' return NULL;\n' - ' }\n') - before = (' if (PyLong_Check(py_%(name)s))\n' - ' %(name)s = PyLong_AsUnsignedLong(py_%(name)s);\n' - ' else if (PyInt_Check(py_%(name)s))\n' - ' %(name)s = PyInt_AsLong(py_%(name)s);\n' - ' else\n' - ' PyErr_SetString(PyExc_TypeError, "Parameter \'%(name)s\' must be an int or a long");\n' - ' if (PyErr_Occurred())\n' - ' return NULL;\n') - def write_param(self, ptype, pname, pdflt, pnull, info): - if not pdflt: - pdflt = '0'; - - info.varlist.add(ptype, pname + ' = ' + pdflt) - info.codebefore.append(self.dflt % {'name':pname}) - info.varlist.add('PyObject', "*py_" + pname + ' = NULL') - info.arglist.append(pname) - info.add_parselist('O', ['&py_' + pname], [pname]) - def write_return(self, ptype, ownsreturn, info): - info.varlist.add(ptype, 'ret') - info.codeafter.append(' return PyLong_FromUnsignedLong(ret);') - -class SizeArg(ArgType): - - if struct.calcsize('P') <= struct.calcsize('l'): - llp64 = True - else: - llp64 = False - - def write_param(self, ptype, pname, pdflt, pnull, info): - if pdflt: - info.varlist.add(ptype, pname + ' = ' + pdflt) - else: - info.varlist.add(ptype, pname) - info.arglist.append(pname) - if self.llp64: - info.add_parselist('k', ['&' + pname], [pname]) - else: - info.add_parselist('K', ['&' + pname], [pname]) - def write_return(self, ptype, ownsreturn, info): - info.varlist.add(ptype, 'ret') - if self.llp64: - info.codeafter.append(' return PyLong_FromUnsignedLongLong(ret);\n') - else: - info.codeafter.append(' return PyLong_FromUnsignedLong(ret);\n') - -class SSizeArg(ArgType): - - if struct.calcsize('P') <= struct.calcsize('l'): - llp64 = True - else: - llp64 = False - - def write_param(self, ptype, pname, pdflt, pnull, info): - if pdflt: - info.varlist.add(ptype, pname + ' = ' + pdflt) - else: - info.varlist.add(ptype, pname) - info.arglist.append(pname) - if self.llp64: - info.add_parselist('l', ['&' + pname], [pname]) - else: - info.add_parselist('L', ['&' + pname], [pname]) - def write_return(self, ptype, ownsreturn, info): - info.varlist.add(ptype, 'ret') - if self.llp64: - info.codeafter.append(' return PyLong_FromLongLong(ret);\n') - else: - info.codeafter.append(' return PyLong_FromLong(ret);\n') - -class LongArg(ArgType): - def write_param(self, ptype, pname, pdflt, pnull, info): - if pdflt: - info.varlist.add(ptype, pname + ' = ' + pdflt) - else: - info.varlist.add(ptype, pname) - info.arglist.append(pname) - info.add_parselist('l', ['&' + pname], [pname]) - def write_return(self, ptype, ownsreturn, info): - info.varlist.add(ptype, 'ret') - info.codeafter.append(' return PyInt_FromLong(ret);\n') - -class BoolArg(IntArg): - def write_return(self, ptype, ownsreturn, info): - info.varlist.add('int', 'ret') - info.codeafter.append(' return PyBool_FromLong(ret);\n') - -class TimeTArg(ArgType): - def write_param(self, ptype, pname, pdflt, pnull, info): - if pdflt: - info.varlist.add('time_t', pname + ' = ' + pdflt) - else: - info.varlist.add('time_t', pname) - info.arglist.append(pname) - info.add_parselist('i', ['&' + pname], [pname]) - def write_return(self, ptype, ownsreturn, info): - info.varlist.add('time_t', 'ret') - info.codeafter.append(' return PyInt_FromLong(ret);') - -class ULongArg(ArgType): - def write_param(self, ptype, pname, pdflt, pnull, info): - if pdflt: - info.varlist.add('unsigned long', pname + ' = ' + pdflt) - else: - info.varlist.add('unsigned long', pname) - info.arglist.append(pname) - info.add_parselist('k', ['&' + pname], [pname]) - def write_return(self, ptype, ownsreturn, info): - info.varlist.add(ptype, 'ret') - info.codeafter.append(' return PyLong_FromUnsignedLong(ret);\n') - -class UInt32Arg(ULongArg): - def write_param(self, ptype, pname, pdflt, pnull, info): - ULongArg.write_param(self, ptype, pname, pdflt, pnull, info) - ## if sizeof(unsigned long) > sizeof(unsigned int), we need to - ## check the value is within guint32 range - if struct.calcsize('L') > struct.calcsize('I'): - info.codebefore.append(( - ' if (%(pname)s > G_MAXUINT32) {\n' - ' PyErr_SetString(PyExc_ValueError,\n' - ' "Value out of range in conversion of"\n' - ' " %(pname)s parameter to unsigned 32 bit integer");\n' - ' return NULL;\n' - ' }\n') % vars()) - -class Int64Arg(ArgType): - def write_param(self, ptype, pname, pdflt, pnull, info): - if pdflt: - info.varlist.add('gint64', pname + ' = ' + pdflt) - else: - info.varlist.add('gint64', pname) - info.arglist.append(pname) - info.add_parselist('L', ['&' + pname], [pname]) - def write_return(self, ptype, ownsreturn, info): - info.varlist.add('gint64', 'ret') - info.codeafter.append(' return PyLong_FromLongLong(ret);') - -class UInt64Arg(ArgType): - dflt = ' if (py_%(name)s)\n' \ - ' %(name)s = PyLong_AsUnsignedLongLong(py_%(name)s);\n' - before = ' %(name)s = PyLong_AsUnsignedLongLong(py_%(name)s);\n' - def write_param(self, ptype, pname, pdflt, pnull, info): - if pdflt: - info.varlist.add('guint64', pname + ' = ' + pdflt) - info.codebefore.append(self.dflt % {'name':pname}) - else: - info.varlist.add('guint64', pname) - info.codebefore.append(self.before % {'name':pname}) - info.varlist.add('PyObject', "*py_" + pname + ' = NULL') - info.arglist.append(pname) - info.add_parselist('O!', ['&PyLong_Type', '&py_' + pname], [pname]) - def write_return(self, ptype, ownsreturn, info): - info.varlist.add('guint64', 'ret') - info.codeafter.append(' return PyLong_FromUnsignedLongLong(ret);') - - -class DoubleArg(ArgType): - def write_param(self, ptype, pname, pdflt, pnull, info): - if pdflt: - info.varlist.add('double', pname + ' = ' + pdflt) - else: - info.varlist.add('double', pname) - info.arglist.append(pname) - info.add_parselist('d', ['&' + pname], [pname]) - def write_return(self, ptype, ownsreturn, info): - info.varlist.add('double', 'ret') - info.codeafter.append(' return PyFloat_FromDouble(ret);') - -class FileArg(ArgType): - nulldflt = (' if (py_%(name)s == Py_None)\n' - ' %(name)s = NULL;\n' - ' else if (py_%(name)s && PyFile_Check(py_%(name)s)\n' - ' %s = PyFile_AsFile(py_%(name)s);\n' - ' else if (py_%(name)s) {\n' - ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a file object or None");\n' - ' return NULL;\n' - ' }') - null = (' if (py_%(name)s && PyFile_Check(py_%(name)s)\n' - ' %(name)s = PyFile_AsFile(py_%(name)s);\n' - ' else if (py_%(name)s != Py_None) {\n' - ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a file object or None");\n' - ' return NULL;\n' - ' }\n') - dflt = (' if (py_%(name)s)\n' - ' %(name)s = PyFile_AsFile(py_%(name)s);\n') - def write_param(self, ptype, pname, pdflt, pnull, info): - if pnull: - if pdflt: - info.varlist.add('FILE', '*' + pname + ' = ' + pdflt) - info.varlist.add('PyObject', '*py_' + pname + ' = NULL') - info.codebefore.append(self.nulldflt % {'name':pname}) - else: - info.varlist.add('FILE', '*' + pname + ' = NULL') - info.varlist.add('PyObject', '*py_' + pname) - info.codebefore.append(self.null & {'name':pname}) - info.arglist.appned(pname) - info.add_parselist('O', ['&py_' + pname], [pname]) - else: - if pdflt: - info.varlist.add('FILE', '*' + pname + ' = ' + pdflt) - info.varlist.add('PyObject', '*py_' + pname + ' = NULL') - info.codebefore.append(self.dflt % {'name':pname}) - info.arglist.append(pname) - else: - info.varlist.add('PyObject', '*' + pname) - info.arglist.append('PyFile_AsFile(' + pname + ')') - info.add_parselist('O!', ['&PyFile_Type', '&' + pname], [pname]) - def write_return(self, ptype, ownsreturn, info): - info.varlist.add('FILE', '*ret') - info.codeafter.append(' if (ret)\n' + - ' return PyFile_FromFile(ret, "", "", fclose);\n' + - ' Py_INCREF(Py_None);\n' + - ' return Py_None;') - -class EnumArg(ArgType): - enum = (' if (pyg_enum_get_value(%(typecode)s, py_%(name)s, (gpointer)&%(name)s))\n' - ' return NULL;\n') - def __init__(self, enumname, typecode): - self.enumname = enumname - self.typecode = typecode - def write_param(self, ptype, pname, pdflt, pnull, info): - if pdflt: - info.varlist.add(self.enumname, pname + ' = ' + pdflt) - else: - info.varlist.add(self.enumname, pname) - info.varlist.add('PyObject', '*py_' + pname + ' = NULL') - info.codebefore.append(self.enum % { 'typecode': self.typecode, - 'name': pname}) - info.arglist.append(pname) - info.add_parselist('O', ['&py_' + pname], [pname]); - def write_return(self, ptype, ownsreturn, info): - info.varlist.add('gint', 'ret') - info.codeafter.append(' return pyg_enum_from_gtype(%s, ret);' % self.typecode) - -class FlagsArg(ArgType): - flag = (' if (%(default)spyg_flags_get_value(%(typecode)s, py_%(name)s, (gpointer)&%(name)s))\n' - ' return NULL;\n') - def __init__(self, flagname, typecode): - self.flagname = flagname - self.typecode = typecode - def write_param(self, ptype, pname, pdflt, pnull, info): - if pdflt: - info.varlist.add(self.flagname, pname + ' = ' + pdflt) - default = "py_%s && " % (pname,) - else: - info.varlist.add(self.flagname, pname) - default = "" - info.varlist.add('PyObject', '*py_' + pname + ' = NULL') - info.codebefore.append(self.flag % {'default':default, - 'typecode':self.typecode, - 'name':pname}) - info.arglist.append(pname) - info.add_parselist('O', ['&py_' + pname], [pname]) - def write_return(self, ptype, ownsreturn, info): - info.varlist.add('guint', 'ret') - info.codeafter.append(' return pyg_flags_from_gtype(%s, ret);' % self.typecode) - -class ObjectArg(ArgType): - # should change these checks to more typesafe versions that check - # a little further down in the class heirachy. - nulldflt = (' if ((PyObject *)py_%(name)s == Py_None)\n' - ' %(name)s = NULL;\n' - ' else if (py_%(name)s && pygobject_check(py_%(name)s, &Py%(type)s_Type))\n' - ' %(name)s = %(cast)s(py_%(name)s->obj);\n' - ' else if (py_%(name)s) {\n' - ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(type)s or None");\n' - ' return NULL;\n' - ' }\n') - null = (' if (py_%(name)s && pygobject_check(py_%(name)s, &Py%(type)s_Type))\n' - ' %(name)s = %(cast)s(py_%(name)s->obj);\n' - ' else if ((PyObject *)py_%(name)s != Py_None) {\n' - ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(type)s or None");\n' - ' return NULL;\n' - ' }\n') - dflt = ' if (py_%(name)s)\n' \ - ' %(name)s = %(cast)s(py_%(name)s->obj);\n' - def __init__(self, objname, parent, typecode): - self.objname = objname - self.cast = string.replace(typecode, '_TYPE_', '_', 1) - self.parent = parent - def write_param(self, ptype, pname, pdflt, pnull, info): - if pnull: - if pdflt: - info.varlist.add(self.objname, '*' + pname + ' = ' + pdflt) - info.varlist.add('PyGObject', '*py_' + pname + ' = NULL') - info.codebefore.append(self.nulldflt % {'name':pname, - 'cast':self.cast, - 'type':self.objname}) - else: - info.varlist.add(self.objname, '*' + pname + ' = NULL') - info.varlist.add('PyGObject', '*py_' + pname) - info.codebefore.append(self.null % {'name':pname, - 'cast':self.cast, - 'type':self.objname}) - if ptype.endswith('*'): - typename = ptype[:-1] - try: - const, typename = typename.split('const-') - except ValueError: - const = '' - if typename != ptype: - info.arglist.append('(%s *) %s' % (ptype[:-1], pname)) - else: - info.arglist.append(pname) - - info.add_parselist('O', ['&py_' + pname], [pname]) - else: - if pdflt: - info.varlist.add(self.objname, '*' + pname + ' = ' + pdflt) - info.varlist.add('PyGObject', '*py_' + pname + ' = NULL') - info.codebefore.append(self.dflt % {'name':pname, - 'cast':self.cast}) - info.arglist.append(pname) - info.add_parselist('O!', ['&Py%s_Type' % self.objname, - '&py_' + pname], [pname]) - else: - info.varlist.add('PyGObject', '*' + pname) - info.arglist.append('%s(%s->obj)' % (self.cast, pname)) - info.add_parselist('O!', ['&Py%s_Type' % self.objname, - '&' + pname], [pname]) - def write_return(self, ptype, ownsreturn, info): - if ptype.endswith('*'): - typename = ptype[:-1] - try: - const, typename = typename.split('const-') - except ValueError: - const = '' - info.varlist.add(typename, '*ret') - if ownsreturn: - info.varlist.add('PyObject', '*py_ret') - info.codeafter.append(' py_ret = pygobject_new((GObject *)ret);\n' - ' if (ret != NULL)\n' - ' g_object_unref(ret);\n' - ' return py_ret;') - else: - info.codeafter.append(' /* pygobject_new handles NULL checking */\n' + - ' return pygobject_new((GObject *)ret);') - -class BoxedArg(ArgType): - # haven't done support for default args. Is it needed? - check = (' if (pyg_boxed_check(py_%(name)s, %(typecode)s))\n' - ' %(name)s = pyg_boxed_get(py_%(name)s, %(typename)s);\n' - ' else {\n' - ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(typename)s");\n' - ' return NULL;\n' - ' }\n') - null = (' if (pyg_boxed_check(py_%(name)s, %(typecode)s))\n' - ' %(name)s = pyg_boxed_get(py_%(name)s, %(typename)s);\n' - ' else if (py_%(name)s != Py_None) {\n' - ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(typename)s or None");\n' - ' return NULL;\n' - ' }\n') - def __init__(self, ptype, typecode): - self.typename = ptype - self.typecode = typecode - def write_param(self, ptype, pname, pdflt, pnull, info): - if pnull: - info.varlist.add(self.typename, '*' + pname + ' = NULL') - info.varlist.add('PyObject', '*py_' + pname + ' = Py_None') - info.codebefore.append(self.null % {'name': pname, - 'typename': self.typename, - 'typecode': self.typecode}) - else: - info.varlist.add(self.typename, '*' + pname + ' = NULL') - info.varlist.add('PyObject', '*py_' + pname) - info.codebefore.append(self.check % {'name': pname, - 'typename': self.typename, - 'typecode': self.typecode}) - if ptype[-1] == '*': - typename = ptype[:-1] - if typename[:6] == 'const-': typename = typename[6:] - if typename != self.typename: - info.arglist.append('(%s *)%s' % (ptype[:-1], pname)) - else: - info.arglist.append(pname) - else: - info.arglist.append(pname) - info.add_parselist('O', ['&py_' + pname], [pname]) - ret_tmpl = ' /* pyg_boxed_new handles NULL checking */\n' \ - ' return pyg_boxed_new(%(typecode)s, %(ret)s, %(copy)s, TRUE);' - def write_return(self, ptype, ownsreturn, info): - if ptype[-1] == '*': - info.varlist.add(self.typename, '*ret') - ret = 'ret' - else: - info.varlist.add(self.typename, 'ret') - ret = '&ret' - ownsreturn = 0 # of course it can't own a ref to a local var ... - info.codeafter.append(self.ret_tmpl % - { 'typecode': self.typecode, - 'ret': ret, - 'copy': ownsreturn and 'FALSE' or 'TRUE'}) - -class CustomBoxedArg(ArgType): - # haven't done support for default args. Is it needed? - null = (' if (%(check)s(py_%(name)s))\n' - ' %(name)s = %(get)s(py_%(name)s);\n' - ' else if (py_%(name)s != Py_None) {\n' - ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(type)s or None");\n' - ' return NULL;\n' - ' }\n') - def __init__(self, ptype, pytype, getter, new): - self.pytype = pytype - self.getter = getter - self.checker = 'Py' + ptype + '_Check' - self.new = new - def write_param(self, ptype, pname, pdflt, pnull, info): - if pnull: - info.varlist.add(ptype[:-1], '*' + pname + ' = NULL') - info.varlist.add('PyObject', '*py_' + pname + ' = Py_None') - info.codebefore.append(self.null % {'name': pname, - 'get': self.getter, - 'check': self.checker, - 'type': ptype[:-1]}) - info.arglist.append(pname) - info.add_parselist('O', ['&py_' + pname], [pname]) - else: - info.varlist.add('PyObject', '*' + pname) - info.arglist.append(self.getter + '(' + pname + ')') - info.add_parselist('O!', ['&' + self.pytype, '&' + pname], [pname]) - def write_return(self, ptype, ownsreturn, info): - info.varlist.add(ptype[:-1], '*ret') - info.codeafter.append(' if (ret)\n' + - ' return ' + self.new + '(ret);\n' + - ' Py_INCREF(Py_None);\n' + - ' return Py_None;') - -class PointerArg(ArgType): - # haven't done support for default args. Is it needed? - check = (' if (pyg_pointer_check(py_%(name)s, %(typecode)s))\n' - ' %(name)s = pyg_pointer_get(py_%(name)s, %(typename)s);\n' - ' else {\n' - ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(typename)s");\n' - ' return NULL;\n' - ' }\n') - null = (' if (pyg_pointer_check(py_%(name)s, %(typecode)s))\n' - ' %(name)s = pyg_pointer_get(py_%(name)s, %(typename)s);\n' - ' else if (py_%(name)s != Py_None) {\n' - ' PyErr_SetString(PyExc_TypeError, "%(name)s should be a %(typename)s or None");\n' - ' return NULL;\n' - ' }\n') - def __init__(self, ptype, typecode): - self.typename = ptype - self.typecode = typecode - def write_param(self, ptype, pname, pdflt, pnull, info): - if pnull: - info.varlist.add(self.typename, '*' + pname + ' = NULL') - info.varlist.add('PyObject', '*py_' + pname + ' = Py_None') - info.codebefore.append(self.null % {'name': pname, - 'typename': self.typename, - 'typecode': self.typecode}) - else: - info.varlist.add(self.typename, '*' + pname + ' = NULL') - info.varlist.add('PyObject', '*py_' + pname) - info.codebefore.append(self.check % {'name': pname, - 'typename': self.typename, - 'typecode': self.typecode}) - info.arglist.append(pname) - info.add_parselist('O', ['&py_' + pname], [pname]) - def write_return(self, ptype, ownsreturn, info): - if ptype[-1] == '*': - info.varlist.add(self.typename, '*ret') - info.codeafter.append(' /* pyg_pointer_new handles NULL checking */\n' + - ' return pyg_pointer_new(' + self.typecode + ', ret);') - else: - info.varlist.add(self.typename, 'ret') - info.codeafter.append(' /* pyg_pointer_new handles NULL checking */\n' + - ' return pyg_pointer_new(' + self.typecode + ', &ret);') - -class AtomArg(IntArg): - dflt = ' if (py_%(name)s) {\n' \ - ' %(name)s = pygdk_atom_from_pyobject(py_%(name)s);\n' \ - ' if (PyErr_Occurred())\n' \ - ' return NULL;\n' \ - ' }\n' - atom = (' %(name)s = pygdk_atom_from_pyobject(py_%(name)s);\n' - ' if (PyErr_Occurred())\n' - ' return NULL;\n') - def write_param(self, ptype, pname, pdflt, pnull, info): - if pdflt: - info.varlist.add('GdkAtom', pname + ' = ' + pdflt) - info.varlist.add('PyObject', '*py_' + pname + ' = NULL') - info.codebefore.append(self.dflt % {'name': pname}) - else: - info.varlist.add('GdkAtom', pname) - info.varlist.add('PyObject', '*py_' + pname + ' = NULL') - info.codebefore.append(self.atom % {'name': pname}) - info.arglist.append(pname) - info.add_parselist('O', ['&py_' + pname], [pname]) - def write_return(self, ptype, ownsreturn, info): - info.varlist.add('GdkAtom', 'ret') - info.varlist.add('PyObject *', 'py_ret') - info.varlist.add('gchar *', 'name') - info.codeafter.append(' name = gdk_atom_name(ret);\n' - ' py_ret = PyString_FromString(name);\n' - ' g_free(name);\n' - ' return py_ret;') - -class GTypeArg(ArgType): - gtype = (' if ((%(name)s = pyg_type_from_object(py_%(name)s)) == 0)\n' - ' return NULL;\n') - def write_param(self, ptype, pname, pdflt, pnull, info): - info.varlist.add('GType', pname) - info.varlist.add('PyObject', '*py_' + pname + ' = NULL') - info.codebefore.append(self.gtype % {'name': pname}) - info.arglist.append(pname) - info.add_parselist('O', ['&py_' + pname], [pname]) - def write_return(self, ptype, ownsreturn, info): - info.varlist.add('GType', 'ret') - info.codeafter.append(' return pyg_type_wrapper_new(ret);') - -# simple GError handler. -class GErrorArg(ArgType): - handleerror = (' if (pyg_error_check(&%(name)s))\n' - ' return NULL;\n') - def write_param(self, ptype, pname, pdflt, pnull, info): - info.varlist.add('GError', '*' + pname + ' = NULL') - info.arglist.append('&' + pname) - info.codeafter.append(self.handleerror % { 'name': pname }) - -class GtkTreePathArg(ArgType): - # haven't done support for default args. Is it needed? - normal = (' %(name)s = pygtk_tree_path_from_pyobject(py_%(name)s);\n' - ' if (!%(name)s) {\n' - ' PyErr_SetString(PyExc_TypeError, "could not convert %(name)s to a GtkTreePath");\n' - ' return NULL;\n' - ' }\n') - null = (' if (py_%(name)s != Py_None) {\n' - ' %(name)s = pygtk_tree_path_from_pyobject(py_%(name)s);\n' - ' if (!%(name)s) {\n' - ' PyErr_SetString(PyExc_TypeError, "could not convert %(name)s to a GtkTreePath");\n' - ' return NULL;\n' - ' }\n' - ' }\n') - freepath = (' if (%(name)s)\n' - ' gtk_tree_path_free(%(name)s);\n') - def __init__(self): - pass - def write_param(self, ptype, pname, pdflt, pnull, info): - if pnull: - info.varlist.add('GtkTreePath', '*' + pname + ' = NULL') - info.varlist.add('PyObject', '*py_' + pname + ' = Py_None') - info.codebefore.append(self.null % {'name': pname}) - info.arglist.append(pname) - info.add_parselist('O', ['&py_' + pname], [pname]) - else: - info.varlist.add('GtkTreePath', '*' + pname) - info.varlist.add('PyObject', '*py_' + pname) - info.codebefore.append(self.normal % {'name': pname}) - info.arglist.append(pname) - info.add_parselist('O', ['&py_' + pname], [pname]) - info.codeafter.append(self.freepath % {'name': pname}) - def write_return(self, ptype, ownsreturn, info): - info.varlist.add('GtkTreePath', '*ret') - if ownsreturn: - info.codeafter.append(' if (ret) {\n' - ' PyObject *py_ret = pygtk_tree_path_to_pyobject(ret);\n' - ' gtk_tree_path_free(ret);\n' - ' return py_ret;\n' - ' }\n' - ' Py_INCREF(Py_None);\n' - ' return Py_None;') - else: - info.codeafter.append(' if (ret) {\n' - ' PyObject *py_ret = pygtk_tree_path_to_pyobject(ret);\n' - ' return py_ret;\n' - ' }\n' - ' Py_INCREF(Py_None);\n' - ' return Py_None;') - -class GdkRectanglePtrArg(ArgType): - normal = (' if (!pygdk_rectangle_from_pyobject(py_%(name)s, &%(name)s))\n' - ' return NULL;\n') - null = (' if (py_%(name)s == Py_None)\n' - ' %(name)s = NULL;\n' - ' else if (pygdk_rectangle_from_pyobject(py_%(name)s, &%(name)s_rect))\n' - ' %(name)s = &%(name)s_rect;\n' - ' else\n' - ' return NULL;\n') - def write_param(self, ptype, pname, pdflt, pnull, info): - if pnull: - info.varlist.add('GdkRectangle', pname + '_rect = { 0, 0, 0, 0 }') - info.varlist.add('GdkRectangle', '*' + pname) - info.varlist.add('PyObject', '*py_' + pname + ' = Py_None') - info.add_parselist('O', ['&py_' + pname], [pname]) - info.arglist.append(pname) - info.codebefore.append(self.null % {'name': pname}) - else: - info.varlist.add('GdkRectangle', pname + ' = { 0, 0, 0, 0 }') - info.varlist.add('PyObject', '*py_' + pname) - info.add_parselist('O', ['&py_' + pname], [pname]) - info.arglist.append('&' + pname) - info.codebefore.append(self.normal % {'name': pname}) - -class GdkRectangleArg(ArgType): - def write_return(self, ptype, ownsreturn, info): - info.varlist.add('GdkRectangle', 'ret') - info.codeafter.append(' return pyg_boxed_new(GDK_TYPE_RECTANGLE, &ret, TRUE, TRUE);') - -class PyObjectArg(ArgType): - def write_param(self, ptype, pname, pdflt, pnull, info): - info.varlist.add('PyObject', '*' + pname) - info.add_parselist('O', ['&' + pname], [pname]) - info.arglist.append(pname) - def write_return(self, ptype, ownsreturn, info): - info.varlist.add("PyObject", "*ret") - if ownsreturn: - info.codeafter.append(' if (ret) {\n' - ' return ret;\n' - ' }\n' - ' Py_INCREF(Py_None);\n' - ' return Py_None;') - else: - info.codeafter.append(' if (!ret) ret = Py_None;\n' - ' Py_INCREF(ret);\n' - ' return ret;') - -class CairoArg(ArgType): - def write_param(self, ptype, pname, pdflt, pnull, info): - info.varlist.add('PycairoContext', '*' + pname) - info.add_parselist('O!', ['&PycairoContext_Type', '&' + pname], [pname]) - info.arglist.append('%s->ctx' % pname) - def write_return(self, ptype, ownsreturn, info): - info.varlist.add("cairo_t", "*ret") - if ownsreturn: - info.codeafter.append(' return PycairoContext_FromContext(ret, NULL, NULL);') - else: - info.codeafter.append(' cairo_reference(ret);\n' - ' return PycairoContext_FromContext(ret, NULL, NULL);') - - -class ArgMatcher: - def __init__(self): - self.argtypes = {} - self.reverse_argtypes = {} - self.reverse_rettypes = {} - - def register(self, ptype, handler, overwrite=False): - if not overwrite and ptype in self.argtypes: - return - self.argtypes[ptype] = handler - def register_reverse(self, ptype, handler): - self.reverse_argtypes[ptype] = handler - def register_reverse_ret(self, ptype, handler): - self.reverse_rettypes[ptype] = handler - - def register_enum(self, ptype, typecode): - if typecode is None: - self.register(ptype, IntArg()) - else: - self.register(ptype, EnumArg(ptype, typecode)) - def register_flag(self, ptype, typecode): - if typecode is None: - self.register(ptype, IntArg()) - else: - self.register(ptype, FlagsArg(ptype, typecode)) - def register_object(self, ptype, parent, typecode): - oa = ObjectArg(ptype, parent, typecode) - self.register(ptype, oa) # in case I forget the * in the .defs - self.register(ptype+'*', oa) - self.register('const-'+ptype+'*', oa) - if ptype == 'GdkPixmap': - # hack to handle GdkBitmap synonym. - self.register('GdkBitmap', oa) - self.register('GdkBitmap*', oa) - def register_boxed(self, ptype, typecode): - if self.argtypes.has_key(ptype): return - arg = BoxedArg(ptype, typecode) - self.register(ptype, arg) - self.register(ptype+'*', arg) - self.register('const-'+ptype+'*', arg) - def register_custom_boxed(self, ptype, pytype, getter, new): - arg = CustomBoxedArg(ptype, pytype, getter, new) - self.register(ptype+'*', arg) - self.register('const-'+ptype+'*', arg) - def register_pointer(self, ptype, typecode): - arg = PointerArg(ptype, typecode) - self.register(ptype, arg) - self.register(ptype+'*', arg) - self.register('const-'+ptype+'*', arg) - - def get(self, ptype): - try: - return self.argtypes[ptype] - except KeyError: - if ptype[:8] == 'GdkEvent' and ptype[-1] == '*': - return self.argtypes['GdkEvent*'] - raise ArgTypeNotFoundError("No ArgType for %s" % (ptype,)) - def _get_reverse_common(self, ptype, registry): - props = dict(c_type=ptype) - try: - return registry[ptype], props - except KeyError: - try: - handler = self.argtypes[ptype] - except KeyError: - if ptype.startswith('GdkEvent') and ptype.endswith('*'): - handler = self.argtypes['GdkEvent*'] - else: - raise ArgTypeNotFoundError("No ArgType for %s" % (ptype,)) - if isinstance(handler, ObjectArg): - return registry['GObject*'], props - elif isinstance(handler, EnumArg): - props['typecode'] = handler.typecode - props['enumname'] = handler.enumname - return registry['GEnum'], props - elif isinstance(handler, FlagsArg): - props['typecode'] = handler.typecode - props['flagname'] = handler.flagname - return registry['GFlags'], props - elif isinstance(handler, BoxedArg): - props['typecode'] = handler.typecode - props['typename'] = handler.typename - return registry['GBoxed'], props - else: - raise ArgTypeNotFoundError("No ArgType for %s" % (ptype,)) - def get_reverse(self, ptype): - return self._get_reverse_common(ptype, self.reverse_argtypes) - def get_reverse_ret(self, ptype): - return self._get_reverse_common(ptype, self.reverse_rettypes) - - def object_is_a(self, otype, parent): - if otype == None: return 0 - if otype == parent: return 1 - if not self.argtypes.has_key(otype): return 0 - return self.object_is_a(self.get(otype).parent, parent) - -matcher = ArgMatcher() - -arg = NoneArg() -matcher.register(None, arg) -matcher.register('none', arg) - -arg = StringArg() -matcher.register('char*', arg) -matcher.register('gchar*', arg) -matcher.register('const-char*', arg) -matcher.register('char-const*', arg) -matcher.register('const-gchar*', arg) -matcher.register('gchar-const*', arg) -matcher.register('string', arg) -matcher.register('static_string', arg) - -arg = UCharArg() -matcher.register('unsigned-char*', arg) -matcher.register('const-guchar*', arg) -matcher.register('const-guint8*', arg) -matcher.register('guchar*', arg) - -arg = CharArg() -matcher.register('char', arg) -matcher.register('gchar', arg) -matcher.register('guchar', arg) - -arg = GUniCharArg() -matcher.register('gunichar', arg) - -arg = IntArg() -matcher.register('int', arg) -matcher.register('gint', arg) -matcher.register('short', arg) -matcher.register('gshort', arg) -matcher.register('gushort', arg) -matcher.register('gsize', SizeArg()) -matcher.register('gssize', SSizeArg()) -matcher.register('guint8', arg) -matcher.register('gint8', arg) -matcher.register('guint16', arg) -matcher.register('gint16', arg) -matcher.register('gint32', arg) -matcher.register('GTime', arg) - -arg = LongArg() -matcher.register('long', arg) -matcher.register('glong', arg) - -arg = UIntArg() -matcher.register('guint', arg) - -arg = BoolArg() -matcher.register('gboolean', arg) - -arg = TimeTArg() -matcher.register('time_t', arg) - -matcher.register('guint32', UInt32Arg()) - -arg = ULongArg() -matcher.register('gulong', arg) - -arg = Int64Arg() -matcher.register('gint64', arg) -matcher.register('long-long', arg) - -arg = UInt64Arg() -matcher.register('guint64', arg) -matcher.register('unsigned-long-long', arg) - -arg = DoubleArg() -matcher.register('double', arg) -matcher.register('gdouble', arg) -matcher.register('float', arg) -matcher.register('gfloat', arg) - -arg = FileArg() -matcher.register('FILE*', arg) - -# enums, flags, objects - -matcher.register('GdkAtom', AtomArg()) - -matcher.register('GType', GTypeArg()) -matcher.register('GtkType', GTypeArg()) - -matcher.register('GError**', GErrorArg()) -matcher.register('GtkTreePath*', GtkTreePathArg()) -matcher.register('GdkRectangle*', GdkRectanglePtrArg()) -matcher.register('GtkAllocation*', GdkRectanglePtrArg()) -matcher.register('GdkRectangle', GdkRectangleArg()) -matcher.register('PyObject*', PyObjectArg()) - -matcher.register('GdkNativeWindow', ULongArg()) - -matcher.register_object('GObject', None, 'G_TYPE_OBJECT') - -del arg - -matcher.register('cairo_t*', CairoArg()) diff --git a/codegen/code-coverage.py b/codegen/code-coverage.py deleted file mode 100755 index fd150347..00000000 --- a/codegen/code-coverage.py +++ /dev/null @@ -1,42 +0,0 @@ -from __future__ import generators -import sys, os - -def read_symbols(file, type=None, dynamic=0): - if dynamic: - cmd = 'nm -D %s' % file - else: - cmd = 'nm %s' % file - for line in os.popen(cmd, 'r'): - if line[0] != ' ': # has an address as first bit of line - while line[0] != ' ': - line = line[1:] - while line[0] == ' ': - line = line[1:] - # we should be up to "type symbolname" now - sym_type = line[0] - symbol = line[1:].strip() - - if not type or type == sym_type: - yield symbol - -def main(): - if len(sys.argv) != 3: - sys.stderr.write('usage: coverage-check library.so wrapper.so\n') - sys.exit(1) - library = sys.argv[1] - wrapper = sys.argv[2] - - # first create a dict with all referenced symbols in the wrapper - # should really be a set, but a dict will do ... - wrapper_symbols = {} - for symbol in read_symbols(wrapper, type='U', dynamic=1): - wrapper_symbols[symbol] = 1 - - # now go through the library looking for matches on the defined symbols: - for symbol in read_symbols(library, type='T', dynamic=1): - if symbol[0] == '_': continue - if symbol not in wrapper_symbols: - print symbol - -if __name__ == '__main__': - main() diff --git a/codegen/codegen.py b/codegen/codegen.py deleted file mode 100644 index c0ca17bd..00000000 --- a/codegen/codegen.py +++ /dev/null @@ -1,1707 +0,0 @@ -import getopt -import keyword -import os -import string -import sys - -import argtypes -import definitions -import defsparser -import override -import reversewrapper -import warnings - -class Coverage(object): - def __init__(self, name): - self.name = name - self.wrapped = 0 - self.not_wrapped = 0 - - def declare_wrapped(self): - self.wrapped += 1 - - def declare_not_wrapped(self): - self.not_wrapped += 1 - - def printstats(self): - total = self.wrapped + self.not_wrapped - fd = sys.stderr - if total: - fd.write("***INFO*** The coverage of %s is %.2f%% (%i/%i)\n" % - (self.name, - float(self.wrapped*100)/total, - self.wrapped, - total)) - else: - fd.write("***INFO*** There are no declared %s.\n" % self.name) - -functions_coverage = Coverage("global functions") -methods_coverage = Coverage("methods") -vproxies_coverage = Coverage("virtual proxies") -vaccessors_coverage = Coverage("virtual accessors") -iproxies_coverage = Coverage("interface proxies") - -def exc_info(): - warnings.warn("deprecated", DeprecationWarning, stacklevel=2) - #traceback.print_exc() - etype, value, tb = sys.exc_info() - ret = "" - try: - sval = str(value) - if etype == argtypes.ArgTypeError: - ret = "No ArgType for %s" % (sval,) - else: - ret = sval - finally: - del etype, value, tb - return ret - -def fixname(name): - if keyword.iskeyword(name): - return name + '_' - return name - -class FileOutput: - '''Simple wrapper for file object, that makes writing #line - statements easier.''' # " - def __init__(self, fp, filename=None): - self.fp = fp - self.lineno = 1 - if filename: - self.filename = filename - else: - self.filename = self.fp.name - # handle writing to the file, and keep track of the line number ... - def write(self, str): - self.fp.write(str) - self.lineno = self.lineno + string.count(str, '\n') - def writelines(self, sequence): - for line in sequence: - self.write(line) - def close(self): - self.fp.close() - def flush(self): - self.fp.flush() - - def setline(self, linenum, filename): - '''writes out a #line statement, for use by the C - preprocessor.''' # " - self.write('#line %d "%s"\n' % (linenum, filename)) - def resetline(self): - '''resets line numbering to the original file''' - self.setline(self.lineno + 1, self.filename) - -class Wrapper: - type_tmpl = ( - 'PyTypeObject G_GNUC_INTERNAL Py%(typename)s_Type = {\n' - ' PyObject_HEAD_INIT(NULL)\n' - ' 0, /* ob_size */\n' - ' "%(classname)s", /* tp_name */\n' - ' sizeof(%(tp_basicsize)s), /* tp_basicsize */\n' - ' 0, /* tp_itemsize */\n' - ' /* methods */\n' - ' (destructor)%(tp_dealloc)s, /* tp_dealloc */\n' - ' (printfunc)0, /* tp_print */\n' - ' (getattrfunc)%(tp_getattr)s, /* tp_getattr */\n' - ' (setattrfunc)%(tp_setattr)s, /* tp_setattr */\n' - ' (cmpfunc)%(tp_compare)s, /* tp_compare */\n' - ' (reprfunc)%(tp_repr)s, /* tp_repr */\n' - ' (PyNumberMethods*)%(tp_as_number)s, /* tp_as_number */\n' - ' (PySequenceMethods*)%(tp_as_sequence)s, /* tp_as_sequence */\n' - ' (PyMappingMethods*)%(tp_as_mapping)s, /* tp_as_mapping */\n' - ' (hashfunc)%(tp_hash)s, /* tp_hash */\n' - ' (ternaryfunc)%(tp_call)s, /* tp_call */\n' - ' (reprfunc)%(tp_str)s, /* tp_str */\n' - ' (getattrofunc)%(tp_getattro)s, /* tp_getattro */\n' - ' (setattrofunc)%(tp_setattro)s, /* tp_setattro */\n' - ' (PyBufferProcs*)%(tp_as_buffer)s, /* tp_as_buffer */\n' - ' %(tp_flags)s, /* tp_flags */\n' - ' %(tp_doc)s, /* Documentation string */\n' - ' (traverseproc)%(tp_traverse)s, /* tp_traverse */\n' - ' (inquiry)%(tp_clear)s, /* tp_clear */\n' - ' (richcmpfunc)%(tp_richcompare)s, /* tp_richcompare */\n' - ' %(tp_weaklistoffset)s, /* tp_weaklistoffset */\n' - ' (getiterfunc)%(tp_iter)s, /* tp_iter */\n' - ' (iternextfunc)%(tp_iternext)s, /* tp_iternext */\n' - ' (struct PyMethodDef*)%(tp_methods)s, /* tp_methods */\n' - ' (struct PyMemberDef*)0, /* tp_members */\n' - ' (struct PyGetSetDef*)%(tp_getset)s, /* tp_getset */\n' - ' NULL, /* tp_base */\n' - ' NULL, /* tp_dict */\n' - ' (descrgetfunc)%(tp_descr_get)s, /* tp_descr_get */\n' - ' (descrsetfunc)%(tp_descr_set)s, /* tp_descr_set */\n' - ' %(tp_dictoffset)s, /* tp_dictoffset */\n' - ' (initproc)%(tp_init)s, /* tp_init */\n' - ' (allocfunc)%(tp_alloc)s, /* tp_alloc */\n' - ' (newfunc)%(tp_new)s, /* tp_new */\n' - ' (freefunc)%(tp_free)s, /* tp_free */\n' - ' (inquiry)%(tp_is_gc)s /* tp_is_gc */\n' - '};\n\n' - ) - - slots_list = [ - 'tp_getattr', 'tp_setattr', 'tp_getattro', 'tp_setattro', - 'tp_compare', 'tp_repr', - 'tp_as_number', 'tp_as_sequence', 'tp_as_mapping', 'tp_hash', - 'tp_call', 'tp_str', 'tp_as_buffer', 'tp_richcompare', 'tp_iter', - 'tp_iternext', 'tp_descr_get', 'tp_descr_set', 'tp_init', - 'tp_alloc', 'tp_new', 'tp_free', 'tp_is_gc', - 'tp_traverse', 'tp_clear', 'tp_dealloc', 'tp_flags', 'tp_doc' - ] - - getter_tmpl = ( - 'static PyObject *\n' - '%(funcname)s(PyObject *self, void *closure)\n' - '{\n' - '%(varlist)s' - ' ret = %(field)s;\n' - '%(codeafter)s\n' - '}\n\n' - ) - - parse_tmpl = ( - ' if (!PyArg_ParseTupleAndKeywords(args, kwargs,' - '"%(typecodes)s:%(name)s"%(parselist)s))\n' - ' return %(errorreturn)s;\n' - ) - - deprecated_tmpl = ( - ' if (PyErr_Warn(PyExc_DeprecationWarning, ' - '"%(deprecationmsg)s") < 0)\n' - ' return %(errorreturn)s;\n' - ) - - methdef_tmpl = ( - ' { "%(name)s", (PyCFunction)%(cname)s, %(flags)s,\n' - ' %(docstring)s },\n' - ) - - noconstructor = ( - 'static int\n' - 'pygobject_no_constructor(PyObject *self, PyObject *args, ' - 'PyObject *kwargs)\n' - '{\n' - ' gchar buf[512];\n' - '\n' - ' g_snprintf(buf, sizeof(buf), "%s is an abstract widget", ' - 'self->ob_type->tp_name);\n' - ' PyErr_SetString(PyExc_NotImplementedError, buf);\n' - ' return -1;\n' - '}\n\n' - ) - - function_tmpl = ( - 'static PyObject *\n' - '_wrap_%(cname)s(PyObject *self%(extraparams)s)\n' - '{\n' - '%(varlist)s' - '%(parseargs)s' - '%(codebefore)s' - ' %(begin_allow_threads)s\n' - ' %(setreturn)s%(cname)s(%(arglist)s);\n' - ' %(end_allow_threads)s\n' - '%(codeafter)s\n' - '}\n\n' - ) - - virtual_accessor_tmpl = ( - 'static PyObject *\n' - '_wrap_%(cname)s(PyObject *cls%(extraparams)s)\n' - '{\n' - ' gpointer klass;\n' - '%(varlist)s' - '%(parseargs)s' - '%(codebefore)s' - ' klass = g_type_class_ref(pyg_type_from_object(cls));\n' - ' if (%(class_cast_macro)s(klass)->%(virtual)s)\n' - ' %(setreturn)s%(class_cast_macro)s(klass)->' - '%(virtual)s(%(arglist)s);\n' - ' else {\n' - ' PyErr_SetString(PyExc_NotImplementedError, ' - '"virtual method %(name)s not implemented");\n' - ' g_type_class_unref(klass);\n' - ' return NULL;\n' - ' }\n' - ' g_type_class_unref(klass);\n' - '%(codeafter)s\n' - '}\n\n' - ) - - # template for method calls - constructor_tmpl = None - method_tmpl = None - - def __init__(self, parser, objinfo, overrides, fp=FileOutput(sys.stdout)): - self.parser = parser - self.objinfo = objinfo - self.overrides = overrides - self.fp = fp - - def get_lower_name(self): - return string.lower(string.replace(self.objinfo.typecode, - '_TYPE_', '_', 1)) - - def get_field_accessor(self, fieldname): - raise NotImplementedError - - def get_initial_class_substdict(self): return {} - - def get_initial_constructor_substdict(self, constructor): - return { 'name': '%s.__init__' % self.objinfo.c_name, - 'errorreturn': '-1' } - def get_initial_method_substdict(self, method): - substdict = { 'name': '%s.%s' % (self.objinfo.c_name, method.name) } - if method.unblock_threads: - substdict['begin_allow_threads'] = 'pyg_begin_allow_threads;' - substdict['end_allow_threads'] = 'pyg_end_allow_threads;' - else: - substdict['begin_allow_threads'] = '' - substdict['end_allow_threads'] = '' - return substdict - - def write_class(self): - if self.overrides.is_type_ignored(self.objinfo.c_name): - return - self.fp.write('\n/* ----------- %s ----------- */\n\n' % - self.objinfo.c_name) - substdict = self.get_initial_class_substdict() - if not substdict.has_key('tp_flags'): - substdict['tp_flags'] = 'Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE' - substdict['typename'] = self.objinfo.c_name - if self.overrides.modulename: - substdict['classname'] = '%s.%s' % (self.overrides.modulename, - self.objinfo.name) - else: - substdict['classname'] = self.objinfo.name - substdict['tp_doc'] = self.objinfo.docstring - - # Maybe this could be done in a nicer way, but I'll leave it as it is - # for now: -- Johan - if not self.overrides.slot_is_overriden('%s.tp_init' % - self.objinfo.c_name): - substdict['tp_init'] = self.write_constructor() - substdict['tp_methods'] = self.write_methods() - substdict['tp_getset'] = self.write_getsets() - - # handle slots ... - for slot in self.slots_list: - - slotname = '%s.%s' % (self.objinfo.c_name, slot) - slotfunc = '_wrap_%s_%s' % (self.get_lower_name(), slot) - if slot[:6] == 'tp_as_': - slotfunc = '&' + slotfunc - if self.overrides.slot_is_overriden(slotname): - data = self.overrides.slot_override(slotname) - self.write_function(slotname, data) - substdict[slot] = slotfunc - else: - if not substdict.has_key(slot): - substdict[slot] = '0' - - self.fp.write(self.type_tmpl % substdict) - - self.write_virtuals() - - def write_function_wrapper(self, function_obj, template, - handle_return=0, is_method=0, kwargs_needed=0, - substdict=None): - '''This function is the guts of all functions that generate - wrappers for functions, methods and constructors.''' - if not substdict: substdict = {} - - info = argtypes.WrapperInfo() - - substdict.setdefault('errorreturn', 'NULL') - - # for methods, we want the leading comma - if is_method: - info.arglist.append('') - - if function_obj.varargs: - raise argtypes.ArgTypeNotFoundError("varargs functions not supported") - - for param in function_obj.params: - if param.pdflt and '|' not in info.parsestr: - info.add_parselist('|', [], []) - handler = argtypes.matcher.get(param.ptype) - handler.write_param(param.ptype, param.pname, param.pdflt, - param.pnull, info) - - substdict['setreturn'] = '' - if handle_return: - if function_obj.ret not in ('none', None): - substdict['setreturn'] = 'ret = ' - handler = argtypes.matcher.get(function_obj.ret) - handler.write_return(function_obj.ret, - function_obj.caller_owns_return, info) - - if function_obj.deprecated != None: - deprecated = self.deprecated_tmpl % { - 'deprecationmsg': function_obj.deprecated, - 'errorreturn': substdict['errorreturn'] } - else: - deprecated = '' - - # if name isn't set, set it to function_obj.name - substdict.setdefault('name', function_obj.name) - - if function_obj.unblock_threads: - substdict['begin_allow_threads'] = 'pyg_begin_allow_threads;' - substdict['end_allow_threads'] = 'pyg_end_allow_threads;' - else: - substdict['begin_allow_threads'] = '' - substdict['end_allow_threads'] = '' - - if self.objinfo: - substdict['typename'] = self.objinfo.c_name - substdict.setdefault('cname', function_obj.c_name) - substdict['varlist'] = info.get_varlist() - substdict['typecodes'] = info.parsestr - substdict['parselist'] = info.get_parselist() - substdict['arglist'] = info.get_arglist() - substdict['codebefore'] = deprecated + ( - string.replace(info.get_codebefore(), - 'return NULL', 'return ' + substdict['errorreturn']) - ) - substdict['codeafter'] = ( - string.replace(info.get_codeafter(), - 'return NULL', - 'return ' + substdict['errorreturn'])) - - if info.parsestr or kwargs_needed: - substdict['parseargs'] = self.parse_tmpl % substdict - substdict['extraparams'] = ', PyObject *args, PyObject *kwargs' - flags = 'METH_VARARGS|METH_KEYWORDS' - - # prepend the keyword list to the variable list - substdict['varlist'] = info.get_kwlist() + substdict['varlist'] - else: - substdict['parseargs'] = '' - substdict['extraparams'] = '' - flags = 'METH_NOARGS' - - return template % substdict, flags - - def write_constructor(self): - initfunc = '0' - constructor = self.parser.find_constructor(self.objinfo,self.overrides) - if not constructor: - return self.write_default_constructor() - - funcname = constructor.c_name - try: - if self.overrides.is_overriden(funcname): - data = self.overrides.override(funcname) - self.write_function(funcname, data) - self.objinfo.has_new_constructor_api = ( - self.objinfo.typecode in - self.overrides.newstyle_constructors) - else: - # ok, a hack to determine if we should use - # new-style constructores :P - property_based = getattr(self, - 'write_property_based_constructor', - None) - if property_based: - if (len(constructor.params) == 0 or - isinstance(constructor.params[0], - definitions.Property)): - # write_property_based_constructor is only - # implemented in GObjectWrapper - return self.write_property_based_constructor( - constructor) - else: - sys.stderr.write( - "Warning: generating old-style constructor for:" + - constructor.c_name + '\n') - - # write constructor from template ... - code = self.write_function_wrapper(constructor, - self.constructor_tmpl, - handle_return=0, is_method=0, kwargs_needed=1, - substdict=self.get_initial_constructor_substdict( - constructor))[0] - self.fp.write(code) - initfunc = '_wrap_' + funcname - except argtypes.ArgTypeError, ex: - sys.stderr.write('Could not write constructor for %s: %s\n' - % (self.objinfo.c_name, str(ex))) - - initfunc = self.write_noconstructor() - return initfunc - - def write_noconstructor(self): - # this is a hack ... - if not hasattr(self.overrides, 'no_constructor_written'): - self.fp.write(self.noconstructor) - self.overrides.no_constructor_written = 1 - initfunc = 'pygobject_no_constructor' - return initfunc - - def write_default_constructor(self): - return self.write_noconstructor() - - def get_methflags(self, funcname): - if self.overrides.wants_kwargs(funcname): - flags = 'METH_VARARGS|METH_KEYWORDS' - elif self.overrides.wants_noargs(funcname): - flags = 'METH_NOARGS' - elif self.overrides.wants_onearg(funcname): - flags = 'METH_O' - else: - flags = 'METH_VARARGS' - if self.overrides.is_staticmethod(funcname): - flags += '|METH_STATIC' - elif self.overrides.is_classmethod(funcname): - flags += '|METH_CLASS' - return flags - - def write_function(self, funcname, data): - lineno, filename = self.overrides.getstartline(funcname) - self.fp.setline(lineno, filename) - self.fp.write(data) - self.fp.resetline() - self.fp.write('\n\n') - - def _get_class_virtual_substdict(self, meth, cname, parent): - substdict = self.get_initial_method_substdict(meth) - substdict['virtual'] = substdict['name'].split('.')[1] - substdict['cname'] = cname - substdict['class_cast_macro'] = parent.typecode.replace( - '_TYPE_', '_', 1) + "_CLASS" - substdict['typecode'] = self.objinfo.typecode - substdict['cast'] = string.replace(parent.typecode, '_TYPE_', '_', 1) - return substdict - - def write_methods(self): - methods = [] - klass = self.objinfo.c_name - # First, get methods from the defs files - for meth in self.parser.find_methods(self.objinfo): - method_name = meth.c_name - if self.overrides.is_ignored(method_name): - continue - try: - if self.overrides.is_overriden(method_name): - if not self.overrides.is_already_included(method_name): - data = self.overrides.override(method_name) - self.write_function(method_name, data) - - methflags = self.get_methflags(method_name) - else: - # write constructor from template ... - code, methflags = self.write_function_wrapper(meth, - self.method_tmpl, handle_return=1, is_method=1, - substdict=self.get_initial_method_substdict(meth)) - self.fp.write(code) - methods.append(self.methdef_tmpl % - { 'name': fixname(meth.name), - 'cname': '_wrap_' + method_name, - 'flags': methflags, - 'docstring': meth.docstring }) - methods_coverage.declare_wrapped() - except argtypes.ArgTypeError, ex: - methods_coverage.declare_not_wrapped() - sys.stderr.write('Could not write method %s.%s: %s\n' - % (klass, meth.name, str(ex))) - - # Now try to see if there are any defined in the override - for method_name in self.overrides.get_defines_for(klass): - c_name = override.class2cname(klass, method_name) - if self.overrides.is_already_included(method_name): - continue - - try: - data = self.overrides.define(klass, method_name) - self.write_function(method_name, data) - methflags = self.get_methflags(method_name) - - methods.append(self.methdef_tmpl % - { 'name': method_name, - 'cname': '_wrap_' + c_name, - 'flags': methflags, - 'docstring': 'NULL' }) - methods_coverage.declare_wrapped() - except argtypes.ArgTypeError, ex: - methods_coverage.declare_not_wrapped() - sys.stderr.write('Could not write method %s.%s: %s\n' - % (klass, method_name, str(ex))) - - # Add GObject virtual method accessors, for chaining to parent - # virtuals from subclasses - methods += self.write_virtual_accessors() - - if methods: - methoddefs = '_Py%s_methods' % self.objinfo.c_name - # write the PyMethodDef structure - methods.append(' { NULL, NULL, 0, NULL }\n') - self.fp.write('static const PyMethodDef %s[] = {\n' % methoddefs) - self.fp.write(string.join(methods, '')) - self.fp.write('};\n\n') - else: - methoddefs = 'NULL' - return methoddefs - - def write_virtual_accessors(self): - klass = self.objinfo.c_name - methods = [] - for meth in self.parser.find_virtuals(self.objinfo): - method_name = self.objinfo.c_name + "__do_" + meth.name - if self.overrides.is_ignored(method_name): - continue - try: - if self.overrides.is_overriden(method_name): - if not self.overrides.is_already_included(method_name): - data = self.overrides.override(method_name) - self.write_function(method_name, data) - methflags = self.get_methflags(method_name) - else: - # temporarily add a 'self' parameter as first argument - meth.params.insert(0, definitions.Parameter( - ptype=(self.objinfo.c_name + '*'), - pname='self', pdflt=None, pnull=None)) - try: - # write method from template ... - code, methflags = self.write_function_wrapper( - meth, self.virtual_accessor_tmpl, - handle_return=True, is_method=False, - substdict=self._get_class_virtual_substdict( - meth, method_name, self.objinfo)) - self.fp.write(code) - finally: - del meth.params[0] - methods.append(self.methdef_tmpl % - { 'name': "do_" + fixname(meth.name), - 'cname': '_wrap_' + method_name, - 'flags': methflags + '|METH_CLASS', - 'docstring': 'NULL'}) - vaccessors_coverage.declare_wrapped() - except argtypes.ArgTypeError, ex: - vaccessors_coverage.declare_not_wrapped() - sys.stderr.write( - 'Could not write virtual accessor method %s.%s: %s\n' - % (klass, meth.name, str(ex))) - return methods - - def write_virtuals(self): - ''' - Write _wrap_FooBar__proxy_do_zbr() reverse wrapers for - GObject virtuals - ''' - klass = self.objinfo.c_name - virtuals = [] - for meth in self.parser.find_virtuals(self.objinfo): - method_name = self.objinfo.c_name + "__proxy_do_" + meth.name - if self.overrides.is_ignored(method_name): - continue - try: - if self.overrides.is_overriden(method_name): - if not self.overrides.is_already_included(method_name): - data = self.overrides.override(method_name) - self.write_function(method_name, data) - else: - # write virtual proxy ... - ret, props = argtypes.matcher.get_reverse_ret(meth.ret) - wrapper = reversewrapper.ReverseWrapper( - '_wrap_' + method_name, is_static=True) - wrapper.set_return_type(ret(wrapper, **props)) - wrapper.add_parameter(reversewrapper.PyGObjectMethodParam( - wrapper, "self", method_name="do_" + meth.name, - c_type=(klass + ' *'))) - for param in meth.params: - handler, props = argtypes.matcher.get_reverse( - param.ptype) - props["direction"] = param.pdir - wrapper.add_parameter(handler(wrapper, - param.pname, **props)) - buf = reversewrapper.MemoryCodeSink() - wrapper.generate(buf) - self.fp.write(buf.flush()) - virtuals.append((fixname(meth.name), '_wrap_' + method_name)) - vproxies_coverage.declare_wrapped() - except argtypes.ArgTypeError, ex: - vproxies_coverage.declare_not_wrapped() - virtuals.append((fixname(meth.name), None)) - sys.stderr.write('Could not write virtual proxy %s.%s: %s\n' - % (klass, meth.name, str(ex))) - if virtuals: - # Write a 'pygtk class init' function for this object, - # except when the object type is explicitly ignored (like - # GtkPlug and GtkSocket on win32). - if self.overrides.is_ignored(self.objinfo.typecode): - return - class_cast_macro = self.objinfo.typecode.replace( - '_TYPE_', '_', 1) + "_CLASS" - cast_macro = self.objinfo.typecode.replace('_TYPE_', '_', 1) - funcname = "__%s_class_init" % klass - self.objinfo.class_init_func = funcname - have_implemented_virtuals = not not [True - for name, cname in virtuals - if cname is not None] - self.fp.write( - ('\nstatic int\n' - '%(funcname)s(gpointer gclass, PyTypeObject *pyclass)\n' - '{\n') % vars()) - - if have_implemented_virtuals: - self.fp.write(' PyObject *o;\n') - self.fp.write( - ' %(klass)sClass *klass = ' - '%(class_cast_macro)s(gclass);\n' - ' PyObject *gsignals = ' - 'PyDict_GetItemString(pyclass->tp_dict, "__gsignals__");\n' - % vars()) - - for name, cname in virtuals: - do_name = 'do_' + name - if cname is None: - self.fp.write('\n /* overriding %(do_name)s ' - 'is currently not supported */\n' % vars()) - else: - self.fp.write(''' - o = PyObject_GetAttrString((PyObject *) pyclass, "%(do_name)s"); - if (o == NULL) - PyErr_Clear(); - else { - if (!PyObject_TypeCheck(o, &PyCFunction_Type) - && !(gsignals && PyDict_GetItemString(gsignals, "%(name)s"))) - klass->%(name)s = %(cname)s; - Py_DECREF(o); - } -''' % vars()) - self.fp.write(' return 0;\n}\n') - - def write_getsets(self): - lower_name = self.get_lower_name() - getsets_name = lower_name + '_getsets' - getterprefix = '_wrap_' + lower_name + '__get_' - setterprefix = '_wrap_' + lower_name + '__set_' - - # no overrides for the whole function. If no fields, - # don't write a func - if not self.objinfo.fields: - return '0' - getsets = [] - for ftype, cfname in self.objinfo.fields: - fname = cfname.replace('.', '_') - gettername = '0' - settername = '0' - attrname = self.objinfo.c_name + '.' + fname - if self.overrides.attr_is_overriden(attrname): - code = self.overrides.attr_override(attrname) - self.write_function(attrname, code) - if string.find(code, getterprefix + fname) >= 0: - gettername = getterprefix + fname - if string.find(code, setterprefix + fname) >= 0: - settername = setterprefix + fname - if gettername == '0': - try: - funcname = getterprefix + fname - info = argtypes.WrapperInfo() - handler = argtypes.matcher.get(ftype) - # for attributes, we don't own the "return value" - handler.write_return(ftype, 0, info) - self.fp.write(self.getter_tmpl % - { 'funcname': funcname, - 'varlist': info.varlist, - 'field': self.get_field_accessor(cfname), - 'codeafter': info.get_codeafter() }) - gettername = funcname - except argtypes.ArgTypeError, ex: - sys.stderr.write( - "Could not write getter for %s.%s: %s\n" - % (self.objinfo.c_name, fname, str(ex))) - if gettername != '0' or settername != '0': - getsets.append(' { "%s", (getter)%s, (setter)%s },\n' % - (fixname(fname), gettername, settername)) - - if not getsets: - return '0' - self.fp.write('static const PyGetSetDef %s[] = {\n' % getsets_name) - for getset in getsets: - self.fp.write(getset) - self.fp.write(' { NULL, (getter)0, (setter)0 },\n') - self.fp.write('};\n\n') - - return getsets_name - - def _write_get_symbol_names(self, writer, functions): - self.fp.write("""static PyObject * -_wrap__get_symbol_names(PyObject *self) -{ - PyObject *pylist = PyList_New(0); - -""") - for obj, bases in writer.get_classes(): - self.fp.write(' PyList_Append(pylist, ' - 'PyString_FromString("%s"));\n' % (obj.name)) - - for name, cname, flags, docstring in functions: - self.fp.write(' PyList_Append(pylist, ' - 'PyString_FromString("%s"));\n' % (name)) - - for enum in writer.get_enums(): - self.fp.write(' PyList_Append(pylist, ' - 'PyString_FromString("%s"));\n' % (enum.name)) - for nick, value in enum.values: - name = value[len(self.overrides.modulename)+1:] - self.fp.write(' PyList_Append(pylist, ' - 'PyString_FromString("%s"));\n' % (name)) - - self.fp.write(" return pylist;\n}\n\n"); - - def _write_get_symbol(self, writer, functions): - self.fp.write("""static PyObject * -_wrap__get_symbol(PyObject *self, PyObject *args) -{ - PyObject *d; - char *name; - static PyObject *modulename = NULL; - static PyObject *module = NULL; - static char *strip_prefix = "%s"; - - if (!PyArg_ParseTuple(args, "Os", &d, &name)) - return NULL; - - if (!modulename) - modulename = PyString_FromString("%s"); - - if (!module) - module = PyDict_GetItemString(d, "__module__"); - -""" % (self.overrides.modulename.upper() + '_', - self.overrides.modulename)) - - first = True - # Classes / GObjects - for obj, bases in writer.get_classes(): - if first: - self.fp.write(' if (!strcmp(name, "%s")) {\n' % obj.name) - first = False - else: - self.fp.write(' } else if (!strcmp(name, "%s")) {\n' % obj.name) - self.fp.write( - ' return (PyObject*)pygobject_lookup_class(%s);\n' % - obj.typecode) - self.fp.write(' }\n') - - # Functions - for name, cname, flags, docstring in functions: - self.fp.write(' else if (!strcmp(name, "%s")) {\n' % name) - self.fp.write(' static PyMethodDef ml = { ' - '"%s", (PyCFunction)%s, %s, "%s"};\n' % ( - name, cname, flags, docstring)) - self.fp.write(' return PyCFunction_NewEx(&ml, NULL, modulename);\n') - self.fp.write(' }\n') - - # Enums - def write_enum(enum, returnobj=False): - if returnobj: - ret = 'return ' - else: - ret = '' - if enum.deftype == 'enum': - self.fp.write( - ' %spyg_enum_add(module, "%s", strip_prefix, %s);\n' - % (ret, enum.name, enum.typecode)) - else: - self.fp.write( - ' %spyg_flags_add(module, "%s", strip_prefix, %s);\n' - % (ret, enum.name, enum.typecode)) - - strip_len = len(self.overrides.modulename)+1 # GTK_ - for enum in writer.get_enums(): - # XXX: Implement without typecodes - self.fp.write(' else if (!strcmp(name, "%s")) {\n' % enum.name) - write_enum(enum, returnobj=True) - self.fp.write(' }\n') - - for nick, value in enum.values: - value = value[strip_len:] - self.fp.write(' else if (!strcmp(name, "%s")) {\n' % value) - write_enum(enum) - self.fp.write(' return PyObject_GetAttrString(module, "%s");\n' % - value) - self.fp.write(' }\n') - - self.fp.write(' return Py_None;\n}\n\n'); - - def _write_function_bodies(self): - functions = [] - # First, get methods from the defs files - for func in self.parser.find_functions(): - funcname = func.c_name - if self.overrides.is_ignored(funcname): - continue - try: - if self.overrides.is_overriden(funcname): - data = self.overrides.override(funcname) - self.write_function(funcname, data) - - methflags = self.get_methflags(funcname) - else: - # write constructor from template ... - code, methflags = self.write_function_wrapper(func, - self.function_tmpl, handle_return=1, is_method=0) - self.fp.write(code) - functions.append((func.name, '_wrap_' + funcname, - methflags, func.docstring)) - functions_coverage.declare_wrapped() - except argtypes.ArgTypeError, ex: - functions_coverage.declare_not_wrapped() - sys.stderr.write('Could not write function %s: %s\n' - % (func.name, str(ex))) - - # Now try to see if there are any defined in the override - for funcname in self.overrides.get_functions(): - try: - data = self.overrides.function(funcname) - self.write_function(funcname, data) - methflags = self.get_methflags(funcname) - functions.append((funcname, '_wrap_' + funcname, - methflags, 'NULL')) - functions_coverage.declare_wrapped() - except argtypes.ArgTypeError, ex: - functions_coverage.declare_not_wrapped() - sys.stderr.write('Could not write function %s: %s\n' - % (funcname, str(ex))) - return functions - - def write_functions(self, writer, prefix): - self.fp.write('\n/* ----------- functions ----------- */\n\n') - functions = [] - func_infos = self._write_function_bodies() - - # If we have a dynamic namespace, write symbol and attribute getter - if self.overrides.dynamicnamespace: - self._write_get_symbol_names(writer, func_infos) - self._write_get_symbol(writer, func_infos) - for obj, bases in writer.get_classes(): - self.fp.write("""static PyTypeObject * -%s_register_type(const gchar *name, PyObject *unused) -{ - PyObject *m = PyImport_ImportModule("gtk"); - PyObject *d = PyModule_GetDict(m); -""" % obj.c_name) - writer.write_class(obj, bases, indent=1) - self.fp.write( - ' return (%s)PyDict_GetItemString(d, "%s");\n' % ( - 'PyTypeObject*', obj.name)) - self.fp.write("}\n") - - functions.append(' { "_get_symbol_names", ' - '(PyCFunction)_wrap__get_symbol_names, ' - 'METH_NOARGS, NULL },\n') - functions.append(' { "_get_symbol", ' - '(PyCFunction)_wrap__get_symbol, ' - 'METH_VARARGS, NULL },\n') - else: - for name, cname, flags, docstring in func_infos: - functions.append(self.methdef_tmpl % dict(name=name, - cname=cname, - flags=flags, - docstring=docstring)) - - # write the PyMethodDef structure - functions.append(' { NULL, NULL, 0, NULL }\n') - - self.fp.write('const PyMethodDef ' + prefix + '_functions[] = {\n') - self.fp.write(string.join(functions, '')) - self.fp.write('};\n\n') - -class GObjectWrapper(Wrapper): - constructor_tmpl = ( - 'static int\n' - '_wrap_%(cname)s(PyGObject *self%(extraparams)s)\n' - '{\n' - '%(varlist)s' - '%(parseargs)s' - '%(codebefore)s' - ' self->obj = (GObject *)%(cname)s(%(arglist)s);\n' - '%(codeafter)s\n' - ' if (!self->obj) {\n' - ' PyErr_SetString(PyExc_RuntimeError, ' - '"could not create %(typename)s object");\n' - ' return -1;\n' - ' }\n' - '%(aftercreate)s' - ' pygobject_register_wrapper((PyObject *)self);\n' - ' return 0;\n' - '}\n\n' - ) - - method_tmpl = ( - 'static PyObject *\n' - '_wrap_%(cname)s(PyGObject *self%(extraparams)s)\n' - '{\n' - '%(varlist)s' - '%(parseargs)s' - '%(codebefore)s' - ' %(begin_allow_threads)s\n' - ' %(setreturn)s%(cname)s(%(cast)s(self->obj)%(arglist)s);\n' - ' %(end_allow_threads)s\n' - '%(codeafter)s\n' - '}\n\n' - ) - def __init__(self, parser, objinfo, overrides, fp=FileOutput(sys.stdout)): - Wrapper.__init__(self, parser, objinfo, overrides, fp) - if self.objinfo: - self.castmacro = string.replace(self.objinfo.typecode, - '_TYPE_', '_', 1) - - def get_initial_class_substdict(self): - return { 'tp_basicsize' : 'PyGObject', - 'tp_weaklistoffset' : 'offsetof(PyGObject, weakreflist)', - 'tp_dictoffset' : 'offsetof(PyGObject, inst_dict)' } - - def get_field_accessor(self, fieldname): - castmacro = string.replace(self.objinfo.typecode, '_TYPE_', '_', 1) - return '%s(pygobject_get(self))->%s' % (castmacro, fieldname) - - def get_initial_constructor_substdict(self, constructor): - substdict = Wrapper.get_initial_constructor_substdict(self, - constructor) - if not constructor.caller_owns_return: - substdict['aftercreate'] = " g_object_ref(self->obj);\n" - else: - substdict['aftercreate'] = '' - return substdict - - def get_initial_method_substdict(self, method): - substdict = Wrapper.get_initial_method_substdict(self, method) - substdict['cast'] = string.replace(self.objinfo.typecode, - '_TYPE_', '_', 1) - return substdict - - def write_default_constructor(self): - try: - parent = self.parser.find_object(self.objinfo.parent) - except ValueError: - parent = None - if parent is not None: - ## just like the constructor is inheritted, we should - # inherit the new API compatibility flag - self.objinfo.has_new_constructor_api = ( - parent.has_new_constructor_api) - elif self.objinfo.parent == 'GObject': - self.objinfo.has_new_constructor_api = True - return '0' - - def write_property_based_constructor(self, constructor): - self.objinfo.has_new_constructor_api = True - out = self.fp - print >> out, "static int" - print >> out, '_wrap_%s(PyGObject *self, PyObject *args,' \ - ' PyObject *kwargs)\n{' % constructor.c_name - if constructor.params: - s = " GType obj_type = pyg_type_from_object((PyObject *) self);" - print >> out, s - - def py_str_list_to_c(arg): - if arg: - return "{" + ", ".join( - map(lambda s: '"' + s + '"', arg)) + ", NULL }" - else: - return "{ NULL }" - - classname = '%s.%s' % (self.overrides.modulename, - self.objinfo.name) - - if constructor.params: - mandatory_arguments = [param for param in constructor.params - if not param.optional] - optional_arguments = [param for param in constructor.params - if param.optional] - arg_names = py_str_list_to_c( - [param.argname - for param in mandatory_arguments + optional_arguments]) - - prop_names = py_str_list_to_c( - [param.pname - for param in mandatory_arguments + optional_arguments]) - - print >> out, " GParameter params[%i];" % \ - len(constructor.params) - print >> out, " PyObject *parsed_args[%i] = {NULL, };" % \ - len(constructor.params) - print >> out, " char *arg_names[] = %s;" % arg_names - print >> out, " char *prop_names[] = %s;" % prop_names - print >> out, " guint nparams, i;" - print >> out - if constructor.deprecated is not None: - out.write( - ' if (PyErr_Warn(PyExc_DeprecationWarning, ' - '"%s") < 0)\n' % - constructor.deprecated) - print >> out, ' return -1;' - print >> out - out.write(" if (!PyArg_ParseTupleAndKeywords(args, kwargs, ") - template = '"' - if mandatory_arguments: - template += "O"*len(mandatory_arguments) - if optional_arguments: - template += "|" + "O"*len(optional_arguments) - template += ':%s.__init__"' % classname - print >> out, template, ", arg_names", - for i in range(len(constructor.params)): - print >> out, ", &parsed_args[%i]" % i, - - out.write( - "))\n" - " return -1;\n" - "\n" - " memset(params, 0, sizeof(GParameter)*%i);\n" - " if (!pyg_parse_constructor_args(obj_type, arg_names,\n" - " prop_names, params, \n" - " &nparams, parsed_args))\n" - " return -1;\n" - " pygobject_constructv(self, nparams, params);\n" - " for (i = 0; i < nparams; ++i)\n" - " g_value_unset(¶ms[i].value);\n" - % len(constructor.params)) - else: - out.write( - " static char* kwlist[] = { NULL };\n" - "\n") - - if constructor.deprecated is not None: - out.write( - ' if (PyErr_Warn(PyExc_DeprecationWarning, "%s") < 0)\n' - ' return -1;\n' - '\n' % constructor.deprecated) - - out.write( - ' if (!PyArg_ParseTupleAndKeywords(args, kwargs,\n' - ' ":%s.__init__",\n' - ' kwlist))\n' - ' return -1;\n' - '\n' - ' pygobject_constructv(self, 0, NULL);\n' % classname) - out.write( - ' if (!self->obj) {\n' - ' PyErr_SetString(\n' - ' PyExc_RuntimeError, \n' - ' "could not create %s object");\n' - ' return -1;\n' - ' }\n' % classname) - - if not constructor.caller_owns_return: - print >> out, " g_object_ref(self->obj);\n" - - out.write( - ' return 0;\n' - '}\n\n') - - return "_wrap_%s" % constructor.c_name - - -class GInterfaceWrapper(GObjectWrapper): - virtual_accessor_tmpl = ( - 'static PyObject *\n' - '_wrap_%(cname)s(PyObject *cls%(extraparams)s)\n' - '{\n' - ' %(vtable)s *iface;\n' - '%(varlist)s' - '%(parseargs)s' - '%(codebefore)s' - ' iface = g_type_interface_peek(' - 'g_type_class_peek(pyg_type_from_object(cls)), %(typecode)s);\n' - ' if (iface->%(virtual)s)\n' - ' %(setreturn)siface->%(virtual)s(%(arglist)s);\n' - ' else {\n' - ' PyErr_SetString(PyExc_NotImplementedError, ' - '"interface method %(name)s not implemented");\n' - ' return NULL;\n' - ' }\n' - '%(codeafter)s\n' - '}\n\n' - ) - - def get_initial_class_substdict(self): - return { 'tp_basicsize' : 'PyObject', - 'tp_weaklistoffset' : '0', - 'tp_dictoffset' : '0'} - - def write_constructor(self): - # interfaces have no constructors ... - return '0' - def write_getsets(self): - # interfaces have no fields ... - return '0' - - def _get_class_virtual_substdict(self, meth, cname, parent): - substdict = self.get_initial_method_substdict(meth) - substdict['virtual'] = substdict['name'].split('.')[1] - substdict['cname'] = cname - substdict['typecode'] = self.objinfo.typecode - substdict['vtable'] = self.objinfo.vtable - return substdict - - def write_virtuals(self): - ## Now write reverse method wrappers, which let python code - ## implement interface methods. - # First, get methods from the defs files - klass = self.objinfo.c_name - proxies = [] - for meth in self.parser.find_virtuals(self.objinfo): - method_name = self.objinfo.c_name + "__proxy_do_" + meth.name - if self.overrides.is_ignored(method_name): - continue - try: - if self.overrides.is_overriden(method_name): - if not self.overrides.is_already_included(method_name): - data = self.overrides.override(method_name) - self.write_function(method_name, data) - else: - # write proxy ... - ret, props = argtypes.matcher.get_reverse_ret(meth.ret) - wrapper = reversewrapper.ReverseWrapper( - '_wrap_' + method_name, is_static=True) - wrapper.set_return_type(ret(wrapper, **props)) - wrapper.add_parameter(reversewrapper.PyGObjectMethodParam( - wrapper, "self", method_name="do_" + meth.name, - c_type=(klass + ' *'))) - for param in meth.params: - handler, props = argtypes.matcher.get_reverse( - param.ptype) - props["direction"] = param.pdir - wrapper.add_parameter( - handler(wrapper, param.pname, **props)) - buf = reversewrapper.MemoryCodeSink() - wrapper.generate(buf) - self.fp.write(buf.flush()) - proxies.append((fixname(meth.name), '_wrap_' + method_name)) - iproxies_coverage.declare_wrapped() - except argtypes.ArgTypeError, ex: - iproxies_coverage.declare_not_wrapped() - proxies.append((fixname(meth.name), None)) - sys.stderr.write('Could not write interface proxy %s.%s: %s\n' - % (klass, meth.name, str(ex))) - - if not proxies or not [cname for name, cname in proxies if cname]: - return - - ## Write an interface init function for this object - funcname = "__%s__interface_init" % klass - vtable = self.objinfo.vtable - self.fp.write( - '\nstatic void\n' - '%(funcname)s(%(vtable)s *iface, PyTypeObject *pytype)\n' - '{\n' - ' %(vtable)s *parent_iface = ' - 'g_type_interface_peek_parent(iface);\n' - ' PyObject *py_method;\n' - '\n' - % vars()) - - for name, cname in proxies: - do_name = 'do_' + name - if cname is None: - continue - - self.fp.write(( - ' py_method = pytype? PyObject_GetAttrString(' - '(PyObject *) pytype, "%(do_name)s") : NULL;\n' - ' if (py_method && !PyObject_TypeCheck(py_method, ' - '&PyCFunction_Type)) {\n' - ' iface->%(name)s = %(cname)s;\n' - ' } else {\n' - ' PyErr_Clear();\n' - ' if (parent_iface) {\n' - ' iface->%(name)s = parent_iface->%(name)s;\n' - ' }\n' - ' Py_XDECREF(py_method);\n' - ' }\n' - ) % vars()) - self.fp.write('}\n\n') - interface_info = "__%s__iinfo" % klass - self.fp.write(''' -static const GInterfaceInfo %s = { - (GInterfaceInitFunc) %s, - NULL, - NULL -}; -''' % (interface_info, funcname)) - self.objinfo.interface_info = interface_info - -class GBoxedWrapper(Wrapper): - constructor_tmpl = ( - 'static int\n' - '_wrap_%(cname)s(PyGBoxed *self%(extraparams)s)\n' - '{\n' - '%(varlist)s' - '%(parseargs)s' - '%(codebefore)s' - ' self->gtype = %(typecode)s;\n' - ' self->free_on_dealloc = FALSE;\n' - ' self->boxed = %(cname)s(%(arglist)s);\n' - '%(codeafter)s\n' - ' if (!self->boxed) {\n' - ' PyErr_SetString(PyExc_RuntimeError, ' - '"could not create %(typename)s object");\n' - ' return -1;\n' - ' }\n' - ' self->free_on_dealloc = TRUE;\n' - ' return 0;\n' - '}\n\n' - ) - - method_tmpl = ( - 'static PyObject *\n' - '_wrap_%(cname)s(PyObject *self%(extraparams)s)\n' - '{\n' - '%(varlist)s' - '%(parseargs)s' - '%(codebefore)s' - ' %(begin_allow_threads)s\n' - ' %(setreturn)s%(cname)s(pyg_boxed_get(self, ' - '%(typename)s)%(arglist)s);\n' - ' %(end_allow_threads)s\n' - '%(codeafter)s\n' - '}\n\n' - ) - - def get_initial_class_substdict(self): - return { 'tp_basicsize' : 'PyGBoxed', - 'tp_weaklistoffset' : '0', - 'tp_dictoffset' : '0' } - - def get_field_accessor(self, fieldname): - return 'pyg_boxed_get(self, %s)->%s' % (self.objinfo.c_name, fieldname) - - def get_initial_constructor_substdict(self, constructor): - substdict = Wrapper.get_initial_constructor_substdict( - self, constructor) - substdict['typecode'] = self.objinfo.typecode - return substdict - -class GPointerWrapper(GBoxedWrapper): - constructor_tmpl = ( - 'static int\n' - '_wrap_%(cname)s(PyGPointer *self%(extraparams)s)\n' - '{\n' - '%(varlist)s' - '%(parseargs)s' - '%(codebefore)s' - ' self->gtype = %(typecode)s;\n' - ' self->pointer = %(cname)s(%(arglist)s);\n' - '%(codeafter)s\n' - ' if (!self->pointer) {\n' - ' PyErr_SetString(PyExc_RuntimeError, ' - '"could not create %(typename)s object");\n' - ' return -1;\n' - ' }\n' - ' return 0;\n' - '}\n\n' - ) - - method_tmpl = ( - 'static PyObject *\n' - '_wrap_%(cname)s(PyObject *self%(extraparams)s)\n' - '{\n' - '%(varlist)s' - '%(parseargs)s' - '%(codebefore)s' - ' %(setreturn)s%(cname)s(pyg_pointer_get(self, ' - '%(typename)s)%(arglist)s);\n' - '%(codeafter)s\n' - '}\n\n' - ) - - def get_initial_class_substdict(self): - return { 'tp_basicsize' : 'PyGPointer', - 'tp_weaklistoffset' : '0', - 'tp_dictoffset' : '0' } - - def get_field_accessor(self, fieldname): - return 'pyg_pointer_get(self, %s)->%s' % (self.objinfo.c_name, - fieldname) - - def get_initial_constructor_substdict(self, constructor): - substdict = Wrapper.get_initial_constructor_substdict( - self, constructor) - substdict['typecode'] = self.objinfo.typecode - return substdict - -class SourceWriter: - def __init__(self, parser, overrides, prefix, fp=FileOutput(sys.stdout)): - self.parser = parser - self.overrides = overrides - self.prefix = prefix - self.fp = fp - - def write(self, py_ssize_t_clean=False): - argtypes.py_ssize_t_clean = py_ssize_t_clean - - self.write_headers(py_ssize_t_clean) - self.write_imports() - self.write_type_declarations() - self.write_body() - self.write_classes() - - wrapper = Wrapper(self.parser, None, self.overrides, self.fp) - wrapper.write_functions(self, self.prefix) - - if not self.overrides.dynamicnamespace: - self.write_enums() - self.write_extension_init() - self.write_registers() - - argtypes.py_ssize_t_clean = False - - def write_headers(self, py_ssize_t_clean): - self.fp.write('/* -- THIS FILE IS GENERATED - DO NOT EDIT */') - self.fp.write('/* -*- Mode: C; c-basic-offset: 4 -*- */\n\n') - if py_ssize_t_clean: - self.fp.write('#define PY_SSIZE_T_CLEAN\n') - self.fp.write('#include \n\n\n') - if py_ssize_t_clean: - self.fp.write(''' - -#if PY_VERSION_HEX < 0x02050000 -typedef int Py_ssize_t; -#define PY_SSIZE_T_MAX INT_MAX -#define PY_SSIZE_T_MIN INT_MIN -typedef inquiry lenfunc; -typedef intargfunc ssizeargfunc; -typedef intobjargproc ssizeobjargproc; -#endif - -''') - self.fp.write(self.overrides.get_headers()) - self.fp.resetline() - self.fp.write('\n\n') - - def write_imports(self): - self.fp.write('/* ---------- types from other modules ---------- */\n') - for module, pyname, cname in self.overrides.get_imports(): - self.fp.write('static PyTypeObject *_%s;\n' % cname) - self.fp.write('#define %s (*_%s)\n' % (cname, cname)) - self.fp.write('\n\n') - - def write_type_declarations(self): - #todo use 'static' if used only in one file - self.fp.write('/* ---------- forward type declarations ---------- */\n') - for obj in self.parser.boxes: - if not self.overrides.is_type_ignored(obj.c_name): - self.fp.write('PyTypeObject G_GNUC_INTERNAL Py' + obj.c_name + '_Type;\n') - for obj in self.parser.objects: - if not self.overrides.is_type_ignored(obj.c_name): - self.fp.write('PyTypeObject G_GNUC_INTERNAL Py' + obj.c_name + '_Type;\n') - for interface in self.parser.interfaces: - if not self.overrides.is_type_ignored(interface.c_name): - self.fp.write('PyTypeObject G_GNUC_INTERNAL Py' + interface.c_name + '_Type;\n') - self.fp.write('\n') - - def write_body(self): - self.fp.write(self.overrides.get_body()) - self.fp.resetline() - self.fp.write('\n\n') - - def _sort_parent_children(self, objects): - objects = list(objects) - modified = True - while modified: - modified = False - parent_index = None - child_index = None - for i, obj in enumerate(objects): - if obj.parent == 'GObject': - continue - if obj.parent not in [info.c_name for info in objects[:i]]: - for j, info in enumerate(objects[i+1:]): - if info.c_name == obj.parent: - parent_index = i + 1 + j - child_index = i - break - else: - continue - break - if child_index is not None and parent_index is not None: - if child_index != parent_index: - objects.insert(child_index, objects.pop(parent_index)) - modified = True - return objects - - def write_classes(self): - ## Sort the objects, so that we generate code for the parent types - ## before their children. - objects = self._sort_parent_children(self.parser.objects) - - for klass, items in ((GBoxedWrapper, self.parser.boxes), - (GPointerWrapper, self.parser.pointers), - (GObjectWrapper, objects), - (GInterfaceWrapper, self.parser.interfaces)): - for item in items: - instance = klass(self.parser, item, self.overrides, self.fp) - instance.write_class() - self.fp.write('\n') - - def get_enums(self): - enums = [] - for enum in self.parser.enums: - if self.overrides.is_type_ignored(enum.c_name): - continue - enums.append(enum) - return enums - - def write_enums(self): - if not self.parser.enums: - return - - self.fp.write('\n/* ----------- enums and flags ----------- */\n\n') - self.fp.write( - 'void\n' + self.prefix + - '_add_constants(PyObject *module, const gchar *strip_prefix)\n{\n') - - for enum in self.get_enums(): - if enum.typecode is None: - for nick, value in enum.values: - self.fp.write( - ' PyModule_AddIntConstant(module, ' - '(char *) pyg_constant_strip_prefix("%s", strip_prefix), %s);\n' - % (value, value)) - else: - if enum.deftype == 'enum': - self.fp.write(' pyg_enum_add(module, "%s", strip_prefix, %s);\n' - % (enum.name, enum.typecode)) - else: - self.fp.write(' pyg_flags_add(module, "%s", strip_prefix, %s);\n' - % (enum.name, enum.typecode)) - - self.fp.write('\n') - self.fp.write(' if (PyErr_Occurred())\n') - self.fp.write(' PyErr_Print();\n') - self.fp.write('}\n\n') - - def write_object_imports(self, retval=''): - imports = self.overrides.get_imports()[:] - if not imports: - return - - bymod = {} - for module, pyname, cname in imports: - bymod.setdefault(module, []).append((pyname, cname)) - self.fp.write(' PyObject *module;\n\n') - for module in bymod: - self.fp.write( - ' if ((module = PyImport_ImportModule("%s")) != NULL) {\n' - % module) - #self.fp.write( - # ' PyObject *moddict = PyModule_GetDict(module);\n\n') - for pyname, cname in bymod[module]: - #self.fp.write( - # ' _%s = (PyTypeObject *)PyDict_GetItemString(' - # 'moddict, "%s");\n' % (cname, pyname)) - self.fp.write( - ' _%s = (PyTypeObject *)PyObject_GetAttrString(' - 'module, "%s");\n' % (cname, pyname)) - self.fp.write(' if (_%s == NULL) {\n' % cname) - self.fp.write(' PyErr_SetString(PyExc_ImportError,\n') - self.fp.write(' "cannot import name %s from %s");\n' - % (pyname, module)) - self.fp.write(' return %s;\n' % retval) - self.fp.write(' }\n') - self.fp.write(' } else {\n') - self.fp.write(' PyErr_SetString(PyExc_ImportError,\n') - self.fp.write(' "could not import %s");\n' % module) - self.fp.write(' return %s;\n' % retval) - self.fp.write(' }\n') - self.fp.write('\n') - - def write_extension_init(self): - self.fp.write('/* initialise stuff extension classes */\n') - self.fp.write('void\n' + self.prefix + '_register_classes(PyObject *d)\n{\n') - self.write_object_imports() - self.fp.write(self.overrides.get_init() + '\n') - self.fp.resetline() - - def get_classes(self): - objects = self.parser.objects[:] - pos = 0 - while pos < len(objects): - parent = objects[pos].parent - for i in range(pos+1, len(objects)): - if objects[i].c_name == parent: - objects.insert(i+1, objects[pos]) - del objects[pos] - break - else: - pos = pos + 1 - - retval = [] - for obj in objects: - if self.overrides.is_type_ignored(obj.c_name): - continue - bases = [] - if obj.parent != None: - bases.append(obj.parent) - bases = bases + obj.implements - retval.append((obj, bases)) - - return retval - - def write_registers(self): - for boxed in self.parser.boxes: - if not self.overrides.is_type_ignored(boxed.c_name): - self.fp.write(' pyg_register_boxed(d, "' + boxed.name + - '", ' + boxed.typecode + - ', &Py' + boxed.c_name + - '_Type);\n') - for pointer in self.parser.pointers: - if not self.overrides.is_type_ignored(pointer.c_name): - self.fp.write(' pyg_register_pointer(d, "' + pointer.name + - '", ' + pointer.typecode + - ', &Py' + pointer.c_name + '_Type);\n') - for interface in self.parser.interfaces: - if not self.overrides.is_type_ignored(interface.c_name): - self.fp.write(' pyg_register_interface(d, "' - + interface.name + '", '+ interface.typecode - + ', &Py' + interface.c_name + '_Type);\n') - if interface.interface_info is not None: - self.fp.write(' pyg_register_interface_info(%s, &%s);\n' % - (interface.typecode, interface.interface_info)) - - if not self.overrides.dynamicnamespace: - for obj, bases in self.get_classes(): - self.write_class(obj, bases) - else: - for obj, bases in self.get_classes(): - self.fp.write( - ' pyg_type_register_custom_callback("%s", ' - '(PyGTypeRegistrationFunction)%s_register_type, d);\n' % - (obj.c_name, obj.c_name)) - - self.fp.write('}\n') - - def _can_direct_ref(self, base): - if not self.overrides.dynamicnamespace: - return True - if base == 'GObject': - return True - obj = get_object_by_name(base) - if obj.module.lower() != self.overrides.modulename: - return True - return False - - def write_class(self, obj, bases, indent=1): - indent_str = ' ' * (indent * 4) - if bases: - bases_str = 'Py_BuildValue("(%s)"' % (len(bases) * 'O') - - for base in bases: - if self._can_direct_ref(base): - bases_str += ', &Py%s_Type' % base - else: - baseobj = get_object_by_name(base) - bases_str += ', PyObject_GetAttrString(m, "%s")' % baseobj.name - bases_str += ')' - else: - bases_str = 'NULL' - - self.fp.write( - '%(indent)spygobject_register_class(d, "%(c_name)s", %(typecode)s, &Py%(c_name)s_Type, %(bases)s);\n' - % dict(indent=indent_str, c_name=obj.c_name, typecode=obj.typecode, bases=bases_str)) - - if obj.has_new_constructor_api: - self.fp.write( - indent_str + 'pyg_set_object_has_new_constructor(%s);\n' % - obj.typecode) - else: - print >> sys.stderr, ( - "Warning: Constructor for %s needs to be updated to new API\n" - " See http://live.gnome.org/PyGTK_2fWhatsNew28" - "#update-constructors") % obj.c_name - - if obj.class_init_func is not None: - self.fp.write( - indent_str + 'pyg_register_class_init(%s, %s);\n' % - (obj.typecode, obj.class_init_func)) - -_objects = {} - -def get_object_by_name(c_name): - global _objects - return _objects[c_name] - -def register_types(parser): - global _objects - for boxed in parser.boxes: - argtypes.matcher.register_boxed(boxed.c_name, boxed.typecode) - _objects[boxed.c_name] = boxed - for pointer in parser.pointers: - argtypes.matcher.register_pointer(pointer.c_name, pointer.typecode) - for obj in parser.objects: - argtypes.matcher.register_object(obj.c_name, obj.parent, obj.typecode) - _objects[obj.c_name] = obj - for iface in parser.interfaces: - argtypes.matcher.register_object(iface.c_name, None, iface.typecode) - _objects[iface.c_name] = iface - for enum in parser.enums: - if enum.deftype == 'flags': - argtypes.matcher.register_flag(enum.c_name, enum.typecode) - else: - argtypes.matcher.register_enum(enum.c_name, enum.typecode) - -usage = 'usage: codegen.py [-o overridesfile] [-p prefix] defsfile' -def main(argv): - o = override.Overrides() - prefix = 'pygtk' - outfilename = None - errorfilename = None - opts, args = getopt.getopt(argv[1:], "o:p:r:t:D:I:", - ["override=", "prefix=", "register=", "outfilename=", - "load-types=", "errorfilename=", "py_ssize_t-clean"]) - defines = {} # -Dkey[=val] options - py_ssize_t_clean = False - for opt, arg in opts: - if opt in ('-o', '--override'): - o = override.Overrides(arg) - elif opt in ('-p', '--prefix'): - prefix = arg - elif opt in ('-r', '--register'): - # Warning: user has to make sure all -D options appear before -r - p = defsparser.DefsParser(arg, defines) - p.startParsing() - register_types(p) - del p - elif opt == '--outfilename': - outfilename = arg - elif opt == '--errorfilename': - errorfilename = arg - elif opt in ('-t', '--load-types'): - globals = {} - execfile(arg, globals) - elif opt == '-D': - nameval = arg.split('=') - try: - defines[nameval[0]] = nameval[1] - except IndexError: - defines[nameval[0]] = None - elif opt == '-I': - defsparser.include_path.insert(0, arg) - elif opt == '--py_ssize_t-clean': - py_ssize_t_clean = True - if len(args) < 1: - print >> sys.stderr, usage - return 1 - if errorfilename: - sys.stderr = open(errorfilename, "w") - p = defsparser.DefsParser(args[0], defines) - if not outfilename: - outfilename = os.path.splitext(args[0])[0] + '.c' - - p.startParsing() - - register_types(p) - sw = SourceWriter(p, o, prefix, FileOutput(sys.stdout, outfilename)) - sw.write(py_ssize_t_clean) - - functions_coverage.printstats() - methods_coverage.printstats() - vproxies_coverage.printstats() - vaccessors_coverage.printstats() - iproxies_coverage.printstats() - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/codegen/createdefs.py b/codegen/createdefs.py deleted file mode 100644 index 84d50b19..00000000 --- a/codegen/createdefs.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python -import sys - -def main(args): - output = args[1] - input = args[2:] - outfd = open(output, 'w') - outfd.write(';; -*- scheme -*-\n') - outfd.write(';; THIS FILE IS GENERATED - DO NOT EDIT\n') - for filename in input: - outfd.write('(include "%s")\n' % filename) - outfd.close() - - return 0 - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/codegen/definitions.py b/codegen/definitions.py deleted file mode 100644 index 617bcbee..00000000 --- a/codegen/definitions.py +++ /dev/null @@ -1,547 +0,0 @@ -# -*- Mode: Python; py-indent-offset: 4 -*- -import copy -import sys - -def get_valid_scheme_definitions(defs): - return [x for x in defs if isinstance(x, tuple) and len(x) >= 2] - -def unescape(s): - s = s.replace('\r\n', '\\r\\n').replace('\t', '\\t') - return s.replace('\r', '\\r').replace('\n', '\\n') - -def make_docstring(lines): - return "(char *) " + '\n'.join(['"%s"' % unescape(s) for s in lines]) - -# New Parameter class, wich emulates a tuple for compatibility reasons -class Parameter(object): - def __init__(self, ptype, pname, pdflt, pnull, pdir=None): - self.ptype = ptype - self.pname = pname - self.pdflt = pdflt - self.pnull = pnull - self.pdir = pdir - - def __len__(self): return 4 - def __getitem__(self, i): - return (self.ptype, self.pname, self.pdflt, self.pnull)[i] - - def merge(self, old): - if old.pdflt is not None: - self.pdflt = old.pdflt - if old.pnull is not None: - self.pnull = old.pnull - -# Parameter for property based constructors -class Property(object): - def __init__(self, pname, optional, argname): - self.pname = pname - self.optional = optional - self.argname = argname - - def merge(self, old): - if old.optional is not None: - self.optional = old.optional - if old.argname is not None: - self.argname = old.argname - - -class Definition: - docstring = "NULL" - def __init__(self, *args): - """Create a new defs object of this type. The arguments are the - components of the definition""" - raise RuntimeError, "this is an abstract class" - def merge(self, old): - """Merge in customisations from older version of definition""" - raise RuntimeError, "this is an abstract class" - def write_defs(self, fp=sys.stdout): - """write out this definition in defs file format""" - raise RuntimeError, "this is an abstract class" - - def guess_return_value_ownership(self): - "return 1 if caller owns return value" - if getattr(self, 'is_constructor_of', False): - self.caller_owns_return = True - elif self.ret in ('char*', 'gchar*', 'string'): - self.caller_owns_return = True - else: - self.caller_owns_return = False - - -class ObjectDef(Definition): - def __init__(self, name, *args): - self.name = name - self.module = None - self.parent = None - self.c_name = None - self.typecode = None - self.fields = [] - self.implements = [] - self.class_init_func = None - self.has_new_constructor_api = False - for arg in get_valid_scheme_definitions(args): - if arg[0] == 'in-module': - self.module = arg[1] - elif arg[0] == 'docstring': - self.docstring = make_docstring(arg[1:]) - elif arg[0] == 'parent': - self.parent = arg[1] - elif arg[0] == 'c-name': - self.c_name = arg[1] - elif arg[0] == 'gtype-id': - self.typecode = arg[1] - elif arg[0] == 'fields': - for parg in arg[1:]: - self.fields.append((parg[0], parg[1])) - elif arg[0] == 'implements': - self.implements.append(arg[1]) - def merge(self, old): - # currently the .h parser doesn't try to work out what fields of - # an object structure should be public, so we just copy the list - # from the old version ... - self.fields = old.fields - self.implements = old.implements - def write_defs(self, fp=sys.stdout): - fp.write('(define-object ' + self.name + '\n') - if self.module: - fp.write(' (in-module "' + self.module + '")\n') - if self.parent != (None, None): - fp.write(' (parent "' + self.parent + '")\n') - for interface in self.implements: - fp.write(' (implements "' + interface + '")\n') - if self.c_name: - fp.write(' (c-name "' + self.c_name + '")\n') - if self.typecode: - fp.write(' (gtype-id "' + self.typecode + '")\n') - if self.fields: - fp.write(' (fields\n') - for (ftype, fname) in self.fields: - fp.write(' \'("' + ftype + '" "' + fname + '")\n') - fp.write(' )\n') - fp.write(')\n\n') - -class InterfaceDef(Definition): - def __init__(self, name, *args): - self.name = name - self.module = None - self.c_name = None - self.typecode = None - self.vtable = None - self.fields = [] - self.interface_info = None - for arg in get_valid_scheme_definitions(args): - if arg[0] == 'in-module': - self.module = arg[1] - elif arg[0] == 'docstring': - self.docstring = make_docstring(arg[1:]) - elif arg[0] == 'c-name': - self.c_name = arg[1] - elif arg[0] == 'gtype-id': - self.typecode = arg[1] - elif arg[0] == 'vtable': - self.vtable = arg[1] - if self.vtable is None: - self.vtable = self.c_name + "Iface" - def write_defs(self, fp=sys.stdout): - fp.write('(define-interface ' + self.name + '\n') - if self.module: - fp.write(' (in-module "' + self.module + '")\n') - if self.c_name: - fp.write(' (c-name "' + self.c_name + '")\n') - if self.typecode: - fp.write(' (gtype-id "' + self.typecode + '")\n') - fp.write(')\n\n') - -class EnumDef(Definition): - def __init__(self, name, *args): - self.deftype = 'enum' - self.name = name - self.in_module = None - self.c_name = None - self.typecode = None - self.values = [] - for arg in get_valid_scheme_definitions(args): - if arg[0] == 'in-module': - self.in_module = arg[1] - elif arg[0] == 'c-name': - self.c_name = arg[1] - elif arg[0] == 'gtype-id': - self.typecode = arg[1] - elif arg[0] == 'values': - for varg in arg[1:]: - self.values.append((varg[0], varg[1])) - def merge(self, old): - pass - def write_defs(self, fp=sys.stdout): - fp.write('(define-' + self.deftype + ' ' + self.name + '\n') - if self.in_module: - fp.write(' (in-module "' + self.in_module + '")\n') - fp.write(' (c-name "' + self.c_name + '")\n') - fp.write(' (gtype-id "' + self.typecode + '")\n') - if self.values: - fp.write(' (values\n') - for name, val in self.values: - fp.write(' \'("' + name + '" "' + val + '")\n') - fp.write(' )\n') - fp.write(')\n\n') - -class FlagsDef(EnumDef): - def __init__(self, *args): - apply(EnumDef.__init__, (self,) + args) - self.deftype = 'flags' - -class BoxedDef(Definition): - def __init__(self, name, *args): - self.name = name - self.module = None - self.c_name = None - self.typecode = None - self.copy = None - self.release = None - self.fields = [] - for arg in get_valid_scheme_definitions(args): - if arg[0] == 'in-module': - self.module = arg[1] - elif arg[0] == 'c-name': - self.c_name = arg[1] - elif arg[0] == 'gtype-id': - self.typecode = arg[1] - elif arg[0] == 'copy-func': - self.copy = arg[1] - elif arg[0] == 'release-func': - self.release = arg[1] - elif arg[0] == 'fields': - for parg in arg[1:]: - self.fields.append((parg[0], parg[1])) - def merge(self, old): - # currently the .h parser doesn't try to work out what fields of - # an object structure should be public, so we just copy the list - # from the old version ... - self.fields = old.fields - def write_defs(self, fp=sys.stdout): - fp.write('(define-boxed ' + self.name + '\n') - if self.module: - fp.write(' (in-module "' + self.module + '")\n') - if self.c_name: - fp.write(' (c-name "' + self.c_name + '")\n') - if self.typecode: - fp.write(' (gtype-id "' + self.typecode + '")\n') - if self.copy: - fp.write(' (copy-func "' + self.copy + '")\n') - if self.release: - fp.write(' (release-func "' + self.release + '")\n') - if self.fields: - fp.write(' (fields\n') - for (ftype, fname) in self.fields: - fp.write(' \'("' + ftype + '" "' + fname + '")\n') - fp.write(' )\n') - fp.write(')\n\n') - -class PointerDef(Definition): - def __init__(self, name, *args): - self.name = name - self.module = None - self.c_name = None - self.typecode = None - self.fields = [] - for arg in get_valid_scheme_definitions(args): - if arg[0] == 'in-module': - self.module = arg[1] - elif arg[0] == 'c-name': - self.c_name = arg[1] - elif arg[0] == 'gtype-id': - self.typecode = arg[1] - elif arg[0] == 'fields': - for parg in arg[1:]: - self.fields.append((parg[0], parg[1])) - def merge(self, old): - # currently the .h parser doesn't try to work out what fields of - # an object structure should be public, so we just copy the list - # from the old version ... - self.fields = old.fields - def write_defs(self, fp=sys.stdout): - fp.write('(define-pointer ' + self.name + '\n') - if self.module: - fp.write(' (in-module "' + self.module + '")\n') - if self.c_name: - fp.write(' (c-name "' + self.c_name + '")\n') - if self.typecode: - fp.write(' (gtype-id "' + self.typecode + '")\n') - if self.fields: - fp.write(' (fields\n') - for (ftype, fname) in self.fields: - fp.write(' \'("' + ftype + '" "' + fname + '")\n') - fp.write(' )\n') - fp.write(')\n\n') - -class MethodDefBase(Definition): - def __init__(self, name, *args): - dump = 0 - self.name = name - self.ret = None - self.caller_owns_return = None - self.unblock_threads = None - self.c_name = None - self.typecode = None - self.of_object = None - self.params = [] # of form (type, name, default, nullok) - self.varargs = 0 - self.deprecated = None - for arg in get_valid_scheme_definitions(args): - if arg[0] == 'of-object': - self.of_object = arg[1] - elif arg[0] == 'docstring': - self.docstring = make_docstring(arg[1:]) - elif arg[0] == 'c-name': - self.c_name = arg[1] - elif arg[0] == 'gtype-id': - self.typecode = arg[1] - elif arg[0] == 'return-type': - self.ret = arg[1] - elif arg[0] == 'caller-owns-return': - self.caller_owns_return = arg[1] in ('t', '#t') - elif arg[0] == 'unblock-threads': - self.unblock_threads = arg[1] in ('t', '#t') - elif arg[0] == 'parameters': - for parg in arg[1:]: - ptype = parg[0] - pname = parg[1] - pdflt = None - pnull = 0 - pdir = None - for farg in parg[2:]: - assert isinstance(farg, tuple) - if farg[0] == 'default': - pdflt = farg[1] - elif farg[0] == 'null-ok': - pnull = 1 - elif farg[0] == 'direction': - pdir = farg[1] - self.params.append(Parameter(ptype, pname, pdflt, pnull, pdir)) - elif arg[0] == 'varargs': - self.varargs = arg[1] in ('t', '#t') - elif arg[0] == 'deprecated': - self.deprecated = arg[1] - else: - sys.stderr.write("Warning: %s argument unsupported.\n" - % (arg[0])) - dump = 1 - if dump: - self.write_defs(sys.stderr) - - if self.caller_owns_return is None and self.ret is not None: - self.guess_return_value_ownership() - - def merge(self, old, parmerge): - self.caller_owns_return = old.caller_owns_return - self.varargs = old.varargs - # here we merge extra parameter flags accross to the new object. - if not parmerge: - self.params = copy.deepcopy(old.params) - return - for i in range(len(self.params)): - ptype, pname, pdflt, pnull = self.params[i] - for p2 in old.params: - if p2[1] == pname: - self.params[i] = (ptype, pname, p2[2], p2[3]) - break - def _write_defs(self, fp=sys.stdout): - if self.of_object != (None, None): - fp.write(' (of-object "' + self.of_object + '")\n') - if self.c_name: - fp.write(' (c-name "' + self.c_name + '")\n') - if self.typecode: - fp.write(' (gtype-id "' + self.typecode + '")\n') - if self.caller_owns_return: - fp.write(' (caller-owns-return #t)\n') - if self.unblock_threads: - fp.write(' (unblock_threads #t)\n') - if self.ret: - fp.write(' (return-type "' + self.ret + '")\n') - if self.deprecated: - fp.write(' (deprecated "' + self.deprecated + '")\n') - if self.params: - fp.write(' (parameters\n') - for ptype, pname, pdflt, pnull in self.params: - fp.write(' \'("' + ptype + '" "' + pname +'"') - if pdflt: fp.write(' (default "' + pdflt + '")') - if pnull: fp.write(' (null-ok)') - fp.write(')\n') - fp.write(' )\n') - if self.varargs: - fp.write(' (varargs #t)\n') - fp.write(')\n\n') - - -class MethodDef(MethodDefBase): - def __init__(self, name, *args): - MethodDefBase.__init__(self, name, *args) - for item in ('c_name', 'of_object'): - if self.__dict__[item] == None: - self.write_defs(sys.stderr) - raise RuntimeError, "definition missing required %s" % (item,) - - def write_defs(self, fp=sys.stdout): - fp.write('(define-method ' + self.name + '\n') - self._write_defs(fp) - -class VirtualDef(MethodDefBase): - def write_defs(self, fp=sys.stdout): - fp.write('(define-virtual ' + self.name + '\n') - self._write_defs(fp) - -class FunctionDef(Definition): - def __init__(self, name, *args): - dump = 0 - self.name = name - self.in_module = None - self.is_constructor_of = None - self.ret = None - self.caller_owns_return = None - self.unblock_threads = None - self.c_name = None - self.typecode = None - self.params = [] # of form (type, name, default, nullok) - self.varargs = 0 - self.deprecated = None - for arg in get_valid_scheme_definitions(args): - if arg[0] == 'in-module': - self.in_module = arg[1] - elif arg[0] == 'docstring': - self.docstring = make_docstring(arg[1:]) - elif arg[0] == 'is-constructor-of': - self.is_constructor_of = arg[1] - elif arg[0] == 'c-name': - self.c_name = arg[1] - elif arg[0] == 'gtype-id': - self.typecode = arg[1] - elif arg[0] == 'return-type': - self.ret = arg[1] - elif arg[0] == 'caller-owns-return': - self.caller_owns_return = arg[1] in ('t', '#t') - elif arg[0] == 'unblock-threads': - self.unblock_threads = arg[1] in ('t', '#t') - elif arg[0] == 'parameters': - for parg in arg[1:]: - ptype = parg[0] - pname = parg[1] - pdflt = None - pnull = 0 - for farg in parg[2:]: - if farg[0] == 'default': - pdflt = farg[1] - elif farg[0] == 'null-ok': - pnull = 1 - self.params.append(Parameter(ptype, pname, pdflt, pnull)) - elif arg[0] == 'properties': - if self.is_constructor_of is None: - print >> sys.stderr, "Warning: (properties ...) "\ - "is only valid for constructors" - for prop in arg[1:]: - pname = prop[0] - optional = False - argname = pname - for farg in prop[1:]: - if farg[0] == 'optional': - optional = True - elif farg[0] == 'argname': - argname = farg[1] - self.params.append(Property(pname, optional, argname)) - elif arg[0] == 'varargs': - self.varargs = arg[1] in ('t', '#t') - elif arg[0] == 'deprecated': - self.deprecated = arg[1] - else: - sys.stderr.write("Warning: %s argument unsupported\n" - % (arg[0],)) - dump = 1 - if dump: - self.write_defs(sys.stderr) - - if self.caller_owns_return is None and self.ret is not None: - self.guess_return_value_ownership() - for item in ('c_name',): - if self.__dict__[item] == None: - self.write_defs(sys.stderr) - raise RuntimeError, "definition missing required %s" % (item,) - - _method_write_defs = MethodDef.__dict__['write_defs'] - - def merge(self, old, parmerge): - self.caller_owns_return = old.caller_owns_return - self.varargs = old.varargs - if not parmerge: - self.params = copy.deepcopy(old.params) - return - # here we merge extra parameter flags accross to the new object. - def merge_param(param): - for old_param in old.params: - if old_param.pname == param.pname: - if isinstance(old_param, Property): - # h2def never scans Property's, therefore if - # we have one it was manually written, so we - # keep it. - return copy.deepcopy(old_param) - else: - param.merge(old_param) - return param - raise RuntimeError, "could not find %s in old_parameters %r" % ( - param.pname, [p.pname for p in old.params]) - try: - self.params = map(merge_param, self.params) - except RuntimeError: - # parameter names changed and we can't find a match; it's - # safer to keep the old parameter list untouched. - self.params = copy.deepcopy(old.params) - - if not self.is_constructor_of: - try: - self.is_constructor_of = old.is_constructor_of - except AttributeError: - pass - if isinstance(old, MethodDef): - self.name = old.name - # transmogrify from function into method ... - self.write_defs = self._method_write_defs - self.of_object = old.of_object - del self.params[0] - def write_defs(self, fp=sys.stdout): - fp.write('(define-function ' + self.name + '\n') - if self.in_module: - fp.write(' (in-module "' + self.in_module + '")\n') - if self.is_constructor_of: - fp.write(' (is-constructor-of "' + self.is_constructor_of +'")\n') - if self.c_name: - fp.write(' (c-name "' + self.c_name + '")\n') - if self.typecode: - fp.write(' (gtype-id "' + self.typecode + '")\n') - if self.caller_owns_return: - fp.write(' (caller-owns-return #t)\n') - if self.unblock_threads: - fp.write(' (unblock-threads #t)\n') - if self.ret: - fp.write(' (return-type "' + self.ret + '")\n') - if self.deprecated: - fp.write(' (deprecated "' + self.deprecated + '")\n') - if self.params: - if isinstance(self.params[0], Parameter): - fp.write(' (parameters\n') - for ptype, pname, pdflt, pnull in self.params: - fp.write(' \'("' + ptype + '" "' + pname +'"') - if pdflt: fp.write(' (default "' + pdflt + '")') - if pnull: fp.write(' (null-ok)') - fp.write(')\n') - fp.write(' )\n') - elif isinstance(self.params[0], Property): - fp.write(' (properties\n') - for prop in self.params: - fp.write(' \'("' + prop.pname +'"') - if prop.optional: fp.write(' (optional)') - fp.write(')\n') - fp.write(' )\n') - else: - assert False, "strange parameter list %r" % self.params[0] - if self.varargs: - fp.write(' (varargs #t)\n') - - fp.write(')\n\n') diff --git a/codegen/defsconvert.py b/codegen/defsconvert.py deleted file mode 100644 index 2e71f7b8..00000000 --- a/codegen/defsconvert.py +++ /dev/null @@ -1,130 +0,0 @@ -import sys -import string, re - -# ------------------ Create typecodes from typenames --------- - -_upperstr_pat1 = re.compile(r'([^A-Z])([A-Z])') -_upperstr_pat2 = re.compile(r'([A-Z][A-Z])([A-Z][0-9a-z])') -_upperstr_pat3 = re.compile(r'^([A-Z])([A-Z])') - -def to_upper_str(name): - """Converts a typename to the equivalent upercase and underscores - name. This is used to form the type conversion macros and enum/flag - name variables""" - name = _upperstr_pat1.sub(r'\1_\2', name) - name = _upperstr_pat2.sub(r'\1_\2', name) - name = _upperstr_pat3.sub(r'\1_\2', name, count=1) - return string.upper(name) - -def typecode(typename): - """create a typecode (eg. GTK_TYPE_WIDGET) from a typename""" - return string.replace(to_upper_str(typename), '_', '_TYPE_', 1) - - -STATE_START = 0 -STATE_OBJECT = 1 -STATE_INTERFACE = 2 -STATE_BOXED = 3 -STATE_ENUM = 4 -STATE_FLAGS = 5 -STATE_METHOD = 6 -STATE_FUNCTION = 7 - -def convert(infp=sys.stdin, outfp=sys.stdout): - state = STATE_START - seen_params = 0 - - line = infp.readline() - while line: - if line[:8] == '(object ': - state = STATE_OBJECT - seen_params = 0 - outfp.write('(define-object ' + line[8:]) - elif line[:11] == '(interface ': - state = STATE_INTERFACE - seen_params = 0 - outfp.write('(define-interface ' + line[11:]) - elif line[:7] == '(boxed ': - state = STATE_BOXED - seen_params = 0 - outfp.write('(define-boxed ' + line[7:]) - elif line[:6] == '(enum ': - state = STATE_ENUM - seen_params = 0 - outfp.write('(define-enum ' + line[6:]) - elif line[:7] == '(flags ': - state = STATE_FLAGS - seen_params = 0 - outfp.write('(define-flags ' + line[7:]) - elif line[:8] == '(method ': - state = STATE_METHOD - seen_params = 0 - outfp.write('(define-method ' + line[8:]) - elif line[:10] == '(function ': - state = STATE_FUNCTION - seen_params = 0 - outfp.write('(define-function ' + line[10:]) - elif line[:13] == ' (in-module ': - outfp.write(re.sub(r'^(\s+\(in-module\s+)(\w+)(.*)$', - r'\1"\2"\3', line)) - elif line[:10] == ' (parent ': - outfp.write(re.sub(r'^(\s+\(parent\s+)(\w+)(\s+\((\w+)\))?(.*)$', - r'\1"\4\2"\5', line)) - elif line[:14] == ' (implements ': - outfp.write(re.sub(r'^(\s+\(implements\s+)([^\s]+)(\s*\))$', - r'\1"\2"\3', line)) - elif line[:13] == ' (of-object ': - outfp.write(re.sub(r'^(\s+\(of-object\s+)(\w+)(\s+\((\w+)\))?(.*)$', - r'\1"\4\2"\5', line)) - elif line[:10] == ' (c-name ': - outfp.write(re.sub(r'^(\s+\(c-name\s+)([^\s]+)(\s*\))$', - r'\1"\2"\3', line)) - if state in (STATE_OBJECT, STATE_INTERFACE, STATE_BOXED, - STATE_ENUM, STATE_FLAGS): - c_name = re.match(r'^\s+\(c-name\s+([^\s]+)\s*\)$', - line).group(1) - outfp.write(' (gtype-id "%s")\n' % typecode(c_name)) - elif line[:15] == ' (return-type ': - outfp.write(re.sub(r'^(\s+\(return-type\s+)([^\s]+)(\s*\))$', - r'\1"\2"\3', line)) - elif line[:13] == ' (copy-func ': - outfp.write(re.sub(r'^(\s+\(copy-func\s+)(\w+)(.*)$', - r'\1"\2"\3', line)) - elif line[:16] == ' (release-func ': - outfp.write(re.sub(r'^(\s+\(release-func\s+)(\w+)(.*)$', - r'\1"\2"\3', line)) - elif line[:9] == ' (field ': - if not seen_params: - outfp.write(' (fields\n') - seen_params = 1 - outfp.write(re.sub(r'^\s+\(field\s+\(type-and-name\s+([^\s]+)\s+([^\s]+)\s*\)\s*\)$', - ' \'("\\1" "\\2")', line)) - elif line[:9] == ' (value ': - if not seen_params: - outfp.write(' (values\n') - seen_params = 1 - outfp.write(re.sub(r'^\s+\(value\s+\(name\s+([^\s]+)\)\s+\(c-name\s+([^\s]+)\s*\)\s*\)$', - ' \'("\\1" "\\2")', line)) - elif line[:13] == ' (parameter ': - if not seen_params: - outfp.write(' (parameters\n') - seen_params = 1 - outfp.write(re.sub(r'^\s+\(parameter\s+\(type-and-name\s+([^\s]+)\s+([^\s]+)\s*\)(\s*.*)\)$', - ' \'("\\1" "\\2"\\3)', line)) - elif line[:11] == ' (varargs ': - if seen_params: - outfp.write(' )\n') - seen_params = 0 - outfp.write(' (varargs #t)\n') - elif line[0] == ')': - if seen_params: - outfp.write(' )\n') - seen_params = 0 - state = STATE_START - outfp.write(line) - else: - outfp.write(line) - line = infp.readline() - -if __name__ == '__main__': - convert() diff --git a/codegen/defsgen.py b/codegen/defsgen.py deleted file mode 100644 index 69c6d684..00000000 --- a/codegen/defsgen.py +++ /dev/null @@ -1,656 +0,0 @@ -#!/usr/bin/env python -# -*- Mode: Python; py-indent-offset: 4 -*- -# -# Copyright (C) 2006 John Finlay. -# -# Scan the given public .h files of a GTK module (or module using -# GTK object conventions) and generates a set of scheme defs. -# -# defsgen uses the ctypes module to extract information from the installed -# module library (or libraries) to generate the object, interface, function, -# method, virtual, enum and flags defs. defsgen uses the gobject library -# g_type_* functions. defsgen will try to open the "libgobject-2.0.so" library -# if one is not specified on the command line. -# -# Basically the operation of defsgen is: -# -# - open and initialize the gobject and module libraries -# - read each .h file into a buffer which is scrubbed of extraneous data -# - find all *_get_type() functions prototypes -# - look in the module libraries for the get_type symbols -# - if found run the get_type() function to retrieve the GType -# - find the parent type name and save the object info -# - find each function prototypes in the file and check if it has a symbol in -# the module libraries - save the info if found -# - extract the virtual prototypes from the Class or Iface structs and save -# - write out the various defs. -# -# The command line options are: -# -# -l --modulelib Adds the given module library name to the list to be used -# for finding symbols. Mor ethan one modulefile may be -# specified. (required) -# -L --libgobject Specifies the name of the gobject library (optional but -# must be specified if "libgobject-2.0.so" is not availble) -# -s --separate Create separate files for objects and function/method defs -# using the given name as the base name (optional). If this -# is not specified the combined object and function defs -# will be output to sys.stdout. -# -f --defsfile Extract defs from the given file to filter the output defs -# that is don't output defs that are defined in the -# defsfile. More than one deffile may be specified. -# -D --defines Include portions of the defsfile defs that are conditional -# on the given define, for example GDK_TARGET_X11. Only -# useful with the --defsfile option -# -m --modulename The prefix to be stripped from the front of function names -# for the given module -# --onlyenums Only produce defs for enums and flags -# --onlyobjdefs Only produce defs for objects -# --onlyvirtuals Only produce defs for virtuals -# --genpropgetsets Experimental option to generate prop-getset annotations. -# Not supported by codegen.py and friends. -# -# Examples: -# -# python defsgen.py -m pango -l libpango-1.0.so \ -# /usr/local/include/pango-1.0/pango/*.h >/tmp/pango.defs -# -# - Outputs all defs for the pango module.using the library module -# libpango-1.0.so. -# -# python defsgen.py -m gdk -DGDK_TARGET_X11 -l libgdk-x11-2.0.so \ -# -l libgdk_pixbuf-2.0.so -s /tmp/gdk-2.10 \ -# -f /usr/tmp/pygtk/gtk/gdk-base.defs \ -# /usr/local/include/gtk-2.0/gdk/*.h \ -# /usr/local/include/gtk-2.0/gdk-pixbuf/*.h -# -# - Outputs the gdk module defs that are not contained in the defs file -# /usr/tmp/pygtk/gtk/gdk-base.defs. Two output files are created: -# /tmp/gdk-2.10-types.defs and /tmp/gdk-2.10.defs. -# -# Based on the original h2def.py program by -# Toby D. Reeves and -# modified by James Henstridge to output stuff in -# Havoc's new defs format. Info on this format can be seen at: -# http://www.gnome.org/mailing-lists/archives/gtk-devel-list/2000-January/0085.shtml -# Updated to be PEP-8 compatible and refactored to use OOP -# Extensively modified by John Finlay to use ctypes module to extract GType -# info from the given library and to create virtual defines. -# - -import getopt -import os -import re -import sys -import ctypes -import defsparser - -#------------------ utility defs ----------------- - -_upperstr_pat1 = re.compile(r'([^A-Z])([A-Z])') -_upperstr_pat2 = re.compile(r'([A-Z][A-Z])([A-Z][0-9a-z])') -_upperstr_pat3 = re.compile(r'^([A-Z])([A-Z])') - -def to_upper_str(name): - """Converts a typename to the equivalent uppercase and underscores - name. This is used to form the type conversion macros and enum/flag - name variables""" - name = _upperstr_pat1.sub(r'\1_\2', name) - name = _upperstr_pat2.sub(r'\1_\2', name) - name = _upperstr_pat3.sub(r'\1_\2', name, count=1) - return name.upper() - -def typecode(typename): - """create a typecode (eg. GTK_TYPE_WIDGET) from a typename""" - return to_upper_str(typename).replace('_', '_TYPE_', 1) - -_class_iface_pat = re.compile(r'\w+(Class|Iface)') - -def class_iface_sub(mobj): - '''Returns matched string if it matches a Class or Iface struct - otherwise returns the empty string''' - if not _class_iface_pat.match(mobj.group(1)): - return '' - return mobj.group(0) - -clean_patterns = [ - # strip comments - (re.compile(r'/\*.*?\*/', re.DOTALL), ''), - # compact continued lines - (re.compile(r"\\\n", re.MULTILINE), ''), - # remove preprocess directives - (re.compile(r"""^[#].*?$""", re.MULTILINE), ''), - # strip DECLS macros - (re.compile(r"""G_BEGIN_DECLS|BEGIN_LIBGTOP_DECLS|G_END_DECLS""", - re.MULTILINE), ''), - # remove extern "C" - (re.compile(r'^\s*(extern)\s+"C"\s+{', re.MULTILINE), ''), - # remove singleline typedefs of stucts - (re.compile(r'^typedef\s+struct\s*[^{;\n]*;\s*$', re.MULTILINE), ''), - # remove enum definitions - (re.compile(r'^typedef enum\s+{[^}]*}[^;]*;\s*$', re.MULTILINE), ''), - # remove all struct definitons but those for object classes and interfaces - (re.compile(r'^struct\s+(\w+)\s+{[^}]+}\s*;\s*$', re.MULTILINE), - class_iface_sub), - # compress multiple whitespace - (re.compile(r'\s+', re.MULTILINE), ' '), - # clean up line ends - (re.compile(r';\s*', re.MULTILINE), '\n'), - (re.compile(r'^\s*', re.MULTILINE), ''), - # associate *, &, and [] with type instead of variable - (re.compile(r' \s* ([*|&]+) \s* ([(\w]+)', re.VERBOSE), r'\1 \2'), - (re.compile(r'\s+ (\w+) \[ \s* \]', re.VERBOSE), r'[] \1'), - # make return types that are const work. - (re.compile(r'G_CONST_RETURN |const '), 'const-'), - # remove typedefs of callback types - (re.compile(r'^typedef\s+\w+\s*\*?\s*\(\s*\*\s*\w+\)\s*\([^(]*\)\n', - re.MULTILINE), '') - ] - -def clean_buffer(buf): - """Cleans out extraneous data leaving function prototypes, Class and Iface - structs.""" - for pat, subst in clean_patterns: - buf = pat.sub(subst, buf) - return buf - -# ------------------ utility classes ------------------------- - -class ObjDef(object): - def __init__(self, name, type_id, parent_name, parent_type, base_name): - self.name = name - self.type = type_id - self.parent_name = parent_name - self.parent_type = parent_type - self.base_name = base_name - self.props = [] - return - def __cmp__(self, other): - try: - res = cmp(self.name, other.name) - except AttributeError: - res = cmp(id(self), id(other)) - return res - def set_properties(self, gobj): - if self.base_name == 'GObject': - self.props = self._get_gobject_properties(gobj) - elif self.base_name == 'GInterface': - self.props = self._get_ginterface_properties(gobj) - - def _get_gobject_properties(self, gobj): - klass = gobj.g_type_class_ref(self.type) - num = ctypes.c_uint() - plist = gobj.g_object_class_list_properties(klass, ctypes.byref(num)) - props = [plist[i][0].name for i in range(num.value) - if self.name == gobj.g_type_name(plist[i][0].owner_type)] - return props - def _get_ginterface_properties(self, gobj): - iface = gobj.g_type_default_interface_ref(self.type) - num = ctypes.c_uint() - plist = gobj.g_object_interface_list_properties(iface, - ctypes.byref(num)) - props = [plist[i][0].name for i in range(num.value)] - return props - -# ------------------ Find object definitions ----------------- - -split_prefix_pat = re.compile('([A-Z]+[a-z]*)([A-Za-z0-9]+)') - -get_type_pat = re.compile(r'''^\s*(GType|GtkType)\s+ -([a-z]\w+_get_type)\s*\(void\).*$''', re.VERBOSE | re.MULTILINE) - -defkeys = 'GBoxed GInterface GObject gpointer GEnum GFlags' - -def find_defs(buf, gobj, modlib, defs): - """Find possible gobject, gboxed, interface, gpointer, enum and flags - definitions in header files.and find parent type.""" - # find all *_get_type() functions that may represent a GObject - for m in get_type_pat.findall(buf): - func_name = m[1] - for lib in modlib: - if hasattr(lib, func_name): - objtype = apply(getattr(lib, func_name)) - obj_name = gobj.g_type_name(objtype) - parent = gobj.g_type_parent(objtype) - parent_name = gobj.g_type_name(parent) - base_name = gobj.g_type_name(gobj.g_type_fundamental(parent)) - #if gobj.g_type_is_a(parent, gobj.GObject): - # base_name = 'GObject' - if base_name in defkeys: - obj = ObjDef(obj_name, objtype, parent_name, parent, - base_name) - obj.set_properties(gobj) - defs[obj.base_name].append(obj) - break - return - -# ------------------ Find function definitions ----------------- - -arg_split_pat = re.compile("\s*,\s*") - -proto_pat=re.compile(r"""^ -\s*((?:-|\w|\&|\*)+) # return type -\s+ # skip whitespace -([a-z]\w+)\s*[(] # match the function name until the opening ( -\s*(.*?)\s*[)].* # group the function arguments -$""", re.IGNORECASE|re.VERBOSE|re.MULTILINE) - -def find_func_defs(buf, modlib, deffile, defs, verbose): - '''Find function prototypes in buf that have symbols in modlib - and save in defs.''' - funcs = defs['funcs'][deffile] = [] - for m in proto_pat.findall(buf): - ret, func, args = m - if not True in [hasattr(lib, func) for lib in modlib]: - if verbose: - sys.stderr.write('no symbol for function: ' + func - + ' from file' + deffile + '\n') - else: - args = arg_split_pat.split(args) - args = [a.replace(' ','-', a.count(' ')-1) for a in args] - funcs.append((func, ret, args)) - return - -virtual_pat = re.compile(r'''^ -\s*((?:-|\w|\&|\*)+) # return type -\s* # skip whitespace -\(\s*\*\s* # opening ( -([a-z]\w+)\) # match the function name until the closing ) -\s*\(\s*([^)]*)\).* # group the function arguments -$''', re.VERBOSE|re.MULTILINE) - -class_iface_struct_pat = re.compile( - r'^struct\s+_(\w+)(?:Class|Iface)\s+{([^}]+)}\s*$', re.MULTILINE) - -def find_virt_defs(buf, deffile, defs): - '''Find virtual function prototypes in buf and save in defs.''' - virts = defs['virts'][deffile] = [] - # get the Class or Iface structs - for m in class_iface_struct_pat.findall(buf): - objname, virtuals = m - for v in virtual_pat.findall(virtuals): - ret, func, args = v - if 'reserved' in func or args == 'void': - continue - args = arg_split_pat.split(args) - args = [a.replace(' ','-', a.count(' ')-1) for a in args] - virts.append((func, ret, args, objname)) - return - -# ------------------ write definitions ----------------- - -type_pat = re.compile(r'(?:const-)?([A-Za-z0-9]+)\*?\s+') -pointer_pat = re.compile('(.*)\*$') -func_new_pat = re.compile('(\w+)_new$') -getset_pat = re.compile(r'^(?:get|set)_(.*)$') - -class DefsWriter: - def __init__(self, defs, fp=None, prefix=None, verbose=False, - defsfiles=None, defines={}, genpropgetsets=False): - self.defs = defs - self.objnames = reduce(list.__add__, - [[o.name for o in defs[base]] - for base in defkeys.split()[:3]]) - self.othernames = reduce(list.__add__, - [[o.name for o in defs[base]] - for base in defkeys.split()[3:]]) - self.objifacedefs = dict(reduce(list.__add__, - [[(o.name, o) for o in defs[base]] - for base in defkeys.split()[1:3]])) - self.fp = (fp, sys.stdout)[not fp] - self.prefix = prefix - self.verbose = verbose - self.genpropgetsets = genpropgetsets - self._c_names={} - for defsfile in defsfiles: - filter = defsparser.DefsParser(defsfile, defines) - filter.startParsing() - self._c_names.update(filter.c_name) - for vdef in filter.virtuals: - self._c_names[vdef.of_object + '.' + vdef.name] = None - return - - def write_func_defs(self, deffiles, onlyvirts=False): - filter = self._c_names - for deffile in deffiles: - self.fp.write('\n;; From %s\n\n' % os.path.basename(deffile)) - if not onlyvirts: - for func, ret, args in self.defs['funcs'][deffile]: - if not func in filter: - self._write_func(func, ret, args) - for virt, ret, args, objname in self.defs['virts'][deffile]: - if not objname + '.' + virt in filter: - self._write_virt(objname, virt, ret, args) - self.fp.write('\n') - return - - def write_enum_defs(self, fp=None): - fp = (fp, self.fp)[not fp] - klassptrs = {'GEnum':ctypes.POINTER(EnumClass), - 'GFlags':ctypes.POINTER(FlagsClass)} - filter = self._c_names - objs = self.defs['GEnum'] + self.defs ['GFlags'] - #objs.sort() - fp.write(';; Enumerations and Flags ...\n\n') - for obj in objs: - cname = name = obj.name - if cname in filter: - continue - parent_name = obj.parent_name - klassptr = klassptrs[parent_name] - typename = parent_name.lower()[1:] - module = None - m = split_prefix_pat.match(cname) - if m: - module = m.group(1) - name = m.group(2) - fp.write('(define-' + typename + ' ' + name + '\n') - if module: - fp.write(' (in-module "' + module + '")\n') - fp.write(' (c-name "' + cname + '")\n') - fp.write(' (gtype-id "' + typecode(cname) + '")\n') - fp.write(' (values\n') - classref = self.gobj.g_type_class_ref(obj.type) - itemclass = ctypes.cast(classref, klassptr).contents - for i in range(itemclass.n_values): - val = itemclass.values[i] - fp.write(' \'("%s" "%s")\n' % (val.value_nick, - val.value_name)) - fp.write(' )\n') - fp.write(')\n\n') - return - - def _write_obj_helper(self, obj, fp): - base_name = obj.base_name.lower()[1:] - cmodule = None - cname = name = obj.name - type_id = obj.type - parent_name = obj.parent_name - m = split_prefix_pat.match(cname) - if m: - cmodule = m.group(1) - name = m.group(2) - fp.write('(define-' + base_name + ' ' + name + '\n') - if cmodule: - fp.write(' (in-module "' + cmodule + '")\n') - if base_name == 'object': - fp.write(' (parent "' + parent_name + '")\n') - fp.write(' (c-name "' + cname + '")\n') - fp.write(' (gtype-id "' + typecode(cname) + '")\n') - n = ctypes.c_uint() - ifaces = self.gobj.g_type_interfaces(type_id, ctypes.byref(n)) - for i in range(n.value): - iface_name = self.gobj.g_type_name(ifaces[i]) - if iface_name in self.interfaces: - fp.write(' (implements "%s")\n' % iface_name) - if base_name == 'interface': - prereq = self.gobj.g_type_interface_prerequisites(type_id, - ctypes.byref(n)) - for i in range(n.value): - fp.write(' (prerequisite "%s")\n' - % self.gobj.g_type_name(prereq[i])) - # should do something about accessible fields - fp.write(')\n\n') - return - - def write_obj_defs(self, fp=None): - fp = (fp, self.fp)[not fp] - fp.write(';; -*- scheme -*-\n') - filter = self._c_names - for base in defkeys.split()[:4]: - base_name = base.lower()[1:] - fp.write('; %s definitions ...\n\n' % base_name) - for obj in self.defs[base]: - if not obj.name in filter: - self._write_obj_helper(obj, fp) - return - - def _write_func(self, name, ret, args): - if len(args) >= 1: - # methods must have at least one argument - munged_name = name.replace('_', '') - m = type_pat.match(args[0]) - if m: - obj = m.group(1) - if munged_name.startswith(obj.lower()): - if obj not in self.othernames: - self._write_method(obj, name, ret, args) - return - fname = name - if self.prefix: - fname = re.sub('^'+self.prefix+'_', '', fname) - - # it is either a constructor or normal function - self.fp.write('(define-function ' + fname + '\n') - self.fp.write(' (c-name "' + name + '")\n') - - # Asume that a constructor function name - # ends with '_new' and it returns an object pointer. - m = func_new_pat.match(name) - r = pointer_pat.match(ret) - if m and r: - cname = '' - # get the type name by using the _get_type function - func = m.group(1) + '_get_type' - lib = [l for l in self.modlib if hasattr(l, func)] - if lib: - cname = self.gobj.g_type_name(apply(getattr(lib[0], func))) - if cname and self.gobj.g_type_from_name(r.group(1)): - self.fp.write(' (is-constructor-of "' + cname + '")\n') - self._write_return(ret) - self._write_arguments(args) - return - - def _write_method(self, obj, name, ret, args): - regex = ''.join([c+'_?' for c in obj.lower()]) - mname, count = re.subn(regex, '', name, 1) - if not count and self.prefix: - mname = re.sub('^'+self.prefix+'_', '', mname) - self.fp.write('(define-method ' + mname + '\n') - self.fp.write(' (of-object "' + obj + '")\n') - self.fp.write(' (c-name "' + name + '")\n') - m = getset_pat.match(mname) - if self.genpropgetsets and m and len(args[1:]) <= 1: - prop = m.group(1) - if self.objifacedefs.has_key(obj): - oidef = self.objifacedefs[obj] - if prop.replace('_', '-') in oidef.props: - self.fp.write(' (prop-getset "' + prop + '")\n') - self._write_return(ret) - self._write_arguments(args[1:]) - return - - def _write_virt(self, obj, name, ret, args): - self.fp.write('(define-virtual ' + name + '\n') - self.fp.write(' (of-object "' + obj + '")\n') - self._write_return(ret) - self._write_arguments(args[1:]) - return - - def _write_return(self, ret): - if ret == 'void': - ret = 'none' - self.fp.write(' (return-type "' + ret + '")\n') - return - - def _write_arguments(self, args): - if args and not 'void' in args: - varargs = '' - self.fp.write(' (parameters\n') - for arg in args: - if arg == '...': - varargs = ' (varargs #t)\n' - else: - tupleArg = tuple(arg.split()) - if len(tupleArg) == 2: - self.fp.write(' \'("%s" "%s")\n' % tupleArg) - self.fp.write(' )\n' + varargs) - self.fp.write(')\n\n') - -# ---------- ctypes support classes for gobject library functions ---------- - -GType = ctypes.c_uint - -class GTypeClass(ctypes.Structure): - _fields_ = [('g_type', GType)] - -class GTypeInstance(ctypes.Structure): - _fields_ = [('g_class', ctypes.POINTER(GTypeClass))] - -class EnumValue(ctypes.Structure): - _fields_ = [('value', ctypes.c_int), - ('value_name', ctypes.c_char_p), - ('value_nick', ctypes.c_char_p)] - -class FlagsValue(ctypes.Structure): - _fields_ = [('value', ctypes.c_uint), - ('value_name', ctypes.c_char_p), - ('value_nick', ctypes.c_char_p)] - -class EnumClass(ctypes.Structure): - _fields_ = [('g_type_class', GTypeClass), - ('minimum', ctypes.c_int), - ('maximum', ctypes.c_int), - ('n_values', ctypes.c_uint), - ('values', ctypes.POINTER(EnumValue))] - -class FlagsClass(ctypes.Structure): - _fields_ = [('g_type_class', GTypeClass), - ('mask', ctypes.c_uint), - ('n_values', ctypes.c_uint), - ('values', ctypes.POINTER(FlagsValue))] - -class GTypeInterface(ctypes.Structure): - _fields_ = [('g_type', GType), - ('g_instance_type', GType)] - -class GParamSpec(ctypes.Structure): - _fields_ = [('g_type_instance', GTypeInstance), - ('name', ctypes.c_char_p), - ('flags', ctypes.c_uint), - ('value_type', GType), - ('owner_type', GType)] - -# ------------------ Main function ----------------- - -def main(args): - verbose = False - all = True - onlyenums = False - onlyobjdefs = False - onlyvirtuals = False - separate = False - modulename = None - defsfiles = [] - libgobject = None - modulelibs = [] - defines = {} - genpropgetsets = False - opts, args = getopt.getopt(args[1:], 'vs:m:f:D:L:l:', - ['onlyenums', 'onlyobjdefs', 'onlyvirtuals', - 'modulename=', 'separate=', - 'defsfile=', 'defines=', 'genpropgetsets', - 'libgobject-', 'modulelib=']) - for o, v in opts: - if o == '-v': - verbose = True - if o == '--onlyenums': - onlyenums = True - all = False - if o == '--onlyvirtuals': - onlyvirtuals = True - all = False - if o == '--onlyobjdefs': - onlyobjdefs = True - all = False - if o == '--genpropgetsets': - genpropgetsets = True - if o in ('-s', '--separate'): - separate = v - if o in ('-m', '--modulename'): - modulename = v - if o in ('-L', '--libgobject'): - libgobject = v - if o in ('-l', '--modulelib'): - modulelibs.append(v) - if o in ('-f', '--defsfile'): - defsfiles.append(v) - if o in ('-D', '--defines'): - nameval = v.split('=') - try: - defines[nameval[0]] = nameval[1] - except IndexError: - defines[nameval[0]] = None - - if not args[0:1]: - print 'Must specify at least one input file name' - return -1 - if not modulelibs: - print 'Must specify one or more modulelib names' - return -1 - - # load the gobject and module libraries and init the gtype system - if not libgobject: - if verbose: - sys.stderr.write('Using "libgobject-2.0.so" as the libobject' \ - 'library name by default\n') - gobj = ctypes.cdll.LoadLibrary('libgobject-2.0.so') - else: - gobj = ctypes.cdll.LoadLibrary(libgobject) - - modlib = [ctypes.cdll.LoadLibrary(lib) for lib in modulelibs] - - gobj.g_type_init() - gobj.g_type_name.restype = ctypes.c_char_p - gobj.g_type_from_name.argtypes = [ctypes.c_char_p] - gobj.g_type_interfaces.restype = ctypes.POINTER(ctypes.c_int) - gobj.g_type_interface_prerequisites.restype = ctypes.POINTER(ctypes.c_int) - gobj.g_object_class_list_properties.restype = ctypes.POINTER(ctypes.POINTER(GParamSpec)) - gobj.g_object_interface_list_properties.restype = ctypes.POINTER(ctypes.POINTER(GParamSpec)) - gobj.GObject = gobj.g_type_from_name('GObject') - - defs = {} - for key in defkeys.split(): - defs[key] = [] - defs['funcs'] = {} - defs['virts'] = {} - - # read in all the object and function definitions - args.sort() - for filename in args: - buf = open(filename).read() - buf = clean_buffer(buf) - find_defs(buf, gobj, modlib, defs) - find_func_defs(buf, modlib, filename, defs, verbose) - find_virt_defs(buf, filename, defs) - - for key in defkeys.split(): - defs[key].sort() - - methods = types = None - if separate: - methods = file(separate + '.defs', 'w') - types = file(separate + '-types.defs', 'w') - - dw = DefsWriter(defs, methods, prefix=modulename, verbose=verbose, - defsfiles=defsfiles, defines=defines, - genpropgetsets=genpropgetsets) - dw.interfaces = [i.name for i in defs['GInterface']] - dw.gobj = gobj - dw.modlib = modlib - - if onlyobjdefs or all: - dw.write_obj_defs(types) - if separate: - print "Wrote object defs to %s-types.defs" % separate - if onlyenums or all: - dw.write_enum_defs(types) - if separate: - print "Wrote enum and flags defs to %s-types.defs" % separate - if onlyvirtuals or all: - dw.write_func_defs(args, onlyvirtuals) - if separate: - print "Wrote function and virtual defs to %s.defs" % separate - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/codegen/defsparser.py b/codegen/defsparser.py deleted file mode 100644 index 37ba0a2f..00000000 --- a/codegen/defsparser.py +++ /dev/null @@ -1,153 +0,0 @@ -# -*- Mode: Python; py-indent-offset: 4 -*- -import os, sys -import scmexpr -from definitions import BoxedDef, EnumDef, FlagsDef, FunctionDef, \ - InterfaceDef, MethodDef, ObjectDef, PointerDef, VirtualDef - -include_path = ['.'] - -class IncludeParser(scmexpr.Parser): - """A simple parser that follows include statements automatically""" - def include(self, input_filename): - global include_path - if os.path.isabs(input_filename): - filename = input_filename - # set self.filename to the include name, to handle recursive includes - oldfile = self.filename - self.filename = filename - self.startParsing() - self.filename = oldfile - else: - inc_path = [os.path.dirname(self.filename)] + include_path - for filename in [os.path.join(path_entry, input_filename) - for path_entry in inc_path]: - if not os.path.exists(filename): - continue - # set self.filename to the include name, to handle recursive includes - oldfile = self.filename - self.filename = filename - self.startParsing() - self.filename = oldfile - break - else: - raise IOError("%s not found in include path %s" % (input_filename, inc_path)) - -class DefsParser(IncludeParser): - def __init__(self, arg, defines={}): - IncludeParser.__init__(self, arg) - self.objects = [] - self.interfaces = [] - self.enums = [] # enums and flags - self.boxes = [] # boxed types - self.pointers = [] # pointer types - self.functions = [] # functions and methods - self.virtuals = [] # virtual methods - self.c_name = {} # hash of c names of functions - self.methods = {} # hash of methods of particular objects - self.defines = defines # -Dfoo=bar options, as dictionary - - def define_object(self, *args): - odef = apply(ObjectDef, args) - self.objects.append(odef) - self.c_name[odef.c_name] = odef - def define_interface(self, *args): - idef = apply(InterfaceDef, args) - self.interfaces.append(idef) - self.c_name[idef.c_name] = idef - def define_enum(self, *args): - edef = apply(EnumDef, args) - self.enums.append(edef) - self.c_name[edef.c_name] = edef - def define_flags(self, *args): - fdef = apply(FlagsDef, args) - self.enums.append(fdef) - self.c_name[fdef.c_name] = fdef - def define_boxed(self, *args): - bdef = apply(BoxedDef, args) - self.boxes.append(bdef) - self.c_name[bdef.c_name] = bdef - def define_pointer(self, *args): - pdef = apply(PointerDef, args) - self.pointers.append(pdef) - self.c_name[pdef.c_name] = pdef - def define_function(self, *args): - fdef = apply(FunctionDef, args) - self.functions.append(fdef) - self.c_name[fdef.c_name] = fdef - def define_method(self, *args): - mdef = apply(MethodDef, args) - self.functions.append(mdef) - self.c_name[mdef.c_name] = mdef - def define_virtual(self, *args): - vdef = apply(VirtualDef, args) - self.virtuals.append(vdef) - def merge(self, old, parmerge): - for obj in self.objects: - if old.c_name.has_key(obj.c_name): - obj.merge(old.c_name[obj.c_name]) - for f in self.functions: - if old.c_name.has_key(f.c_name): - f.merge(old.c_name[f.c_name], parmerge) - - def printMissing(self, old): - for obj in self.objects: - if not old.c_name.has_key(obj.c_name): - obj.write_defs() - for f in self.functions: - if not old.c_name.has_key(f.c_name): - f.write_defs() - - def write_defs(self, fp=sys.stdout): - for obj in self.objects: - obj.write_defs(fp) - for enum in self.enums: - enum.write_defs(fp) - for boxed in self.boxes: - boxed.write_defs(fp) - for pointer in self.pointers: - pointer.write_defs(fp) - for func in self.functions: - func.write_defs(fp) - - def find_object(self, c_name): - for obj in self.objects: - if obj.c_name == c_name: - return obj - else: - raise ValueError('object %r not found' % c_name) - - def find_constructor(self, obj, overrides): - for func in self.functions: - if isinstance(func, FunctionDef) and \ - func.is_constructor_of == obj.c_name and \ - not overrides.is_ignored(func.c_name): - return func - - def find_methods(self, obj): - objname = obj.c_name - return filter(lambda func, on=objname: isinstance(func, MethodDef) and - func.of_object == on, self.functions) - - def find_virtuals(self, obj): - objname = obj.c_name - retval = filter(lambda func, on=objname: isinstance(func, VirtualDef) and - func.of_object == on, self.virtuals) - return retval - - def find_functions(self): - return filter(lambda func: isinstance(func, FunctionDef) and - not func.is_constructor_of, self.functions) - - def ifdef(self, *args): - if args[0] in self.defines: - for arg in args[1:]: - #print >> sys.stderr, "-----> Handling conditional definition (%s): %s" % (args[0], arg) - self.handle(arg) - else: - pass - #print >> sys.stderr, "-----> Conditional %s is not true" % (args[0],) - - def ifndef(self, *args): - if args[0] not in self.defines: - for arg in args[1:]: - self.handle(arg) diff --git a/codegen/docextract.py b/codegen/docextract.py deleted file mode 100644 index e6c65053..00000000 --- a/codegen/docextract.py +++ /dev/null @@ -1,185 +0,0 @@ -# -*- Mode: Python; py-indent-offset: 4 -*- -'''Simple module for extracting GNOME style doc comments from C -sources, so I can use them for other purposes.''' - -import sys, os, string, re - -__all__ = ['extract'] - -class FunctionDoc: - def __init__(self): - self.name = None - self.params = [] - self.description = '' - self.ret = '' - def set_name(self, name): - self.name = name - def add_param(self, name, description): - if name == '...': - name = 'Varargs' - self.params.append((name, description)) - def append_to_last_param(self, extra): - self.params[-1] = (self.params[-1][0], self.params[-1][1] + extra) - def append_to_named_param(self, name, extra): - for i in range(len(self.params)): - if self.params[i][0] == name: - self.params[i] = (name, self.params[i][1] + extra) - return - # fall through to adding extra parameter ... - self.add_param(name, extra) - def append_description(self, extra): - self.description = self.description + extra - def append_return(self, extra): - self.ret = self.ret + extra - - def get_param_description(self, name): - for param, description in self.params: - if param == name: - return description - else: - return '' - -comment_start_pat = re.compile(r'^\s*/\*\*\s') -comment_end_pat = re.compile(r'^\s*\*+/') -comment_line_lead = re.compile(r'^\s*\*\s*') -funcname_pat = re.compile(r'^(\w+)\s*:?') -return_pat = re.compile(r'^(returns:|return\s+value:|returns\s*)(.*\n?)$', - re.IGNORECASE) -param_pat = re.compile(r'^@(\S+)\s*:(.*\n?)$') - -def parse_file(fp, doc_dict): - line = fp.readline() - in_comment_block = 0 - while line: - if not in_comment_block: - if comment_start_pat.match(line): - in_comment_block = 1 - cur_doc = FunctionDoc() - in_description = 0 - in_return = 0 - line = fp.readline() - continue - - # we are inside a comment block ... - if comment_end_pat.match(line): - if not cur_doc.name: - sys.stderr.write("no function name found in doc comment\n") - else: - doc_dict[cur_doc.name] = cur_doc - in_comment_block = 0 - line = fp.readline() - continue - - # inside a comment block, and not the end of the block ... - line = comment_line_lead.sub('', line) - if not line: line = '\n' - - if not cur_doc.name: - match = funcname_pat.match(line) - if match: - cur_doc.set_name(match.group(1)) - elif in_return: - match = return_pat.match(line) - if match: - # assume the last return statement was really part of the - # description - return_start = match.group(1) - cur_doc.ret = match.group(2) - cur_doc.description = cur_doc.description + return_start + \ - cur_doc.ret - else: - cur_doc.append_return(line) - elif in_description: - if line[:12] == 'Description:': - line = line[12:] - match = return_pat.match(line) - if match: - in_return = 1 - return_start = match.group(1) - cur_doc.append_return(match.group(2)) - else: - cur_doc.append_description(line) - elif line == '\n': - # end of parameters - in_description = 1 - else: - match = param_pat.match(line) - if match: - param = match.group(1) - desc = match.group(2) - if param == 'returns': - cur_doc.ret = desc - else: - cur_doc.add_param(param, desc) - else: - # must be continuation - try: - if param == 'returns': - cur_doc.append_return(line) - else: - cur_doc.append_to_last_param(line) - except: - sys.stderr.write('something weird while reading param\n') - line = fp.readline() - -def parse_dir(dir, doc_dict): - for file in os.listdir(dir): - if file in ('.', '..'): continue - path = os.path.join(dir, file) - if os.path.isdir(path): - parse_dir(path, doc_dict) - if len(file) > 2 and file[-2:] == '.c': - parse_file(open(path, 'r'), doc_dict) - -def extract(dirs, doc_dict=None): - if not doc_dict: doc_dict = {} - for dir in dirs: - parse_dir(dir, doc_dict) - return doc_dict - -tmpl_section_pat = re.compile(r'^$') -def parse_tmpl(fp, doc_dict): - cur_doc = None - - line = fp.readline() - while line: - match = tmpl_section_pat.match(line) - if match: - cur_doc = None # new input shouldn't affect the old doc dict - sect_type = match.group(1) - sect_name = match.group(2) - - if sect_type == 'FUNCTION': - cur_doc = doc_dict.get(sect_name) - if not cur_doc: - cur_doc = FunctionDoc() - cur_doc.set_name(sect_name) - doc_dict[sect_name] = cur_doc - elif line == '\n': - cur_doc = None # don't worry about unused params. - elif cur_doc: - if line[:10] == '@Returns: ': - if string.strip(line[10:]): - cur_doc.append_return(line[10:]) - elif line[0] == '@': - pos = string.find(line, ':') - if pos >= 0: - cur_doc.append_to_named_param(line[1:pos], line[pos+1:]) - else: - cur_doc.append_description(line) - else: - cur_doc.append_description(line) - - line = fp.readline() - -def extract_tmpl(dirs, doc_dict=None): - if not doc_dict: doc_dict = {} - for dir in dirs: - for file in os.listdir(dir): - if file in ('.', '..'): continue - path = os.path.join(dir, file) - if os.path.isdir(path): - continue - if len(file) > 2 and file[-2:] == '.sgml': - parse_tmpl(open(path, 'r'), doc_dict) - return doc_dict diff --git a/codegen/docextract_to_xml.py b/codegen/docextract_to_xml.py deleted file mode 100755 index 76ac85d7..00000000 --- a/codegen/docextract_to_xml.py +++ /dev/null @@ -1,77 +0,0 @@ -#!/usr/bin/env python -# -*- Mode: Python; py-indent-offset: 4 -*- -# -# This litte script outputs the C doc comments to an XML format. -# So far it's only used by gtkmm (The C++ bindings). Murray Cumming. -# Usage example: -# # ./docextract_to_xml.py -s /gnome/head/cvs/gtk+/gtk/ -s /gnome/head/cvs/gtk+/docs/reference/gtk/tmpl/ > gtk_docs.xml - -import getopt -import string -import sys - -import docextract - -def escape_text(unescaped_text): - escaped_text = unescaped_text - escaped_text = string.replace(escaped_text, '<', '<') - escaped_text = string.replace(escaped_text, '>', '>') - escaped_text = string.replace(escaped_text, '&', '&') - escaped_text = string.replace(escaped_text, '\'', ''') - escaped_text = string.replace(escaped_text, '\"', '"') - - #Apparently this is an undefined symbol: - escaped_text = string.replace(escaped_text, '—', ' mdash ') - - return escaped_text - -if __name__ == '__main__': - try: - opts, args = getopt.getopt(sys.argv[1:], "d:s:o:", - ["source-dir="]) - except getopt.error, e: - sys.stderr.write('docgen.py: %s\n' % e) - sys.stderr.write( - 'usage: docgen.py [-s /src/dir]\n') - sys.exit(1) - source_dirs = [] - for opt, arg in opts: - if opt in ('-s', '--source-dir'): - source_dirs.append(arg) - if len(args) != 0: - sys.stderr.write( - 'usage: docgen.py [-s /src/dir]\n') - sys.exit(1) - - docs = docextract.extract(source_dirs); - docextract.extract_tmpl(source_dirs, docs); #Try the tmpl sgml files too. - - # print d.docs - - if docs: - - print "" - - for name, value in docs.items(): - print "" - - print "" - #The value is a docextract.FunctionDoc - print escape_text(value.description) - print "" - - # Loop through the parameters: - print "" - for name, description in value.params: - print "" - print "" + escape_text(description) + "" - print "" - - print "" - - # Show the return-type: - print "" + escape_text(value.ret) + "" - - print "\n" - - print "" diff --git a/codegen/docgen.py b/codegen/docgen.py deleted file mode 100644 index 57eb7fcb..00000000 --- a/codegen/docgen.py +++ /dev/null @@ -1,751 +0,0 @@ -#!/usr/bin/env python -# -*- Mode: Python; py-indent-offset: 4 -*- -import sys, os, string, re, getopt - -import defsparser -import definitions -import override -import docextract - -class Node: - def __init__(self, name, interfaces=[]): - self.name = name - self.interfaces = interfaces - self.subclasses = [] - def add_child(self, node): - self.subclasses.append(node) - -def build_object_tree(parser): - # reorder objects so that parent classes come first ... - objects = parser.objects[:] - pos = 0 - while pos < len(objects): - parent = objects[pos].parent - for i in range(pos+1, len(objects)): - if objects[i].c_name == parent: - objects.insert(i+1, objects[pos]) - del objects[pos] - break - else: - pos = pos + 1 - - root = Node(None) - nodes = { None: root } - for obj_def in objects: - parent_node = nodes[obj_def.parent] - node = Node(obj_def.c_name, obj_def.implements) - parent_node.add_child(node) - nodes[node.name] = node - - if parser.interfaces: - interfaces = Node('gobject.GInterface') - root.add_child(interfaces) - nodes[interfaces.name] = interfaces - for obj_def in parser.interfaces: - node = Node(obj_def.c_name) - interfaces.add_child(node) - nodes[node.name] = node - - if parser.boxes: - boxed = Node('gobject.GBoxed') - root.add_child(boxed) - nodes[boxed.name] = boxed - for obj_def in parser.boxes: - node = Node(obj_def.c_name) - boxed.add_child(node) - nodes[node.name] = node - - if parser.pointers: - pointers = Node('gobject.GPointer') - root.add_child(pointers) - nodes[pointers.name] = pointers - for obj_def in parser.pointers: - node = Node(obj_def.c_name) - pointers.add_child(node) - nodes[node.name] = node - - return root - -class DocWriter: - def __init__(self): - # parse the defs file - self.parser = defsparser.DefsParser(()) - self.overrides = override.Overrides() - self.classmap = {} - self.docs = {} - - def add_sourcedirs(self, source_dirs): - self.docs = docextract.extract(source_dirs, self.docs) - def add_tmpldirs(self, tmpl_dirs): - self.docs = docextract.extract_tmpl(tmpl_dirs, self.docs) - - def add_docs(self, defs_file, overrides_file, module_name): - '''parse information about a given defs file''' - self.parser.filename = defs_file - self.parser.startParsing(defs_file) - if overrides_file: - self.overrides.handle_file(overrides_file) - - for obj in self.parser.objects: - if not self.classmap.has_key(obj.c_name): - self.classmap[obj.c_name] = '%s.%s' % (module_name, obj.name) - for obj in self.parser.interfaces: - if not self.classmap.has_key(obj.c_name): - self.classmap[obj.c_name] = '%s.%s' % (module_name, obj.name) - for obj in self.parser.boxes: - if not self.classmap.has_key(obj.c_name): - self.classmap[obj.c_name] = '%s.%s' % (module_name, obj.name) - for obj in self.parser.pointers: - if not self.classmap.has_key(obj.c_name): - self.classmap[obj.c_name] = '%s.%s' % (module_name, obj.name) - - def pyname(self, name): - return self.classmap.get(name, name) - - def __compare(self, obja, objb): - return cmp(self.pyname(obja.c_name), self.pyname(objb.c_name)) - def output_docs(self, output_prefix): - files = [] - - # class hierarchy - hierarchy = build_object_tree(self.parser) - filename = self.create_filename('hierarchy', output_prefix) - fp = open(filename, 'w') - self.write_full_hierarchy(hierarchy, fp) - fp.close() - - obj_defs = self.parser.objects + self.parser.interfaces + \ - self.parser.boxes + self.parser.pointers - obj_defs.sort(self.__compare) - for obj_def in obj_defs: - filename = self.create_filename(obj_def.c_name, output_prefix) - fp = open(filename, 'w') - if isinstance(obj_def, definitions.ObjectDef): - self.output_object_docs(obj_def, fp) - elif isinstance(obj_def, definitions.InterfaceDef): - self.output_interface_docs(obj_def, fp) - elif isinstance(obj_def, definitions.BoxedDef): - self.output_boxed_docs(obj_def, fp) - elif isinstance(obj_def, definitions.PointerDef): - self.output_boxed_docs(obj_def, fp) - fp.close() - files.append((os.path.basename(filename), obj_def)) - - if files: - filename = self.create_toc_filename(output_prefix) - fp = open(filename, 'w') - self.output_toc(files, fp) - fp.close() - - def output_object_docs(self, obj_def, fp=sys.stdout): - self.write_class_header(obj_def.c_name, fp) - - self.write_heading('Synopsis', fp) - self.write_synopsis(obj_def, fp) - self.close_section(fp) - - # construct the inheritence hierarchy ... - ancestry = [ (obj_def.c_name, obj_def.implements) ] - try: - parent = obj_def.parent - while parent != None: - if parent == 'GObject': - ancestry.append(('GObject', [])) - parent = None - else: - parent_def = self.parser.find_object(parent) - ancestry.append((parent_def.c_name, parent_def.implements)) - parent = parent_def.parent - except ValueError: - pass - ancestry.reverse() - self.write_heading('Ancestry', fp) - self.write_hierarchy(obj_def.c_name, ancestry, fp) - self.close_section(fp) - - constructor = self.parser.find_constructor(obj_def, self.overrides) - if constructor: - self.write_heading('Constructor', fp) - self.write_constructor(constructor, - self.docs.get(constructor.c_name, None), - fp) - self.close_section(fp) - - methods = self.parser.find_methods(obj_def) - methods = filter(lambda meth, self=self: - not self.overrides.is_ignored(meth.c_name), methods) - if methods: - self.write_heading('Methods', fp) - for method in methods: - self.write_method(method, self.docs.get(method.c_name, None), fp) - self.close_section(fp) - - self.write_class_footer(obj_def.c_name, fp) - - def output_interface_docs(self, int_def, fp=sys.stdout): - self.write_class_header(int_def.c_name, fp) - - self.write_heading('Synopsis', fp) - self.write_synopsis(int_def, fp) - self.close_section(fp) - - methods = self.parser.find_methods(int_def) - methods = filter(lambda meth, self=self: - not self.overrides.is_ignored(meth.c_name), methods) - if methods: - self.write_heading('Methods', fp) - for method in methods: - self.write_method(method, self.docs.get(method.c_name, None), fp) - self.close_section(fp) - - self.write_class_footer(int_def.c_name, fp) - - def output_boxed_docs(self, box_def, fp=sys.stdout): - self.write_class_header(box_def.c_name, fp) - - self.write_heading('Synopsis', fp) - self.write_synopsis(box_def, fp) - self.close_section(fp) - - constructor = self.parser.find_constructor(box_def, self.overrides) - if constructor: - self.write_heading('Constructor', fp) - self.write_constructor(constructor, - self.docs.get(constructor.c_name, None), - fp) - self.close_section(fp) - - methods = self.parser.find_methods(box_def) - methods = filter(lambda meth, self=self: - not self.overrides.is_ignored(meth.c_name), methods) - if methods: - self.write_heading('Methods', fp) - for method in methods: - self.write_method(method, self.docs.get(method.c_name, None), fp) - self.close_section(fp) - - self.write_class_footer(box_def.c_name, fp) - - def output_toc(self, files, fp=sys.stdout): - fp.write('TOC\n\n') - for filename, obj_def in files: - fp.write(obj_def.c_name + ' - ' + filename + '\n') - - # override the following to create a more complex output format - def create_filename(self, obj_name, output_prefix): - '''Create output filename for this particular object''' - return output_prefix + '-' + string.lower(obj_name) + '.txt' - def create_toc_filename(self, output_prefix): - return self.create_filename(self, 'docs', output_prefix) - - def write_full_hierarchy(self, hierarchy, fp): - def handle_node(node, fp, indent=''): - for child in node.subclasses: - fp.write(indent + node.name) - if node.interfaces: - fp.write(' (implements ') - fp.write(string.join(node.interfaces, ', ')) - fp.write(')\n') - else: - fp.write('\n') - handle_node(child, fp, indent + ' ') - handle_node(hierarchy, fp) - - # these need to handle default args ... - def create_constructor_prototype(self, func_def): - return func_def.is_constructor_of + '(' + \ - string.join(map(lambda x: x[1], func_def.params), ', ') + \ - ')' - def create_function_prototype(self, func_def): - return func_def.name + '(' + \ - string.join(map(lambda x: x[1], func_def.params), ', ') + \ - ')' - def create_method_prototype(self, meth_def): - return meth_def.of_object + '.' + \ - meth_def.name + '(' + \ - string.join(map(lambda x: x[1], meth_def.params), ', ') + \ - ')' - - def write_class_header(self, obj_name, fp): - fp.write('Class %s\n' % obj_name) - fp.write('======%s\n\n' % ('=' * len(obj_name))) - def write_class_footer(self, obj_name, fp): - pass - def write_heading(self, text, fp): - fp.write('\n' + text + '\n' + ('-' * len(text)) + '\n') - def close_section(self, fp): - pass - def write_synopsis(self, obj_def, fp): - fp.write('class %s' % obj_def.c_name) - if isinstance(obj_def, definitions.ObjectDef): - bases = [] - if obj_def.parent: bases.append(obj_def.parent) - bases = bases = obj_def.implements - if bases: - fp.write('(%s)' % string.join(bases, ', ')) - fp.write(':\n') - - constructor = self.parser.find_constructor(obj_def, self.overrides) - if constructor: - prototype = self.create_constructor_prototype(constructor) - fp.write(' def %s\n' % prototype) - methods = self.parser.find_methods(obj_def) - methods = filter(lambda meth, self=self: - not self.overrides.is_ignored(meth.c_name), methods) - for meth in methods: - prototype = self.create_method_prototype(meth) - fp.write(' def %s\n' % prototype) - - def write_hierarchy(self, obj_name, ancestry, fp): - indent = '' - for name, interfaces in ancestry: - fp.write(indent + '+-- ' + name) - if interfaces: - fp.write(' (implements ') - fp.write(string.join(interfaces, ', ')) - fp.write(')\n') - else: - fp.write('\n') - indent = indent + ' ' - fp.write('\n') - def write_constructor(self, func_def, func_doc, fp): - prototype = self.create_constructor_prototype(func_def) - fp.write(prototype + '\n\n') - for type, name, dflt, null in func_def.params: - if func_doc: - descr = func_doc.get_param_description(name) - else: - descr = 'a ' + type - fp.write(' ' + name + ': ' + descr + '\n') - if func_def.ret and func_def.ret != 'none': - if func_doc and func_doc.ret: - descr = func_doc.ret - else: - descr = 'a ' + func_def.ret - fp.write(' Returns: ' + descr + '\n') - if func_doc and func_doc.description: - fp.write(func_doc.description) - fp.write('\n\n\n') - def write_method(self, meth_def, func_doc, fp): - prototype = self.create_method_prototype(meth_def) - fp.write(prototype + '\n\n') - for type, name, dflt, null in meth_def.params: - if func_doc: - descr = func_doc.get_param_description(name) - else: - descr = 'a ' + type - fp.write(' ' + name + ': ' + descr + '\n') - if meth_def.ret and meth_def.ret != 'none': - if func_doc and func_doc.ret: - descr = func_doc.ret - else: - descr = 'a ' + meth_def.ret - fp.write(' Returns: ' + descr + '\n') - if func_doc and func_doc.description: - fp.write('\n') - fp.write(func_doc.description) - fp.write('\n\n') - -class DocbookDocWriter(DocWriter): - def __init__(self, use_xml=0): - DocWriter.__init__(self) - self.use_xml = use_xml - - def create_filename(self, obj_name, output_prefix): - '''Create output filename for this particular object''' - stem = output_prefix + '-' + string.lower(obj_name) - if self.use_xml: - return stem + '.xml' - else: - return stem + '.sgml' - def create_toc_filename(self, output_prefix): - if self.use_xml: - return self.create_filename('classes', output_prefix) - else: - return self.create_filename('docs', output_prefix) - - # make string -> reference translation func - __transtable = [ '-' ] * 256 - for digit in '0123456789': - __transtable[ord(digit)] = digit - for letter in 'abcdefghijklmnopqrstuvwxyz': - __transtable[ord(letter)] = letter - __transtable[ord(string.upper(letter))] = letter - __transtable = string.join(__transtable, '') - - def make_class_ref(self, obj_name): - return 'class-' + string.translate(obj_name, self.__transtable) - def make_method_ref(self, meth_def): - return 'method-' + string.translate(meth_def.of_object, - self.__transtable) + \ - '--' + string.translate(meth_def.name, self.__transtable) - - __function_pat = re.compile(r'(\w+)\s*\(\)') - def __format_function(self, match): - info = self.parser.c_name.get(match.group(1), None) - if info: - if isinstance(info, defsparser.FunctionDef): - if info.is_constructor_of is not None: - # should have a link here - return '%s()' % \ - self.pyname(info.is_constructor_of) - else: - return '' + info.name + '()' - if isinstance(info, defsparser.MethodDef): - return '' + self.pyname(info.of_object) + '.' + \ - info.name + '()' - # fall through through - return '' + match.group(1) + '()' - __parameter_pat = re.compile(r'\@(\w+)') - def __format_param(self, match): - return '' + match.group(1) + '' - __constant_pat = re.compile(r'\%(-?\w+)') - def __format_const(self, match): - return '' + match.group(1) + '' - __symbol_pat = re.compile(r'#([\w-]+)') - def __format_symbol(self, match): - info = self.parser.c_name.get(match.group(1), None) - if info: - if isinstance(info, defsparser.FunctionDef): - if info.is_constructor_of is not None: - # should have a link here - return '' + self.pyname(info.is_constructor_of) + \ - '' - else: - return '' + info.name + '' - if isinstance(info, defsparser.MethodDef): - return '' + self.pyname(info.of_object) + '.' + \ - info.name + '' - if isinstance(info, defsparser.ObjectDef) or \ - isinstance(info, defsparser.InterfaceDef) or \ - isinstance(info, defsparser.BoxedDef) or \ - isinstance(info, defsparser.PointerDef): - return '' + self.pyname(info.c_name) + \ - '' - # fall through through - return '' + match.group(1) + '' - - def reformat_text(self, text, singleline=0): - # replace special strings ... - text = self.__function_pat.sub(self.__format_function, text) - text = self.__parameter_pat.sub(self.__format_param, text) - text = self.__constant_pat.sub(self.__format_const, text) - text = self.__symbol_pat.sub(self.__format_symbol, text) - - # don't bother with expansion for single line text. - if singleline: return text - - lines = string.split(string.strip(text), '\n') - for index in range(len(lines)): - if string.strip(lines[index]) == '': - lines[index] = '\n' - continue - lines.insert(0, '') - lines.append('') - return string.join(lines, '\n') - - # write out hierarchy - def write_full_hierarchy(self, hierarchy, fp): - def handle_node(node, fp, indent=''): - if node.name: - fp.write('%s%s' % - (indent, self.make_class_ref(node.name), - self.pyname(node.name))) - if node.interfaces: - fp.write(' (implements ') - for i in range(len(node.interfaces)): - fp.write('%s' % - (self.make_class_ref(node.interfaces[i]), - self.pyname(node.interfaces[i]))) - if i != len(node.interfaces) - 1: - fp.write(', ') - fp.write(')\n') - else: - fp.write('\n') - - indent = indent + ' ' - node.subclasses.sort(lambda a,b: - cmp(self.pyname(a.name), self.pyname(b.name))) - for child in node.subclasses: - handle_node(child, fp, indent) - if self.use_xml: - fp.write('\n') - fp.write('\n') - fp.write('') - handle_node(hierarchy, fp) - fp.write('\n') - - # these need to handle default args ... - def create_constructor_prototype(self, func_def): - sgml = [ '\n'] - sgml.append(' __init__\n') - for type, name, dflt, null in func_def.params: - sgml.append(' ') - sgml.append(name) - sgml.append('') - if dflt: - sgml.append('') - sgml.append(dflt) - sgml.append('') - sgml.append('\n') - if not func_def.params: - sgml.append(' ') - sgml.append(' ') - return string.join(sgml, '') - def create_function_prototype(self, func_def): - sgml = [ '\n \n'] - sgml.append(' ') - sgml.append(func_def.name) - sgml.append('\n') - for type, name, dflt, null in func_def.params: - sgml.append(' ') - sgml.append(name) - sgml.append('') - if dflt: - sgml.append('') - sgml.append(dflt) - sgml.append('') - sgml.append('\n') - if not func_def.params: - sgml.append(' \n ') - return string.join(sgml, '') - def create_method_prototype(self, meth_def, addlink=0): - sgml = [ '\n'] - sgml.append(' ') - if addlink: - sgml.append('' % self.make_method_ref(meth_def)) - sgml.append(self.pyname(meth_def.name)) - if addlink: - sgml.append('') - sgml.append('\n') - for type, name, dflt, null in meth_def.params: - sgml.append(' ') - sgml.append(name) - sgml.append('') - if dflt: - sgml.append('') - sgml.append(dflt) - sgml.append('') - sgml.append('\n') - if not meth_def.params: - sgml.append(' ') - sgml.append(' ') - return string.join(sgml, '') - - def write_class_header(self, obj_name, fp): - if self.use_xml: - fp.write('\n') - fp.write('\n') - fp.write('\n') - fp.write(' \n') - fp.write(' %s\n' - % self.pyname(obj_name)) - fp.write(' 3\n') - fp.write(' PyGTK Docs\n') - fp.write(' \n\n') - fp.write(' \n') - fp.write(' %s\n' - % self.pyname(obj_name)) - fp.write(' \n\n') - def write_class_footer(self, obj_name, fp): - fp.write('\n') - def write_heading(self, text, fp): - fp.write(' \n') - fp.write(' ' + text + '\n\n') - def close_section(self, fp): - fp.write(' \n') - - def write_synopsis(self, obj_def, fp): - fp.write('\n') - fp.write(' %s\n' - % self.pyname(obj_def.c_name)) - if isinstance(obj_def, definitions.ObjectDef): - if obj_def.parent: - fp.write(' %s' - '\n' - % (self.make_class_ref(obj_def.parent), - self.pyname(obj_def.parent))) - for base in obj_def.implements: - fp.write(' %s' - '\n' - % (self.make_class_ref(base), self.pyname(base))) - elif isinstance(obj_def, definitions.InterfaceDef): - fp.write(' gobject.GInterface' - '\n') - elif isinstance(obj_def, definitions.BoxedDef): - fp.write(' gobject.GBoxed' - '\n') - elif isinstance(obj_def, definitions.PointerDef): - fp.write(' gobject.GPointer' - '\n') - - constructor = self.parser.find_constructor(obj_def, self.overrides) - if constructor: - fp.write('%s\n' % self.create_constructor_prototype(constructor)) - methods = self.parser.find_methods(obj_def) - methods = filter(lambda meth, self=self: - not self.overrides.is_ignored(meth.c_name), methods) - for meth in methods: - fp.write('%s\n' % self.create_method_prototype(meth, addlink=1)) - fp.write('\n\n') - - def write_hierarchy(self, obj_name, ancestry, fp): - fp.write('') - indent = '' - for name, interfaces in ancestry: - fp.write(indent + '+-- '+ self.pyname(name) + '') - if interfaces: - fp.write(' (implements ') - for i in range(len(interfaces)): - fp.write('%s' % - (self.make_class_ref(interfaces[i]), - self.pyname(interfaces[i]))) - if i != len(interfaces) - 1: - fp.write(', ') - fp.write(')\n') - else: - fp.write('\n') - indent = indent + ' ' - fp.write('\n\n') - - def write_params(self, params, ret, func_doc, fp): - if not params and (not ret or ret == 'none'): - return - fp.write(' \n') - for type, name, dflt, null in params: - if func_doc: - descr = string.strip(func_doc.get_param_description(name)) - else: - descr = 'a ' + type - fp.write(' \n') - fp.write(' %s :\n' % name) - fp.write(' %s\n' % - self.reformat_text(descr, singleline=1)) - fp.write(' \n') - if ret and ret != 'none': - if func_doc and func_doc.ret: - descr = string.strip(func_doc.ret) - else: - descr = 'a ' + ret - fp.write(' \n') - fp.write(' Returns :\n') - fp.write(' %s\n' % - self.reformat_text(descr, singleline=1)) - fp.write(' \n') - fp.write(' \n') - - def write_constructor(self, func_def, func_doc, fp): - prototype = self.create_constructor_prototype(func_def) - fp.write('%s\n' % prototype) - self.write_params(func_def.params, func_def.ret, func_doc, fp) - - if func_doc and func_doc.description: - fp.write(self.reformat_text(func_doc.description)) - fp.write('\n\n\n') - - def write_method(self, meth_def, func_doc, fp): - fp.write(' \n') - fp.write(' ' + self.pyname(meth_def.of_object) + '.' + - meth_def.name + '\n\n') - prototype = self.create_method_prototype(meth_def) - fp.write('%s\n' % prototype) - self.write_params(meth_def.params, meth_def.ret, func_doc, fp) - if func_doc and func_doc.description: - fp.write(self.reformat_text(func_doc.description)) - fp.write(' \n\n\n') - - def output_toc(self, files, fp=sys.stdout): - if self.use_xml: - fp.write('\n') - fp.write('\n') - #for filename, obj_def in files: - # fp.write(' \n') - #fp.write(']>\n\n') - - #fp.write('\n') - #fp.write(' Class Documentation\n') - #for filename, obj_def in files: - # fp.write('&' + string.translate(obj_def.c_name, - # self.__transtable) + ';\n') - #fp.write('\n') - - fp.write('\n') - fp.write(' Class Reference\n') - for filename, obj_def in files: - fp.write(' \n' % filename) - fp.write('\n') - else: - fp.write('\n') - fp.write(']>\n\n') - - fp.write('\n\n') - fp.write(' \n') - fp.write(' PyGTK Docs\n') - fp.write(' \n') - fp.write(' \n') - fp.write(' James\n') - fp.write(' Henstridge\n') - fp.write(' \n') - fp.write(' \n') - fp.write(' \n\n') - - fp.write(' \n') - fp.write(' Class Hierarchy\n') - fp.write(' Not done yet\n') - fp.write(' \n\n') - - fp.write(' \n') - fp.write(' Class Documentation\n') - for filename, obj_def in files: - fp.write('&' + string.translate(obj_def.c_name, - self.__transtable) + ';\n') - - fp.write(' \n') - fp.write('\n') - -if __name__ == '__main__': - try: - opts, args = getopt.getopt(sys.argv[1:], "d:s:o:", - ["defs-file=", "override=", "source-dir=", - "output-prefix="]) - except getopt.error, e: - sys.stderr.write('docgen.py: %s\n' % e) - sys.stderr.write( - 'usage: docgen.py -d file.defs [-s /src/dir] [-o output-prefix]\n') - sys.exit(1) - defs_file = None - overrides_file = None - source_dirs = [] - output_prefix = 'docs' - for opt, arg in opts: - if opt in ('-d', '--defs-file'): - defs_file = arg - if opt in ('--override',): - overrides_file = arg - elif opt in ('-s', '--source-dir'): - source_dirs.append(arg) - elif opt in ('-o', '--output-prefix'): - output_prefix = arg - if len(args) != 0 or not defs_file: - sys.stderr.write( - 'usage: docgen.py -d file.defs [-s /src/dir] [-o output-prefix]\n') - sys.exit(1) - - d = DocbookDocWriter() - d.add_sourcedirs(source_dirs) - d.add_docs(defs_file, overrides_file, 'gtk') - d.output_docs(output_prefix) diff --git a/codegen/h2def.py b/codegen/h2def.py deleted file mode 100755 index d4b21356..00000000 --- a/codegen/h2def.py +++ /dev/null @@ -1,536 +0,0 @@ -#!/usr/bin/env python -# -*- Mode: Python; py-indent-offset: 4 -*- -# Search through a header file looking for function prototypes. -# For each prototype, generate a scheme style definition. -# GPL'ed -# Toby D. Reeves -# -# Modified by James Henstridge to output stuff in -# Havoc's new defs format. Info on this format can be seen at: -# http://www.gnome.org/mailing-lists/archives/gtk-devel-list/2000-January/0085.shtml -# Updated to be PEP-8 compatible and refactored to use OOP - -import getopt -import os -import re -import string -import sys - -import defsparser - -# ------------------ Create typecodes from typenames --------- - -_upperstr_pat1 = re.compile(r'([^A-Z])([A-Z])') -_upperstr_pat2 = re.compile(r'([A-Z][A-Z])([A-Z][0-9a-z])') -_upperstr_pat3 = re.compile(r'^([A-Z])([A-Z])') - -def to_upper_str(name): - """Converts a typename to the equivalent upercase and underscores - name. This is used to form the type conversion macros and enum/flag - name variables""" - name = _upperstr_pat1.sub(r'\1_\2', name) - name = _upperstr_pat2.sub(r'\1_\2', name) - name = _upperstr_pat3.sub(r'\1_\2', name, count=1) - return string.upper(name) - -def typecode(typename): - """create a typecode (eg. GTK_TYPE_WIDGET) from a typename""" - return string.replace(to_upper_str(typename), '_', '_TYPE_', 1) - - -# ------------------ Find object definitions ----------------- - -def strip_comments(buf): - parts = [] - lastpos = 0 - while 1: - pos = string.find(buf, '/*', lastpos) - if pos >= 0: - parts.append(buf[lastpos:pos]) - pos = string.find(buf, '*/', pos) - if pos >= 0: - lastpos = pos + 2 - else: - break - else: - parts.append(buf[lastpos:]) - break - return string.join(parts, '') - -obj_name_pat = "[A-Z][a-z]*[A-Z][A-Za-z0-9]*" - -split_prefix_pat = re.compile('([A-Z]+[a-z]*)([A-Za-z0-9]+)') - -def find_obj_defs(buf, objdefs=[]): - """ - Try to find object definitions in header files. - """ - - # filter out comments from buffer. - buf = strip_comments(buf) - - maybeobjdefs = [] # contains all possible objects from file - - # first find all structures that look like they may represent a GtkObject - pat = re.compile("struct _(" + obj_name_pat + ")\s*{\s*" + - "(" + obj_name_pat + ")\s+", re.MULTILINE) - pos = 0 - while pos < len(buf): - m = pat.search(buf, pos) - if not m: break - maybeobjdefs.append((m.group(1), m.group(2))) - pos = m.end() - - # handle typedef struct { ... } style struct defs. - pat = re.compile("typedef struct\s+[_\w]*\s*{\s*" + - "(" + obj_name_pat + ")\s+[^}]*}\s*" + - "(" + obj_name_pat + ")\s*;", re.MULTILINE) - pos = 0 - while pos < len(buf): - m = pat.search(buf, pos) - if not m: break - maybeobjdefs.append((m.group(2), m.group(2))) - pos = m.end() - - # now find all structures that look like they might represent a class: - pat = re.compile("struct _(" + obj_name_pat + ")Class\s*{\s*" + - "(" + obj_name_pat + ")Class\s+", re.MULTILINE) - pos = 0 - while pos < len(buf): - m = pat.search(buf, pos) - if not m: break - t = (m.group(1), m.group(2)) - # if we find an object structure together with a corresponding - # class structure, then we have probably found a GtkObject subclass. - if t in maybeobjdefs: - objdefs.append(t) - pos = m.end() - - pat = re.compile("typedef struct\s+[_\w]*\s*{\s*" + - "(" + obj_name_pat + ")Class\s+[^}]*}\s*" + - "(" + obj_name_pat + ")Class\s*;", re.MULTILINE) - pos = 0 - while pos < len(buf): - m = pat.search(buf, pos) - if not m: break - t = (m.group(2), m.group(1)) - # if we find an object structure together with a corresponding - # class structure, then we have probably found a GtkObject subclass. - if t in maybeobjdefs: - objdefs.append(t) - pos = m.end() - - # now find all structures that look like they might represent - # a class inherited from GTypeInterface: - pat = re.compile("struct _(" + obj_name_pat + ")Class\s*{\s*" + - "GTypeInterface\s+", re.MULTILINE) - pos = 0 - while pos < len(buf): - m = pat.search(buf, pos) - if not m: break - t = (m.group(1), '') - t2 = (m.group(1)+'Class', 'GTypeInterface') - # if we find an object structure together with a corresponding - # class structure, then we have probably found a GtkObject subclass. - if t2 in maybeobjdefs: - objdefs.append(t) - pos = m.end() - - # now find all structures that look like they might represent - # an Iface inherited from GTypeInterface: - pat = re.compile("struct _(" + obj_name_pat + ")Iface\s*{\s*" + - "GTypeInterface\s+", re.MULTILINE) - pos = 0 - while pos < len(buf): - m = pat.search(buf, pos) - if not m: break - t = (m.group(1), '') - t2 = (m.group(1)+'Iface', 'GTypeInterface') - # if we find an object structure together with a corresponding - # class structure, then we have probably found a GtkObject subclass. - if t2 in maybeobjdefs: - objdefs.append(t) - pos = m.end() - -def sort_obj_defs(objdefs): - objdefs.sort() # not strictly needed, but looks nice - pos = 0 - while pos < len(objdefs): - klass,parent = objdefs[pos] - for i in range(pos+1, len(objdefs)): - # parent below subclass ... reorder - if objdefs[i][0] == parent: - objdefs.insert(i+1, objdefs[pos]) - del objdefs[pos] - break - else: - pos = pos + 1 - return objdefs - -# ------------------ Find enum definitions ----------------- - -def find_enum_defs(buf, enums=[]): - # strip comments - # bulk comments - buf = strip_comments(buf) - - buf = re.sub('\n', ' ', buf) - - enum_pat = re.compile(r'enum\s*{([^}]*)}\s*([A-Z][A-Za-z]*)(\s|;)') - splitter = re.compile(r'\s*,\s', re.MULTILINE) - pos = 0 - while pos < len(buf): - m = enum_pat.search(buf, pos) - if not m: break - - name = m.group(2) - vals = m.group(1) - isflags = string.find(vals, '<<') >= 0 - entries = [] - for val in splitter.split(vals): - if not string.strip(val): continue - entries.append(string.split(val)[0]) - if name != 'GdkCursorType': - enums.append((name, isflags, entries)) - - pos = m.end() - -# ------------------ Find function definitions ----------------- - -def clean_func(buf): - """ - Ideally would make buf have a single prototype on each line. - Actually just cuts out a good deal of junk, but leaves lines - where a regex can figure prototypes out. - """ - # bulk comments - buf = strip_comments(buf) - - # compact continued lines - pat = re.compile(r"""\\\n""", re.MULTILINE) - buf = pat.sub('', buf) - - # Preprocess directives - pat = re.compile(r"""^[#].*?$""", re.MULTILINE) - buf = pat.sub('', buf) - - #typedefs, stucts, and enums - pat = re.compile(r"""^(typedef|struct|enum)(\s|.|\n)*?;\s*""", - re.MULTILINE) - buf = pat.sub('', buf) - - #strip DECLS macros - pat = re.compile(r"""G_BEGIN_DECLS|BEGIN_LIBGTOP_DECLS""", re.MULTILINE) - buf = pat.sub('', buf) - - #extern "C" - pat = re.compile(r"""^\s*(extern)\s+\"C\"\s+{""", re.MULTILINE) - buf = pat.sub('', buf) - - #multiple whitespace - pat = re.compile(r"""\s+""", re.MULTILINE) - buf = pat.sub(' ', buf) - - #clean up line ends - pat = re.compile(r""";\s*""", re.MULTILINE) - buf = pat.sub('\n', buf) - buf = buf.lstrip() - - #associate *, &, and [] with type instead of variable - #pat = re.compile(r'\s+([*|&]+)\s*(\w+)') - pat = re.compile(r' \s* ([*|&]+) \s* (\w+)', re.VERBOSE) - buf = pat.sub(r'\1 \2', buf) - pat = re.compile(r'\s+ (\w+) \[ \s* \]', re.VERBOSE) - buf = pat.sub(r'[] \1', buf) - - # make return types that are const work. - buf = string.replace(buf, 'G_CONST_RETURN ', 'const-') - buf = string.replace(buf, 'const ', 'const-') - - return buf - -proto_pat=re.compile(r""" -(?P(-|\w|\&|\*)+\s*) # return type -\s+ # skip whitespace -(?P\w+)\s*[(] # match the function name until the opening ( -\s*(?P.*?)\s*[)] # group the function arguments -""", re.IGNORECASE|re.VERBOSE) -#""" -arg_split_pat = re.compile("\s*,\s*") - -get_type_pat = re.compile(r'(const-)?([A-Za-z0-9]+)\*?\s+') -pointer_pat = re.compile('.*\*$') -func_new_pat = re.compile('(\w+)_new$') - -class DefsWriter: - def __init__(self, fp=None, prefix=None, verbose=False, - defsfilter=None): - if not fp: - fp = sys.stdout - - self.fp = fp - self.prefix = prefix - self.verbose = verbose - - self._enums = {} - self._objects = {} - self._functions = {} - if defsfilter: - filter = defsparser.DefsParser(defsfilter) - filter.startParsing() - for func in filter.functions + filter.methods.values(): - self._functions[func.c_name] = func - for obj in filter.objects + filter.boxes + filter.interfaces: - self._objects[obj.c_name] = func - for obj in filter.enums: - self._enums[obj.c_name] = func - - def write_def(self, deffile): - buf = open(deffile).read() - - self.fp.write('\n;; From %s\n\n' % os.path.basename(deffile)) - self._define_func(buf) - self.fp.write('\n') - - def write_enum_defs(self, enums, fp=None): - if not fp: - fp = self.fp - - fp.write(';; Enumerations and flags ...\n\n') - trans = string.maketrans(string.uppercase + '_', - string.lowercase + '-') - filter = self._enums - for cname, isflags, entries in enums: - if filter: - if cname in filter: - continue - name = cname - module = None - m = split_prefix_pat.match(cname) - if m: - module = m.group(1) - name = m.group(2) - if isflags: - fp.write('(define-flags ' + name + '\n') - else: - fp.write('(define-enum ' + name + '\n') - if module: - fp.write(' (in-module "' + module + '")\n') - fp.write(' (c-name "' + cname + '")\n') - fp.write(' (gtype-id "' + typecode(cname) + '")\n') - prefix = entries[0] - for ent in entries: - # shorten prefix til we get a match ... - # and handle GDK_FONT_FONT, GDK_FONT_FONTSET case - while ent[:len(prefix)] != prefix or len(prefix) >= len(ent): - prefix = prefix[:-1] - prefix_len = len(prefix) - fp.write(' (values\n') - for ent in entries: - fp.write(' \'("%s" "%s")\n' % - (string.translate(ent[prefix_len:], trans), ent)) - fp.write(' )\n') - fp.write(')\n\n') - - def write_obj_defs(self, objdefs, fp=None): - if not fp: - fp = self.fp - - fp.write(';; -*- scheme -*-\n') - fp.write('; object definitions ...\n') - - filter = self._objects - for klass, parent in objdefs: - if filter: - if klass in filter: - continue - m = split_prefix_pat.match(klass) - cmodule = None - cname = klass - if m: - cmodule = m.group(1) - cname = m.group(2) - fp.write('(define-object ' + cname + '\n') - if cmodule: - fp.write(' (in-module "' + cmodule + '")\n') - if parent: - fp.write(' (parent "' + parent + '")\n') - fp.write(' (c-name "' + klass + '")\n') - fp.write(' (gtype-id "' + typecode(klass) + '")\n') - # should do something about accessible fields - fp.write(')\n\n') - - def _define_func(self, buf): - buf = clean_func(buf) - buf = string.split(buf,'\n') - filter = self._functions - for p in buf: - if not p: - continue - m = proto_pat.match(p) - if m == None: - if self.verbose: - sys.stderr.write('No match:|%s|\n' % p) - continue - func = m.group('func') - if func[0] == '_': - continue - if filter: - if func in filter: - continue - ret = m.group('ret') - args = m.group('args') - args = arg_split_pat.split(args) - for i in range(len(args)): - spaces = string.count(args[i], ' ') - if spaces > 1: - args[i] = string.replace(args[i], ' ', '-', spaces - 1) - - self._write_func(func, ret, args) - - def _write_func(self, name, ret, args): - if len(args) >= 1: - # methods must have at least one argument - munged_name = name.replace('_', '') - m = get_type_pat.match(args[0]) - if m: - obj = m.group(2) - if munged_name[:len(obj)] == obj.lower(): - self._write_method(obj, name, ret, args) - return - - if self.prefix: - l = len(self.prefix) - if name[:l] == self.prefix and name[l] == '_': - fname = name[l+1:] - else: - fname = name - else: - fname = name - - # it is either a constructor or normal function - self.fp.write('(define-function ' + fname + '\n') - self.fp.write(' (c-name "' + name + '")\n') - - # Hmmm... Let's asume that a constructor function name - # ends with '_new' and it returns a pointer. - m = func_new_pat.match(name) - if pointer_pat.match(ret) and m: - cname = '' - for s in m.group(1).split ('_'): - cname += s.title() - if cname != '': - self.fp.write(' (is-constructor-of "' + cname + '")\n') - - self._write_return(ret) - self._write_arguments(args) - - def _write_method(self, obj, name, ret, args): - regex = string.join(map(lambda x: x+'_?', string.lower(obj)),'') - mname = re.sub(regex, '', name, 1) - if self.prefix: - l = len(self.prefix) + 1 - if mname[:l] == self.prefix and mname[l+1] == '_': - mname = mname[l+1:] - self.fp.write('(define-method ' + mname + '\n') - self.fp.write(' (of-object "' + obj + '")\n') - self.fp.write(' (c-name "' + name + '")\n') - self._write_return(ret) - self._write_arguments(args[1:]) - - def _write_return(self, ret): - if ret != 'void': - self.fp.write(' (return-type "' + ret + '")\n') - else: - self.fp.write(' (return-type "none")\n') - - def _write_arguments(self, args): - is_varargs = 0 - has_args = len(args) > 0 - for arg in args: - if arg == '...': - is_varargs = 1 - elif arg in ('void', 'void '): - has_args = 0 - if has_args: - self.fp.write(' (parameters\n') - for arg in args: - if arg != '...': - tupleArg = tuple(string.split(arg)) - if len(tupleArg) == 2: - self.fp.write(' \'("%s" "%s")\n' % tupleArg) - self.fp.write(' )\n') - if is_varargs: - self.fp.write(' (varargs #t)\n') - self.fp.write(')\n\n') - -# ------------------ Main function ----------------- - -def main(args): - verbose = False - onlyenums = False - onlyobjdefs = False - separate = False - modulename = None - defsfilter = None - opts, args = getopt.getopt(args[1:], 'vs:m:f:', - ['onlyenums', 'onlyobjdefs', - 'modulename=', 'separate=', - 'defsfilter=']) - for o, v in opts: - if o == '-v': - verbose = True - if o == '--onlyenums': - onlyenums = True - if o == '--onlyobjdefs': - onlyobjdefs = True - if o in ('-s', '--separate'): - separate = v - if o in ('-m', '--modulename'): - modulename = v - if o in ('-f', '--defsfilter'): - defsfilter = v - - if not args[0:1]: - print 'Must specify at least one input file name' - return -1 - - # read all the object definitions in - objdefs = [] - enums = [] - for filename in args: - buf = open(filename).read() - find_obj_defs(buf, objdefs) - find_enum_defs(buf, enums) - objdefs = sort_obj_defs(objdefs) - - if separate: - methods = file(separate + '.defs', 'w') - types = file(separate + '-types.defs', 'w') - - dw = DefsWriter(methods, prefix=modulename, verbose=verbose, - defsfilter=defsfilter) - dw.write_obj_defs(objdefs, types) - dw.write_enum_defs(enums, types) - print "Wrote %s-types.defs" % separate - - for filename in args: - dw.write_def(filename) - print "Wrote %s.defs" % separate - else: - dw = DefsWriter(prefix=modulename, verbose=verbose, - defsfilter=defsfilter) - - if onlyenums: - dw.write_enum_defs(enums) - elif onlyobjdefs: - dw.write_obj_defs(objdefs) - else: - dw.write_obj_defs(objdefs) - dw.write_enum_defs(enums) - - for filename in args: - dw.write_def(filename) - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/codegen/mergedefs.py b/codegen/mergedefs.py deleted file mode 100755 index 773e499b..00000000 --- a/codegen/mergedefs.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/env python -# -*- Mode: Python; py-indent-offset: 4 -*- - -import optparse - -import defsparser - -parser = optparse.OptionParser( - usage="usage: %prog [options] generated-defs old-defs") -parser.add_option("-p", "--merge-parameters", - help="Merge changes in function/methods parameter lists", - action="store_true", dest="parmerge", default=False) -(options, args) = parser.parse_args() - -if len(args) != 2: - parser.error("wrong number of arguments") - -newp = defsparser.DefsParser(args[0]) -oldp = defsparser.DefsParser(args[1]) - -newp.startParsing() -oldp.startParsing() - -newp.merge(oldp, options.parmerge) - -newp.write_defs() diff --git a/codegen/missingdefs.py b/codegen/missingdefs.py deleted file mode 100755 index f0017e73..00000000 --- a/codegen/missingdefs.py +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env python -# -*- Mode: Python; py-indent-offset: 4 -*- - -import sys -import defsparser - -if len(sys.argv) < 3: - sys.stderr.write("Usage: missingdefs.py generated-defs old-defs\n") - sys.exit(1) - -newp = defsparser.DefsParser(sys.argv[1]) -oldp = defsparser.DefsParser(sys.argv[2]) - -newp.startParsing() -oldp.startParsing() - -newp.printMissing(oldp) diff --git a/codegen/mkskel.py b/codegen/mkskel.py deleted file mode 100755 index 61f520bf..00000000 --- a/codegen/mkskel.py +++ /dev/null @@ -1,89 +0,0 @@ -#!/usr/bin/env python -# -*- Mode: Python; py-indent-offset: 4 -*- - -import sys, os, getopt - -module_init_template = \ -'/* -*- Mode: C; c-basic-offset: 4 -*- */\n' + \ -'#ifdef HAVE_CONFIG_H\n' + \ -'# include "config.h"\n' + \ -'#endif\n' + \ -'#include \n' + \ -'#include \n' + \ -'\n' + \ -'/* include any extra headers needed here */\n' + \ -'\n' + \ -'void %(prefix)s_register_classes(PyObject *d);\n' + \ -'extern PyMethodDef %(prefix)s_functions[];\n' + \ -'\n' + \ -'DL_EXPORT(void)\n' + \ -'init%(module)s(void)\n' + \ -'{\n' + \ -' PyObject *m, *d;\n' + \ -'\n' + \ -' /* perform any initialisation required by the library here */\n' + \ -'\n' + \ -' m = Py_InitModule("%(module)s", %(prefix)s_functions);\n' + \ -' d = PyModule_GetDict(m);\n' + \ -'\n' + \ -' init_pygtk();\n' + \ -'\n' + \ -' %(prefix)s_register_classes(d);\n' + \ -'\n' + \ -' /* add anything else to the module dictionary (such as constants) */\n' +\ -'\n' + \ -' if (PyErr_Occurred())\n' + \ -' Py_FatalError("could not initialise module %(module)s");\n' + \ -'}\n' - -override_template = \ -'/* -*- Mode: C; c-basic-offset: 4 -*- */\n' + \ -'%%%%\n' + \ -'headers\n' + \ -'/* include any required headers here */\n' + \ -'%%%%\n' + \ -'init\n' + \ -' /* include any code here that needs to be executed before the\n' + \ -' * extension classes get initialised */\n' + \ -'%%%%\n' + \ -'\n' + \ -'/* you should add appropriate ignore, ignore-glob and\n' + \ -' * override sections here */\n' - -def open_with_backup(file): - if os.path.exists(file): - try: - os.rename(file, file+'~') - except OSError: - # fail silently if we can't make a backup - pass - return open(file, 'w') - -def write_skels(fileprefix, prefix, module): - fp = open_with_backup(fileprefix+'module.c') - fp.write(module_init_template % { 'prefix': prefix, 'module': module }) - fp.close() - fp = open_with_backup(fileprefix+'.override') - fp.write(override_template % { 'prefix': prefix, 'module': module }) - fp.close() - -if __name__ == '__main__': - opts, args = getopt.getopt(sys.argv[1:], 'f:p:m:h', - ['file-prefix=', 'prefix=', 'module=', 'help']) - fileprefix = None - prefix = None - module = None - for opt, arg in opts: - if opt in ('-f', '--file-prefix'): - fileprefix = arg - elif opt in ('-p', '--prefix'): - prefix = arg - elif opt in ('-m', '--module'): - module = arg - elif opt in ('-h', '--help'): - print 'usage: mkskel.py -f fileprefix -p prefix -m module' - sys.exit(0) - if not fileprefix or not prefix or not module: - print 'usage: mkskel.py -f fileprefix -p prefix -m module' - sys.exit(1) - write_skels(fileprefix, prefix, module) diff --git a/codegen/override.py b/codegen/override.py deleted file mode 100644 index c4d5ffa2..00000000 --- a/codegen/override.py +++ /dev/null @@ -1,281 +0,0 @@ -# -*- Mode: Python; py-indent-offset: 4 -*- - -# this file contains code for loading up an override file. The override file -# provides implementations of functions where the code generator could not -# do its job correctly. - -import fnmatch -import os -import re -import string -import sys - -def class2cname(klass, method): - c_name = '' - for c in klass: - if c.isupper(): - c_name += '_' + c.lower() - else: - c_name += c - return c_name[1:] + '_' + method - -import_pat = re.compile(r'\s*import\s+(\S+)\.([^\s.]+)\s+as\s+(\S+)') - -class Overrides: - def __init__(self, filename=None): - self.modulename = None - self.ignores = {} - self.glob_ignores = [] - self.type_ignores = {} - self.overrides = {} - self.overridden = {} - self.kwargs = {} - self.noargs = {} - self.onearg = {} - self.staticmethod = {} - self.classmethod = {} - self.startlines = {} - self.override_attrs = {} - self.override_slots = {} - self.headers = '' - self.body = '' - self.init = '' - self.imports = [] - self.defines = {} - self.functions = {} - self.newstyle_constructors = {} - self.dynamicnamespace = False - if filename: - self.handle_file(filename) - - def handle_file(self, filename): - oldpath = os.getcwd() - - fp = open(filename, 'r') - dirname = os.path.dirname(os.path.abspath(filename)) - - if dirname != oldpath: - os.chdir(dirname) - - # read all the components of the file ... - bufs = [] - startline = 1 - lines = [] - line = fp.readline() - linenum = 1 - while line: - if line == '%%\n' or line == '%%': - if lines: - bufs.append((string.join(lines, ''), startline)) - startline = linenum + 1 - lines = [] - else: - lines.append(line) - line = fp.readline() - linenum = linenum + 1 - if lines: - bufs.append((string.join(lines, ''), startline)) - if not bufs: return - - for buf, startline in bufs: - self.__parse_override(buf, startline, filename) - - os.chdir(oldpath) - - def __parse_override(self, buffer, startline, filename): - pos = string.find(buffer, '\n') - if pos >= 0: - line = buffer[:pos] - rest = buffer[pos+1:] - else: - line = buffer ; rest = '' - words = string.split(line) - command = words[0] - if (command == 'ignore' or - command == 'ignore-' + sys.platform): - "ignore/ignore-platform [functions..]" - for func in words[1:]: - self.ignores[func] = 1 - for func in string.split(rest): - self.ignores[func] = 1 - elif (command == 'ignore-glob' or - command == 'ignore-glob-' + sys.platform): - "ignore-glob/ignore-glob-platform [globs..]" - for func in words[1:]: - self.glob_ignores.append(func) - for func in string.split(rest): - self.glob_ignores.append(func) - elif (command == 'ignore-type' or - command == 'ignore-type-' + sys.platform): - "ignore-type/ignore-type-platform [typenames..]" - for typename in words[1:]: - self.type_ignores[typename] = 1 - for typename in string.split(rest): - self.type_ignores[typename] = 1 - elif command == 'override': - "override function/method [kwargs|noargs|onearg] [staticmethod|classmethod]" - func = words[1] - if 'kwargs' in words[1:]: - self.kwargs[func] = 1 - elif 'noargs' in words[1:]: - self.noargs[func] = 1 - elif 'onearg' in words[1:]: - self.onearg[func] = True - - if 'staticmethod' in words[1:]: - self.staticmethod[func] = True - elif 'classmethod' in words[1:]: - self.classmethod[func] = True - if func in self.overrides: - raise RuntimeError("Function %s is being overridden more than once" % (func,)) - self.overrides[func] = rest - self.startlines[func] = (startline + 1, filename) - elif command == 'override-attr': - "override-slot Class.attr" - attr = words[1] - self.override_attrs[attr] = rest - self.startlines[attr] = (startline + 1, filename) - elif command == 'override-slot': - "override-slot Class.slot" - slot = words[1] - self.override_slots[slot] = rest - self.startlines[slot] = (startline + 1, filename) - elif command == 'headers': - "headers" - self.headers = '%s\n#line %d "%s"\n%s' % \ - (self.headers, startline + 1, filename, rest) - elif command == 'body': - "body" - self.body = '%s\n#line %d "%s"\n%s' % \ - (self.body, startline + 1, filename, rest) - elif command == 'init': - "init" - self.init = '%s\n#line %d "%s"\n%s' % \ - (self.init, startline + 1, filename, rest) - elif command == 'modulename': - "modulename name" - self.modulename = words[1] - elif command == 'include': - "include filename" - for filename in words[1:]: - self.handle_file(filename) - for filename in string.split(rest): - self.handle_file(filename) - elif command == 'import': - "import module1 [\n module2, \n module3 ...]" - for line in string.split(buffer, '\n'): - match = import_pat.match(line) - if match: - self.imports.append(match.groups()) - elif command == 'define': - "define funcname [kwargs|noargs|onearg] [classmethod|staticmethod]" - "define Class.method [kwargs|noargs|onearg] [classmethod|staticmethod]" - func = words[1] - klass = None - if func.find('.') != -1: - klass, func = func.split('.', 1) - - if not self.defines.has_key(klass): - self.defines[klass] = {} - self.defines[klass][func] = rest - else: - self.functions[func] = rest - - if 'kwargs' in words[1:]: - self.kwargs[func] = 1 - elif 'noargs' in words[1:]: - self.noargs[func] = 1 - elif 'onearg' in words[1:]: - self.onearg[func] = 1 - - if 'staticmethod' in words[1:]: - self.staticmethod[func] = True - elif 'classmethod' in words[1:]: - self.classmethod[func] = True - - self.startlines[func] = (startline + 1, filename) - - elif command == 'new-constructor': - "new-constructor GType" - gtype, = words[1:] - self.newstyle_constructors[gtype] = True - elif command == 'options': - for option in words[1:]: - if option == 'dynamicnamespace': - self.dynamicnamespace = True - - def is_ignored(self, name): - if self.ignores.has_key(name): - return 1 - for glob in self.glob_ignores: - if fnmatch.fnmatchcase(name, glob): - return 1 - return 0 - - def is_type_ignored(self, name): - return name in self.type_ignores - - def is_overriden(self, name): - return self.overrides.has_key(name) - - def is_already_included(self, name): - return self.overridden.has_key(name) - - def override(self, name): - self.overridden[name] = 1 - return self.overrides[name] - - def define(self, klass, name): - self.overridden[class2cname(klass, name)] = 1 - return self.defines[klass][name] - - def function(self, name): - return self.functions[name] - - def getstartline(self, name): - return self.startlines[name] - - def wants_kwargs(self, name): - return self.kwargs.has_key(name) - - def wants_noargs(self, name): - return self.noargs.has_key(name) - - def wants_onearg(self, name): - return self.onearg.has_key(name) - - def is_staticmethod(self, name): - return self.staticmethod.has_key(name) - - def is_classmethod(self, name): - return self.classmethod.has_key(name) - - def attr_is_overriden(self, attr): - return self.override_attrs.has_key(attr) - - def attr_override(self, attr): - return self.override_attrs[attr] - - def slot_is_overriden(self, slot): - return self.override_slots.has_key(slot) - - def slot_override(self, slot): - return self.override_slots[slot] - - def get_headers(self): - return self.headers - - def get_body(self): - return self.body - - def get_init(self): - return self.init - - def get_imports(self): - return self.imports - - def get_defines_for(self, klass): - return self.defines.get(klass, {}) - - def get_functions(self): - return self.functions diff --git a/codegen/pygtk-codegen-2.0.in b/codegen/pygtk-codegen-2.0.in deleted file mode 100644 index 95b547ac..00000000 --- a/codegen/pygtk-codegen-2.0.in +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -prefix=@prefix@ -datarootdir=@datarootdir@ -datadir=@datadir@ -codegendir=${datadir}/pygtk/2.0/codegen - -PYTHONPATH=$codegendir -export PYTHONPATH - -exec @PYTHON@ $codegendir/codegen.py "$@" diff --git a/codegen/reversewrapper.py b/codegen/reversewrapper.py deleted file mode 100644 index 2a7b6414..00000000 --- a/codegen/reversewrapper.py +++ /dev/null @@ -1,851 +0,0 @@ -### -*- python -*- -### Code to generate "Reverse Wrappers", i.e. C->Python wrappers -### (C) 2004 Gustavo Carneiro -import argtypes -import os - -DEBUG_MODE = ('PYGTK_CODEGEN_DEBUG' in os.environ) - -def join_ctype_name(ctype, name): - '''Joins a C type and a variable name into a single string''' - if ctype[-1] != '*': - return " ".join((ctype, name)) - else: - return "".join((ctype, name)) - - -class CodeSink(object): - def __init__(self): - self.indent_level = 0 # current indent level - self.indent_stack = [] # previous indent levels - - def _format_code(self, code): - assert isinstance(code, str) - l = [] - for line in code.split('\n'): - l.append(' '*self.indent_level + line) - if l[-1]: - l.append('') - return '\n'.join(l) - - def writeln(self, line=''): - raise NotImplementedError - - def indent(self, level=4): - '''Add a certain ammount of indentation to all lines written - from now on and until unindent() is called''' - self.indent_stack.append(self.indent_level) - self.indent_level += level - - def unindent(self): - '''Revert indentation level to the value before last indent() call''' - self.indent_level = self.indent_stack.pop() - - -class FileCodeSink(CodeSink): - def __init__(self, fp): - CodeSink.__init__(self) - assert isinstance(fp, file) - self.fp = fp - - def writeln(self, line=''): - self.fp.write(self._format_code(line)) - -class MemoryCodeSink(CodeSink): - def __init__(self): - CodeSink.__init__(self) - self.lines = [] - - def writeln(self, line=''): - self.lines.append(self._format_code(line)) - - def flush_to(self, sink): - assert isinstance(sink, CodeSink) - for line in self.lines: - sink.writeln(line.rstrip()) - self.lines = [] - - def flush(self): - l = [] - for line in self.lines: - l.append(self._format_code(line)) - self.lines = [] - return "".join(l) - -class ReverseWrapper(object): - '''Object that generates a C->Python wrapper''' - def __init__(self, cname, is_static=True): - assert isinstance(cname, str) - - self.cname = cname - ## function object we will call, or object whose method we will call - self.called_pyobj = None - ## name of method of self.called_pyobj we will call - self.method_name = None - self.is_static = is_static - - self.parameters = [] - self.declarations = MemoryCodeSink() - self.post_return_code = MemoryCodeSink() - self.body = MemoryCodeSink() - self.cleanup_actions = [] - self.pyargv_items = [] - self.pyargv_optional_items = [] - self.pyret_parse_items = [] # list of (format_spec, parameter) - - def set_call_target(self, called_pyobj, method_name=None): - assert called_pyobj is not None - assert self.called_pyobj is None - self.called_pyobj = called_pyobj - self.method_name = method_name - - def set_return_type(self, return_type): - assert isinstance(return_type, ReturnType) - self.return_type = return_type - - def add_parameter(self, param): - assert isinstance(param, Parameter) - self.parameters.append(param) - - def add_declaration(self, decl_code): - self.declarations.writeln(decl_code) - - def add_pyargv_item(self, variable, optional=False): - if optional: - self.pyargv_optional_items.append(variable) - else: - self.pyargv_items.append(variable) - - def add_pyret_parse_item(self, format_specifier, parameter, prepend=False): - if prepend: - self.pyret_parse_items.insert(0, (format_specifier, parameter)) - else: - self.pyret_parse_items.append((format_specifier, parameter)) - - def write_code(self, code, - cleanup=None, - failure_expression=None, - failure_cleanup=None, - failure_exception=None, - code_sink=None): - '''Add a chunk of code with cleanup and error handling - - This method is to be used by TypeHandlers when generating code - - Keywork arguments: - code -- code to add - cleanup -- code to cleanup any dynamic resources created by @code - (except in case of failure) (default None) - failure_expression -- C boolean expression to indicate - if anything failed (default None) - failure_cleanup -- code to cleanup any dynamic resources - created by @code in case of failure (default None) - failure_exception -- code to raise an exception in case of - failure (which will be immediately - printed and cleared), (default None) - code_sink -- "code sink" to use; by default, - ReverseWrapper.body is used, which writes the - main body of the wrapper, before calling the - python method. Alternatively, - ReverseWrapper.after_pyret_parse can be used, to - write code after the PyArg_ParseTuple that - parses the python method return value. - ''' - if code_sink is None: - code_sink = self.body - if code is not None: - code_sink.writeln(code) - if failure_expression is not None: - code_sink.writeln("if (%s) {" % (failure_expression,)) - code_sink.indent() - if failure_exception is None: - code_sink.writeln("if (PyErr_Occurred())") - code_sink.indent() - code_sink.writeln("PyErr_Print();") - code_sink.unindent() - else: - code_sink.writeln(failure_exception) - code_sink.writeln("PyErr_Print();") - if failure_cleanup is not None: - code_sink.writeln(failure_cleanup) - for cleanup_action in self.cleanup_actions: - code_sink.writeln(cleanup_action) - self.return_type.write_error_return() - code_sink.unindent() - code_sink.writeln("}") - if cleanup is not None: - self.cleanup_actions.insert(0, cleanup) - - def generate(self, sink): - '''Generate the code into a CodeSink object''' - assert isinstance(sink, CodeSink) - - if DEBUG_MODE: - self.declarations.writeln("/* begin declarations */") - self.body.writeln("/* begin main body */") - self.post_return_code.writeln("/* begin post-return code */") - - self.add_declaration("PyGILState_STATE __py_state;") - self.write_code(code="__py_state = pyg_gil_state_ensure();", - cleanup="pyg_gil_state_release(__py_state);") - - for param in self.parameters: - param.convert_c2py() - - assert self.called_pyobj is not None,\ - "Parameters failed to provide a target function or method." - - if self.is_static: - sink.writeln('static %s' % self.return_type.get_c_type()) - else: - sink.writeln(self.return_type.get_c_type()) - c_proto_params = map(Parameter.format_for_c_proto, self.parameters) - sink.writeln("%s(%s)\n{" % (self.cname, ", ".join(c_proto_params))) - - self.return_type.write_decl() - self.add_declaration("PyObject *py_retval;") - - ## Handle number of arguments - if self.pyargv_items: - self.add_declaration("PyObject *py_args;") - py_args = "py_args" - if self.pyargv_optional_items: - self.add_declaration("int argc = %i;" % len(self.pyargv_items)) - argc = "argc" - for arg in self.pyargv_optional_items: - self.body.writeln("if (%s)" % arg) - self.body.indent() - self.body.writeln("++argc;") - self.body.unindent() - else: - argc = str(len(self.pyargv_items)) - else: - if self.pyargv_optional_items: - self.add_declaration("PyObject *py_args;") - py_args = "py_args" - self.add_declaration("int argc = 0;") - argc = "argc" - for arg in self.pyargv_optional_items: - self.body.writeln("if (%s)" % arg) - self.body.indent() - self.body.writeln("++argc;") - self.body.unindent() - else: - py_args = "NULL" - argc = None - - self.body.writeln() - - if py_args != "NULL": - self.write_code("py_args = PyTuple_New(%s);" % argc, - cleanup="Py_DECREF(py_args);") - pos = 0 - for arg in self.pyargv_items: - try: # try to remove the Py_DECREF cleanup action, if we can - self.cleanup_actions.remove("Py_DECREF(%s);" % arg) - except ValueError: # otherwise we have to Py_INCREF.. - self.body.writeln("Py_INCREF(%s);" % arg) - self.body.writeln("PyTuple_SET_ITEM(%s, %i, %s);" % (py_args, pos, arg)) - pos += 1 - for arg in self.pyargv_optional_items: - self.body.writeln("if (%s) {" % arg) - self.body.indent() - try: # try to remove the Py_DECREF cleanup action, if we can - self.cleanup_actions.remove("Py_XDECREF(%s);" % arg) - except ValueError: # otherwise we have to Py_INCREF.. - self.body.writeln("Py_INCREF(%s);" % arg) - self.body.writeln("PyTuple_SET_ITEM(%s, %i, %s);" % (py_args, pos, arg)) - self.body.unindent() - self.body.writeln("}") - pos += 1 - - self.body.writeln() - - ## Call the python method - if self.method_name is None: - self.write_code("py_retval = PyObject_Call(%s, %s);" - % (self.called_pyobj, py_args), - cleanup="Py_DECREF(py_retval);", - failure_expression="!py_retval") - else: - self.add_declaration("PyObject *py_method;") - self.write_code("py_method = PyObject_GetAttrString(%s, \"%s\");" - % (self.called_pyobj, self.method_name), - cleanup="Py_DECREF(py_method);", - failure_expression="!py_method") - self.write_code("py_retval = PyObject_CallObject(py_method, %s);" - % (py_args,), - cleanup="Py_DECREF(py_retval);", - failure_expression="!py_retval") - - ## -- Handle the return value -- - - ## we need to check if the return_type object is prepared to cooperate with multiple return values - len_before = len(self.pyret_parse_items) - self.return_type.write_conversion() - len_after = len(self.pyret_parse_items) - assert (self.return_type.get_c_type() == 'void' - or not (len_before == len_after and len_after > 0)),\ - ("Bug in reverse wrappers: return type handler %s" - " is not prepared to cooperate multiple return values") % (type(self.return_type),) - - sink.indent() - - if len(self.pyret_parse_items) == 1: - ## if retval is one item only, pack it in a tuple so we - ## can use PyArg_ParseTuple as usual.. - self.write_code('py_retval = Py_BuildValue("(N)", py_retval);') - if len(self.pyret_parse_items) > 0: - ## Parse return values using PyArg_ParseTuple - self.write_code(code=None, failure_expression=( - '!PyArg_ParseTuple(py_retval, "%s", %s)' % ( - "".join([format for format, param in self.pyret_parse_items]), - ", ".join([param for format, param in self.pyret_parse_items])))) - - if DEBUG_MODE: - self.declarations.writeln("/* end declarations */") - self.declarations.flush_to(sink) - sink.writeln() - if DEBUG_MODE: - self.body.writeln("/* end main body */") - self.body.flush_to(sink) - sink.writeln() - if DEBUG_MODE: - self.post_return_code.writeln("/* end post-return code */") - self.post_return_code.flush_to(sink) - sink.writeln() - - for cleanup_action in self.cleanup_actions: - sink.writeln(cleanup_action) - if self.return_type.get_c_type() != 'void': - sink.writeln() - sink.writeln("return retval;") - sink.unindent() - sink.writeln("}") - -class TypeHandler(object): - def __init__(self, wrapper, **props): - assert isinstance(wrapper, ReverseWrapper) - self.wrapper = wrapper - self.props = props - -class ReturnType(TypeHandler): - - def get_c_type(self): - raise NotImplementedError - - def write_decl(self): - raise NotImplementedError - - def write_error_return(self): - '''Write "return " code in case of error''' - raise NotImplementedError - - def write_conversion(self): - '''Writes code to convert Python return value in 'py_retval' - into C 'retval'. Returns a string with C boolean expression - that determines if anything went wrong. ''' - raise NotImplementedError - -class Parameter(TypeHandler): - - def __init__(self, wrapper, name, **props): - TypeHandler.__init__(self, wrapper, **props) - self.name = name - - def get_c_type(self): - raise NotImplementedError - - def convert_c2py(self): - '''Write some code before calling the Python method.''' - pass - - def format_for_c_proto(self): - return join_ctype_name(self.get_c_type(), self.name) - - -###--- -class StringParam(Parameter): - - def get_c_type(self): - return self.props.get('c_type', 'char *').replace('const-', 'const ') - - def convert_c2py(self): - if self.props.get('optional', False): - self.wrapper.add_declaration("PyObject *py_%s = NULL;" % self.name) - self.wrapper.write_code(code=("if (%s)\n" - " py_%s = PyString_FromString(%s);\n" - % (self.name, self.name, self.name)), - cleanup=("Py_XDECREF(py_%s);" % self.name)) - self.wrapper.add_pyargv_item("py_%s" % self.name, optional=True) - else: - self.wrapper.add_declaration("PyObject *py_%s;" % self.name) - self.wrapper.write_code(code=("py_%s = PyString_FromString(%s);" % - (self.name, self.name)), - cleanup=("Py_DECREF(py_%s);" % self.name), - failure_expression=("!py_%s" % self.name)) - self.wrapper.add_pyargv_item("py_%s" % self.name) - -for ctype in ('char*', 'gchar*', 'const-char*', 'char-const*', 'const-gchar*', - 'gchar-const*', 'string', 'static_string'): - argtypes.matcher.register_reverse(ctype, StringParam) -del ctype - -class StringReturn(ReturnType): - - def get_c_type(self): - return self.props.get('c_type', 'char *').replace('const-', 'const ') - #return "char *" - - def write_decl(self): - self.wrapper.add_declaration("%s retval;" % self.get_c_type()) - #self.wrapper.add_declaration("char *retval;") - - def write_error_return(self): - self.wrapper.write_code("return NULL;") - - def write_conversion(self): - self.wrapper.add_pyret_parse_item("s", "&retval", prepend=True) - self.wrapper.write_code("retval = g_strdup(retval);", code_sink=self.wrapper.post_return_code) - -for ctype in ('char*', 'gchar*', 'const-gchar*'): - argtypes.matcher.register_reverse_ret(ctype, StringReturn) -del ctype - - -class VoidReturn(ReturnType): - - def get_c_type(self): - return "void" - - def write_decl(self): - pass - - def write_error_return(self): - self.wrapper.write_code("return;") - - def write_conversion(self): - self.wrapper.write_code( - code=None, - failure_expression="py_retval != Py_None", - failure_exception='PyErr_SetString(PyExc_TypeError, "retval should be None");') - -argtypes.matcher.register_reverse_ret('void', VoidReturn) -argtypes.matcher.register_reverse_ret('none', VoidReturn) - -class GObjectParam(Parameter): - - def get_c_type(self): - return self.props.get('c_type', 'GObject *') - - def convert_c2py(self): - self.wrapper.add_declaration("PyObject *py_%s = NULL;" % self.name) - self.wrapper.write_code(code=("if (%s)\n" - " py_%s = pygobject_new((GObject *) %s);\n" - "else {\n" - " Py_INCREF(Py_None);\n" - " py_%s = Py_None;\n" - "}" - % (self.name, self.name, self.name, self.name)), - cleanup=("Py_DECREF(py_%s);" % self.name)) - self.wrapper.add_pyargv_item("py_%s" % self.name) - -argtypes.matcher.register_reverse('GObject*', GObjectParam) - -class GObjectReturn(ReturnType): - - def get_c_type(self): - return self.props.get('c_type', 'GObject *') - - def write_decl(self): - self.wrapper.add_declaration("%s retval;" % self.get_c_type()) - - def write_error_return(self): - self.wrapper.write_code("return NULL;") - - def write_conversion(self): - self.wrapper.write_code( - code=None, - failure_expression="!PyObject_TypeCheck(py_retval, &PyGObject_Type)", - failure_exception='PyErr_SetString(PyExc_TypeError, "retval should be a GObject");') - self.wrapper.write_code("retval = (%s) pygobject_get(py_retval);" - % self.get_c_type()) - self.wrapper.write_code("g_object_ref((GObject *) retval);") - -argtypes.matcher.register_reverse_ret('GObject*', GObjectReturn) - - - -class IntParam(Parameter): - - def get_c_type(self): - return self.props.get('c_type', 'int') - - def convert_c2py(self): - self.wrapper.add_declaration("PyObject *py_%s;" % self.name) - self.wrapper.write_code(code=("py_%s = PyInt_FromLong(%s);" % - (self.name, self.name)), - cleanup=("Py_DECREF(py_%s);" % self.name)) - self.wrapper.add_pyargv_item("py_%s" % self.name) - -class IntReturn(ReturnType): - def get_c_type(self): - return self.props.get('c_type', 'int') - def write_decl(self): - self.wrapper.add_declaration("%s retval;" % self.get_c_type()) - def write_error_return(self): - self.wrapper.write_code("return -G_MAXINT;") - def write_conversion(self): - self.wrapper.add_pyret_parse_item("i", "&retval", prepend=True) - -for argtype in ('int', 'gint', 'guint', 'short', 'gshort', 'gushort', 'long', - 'glong', 'gsize', 'gssize', 'guint8', 'gint8', 'guint16', - 'gint16', 'gint32', 'GTime'): - argtypes.matcher.register_reverse(argtype, IntParam) - argtypes.matcher.register_reverse_ret(argtype, IntReturn) -del argtype - -class IntPtrParam(Parameter): - def __init__(self, wrapper, name, **props): - if "direction" not in props: - raise argtypes.ArgTypeConfigurationError( - "cannot use int* parameter without direction") - if props["direction"] not in ("out", "inout"): - raise argtypes.ArgTypeConfigurationError( - "cannot use int* parameter with direction '%s'" - % (props["direction"],)) - Parameter.__init__(self, wrapper, name, **props) - def get_c_type(self): - return self.props.get('c_type', 'int*') - def convert_c2py(self): - if self.props["direction"] == "inout": - self.wrapper.add_declaration("PyObject *py_%s;" % self.name) - self.wrapper.write_code(code=("py_%s = PyInt_FromLong(*%s);" % - (self.name, self.name)), - cleanup=("Py_DECREF(py_%s);" % self.name)) - self.wrapper.add_pyargv_item("py_%s" % self.name) - self.wrapper.add_pyret_parse_item("i", self.name) -for argtype in ('int*', 'gint*'): - argtypes.matcher.register_reverse(argtype, IntPtrParam) -del argtype - - -class GEnumReturn(IntReturn): - def write_conversion(self): - self.wrapper.write_code( - code=None, - failure_expression=( - "pyg_enum_get_value(%s, py_retval, (gint *)&retval)" - % (self.props['typecode'],))) - -argtypes.matcher.register_reverse_ret("GEnum", GEnumReturn) - -class GEnumParam(IntParam): - def convert_c2py(self): - self.wrapper.add_declaration("PyObject *py_%s;" % self.name) - self.wrapper.write_code(code=("py_%s = pyg_enum_from_gtype(%s, %s);" % - (self.name, self.props['typecode'], self.name)), - cleanup=("Py_DECREF(py_%s);" % self.name), - failure_expression=("!py_%s" % self.name)) - self.wrapper.add_pyargv_item("py_%s" % self.name) - -argtypes.matcher.register_reverse("GEnum", GEnumParam) - -class GFlagsReturn(IntReturn): - def write_conversion(self): - self.wrapper.write_code( - code=None, - failure_expression=( - "pyg_flags_get_value(%s, py_retval, (gint *)&retval)" % - self.props['typecode'])) - -argtypes.matcher.register_reverse_ret("GFlags", GFlagsReturn) - -class GFlagsParam(IntParam): - def convert_c2py(self): - self.wrapper.add_declaration("PyObject *py_%s;" % self.name) - self.wrapper.write_code(code=( - "py_%s = pyg_flags_from_gtype(%s, %s);" % - (self.name, self.props['typecode'], self.name)), - cleanup=("Py_DECREF(py_%s);" % self.name), - failure_expression=("!py_%s" % self.name)) - self.wrapper.add_pyargv_item("py_%s" % self.name) - -argtypes.matcher.register_reverse("GFlags", GFlagsParam) - - -class GtkTreePathParam(IntParam): - def convert_c2py(self): - self.wrapper.add_declaration("PyObject *py_%s;" % self.name) - self.wrapper.write_code(code=( - "py_%s = pygtk_tree_path_to_pyobject(%s);" % - (self.name, self.name)), - cleanup=("Py_DECREF(py_%s);" % self.name), - failure_expression=("!py_%s" % self.name)) - self.wrapper.add_pyargv_item("py_%s" % self.name) - -argtypes.matcher.register_reverse("GtkTreePath*", GtkTreePathParam) - - -class GtkTreePathReturn(ReturnType): - def get_c_type(self): - return self.props.get('c_type', 'GtkTreePath *') - def write_decl(self): - self.wrapper.add_declaration("GtkTreePath * retval;") - def write_error_return(self): - self.wrapper.write_code("return NULL;") - def write_conversion(self): - self.wrapper.write_code( - "retval = pygtk_tree_path_from_pyobject(py_retval);\n", - failure_expression=('!retval'), - failure_exception=( - 'PyErr_SetString(PyExc_TypeError, "retval should be a GtkTreePath");')) - -argtypes.matcher.register_reverse_ret("GtkTreePath*", GtkTreePathReturn) - - -class BooleanReturn(ReturnType): - def get_c_type(self): - return "gboolean" - def write_decl(self): - self.wrapper.add_declaration("gboolean retval;") - self.wrapper.add_declaration("PyObject *py_main_retval;") - def write_error_return(self): - self.wrapper.write_code("return FALSE;") - def write_conversion(self): - self.wrapper.add_pyret_parse_item("O", "&py_main_retval", prepend=True) - self.wrapper.write_code( - "retval = PyObject_IsTrue(py_main_retval)? TRUE : FALSE;", - code_sink=self.wrapper.post_return_code) -argtypes.matcher.register_reverse_ret("gboolean", BooleanReturn) - -class BooleanParam(Parameter): - def get_c_type(self): - return "gboolean" - def convert_c2py(self): - self.wrapper.add_declaration("PyObject *py_%s;" % self.name) - self.wrapper.write_code("py_%s = %s? Py_True : Py_False;" - % (self.name, self.name)) - self.wrapper.add_pyargv_item("py_%s" % self.name) - -argtypes.matcher.register_reverse("gboolean", BooleanParam) - - -class DoubleParam(Parameter): - def get_c_type(self): - return self.props.get('c_type', 'gdouble') - def convert_c2py(self): - self.wrapper.add_declaration("PyObject *py_%s;" % self.name) - self.wrapper.write_code(code=("py_%s = PyFloat_FromDouble(%s);" % - (self.name, self.name)), - cleanup=("Py_DECREF(py_%s);" % self.name)) - self.wrapper.add_pyargv_item("py_%s" % self.name) - -class DoublePtrParam(Parameter): - def __init__(self, wrapper, name, **props): - if "direction" not in props: - raise argtypes.ArgTypeConfigurationError( - "cannot use double* parameter without direction") - if props["direction"] not in ("out", ): # inout not yet implemented - raise argtypes.ArgTypeConfigurationError( - "cannot use double* parameter with direction '%s'" - % (props["direction"],)) - Parameter.__init__(self, wrapper, name, **props) - def get_c_type(self): - return self.props.get('c_type', 'double*') - def convert_c2py(self): - self.wrapper.add_pyret_parse_item("d", self.name) -for argtype in ('double*', 'gdouble*'): - argtypes.matcher.register_reverse(argtype, DoublePtrParam) -del argtype - -class DoubleReturn(ReturnType): - def get_c_type(self): - return self.props.get('c_type', 'gdouble') - def write_decl(self): - self.wrapper.add_declaration("%s retval;" % self.get_c_type()) - def write_error_return(self): - self.wrapper.write_code("return -G_MAXFLOAT;") - def write_conversion(self): - self.wrapper.write_code( - code=None, - failure_expression="!PyFloat_AsDouble(py_retval)", - failure_exception= - 'PyErr_SetString(PyExc_TypeError, "retval should be a float");') - self.wrapper.write_code("retval = PyFloat_AsDouble(py_retval);") - -for argtype in ('float', 'double', 'gfloat', 'gdouble'): - argtypes.matcher.register_reverse(argtype, DoubleParam) - argtypes.matcher.register_reverse_ret(argtype, DoubleReturn) - - -class GBoxedParam(Parameter): - def get_c_type(self): - return self.props.get('c_type').replace('const-', 'const ') - def convert_c2py(self): - self.wrapper.add_declaration("PyObject *py_%s;" % self.name) - ctype = self.get_c_type() - if ctype.startswith('const '): - ctype_no_const = ctype[len('const '):] - self.wrapper.write_code( - code=('py_%s = pyg_boxed_new(%s, (%s) %s, TRUE, TRUE);' % - (self.name, self.props['typecode'], - ctype_no_const, self.name)), - cleanup=("Py_DECREF(py_%s);" % self.name)) - else: - self.wrapper.write_code( - code=('py_%s = pyg_boxed_new(%s, %s, FALSE, FALSE);' % - (self.name, self.props['typecode'], self.name)), - cleanup=("Py_DECREF(py_%s);" % self.name)) - self.wrapper.add_pyargv_item("py_%s" % self.name) - -argtypes.matcher.register_reverse("GBoxed", GBoxedParam) - - -class GBoxedReturn(ReturnType): - def get_c_type(self): - return self.props.get('c_type') - def write_decl(self): - self.wrapper.add_declaration("%s retval;" % self.get_c_type()) - def write_error_return(self): - self.wrapper.write_code("return retval;") - def write_conversion(self): - self.wrapper.write_code(code = None, - failure_expression=("!pyg_boxed_check(py_retval, %s)" % - (self.props['typecode'],)), - failure_exception=( - 'PyErr_SetString(PyExc_TypeError, "retval should be a %s");' - % (self.props['typename'],))) - self.wrapper.write_code('retval = pyg_boxed_get(py_retval, %s);' % - self.props['typename']) - -argtypes.matcher.register_reverse_ret("GBoxed", GBoxedReturn) - - -class GdkRegionPtrReturn(GBoxedReturn): - def write_error_return(self): - self.wrapper.write_code("return gdk_region_new();") - def write_conversion(self): - self.props['typecode'] = 'PYGDK_TYPE_REGION' - self.props['typename'] = 'GdkRegion' - super(GdkRegionPtrReturn, self).write_conversion() - -argtypes.matcher.register_reverse_ret("GdkRegion*", GdkRegionPtrReturn) - - -class PangoFontDescriptionReturn(GBoxedReturn): - def write_error_return(self): - self.wrapper.write_code("return pango_font_description_new();") - def write_conversion(self): - self.props['typecode'] = 'PANGO_TYPE_FONT_DESCRIPTION' - self.props['typename'] = 'PangoFontDescription' - super(PangoFontDescriptionReturn, self).write_conversion() - -argtypes.matcher.register_reverse_ret("PangoFontDescription*", - PangoFontDescriptionReturn) - - -class PangoFontMetricsReturn(GBoxedReturn): - def write_error_return(self): - self.wrapper.write_code("return pango_font_metrics_new();") - def write_conversion(self): - self.props['typecode'] = 'PANGO_TYPE_FONT_METRICS' - self.props['typename'] = 'PangoFontMetrics' - super(PangoFontMetricsReturn, self).write_conversion() - -argtypes.matcher.register_reverse_ret("PangoFontMetrics*", - PangoFontMetricsReturn) - - -class PangoLanguageReturn(GBoxedReturn): - def write_error_return(self): - self.wrapper.write_code("return pango_language_from_string(\"\");") - def write_conversion(self): - self.props['typecode'] = 'PANGO_TYPE_LANGUAGE' - self.props['typename'] = 'PangoLanguage' - super(PangoLanguageReturn, self).write_conversion() - -argtypes.matcher.register_reverse_ret("PangoLanguage*", PangoLanguageReturn) - - -class GdkRectanglePtrParam(Parameter): - def get_c_type(self): - return self.props.get('c_type').replace('const-', 'const ') - def convert_c2py(self): - self.wrapper.add_declaration("PyObject *py_%s;" % self.name) - self.wrapper.write_code( - code=('py_%s = pyg_boxed_new(GDK_TYPE_RECTANGLE, %s, TRUE, TRUE);' % - (self.name, self.name)), - cleanup=("Py_DECREF(py_%s);" % self.name)) - self.wrapper.add_pyargv_item("py_%s" % self.name) - -argtypes.matcher.register_reverse("GdkRectangle*", GdkRectanglePtrParam) -argtypes.matcher.register_reverse('GtkAllocation*', GdkRectanglePtrParam) - - -class PyGObjectMethodParam(Parameter): - def __init__(self, wrapper, name, method_name, **props): - Parameter.__init__(self, wrapper, name, **props) - self.method_name = method_name - - def get_c_type(self): - return self.props.get('c_type', 'GObject *') - - def convert_c2py(self): - self.wrapper.add_declaration("PyObject *py_%s;" % self.name) - self.wrapper.write_code(code=("py_%s = pygobject_new((GObject *) %s);" % - (self.name, self.name)), - cleanup=("Py_DECREF(py_%s);" % self.name), - failure_expression=("!py_%s" % self.name)) - self.wrapper.set_call_target("py_%s" % self.name, self.method_name) - - -class CallbackInUserDataParam(Parameter): - def __init__(self, wrapper, name, free_it, **props): - Parameter.__init__(self, wrapper, name, **props) - self.free_it = free_it - - def get_c_type(self): - return "gpointer" - - def convert_c2py(self): - self.wrapper.add_declaration("PyObject **_user_data;") - cleanup = self.free_it and ("g_free(%s);" % self.name) or None - self.wrapper.write_code(code=("_real_user_data = (PyObject **) %s;" - % self.name), - cleanup=cleanup) - - self.wrapper.add_declaration("PyObject *py_func;") - cleanup = self.free_it and "Py_DECREF(py_func);" or None - self.wrapper.write_code(code="py_func = _user_data[0];", - cleanup=cleanup) - self.wrapper.set_call_target("py_func") - - self.wrapper.add_declaration("PyObject *py_user_data;") - cleanup = self.free_it and "Py_XDECREF(py_user_data);" or None - self.wrapper.write_code(code="py_user_data = _user_data[1];", - cleanup=cleanup) - self.wrapper.add_pyargv_item("py_user_data", optional=True) - -def _test(): - import sys - - if 1: - wrapper = ReverseWrapper("this_is_the_c_function_name", is_static=True) - wrapper.set_return_type(StringReturn(wrapper)) - wrapper.add_parameter(PyGObjectMethodParam(wrapper, "self", method_name="do_xxx")) - wrapper.add_parameter(StringParam(wrapper, "param2", optional=True)) - wrapper.add_parameter(GObjectParam(wrapper, "param3")) - #wrapper.add_parameter(InoutIntParam(wrapper, "param4")) - wrapper.generate(FileCodeSink(sys.stderr)) - - if 0: - wrapper = ReverseWrapper("this_a_callback_wrapper") - wrapper.set_return_type(VoidReturn(wrapper)) - wrapper.add_parameter(StringParam(wrapper, "param1", optional=False)) - wrapper.add_parameter(GObjectParam(wrapper, "param2")) - wrapper.add_parameter(CallbackInUserDataParam(wrapper, "data", free_it=True)) - wrapper.generate(FileCodeSink(sys.stderr)) - -if __name__ == '__main__': - _test() diff --git a/codegen/scanvirtuals.py b/codegen/scanvirtuals.py deleted file mode 100755 index c108737b..00000000 --- a/codegen/scanvirtuals.py +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env python -import re -import sys - - -def main(): - rx = re.compile(r'^\s*([\w\s\*]+)\(\s*\*\s*(\w+)\s*\)\s*\(([^()]*)\);', - re.DOTALL|re.MULTILINE) - for f in sys.argv[1:]: - #print ";; From", f - buf = file(f).read() - for m in rx.findall(buf): - return_type = m[0].strip() - if 'typedef' in return_type: - continue - if return_type == 'void': - return_type = 'none' - return_type = return_type.replace(' ', '') - virtual_name = m[1] - if 'reserved' in virtual_name: - continue - params = [] - if not m[2]: - print >> sys.stderr, repr(m) - continue - for param in map(str.strip, m[2].split(',')): - if '*' in param: - tokens = param.split('*') - ptype = tokens[0].strip() + '*'*(len(tokens) - 1) - pname = tokens[-1].strip() - else: - if param == 'void': - continue - ptype, pname = map(str.strip, param.split()) - ptype = ptype.replace('const ', 'const-') - while '[]' in pname: - pname = pname.replace('[]', '') - ptype += '[]' - params.append((ptype, pname)) - if not params: - continue - objname = params[0][0].replace('*', '') - print '(define-virtual', virtual_name - print ' (of-object "%s")' % objname - print ' (return-type "%s")' % return_type - if len(params) > 1: - print ' (parameters' - for param in params[1:]: - print ' \'("%s" "%s")' % param - print ' )' - print ')' - -if __name__ == '__main__': - main() diff --git a/codegen/scmexpr.py b/codegen/scmexpr.py deleted file mode 100644 index 02f2e4bf..00000000 --- a/codegen/scmexpr.py +++ /dev/null @@ -1,143 +0,0 @@ -#!/usr/bin/env python -# -*- Mode: Python; py-indent-offset: 4 -*- -from __future__ import generators - -import string -from cStringIO import StringIO - -class error(Exception): - def __init__(self, filename, lineno, msg): - Exception.__init__(self, msg) - self.filename = filename - self.lineno = lineno - self.msg = msg - def __str__(self): - return '%s:%d: error: %s' % (self.filename, self.lineno, self.msg) - -trans = [' '] * 256 -for i in range(256): - if chr(i) in string.letters + string.digits + '_': - trans[i] = chr(i) - else: - trans[i] = '_' -trans = string.join(trans, '') - -def parse(filename): - if isinstance(filename, str): - fp = open(filename, 'r') - else: # if not string, assume it is some kind of iterator - fp = filename - filename = getattr(fp, 'name', '') - whitespace = ' \t\n\r\x0b\x0c' - nonsymbol = whitespace + '();\'"' - stack = [] - openlines = [] - lineno = 0 - for line in fp: - pos = 0 - lineno += 1 - while pos < len(line): - if line[pos] in whitespace: # ignore whitespace - pass - elif line[pos] == ';': # comment - break - elif line[pos:pos+2] == "'(": - pass # the open parenthesis will be handled next iteration - elif line[pos] == '(': - stack.append(()) - openlines.append(lineno) - elif line[pos] == ')': - if len(stack) == 0: - raise error(filename, lineno, 'close parenthesis found when none open') - closed = stack[-1] - del stack[-1] - del openlines[-1] - if stack: - stack[-1] += (closed,) - else: - yield closed - elif line[pos] == '"': # quoted string - if not stack: - raise error(filename, lineno, - 'string found outside of s-expression') - endpos = pos + 1 - chars = [] - while endpos < len(line): - if endpos+1 < len(line) and line[endpos] == '\\': - endpos += 1 - if line[endpos] == 'n': - chars.append('\n') - elif line[endpos] == 'r': - chars.append('\r') - elif line[endpos] == 't': - chars.append('\t') - else: - chars.append('\\') - chars.append(line[endpos]) - elif line[endpos] == '"': - break - else: - chars.append(line[endpos]) - endpos += 1 - if endpos >= len(line): - raise error(filename, lineno, "unclosed quoted string") - pos = endpos - stack[-1] += (''.join(chars),) - else: # symbol/number - if not stack: - raise error(filename, lineno, - 'identifier found outside of s-expression') - endpos = pos - while endpos < len(line) and line[endpos] not in nonsymbol: - endpos += 1 - symbol = line[pos:endpos] - pos = max(pos, endpos-1) - try: symbol = int(symbol) - except ValueError: - try: symbol = float(symbol) - except ValueError: pass - stack[-1] += (symbol,) - pos += 1 - if len(stack) != 0: - msg = '%d unclosed parentheses found at end of ' \ - 'file (opened on line(s) %s)' % (len(stack), - ', '.join(map(str, openlines))) - raise error(filename, lineno, msg) - -class Parser: - def __init__(self, filename): - """Argument is either a string, a parse tree, or file object""" - self.filename = filename - def startParsing(self, filename=None): - statements = parse(filename or self.filename) - for statement in statements: - self.handle(statement) - def handle(self, tup): - cmd = string.translate(tup[0], trans) - if hasattr(self, cmd): - getattr(self, cmd)(*tup[1:]) - else: - self.unknown(tup) - def unknown(self, tup): - pass - -_testString = """; a scheme file -(define-func gdk_font_load ; a comment at end of line - GdkFont - ((string name))) - -(define-boxed GdkEvent - gdk_event_copy - gdk_event_free - "sizeof(GdkEvent)") -""" - -if __name__ == '__main__': - import sys - if sys.argv[1:]: - fp = open(sys.argv[1]) - else: - fp = StringIO(_testString) - statements = parse(fp) - for s in statements: - print `s` diff --git a/config.h.win32 b/config.h.win32 deleted file mode 100644 index 65dc1dab..00000000 --- a/config.h.win32 +++ /dev/null @@ -1,6 +0,0 @@ - -#define PYGTK_MAJOR_VERSION (2) -#define PYGTK_MINOR_VERSION (4) -#define PYGTK_MICRO_VERSION (1) - -#define VERSION "2.4.1" diff --git a/configure.in b/configure.in deleted file mode 100644 index 1da887ad..00000000 --- a/configure.in +++ /dev/null @@ -1,322 +0,0 @@ --*- mode: m4 -*- -AC_PREREQ(2.52) - -dnl the pygtk version number -m4_define(pygtk_major_version, 2) -m4_define(pygtk_minor_version, 10) -m4_define(pygtk_micro_version, 4) -m4_define(pygtk_version, pygtk_major_version.pygtk_minor_version.pygtk_micro_version) - -dnl versions of packages we require ... -m4_define(glib_required_version, 2.8.0) -m4_define(pango_required_version, 1.10.0) -m4_define(atk_required_version, 1.8.0) -m4_define(gtk_required_version, 2.8.0) -m4_define(libglade_required_version, 2.5.0) -m4_define(gtkunixprint_required_version, 2.9.0) -m4_define(pycairo_required_version, 1.0.2) dnl or 1.1.7 -m4_define(pygobject_required_version, 2.12.1) - -AC_INIT(pygtk, pygtk_version, - [http://bugzilla.gnome.org/enter_bug.cgi?product=pygtk]) -AC_SUBST(ACLOCAL_AMFLAGS, "-I m4 -I .") - -AC_DEFINE(PYGTK_MAJOR_VERSION, pygtk_major_version, [PyGtk major version]) -AC_SUBST(PYGTK_MAJOR_VERSION, pygtk_major_version) -AC_DEFINE(PYGTK_MINOR_VERSION, pygtk_minor_version, [PyGtk minor version]) -AC_SUBST(PYGTK_MINOR_VERSION, pygtk_minor_version) -AC_DEFINE(PYGTK_MICRO_VERSION, pygtk_micro_version, [PyGtk micro version]) -AC_SUBST(PYGTK_MICRO_VERSION, pygtk_micro_version) - -AC_CONFIG_SRCDIR([gtk/gtkmodule.c]) -AM_CONFIG_HEADER(config.h) - -AM_INIT_AUTOMAKE -AC_CHECK_FUNCS(bind_textdomain_codeset) - -dnl put the ACLOCAL flags in the makefile -ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" - -AC_CANONICAL_BUILD -AC_CANONICAL_HOST -AC_MSG_CHECKING([for some Win32 platform]) -case "$host" in - *-*-mingw*|*-*-cygwin*) - platform_win32=yes - ;; - *) - platform_win32=no - ;; -esac -AC_MSG_RESULT([$platform_win32]) -AM_CONDITIONAL(PLATFORM_WIN32, test "$platform_win32" = "yes") - -AC_MSG_CHECKING([for native Win32]) -case "$host" in - *-*-mingw*) - os_win32=yes - ;; - *) - os_win32=no - ;; -esac -AC_MSG_RESULT([$os_win32]) -AM_CONDITIONAL(OS_WIN32, test "$os_win32" = "yes") - -AC_DISABLE_STATIC - -dnl XXXX hack to kill off all the libtool tags ... -dnl it isn't like we are using C++ or Fortran. -dnl (copied from libglade/configure.in) -m4_define([_LT_AC_TAGCONFIG],[]) - -AC_LIBTOOL_WIN32_DLL -AC_PROG_LIBTOOL - -AM_PATH_PYTHON(2.3.5) - -AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)]) - -AC_ARG_ENABLE(thread, - AC_HELP_STRING([--disable-thread], [Disable pygtk threading support]),, - enable_thread=yes) - -AM_CHECK_PYMOD(thread,,,enable_thread=no) - -dnl Building documentation -AC_ARG_ENABLE(docs, - AC_HELP_STRING([--enable-docs], [Enable documentation building]),enable_docs=yes, - enable_docs=no) -if test "${enable_docs}" != no; then - dnl Check for xsltproc - AC_PATH_PROG([XSLTPROC], [xsltproc]) - if test -z "$XSLTPROC"; then - enable_docs=no - fi -fi - -AM_CONDITIONAL(ENABLE_DOCS, test x$enable_docs != xno) - - -AC_MSG_CHECKING(whether to enable threading in pygtk) -if test "x$enable_thread" != xno; then - extra_mods=gthread - THREADING_CFLAGS= - AC_MSG_RESULT(yes) -else - extra_mods= - THREADING_CFLAGS="-DDISABLE_THREADING" - AC_MSG_RESULT(no) -fi -AC_SUBST(THREADING_CFLAGS) -CPPFLAGS="${CPPFLAGS} $THREADING_CFLAGS" - -dnl get rid of the -export-dynamic stuff from the configure flags ... -export_dynamic=`(./libtool --config; echo eval echo \\$export_dynamic_flag_spec) | sh` - -dnl glib -AM_PATH_GLIB_2_0(glib_required_version,,[AC_MSG_ERROR(gobject is required to build pygtk?)],gobject $extra_mods) -if test -n "$export_dynamic"; then - GLIB_LIBS=`echo $GLIB_LIBS | sed -e "s/$export_dynamic//"` -fi - -PKG_CHECK_MODULES(PYGOBJECT, [pygobject-2.0 >= pygobject_required_version]) - -PYGOBJECT_INCLUDEDIR=`$PKG_CONFIG --variable=pygtkincludedir pygobject-2.0` -AC_SUBST(PYGOBJECT_INCLUDEDIR) - -PYGOBJECT_DATADIR=`$PKG_CONFIG --variable=datadir pygobject-2.0` -AC_SUBST(PYGOBJECT_DATADIR) - -PYGOBJECT_FIXXREF="$PYTHON `$PKG_CONFIG --variable=fixxref pygobject-2.0`" -AC_SUBST(PYGOBJECT_FIXXREF) - -PYGOBJECT_PYGDOCS="`$PKG_CONFIG --variable=pygdocs pygobject-2.0`" -AC_SUBST(PYGOBJECT_PYGDOCS) - -dnl atk -PKG_CHECK_MODULES(ATK, atk >= atk_required_version, - have_atk=true, have_atk=false) -AC_SUBST(ATK_CFLAGS) -AC_SUBST(ATK_LIBS) -AM_CONDITIONAL(BUILD_ATK, $have_atk) -if test -n "$export_dynamic"; then - ATK_LIBS=`echo $ATK_LIBS | sed -e "s/$export_dynamic//"` -fi - -dnl pango -PKG_CHECK_MODULES(PANGO, pango >= pango_required_version, - have_pango=true, have_pango=false) -AC_SUBST(PANGO_CFLAGS) -AC_SUBST(PANGO_LIBS) -AM_CONDITIONAL(BUILD_PANGO, $have_pango) -if test -n "$export_dynamic"; then - PANGO_LIBS=`echo $PANGO_LIBS | sed -e "s/$export_dynamic//"` -fi - -dnl pycairo -PYGTK_CODEGEN_DEFINES="" -AC_SUBST([PYGTK_CODEGEN_DEFINES]) - -gtk_version="" -PKG_CHECK_MODULES(PYCAIRO, [pycairo >= pycairo_required_version], - have_pycairo=true, have_pycairo=false) -AC_SUBST(PYCAIRO_CFLAGS) -AC_SUBST(PYCAIRO_LIBS) -if test $have_pycairo; then - PYGTK_CODEGEN_DEFINES="-DHAVE_PYCAIRO $PYGTK_CODEGEN_DEFINES"; - AC_DEFINE([HAVE_PYCAIRO], [1], [Define to 1 if pycairo is available]) - - AC_DEFINE_UNQUOTED(PYCAIRO_MAJOR_VERSION, [`pkg-config --modversion pycairo | cut -d '.' -f 1`], dnl - [pycairo major version]) - AC_DEFINE_UNQUOTED(PYCAIRO_MINOR_VERSION, [`pkg-config --modversion pycairo | cut -d '.' -f 2`], dnl - [pycairo minor version]) - AC_DEFINE_UNQUOTED(PYCAIRO_MICRO_VERSION, [`pkg-config --modversion pycairo | cut -d '.' -f 3`], dnl - [pycairo micro version]) - - dnl pangocairo - PKG_CHECK_MODULES(PANGOCAIRO, - [pangocairo >= pango_required_version, - pycairo >= pycairo_required_version], - have_pangocairo=true, have_pangocairo=false) - if test ! $have_pangocairo - then - AC_MSG_RESULT(no) - fi - AC_SUBST(PANGOCAIRO_CFLAGS) - AC_SUBST(PANGOCAIRO_LIBS) - AM_CONDITIONAL(BUILD_PANGOCAIRO, $have_pangocairo) - - if test -n "$export_dynamic"; then - PANGOCAIRO_LIBS=`echo $PANGOCAIRO_LIBS | sed -e "s/$export_dynamic//"` - fi - - dnl gtk+ - PKG_CHECK_MODULES(GTK, gtk+-2.0 >= gtk_required_version, - HAVE_GTK="yes", HAVE_GTK="no") - if test "x$HAVE_GTK" = "xyes"; then - have_gtk=true - else - have_gtk=false - AC_MSG_RESULT(no) - fi - AM_CONDITIONAL(BUILD_GTK, $have_gtk) - AC_SUBST(GTK_CFLAGS) - AC_SUBST(GTK_LIBS) - if test -n "$export_dynamic"; then - GTK_LIBS=`echo $GTK_LIBS | sed -e "s/$export_dynamic//"` - fi - - PKG_CHECK_MODULES(GTK210, gtk+-2.0 >= 2.10.0, - HAVE_GTK_210="yes", HAVE_GTK_210="no") - if test "x$HAVE_GTK_210" = "xyes"; then - gtk_version="2.10" - have_gtk_210=true - else - AC_MSG_RESULT(no) - gtk_version="2.8" - have_gtk_210=false - fi - - AM_CONDITIONAL(HAVE_GTK_2_10, $have_gtk_210) - AC_SUBST(HAVE_GTK_2_10) - AC_DEFINE([HAVE_GTK_2_10], [$have_gtk_210], [If Gtk 2.10 was found]) - - dnl libglade - PKG_CHECK_MODULES(LIBGLADE, [libglade-2.0 >= libglade_required_version], - have_libglade=true, have_libglade=false) - AC_SUBST(LIBGLADE_CFLAGS) - AC_SUBST(LIBGLADE_LIBS) - AM_CONDITIONAL(BUILD_LIBGLADE, $have_libglade) - if test -n "$export_dynamic"; then - LIBGLADE_LIBS=`echo $LIBGLADE_LIBS | sed -e "s/$export_dynamic//"` - fi - - dnl gtkunixprint - PKG_CHECK_MODULES(GTKUNIXPRINT, [gtk+-unix-print-2.0 >= gtkunixprint_required_version], - have_gtkunixprint=true, have_gtkunixprint=false) - AC_SUBST(GTKUNIXPRINT_CFLAGS) - AC_SUBST(GTKUNIXPRINT_LIBS) - AM_CONDITIONAL(BUILD_GTKUNIXPRINT, $have_gtkunixprint) - if test -n "$export_dynamic"; then - GTKUNIXPRINT_LIBS=`echo $GTKUNIXPRINT_LIBS | sed -e "s/$export_dynamic//"` - fi - -else - AC_MSG_RESULT(no) - AC_MSG_RESULT(not checking for gtk due to missing pycairo) -fi - -dnl Check for GDK target -AC_MSG_CHECKING([for GDK target]) -gdk_target=`$PKG_CONFIG --variable target gdk-2.0` -if test -z $gdk_target; then - AC_MSG_RESULT((unknown)) - AC_MSG_WARN([unable to determine the GDK target system; some functions may not be available]) -else - AC_MSG_RESULT($gdk_target) -fi - -case $gdk_target in - x11) PYGTK_CODEGEN_DEFINES="$PYGTK_CODEGEN_DEFINES -DGDK_TARGET_X11" - ;; -esac - - -dnl checks to see if Numeric Python is installed. -AC_ARG_ENABLE(numpy, - AC_HELP_STRING([--disable-numpy], [Disable numeric python features]),, - enable_numpy=yes) - -if test "x$enable_numpy" != xno; then - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" - AC_CHECK_HEADER([Numeric/arrayobject.h], - [AC_DEFINE(HAVE_NUMPY,,[whether to include numeric python support])],, - [#include ]) - CPPFLAGS="$save_CPPFLAGS" -fi - -dnl add required cflags ... -JH_ADD_CFLAG([-Wall]) -JH_ADD_CFLAG([-std=c9x]) -JH_ADD_CFLAG([-fno-strict-aliasing]) - -AC_CONFIG_FILES( - Makefile - pygtk-2.0.pc - codegen/Makefile - gtk/Makefile - docs/Makefile - docs/reference/entities.docbook - examples/Makefile - tests/Makefile - codegen/pygtk-codegen-2.0 - pygtk.spec - PKG-INFO) -AC_OUTPUT - -echo -echo "The following modules will be built:" -echo -$have_atk && echo atk -$have_pango && echo pango -$have_pangocairo && echo pangocairo -$have_gtk && echo gtk with $gtk_version API -$have_libglade && echo gtk.glade -$have_gtkunixprint && echo gtk.unixprint -echo - -if test ! $have_atk || ! $have_pango || \ - ! $have_gtk || ! $have_libglade || \ - ! $have_pangocairo || ! $have_gtkunixprint; then - echo "The following modules will NOT be built:" - echo - $have_atk || echo atk - $have_pango || echo pango - $have_pangocairo || echo pangocairo - $have_gtk || echo gtk - $have_libglade || echo gtk.glade - $have_gtkunixprint || echo gtk.unixprint -fi - diff --git a/docs/Makefile.am b/docs/Makefile.am deleted file mode 100644 index e0a761a8..00000000 --- a/docs/Makefile.am +++ /dev/null @@ -1,632 +0,0 @@ -BUILDDIR = $(top_builddir)/docs - -REF_VERSION = $(PYGTK_MAJOR_VERSION).$(PYGTK_MINOR_VERSION) -FULL_VERSION = $(REF_VERSION).$(PYGTK_MICRO_VERSION) - -HTML_STYLE = $(PYGOBJECT_DATADIR)/pygobject/xsl/ref-html-style.xsl -PDF_STYLE = $(PYGOBJECT_DATADIR)/pygobject/xsl/pdf-style.xsl - -XMLFILES = \ - reference/pygtk2-ref.xml \ - reference/pygtk-atkaction.xml \ - reference/pygtk-atk-classes.xml \ - reference/pygtk-atkcomponent.xml \ - reference/pygtk-atk-constants.xml \ - reference/pygtk-atkdocument.xml \ - reference/pygtk-atkeditabletext.xml \ - reference/pygtk-atkgobjectaccessible.xml \ - reference/pygtk-atkhyperlink.xml \ - reference/pygtk-atkhypertext.xml \ - reference/pygtk-atkimage.xml \ - reference/pygtk-atkimplementor.xml \ - reference/pygtk-atknoopobjectfactory.xml \ - reference/pygtk-atknoopobject.xml \ - reference/pygtk-atkobjectfactory.xml \ - reference/pygtk-atkobject.xml \ - reference/pygtk-atkrectangle.xml \ - reference/pygtk-atkregistry.xml \ - reference/pygtk-atkrelationset.xml \ - reference/pygtk-atkrelation.xml \ - reference/pygtk-atkselection.xml \ - reference/pygtk-atkstateset.xml \ - reference/pygtk-atkstreamablecontent.xml \ - reference/pygtk-atktable.xml \ - reference/pygtk-atktext.xml \ - reference/pygtk-atkvalue.xml \ - reference/pygtk-gdkatom.xml \ - reference/pygtk-gdkcairocontext.xml \ - reference/pygtk-gdk-classes.xml \ - reference/pygtk-gdkcolormap.xml \ - reference/pygtk-gdkcolor.xml \ - reference/pygtk-gdk-constants.xml \ - reference/pygtk-gdkcursor.xml \ - reference/pygtk-gdkdevice.xml \ - reference/pygtk-gdkdisplaymanager.xml \ - reference/pygtk-gdkdisplay.xml \ - reference/pygtk-gdkdragcontext.xml \ - reference/pygtk-gdkdrawable.xml \ - reference/pygtk-gdkevent.xml \ - reference/pygtk-gdkfont.xml \ - reference/pygtk-gdk-functions.xml \ - reference/pygtk-gdkgc.xml \ - reference/pygtk-gdkimage.xml \ - reference/pygtk-gdkkeymap.xml \ - reference/pygtk-gdkpangorenderer.xml \ - reference/pygtk-gdkpixbufanimationiter.xml \ - reference/pygtk-gdkpixbufanimation.xml \ - reference/pygtk-gdkpixbufloader.xml \ - reference/pygtk-gdkpixbuf.xml \ - reference/pygtk-gdkpixmap.xml \ - reference/pygtk-gdkrectangle.xml \ - reference/pygtk-gdkregion.xml \ - reference/pygtk-gdkscreen.xml \ - reference/pygtk-gdkwindow.xml \ - reference/pygtk-gdkvisual.xml \ - reference/pygtk-glade-classes.xml \ - reference/pygtk-gladexml.xml \ - reference/pygtk-gtkaboutdialog.xml \ - reference/pygtk-gtkaccelgroup.xml \ - reference/pygtk-gtkaccellabel.xml \ - reference/pygtk-gtkaccelmap.xml \ - reference/pygtk-gtkaccessible.xml \ - reference/pygtk-gtkactiongroup.xml \ - reference/pygtk-gtkaction.xml \ - reference/pygtk-gtkadjustment.xml \ - reference/pygtk-gtkalignment.xml \ - reference/pygtk-gtkarrow.xml \ - reference/pygtk-gtkaspectframe.xml \ - reference/pygtk-gtkassistant.xml \ - reference/pygtk-gtkbin.xml \ - reference/pygtk-gtkborder.xml \ - reference/pygtk-gtkbox.xml \ - reference/pygtk-gtkbuttonbox.xml \ - reference/pygtk-gtkbutton.xml \ - reference/pygtk-gtkcalendar.xml \ - reference/pygtk-gtkcelleditable.xml \ - reference/pygtk-gtkcelllayout.xml \ - reference/pygtk-gtkcellrendereraccel.xml \ - reference/pygtk-gtkcellrenderercombo.xml \ - reference/pygtk-gtkcellrendererpixbuf.xml \ - reference/pygtk-gtkcellrendererprogress.xml \ - reference/pygtk-gtkcellrendererspin.xml \ - reference/pygtk-gtkcellrenderertext.xml \ - reference/pygtk-gtkcellrenderertoggle.xml \ - reference/pygtk-gtkcellrenderer.xml \ - reference/pygtk-gtkcellview.xml \ - reference/pygtk-gtkcheckbutton.xml \ - reference/pygtk-gtkcheckmenuitem.xml \ - reference/pygtk-gtk-classes.xml \ - reference/pygtk-gtkclipboard.xml \ - reference/pygtk-gtkcolorbutton.xml \ - reference/pygtk-gtkcolorselectiondialog.xml \ - reference/pygtk-gtkcolorselection.xml \ - reference/pygtk-gtkcomboboxentry.xml \ - reference/pygtk-gtkcombobox.xml \ - reference/pygtk-gtkcombo.xml \ - reference/pygtk-gtk-constants.xml \ - reference/pygtk-gtkcontainer.xml \ - reference/pygtk-gtkcurve.xml \ - reference/pygtk-gtkdialog.xml \ - reference/pygtk-gtkdrawingarea.xml \ - reference/pygtk-gtkeditable.xml \ - reference/pygtk-gtkentrycompletion.xml \ - reference/pygtk-gtkentry.xml \ - reference/pygtk-gtkeventbox.xml \ - reference/pygtk-gtkexpander.xml \ - reference/pygtk-gtkfilechooserbutton.xml \ - reference/pygtk-gtkfilechooserdialog.xml \ - reference/pygtk-gtkfilechooserwidget.xml \ - reference/pygtk-gtkfilechooser.xml \ - reference/pygtk-gtkfilefilter.xml \ - reference/pygtk-gtkfileselection.xml \ - reference/pygtk-gtkfixed.xml \ - reference/pygtk-gtkfontbutton.xml \ - reference/pygtk-gtkfontselectiondialog.xml \ - reference/pygtk-gtkfontselection.xml \ - reference/pygtk-gtkframe.xml \ - reference/pygtk-gtk-functions.xml \ - reference/pygtk-gtkgammacurve.xml \ - reference/pygtk-gtkhandlebox.xml \ - reference/pygtk-gtkhbox.xml \ - reference/pygtk-gtkhbuttonbox.xml \ - reference/pygtk-gtkhpaned.xml \ - reference/pygtk-gtkhruler.xml \ - reference/pygtk-gtkhscale.xml \ - reference/pygtk-gtkhscrollbar.xml \ - reference/pygtk-gtkhseparator.xml \ - reference/pygtk-gtkiconfactory.xml \ - reference/pygtk-gtkiconinfo.xml \ - reference/pygtk-gtkiconset.xml \ - reference/pygtk-gtkiconsource.xml \ - reference/pygtk-gtkicontheme.xml \ - reference/pygtk-gtkiconview.xml \ - reference/pygtk-gtkimagemenuitem.xml \ - reference/pygtk-gtkimage.xml \ - reference/pygtk-gtkimcontextsimple.xml \ - reference/pygtk-gtkimcontext.xml \ - reference/pygtk-gtkimmulticontext.xml \ - reference/pygtk-gtkinputdialog.xml \ - reference/pygtk-gtkinvisible.xml \ - reference/pygtk-gtkitemfactory.xml \ - reference/pygtk-gtkitem.xml \ - reference/pygtk-gtklabel.xml \ - reference/pygtk-gtklayout.xml \ - reference/pygtk-gtklinkbutton.xml \ - reference/pygtk-gtkliststore.xml \ - reference/pygtk-gtkmenubar.xml \ - reference/pygtk-gtkmenuitem.xml \ - reference/pygtk-gtkmenushell.xml \ - reference/pygtk-gtkmenutoolbutton.xml \ - reference/pygtk-gtkmenu.xml \ - reference/pygtk-gtkmessagedialog.xml \ - reference/pygtk-gtkmisc.xml \ - reference/pygtk-gtknotebook.xml \ - reference/pygtk-gtkobject.xml \ - reference/pygtk-gtkoptionmenu.xml \ - reference/pygtk-gtkpagesetupunixdialog.xml \ - reference/pygtk-gtkpagesetup.xml \ - reference/pygtk-gtkpaned.xml \ - reference/pygtk-gtkpapersize.xml \ - reference/pygtk-gtkplug.xml \ - reference/pygtk-gtkprintcontext.xml \ - reference/pygtk-gtkprinter.xml \ - reference/pygtk-gtkprintjob.xml \ - reference/pygtk-gtkprintoperationpreview.xml \ - reference/pygtk-gtkprintoperation.xml \ - reference/pygtk-gtkprintsettings.xml \ - reference/pygtk-gtkprintunixdialog.xml \ - reference/pygtk-gtkprogressbar.xml \ - reference/pygtk-gtkradioaction.xml \ - reference/pygtk-gtkradiobutton.xml \ - reference/pygtk-gtkradiomenuitem.xml \ - reference/pygtk-gtkradiotoolbutton.xml \ - reference/pygtk-gtkrange.xml \ - reference/pygtk-gtkrcstyle.xml \ - reference/pygtk-gtkrecentchooserdialog.xml \ - reference/pygtk-gtkrecentchoosermenu.xml \ - reference/pygtk-gtkrecentchooserwidget.xml \ - reference/pygtk-gtkrecentchooser.xml \ - reference/pygtk-gtkrecentfilter.xml \ - reference/pygtk-gtkrecentinfo.xml \ - reference/pygtk-gtkrecentmanager.xml \ - reference/pygtk-gtkrequisition.xml \ - reference/pygtk-gtkruler.xml \ - reference/pygtk-gtkscale.xml \ - reference/pygtk-gtkscrollbar.xml \ - reference/pygtk-gtkscrolledwindow.xml \ - reference/pygtk-gtkselectiondata.xml \ - reference/pygtk-gtkseparatormenuitem.xml \ - reference/pygtk-gtkseparatortoolitem.xml \ - reference/pygtk-gtkseparator.xml \ - reference/pygtk-gtksettings.xml \ - reference/pygtk-gtksizegroup.xml \ - reference/pygtk-gtksocket.xml \ - reference/pygtk-gtkspinbutton.xml \ - reference/pygtk-gtkstatusbar.xml \ - reference/pygtk-gtkstatusicon.xml \ - reference/pygtk-gtk-stock-items.xml \ - reference/pygtk-gtkstyle.xml \ - reference/pygtk-gtktable.xml \ - reference/pygtk-gtktearoffmenuitem.xml \ - reference/pygtk-gtktextattributes.xml \ - reference/pygtk-gtktextbuffer.xml \ - reference/pygtk-gtktextchildanchor.xml \ - reference/pygtk-gtktextiter.xml \ - reference/pygtk-gtktextmark.xml \ - reference/pygtk-gtktexttagtable.xml \ - reference/pygtk-gtktexttag.xml \ - reference/pygtk-gtktextview.xml \ - reference/pygtk-gtktoggleaction.xml \ - reference/pygtk-gtktogglebutton.xml \ - reference/pygtk-gtktoggletoolbutton.xml \ - reference/pygtk-gtktoolbar.xml \ - reference/pygtk-gtktoolbutton.xml \ - reference/pygtk-gtktoolitem.xml \ - reference/pygtk-gtktooltips.xml \ - reference/pygtk-gtktreedragdest.xml \ - reference/pygtk-gtktreedragsource.xml \ - reference/pygtk-gtktreeiter.xml \ - reference/pygtk-gtktreemodelfilter.xml \ - reference/pygtk-gtktreemodelsort.xml \ - reference/pygtk-gtktreemodel.xml \ - reference/pygtk-gtktreerowreference.xml \ - reference/pygtk-gtktreeselection.xml \ - reference/pygtk-gtktreesortable.xml \ - reference/pygtk-gtktreestore.xml \ - reference/pygtk-gtktreeviewcolumn.xml \ - reference/pygtk-gtktreeview.xml \ - reference/pygtk-gtkuimanager.xml \ - reference/pygtk-gtkvbox.xml \ - reference/pygtk-gtkvbuttonbox.xml \ - reference/pygtk-gtkwidget.xml \ - reference/pygtk-gtkviewport.xml \ - reference/pygtk-gtkwindowgroup.xml \ - reference/pygtk-gtkwindow.xml \ - reference/pygtk-gtkvpaned.xml \ - reference/pygtk-gtkvruler.xml \ - reference/pygtk-gtkvscale.xml \ - reference/pygtk-gtkvscrollbar.xml \ - reference/pygtk-gtkvseparator.xml \ - reference/pygtk-hierarchy.xml \ - reference/pygtk-introduction.xml \ - reference/pygtk-pangoattribute.xml \ - reference/pygtk-pangoattriter.xml \ - reference/pygtk-pangoattrlist.xml \ - reference/pygtk-pangocairocairocontext.xml \ - reference/pygtk-pangocairocairofontmap.xml \ - reference/pygtk-pangocairo-classes.xml \ - reference/pygtk-pangocairo-constants.xml \ - reference/pygtk-pangocairo-functions.xml \ - reference/pygtk-pango-classes.xml \ - reference/pygtk-pangocolor.xml \ - reference/pygtk-pango-constants.xml \ - reference/pygtk-pangocontext.xml \ - reference/pygtk-pangofontdescription.xml \ - reference/pygtk-pangofontface.xml \ - reference/pygtk-pangofontfamily.xml \ - reference/pygtk-pangofontmap.xml \ - reference/pygtk-pangofontmetrics.xml \ - reference/pygtk-pangofontsetsimple.xml \ - reference/pygtk-pangofontset.xml \ - reference/pygtk-pangofont.xml \ - reference/pygtk-pango-functions.xml \ - reference/pygtk-pangoglyphstring.xml \ - reference/pygtk-pangolanguage.xml \ - reference/pygtk-pangolayoutiter.xml \ - reference/pygtk-pangolayoutline.xml \ - reference/pygtk-pangolayout.xml \ - reference/pygtk-pango-markup.xml \ - reference/pygtk-pangorenderer.xml \ - reference/pygtk-pangotabarray.xml \ - reference/pygtk-pygtkgenericcellrenderer.xml \ - reference/pygtk-pygtkgenerictreemodel.xml \ - reference/pygtk-pygtktreemodelrowiter.xml \ - reference/pygtk-pygtktreemodelrow.xml \ - reference/pygtk-unixprint-classes.xml \ - reference/pygtk-unixprint-constants.xml \ - reference/pygtk-unixprint-functions.xml - -HTML_FILES = \ - html/atk-class-reference.html \ - html/atk-constants.html \ - html/class-atkaction.html \ - html/class-atkcomponent.html \ - html/class-atkdocument.html \ - html/class-atkeditabletext.html \ - html/class-atkgobjectaccessible.html \ - html/class-atkhyperlink.html \ - html/class-atkhypertext.html \ - html/class-atkimage.html \ - html/class-atkimplementor.html \ - html/class-atknoopobjectfactory.html \ - html/class-atknoopobject.html \ - html/class-atkobjectfactory.html \ - html/class-atkobject.html \ - html/class-atkrectangle.html \ - html/class-atkregistry.html \ - html/class-atkrelation.html \ - html/class-atkrelationset.html \ - html/class-atkselection.html \ - html/class-atkstateset.html \ - html/class-atkstreamablecontent.html \ - html/class-atktable.html \ - html/class-atktext.html \ - html/class-atkvalue.html \ - html/class-gdkatom.html \ - html/class-gdkcairocontext.html \ - html/class-gdkcolor.html \ - html/class-gdkcolormap.html \ - html/class-gdkcursor.html \ - html/class-gdkdevice.html \ - html/class-gdkdisplay.html \ - html/class-gdkdisplaymanager.html \ - html/class-gdkdragcontext.html \ - html/class-gdkdrawable.html \ - html/class-gdkevent.html \ - html/class-gdkgc.html \ - html/class-gdkimage.html \ - html/class-gdkkeymap.html \ - html/class-gdkpangorenderer.html \ - html/class-gdkpixbufanimation.html \ - html/class-gdkpixbufanimationiter.html \ - html/class-gdkpixbuf.html \ - html/class-gdkpixbufloader.html \ - html/class-gdkpixmap.html \ - html/class-gdkrectangle.html \ - html/class-gdkregion.html \ - html/class-gdkscreen.html \ - html/class-gdkwindow.html \ - html/class-gdkvisual.html \ - html/class-gladexml.html \ - html/class-gtkaboutdialog.html \ - html/class-gtkaccelgroup.html \ - html/class-gtkaccellabel.html \ - html/class-gtkaccelmap.html \ - html/class-gtkaccessible.html \ - html/class-gtkactiongroup.html \ - html/class-gtkaction.html \ - html/class-gtkadjustment.html \ - html/class-gtkalignment.html \ - html/class-gtkarrow.html \ - html/class-gtkaspectframe.html \ - html/class-gtkassistant.html \ - html/class-gtkbin.html \ - html/class-gtkborder.html \ - html/class-gtkbox.html \ - html/class-gtkbuttonbox.html \ - html/class-gtkbutton.html \ - html/class-gtkcalendar.html \ - html/class-gtkcelleditable.html \ - html/class-gtkcelllayout.html \ - html/class-gtkcellrendereraccel.html \ - html/class-gtkcellrenderercombo.html \ - html/class-gtkcellrenderer.html \ - html/class-gtkcellrendererpixbuf.html \ - html/class-gtkcellrendererprogress.html \ - html/class-gtkcellrendererspin.html \ - html/class-gtkcellrenderertext.html \ - html/class-gtkcellrenderertoggle.html \ - html/class-gtkcellview.html \ - html/class-gtkcheckbutton.html \ - html/class-gtkcheckmenuitem.html \ - html/class-gtkclipboard.html \ - html/class-gtkcolorbutton.html \ - html/class-gtkcolorselectiondialog.html \ - html/class-gtkcolorselection.html \ - html/class-gtkcomboboxentry.html \ - html/class-gtkcombobox.html \ - html/class-gtkcombo.html \ - html/class-gtkcontainer.html \ - html/class-gtkcurve.html \ - html/class-gtkdialog.html \ - html/class-gtkdrawingarea.html \ - html/class-gtkeditable.html \ - html/class-gtkentrycompletion.html \ - html/class-gtkentry.html \ - html/class-gtkeventbox.html \ - html/class-gtkexpander.html \ - html/class-gtkfilechooserbutton.html \ - html/class-gtkfilechooserdialog.html \ - html/class-gtkfilechooser.html \ - html/class-gtkfilechooserwidget.html \ - html/class-gtkfilefilter.html \ - html/class-gtkfileselection.html \ - html/class-gtkfixed.html \ - html/class-gtkfontbutton.html \ - html/class-gtkfontselectiondialog.html \ - html/class-gtkfontselection.html \ - html/class-gtkframe.html \ - html/class-gtkgammacurve.html \ - html/class-gtkhandlebox.html \ - html/class-gtkhbox.html \ - html/class-gtkhbuttonbox.html \ - html/class-gtkhpaned.html \ - html/class-gtkhruler.html \ - html/class-gtkhscale.html \ - html/class-gtkhscrollbar.html \ - html/class-gtkhseparator.html \ - html/class-gtkiconfactory.html \ - html/class-gtkiconinfo.html \ - html/class-gtkiconset.html \ - html/class-gtkiconsource.html \ - html/class-gtkicontheme.html \ - html/class-gtkiconview.html \ - html/class-gtkimage.html \ - html/class-gtkimagemenuitem.html \ - html/class-gtkimcontext.html \ - html/class-gtkimcontextsimple.html \ - html/class-gtkimmulticontext.html \ - html/class-gtkinputdialog.html \ - html/class-gtkinvisible.html \ - html/class-gtkitemfactory.html \ - html/class-gtkitem.html \ - html/class-gtklabel.html \ - html/class-gtklayout.html \ - html/class-gtklinkbutton.html \ - html/class-gtkliststore.html \ - html/class-gtkmenubar.html \ - html/class-gtkmenu.html \ - html/class-gtkmenuitem.html \ - html/class-gtkmenushell.html \ - html/class-gtkmenutoolbutton.html \ - html/class-gtkmessagedialog.html \ - html/class-gtkmisc.html \ - html/class-gtknotebook.html \ - html/class-gtkobject.html \ - html/class-gtkoptionmenu.html \ - html/class-gtkpagesetup.html \ - html/class-gtkpagesetupunixdialog.html \ - html/class-gtkpaned.html \ - html/class-gtkpapersize.html \ - html/class-gtkplug.html \ - html/class-gtkprintcontext.html \ - html/class-gtkprinter.html \ - html/class-gtkprintjob.html \ - html/class-gtkprintoperation.html \ - html/class-gtkprintoperationpreview.html \ - html/class-gtkprintsettings.html \ - html/class-gtkprintunixdialog.html \ - html/class-gtkprogressbar.html \ - html/class-gtkradioaction.html \ - html/class-gtkradiobutton.html \ - html/class-gtkradiomenuitem.html \ - html/class-gtkradiotoolbutton.html \ - html/class-gtkrange.html \ - html/class-gtkrcstyle.html \ - html/class-gtkrecentchooserdialog.html \ - html/class-gtkrecentchooser.html \ - html/class-gtkrecentchoosermenu.html \ - html/class-gtkrecentchooserwidget.html \ - html/class-gtkrecentfilter.html \ - html/class-gtkrecentinfo.html \ - html/class-gtkrecentmanager.html \ - html/class-gtkrequisition.html \ - html/class-gtkruler.html \ - html/class-gtkscale.html \ - html/class-gtkscrollbar.html \ - html/class-gtkscrolledwindow.html \ - html/class-gtkselectiondata.html \ - html/class-gtkseparator.html \ - html/class-gtkseparatormenuitem.html \ - html/class-gtkseparatortoolitem.html \ - html/class-gtksettings.html \ - html/class-gtksizegroup.html \ - html/class-gtksocket.html \ - html/class-gtkspinbutton.html \ - html/class-gtkstatusbar.html \ - html/class-gtkstatusicon.html \ - html/class-gtkstyle.html \ - html/class-gtktable.html \ - html/class-gtktearoffmenuitem.html \ - html/class-gtktextattributes.html \ - html/class-gtktextbuffer.html \ - html/class-gtktextchildanchor.html \ - html/class-gtktextiter.html \ - html/class-gtktextmark.html \ - html/class-gtktexttag.html \ - html/class-gtktexttagtable.html \ - html/class-gtktextview.html \ - html/class-gtktoggleaction.html \ - html/class-gtktogglebutton.html \ - html/class-gtktoggletoolbutton.html \ - html/class-gtktoolbar.html \ - html/class-gtktoolbutton.html \ - html/class-gtktoolitem.html \ - html/class-gtktooltips.html \ - html/class-gtktreedragdest.html \ - html/class-gtktreedragsource.html \ - html/class-gtktreeiter.html \ - html/class-gtktreemodelfilter.html \ - html/class-gtktreemodel.html \ - html/class-gtktreemodelsort.html \ - html/class-gtktreerowreference.html \ - html/class-gtktreeselection.html \ - html/class-gtktreesortable.html \ - html/class-gtktreestore.html \ - html/class-gtktreeviewcolumn.html \ - html/class-gtktreeview.html \ - html/class-gtkuimanager.html \ - html/class-gtkvbox.html \ - html/class-gtkvbuttonbox.html \ - html/class-gtkwidget.html \ - html/class-gtkviewport.html \ - html/class-gtkwindowgroup.html \ - html/class-gtkwindow.html \ - html/class-gtkvpaned.html \ - html/class-gtkvruler.html \ - html/class-gtkvscale.html \ - html/class-gtkvscrollbar.html \ - html/class-gtkvseparator.html \ - html/class-hierarchy.html \ - html/class-pangoattribute.html \ - html/class-pangoattriterator.html \ - html/class-pangoattrlist.html \ - html/class-pangocairocairocontext.html \ - html/class-pangocairocairofontmap.html \ - html/class-pangocolor.html \ - html/class-pangocontext.html \ - html/class-pangofontdescription.html \ - html/class-pangofontface.html \ - html/class-pangofontfamily.html \ - html/class-pangofont.html \ - html/class-pangofontmap.html \ - html/class-pangofontmetrics.html \ - html/class-pangofontset.html \ - html/class-pangofontsetsimple.html \ - html/class-pangoglyphstring.html \ - html/class-pangolanguage.html \ - html/class-pangolayout.html \ - html/class-pangolayoutiter.html \ - html/class-pangolayoutline.html \ - html/class-pangorenderer.html \ - html/class-pangotabarray.html \ - html/class-pygtkgenericcellrenderer.html \ - html/class-pygtkgenerictreemodel.html \ - html/class-pygtktreemodelrow.html \ - html/class-pygtktreemodelrowiter.html \ - html/gdk-class-reference.html \ - html/gdk-constants.html \ - html/gdk-functions.html \ - html/glade-class-reference.html \ - html/gtk-class-reference.html \ - html/gtk-constants.html \ - html/gtk-functions.html \ - html/gtk-stock-items.html \ - html/index.html \ - html/index.sgml \ - html/pangocairo-class-reference.html \ - html/pangocairo-constants.html \ - html/pangocairo-functions.html \ - html/pango-class-reference.html \ - html/pango-constants.html \ - html/pango-functions.html \ - html/pango-markup-language.html \ - html/pygtk.devhelp \ - html/pygtk-introduction.html \ - html/pygtk-reference-format.html \ - html/unixprint-class-reference.html \ - html/unixprint-constants.html \ - html/unixprint-functions.html - - - -CSS_FILES = $(PYGOBJECT_PYGDOCS)/style.css - -TARGET_DIR = $(datadir)/gtk-doc/html/pygtk -CSSdir = $(TARGET_DIR) -CSS_DATA = $(CSS_FILES) - - -EXTRA_DIST = \ - $(HTML_FILES) \ - $(XMLFILES) \ - $(XSLFILES) \ - $(FIX_XREF) - -install-data-local: - installfiles=`echo $(srcdir)/html/*`; \ - if test "$$installfiles" = '$(srcdir)/html/*'; \ - then echo '-- Nothing to install' ; \ - else \ - $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \ - 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) || :; \ - fi - -install-data-hook: - @$(PYGOBJECT_FIXXREF) $(DESTDIR)$(TARGET_DIR) - -uninstall-local: - rm -f $(DESTDIR)$(TARGET_DIR)/* - -if ENABLE_DOCS - -BUILT_SOURCES = reference/builddate.xml $(HTML_FILES) -DISTCLEANFILES = reference/builddate.xml $(HTML_FILES) - -reference/builddate.xml: - @$(PYTHON) -c 'import datetime; print datetime.date.today()' > $@ - - -# Do not add a builddate.xml dependency here, because the generated html -# documentation will be included in the tarball so xsltproc is not needed to -# install the documentation. Adding a builddate.xml dependency will force -# the documentation to be rebuilt when it doesn't need to be. -$(HTML_FILES): $(XMLFILES) $(XSLFILES) - @xsltproc --nonet --xinclude -o $(BUILDDIR)/html/ \ - --path $(BUILDDIR)/reference:$(srcdir)/reference \ - --stringparam gtkdoc.bookname "pygtk" \ - --stringparam gtkdoc.version ${REF_VERSION} \ - $(HTML_STYLE) $(srcdir)/reference/pygtk2-ref.xml - -# pdf: $(REFERENCE_DEPS) reference/builddate.xml -# xsltproc --nonet --xinclude -o pygtk-ref.fo \ -# $(PDF_STYLE) reference/pygtk2-ref.xml -# pdfxmltex pygtk-ref.fo >output - - * pygtk2-ref.xml: Remove Author info. - - * pygtk-introduction.xml: Remove Copyright and License section. - -2006-08-22 Johan Dahlin - - * pygtk-gtkcontainer.xml (linkend): forall, spotted by - Tim TerlegÃ¥rd - -2006-08-11 John Finlay - - * pygtk-gtkaction.xml (set_menu_item_type, set_tool_item_type): Add. - - * pygtk-gtkwidget.xml (get_activate_signal): Add. - -2006-08-06 John Finlay - - * pygtk-gtkwidget.xml - * pygtk-gtkcontainer.xml: Replace gobject-*-constants xrefs with - link tags. - -2006-08-03 John Finlay - - * pygtk-gtklinkbutton.xml: Remove extra Returns: - * pygtk-gtkstatusicon.xml: Add missing " - Fixes #349862 (Nikos Kouremenos) - -2006-07-19 John Finlay - - * pygtk2-ref.xml: Add version and builddate entities. - - * pygtk-introduction.xml: Update. - -2006-07-18 John Finlay - - * pygtk-gtktreeselection.xml (set_select_function): Update description - for 2.10 changes to enable full callback args. - - * pygtk-gtkmenu.xml (popup): Note func signature prior to 2.10. - -2006-07-14 John Finlay - - * pygtk-gtkaccelmap.xml: Add. - - * pygtk-gtkaccelgroup.xml: Move accel map functions to - pygtk-gtkaccelmap.xml - - * pygtk-gtk-classes.xml: Add pygtk-gtkaccelmap.xml - -2006-07-12 John Finlay - - * pygtk-unixprint-classes.xml: Add pygtk-unixprint-functions.xml. - - * pygtk-unixprint-functions.xml: Add gtk.unixprint.enumerate_printers. - - * pygtk-gtkprinter.xml (accepts_ps, accepts_pdf): Add. - -2006-07-07 John Finlay - - * pygtk-pangofontfamily.xml (is_monospace): Fix Returns description. - #340108 (Wouter Bolsterlee) - - * pygtk-gtk-constants.xml (Selection Mode Constants): Add link - to TreeSelection. #329898 (Nikos Kouremenos) - - * pygtk-gtkfilechooser.xml (FileNamesAndEncodings): Add. #327888 - (Nikos Kouremenos) - - * pygtk-gtkexpander.xml ("activate"): Add note and link about using - "notify:expanded" instead of activate. #323403 (Murray Cummings) - - * pygtk-gtkspinbutton.xml (spin): increment defaults to 1.0 - - * pygtk-pango-functions.xml - * pygtk-pangoattrlist.xml (pango.parse_markup): accel_marker defaults - to u'\x00 - fix description. - - * pygtk-pangocairo-functions.xml: Fix function names and reorg. - - * pygtk-gtkcellrenderertoggle.xml ("toggled"): path is a string. - Fixes #334473 (Alexander Konovalenko) - - ======== 2.9.0 ============ -2006-07-06 John Finlay - - * pygtk2-ref.xml: Version 2.9.0. - - * pygtk-introduction.xml: Update for PyGTK 2.10 - - * pygtk-pangofont.xml (get_font_map): Add. - - * pygtk-pangofontdescription.xml (get_size_is_absolute) - (set_absolute_size): Add. - - * pygtk-pangoattribute.xml: Add descriptions of new text attributes. - - * pygtk-atk-constants.xml: Add Text constants. - - * pygtk-atkrectangle.xml: Add. - - * pygtk-atk-classes.xml: Add pygtk-atkrectangle. - - * pygtk-atkregistry.xml: - * pygtk-atkrelation.xml: - * pygtk-atkrelationset.xml: - * pygtk-atkselection.xml: - * pygtk-atkstateset.xml: - * pygtk-atkstreamablecontent.xml: - * pygtk-atktable.xml: - * pygtk-atktext.xml: - * pygtk-atkvalue.xml: Update to PyGTK API. - - * pygtk-atkutil.xml: Remove. - -2006-06-27 John Finlay - - * Add atk docs and new gtk 2.10 class docs. - - * Add links to ancestor properties and signals. Add new GTK 2.10 - classes, methods, functions and constants. Remove unused file - pygtk-classes.xml - -2006-06-22 John Finlay - - * pygtk-gladexml.xml (set_custom_widget_callbacks): Fix external link. - (signal_autoconnect): Fix typo. - -2006-06-10 John Finlay - - * pygtk-gobject-constants.xml (Type Constants): Add TYPE_PYOBJECT. - -2006-06-06 John Finlay - - * pygtk-gtkprintjob.xml: Add. - - * pygtk-gtkprintunixdialog.xml: Add. - - * pygtk-unixprint-constants.xml: Add. - - * pygtk-gtkprinter.xml: Add. - - * pygtk-gtkpagesetupunixdialog.xml: Add. - - * pygtk-unixprint-classes.xml: Add. - - * pygtk2-ref.xml: Add pygtk-unixprint-classes.xml - -2006-06-05 John Finlay - - * pygtk-gtkpapersize.xml: Add link to Paper Name constants. - - * pygtk-gtk-constants.xml: Add Paper Name constants. - -2006-06-04 John Finlay - - * pygtk-gtk-functions.xml: Add PageSize Functions - - * pygtk-gtk-classes.xml: Add pygtk-gtkpapersize.xml. - - * pygtk-gtkpapersize.xml: Add. - - * pygtk-gtk-constants.xml: Add Page Orientation and Unit constants. - - * pygtk-gtk-classes.xml: Add pygtk-gtkpagesetup.xml. - - * pygtk-gtkpagesetup.xml: Add. - - * pygtk-gtknotebook.xml (set_tab_detachable, get_tab_detachable) - (set_tab_reorderable, get_tab_reorderable, get_group_id) - (set_group_id, "page-reordered", "page-added", "page-removed") - ("tab-overlap", "tab-curvature", "arrow-spacing"): Add. - - * pygtk-gtkmessagedialog.xml (set_image, "image", "secondary-text") - ("secondary-use-markup", "text", "use-markup"): Add. - - * pygtk-gtk-functions.xml (LinkButton Functions): Add. - - * pygtk-gtk-classes.xml: Add pygtk-gtklinkbutton.xml. - - * pygtk-gtklinkbutton.xml: Add. - - * pygtk-gtkfilechooserbutton.xml (get_focus_on_click) - (set_focus_on_click, "focus-on-click"): Add. - - * pygtk-gtkwidget.xml (input_shape_combine_mask, is_composited) - (drag_dest_get_track_motion, drag_dest_set_track_motion) - (get_action): Add. - - * pygtk-gtk-classes.xml: Add pygtk-gtkcellrendererspin.xml - - * pygtk-gtkcellrendererspin.xml: Add. - - * pygtk-gtkcombobox.xml (set_title, get_title): Add. - - * pygtk-gtkclipboard.xml (wait_is_rich_text_available) - (wait_for_rich_text, request_rich_text): Add. - -2006-06-03 John Finlay - - * pygtk-gtkentry.xml ("inner-border", "truncate-multiline") - (set_inner_border, get_inner_border): Add. - - * pygtk-gtkcombobox.xml ("popup-shown", "tearoff-title"): Add. - - * pygtk-gtkcellrenderertext.xml ("alignment"): Add. - - * pygtk-gtkbutton.xml ("inner-border", "displace-focus") - ("image-position"): Add new property descriptions. - - * pygtk-gtkcellrendereraccel.xml: Add. - - * pygtk-gtk-classes.xml: Add pygtk-gtkcellrendereraccel.xml - - * pygtk-gtk-constants.xml (GTK CellRendererAccel Mode Constants): Add. - - * pygtk-gtkassistant.xml: Add. - - * pygtk-gtk-classes.xml: Add pygtk-gtkassistant.xml - -2006-06-01 John Finlay - - * pygtk-gtk-constants.xml (Assistant Page Type Constants): Add. - - * pygtk-gdkevent.xml (Attributes): Add common attributes into all - Event type descriptions, Fixes #339825 (Johan Dahlin). - Add new 2.8 attributes. Many small improvements. - - * pygtk-gdk-constants.xml: Add Owner Change constants. - -2006-05-31 John Finlay - - * pygtk-gdkdrawable.xml (draw_layout_line): Add. - - * pygtk-gtkwidget.xml (region_intersect): Add. - - * pygtk-gdkcairocontext.xml (set_source_pixmap, region) - (rectangle): Add. - - * pygtk-gdk-functions.xml (gtk.gdk.region_rectangle): Add link. - - * pygtk-gdkgc.xml (set_clip_region): - - * pygtk-gdkwindow.xml (get_update_area, invalidate_region) - (shape_combine_region, input_shape_combine_mask) - (input_shape_combine_region): Add. - - * pygtk-gdk-classes.xml: Add pygtk-gdk-region.xml. - - * pygtk-gdkregion.xml: Add. - - * pygtk-gdk-constants.xml (overlap-type-constants): Revise description. - -2006-05-29 John Finlay - - * pygtk-gdk-functions.xml (gtk.gdk.event_handler_set): Add link. - (gtk.gdk.set_show_events, gtk.gdk.event_get_graphics_expose) Fix - function signatures. - -2006-05-26 John Finlay - - * pygtk-gtktreeselection.xml (set_select_function): Fix callback - signature. - - * pygtk-gdk-constants.xml (parent-relative-constant): Add. - - * pygtk-gtkstyle.xml (Attributes): Array attribute items are - read-write. - - * pygtk-gtkiconview.xml (set_cursor): Bring description in line with - behavior. Fixes #343039 (Ross Burton) - -2006-05-25 John Finlay - - * pygtk-gtkcombobox.xml (get_active): Extend description for TreeStore - model type active items. Fixes #342555 (Tuomas Vesterinen) - -2006-05-02 John Finlay - - * pygtk-gdkevent.xml (gtk.gdk.event_handler_set): Add description. - - * pygtk-gtk-functions.xml (gtk.init_check) - (add_log_handlers, remove_log_handlers): Add function descriptions. - - * pygtk-gtktreesortable.xml (set_default_sort_func): Add info that - sort_func param can be None. - - * pygtk-gtktreeviewcolumn.xml (cell_get_size): Add cell_area param. - - * pygtk-gdk-constants.xml (Pixbuf Rotation Constants): Add description. - - * pygtk-gdkpixbuf.xml (rotate_simple): Add method description - -2006-05-01 John Finlay - - * pygtk-pangolayoutline.xml (index_to_x): Fix param name. - - * pygtk-gtkcontainer.xml (list_child_properties) - (install_child_property): Add method descriptions. - (gtk.container_class_install_child_property) - (gtk.container_class_list_child_properties): Add deprecation warning. - - * pygtk-gdkdrawable.xml (draw_indexed_image): Add method description. - - * pygtk-pangocairo-functions.xml (context_set_font_options) - (context_get_font_options): Add function descriptions. - - * pygtk-gdkscreen.xml (get_rgba_colormap, gdk_screen_get_rgba_visual): - Add these new method descriptions. - - * pygtk-gdkdragcontext.xml (set_icon_name): Add. - - * pygtk-gdkwindow.xml (set_urgency_hint): Add. - - * pygtk-gtktreeview.xml (get_visible_range): Add. - - * pygtk-gtkwidget.xml (drag_source_add_image_targets) - (drag_source_add_uri_targets, drag_source_set_icon_name): Add. - - * pygtk-gtkdialog.xml (gtk.alternative_dialog_button_order): Add. - - * pygtk-gtk-functions.xml (gtk.alternative_dialog_button_order): - Add. - - * pygtk-gtkclipboard.xml (request_image, wait_for_image, set_image) - (wait_is_image_available): Add. - -2005-11-29 Johan Dahlin - - * pygtk-gtkimage.xml: Remove in arguments from GtkImage getters TOC, - they're a tuple return value in PyGTK. - -2005-10-22 John Finlay - - * pygtk-gtkdialog.xml (gtk.Dialog): Fix typo. - Fixes #319498 (Nikos Kouremenos) - -2005-10-17 John Finlay - - * pygtk-gtkcolorbutton.xml (gtk.ColorButton): Add initializer. - -2005-10-14 John Finlay - - * pygtk-gdk-functions.xml (gtk.gdk.pointer_grab): Fix typo. - Fixes #318857 (Nikos Kouremenos) - -2005-10-07 John Finlay - - * pygtk-gdkevent.xml (Constructor, copy, event_get, event_peek): - Remove references to free() method. Fixes #318228 (Nikos Kouremenos) - - * pygtk2-ref.xml: Change date and bump version number. - -2005-09-20 John Finlay - - * pygtk-gtkmenu.xml (attach_to_menu): Add signatures of detach and - menu position callbacks. Fixes #316780 (Nikos Kouremenos) - - ======== 2.8.1 ============ -2005-09-17 John Finlay - - * pygtk-gobject-functions.xml (spawn_async, child_watch_add) - (main_depth, get_current_time) : Add descriptions. - - * pygtk-gobject-constants.xml (Spawn Flag Constants): Add. - - * pygtk-gtkobject.xml (gtk.binding_entry_remove): Add. - * pygtk-gtk-functions.xml (gtk.binding_entry_add_signal): - Move function description to gtk.Object class description. Fix - varname errors (#316022 Nikos Kouremenos). - - * pygtk2-ref.xml: Change date and bump version number. - - * pygtk-hierarchy.xml: Update. - - * pygtk-pangocairocairocontext.xml : Add class description. - - * pygtk-pangocairocairofontmap.xml : Add class description. - - * pygtk-pangocairo-constants.xml : Add. - - * pygtk-pangocairo-functions.xml : Add. - - * pygtk-pangolayoutline.xml : Add class description. - - * pygtk-pangolayoutiter.xml (get_line): Add. - -2005-09-16 John Finlay - - * pygtk-gdkdrawable.xml (cairo_create): Add. - - * pygtk-pangorenderer.xml: Add pango.Renderer class description. - - * pygtk-gdkpangorenderer.xml: Add gtk.gdk.PangoRenderer class - description. - - * pygtk-pango-constants.xml (pango.RENDER_PART): Add. - - * pygtk-gdkdragcontext.xml (set_icon_name): Remove. - - * pygtk-gdkwindow.xml (set_urgency_hint): Remove. - - * pygtk-gtktreeview.xml (get_visible_range): Remove. - - * pygtk-gtkwidget.xml (drag_source_add_image_targets) - (drag_source_add_uri_targets, drag_source_set_icon_name): Remove. - - * pygtk-gtkdialog.xml (gtk.alternative_dialog_button_order): Remove. - - * pygtk-gtk-functions.xml (gtk.alternative_dialog_button_order): - Remove. - - * pygtk-gtkclipboard.xml (request_image, wait_for_image, set_image) - (wait_is_image_available): Remove. - - * pygtk-gtkaboutdialog.xml (gtk.about_dialog_set_email_hook) - (gtk.about_dialog_set_url_hook): Add description of callback function. - - ======== 2.8.0 ============ -2005-09-07 John Finlay - - * pygtk-gtkwidget.xml (get_for_attach_widget): Add. - -2005-09-06 John Finlay - - * pygtk2-ref.xml: Change date and version number. - - * pygtk-pangolayoutiter.xml (free): - * pygtk-gdkevent.xml (free): - * pygtk-gtktreerowreference.xml (free): - * pygtk-gtktreeiter.xml (free): - * pygtk-gtkrequisition.xml (free): - * pygtk-gtkiconsource.xml (free): - * pygtk-gtkborder.xml (free): - * pygtk-gtkiconinfo.xml (free): Add deprecation warning. - - * pygtk-gdkwindow.xml (set_urgency_hint): Add. - - * pygtk-gtkwindow.xml (set_urgency_hint, get_urgency_hint): Add. - (present_with_time): Add. - - * pygtk-gtktreeview.xml (get_visible_range): Add. - - * pygtk-gtktreeviewcolumn.xml (queue_resize): Add. - - * pygtk-gtktreerowreference.xml (get_icon_name): Add. - - * pygtk-gtktoolbutton.xml (set_icon_name, get_icon_name): Add. - - * pygtk-gtkiconsource.xml (set_icon_name, get_icon_name): Add. - - * pygtk-gtktextiter.xml (forward_visible_cursor_position) - (backward_visible_cursor_position, forward_visible_cursor_positions) - (backward_visible_cursor_positions, forward_visible_line) - (backward_visible_line, forward_visible_lines, backward_visible_lines): - Add. - - * pygtk-gtk-stock-items.xml: Add STOCK_FULLSCREEN, - STOCK_LEAVE_FULLSCREEN and STOCK_INFO. - Fix XMl so RTL icons display correctly. - - * pygtk-gtksizegroup.xml (set_ignore_hidden, get_ignore_hidden): Add. - - * pygtk-gtkscrolledwindow.xml (get_hscrollbar, get_vscrollbar): Add. - - * pygtk-gtkmenushell.xml (set_take_focus, get_take_focus): Add. - - * pygtk-gtkmenubar.xml (set_pack_direction, get_pack_direction) - (set_child_pack_direction, get_child_pack_direction): Add. - - * pygtk-gtkimage.xml (clear): Add. - - * pygtk-gtkiconview.xml (create_drag_icon, enable_model_drag_dest) - (enable_model_drag_source, get_cursor, get_dest_item_at_pos) - (get_drag_dest_item, get_item_at_pos, get_reorderable) - (get_visible_range, scroll_to_path, set_cursor, set_drag_dest_item) - (set_reorderable, unset_model_drag_dest, unset_model_drag_source): Add. - - * pygtk-gtk-constants.xml (IconView Drop Position Constants) - (Pack Direction Constants): Add. - -2005-09-05 John Finlay - - * pygtk-gtkfilechooser.xml (get_do_overwrite, set_do_overwrite) - ("do-confirm-overwrite", confirm-overwrite): Add. - - * pygtk-gtkentrycompletion.xml (set_popup_set_width) - (get_popup_set_width, set_popup_single_match, get_popup_single_match): - Add. - - * pygtk-gtkaboutdialog.xml (get_wrap_license, set_wrap_license): Add. - - * pygtk-gtktextview.xml (get_iter_at_position): - - * pygtk-gtk-stock-items.xml: Add STOCK_DISCONNECT. - - * pygtk-gtkprogressbar.xml (set_ellipsize, get_ellipsize): Add. - - * pygtk-gtkfilefilter.xml (add_pixbuf_formats): Add. - - * pygtk-gtkwidget.xml (drag_source_add_image_targets) - (drag_source_add_uri_targets): Add. - - * pygtk-gtkclipboard.xml (request_image, wait_for_image, set_image) - (wait_is_image_available): - Add. - - * pygtk-gtkdialog.xml (gtk.alternative_dialog_button_order) - (get_response_for_widget): Add description. - - * pygtk-gtkbutton.xml (get_image, set_image): Add descriptions. - - * pygtk-gtkaction.xml (get_accel_path): Add description. - -2005-09-03 John Finlay - - * pygtk-gtkscrolledwindow.xml (set_vadjustment): Fix param name - typo. Fixes #315202 (Nikos Kouremenos) - -2005-09-02 John Finlay - - * pygtk-gladexml.xml (set_custom_handler, bindtextdomain) - (textdomain, set_custom_widget): Add descriptions of these functions. - patch by Gian Mario Tagliaretti. Fixes #164078. - -2005-08-16 John Finlay - - * pygtk-gtkdialog.xml (add_buttons): Fix description of how button - data is passed to the method. - -2005-08-12 John Finlay - - * pygtk-gtkwidget.xml ("drag-data-get"): Fix typo. Fixes #313351 - (Nikos Kouremenos) - -2005-08-09 John Finlay - - * pygtk-gtkscale.xml (set_digits): Note that if "draw-value" is FALSE - set_digits() has no effect. (Steve Langer) - -2005-07-27 John Finlay - - * pygtk-gtkrcstyle.xml (Styles description): Add info about style - property. - - * pygtk-gtkwidget.xml - * pygtk-gtk-functions (widget_class_list_style_properties): Fix - incorrectly named function. - -2005-07-22 John Finlay - - * pygtk-gtktextbuffer.xml: Explicitly identify params that are - TextIters. Fixes #308835. (Nikos Kouremenos) - - * pygtk-gtknotebook.xml (switch-page): Add missing param descriptions. - Fixes #311283 (Nikos Kouremenos) - - * pygtk-gtktreemodelsort.xml - * pygtk-gtktreemodelfilter - * pygtk-gtkliststore.xml - * pygtk-gtktreestore.xml - * pygtk-gtktreemodel.xml (Description): Add reference to tutorial and - TreeModel description of Python protocol support. - -2005-07-21 John Finlay - - * pygtk-pangocolor.xml (pango.Color): remove parse() method and replace - with pango.Colo()r constructor. - -2005-07-19 John Finlay - - * pygtk-gdkwindow.xml (various): Reference GDK constants directly - via links. Fixes #310871 (Nikos Kouremenos) - Fix freedesktop links. - -2005-07-18 John Finlay - - * pygtk-gtkmenu.xml (detach): Fix typo. #310745 (Nikos Kouremenos) - -2005-07-10 John Finlay - - * pygtk-gtkwidget.xml (set_activate_signal) - (set_scroll_adjustments_signal): Add these new PyGTK 2.8 methods. - Fixes #155679. - -2005-07-07 John Finlay - - * pygtk-gtkwidget.xml (render_icon): detail param defaults to None. - Fixes #309724 (Nikos Kouremenos) - - * pygtk-gtktreestore.xml: Fix typos. Fixes #309719 (Nikos Kouremenos) - -2005-07-06 John Finlay - - * pygtk-gobject.xml (Signals): Add description of the "notify" signal. - -2005-06-20 John Finlay - - * pygtk-gtkradioaction.xml (set_group, get_group): - * pygtk-gtkradiobutton.xml (set_group, get_group): - * pygtk-gtkradiomenuitem.xml (set_group, get_group): - * pygtk-gtkradiotoolbutton.xml (set_group, get_group): - set group can specify None to remove item from group. #170514 - -2005-05-29 John Finlay - - * pygtk-gtkdialog.xml (add_buttons): correct description of buttons - param. (Sridhar Ratna) - -2005-05-26 John Finlay - - * pygtk-gtkwindow.xml (set_keep_abaove, set_keep_below, move): - Latest attempt to track freedesktop wm standard link. (Olav Vitters) - -2005-05-22 John Finlay - - * pygtk-gdkpixbuf.xml (save_to_callback): Add. - - * pygtk-gobject-functions.xml (markup_escape_text): Add. - - * pygtk-gtkentrycompletion.xml (get_text_column): Add description. - - * pygtk-gdk-functions.xml (notify_startup_complete) - (get_program_class, set_program_class, get_display) - (get_display_arg_name): Add descriptions of these new functions. - -2005-05-20 John Finlay - - * pygtk-gtksettings.xml (set_string_property, set_long_property) - (set_double_property): Add more info about origin param. - -2005-05-03 John Finlay - - * pygtk-gtkcellrenderer.xml (Properties): Add description of - "sensitive" property. Fixes #302841 (Gustavo Rahal). - -2005-04-27 John Finlay - - * pygtk-gtkiconview.xml (set_columns, get_columns, set_item_width) - (get_item_width, set_spacing, get_spacing, set_row_spacing) - (get_row_spacing, set_column_spacing, get_column_spacing) - (set_margin, get_margin): Add descriptions of these methods and - their associated properties. Fixes #302196 (brett) - - * pygtk-gtktreeview.xml (insert_column_with_attributes): Fix typo - and correct return value description. #302309. (Nick Kouremenos) - - * pygtk-gtktreeviewcolumn.xml (set_sizing): Add link to TreeViewColumn - sizing constants. - -2005-04-13 John Finlay - - * pygtk2-ref.xml: Bump version number and date. - - ======== 2.6.0 ============ -2005-04-10 John Finlay - - * pygtk2-ref.xml: Change date and comment out revhistory. - - * pygtk-gdk-functions.xml (gtk.gdk.threads_init): Remove confusing - and possibly erroneous description. Fixes #172615 (John Ehresman) - -2005-04-08 John Finlay - - * pygtk-gdkkeymap.xml (translate_keyboard_state): Remove extra arg from - example call. (Nikos Kouremenos) - -2005-04-04 John Finlay - - * pygtk-hierarchy.xml: Add new 2.6 classes. (Nikos Kouremenos) - - * pygtk-gtkwindow.xml (set_keep_above): Fix link to "Extended Window - Manager Hints" spec. (Nikos Kouremenos) - -2005-04-03 John Finlay - - * pygtk-gtkdialog.xml (Description, Constructor): Add links to - constants used for response IDs and flags. Fixes #172550 (Johan Dahlin) - -2005-03-31 John Finlay - - * pygtk-gtkcalendar.xml (Description, get_date): Add note about - month value starting at zero. Patch by Gian Mario Tagliaretti. - - * pygtk2-ref.xml: Bump version number and change date. - - ======== 2.5.2 ============ -2005-03-05 John Finlay - - * pygtk2-ref.xml Bump version number and change date. - - * pygtk-introduction (Major Changes) Update description with new - GTK+ 2.6 classes and add gtk.glade module. - -2005-02-28 John Finlay - - * pygtk-gdkcursor.xml (gtk.gdk.Cursor): Rephrase constructor - descriptions to clarify how to make an invisible cursor. Fixes #168755 - (get_display) Fix mangled description. - -2005-02-15 John Finlay - - * pygtk-gtkcellrenderertext.xml (Properties): Add GTK+ 2.6 - properties ellipsize, ellipsize-set, width-chars. Alphabetize entries. - Fixes #167504 (Rafael Villar Burke) - -2005-02-03 John Finlay - - * pygtk-gtkcellrenderer.xml (stop_editing, "editing-started"): - Add descriptions of these PyGTK 2.6 additions. - -2005-01-18 John Finlay - - * pygtk2-ref-xml: Add pygtk-glade-classes.xml. Change date. - - * pygtk-glade-classes.xml - * pygtk-gladexml.xml: Add these files created by Johan Dahlin. - - * pygtk-gladexml-classes.xml: Remove. - -2005-01-15 John Finlay - - * pygtk-gtkentrycompletion.xml (get_text_column): Remove unimplemented - method. - (insert-prefix): Add description of PyGTK2.6 method. - -2005-01-13 John Finlay - - * pygtk-gtklabel.xml (get_angle, set_angle, set_max_width_chars) - (get_max_width_chars): Add descriptions of these PyGTK 2.6 methods. - ("angle", "max-width-chars"): Add descriptions. - - * pygtk-gtk-functions.xml (gtk.get_current_event) - (gtk.get_current_event_state): Add descriptions of these PyGTK2.6 - functions. - - * pygtk-gdkpixmap.xml - * pygtk-gdk-functions.xml (gtk.pixmap_colormap_create_from_xpm) - (gtk.pixmap_colormap_create_from_xpm_d) - (gtk.pixmap_colormap_from_xpm_d): - First arg can be a GdkDrawable. - - * pygtk-gtkcontainer.xml (gtk.container_class_install_child_property): - Add description of this PyGTK2.4 function. Update Description. - - * pygtk-gtk-functions.xml (gtk.container_class_install_child_property): - Add link to. - - * pygtk-gtkwidget.xml ("child-notify", "client-event") - ("proximity-in-event", "proximity-out-event") Add descriptions. - Patch by Gian Mario Tagliaretti. - -2004-12-27 John Finlay - - * pygtk-gdk-constants.xml (event type constants): Fix Typo (Gian Mario - Tagliaretti) - -2004-12-26 John Finlay - - * pygtk-gdkevent.xml (Attributes): CLIENT_EVENT message_type is - writeable. - -2004-12-24 John Finlay - - * pygtk2-ref.xml: Bump version number and pubdate. - - * pygtk-gtkuimanager.xml ("post-activate", "pre-activate"): Add - action param description. - - ======== 2.5.1 ============ -2004-12-23 John Finlay - - * pygtk2-ref.xml Update pubdate and revhistory. - - * pygtk-gdkpixbuf.xml (render_to_drawable, render_to_drawable_alpha): - Add deprecation warning. - - * pygtk-gtkcellview.xml (set_value, set_values, set_cell_data_func): - Remove descriptions of removed methods. - -2004-12-21 John Finlay - - * Various Use xref tags instead of link tags where possible. - - * pygtk2-ref.xml Add revhistory, releaseinfo and edition tags. - Remove version number from title tag and add to releaseinfo tag. - - * pygtk-gtktoolbar.xml (set_style) Add a note about ToolItem label - display when style is TOOLBAR_BOTH_HORIZ. (Gian Mario Tagliaretti) - -2004-12-10 John Finlay - - * pygtk-gtksettings.xml (Description): Change description to indicate - that there is one Settings object per GdkScreen (Rafael Villar Burke) - -2004-12-09 John Finlay - - * pygtk-gtk-stock-items.xml (gtk.stock_add): Add reference to - Modifier Constants docs. - -2004-12-07 John Finlay - - * pygtk-gtkwindow.xml (move): Fix example code. - Fixes #160678. (Gian Mario Tagliaretti) - - * pygtk-gtkwindow.xml (set_type_hint): Add reference to window type - hint constants. Fixes #160669 (Gian Mario Tagliaretti) - (set_gravity, begin_resize_drag): Add reference to constants. - -2004-12-06 John Finlay - - * pygtk-gtk-stock-items.xml Remove duplicate STOCK_WARNING. - Fixes #160584 (Erik Grinaker). - Add GTK+ 2.6 stock icons. - -2004-12-04 John Finlay - - * pygtk-gtkdialog.xml (set_alternative_button_order): Add. - - * pygtk-pangolayoutiter.xml Add. - - * pygtk-pangolayout.xml (get_iter) Add description of this PyGTK 2.6 - method. - - * pygtk-gtkcellview.xml (set_cell_data) Remove. - - * pygtk-gtkfilechooserbutton.xml (set_active, get_active, "active"): - Remove. - -2004-11-20 John Finlay - - * pygtk_gtkdialog.xml (gtk.Dialog) Fix param list bug. - -2004-11-18 John Finlay - - * pygtk-gtkliststore.xml (remove): Document return value differences. - (Doug Quale) - -2004-11-16 John Finlay - - * pygtk2-ref.xml Set pubdate. Bump version number to 2.5.1 - - * pygtk-gtkselectiondata.xml (gtk.target_list_add_image_targets) - (gtk.target_list_add_text_targets) - (gtk.target_list_add_uri_targets): Add descriptions. - - * pygtk-gtkaboutdialog.xml (gtk.about_dialog_set_email_hook) - (gtk.about_dialog_set_url_hook): Add descriptions. - - * pygtk-gtk-functions.xml: Add new AboutDialog, CellView, Image - and Window functions. Fix SelectionData and Settings functions. - - ======== 2.5.0 ============ -2004-11-15 John Finlay - - * pygtk-introduction.xml Update. - - * pygtk2-ref.xml Set pubdate. Bump version number to 2.5.0 - - * pygtk-gdkwindow.xml (set_focus_on_map) - (enable_synchronized_configure, configure_finished): Add descriptions - - * pygtk-gdkdragcontext.xml (drag_drop_succeeded): Add description. - - * pygtk-gdkdisplay.xml (store_clipboard) - (request_selection_notification, supports_clipboard_persistence - (supports_selection_notification): Add descriptions. - - * pygtk-gtktreeselection.xml (get_selected_rows): Remove model - arg - not needed. Fixes #158397 (Ken Harris) - - * pygtk-gtkwindow.xml (gtk.window_set_default_icon_name) - (get_icon_name, set_icon_name, get_focus_on_map, set_focus_on_map): - Add descriptions. - - * pygtk-gtktreeview.xml (set_row_separator_func) - (set_hover_expand, get_hover_expand, set_hover_selection) - (get_hover_selection, set_fixed_height_mode, get_fixed_height_mode) - ("hover-selection", "hover-expand", "fixed-height-mode"): - Add descriptions. - - * pygtk-gtktoolitem.xml (rebuild_menu): Add description - ("create-menu-proxy"): Update description. - - * pygtk-gtktextbuffer.xml (backspace, "tag-table"): Add descriptions. - -2004-11-14 John Finlay - - * pygtk-gtkselectiondata.xml (data_targets_include_image) - (get_uris, set_uris, get_pixbuf, set_pixbuf): Add descriptions. - - * pygtk-gtkmessagedialog.xml (format_secondary_text) - (format_secondary_markup): Add descriptions. - - * pygtk-gtkmenutoolbutton.xml Add. - - * pygtk-gtkwidget.xml (menu_get_for_attach_widget): Add description. - - * pygtk-gtkmenu.xml ("tearoff-state") Add description. - - * pygtk-gtklabel.xml (Description): Update. - (set_ellipsize, get_ellipsize, set_width_chars, get_width_chars) - (get_single_line_mode, set_single_line_mode): Add descriptions. - ("ellipsize, "width-chars", "single-line-mode"): Add descriptions. - - * pygtk-pango-constant.xml Add Ellipsize Mode Constants. - - * pygtk-gtkimage.xml (gtk.image_new_from_icon_name) - (get_icon_name, set_from_icon_name, set_pixel_size, get_pixel_size): - Add descriptions of these PyGTK 2.6 methods and function. - (Description): Update. - -2004-11-13 John Finlay - - * pygtk-gtkiconview.xml Add. - * pygtk-gtk-classes.xml Add pygtk-pygtk-gtkiconview.xml - - * pygtk-gtkicontheme.xml (get_icon_sizes): Add description. - - * pygtk-gtkfilechooser.xml (set_show_hidden, get_show_hidden): - Add description os these PyGTK 2.6 methods. - (Description) Update. - - * pygtk-gtkfilechooserbutton.xml Add. - - * pygtk-gtk-classes.xml Add pygtk-gtkfilechooserbutton.xml - -2004-11-12 John Finlay - - * pygtk-gobject-functions.xml (signal_list_ids, signal_lookup) - (signal_name, signal_query): Add descriptions of these PyGTK 2.6 - methods. - - * pygtk-gtkwidget.xml (set_accelerator): Change wording to clarify - argument value usage. (stan@saticed.me.uk) - -2004-11-10 John Finlay - - * pygtk-gtkentrycompletion.xml (get_text_column) - (set_inline_completion, get_inline_completion) - (set_popup_completion, get_popup_completion): Add descriptions of - these PyGTK 2.6 methods. - - * pygtk-gtkwidget.xml (drag_dest_add_image_targets) - (drag_dest_add_text_targets, drag_dest_add_uri_targets) - (drag_source_add_text_targets, drag_source_get_target_list) - (drag_source_set_target_list): Add descriptions of these PyGTK 2.6 - methods. - - * pygtk-gtkcombobox.xml (get_wrap_width, get_row_span_column) - (get_column_span_column, get_active_text, get_popup_accessible) - (get_row_separator_func, set_row_separator_func, get_add_tearoffs) - (set_add_tearoffs, get_focus_on_click, set_focus_on_click): - Add descriptions of these PyGTK 2.6 methods. - - * pygtk-gtkclipboard.xml (wait_is_target_available) - (set_can_store, store): Add documentation on these PyGTK 2.6 methods - - * pygtk-gtkcellrenderercombo.xml Add. - * pygtk-gtkcellrendererprogress.xml Add. - * pygtk-gtkcellview.xml Add. - * pygtk-gtk-classes.xml Add above files. - -2004-11-09 John Finlay - - * pygtk-gtkaboutdialog.xml Add. - - * pygtk-gtk-classes.xml Add pygtk-gtkaboutdialog.xml - -2004-11-08 Johan Dahlin - - * pygtk-gtkwindow.xml: s/gtk.IN/gtk.WIN/ - -2004-11-08 John Finlay - - * pygtk-gtkwindow.xml (Description, gtk.Window, set_position): - Add link to appropriate Constants description. - -2004-11-01 John Finlay - - * pygtk-gtksettings.xml Add gtk-alternative-button-order and - gtk-modules properties. Fix typo. - -2004-10-28 John Finlay - - * pygtk-gtkcombobox.xml (set_model) model can be and default to None - in PyGTK 2.4.1. - - * pygtk-gtkentrycompletion.xml (set_model) model can be and default - to None in PyGTK 2.4.1. - -2004-10-21 John Finlay - - * pygtk-gtkalignment.xml (gtk.Alignment) Undo changes since new - default values are wrong. - -2004-10-19 John Finlay - - * pygtk-gtkalignment.xml (gtk.Alignment) Note change of default values - in 2.4. (Gustavo Niemeyer) - -2004-10-12 John Finlay - - * pygtk-gtkwidget.xml ("destroy-event") Add description per - Christian Reis. - - * pygtk-gtkstatusbar.xml (push) Note that the message id can be used - with the remove() method. (Rafael Villar Burke) - - * pygtk-gtkwidget.xml (modify_bg) Note that bg can only be - modified on widgets with a gdkWindow. (Rafael Villar Burke) - - * pygtk-gtkadjustment.xml (Description) Fix broken links reported by - Antoon Pardon. - -2004-10-05 John Finlay - - * pygtk2-ref.xml Bump version number and set pubdate - - * pygtk-gdkgc.xml (set_clip_rectangle) Note that the clip origin - is also set to (0, 0) per Rafael Villar Burke. - - ================ 2.4.11 ============== -2004-10-03 John Finlay - - * pygtk2-ref.xml Set pubdate. - - * pygtk-gtkuimanager.xml (insert_action_group) Add details on pos - param. - (add_ui) Additional info on path param. Add info on type values. - (new_merge_id) Add info on merge ids. - - -2004-09-28 John Finlay - - * pygtk-gtkalignment.xml (Description) Fix example description. - -2004-09-18 John Finlay - - * pygtk-gtkactiongroup.xml (add_actions) (add_toggle_actions) - (add_radio_actions) Clarify entry tuple field usage. - -2004-09-15 John Finlay - - * pygtk-gtktreeview.xml (set_search_equal_func) Note that the - comparison function should return FALSE to indicate a match. (Thomas - Mills Hinkle) - -2004-09-06 John Finlay - - * pygtk-gtkaction.xml (Properties) name property is construct only. - -2004-08-11 John Finlay - - * pygtk2-ref.html Bump version number. - - ================ 2.4.10 ============== -2004-08-11 John Finlay - - * pygtk2-ref.xml Set pubdate. - - * pygtk-gdkdisplay.xml pygtk-gdkdisplaymanager.xml - * pygtk-gdkkeymap.xml pygtk-gdkpixbufloader.xml - * pygtk-gdkscreen.xml pygtk-gtkaccelgroup.xml - * pygtk-gtkaction.xml pygtk-gtkactiongroup.xml - * pygtk-gtkadjustment.xml pygtk-gtkbutton.xml - * pygtk-gtkcalendar.xml pygtk-gtkcelleditable.xml - * pygtk-gtkcellrenderer.xml pygtk-gtkcellrenderertext.xml - * pygtk-gtkcellrenderertoggle.xml pygtk-gtkcheckmenuitem.xml - * pygtk-gtkcolorbutton.xml pygtk-gtkcolorselection.xml - * pygtk-gtkcombobox.xml pygtk-gtkcontainer.xml - * pygtk-gtkcurve.xml pygtk-gtkdialog.xml pygtk-gtkeditable.xml - * pygtk-gtkentry.xml pygtk-gtkentrycompletion.xml - * pygtk-gtkexpander.xml pygtk-gtkfilechooser.xml - * pygtk-gtkfontbutton.xml pygtk-gtkhandlebox.xml - * pygtk-gtkicontheme.xml pygtk-gtkimcontext.xml - * pygtk-gtkinputdialog.xml pygtk-gtkitem.xml pygtk-gtklabel.xml - * pygtk-gtklayout.xml pygtk-gtkmenu.xml pygtk-gtkmenuitem.xml - * pygtk-gtkmenushell.xml pygtk-gtknotebook.xml - * pygtk-gtkobject.xml pygtk-gtkoptionmenu.xml pygtk-gtkpaned.xml - * pygtk-gtkplug.xml pygtk-gtkradioaction.xml - * pygtk-gtkradiobutton.xml pygtk-gtkradiomenuitem.xml - * pygtk-gtkrange.xml pygtk-gtkscale.xml - * pygtk-gtkscrolledwindow.xml pygtk-gtksocket.xml - * pygtk-gtkspinbutton.xml pygtk-gtkstatusbar.xml - * pygtk-gtktextbuffer.xml pygtk-gtktexttag.xml - * pygtk-gtktexttagtable.xml pygtk-gtktextview.xml - * pygtk-gtktoggleaction.xml pygtk-gtktogglebutton.xml - * pygtk-gtktoggletoolbutton.xml pygtk-gtktoolbar.xml - * pygtk-gtktoolbutton.xml pygtk-gtktoolitem.xml - * pygtk-gtktreemodel.xml pygtk-gtktreeselection.xml - * pygtk-gtktreesortable.xml pygtk-gtktreeview.xml - * pygtk-gtktreeviewcolumn.xml pygtk-gtkuimanager.xml - * pygtk-gtkviewport.xml pygtk-gtkwidget.xml pygtk-gtkwindow.xml - Fix signal titles. - -2004-08-10 John Finlay - - * pygtk2-ref.xml Undo erroneous check-in - -2004-08-06 John Finlay - - * pygtk2-ref.xml Bump version number and pubdate - - * pygtk-gtkclipboard.xml (Synopsis) Fix typo. (Able Daniel) - - ================ 2.4.9 ============== -2004-08-03 John Finlay - - * pygtk2-ref.xml Update pubdate. - -2004-08-02 John Finlay - - * pygtk-gtkexpander.xml (gtk.expander_new_with_mnemonic) - (gtk.Expander) Note that label is optional and defaults to None. - (set_label) (set_label_widget) Note that label and label_widget - can be None. - - * pygtk-gtkcomboboxentry.xml (gtk.ComboBoxEntry) Default value - for column is -1. - (Description) (set_text_column) - Note that the text column can only be set once. - -2004-07-31 John Finlay - - * pygtk-gtkmenu.xml (Properties) Swap Child and Style property titles. - -2004-07-29 John Finlay - - * pygtk-gtktreeview.xml (get_drag_dest_row) None is a valid return - value. - - * pygtk-gtkliststore.xml (insert_before) (insert_after) - sibling param can be None in PyGTK 2.4. - -2004-07-28 John Finlay - - * pygtk-gtkicontheme.xml (Description) Fix broken ulink tag. - - * pygtk-gtkexpander.xml (Description) Fix bug in example code using - "expanded" property signal. Add note about using "activate" signal. - -2004-07-27 John Finlay - - * pygtk-gdkatom.xml (Description) Add note on support for - Atom and string comparsion support in PyGTK 2.4. - - * pygtk-gdkwindow.xml (property_get) (property_change) Add links for - gtk.gdk.Atom references. Fixes #148569. Thanks to Abel Daniel. - -2004-07-24 John Finlay - - * pygtk-gdk-constants.xml (Filter Return Constants) Add reference to - gtk.gdk.Window.Add_filter() method. - - * pygtk-gdkwindow.xml (add_filter) Add initializer for data. - Describe return value for callback. - -2004-07-23 John Finlay - - * pygtk-gtktreemodel.xml ("row-inserted") ("row-changed") Add - detail on when these are emitted. - -2004-07-22 John Finlay - - * pygtk-gtktextbuffer.xml (add_selection_clipboard) - (remove_selection_clipboard) - (cut_clipboard) (copy_clipboard) (paste_clipboard) - These methods are available in PyGTK 2.2. - - * pygtk-gtktextview.xml (Description) Clipboard access is available - in PyGTK 2.2. - - * pygtk-gtkwidget.xml (get_clipboard) Available in PyGTK 2.2. - -2004-07-21 John Finlay - - * pygtk-gtkclipboard.xml (gtk.Clipboard) Add description of defaults - for optional params. - (gtk.clipboard_get) Add description of this PyGTK 2.4 function. - - * pygtk-gtk-functions.xml - (gtk.clipboard_get) Add link for this PyGTK 2.4 function. - - * pygtk-gtkclipboard.xml (set_with_data) Add description of get_func - and clear_func signatures. - -2004-07-20 John Finlay - - * pygtk-gtktreeviewcolumn.xml (set_sort_column_id) Expand description - of this convenience method. - (set_sort_indicator) Add note re effect of set_sort_column_id() on - use of this method. - -2004-07-19 John Finlay - - * pygtk-gtktreesortable.xml (set_sort_func) Add description of - comaprison function return value. Thanks to Andrew Boie. - - * pygtk-gtktreeview.xml (get_path_at_pos) Return value if no path - is None. - -2004-07-18 John Finlay - - * pygtk-gtkactiongroup.xml (add_actions) - (add_toggle_actions) (add_radio_actions) Document new user_data - param. - -2004-07-15 John Finlay - - * pygtk-gtkbutton.xml Add description of optional use_underline - param added in PyGTK 2.4 - * pygtk-gtktogglebutton.xml Add description of optional use_underline - param added in PyGTK 2.4. Add missing constructor param description. - * pygtk-gtkcheckbutton.xml Add description of optional use_underline - param added in PyGTK 2.4. - * pygtk-gtkradiobutton.xml Add description of optional use_underline - param added in PyGTK 2.4. - * pygtk-gtkcheckmenuitem.xml Add description of optional use_underline - param added in PyGTK 2.4. - * pygtk-gtkmenuitem.xml Add description of optional use_underline - param added in PyGTK 2.4. - * pygtk-gtkradiomenuitem.xml Add description of optional use_underline - param added in PyGTK 2.4. - -2004-07-12 John Finlay - - * pygtk-gdkwindow.xml (set_geometry_hints) Add missing param names. - Thanks to Theo Reed in #147458. - -2004-07-09 John Finlay - - * pygtk-gtkbin.xml ("child") Add description of this attribute. - - * pygtk-gtkcheckmenuitem ("active") Add description of this attribute. - ("indicator-size") Add description of this style property. - - * pygtk-gtkgammadialog.xml (Attributes) Add description of attributes. - -2004-07-08 John Finlay - - * pygtk-gdkcolor.xml (gtk.gdk.parse_color) Add info on exceptions. - - * pygtk-gdkcolormap.xml (alloc_color) Modify description on - exceptions. - -2004-07-04 John Finlay - - * pygtk-pygtkgenerictreemodel.xml Fix broken links. - - * pygtk-gtktreemodel.xml (rows_reordered) ("rows-reordered") - Update these to indicate top level row reordering. - - * pygtk-gdkcolormap.xml (query_color) Add description of this - PyGTK 2.4 method. - -2004-07-03 John Finlay - - * pygtk-gdkpixbuf.xml (subpixbuf) Add description of this new - PyGTK 2.4 method. - - * pygtk-pygtkgenerictreemodel.xml (Description) Add info on new - methods invalidate_iters() and iter_is_valid(). - (invalidate_iters) (iter_is_valid) Add description of these - PyGTK 2.4 methods. - - * pygtk-gtktreeview.xml (get_search_equal_func) Remove. This wasn't - implemented. - - * pygtk-gtktreeview.xml (get_search_equal_func) - (set_search_equal_func) Add description of these PyGTK 2.4 methods. - Fix some typos. - - * pygtk-gobject-functions.xml (io_add_watch) - - * pygtk2-ref.html Bump version number. - - ================ 2.4.8 ============== -2004-07-01 John Finlay - - * pygtk2-ref.xml Change pubdate. - - * pygtk-gdkwindow.xml (set_user_data) Add info about TypeError - exception. - - * pygtk-gtknotebook.xml (append_page) (append_page_menu) - (prepend_page) (prepend_page_menu) (insert_page) (insert_page_menu) - (set_tab_label) (set_menu_label) - Describe default values for tab_label, menu_label and position params. - - * pygtk-gtkcombobox.xml (Description) Fix typo. - * pygtk-introduction.xml Fix broken link - * pygtk-gtkentrycompletion.xml Fix typo. - Fixes #145239 thanks to Olav Vitters - -2004-06-30 John Finlay - - * pygtk-gtktreesortable.xml (Description) - (get_sort_column_id) (set_sort_func_id) Add more detail on the - meaning and use of sort column IDs. - - * pygtk-gtktreesortable.xml (set_default_sort_func) Revise - description of sort_func param. Change - gtk.TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID to -1. - (set_sort_column_id) Change gtk.TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID - to -1. - -2004-06-28 John Finlay - - * pygtk-pygtkgenerictreemodel.xml (Properties) Add description - of the "leak-references" property. - -2004-06-20 John Finlay - - * pygtk-gtkwidget.xml (allocation) (window) These attributes are - writeable in PyGTK 2.4 - * pygtk-gtkwidget.xml - * pygtk-gtk-functions.xml (widget_class_install_style_property) - Add description of this PyGTK 2.4 function. - - * pygtk-gtkcontainer.xml - * pygtk-gtk-functions.xml (container_class_list_child_properties) - Add description of this PyGTK 2.4 function. - - * pygtk-gtkitemfactory.xml (Description) Add link to gtk.UIManager - in the deprecation message. Thanks to Matthew Bull. - - * pygtk-gdkwindow.xml (set_user_data) (get_user_data) Add - description of these PyGTK 2.4 methods. - - * pygtk-gtknotebook.xml (insert_page) (set_tab_label) tab_label - parameter can be None in PyGTK 2.4 and above. - - * pygtk-gtkwidget.xml ("drag-drop") Fix broken link. - - * pygtk-gtkaccelgroup.xml - * pygtk-gtk-functions.xml (accel_groups_from_object) Add - description of this PyGTK 2.4 function. - -2004-06-14 John Finlay - - * pygtk-gtkwidget.xml ("drag-motion") ("drag-leave") ("drag-end") - ("drag-drop") ("drag-data-received") ("drag-data-get") - ("drag-data-delete") ("drag-begin") Update the documentation on - these signals. - -2004-06-13 John Finlay - - * pygtk-gtkicontheme.xml (Description) Fix typo and add exception - handling to example. Thanks to Steve Chaplin. - - * pygtk-gtktextview.xml (Description) Add info about popup menu and - selection clipboards. - -2004-06-12 John Finlay - - * pygtk-gtkimage.xml ("pixbuf") Attribute contains a pixbuf not - a pixmap. Thanks to Christian Reis. - -2004-06-06 Johan Dahlin - - * pygtk-gdkevent.xml : Proper documentation of all attributes, in - sync with latest CVS. Remove the common attribute and only show - them in the beginning of the event list. - -2004-06-02 John Finlay - - * pygtk-gtkpaned.xml (pack1) (pack2) Change references to expand - param to resize. Thanks to Toon Verstraelen. Fixes #143589 - -2004-05-31 John Finlay - - * pygtk-gdkwindow.xml (add_filter) Add description of this PyGTK 2.2 - method. - -2004-05-30 John Finlay - - * pygtk-gtktreemodel.xml ("rows-reordered") Note that new_order is - a gpointer value. - - * pygtk-gtktreeview.xml ("columns-changed") Fix confusing wording. - ("test-collapse-row") ("test-expand-row") Update return value - wording. - - * pygtk-gtktreedragdest.xml (row_drop_possible) Add missing word. - -2004-05-29 John Finlay - - * pygtk-gtktreeview.xml (set_column_drag_function) Add description - of this PyGTK2.4 method. - - * pygtk-pygtkgenerictreemodel.xml (Description) Add self as - a param to all the methods to be implemented and use rowref - instead of iter to avoid confusion. Correct method name from - on_get_iter_next() to on_iter_next() - - * pygtk-gtktreemodel.xml (iter_next) Fix description. - -2004-05-28 John Finlay - - * pygtk-gdkpixbuf.xml (save) - (gdk.pixbuf_new_from_file) - (gdk.pixbuf_new_from_file_at_size) - (gdk.pixbuf_new_from_inline) Note that GError exception is - raised on error. - - * pygtk-gdkpixbufanimation.xml (gtk.gdk.PixbufAnimation) Note that - GError exception is raised on error. - - * pygtk-gdkpixbufloader.xml (gtk.gdk.PixbufLoader) - (gtk.gdk.pixbuf_loader_new_with_mime_type) - (write) (close) Note that GError exception is raised on error. - - * pygtk-gtkiconinfo.xml (load_icon) Note that GError exception - is raised on error. - - * pygtk-gtkicontheme.xml (load_icon) Note that GError exception - is raised on error. - - * pygtk-gtkuimanager.xml (add_ui_from_string) - (add_ui_from_file) Note that GError exception is raised on error. - - * pygtk-gtkwindow.xml (set_icon_from_file) Add. - (gtk.window_set_default_icon_from_file) Note that GError exception - is raised on error. - - * pygtk-gtkfilechooser.xml (add_shortcut_folder) - (remove_shortcut_folder) - (add_shortcut_folder_uri) - (remove_shortcut_folder_uri) Note that GError exception is raised - on error. - - * pygtk-pangoattrlist.xml (pango.parse_markup) Note that GError - exception is raised on error. - -2004-05-27 John Finlay - - * pygtk-gtkcelllayout.xml (set_cell_data_func) Add description - of this PyGTK 2.4 method. - - * pygtk-gtktreeviewcolumn.xml Add note that GtkTreeViewColumn - implements the GtkCellLayout interface in PyGTK 2.4. - -2004-05-25 John Finlay - - * pygtk-introduction.xml Add reference link to www.pygtk.org - Thanks to Rafael Villar Burke. - - * pygtk-gtkentrycompletion.xml (Description) Fix example code. - -2004-05-24 John Finlay - - * pygtk-pygtktreemodelrowiter.xml (next) Fix broken links and name. - -2004-05-22 John Finlay - - * pygtk-gtktreemodelfilter.xml (set_modify_func) Add description. - Add to Description re modify function. - - * pygtk2-ref.xml Bump release number to 2.4.8. - -2004-05-21 John Finlay - - * pygtk-gtktreemodel.xml (iter_n_children) Change NULL to None. - -2004-05-20 John Finlay - - * pygtk-gtktreeviewcolumn.xml (pack_start) - (pack_end) expand param can default to TRUE. - - =========== 2.4.7 ============== -2004-05-19 John Finlay - - * pygtk-pygtktreemodelrow.xml Add. - - * pygtk-pygtktreemodelrowiter.xml Add. - - * pygtk-gtk-classes.xml Add pygtk-pygtktreemodelrow.xml and - pygtk-pygtktreemodelrowiter.xml - - * pygtk2-ref.xml Bump release number to 2.4.7 - - * pygtk-gtktreemodel.xml Add description of mapping and iterator - protocol support. - - =========== 2.4.6 ============== -2004-05-17 John Finlay - - * pygtk-gtk-constants.xml (gtk-selection-mode-constants) Fix typo. - - * pygtk-gtktreemodel.xml (get) Remove dangling tag. - - * pygtk2-ref.xml Bump release number to 2.4.6 - -2004-05-16 John Finlay - - * pygtk-gtktreeselection.xml (set_selection_function) Fix bogus - description of signature of func. - -2004-05-15 John Finlay - - * pygtk-gtktreeselection.xml Fix method links in Description. - (set_mode) Add detail on selection mode and reference to selection - constants. - (selected_foreach) Add note. - -2004-05-13 John Finlay - - * pygtk-gtktreeselection.xml - (get_selected) Add info that treeiter is None if no row selected. - (get_selected_rows) Correct return value is a tuple with - a tree modle and a list of selected paths. - -2004-05-12 John Finlay - - * pygtk-gtktreeview.xml (get_dest_row_at_pos) Change parameters - to x and y from drag_x and drag_y. - -2004-05-10 John Finlay - - * pygtk-gtknotebook.xml (append_page) (append_page_menu) - (prepend_page) (prepend_page_menu) (insert_page) - (insert_page_menu) Add description of return value for PyGTK 2.4 - and above - these return a page index. - -2004-05-07 John Finlay - - * pygtk-gtktreestore.xml (remove) Fix return value explanation. - - * pygtk-gtkliststore.xml (iter_is_valid) (reorder) - (move_before) (move_after) Change first release designation - to PyGTK 2.2. - - * pygtk-gtktreemodel.xml (get) Add description of this PyGTK 2.4 - method. - (get) Add column param to description. - -2004-05-06 John Finlay - - * pygtk-gtktreestore (insert) (insert_after) (insert_before) - (append) (prepend) Add initializers to the Synopsis. - -2004-05-05 John Finlay - - * pygtk-gobject-constants (gobject-type-constants) Fix link. - - * pygtk2-ref.xml Bump release number to 2.4.5 - - ============= 2.4.4 ============= -2004-05-05 John Finlay - - * pygtk-gtkmenuitem.xml (activate) Accidentally commented out - description. - - * pygtk-introduction.xml Unscramble programlisting. - - * pygtk-gobject.xml Fix Attribute formatting. - - * pygtk-gtkaction.xml (get_visible) Fix link. - - * pygtk-gtkbox.xml (pack_start_defaults) - (pack_end_defaults) Add deprecation warnings. Remove references in - Description. - - * pygtk-gtkcombo.xml Fix Properties formatting. - - * pygtk-gtkcontainer.xml Fix Attribute formatting. - - * pygtk-gtkdialog.xml Fix Attribute formatting. - - * pygtk-gtkfileselection.xml Fix Attribute formatting. - - * pygtk-gtkfontselectiondialog.xml Fix Attribute formatting. - - * pygtk-gtkmessagedialog.xml Fix Attribute formatting. - - * pygtk-gtknotebook.xml Fix Attribute formatting. - - * pygtk-gtkrequisition.xml Fix Attribute formatting. - - * pygtk-gtkselectiondata.xml Fix Attribute formatting. - - * pygtk-gtkstyle.xml Fix Attribute formatting. - - * pygtk-gtktextattributes.xml Fix Attribute formatting. - - * pygtk-gtktextbuffer.xml Fix Attribute formatting. - - * pygtk-gtktogglebutton.xml Fix Attribute formatting. - - * pygtk-gtktooltips.xml Fix Attribute formatting. - - * pygtk-gtkwidget.xml Fix Attribute formatting. - - * pygtk-gtkwindow.xml Fix Attribute formatting. - - * pygtk-gdkcolor.xml Fix Attribute formatting. - - * pygtk-gdkdevice.xml Fix Attribute formatting. - - * pygtk-gdkdragcontext.xml Fix Attribute formatting. - - * pygtk-gdkdrawable.xml Fix Attribute formatting. - - * pygtk-gdkevent.xml Fix Attribute formatting. - - * pygtk-gdkgc.xml Fix Attribute formatting. - - * pygtk-gdkpixbuf.xml Fix Attribute formatting. - - * pygtk-gdkrectangle.xml Fix Attribute formatting. - - * pygtk-gdkvisual.xml Fix Attribute formatting. - - * pygtk-pangoattribute.xml Fix Attribute formatting. - - * pygtk-pangocolor.xml Fix Attribute formatting. - - * pygtk-pangoglyphstring.xml Fix Attribute formatting. - - * pygtk2-ref.xml Bump release number to 2.4.4 - -2004-05-04 John Finlay - - * pygtk-gtkmenuitem.xml (toggle_size_request) Add description. - - * pygtk-gtktextiter.xml (backward_find_char) - (forward_find_char) Add descriptions of these methods. - Fix spelling errors. - - * pygtk-gtktextview.xml Spell checked. - - * pygtk-gtktextbuffer.xml Spell checked. - - * pygtk-introduction.xml Add section listing major changes since 1.9. - - * pygtk-gobject-maincontext.xml Spell checked. - - * pygtk-gobject-functions.xml Spell checked. - - * pygtk-gobject-constants.xml Spell checked. - - * pygtk-gtkaccellabel.xml Spell checked. - - * pygtk-gtkaction.xml Spell checked. - -2004-04-30 John Finlay - - * pygtk2-ref.xml Bump release number to 2.4.3 - - * pygtk-gtkaction.xml - * pygtk-gtkactiongroup.xml - * pygtk-gtkborder.xml - * pygtk-gtkclipboard.xml - * pygtk-gtkcolorbutton.xml - * pygtk-gtkcombobox.xml - * pygtk-gtkcomboboxentry.xml - * pygtk-gtkentrycompletion.xml - * pygtk-gtkexpander.xml - * pygtk-gtkfilechooser.xml - * pygtk-gtkfilechooserdialog.xml - * pygtk-gtkfilechooserwidget.xml - * pygtk-gtkfilefilter.xml - * pygtk-gtkfontbutton.xml - * pygtk-gtkiconinfo.xml - * pygtk-gtkicontheme.xml - * pygtk-gtkradioaction.xml - * pygtk-gtktoolbutton.xml - * pygtk-gtkseparatortoolitem.xml - * pygtk-gtktoggleaction.xml - * pygtk-gtktoggletoolitem.xml - * pygtk-gtktoolbutton.xml - * pygtk-gtktoolitem.xml - * pygtk-gtktreemodelfilter.xml - * pygtk-gtktreerowreference.xml - * pygtk-gtkuimanager.xml - Add a note indicating which release of PyGTK the above were new in. - - ============ Release 2.4.2 =============== -2004-04-29 John Finlay - - * pygtk-gtkclipboard.xml Fix notes to correct release availabilities - for object, constructor and methods. - - * pygtk-introduction.xml Update the introduction re: PyGTK 2.4 - and Pango. Also add description of Child Properties. - - * pygtk-gtktreestore.xml (remove) Add return value description. - - * pygtk-gtkliststore.xml (remove) Add return value description. - - * pygtk2-ref.xml Bump release level to 2.4.2 - -2004-04-27 John Finlay - - * pygtk-gobject-function.xml (io_add_watch) Add description of - callback signature. - - * pygtk2-ref.xml Bump release level to 2.4.1 - -===== Release 2.4 ===== - -2004-04-27 John Finlay - - * pygtk-gtkclipboard.xml Fix link to gtk.gdk.atom-intern(). - - * pygtk-gtkexpander.xml Fix link to pango.parse_markup(). - - * pygtk-gtkicontheme.xml Fix link to gtk.gdk.pixbuf_new_from_inline() - function. - - * pygtk-gtkscale.xml Fix link to pango.PIXELS(). - - * pygtk-gtkwidget.xml Fix link to gtk.gdk.Screen. - - * pygtk-gtkwindow.xml Fix link to Gravity Constants. - Remove bogus link to gdk_notify_startup_complete() function. - - * pygtk-gtk-constants.xml Fix links to gtk.gdk.DragConstext.finish() - method. - - * pygtk-pangocolor.xml Fix link to gobject.GBoxed. - - * pygtk-hierarchy.xml Tweak formatting. - - * pygtk-hierarchy.xml Use PyGTK 2.4 hierarchy. - - * pygtk-hierarchy.xml Remove undocumented ATK entries, etc. - - * pygtk-pango-constants.xml Remove reference to unimplemented - functions. - - * pygtk-gdkwindow.xml Remove reference to unimplmented function. - - * pygtk-gdkdrawable.xml Remove reference to unimplmented function. - - * pygtk-gtkaccelgroup.xml Remove reference to unimplemnted function. - - * pygtk-gobject-ginterface.xml Add. - - * pygtk-gobject-classes.xml Add pygtk-gobject-ginterface.xml - - * pygtk2-ref.xml Update date and set version to 2.4 - - * pygtk-gtkclipboard.xml Remove reference to unimplemnted function. - Add initlaizers for user_data in request_* methods. - - * pygtk-gtk-classes Add pygtk-gtk-constants.xml - -2004-04-26 John Finlay - - * pygtk-gdk-constants.xml Add. - - * pygtk-gdk-classes.xml Add pygtk-gdk-constants.xml to list. - - * pygtk-pango-constants.xml Reorganize with a Synopsis and add - a description for each set of constants. - - * pygtk-gobject-constants.xml Add. - - * pygtk-gobject-gboxed.xml Add. - - * pygtk-gobject-gboxed.xml Remove gobject from Ancestry. - - * pygtk-gobject-gboxed.xml Fix typo. - - * pygtk-gobject-maincontext.xml Add. - - * pygtk-gobject-mainloop.xml Add. - - * pygtk-gobject-classes.xml Add pygtk-gobject-gboxed.xml, - pygtk-gobject-maincontext.xml and pygtk-gobject-mainloop.xml to - the list of files to be processed. - - * pygtk-gobject-maincontext.xml Add description of constructor. - - * pygtk-gobject.xml Move Ancestry section ahead of Description. - - * pygtk-gobject.xml Add some attribute descriptions. - - * pygtk-gobject-gpointer.xml Add. - - * pygtk-gtk-constants.xml Add. - -2004-04-25 John Finlay - - * pygtk-pango-functions.xml Add. - - * pygtk-pangolanguage.xml Add pango functions to cover the real - API pre-PyGTK 2.4. - - * pygtk-pango-functions.xml Remove extraneous sections. - - * pygtk-gdkscreen.xml ("size-changed") Add description. - - * pygtk-gtk-stock-items.xml (gtk.stock_lookup) - (gtk.stock_list_ids) Add reference links. - - * pygtk-pango-markup.xml ("fallback") Add description of this - attribute type. - - * pygtk-pangoattribute.xml Reorder attributes. - - * pygtk-pangofontmap.xml (get_shape_engine_type) Add description. - - * pygtk-gdk-classes.xml Add new xml files for processing. - - * pygtk-gdk-functions.xml Add links to all module functions. - - * pygtk-pango-classes.xml Add class references for FontsetSimple - and pango functions for processing. - - * pygtk-pango-constants.xml Add. - - * pygtk-pango-classes.xml Add Pango Constants ref. - - * pygtk-gdkgc.xml Fix typo. - - * pygtk-gdkwindow.xml (get_state) Add to WINDOW_STATE flag list. - -2004-04-24 John Finlay - - * pygtk-pangoattribute.xml Fix typo. Reorder attributes. - - * pygtk-pangoattrlist.xml (filter) Add description of this - PyGTK 2.4 method. - - * pygtk-pangocontext.xml Fix link in Description. - - * pygtk-pangofontface.xml (list_sizes) Add desciption of this - PyGTK 2,4 method. - - * pygtk-pangofontfamily.xml (is_monospace) Add description of this - PyGTK 2.4 method. - - * pygtk-pangofontset.xml Fix typo in Description. - (foreach) Add description of this PyGTK 2.4 method. - - * pygtk-pangofontsetsimple.xml Add. - -2004-04-23 John Finlay - - * pygtk-gdkwindow.xml (set_accept_focus) (get_group) - Add descriptions of these methods. - (gtk.gdk.window_lookup_for_display) - (gtk.gdk.window_foreign_new_for_display) - Add description for these functions. - - * pygtk-gdkatom.xml Fix constructor link. - - * pygtk-gdkdisplaymanager.xml Fix gdkdisplay link. - - * pygtk-gdkkeymap.xml Fix signal links. - Fix keyval_get_keys link - change to lookup_key method. - ("keys-changed") Add description of this GTK+ 2.2 signal. - (gtk.gdk.keyval_to_lower) Fix name. - - * pygtk-gdk-functions.xml - (gtk.gdk.screen_width) (gtk.gdk.screen_height) - (gtk.gdk.screen_width_mm) (gtk.gdk.screen_height_mm) - Remove these descriptions - now with GdkWindow. - Add links to all functions. - - * pygtk-gdkwindow.xml Fix links to gtk.Window.set_wmclass method. - fix reference to gtk.gdk.window_constrain_size function - - * pygtk-gdkvisual.xml (visual_get_best_with_type) - Add missing parameter. - - * pygtk-gdkpixbuf.xml (gtk.gdk.pixbuf_new_from_file_at_size) - Fix parameter name. - - * pygtk-gdk-functions.xml Fix reference to gtk.gdk.atom_intern. - Update the description. Reorder function listing. - - * pygtk-gtkvseparator.xml Fix link to constructor. - - * pygtk-gtkwindow.xml (gtk.window_set_auto_startup_notification) - Add description for this PyGTK 2.2 function. - - * pygtk-gtkobject.xml (gtk.bindings_activate_event) Add. - (gtk.bindings_activate) Fix name. - - * pygtk-gtk-stock-items.xml (gtk.stock_add) - (gtk.stock_lookup) (gtk.stock_list_ids) Add description of - these functions. - - * pygtk-gtk-functions.xml Add links to all functions and update - description. - - * pygtk-gtkwindow.xml Fix typo. - - * pygtk-gtk-functions.xml Add gtkWidget function links. - - * pygtk-pangoattribute.xml (AttrFallback) Add description of this - PyGTK 2.4 function. - - * pygtk-pangoattriter.xml (get_attrs) Add description of this - PyGTK 2.4 method. - -2004-04-22 John Finlay - - * pygtk-gdkpixbuf.xml - (gtk.gdk.pixbuf_new_from_data) (gtk.gdk.pixbuf_new_from_array) - Add descriptions of these PyGTK 2.2 functions. - (gtk.gdk.pixbuf_new_from_file_at_size) - (gtk.gdk.pixbuf_get_formats) (gtk.gdk.pixbuf.get_file_info) - Add descriptions of these PyGTK 2.4 functions. - ("bits-per-sample"( ("colorspace") ("has-alpha") ("height") - ("n-channels") ("pixels") ("rowstride") ("width") - Add descriptions fo these GTK+ 2.4 properties. - - * pygtk-gdkpixbuf.xml (gtk.gdk.pixbuf_get_formats) Tweak description. - - * pygtk-gdkpixbufloader.xml (set_size) (get_format) - Add descriptions for these PyGTK 2.4 methods. - (gtk.gdk.pixbuf_loader_new_with_mime_type) - Add description for this PyGTK 2.4 function - ("size-prepared") Add desription of this GTK+ 2.2 signal. - - * pygtk-gdkpixmap.xml (gtk.gdk.pixmap_foreign_new_for_display) - (gtk.gdk.pixmap_lookup_for_display) Add descriptions for these - PyGTK 2.2 functions. - - * pygtk-gdkrectangle.xml (union) Fix typo. - - * pygtk-gdkscreen.xml Add. - Add purpose description. - - * pygtk-gdkvisual.xml Reorder attribute list. - (get_screen) Add desciption of this PyGTK 2.2 method. - (query_depths) (query_visual_types) - Add description of these PyGTK 2.4 functions. - - * pygtk-gdkwindow.xml (set_keep_above) (set_keep_below) - (set_skip_taskbar) (set_skip_pager) (set_geometry_hints) - (get_deskrelative_origin) (set_icon_list) - (fullscreen) (unfullscreen) - Add descriptions of these methods. - (gtk.gdk.window_at_pointer) - Add description for this function. - -2004-04-21 John Finlay - - * pygtk-gdkgc.xml (get_screen) Add description of this PyGTK 2.2 - method - - * pygtk-gdkkeymap.xml (keymap_get_for_display) Add desciption of - this PyGTK 2.2 function. - (keyval_convert_case) Add description of this PyGTK 2.4 function. - (get_entries_for_keyval) - (get_entries_for_keycode) - (lookup_key) - (translate_keyboard_state) Add descriptions of these PyGTK 2.4 methods. - - * pygtk-gdkevent.xml (gtk.gdk.KEY_PRESS) Add "hardware_keycode" - attribute description for PyGTK 2.2. Add "group" attribute - description for PyGTK 2.4. - -2004-04-20 John Finlay - - * pygtk-gtk-classes.xml Add pygtk-gtk-stock-items.xml to list - - * pygtk-gtk-stock-items.xml Fix reference to stock_network_24.png - and stock_new_24.png - - * pygtk-gdkatom.xml Tweak the description. - - * pygtk-gdkcolormap.xml (get_screen) Add description of - PyGTK 2.4 method. - (gtk.gdk.colormap_get_system) Add reference to - gtk.gdk.Screen.get_system_colormap() method. - - * pygtk-gdkcursor.xml (get_display) Add description of this - PyGTK 2.2 method. - Add descriptions of 2 more constructor signatures for PyGTK 2.4. - - * pygtk-gdkdevice.xml Reorder attribute list. - - * pygtk-gdkatom.xml (atom_intern) Note that value of - only_if_exists is ignored. - - * pygtk-gdkdisplay.xml Add. - - * pygtk-gdkdisplaymanager.xml Add. - - * pygtk-gdkdragcontext.xml (find_window_for_screen) Add description - for this PyGTK 2.2 method. - - * pygtk-gdkdrawable.xml (get_screen) (get_display) (draw_pixbuf) - Add descriptions of these PyGTK 2.2 methods. Update the Description. - - * pygtk-gdkdrawable.xml ("xid") ("handle") - Add attribute descriptions. - - * pygtk-gdkevent.xml (get_state) Add note about availability. - Added description of event masks. - (gtk.gdk.Event) Added for PyGTK 2.2. - - * pygtk-gdkevent.xml (set_screen) (get_screen) Add descriptions of - these PyGTK 2.2 methods. - -2004-04-19 John Finlay - - * pygtk-gtktreeview.xml (expand_to_path) (map_expanded_rows) - (set_cursor_on_cell) - Add descriptions of these methods added in PyGTK 2.2 - ("fixed-height-mode") ("even-row-color") ("odd-row-color") - Add descriptions of these properties. - Add signal return value descriptions as needed. - - * pygtk-gtktreeviewcolumn.xml (set_expand) (get_expand) - (cell_get_position) - Add description of these PyGTK 2.4 methods. - (focus_cell) Add description of this PyGTK 2.2 method. - ("expand") Add description of this GTK+ 2.4 signal. - - * pygtk-gtkuimanager.xml Add. - - * pygtk-gtkvbuttonbox.xml Tweak description. - - * pygtk-gtkwidget.xml (set_no_show_all) (get_no_show_all) - (queue_resize_no_redraw) (can_activate_accel) - (get_clipboard) (get_screen) (has_screen) (get_display) - (get_root_window) - Add descriptions of these PyGTK 2.4 methods. - (gtk.widget_list_style_properties) - Add description of this PyGTK 2.4 function. - (get_size_request) Add description. - (get_accessible) Remove description. - ("can-activate-accel") ("screen-changed") ("key-release-event") - Add descriptions for these signals. - - * pygtk-gtkwindow.xml (set_screen) (get_screen) (is_active) - (has_toplevel_focus) (activate_key) (propagate_key_event) - (fullscreen) (unfullscreen) (set-keep-above) (set-keep-below) - Add description for these PyGTK 2.2 and 2.4 methods. - ("accept-focus") ("decorated") ("gravity") ("role") - ("has-toplevel-focus") ("is-active") ("screen") ("skip-pager-hint") - (skip-taskbar-hint") ("type-hint") - Add decriptions for these GTK+ 2.2 adn 2.4 properties. - (gtk.set_default_icon) (gtk.set_default_icon_from_file) - Add descriptions of these functions. - - * pygtk-gtktoolitem.xml Fix reference to gtk.Button.set_relief() - method. - - * pygtk-gtktoolbar.xml Fix reference to gtk.SeparatorToolItem class. - - * pygtk-gtkseparatortoolitem.xml Fix reference to - gtk.SeparatorToolItem class. - - * pygtk-gtkscale.xml Fix reference to get_layout_offsets() method. - - * pygtk-gtknotebook.xml Fix formatting error. - - * pygtk-gtk-classes.xml Add missing pygtk-gtkiconinfo.xml include. - - * pygtk-gtkwindow.xml Fix references to gtk.Widget - "window-state-event" signal. - - * pygtk-gdkatom.xml Fix reference to gtk.atom_intern() constructor. - - * pygtk-gtkwidget.xml Fix reference to - gtk.widget_set_default_direction() function. Fix references and id - for gtk.widget_list_style_properties function. - - * pygtk-gtkicontheme.xml Fix reference to gtk.pixbuf_new_from_inline - function. - - * pygtk-gtk-stock-items.xml Add. - -2004-04-18 John Finlay - - * pygtk-gtktreemodelfilter.xml Add. - - * pygtk-gtktreemodelsort.xml (iter_is_valid) Add description of - PyGTK 2.2 method. - - * pygtk-gtktreerowreference.xml Add. - - * pygtk-gtktreeselection.xml (get_selected_rows) - (count_selected_rows) (unselect_range) Add new methods for PyGTK 2.2 - - * pygtk-gtktreestore.xml (iter_is_valid) (reorder) (swap) - (move_after) (move_before) Add descriptions for these PyGTK 2.2 - methods. - -2004-04-17 John Finlay - - * pygtk-gtktoolbutton.xml Add. - - * pygtk-gtktoolitem.xml Add. - - * pygtk-gtktoolitem.xml (set_tooltip) tip_text and tip_private can - default to None. - - * pygtk-gtkwindow.xml (tooltips_get_info_from_tip_window) Add - description of PyGTK 2.4 method. - - * pygtk-gtktreeiter.xml Add class info for TreeIter creation methods. - - * pygtk_gtktreemodel.xml (filter_new) Add description of new - PyGTK 2.4 method. - -2004-04-16 John Finlay - - * pygtk-gtksocket.xml ("plug-removed") Add return value description - for this signal handler. - - * pygtk-gtkspinbutton.xml ("input") ("output") Add return value - descriptions. Reorder property descriptions. - - * pygtk-gtkspinbutton.xml ("input") ("output") Fix typos. - - * pygtk-gtkstatusbar.xml ("has-resize-grip") Add GTK+ 2.4 property - description. - - * pygtk-gtk-functions.xml (gtk.draw_insertion_cursor) Add. - - * pygtk-gtktable.xml (attach_defaults) Remove - it's deprecated. - Reorder property descriptions. - - * pygtk-gtktextbuffer.xml (create_tag) Remove keyword role. - (select_range) (add_selection_clipboard) (remove_selection_clipboard) - (cut_clipboard) (copy_clipboard) (paste_clipboard) Add for PyGTK 2.4 - - * pygtk-gtktextiter.xml (forward_visible_word_end) - (backward_visible_word_start) (forward_visible_word_ends) - (backward_visible_word_starts) Add descriptions for PyGTK 2.4 - - * pygtk-gtktexttag.xml Reorder property descriptions. - ("event") Add return value description. - - * pygtk-gtktexttagtable.xml (foreach) Add description for PyGTK 2.4 - - * pygtk-gtkaccelgroup.xml - pygtk-gtkpaned.xml - pygtk-gtkscrolledwindow.xml - pygtk-gtkspinbutton.xml - pygtk-gtktreeview.xml - pygtk-gtkwidget.xml - pygtk-gtkwindow.xml Make keycombos simultaneous. - - * pygtk-gtktextview.xml ("move-viewport") ("select-all") Add - descriptions of these signals for GTK+ 2.4 and 2.2. - ("accepts-tab") ("overwrite") Add descriptions of these GTK+ 2.4 - properties. - (set_accepts_tab) (get_accepts_tab) (set_overwrite) (get_overwrite) - Add descriptions of these PyGTK 2,4 methods. - - * pygtk-gtktoggleaction.xml Add. - - * pygtk-gtktoggletoolbutton.xml Add. - - * pygtk-gtktoolbar.xml Add new GTK+ 2.4 method descriptions. - Add deprecation warnings for old toolbar methods. - -2004-04-15 John Finlay - - * pygtk-gtkmessagedialog.xml (set_markup) Add description of this - PyGTK 2.4 method. - - * pygtk-gtknotebook.xml (get_n_pages) Add description. - Add GTK+2.4 style properties - Add return value description for "focus-tab" and "select-page" - signals. - - * pygtk-gtkoptionmenu.xml Added deprecation warning for PyGTK 2.4 - - * pygtk-gtkpaned.xml (get_child1) (get_child2) Add descriptions of - these PyGTK 2.4 methods. - ("max-position") ("min-position") Add descriptions of these GTK+ 2.4 - properties. - ("resize") ("shrink") Add descriptions of these GTK+ 2.4 child - properties. - Add return value description for signals. - - * pygtk-gtkplug.xml (gtk.plug_new_for_display) Add description. - (construct) Add warning - method not available since PyGTK 2.2 - - * pygtk-gtkradioaction.xml Add. - - * pygtk-gtkradiobutton.xml Add description of "group-changed" signal - for GTK+ 2.4 - - * pygtk-gtkradiomenuitem.xml Add description of "group-changed" signal - for GTK+ 2.4 - - * pygtk-gtkradioaction.xml Fix description of "group" property. - - * pygtk-gtkradiotoolbutton.xml Add. - - * pygtk-gtkrange.xml Reorder property descriptions. - - * pygtk-gtkrcstyle.xml Add gtk.rc_reset_style() function for PyGTK 2.4 - - * pygtk-gtkscale.xml (get_layout) (get_layout_offsets) Add - descriptions for PyGTK 2.4 - - * pygtk-gtkscrollbar.xml Reorder property descriptions. - - * pygtk-gtkscrolledwindow.xml Add "scrollbar-spacing" style property - available in GTK+ 2.2 - - * pygtk_gtkselectiondata.xml Add function description of - gtk.selection_owner_set_for_display(). - - * pygtk_gtkseparatortoolitem.xml Add. Add purpose description - - * pygtk-gtksettings.xml (gtk.settings_get_for_screen) Add description. - Add various properties for GTK+ 2.2 and 2.4 - -2004-04-14 John Finlay - - * pygtk-gtkiconsource.xml Add gtk.icon_size_lookup_for_settings() - function. - - * pygtk-gdkpixmap.xml Fix description and parameter list of - gtk.pixmap_create_from_data() function. - - * pygtk-gtkicontheme.xml Add. - - * pygtk-gtkiconinfo.xml Add. - - * pygtk-gtkinvisible.xml Add the set_screen() and get_screen() methods - available in PyGTK 2.2 - - * pygtk-gtkitemfactory.xml Add deprecation warning. - - * pygtk-gtklabel.xml Fix typo. - - * pygtk-gtkliststore.xml (set_column_types) - (iter_is_valid) (reorder) (swap) (move_after) (move_before) Add - descriptions for these methods. - - * pygtk-gtkmenu.xml (set_screen) (attach) (set_monitor) Add - descriptions for these methods. - - * pygtk-gtkmenu.xml ("move-scroll") Add description for this GTK+ 2.2 - signal. Add descriptions for the style and child properties added in - GTK+ 2.4 - - * pygtk-gtkmenuitme.xml ("toggle-size-allocate") Fix typo. - - * pygtk-gtkmenushell.xml (select_first) (cancel) Add descriptions - for these methods in PyGTK 2.2 and 2.4 respectively. - -2004-04-13 John Finlay - - * pygtk-gtkexpander.xml Add. - - * pygtk-gtkimcontext.xml Add return value description for - "delete-surrounding" and "retrieve-surrounding" signals. - - * pygtk-gtkclipboard.xml Add the request_* and wait_for_targets - method descriptions. - -2004-04-10 John Finlay - - * pygtk-gtkactiongroup.xml (add_toggle_actions) Add description of - is_active item in toggle action tuple. - (add_radio_actions) Add description of value and on_change parameters. - Remove callback description from radio action tuple. - - * pygtk-gdkatom.xml Add. - - * pygtk-gdk-functions.xml (atom_intern) Remove. - Fix dumb error. - - * pygtk-gtkclipboard.xml Add. - - * pygtk-gdk-classes.xml Add pygtk-gdkatom.xml. - Hide unimplemented new classes - - * pygtk-gtk-classes Hide unimplemented new classes - - * pygtk-gtkaccelgroup.xml - * pygtk-gtkbutton.xml - * pygtk-gtkentrycompletion.xml - * pygtk-gtkfilechooserdialog.xml - * pygtk-gtkfontselectiondialog.xml - * pygtk-gtkgenericcellrenderer.xml - * pygtk-gdkatom.xml Fix some link errors. - -2004-04-09 John Finlay - - * pygtk-gtkaction.xml Add. - - * pygtk-gtkactiongroup.xml Add. - - * pygtk-gtkborder.xml Add. - -2004-04-08 John Finlay - - * pygtk-gtkfilefilter.xml Fix links to get_needed() method. Fix custom - function signature and description. - - * pygtk-gtkfontbutton.xml Add. - - * pygtk-gtkfontbutton.xml Add purpose description. Fix - GtkFontSelectionDialog links. - - * pygtk-gtkfontselectiondialog.xml Add note about lack of font filters, - etc. in GTK+ 2.2 and above. - - * pygtk-gtkhandlebox.xml Add "snap-edge-set" property description. - GTK+ 2.2 and above. - - * pygtk-gtkhbuttonbox.xml Tweak the description. - -2004-04-07 John Finlay - - * pygtk-gtkfilechooser.xml Add. - * pygtk-gtkfilechooserdialog.xml Add. - * pygtk-gtkfilechooserwidget.xml Add. - * pygtk-gtkfilefilter.xml Add. - - * pygtk-gtkfilefilter.xml (add_custom) Doesn't take keyword args. - -2004-04-06 John Finlay - - * pygtk-gtkeventbox.xml Add new methods: set_visible_window(), - get_visible_window(), set_above_child() and get_above_child(); and - properties: "above-child" and "visible-window" for PyGTK 2.4 and - GTK+ 2.4. - -2004-04-05 John Finlay - - * pygtk-gtkcomboboxentry.xml Add. - - * pygtk-gtkcontainer.xml Fix bug in synopsis of get_focus_chain(). - - * pygtk-gtkcontainer.xml Property "child" is read-only. - - * pygtk-gtkdrawingarea.xml Tweak the description. - - * pygtk-gtkcombobox.xml - * pygtk-gtkcomboboxentry.xml Add gtk.CellLayout to class synopsis. - - * pygtk-gtkeditable.xml Tweak description to specify it's an interface. - - * pygtk-gtkentry.xml Add PyGTK 2,4 methods set_alignment(), - get_alignment(), set_completion(), get_completion(). Also add GTK+2.4 - property "xalign" - - * pygtk-gtkentrycompletion.xml Add. - -2004-04-04 John Finlay - - * pygtk-gtkcombobox.xml Add. - - * pygtk-gtkcelllayout.xml. Add. - -2004-04-03 John Finlay - - * pygtk-gtkcheckbutton.xml Fix formatting of Ancestry description. - - * pygtk-gtkcheckmenuitem.xml Minor reformatting. - - * pygtk-gtkcolorbutton.xml Add description of GtkColorButton in - GTK+ 2.4 and PyGTK 2.4. - - * pygtk-gtkcombo.xml Added deprecation warning for PyGTK 2.4. - -2004-04-02 John Finlay - - * pygtk-gtkbutton.xml Added descriptions of "focus-on-click", "xalign" - and "yalign" propertiees for GTK+ 2.4. Added descriptions of the - set_alignment(), get_alignment(), set_focus_on_click() and - get_focus_on_click() methods available in PyGTK 2.4 - - * pygtk-gtkbuttonbox.xml Add description of get_child_secondary() - method available in PyGTK 2.4. - - * pygtk-gtkcalendar.xml Add descriptions of get_display_options() and - set_display_options() methods available in PyGTK 2.4. Add deprecation - warning for display_options() method. - - * pygtk-gtkcellrenderer.xml Add description of editing_canceled() - method available in PyGTK 2.4. Add description of "editing-canceled" - signal available in GTK+ 2.4. - -2004-04-01 John Finlay - - * pygtk-gtkaccelgroup.xml Added descriptions of connect_by_path() - method, and accel_map_add_entry(), accel_map_lock_path and - accel_map_unlock_path() functions. - - * pygtk-gtkalignment.xml Fix small bug in get_padding() description. - -2004-03-31 John Finlay - - * pygtk-gtkalignment.xml Add description of set_padding() and - get_padding() methods available in PyGTK 2.4 - -2004-03-30 John Finlay - - * pygtk-gtkcellrenderertoggle.xml Add description of "inconsistent" - property added in GTK+ 2.2. Update other property descriptions. - - * pygtk-gtkcheckmenuitem.xml Add description of "draw-as-radio" - property fro GTK+ 2.4 and add PyGTK2.4 methods set_draw_as_radio() and - get_draw_as_radio(). - -2004-03-29 John Finlay - - * pygtk-gtkaccelgroup.xml Add documentation on the connect() method. - Add a description of the return value for the "accel-activate" signal. - - * pygtk-gtkadjustment.xml Add description of properties available in - GTK+2.4. Reformat the Attributes description. - - * pygtk-gtkalignment.xml Add description of padding properties - available in GTK+ 2.4. - - * pygtk-gtkaccessible.xml Added one line description. - - * pygtk-gtkcalendar.xml Added description of properties available in - GTK+2.4. - - * pygtk-gtkcellrenderertext.xml Added description of properties - available in GTK+2.4. - -2004-03-25 John Finlay - - * pygtk-gdkwindow.xml Remove description of atom_intern function. - - * pygtk-gdk-function.xml Add description of atom_intern function. Fixes - #137935 (thanks to Erik Grinaker). - - * pygtk-gtkdrawingarea.xml Add explanation that drawing is done on the - contained gtk.gdk.Window using the gdk.Drawable methods. Fixes #136297. - (thanks to pachi@mmn-arquitectos.com) - -2004-03-22 John Finlay - - * pygtk-gtkmessagedialog.xml (MessageDialog) Remove - gtk.DIALOG_NO_SEPARATOR from the list of valid flags. Fixes #136984. - (thanks to j.jordens and Eric Grinaker). - -2004-04-13 Erik Grinaker - - * pygtk-gdkwindow.xml (raise): Changed name of raise() to - raise_(), and added a note to explain this is because - raise is a reserved Python keyword. - -2004-01-28 John Finlay - - * pygtk-gtktogglebutton.xml (get_mode) - (set_mode) Clarify the use of these methods as applied to checkbuttons - and radiobuttons and the results. (thanks to Antonio A. A.) - - * pygtk2-ref.xml Change date. Version number to 1.9 - -2003-11-18 John Finlay - - * pygtk-gtktreemodel.xml (foreach) Add description of function - signature. - - -2003-10-07 John Finlay - - * pygtk2-ref.xml Change date. Version number to 1.8 - - * pygtk-gtkcellrenderertext.xml Fix signature an ddescription of the - "edited" signal to add path and new_text arguments. (thanks to Steve - Chaplin) - - * pygtk-gtkcellrenderertoggle.xml Fix signature and description of - "toggled" signal to add path argument. (thanks to Steve Chaplin) - -2003-08-25 John Finlay - - * pygtk-gtkadjustment.xml (set_all) Remove deprecation note and add - keyword designations. - - * pygtk-gdkpixbufloader.xml (write) Set initializer on parameter count - and change description to indicate how count is used. - - * pygtk-gtktextbuffer.xml (create_tag) tag_name defaults to None. - -2003-08-23 John Finlay - - * pygtk-gdkpixbuf.xml Note that pixel_array attribute array contents - can be changed. - - * pygtk-gdk-functions.xml (threads_init) Remove comments about broken - threads imiplementation which is now fixed in 1.99.17+. - - * pygtk-gtktreemodel.xml (rows_reordered) Add description of this - method. - - * pygtk-gtktreeview.xml (enable_model_drag_source) - (emable_model_drag_dest) - (get_drag_dest_row) - (get_dest_row_at_pos) - (enable_model_drag_source) - (enable_model_drag_dest) Add descriptions of these methods. - - * pygtk-gtkwidget.xml (drag_source_set) Fix typo. - - * pygtk-gtkdialog.xml (add_buttons) Add description of this method. - - * pygtk-gobject.xml (handler_is_connected) Add description of this - method. - - * pygtk2-ref.xml Change date. Version number to 1.7 - - * pygtk-gtkdialog.xml (add_buttons) Fix typo in synopsis. - - * pygtk-gobject.xml (handler_is_connected) Fix link in synopsis. - - * pygtk-gdkwindow.xml Fix link references to - function-gdk--window-foreign-new and function-gdk--visual-get-system. - -2003-07-20 John Finlay - - * pygtk2-ref.xml Change date. Version number to 1.6 - - * pygtk-gdkwindow.xml (gtk.gdk.Window) Add documentation on the - constructor. - -2003-07-17 John Finlay - - * pygtk2-ref.xml Change date and version number to 1.5. - - * pygtk-gtkeditable.xml Remove extraneous "widget" parameter from - "insert-text" signal description. Add description indicating position - can't be retrieved in PyGTK. - -2003-07-16 John Finlay - - * pygtk2-ref.xml Change date and version number to 1.4. - - * pygtk-gtkitmefactory.xml (gtk.ItemFactory) - (construct) Change container_type to refer to PyGTK types: gtk.Menu, - gtk.MenuBar and gtk.OptionMenu. - -2003-07-15 John Finlay - - * pygtk2-ref.html Change to version 1.3 - - * pygtk-gtkliststore.xml (insert) - (insert_after) - (insert_before) - (prepend) - (append) Add an entry for the return value for these methods. - - * pygtk-gtktoolbar.xml (insert_stock) Remove extraneous stock_id entry. - -2003-07-12 John Finlay - - * pygtk2-ref.html Change version number. - - * pygtk-pangoattriter.xml Change to pango.AttrIterator to match - GTK+and PyGTK naming. - - * pygtk-pangoattrlist.xml (get_iterator) Change to reference - pango.AttrIterator. - -2003-07-11 John Finlay - - * pygtk2-ref.xml Change date tag to pubdate tag so it will be - displayed. - - * pygtk-pangolayout.xml Correct the references to the Pango Markup - Language reference page. - - * pygtk-gtk-functions.xml Fix incorrect reference to gtk.Object class. - - * pygtk-gtktextview.xml Remove reference to pango.TabArray.free - - * Pango Add content to pango class files (they were empty): - pygtk-pangoattribute.xml - pygtk-pangoattriter.xml - pygtk-pangoattrlist.xml - pygtk-pangocolor.xml - pygtk-pangocontext.xml - pygtk-pangofontdescription.xml - pygtk-pangofontface.xml - pygtk-pangofontfamily.xml - pygtk-pangofontmap.xml - pygtk-pangofontmetrics.xml - pygtk-pangofontset.xml - pygtk-pangofont.xml - pygtk-pangoglyphstring.xml - pygtk-pangolanguage.xml - pygtk-pangolayout.xml - pygtk-pango-markup.xml - pygtk-pangotabarray.xml - - * pygtk-pango-classes.xml Add include for: - pygtk-pangoattribute.xml - pygtk-pangoattriter.xml - pygtk-pango-markup.xml - - * pygtk2-ref.html Update date and version number. Add pango class - reference chapter. - -2003-07-10 John Finlay - - * Pango Add pango class files: - pygtk-pangoattribute.xml - pygtk-pangoattriter.xml - pygtk-pangoattrlist.xml - pygtk-pangocolor.xml - pygtk-pangocontext.xml - pygtk-pangofontdescription.xml - pygtk-pangofontface.xml - pygtk-pangofontfamily.xml - pygtk-pangofontmap.xml - pygtk-pangofontmetrics.xml - pygtk-pangofontset.xml - pygtk-pangofont.xml - pygtk-pangoglyphstring.xml - pygtk-pangolanguage.xml - pygtk-pangolayout.xml - pygtk-pango-markup.xml - pygtk-pangotabarray.xml - - * ChangeLog Add this change log - - * pygtk2-ref.xml Include ChangeLog info in reference. - - * pygtk-gtkliststore.xml (insert) - (insert_before) - (insert_after) - (prepend) - (append) Fix description of row arg to be a sequence of values. - - * pygtk-gtktreestore.xml (insert) - (insert_before) - (insert_after) - (prepend) - (append) Fix description of row arg to be a sequence of values. - -2003-07-02 John Finlay - - * pygtk2-ref.xml Update date. - - * pygtk-gdk-functions.xml (gtk.gdk.threads_init) Update - description of thread support. - - * ChangeLog Add change log. diff --git a/docs/reference/entities.docbook.in b/docs/reference/entities.docbook.in deleted file mode 100644 index be788f85..00000000 --- a/docs/reference/entities.docbook.in +++ /dev/null @@ -1 +0,0 @@ - diff --git a/docs/reference/pygtk-atk-classes.xml b/docs/reference/pygtk-atk-classes.xml deleted file mode 100644 index eb5f9f6c..00000000 --- a/docs/reference/pygtk-atk-classes.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - The atk Class Reference - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/pygtk-atk-constants.xml b/docs/reference/pygtk-atk-constants.xml deleted file mode 100644 index 4ef98642..00000000 --- a/docs/reference/pygtk-atk-constants.xml +++ /dev/null @@ -1,1464 +0,0 @@ - - - - - - atk Constants - the built-in constants of the atk module - - - - Synopsis - - - - - - - - - - - - - - - - Description - - - Atk Coord Type Constants - - The Atk Coord Type constants specify how xy coordinates are to - be interpreted. Used by methods such as atk.Component.get_position() - and atk.Text.get_character_extents() - - - - atk.XY_SCREEN - - specifies xy coordinates relative to the - screen - - - - atk.XY_WINDOW - - specifies xy coordinates relative to the widget's - top-level window - - - - - - - - Atk Layer Constants - - The Atk Layer constants specify the layer of a component. These - enumerated "layer values" are used when determining which UI rendering - layer a component is drawn into, which can help in making - determinations of when components occlude one another. - - - - atk.LAYER_INVALID - - The object does not have a layer - - - - atk.LAYER_BACKGROUND - - This layer is reserved for the desktop - background - - - - atk.LAYER_CANVAS - - This layer is used for Canvas components - - - - atk.LAYER_WIDGET - - This layer is normally used for components - - - - atk.LAYER_MDI - - This layer is used for layered components - - - - atk.LAYER_POPUP - - This layer is used for popup components, such as - menus - - - - atk.LAYER_OVERLAY - - This layer is reserved for future use. - - - - atk.LAYER_WINDOW - - This layer is used for toplevel windows. - - - - - - - - Atk Relation Type Constants - - The Atk Relation Type constants specify the type of the - relation. - - - - atk.RELATION_NULL - - Not used, represents "no relationship" or an error - condition. - - - - atk.RELATION_CONTROLLED_BY - - Indicates an object controlled by one or more target - objects. - - - - atk.RELATION_CONTROLLER_FOR - - Indicates an object is an controller for one or more - target objects. - - - - atk.RELATION_LABEL_FOR - - Indicates an object is a label for one or more target - objects. - - - - atk.RELATION_LABELLED_BY - - Indicates an object is labelled by one or more target - objects. - - - - atk.RELATION_MEMBER_OF - - Indicates an object is a member of a group of one or - more target objects. - - - - atk.RELATION_NODE_CHILD_OF - - Indicates an object is a cell in a treetable which is - displayed because a cell in the same column is expanded and - identifies that cell. - - - - atk.RELATION_FLOWS_TO - - Indicates that the object has content that flows - logically to another atk.Object - in a sequential way, (for instance text-flow). - - - - atk.RELATION_FLOWS_FROM - - Indicates that the object has content that flows - logically from another atk.Object - in a sequential way, (for instance text-flow). - - - - atk.RELATION_SUBWINDOW_OF - - Indicates a subwindow attached to a component but - otherwise has no connection in the UI hierarchy to that - component. - - - - atk.RELATION_EMBEDS - - Indicates that the object visually embeds another - object's content, i.e. this object's content flows around - another's content. - - - - atk.RELATION_EMBEDDED_BY - - Inverse of atk.RELATION_EMBEDS, - indicates that this object's content is visualy embedded in - another object. - - - - atk.RELATION_POPUP_FOR - - Indicates that an object is a popup for another - object. - - - - atk.RELATION_PARENT_WINDOW_OF - - Indicates that an object is a parent window of another - object. - - - - atk.RELATION_LAST_DEFINED - - Not used, this value indicates the end of the - enumeration. - - - - - - - - Atk Role Constants - - The Atk Role constants describes the role of an object. These - are the built-in enumerated roles that UI components can have in - ATK. Other roles may be added at runtime, so an AtkRole >= - atk.ROLE_LAST_DEFINED is not necessarily an - error. - - - - atk.ROLE_INVALID - - Invalid role - - - - atk.ROLE_ACCEL_LABEL - - A label which represents an accelerator - - - - atk.ROLE_ALERT - - An object which is an alert to the user - - - - atk.ROLE_ANIMATION - - An object which is an animated image - - - - atk.ROLE_ARROW - - An arrow in one of the four cardinal directions - - - - atk.ROLE_CALENDAR - - An object that displays a calendar and allows the user - to select a date - - - - atk.ROLE_CANVAS - - An object that can be drawn into and is used to trap - events - - - - atk.ROLE_CHECK_BOX - - A choice that can be checked or unchecked and provides - a separate indicator for the current state - - - - atk.ROLE_CHECK_MENU_ITEM - - A menu item with a check box - - - - atk.ROLE_COLOR_CHOOSER - - A specialized dialog that lets the user choose a - color - - - - atk.ROLE_COLUMN_HEADER - - The header for a column of data - - - - atk.ROLE_COMBO_BOX - - A list of choices the user can select from - - - - atk.ROLE_DATE_EDITOR - - An object whose purpose is to allow a user to edit a - date - - - - atk.ROLE_DESKTOP_ICON - - An inconifed internal frame within a - DESKTOP_PANE - - - - atk.ROLE_DESKTOP_FRAME - - A pane that supports internal frames and iconified - versions of those internal frames - - - - atk.ROLE_DIAL - - An object whose purpose is to allow a user to set a - value - - - - atk.ROLE_DIALOG - - A top level window with title bar and a border - - - - atk.ROLE_DIRECTORY_PANE - - A pane that allows the user to navigate through and - select the contents of a directory - - - - atk.ROLE_DRAWING_AREA - - An object used for drawing custom user interface - elements - - - - atk.ROLE_FILE_CHOOSER - - A specialized dialog that lets the user choose a - file - - - - atk.ROLE_FILLER - - A object that fills up space in a user - interface - - - - atk.ROLE_FONT_CHOOSER - - A specialized dialog that lets the user choose a - font - - - - atk.ROLE_FRAME - - A top level window with a title bar, border, menubar, - etc. - - - - atk.ROLE_GLASS_PANE - - A pane that is guaranteed to be painted on top of all - panes beneath it - - - - atk.ROLE_HTML_CONTAINER - - A document container for HTML, whose children - represent the document content - - - - atk.ROLE_ICON - - A small fixed size picture, typically used to decorate - components - - - - atk.ROLE_IMAGE - - An object whose primary purpose is to display an image - - - - - atk.ROLE_INTERNAL_FRAME - - A frame-like object that is clipped by a desktop - pane - - - - atk.ROLE_LABEL - - An object used to present an icon or short string in - an interface - - - - atk.ROLE_LAYERED_PANE - - A specialized pane that allows its children to be - drawn in layers, providing a form of stacking order - - - - atk.ROLE_LIST - - An object that presents a list of objects to the user - and allows the user to select one or more of them - - - - atk.ROLE_LIST_ITEM - - An object that represents an element of a - list - - - - atk.ROLE_MENU - - An object usually found inside a menu bar that - contains a list of actions the user can choose from - - - - atk.ROLE_MENU_BAR - - An object usually drawn at the top of the primary - dialog box of an application that contains a list of menus the - user can choose from - - - - atk.ROLE_MENU_ITEM - - An object usually contained in a menu that presents an - action the user can choose - - - - atk.ROLE_OPTION_PANE - - A specialized pane whose primary use is inside a - DIALOG - - - - atk.ROLE_PAGE_TAB - - An object that is a child of a page tab list - - - - - atk.ROLE_PAGE_TAB_LIST - - An object that presents a series of panels (or page - tabs), one at a time, through some mechanism provided by the - object - - - - atk.ROLE_PANEL - - A generic container that is often used to group - objects - - - - atk.ROLE_PASSWORD_TEXT - - A text object uses for passwords, or other places - where the text content is not shown visibly to the user - - - - - atk.ROLE_POPUP_MENU - - A temporary window that is usually used to offer the - user a list of choices, and then hides when the user selects one - of those choices - - - - atk.ROLE_PROGRESS_BAR - - An object used to indicate how much of a task has been - completed - - - - atk.ROLE_PUSH_BUTTON - - An object the user can manipulate to tell the - application to do something - - - - atk.ROLE_RADIO_BUTTON - - A specialized check box that will cause other radio - buttons in the same group to become unchecked when this one is - checked - - - - atk.ROLE_RADIO_MENU_ITEM - - A check menu item which belongs to a group. At each - instant exactly one of the radio menu items from a group is - selected - - - - atk.ROLE_ROOT_PANE - - A specialized pane that has a glass pane and a layered - pane as its children - - - - atk.ROLE_ROW_HEADER - - The header for a row of data - - - - atk.ROLE_SCROLL_BAR - - An object usually used to allow a user to - incrementally view a large amount of data. - - - - atk.ROLE_SCROLL_PANE - - An object that allows a user to incrementally view a - large amount of information - - - - atk.ROLE_SEPARATOR - - An object usually contained in a menu to provide a - visible and logical separation of the contents in a menu - - - - - atk.ROLE_SLIDER - - An object that allows the user to select from a - bounded range - - - - atk.ROLE_SPLIT_PANE - - A specialized panel that presents two other panels at - the same time - - - - atk.ROLE_SPIN_BUTTON - - An object used to get an integer or floating point - number from the user - - - - atk.ROLE_STATUSBAR - - An object which reports messages of minor importance - to the user - - - - atk.ROLE_TABLE - - An object used to represent information in terms of - rows and columns - - - - atk.ROLE_TABLE_CELL - - A cell in a table - - - - atk.ROLE_TABLE_COLUMN_HEADER - - The header for a column of a table - - - - atk.ROLE_TABLE_ROW_HEADER - - The header for a row of a table - - - - atk.ROLE_TEAR_OFF_MENU_ITEM - - A menu item used to tear off and reattach its - menu - - - - atk.ROLE_TERMINAL - - An object that represents an accessible - terminal - - - - atk.ROLE_TEXT - - An object that presents text to the user - - - - atk.ROLE_TOGGLE_BUTTON - - A specialized push button that can be checked or - unchecked, but does not provide a separate indicator for the - current state - - - - atk.ROLE_TOOL_BAR - - A bar or palette usually composed of push buttons or - toggle buttons - - - - atk.ROLE_TOOL_TIP - - An object that provides information about another - object - - - - atk.ROLE_TREE - - An object used to represent hierarchical information - to the user - - - - atk.ROLE_TREE_TABLE - - An object capable of expanding and collapsing rows as - well as showing multiple columns of data - - - - atk.ROLE_UNKNOWN - - The object contains some Accessible information, but - its role is not known - - - - atk.ROLE_VIEWPORT - - An object usually used in a scroll pane - - - - atk.ROLE_WINDOW - - A top level window with no title or border. - - - - atk.ROLE_HEADER - - An object that serves as a document header. - - - - atk.ROLE_FOOTER - - An object that serves as a document footer. - - - - atk.ROLE_PARAGRAPH - - An object which is contains a paragraph of text - content. - - - - atk.ROLE_RULER - - An object which describes margins and tab stops, - etc. for text objects which it controls (should have - CONTROLLER_FOR relation to such). - - - - atk.ROLE_APPLICATION - - The object is an application object, which may contain - atk.ROLE_FRAME objects or other types of accessibles. - - - - atk.ROLE_AUTOCOMPLETE - - The object is a dialog or list containing items for - insertion into an entry widget, for instance a list of words for - completion of a text entry. - - - - atk.ROLE_EDITBAR - - The object is an editable text object in a - toolbar - - - - atk.ROLE_EMBEDDED - - The object is an embedded container within a document - or panel. This role is a grouping "hint" indicating that the - contained objects share a context. - - - - atk.ROLE_ENTRY - - The object is a component whose textual content may be - entered or modified by the user, provided atk.STATE_EDITABLE is - present. - - - - atk.ROLE_CHART - - The object is a graphical depiction of quantitative - data. It may contain multiple subelements whose attributes - and/or description may be queried to obtain both the - quantitative data and information about how the data is being - presented. The LABELLED_BY relation is particularly important in - interpreting objects of this type, as is the - accessible-description property. - - - - atk.ROLE_CAPTION - - The object contains descriptive information, usually - textual, about another user interface element such as a table, - chart, or image. - - - - atk.ROLE_DOCUMENT_FRAME - - The object is a visual frame or container which - contains a view of document content. Document frames may occur - within another Document instance, in which case the second - document may be said to be embedded in the containing - instance. HTML frames are often ROLE_DOCUMENT_FRAME. Either this - object, or a singleton descendant, should implement the Document - interface. - - - - atk.ROLE_HEADING - - The object serves as a heading for content which - follows it in a document. The 'heading level' of the heading, if - availabe, may be obtained by querying the object's - attributes. - - - - atk.ROLE_PAGE - - The object is a containing instance which encapsulates - a page of information. atk.ROLE_PAGE is used in documents and - content which support a paginated navigation model. - - - - atk.ROLE_SECTION - - The object is a containing instance of document - content which constitutes a particular 'logical' section of the - document. The type of content within a section, and the nature - of the section division itself, may be obtained by querying the - object's attributes. Sections may be nested. - - - - atk.ROLE_REDUNDANT_OBJECT - - The object is redundant with another object in the - hierarchy, and is exposed for purely technical reasons. Objects - of this role should normally be ignored by clients. - - - - atk.ROLE_LAST_DEFINED - - not a valid role, used for finding end of the - enumeration - - - - - - - - Atk State Type Constants - - The Atk State Type constants specify a particular state of a - component. The actual state of an component is described by its atk.StateSet, - which is a set of states. - - - - atk.STATE_INVALID - - Indicates an invalid state - - - - atk.STATE_ACTIVE - - Indicates a window is currently the active - window - - - - atk.STATE_ARMED - - Indicates that the object is armed. - - - - atk.STATE_BUSY - - Indicates the current object is busy. This state may - be used by implementors of Document to indicate that content - loading is in process. - - - - atk.STATE_CHECKED - - Indicates this object is currently checked - - - - atk.STATE_DEFUNCT - - Indicates the user interface object corresponding to - this object no longer exists - - - - atk.STATE_EDITABLE - - Indicates the user can change the contents of this - object - - - - atk.STATE_ENABLED - - Indicates that this object is enabled. An inconsistent - gtk.ToggleButton - is an example of an object which is sensitive but not - enabled. - - - - atk.STATE_EXPANDABLE - - Indicates this object allows progressive disclosure of - its children - - - - atk.STATE_EXPANDED - - Indicates this object its expanded - - - - atk.STATE_FOCUSABLE - - Indicates this object can accept keyboard focus, which - means all events resulting from typing on the keyboard will - normally be passed to it when it has focus - - - - atk.STATE_FOCUSED - - Indicates this object currently has the keyboard - focus - - - - atk.STATE_HORIZONTAL - - Indicates the orientation of this object is - horizontal - - - - atk.STATE_ICONIFIED - - Indicates this object is minimized and is represented - only by an icon - - - - atk.STATE_MODAL - - Indicates something must be done with this object - before the user can interact with an object in a different - window - - - - atk.STATE_MULTI_LINE - - Indicates this (text) object can contain multiple lines of text - - - - atk.STATE_MULTISELECTABLE - - Indicates this object allows more than one of its - children to be selected at the same time - - - - atk.STATE_OPAQUE - - Indicates this object paints every pixel within its - rectangular region. - - - - atk.STATE_PRESSED - - Indicates this object is currently pressed - - - - atk.STATE_RESIZABLE - - Indicates the size of this object is not fixed - - - - atk.STATE_SELECTABLE - - Indicates this object is the child of an object that - allows its children to be selected and that this child is one of - those children that can be selected - - - - atk.STATE_SELECTED - - Indicates this object is the child of an object that - allows its children to be selected and that this child is one of - those children that has been selected - - - - atk.STATE_SENSITIVE - - Indicates this object is sensitive - - - - atk.STATE_SHOWING - - Indicates this object, the object's parent, the - object's parent's parent, and so on, are all visible - - - - atk.STATE_SINGLE_LINE - - Indicates this (text) object can contain only a single - line of text - - - - atk.STATE_STALE - - Indicates that the index associated with this object - has changed since the user accessed the object. - - - - atk.STATE_TRANSIENT - - Indicates this object is transient - - - - atk.STATE_VERTICAL - - Indicates the orientation of this object is - vertical - - - - atk.STATE_VISIBLE - - Indicates this object is visible - - - - atk.STATE_MANAGES_DESCENDANTS - - Indicates that "active-descendant-changed" event is - sent when children become 'active' (i.e. are selected or - navigated to onscreen). Used to prevent need to enumerate all - children in very large containers, like tables. - - - - atk.STATE_INDETERMINATE - - Indicates that a check box is in a state other than - checked or not checked. - - - - atk.STATE_TRUNCATED - - Indicates that an object is truncated, e.g. a text - value in a speradsheet cell. - - - - atk.STATE_REQUIRED - - Indicates that explicit user interaction with an - object is required by the user interface, e.g. a required field - in a "web-form" interface. - - - - atk.STATE_INVALID_ENTRY - - Indicates that the object has encountered an error - condition due to failure of input validation. For instance, a - form control may acquire this state in response to invalid or - malformed user input. - - - - atk.STATE_SUPPORTS_AUTOCOMPLETION - - Indicates that the object may exhibit "typeahead" - behavior in response to user keystrokes, e.g. one keystroke may - result in the insertion of several characters into an entry, or - result in the auto-selection of an item in a list. This state - supplants atk.ROLE_AUTOCOMPLETE. - - - - atk.STATE_SELECTABLE_TEXT - - Indicates that the object in question supports text - selection. It should only be exposed on objects which implement - the Text interface, in order to distinguish this state from - atk.STATE_SELECTABLE, which infers that the - object in question is a selectable child of an object which - implements Selection. While similar, text selection and - subelement selection are distinct operations. - - - - atk.STATE_LAST_DEFINED - - Not a valid state, used for finding end of - enumeration - - - - - - - - Atk Text Attribute Constants - - The Atk Text Attribute constants specify the built-in text - attributes supported. Other text attributes may be set by an - application using the atk.text_attribute_register() - function. - - - - atk.TEXT_ATTR_INVALID - - nvalid attribute - - - - atk.TEXT_ATTR_LEFT_MARGIN - - The pixel width of the left margin - - - - atk.TEXT_ATTR_RIGHT_MARGIN - - The pixel width of the right margin - - - - atk.TEXT_ATTR_INDENT - - The number of pixels that the text is indented - - - - atk.TEXT_ATTR_INVISIBLE - - Either "true" or "false" indicating whether text is - visible or not - - - - atk.TEXT_ATTR_PIXELS_ABOVE_LINES - - Pixels of blank space to leave above each - newline-terminated line. - - - - atk.TEXT_ATTR_PIXELS_BELOW_LINES - - Pixels of blank space to leave below each - newline-terminated line. - - - - atk.TEXT_ATTR_PIXELS_INSIDE_WRAP - - Pixels of blank space to leave between wrapped lines - inside the same newline-terminated line (paragraph). - - - - atk.TEXT_ATTR_BG_FULL_HEIGHT - - "true" or "false" whether to make the background color - for each character the height of the highest font used on the - current line, or the height of the font used for the current - character. - - - - atk.TEXT_ATTR_RISE - - Number of pixels that the characters are risen above - the baseline - - - - atk.TEXT_ATTR_UNDERLINE - - "none", "single", "double" or "low" - - - - atk.TEXT_ATTR_STRIKETHROUGH - - "true" or "false" whether the text is - strikethrough - - - - atk.TEXT_ATTR_SIZE - - The size of the characters. - - - - atk.TEXT_ATTR_SCALE - - The scale of the characters. The value is a string - representation of a double - - - - atk.TEXT_ATTR_WEIGHT - - The weight of the characters. - - - - atk.TEXT_ATTR_LANGUAGE - - The language used - - - - atk.TEXT_ATTR_FAMILY_NAME - - The font family name - - - - atk.TEXT_ATTR_BG_COLOR - - The background color. The value is an RGB value of the - format "u,u,u" - - - - atk.TEXT_ATTR_FG_COLOR - - The foreground color. The value is an RGB value of the - format "u,u,u" - - - - atk.TEXT_ATTR_BG_STIPPLE - - "true" if a gtk.gdk.Pixmap - is set for stippling the background color. - - - - atk.TEXT_ATTR_FG_STIPPLE - - "true" if a gtk.gdk.Pixmap - is set for stippling the foreground color. - - - - atk.TEXT_ATTR_WRAP_MODE - - The wrap mode of the text, if any. Values are "none", - "char" or "word" - - - - atk.TEXT_ATTR_DIRECTION - - The direction of the text, if set. Values are "none", - "ltr" or "rtl" - - - - atk.TEXT_ATTR_JUSTIFICATION - - The justification of the text, if set. Values are - "left", "right", "center" or "fill" - - - - atk.TEXT_ATTR_STRETCH - - The stretch of the text, if set. Values are - "ultra_condensed", "extra_condensed", "condensed", - "semi_condensed", "normal", "semi_expanded", "expanded", - "extra_expanded" or "ultra_expanded" - - - - atk.TEXT_ATTR_VARIANT - - The capitalization variant of the text, if set. Values - are "normal" or "small_caps" - - - - atk.TEXT_ATTR_STYLE - - The slant style of the text, if set. Values are - "normal", "oblique" or "italic" - - - - atk.TEXT_ATTR_LAST_DEFINED - - not a valid text attribute, used for finding end of - enumeration - - - - - - - - Atk Text Boundary Constants - - The Atk Text Boundary constants specify oundaries for regions of - text. - - - - atk.TEXT_BOUNDARY_CHAR - - Boundary is the boundary between characters (including - non-printing characters) - - - - atk.TEXT_BOUNDARY_WORD_START - - Boundary is the start (i.e. first character) of a - word. - - - - atk.TEXT_BOUNDARY_WORD_END - - Boundary is the end (i.e. last character) of a - word. - - - - atk.TEXT_BOUNDARY_SENTENCE_START - - Boundary is the first character in a - sentence. - - - - atk.TEXT_BOUNDARY_SENTENCE_END - - Boundary is the last (terminal) character in a - sentence; in languages which use "sentence stop" punctuation - such as English, the boundary is thus the '.', '?', or similar - terminal punctuation character. - - - - atk.TEXT_BOUNDARY_LINE_START - - Boundary is the initial character of the content or a - character immediately following a newline, linefeed, or return - character. - - - - atk.TEXT_BOUNDARY_LINE_END - - Boundary is the linefeed, or return - character. - - - - - - - - Atk Text Clip Type Constants - - The Atk Text Clip Type constants specify the type of clipping - required. - - - - atk.TEXT_CLIP_NONE - - No clipping to be done - - - - atk.TEXT_CLIP_MIN - - Text clipped by min coordinate is omitted - - - - atk.TEXT_CLIP_MAX - - Text clipped by max coordinate is omitted - - - - atk.TEXT_CLIP_BOTH - - Only text fully within mix/max bound is - retained - - - - - - - - - diff --git a/docs/reference/pygtk-atkaction.xml b/docs/reference/pygtk-atkaction.xml deleted file mode 100644 index 3e89ce18..00000000 --- a/docs/reference/pygtk-atkaction.xml +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - - atk.Action - the ATK interface provided by UI components that the user - can activate/interact with, - - - - Synopsis - - - atk.Action - gobject.GInterface - - do_action - i - - - get_n_actions - - - - get_description - i - - - get_name - i - - - get_keybinding - i - - - set_description - i - desc - - - get_localized_name - i - - - - - - - Description - - atk.Action - should be implemented by instances of atk.Object - classes with which the user can interact directly, i.e. buttons, - checkboxes, scrollbars, e.g. components which are not "passive" - providers of UI information. - - Exceptions: when the user interaction is already covered by - another appropriate interface such as atk.EditableText - (insert/delete test, etc.) or atk.Value (set - value) then these actions should not be exposed by atk.Action as - well. - - Also note that the atk.Action API - is limited in that parameters may not be passed to the object being - activated; thus the action must be self-contained and specifiable via - only a single "verb". Concrete examples include "press", "release", - "click" for buttons, "drag" (meaning initiate drag) and "drop" for drag - sources and drop targets, etc. - - Though most UI interactions on components should be invocable via - keyboard as well as mouse, there will generally be a close mapping - between "mouse actions" that are possible on a component and the - AtkActions. Where mouse and keyboard actions are redundant in effect, - atk.Action - should expose only one action rather than exposing redundant actions if - possible. By convention we have been using "mouse centric" terminology - for atk.Action - names. - - - - - Methods - - - atk.Action.do_action - - - do_action - i - - - - - i : - the action index corresponding to the action to - be performed - - - Returns : - True if success, - False otherwise - - - - Perform the specified action on the object. - - - - - atk.Action.get_n_actions - - - get_n_actions - - - - - - Returns : - a the number of actions, or 0 if - action does not implement this - interface. - - - - Gets the number of accessible actions available on the object. - If there are more than one, the first one is considered the "default" - action of the object. - - - - - atk.Action.get_description - - - get_description - i - - - - - i : - the action index corresponding to the action to be performed - - - Returns : - a description string, or - None if action does not - implement this interface. - - - - Returns a description of the specified action of the - object. - - - - - atk.Action.get_name - - - get_name - i - - - - - i : - the action index corresponding to the action to - be performed - - - Returns : - a name string, or None if - action does not implement this - interface. - - - - Returns the name of the specified action of the object. - - - - - atk.Action.get_keybinding - - - get_keybinding - i - - - - - i : - the action index corresponding to the action to - be performed - - - Returns : - a string representing the keybinding, or - None if there is no keybinding for this - action. - - - - Returns a keybinding associated with this action, if one - exists. - - - - - atk.Action.set_description - - - set_description - i - desc - - - - - i : - the action index corresponding to the action to - be performed - - - desc : - the description to be assigned to this - action - - - Returns : - True if the description was - successfully set; - - - - Sets a description of the specified action of the object. - - - - - atk.Action.get_localized_name - - - get_localized_name - i - - - - - i : - the action index corresponding to the action to - be performed - - - Returns : - a name string, or None if - action does not implement this - interface. - - - - Returns the localized name of the specified action of the - object. - - - - - - diff --git a/docs/reference/pygtk-atkcomponent.xml b/docs/reference/pygtk-atkcomponent.xml deleted file mode 100644 index da1d3f2b..00000000 --- a/docs/reference/pygtk-atkcomponent.xml +++ /dev/null @@ -1,568 +0,0 @@ - - - - - - - atk.Component - the ATK interface provided by UI components that occupy a - physical area on the screen. - - - - Synopsis - - - atk.Component - gobject.GInterface - - - contains - x - y - coord_type - - - ref_accessible_at_point - x - y - coord_type - - - get_extents - coord_type - - - get_position - coord_type - - - get_size - - - grab_focus - - - - remove_focus_handler - handler_id - - - set_extents - x - y - width - height - coord_type - - - set_position - x - y - coord_type - - - set_size - width - height - - - get_layer - - - - get_mdi_zorder - - - - - - - - atk.Component Signal Prototypes - - - - - "bounds-changed" - - callback - atkcomponent - rect - user_param1 - ... - - - - - - - - - Description - - atk.Component - should be implemented by most if not all UI elements with an actual - on-screen presence, i.e. components which can be said to have a - screen-coordinate bounding box. Virtually all widgets will need to have - atk.Component - implementations provided for their corresponding atk.Object - class. In short, only UI elements which are *not* GUI elements will - omit this ATK interface. - - A possible exception might be textual information with a - transparent background, in which case text glyph bounding box - information is provided by atk.Text. - - - - - Methods - - - - - atk.Component.contains - - - contains - x - y - coord_type - - - - - x : - x coordinate - - - y : - y coordinate - - - coord_type : - specifies whether the coordinates are relative - to the screen or to the components top level window - one of the - - - - Returns : - True or - False indicating whether the specified point is - within the extent of the component or not - - - - Checks whether the specified point is within the extent of the - component. - - - - - atk.Component.ref_accessible_at_point - - - ref_accessible_at_point - x - y - coord_type - - - - - x : - x coordinate - - - y : - y coordinate - - - coord_type : - specifies whether the coordinates are relative - to the screen or to the components top level - window - one of the - - - - Returns : - an atk.Object - reference to the accessible child, if one - exists - - - - Gets a reference to the accessible child, if one exists, at the - coordinate point specified by x and - y. - - - - - atk.Component.get_extents - - - get_extents - coord_type - - - - - coord_type : - specifies whether the coordinates are relative - to the screen or to the components top level window - one of the - - - - Returns : - a 4-tuple containing the x, y position - coordinates and the width and height of the - component. - - - - Gets the rectangle which gives the extent of the - component. - - - - - atk.Component.get_position - - - get_position - coord_type - - - - - coord_type : - specifies whether the coordinates are relative - to the screen or to the components top level window - one of the - - - - Returns : - a 2-tuple containing the x, y position - coordinates of the component. - - - - Gets the position of the component in the form of a point - specifying the component's top-left corner. - - - - - atk.Component.get_size - - - get_size - - - - - Returns : - a 2-tuple containing the width and height of - the component. - - - - Gets the size of the component in terms of width and - height. - - - - - atk.Component.grab_focus - - - grab_focus - - - - - - Returns : - True if successful, - False otherwise. - - - - Grabs focus for this component. - - - - - atk.Component.remove_focus_handler - - - remove_focus_handler - handler_id - - - - - handler_id : - the handler id of the focus handler to be - removed from component - - - - Remove the handler specified by - handler_id from the list of functions to be - executed when this object receives focus events (in or out). - - - - - atk.Component.set_extents - - - set_extents - x - y - width - height - coord_type - - - - - x : - x coordinate - - - y : - y coordinate - - - width : - width to set for the - component - - - height : - height to set for the - component - - - coord_type : - specifies whether the coordinates are relative - to the screen or to the components top level window - one of the - - - - Returns : - True if the extents were - set - - - - Sets the extents of the component. - - - - - atk.Component.set_position - - - set_position - x - y - coord_type - - - - - x : - x coordinate - - - y : - y coordinate - - - coord_type : - specifies whether the coordinates are relative - to the screen or to the components top level window - one of the - - - - Returns : - True if the position was - set - - - - Sets the postition of the component. - - - - - atk.Component.set_size - - - set_size - width - height - - - - - width : - width to set for component - - - height : - height to set for component - - - Returns : - True if the size was - set - - - - Set the size of the component in terms of width and - height. - - - - - atk.Component.get_layer - - - get_layer - - - - - - Returns : - one of the which is the layer of - the component - - - - Gets the layer of the component. - - - - - atk.Component.get_mdi_zorder - - - get_mdi_zorder - - - - - - Returns : - an integer which is the zorder of the - component, i.e. the depth at which the component is shown in - relation to other components in the same - container. - - - - Gets the zorder of the component. The value G_MININT will be - returned if the layer of the component is not - atk.LAYER_MDI or - atk.LAYER_WINDOW. - - - - - - - Signals - - - The "bounds-changed" atk.Component Signal - - callback - atkcomponent - rect - user_param1 - ... - - - - - atkcomponent : - the object which received the signal. - - - rect : - The atk.Rectangle - giving the new position and size. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The 'bounds-changed" signal is emitted when the bposition or - size of the a component changes. - - - - - - diff --git a/docs/reference/pygtk-atkdocument.xml b/docs/reference/pygtk-atkdocument.xml deleted file mode 100644 index 919270ad..00000000 --- a/docs/reference/pygtk-atkdocument.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - atk.Document - the ATK interface which allows access to a DOM associated - with on object. - - - - Synopsis - - - atk.Document - gobject.GInterface - - get_document_type - - - - - - - - - Description - - The atk.Document - interface should be supported by any object that has an associated - document object model (DOM). This interface provides the standard - mechanism allowing an assistive technology access to the DOM. - - - - - Methods - - - atk.Document.get_document_type - - - get_document_type - - - - - - Returns : - a string indicating the document type - - - - Gets a string indicating the document type. - - - - - - - - diff --git a/docs/reference/pygtk-atkeditabletext.xml b/docs/reference/pygtk-atkeditabletext.xml deleted file mode 100644 index 8c578a67..00000000 --- a/docs/reference/pygtk-atkeditabletext.xml +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - - atk.EditableText - the ATK interface implemented by components containing - user-editable text content. - - - - Synopsis - - - atk.EditableText - gobject.GInterface - - set_run_attributes - attrib_set - start_offset - end_offset - - - set_text_contents - string - - - insert_text - string - length - position - - - copy_text - start_pos - end_pos - - - cut_text - start_pos - end_pos - - - delete_text - start_pos - end_pos - - - paste_text - position - - - - - - - Description - - atk.EditableText - should be implemented by UI components which contain text which the user - can edit, via the atk.Object - corresponding to that component (see atk.Object). - - atk.EditableText - is a subclass of atk.Text, and as - such, an object which implements atk.EditableText - is by definition an atk.Text - implementor as well. - - - - - Methods - - - atk.EditableText.set_run_attributes - - - set_run_attributes - attrib_set - start_offset - end_offset - - - - - attrib_set : - a sequence of 2-tuples containing name-value - string pairs. - - - start_offset : - start of range in which to set - attributes - - - end_offset : - end of range in which to set - attributes - - - Returns : - True if attributes were - successfully set for the specified range, otherwise - False - - - - Sets the attributes for a specified range. See the (such as - atk.TEXT_ATTR_LEFT_MARGIN) for examples of - attributes that can be set. Note that other attributes that do not - have corresponding may also be set for - certain text widgets. - - - - - atk.EditableText.set_text_contents - - - set_text_contents - string - - - - - string : - string to set for text contents of the - text - - - - Set text contents of the text. - - - - - atk.EditableText.insert_text - - - insert_text - string - length - position - - - - - string : - the text to insert - - - length : - the length of text to insert, in bytes - - - position : - the position at which to insert the text - - - Returns : - the position after the newly inserted - text. - - - - Insert text at a given position. - - - - - atk.EditableText.copy_text - - - copy_text - start_pos - end_pos - - - - - start_pos : - start position - - - end_pos : - end position - - - - Copy text from start_pos up to, but not - including end_pos to the clipboard. - - - - - atk.EditableText.cut_text - - - cut_text - start_pos - end_pos - - - - - start_pos : - start position - - - end_pos : - end position - - - - Copy text from start_pos up to, but not - including end_pos to the clipboard and then - delete from the widget. - - - - - atk.EditableText.delete_text - - - delete_text - start_pos - end_pos - - - - - start_pos : - start position - - - end_pos : - end position - - - - Delete text start_pos up to, but not - including end_pos. - - - - - atk.EditableText.paste_text - - - paste_text - position - - - - - position : - position to paste - - - - Paste text from clipboard to the specified - position. - - - - - - diff --git a/docs/reference/pygtk-atkgobjectaccessible.xml b/docs/reference/pygtk-atkgobjectaccessible.xml deleted file mode 100644 index 6cc7fb17..00000000 --- a/docs/reference/pygtk-atkgobjectaccessible.xml +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - atk.GObjectAccessible - this object class is derived from AtkObject and can be - used as a basis implementing accessible objects. - - - - Synopsis - - - atk.GObjectAccessible - atk.Object - - get_object - - - - - -Functions - - - atk.gobject_accessible_for_object - obj - - - - - - Ancestry - -+-- gobject.GObject - +-- atk.Object - +-- atk.GObjectAccessible - - - - - - atk.GObjectAccessible Properties - - atk.Object Properties - - - - - atk.GObjectAccessible Signal Prototypes - - gobject.GObject Signal Prototypes - atk.Object Signal Prototypes - - - - Description - - This object class is derived from atk.Object. It - can be used as a basis for implementing accessible objects for gobject.GObject - objects which are not derived from gtk.Widget. One - example of its use is in providing an accessible object for - GnomeCanvasItem in the GAIL library. - - - - - Methods - - - atk.GObjectAccessible.get_object - - - get_object - - - - - - Returns : - a gobject.GObject - which is the object for the accessible object - - - - Gets the gobject.GObject - for the accessible object. - - - - - - - Functions - - - atk.gobject_accessible_for_object - - - atk.gobject_accessible_for_object - obj - - - - obj : - a gobject.GObject - - - Returns : - a atk.Object - which is the accessible object for - obj - - - - Gets the accessible object for the specified - obj. - - - - - - diff --git a/docs/reference/pygtk-atkhyperlink.xml b/docs/reference/pygtk-atkhyperlink.xml deleted file mode 100644 index f382d698..00000000 --- a/docs/reference/pygtk-atkhyperlink.xml +++ /dev/null @@ -1,382 +0,0 @@ - - - - - - - atk.Hyperlink - An ATK object which encapsulates a link or set of links in a hypertext document. - - - - Synopsis - - - atk.Hyperlink - gobject.GObject - - get_uri - i - - - get_object - i - - - get_end_index - - - - get_start_index - - - - is_valid - - - - get_n_anchors - - - - is_inline - - - - is_selected_link - - - - - - - - Ancestry - -+-- gobject.GObject - +-- atk.Hyperlink - - - - - - atk.Hyperlink Properties - -
- - - - - - - - - "end-index" - Read - The end index of the atk.Hyperlink - object. Allowed values: >= 0. Default value: 0. - - - - "number-of-anchors" - Read - The number of anchors associated with the atk.Hyperlink - object. Allowed values: >= 0. Default value: 0. - - - - "selected-link" - Read - if True the atk.Hyperlink - object is selected. Default value: - False. - - - - "start-index" - Read - The start index of the AtkHyperlink object. Allowed values: - >= 0. Default value: 0. - - - - - -
- -
- - - atk.Hyperlink Signal Prototypes - - gobject.GObject Signal Prototypes - - - - "link-activated" - - callback - atkhyperlink - user_param1 - ... - - - - - - - - - Description - - An ATK object which encapsulates a link or set of links in a - hypertext document. It implements the atk.Action - interface. - - - - - Methods - - - atk.Hyperlink.get_uri - - - get_uri - i - - - - - i : - a (zero-index) integer specifying the desired - anchor - - - Returns : - a string specifying the - URI - - - - Get a the URI associated with the anchor specified by - i. - - Multiple anchors are primarily used by client-side image - maps. - - - - - atk.Hyperlink.get_object - - - get_object - i - - - - - i : - a (zero-index) integer specifying the desired - anchor - - - Returns : - an atk.Object - associated with this hyperlinks i-th anchor - - - - Returns the item associated with this hyperlinks nth anchor. - For instance, the returned atk.Object - will implement atk.Text if - the link is a text hyperlink, atk.Image if - the link is an image hyperlink etc. - - Multiple anchors are primarily used by client-side image - maps. - - - - - atk.Hyperlink.get_end_index - - - get_end_index - - - - - - Returns : - the index with the hypertext document at which - this link ends - - - - Gets the index with the hypertext document at which this link - ends. - - - - - atk.Hyperlink.get_start_index - - - get_start_index - - - - - - Returns : - the index with the hypertext document at which - this link begins - - - - Gets the index with the hypertext document at which this link - begins. - - - - - atk.Hyperlink.is_valid - - - is_valid - - - - - - Returns : - if True this link is still - valid - - - - Since the document that a link is associated with may have - changed this method returns True if the link is - still valid (with respect to the document it references) and - False otherwise. - - - - - atk.Hyperlink.get_n_anchors - - - get_n_anchors - - - - - - Returns : - the number of anchors associated with this - hyperlink - - - - Gets the number of anchors associated with this - hyperlink. - - - - - atk.Hyperlink.is_inline - - - is_inline - - - - - - Returns : - if True this link displays - its content inline. - - - - Indicates whether the link currently displays some or all of its - content inline. Ordinary HTML links will usually return - False, but an inline <src> HTML element will - return True. - - - - - atk.Hyperlink.is_selected_link - - - is_selected_link - - - - - - Returns : - True if the atk.Hyperlink - is selected. - - - - Determines whether this atk.Hyperlink - is selected - - - - - - - Signals - - - The "link-activated" atk.Hyperlink Signal - - callback - atkhyperlink - user_param1 - ... - - - - - atkhyperlink : - the object which received the signal. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The signal "link-activated" is emitted when a link is - activated. - - - - - -
diff --git a/docs/reference/pygtk-atkhypertext.xml b/docs/reference/pygtk-atkhypertext.xml deleted file mode 100644 index 0762f126..00000000 --- a/docs/reference/pygtk-atkhypertext.xml +++ /dev/null @@ -1,201 +0,0 @@ - - - - - - - atk.Hypertext - the ATK interface which provides standard mechanism for - manipulating hyperlinks. - - - - Synopsis - - - atk.Hypertext - gobject.GInterface - - get_link - link_index - - - get_n_links - - - - get_link_index - char_index - - - - - - - atk.Hypertext Signal Prototypes - - - - - "link-selected" - - callback - atkhypertext - index - user_param1 - ... - - - - - - - - - Description - - An interface used for objects which implement linking between - multiple resource or content locations, or multiple 'markers' within a - single document. A atk.Hypertext - instance is associated with one or more atk.Hyperlink - objects, which are associated with particular offsets within the atk.Hypertext's - included content. While this interface is derived from atk.Text, there is - no requirement that atk.Hypertext - instances have textual content; they may implement atk.Image as - well, and atk.Hyperlink - objects need not have non-zero text offsets. - - - - - Methods - - - atk.Hypertext.get_link - - - get_link - link_index - - - - - link_index : - an integer specifying the desired - link - - - Returns : - the link in this hypertext document at -index link_index - - - - Gets the link in this hypertext document at index - link_index - - - - - atk.Hypertext.get_n_links - - - get_n_links - - - - - - Returns : - the number of links within this hypertext - document - - - - Gets the number of links within this hypertext document. - - - - - atk.Hypertext.get_link_index - - - get_link_index - char_index - - - - - char_index : - a character index - - - Returns : - an index into the array of hyperlinks in the - hypertext - - - - Gets the index into the array of hyperlinks that is associated - with the character specified by char_index, or - -1 if there is no hyperlink associated with this character. - - - - - - - Signals - - - The "link-selected" atk.Hypertext Signal - - callback - atkhypertext - index - user_param1 - ... - - - - - atkhypertext : - the object which received the - signal. - - - index : - the index of the hyperlink which is - selected - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The "link-selected" signal is emitted by an atk.HyperText - object when one of the hyperlinks associated with the object is - selected. - - - - - - diff --git a/docs/reference/pygtk-atkimage.xml b/docs/reference/pygtk-atkimage.xml deleted file mode 100644 index 55f1c3a4..00000000 --- a/docs/reference/pygtk-atkimage.xml +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - atk.Image - the ATK Interface implemented by components that expose - image or pixmap content on-screen. - - - - Synopsis - - - atk.Image - gobject.GInterface - - get_image_description - - - - get_image_size - - - set_image_description - description - - - get_image_position - coord_type - - - - - - - Description - - atk.Image should - be implemented by atk.Object - subtypes on behalf of components which display image/pixmap information - onscreen, and which provide information (other than just widget borders, - etc.) via that image content. For instance, icons, buttons with icons, - toolbar elements, and image viewing panes typically should implement - atk.Image. - - atk.Image - primarily provides two types of information: coordinate information - (useful for screen review mode of screenreaders, and for use by onscreen - magnifiers), and descriptive information. The descriptive information - is provided for alternative, text-only presentation of the most - significant information present in the image. - - - - - Methods - - - atk.Image.get_image_description - - - get_image_description - - - - - - Returns : - a string representing the image - description - - - - Get a textual description of this image. - - - - - atk.Image.get_image_size - - - get_image_size - - - - - Returns : - a 2-tuple containing the width and height of - the image - - - - Get the width and height in pixels for the specified image. The - width and height are returned as -1 if the values cannot be - obtained. - - - - - atk.Image.set_image_description - - - set_image_description - description - - - - - description : - a string description to set for - image - - - Returns : - True if operation could be - completed. - - - - Sets the textual description for this image. - - - - - atk.Image.get_image_position - - - get_image_position - coord_type - - - - - coord_type : - specifies whether the coordinates are relative - to the screen or to the components top level window - one of the - - - - Returns : - a 2-tuple containing the x and y coordinates of - the image - - - - Gets the position of the image in the form of a point specifying - the images top-left corner. The values of x and y are returned as -1 - if the values cannot be obtained. - - - - - - diff --git a/docs/reference/pygtk-atkimplementor.xml b/docs/reference/pygtk-atkimplementor.xml deleted file mode 100644 index a1a006ff..00000000 --- a/docs/reference/pygtk-atkimplementor.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - atk.Implementor - - - - - Synopsis - - - atk.Implementor - gobject.GInterface - - ref_accessible - - - - - - - - Description - - - - - - - Methods - - - atk.Implementor.ref_accessible - - - ref_accessible - - - - - - Returns : - a reference to an object's atk.Object - implementation - - - - Gets a reference to an object's atk.Object - implementation, if the object implements atk.Object - - - - - - diff --git a/docs/reference/pygtk-atknoopobject.xml b/docs/reference/pygtk-atknoopobject.xml deleted file mode 100644 index 50d11486..00000000 --- a/docs/reference/pygtk-atknoopobject.xml +++ /dev/null @@ -1,103 +0,0 @@ - - - - - - - atk.NoOpObject - an atk.Object - which purports to implement all ATK interfaces. - - - - Synopsis - - - atk.NoOpObject - atk.Object - - atk.NoOpObject - obj - - - - - - - Ancestry - -+-- gobject.GObject - +-- atk.Object - +-- atk.NoOpObject - - - - - - atk.NoOpObject Properties - - atk.Object Properties - - - - - atk.NoOpObject Signal Prototypes - - gobject.GObject Signal Prototypes - atk.Object Signal Prototypes - atk.Component Signal Prototypes - atk.Hypertext Signal Prototypes - atk.Selection Signal Prototypes - atk.Table Signal Prototypes - atk.Text Signal Prototypes - - - - Description - - An atk.NoOpObject - is an atk.Object which - purports to implement all ATK interfaces. It is the type of atk.Object that - is created if an accessible object is requested for an object type for - which no factory type is specified. - - - - - Constructor - - - atk.NoOpObject - - - atk.NoOpObject - obj - - - - - obj : - a gobject.GObject - - - Returns : - a default (non-functioning stub) atk.Object - - - - Provides a default (non-functioning stub) atk.Object. - Application maintainers should not use this method. - - - - - - diff --git a/docs/reference/pygtk-atknoopobjectfactory.xml b/docs/reference/pygtk-atknoopobjectfactory.xml deleted file mode 100644 index 3ba878da..00000000 --- a/docs/reference/pygtk-atknoopobjectfactory.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - atk.NoOpObjectFactory - the atk.ObjectFactory - which creates an atk.NoOpObject. - - - - - Synopsis - - - atk.NoOpObjectFactory - atk.ObjectFactory - - atk.NoOpObjectFactory - - - - - - - - Ancestry - -+-- gobject.GObject - +-- atk.ObjectFactory - +-- atk.NoOpObjectFactory - - - - - - atk.NoOpObjectFactory Signal Prototypes - - gobject.GObject Signal Prototypes - - - - Description - - The atk.ObjectFactory - which creates an atk.NoOpObject. An - instance of this is created by an atk.Registry - if no factory type has not been specified to create an accessible object - of a particular type. - - - - - Constructor - - - atk.NoOpObjectFactory - - - atk.NoOpObjectFactory - - - - - - Returns : - an instance of an atk.ObjectFactory - - - - Creates an instance of an atk.ObjectFactory - which generates primitive (non-functioning) atk.Object - objects. - - - - - - diff --git a/docs/reference/pygtk-atkobject.xml b/docs/reference/pygtk-atkobject.xml deleted file mode 100644 index 3379ba3d..00000000 --- a/docs/reference/pygtk-atkobject.xml +++ /dev/null @@ -1,1110 +0,0 @@ - - - - - - - atk.Object - the base object class for the Accessibility Toolkit - API. - - - - Synopsis - - - atk.Object - gobject.GObject - - get_name - - - - get_description - - - - get_parent - - - - get_n_accessible_children - - - - ref_accessible_child - i - - - ref_relation_set - - - - get_role - - - - get_layer - - - - get_mdi_zorder - - - - ref_state_set - - - - get_index_in_parent - - - - set_name - name - - - set_description - description - - - set_parent - parent - - - set_role - role - - - - remove_property_change_handler - handler_id - - - - add_relationship - relationship - target - - - remove_relationship - relationship - target - - - - - - - Ancestry - -+-- gobject.GObject - +-- atk.Object - - - - - - atk.Object Properties - -
- - - - - - - - - "accessible-component-layer" - Read - The accessible layer of this object. Allowed values: >= 0. - Default value: 0. - - - - "accessible-component-mdi-zorder" - Read - The accessible MDI value of this object. Default value: - -2147483648 - - - - "accessible-description" - Read-Write - Description of an object, formatted for assistive - technology access. Default value: None. - - - - "accessible-hypertext-nlinks" - Read - The number of links which the current atk.Hypertext - has. Allowed values: >= 0. Default value: 0. - - - - "accessible-name" - Read-Write - Object instance's name formatted for assistive technology - access. Default value: None. - - - - "accessible-parent" - Read-Write - Is used to notify that the parent has changed. - - - - "accessible-role" - Read-Write - The accessible role of this object. Allowed values: >= 0. - Default value: 0. - - - - "accessible-table-caption" - Read-Write - Is used to notify that the table caption has changed; this - property should not be used. "accessible-table-caption-object" - should be used instead. Default value: - None. - - - - "accessible-table-caption-object" - Read-Write - Is used to notify that the table caption has changed - - - - "accessible-table-column-description" - Read-Write - Is used to notify that the table column description has - changed. Default value: None. - - - - "accessible-table-column-header" - Read-Write - Is used to notify that the table column header has - changed - - - - "accessible-table-row-description" - Read-Write - Is used to notify that the table row description has - changed. Default value: None. - - - - "accessible-table-row-header" - Read-Write - Is used to notify that the table row header has changed - - - - "accessible-table-summary" - Read-Write - Is used to notify that the table summary has changed - - - - "accessible-value" - Read-Write - Is used to notify that the value has changed. Allowed - values: >= 0. Default value: 0. - - - - - -
- -
- - - atk.Object Signal Prototypes - - gobject.GObject Signal Prototypes - - - - "active-descendant-changed" - - callback - atkobject - object - user_param1 - ... - - - - - "children-changed" - - callback - atkobject - index - child - user_param1 - ... - - - - - "focus-event" - - callback - atkobject - has_focus - user_param1 - ... - - - - - "property-change" - - callback - atkobject - value - user_param1 - ... - - - - - "state-change" - - callback - atkobject - state - is_set - user_param1 - ... - - - - - "visible-data-changed" - - callback - atkobject - user_param1 - ... - - - - - - - - - Description - - This class is the primary class for accessibility support via the - Accessibility ToolKit (ATK). Objects that are instances of atk.Object (or - instances of atk.Object-derived - types) are queried for properties which relate basic (and generic) - properties of a UI component such as name and description. Instances of - atk.Object - may also be queried as to whether they implement other ATK interfaces - (e.g. atk.Action, - atk.Component, - etc.), as appropriate to the role which a given UI component plays in a - user interface. - - All UI components in an applicationthat provide useful information - or services to the user must provide corresponding atk.Object - instances on request (in GTK+, for instance, usually on a call to the - gtk.Widget.get_accessible() - method), either via ATK support built into the toolkit for the widget - class or ancestor class, or in the case of custom widgets, if the - inherited atk.Object - implementation is insufficient, via instances of a new atk.Object - subclass. - - - - - Methods - - - atk.Object.get_name - - - get_name - - - - - - Returns : - a character string representing the accessible - name of the object. - - - - Gets the accessible name of the accessible. - - - - - atk.Object.get_description - - - get_description - - - - - - Returns : - a character string representing the accessible - description of the accessible. - - - - Gets the accessible description of the accessible. - - - - - atk.Object.get_parent - - - get_parent - - - - - - Returns : - a atk.Object - representing the accessible parent of the - accessible - - - - Gets the accessible parent of the accessible. - - - - - atk.Object.get_n_accessible_children - - - get_n_accessible_children - - - - - - Returns : - an integer representing the number of - accessible children of the accessible. - - - - Gets the number of accessible children of the accessible. - - - - - atk.Object.ref_accessible_child - - - ref_accessible_child - i - - - - - i : - an integer representing the position of the - child, starting from 0 - - - Returns : - an atk.Object - representing the specified accessible child of the - accessible. - - - - Gets a reference to the specified accessible child of the - object. The accessible children are 0-based so the first accessible - child is at index 0, the second at index 1 and so on. - - - - - atk.Object.ref_relation_set - - - ref_relation_set - - - - - - Returns : - an atk.RelationSet - representing the relation set of the object. - - - - Gets the atk.RelationSet - associated with the object. - - - - - atk.Object.get_role - - - get_role - - - - - - Returns : - one of the which is the role of - the accessible - - - - Gets the role of the accessible. - - - - - atk.Object.get_layer - - - get_layer - - - - - - Returns : - one of the which is the layer of - the accessible - - - - - This method is deprecated. Use the atk.Component.get_layer() - method instead. - - - Gets the layer of the accessible. - - - - - atk.Object.get_mdi_zorder - - - get_mdi_zorder - - - - - - Returns : - an integer which is the zorder of the - accessible, i.e. the depth at which the component is shown in - relation to other components in the same - container. - - - - - This method is deprecated. Use the atk.Component.get_mdi_zorder() - method instead. - - - Gets the zorder of the accessible. The value - G_MININT will be returned if the layer of the - accessible is not atk.LAYER_MDI. - - - - - atk.Object.ref_state_set - - - ref_state_set - - - - - - Returns : - a reference to an atk.StateSet - which is the state set of the accessible - - - - Gets a reference to the state set of the accessible. - - - - - atk.Object.get_index_in_parent - - - get_index_in_parent - - - - - - Returns : - an integer which is the index of the accessible - in its parent - - - - Gets the 0-based index of this accessible in its parent; returns - -1 if the accessible does not have an accessible parent. - - - - - atk.Object.set_name - - - set_name - name - - - - - name : - a character string to be set as the accessible - name - - - - Sets the accessible name of the accessible. - - - - - atk.Object.set_description - - - set_description - description - - - - - description : - a character string to be set as the accessible - description - - - - Sets the accessible description of the accessible. - - - - - atk.Object.set_parent - - - set_parent - parent - - - - - parent : - an atk.Object - to be set as the accessible parent - - - - Sets the accessible parent of the accessible. - - - - - atk.Object.set_role - - - set_role - role - - - - - role : - one of the to be set as the - role - - - - Sets the role of the accessible. - - - - - - - atk.Object.remove_property_change_handler - - - remove_property_change_handler - handler_id - - - - - handler_id : - an integer that identifies the handler to be - removed. - - - - Removes a property change handler. - - - - - - - atk.Object.add_relationship - - - add_relationship - relationship - target - - - - - relationship : - one of the - - - target : - The atk.Object - which is to be the target of the relation. - - - Returns : - True if the relationship is - added. - - - - Adds a relationship of the specified type with the specified - target. - - - - - atk.Object.remove_relationship - - - remove_relationship - relationship - target - - - - - relationship : - one of the - - - target : - The atk.Object - which is the target of the relation to be - removed. - - - Returns : - True if the relationship is - removed. - - - - Removes a relationship of the specified type with the specified - target. - - - - - - - Signals - - - The "active-descendant-changed" atk.Object Signal - - callback - atkobject - obj - user_param1 - ... - - - - - atkobject : - the object which received the signal. - - - obj : - the newly focused object. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The "active-descendant-changed" signal is emitted by an object - which has the state atk.STATE_MANAGES_DESCENDANTS - when the focus object in the object changes. For instance, a table - will emit the signal when the cell in the table which has focus - changes. - - - - - The "children-changed" atk.Object Signal - - callback - atkobject - index - child - user_param1 - ... - - - - - atkobject : - the object which received the signal. - - - index : - The index of the added or removed child - - - child : - The child which was added or removed - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The signal "children-changed" is emitted when a child is added - or removed form an object. It supports two details: "add" and - "remove" - - - - - The "focus-event" atk.Object Signal - - callback - atkobject - has_focus - user_param1 - ... - - - - - atkobject : - the object which received the signal. - - - has_focus : - A boolean value which indicates whether the object gained or lost focus. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The signal "focus-event" is emitted when an object gains or - loses focus. - - - - - The "property-change" atk.Object Signal - - callback - atkobject - value - user_param1 - ... - - - - - atkobject : - the object that received the signal. - - - value : - The new value of the property that - changed. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The signal "property-change" is emitted when an object's - property value changes. The detail identifies the name of the property - whose value has changed. - - - - - The "state-change" atk.Object Signal - - callback - atkobject - state - is_set - user_param1 - ... - - - - - atkobject : - the object which received the signal. - - - state : - The name of the state which has - changed - - - is_set : - A boolean which indicates whether the state has - been set or unset. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The "state-change" signal is emitted when an object's state - changes. The detail value identifies the state type which has - changed. - - - - - The "visible-data-changed" atk.Object Signal - - callback - atkobject - user_param1 - ... - - - - - atkobject : - the object that received the signal. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The "visible-data-changed" signal is emitted when the visual - appearance of the object changed. - - - - - -
diff --git a/docs/reference/pygtk-atkobjectfactory.xml b/docs/reference/pygtk-atkobjectfactory.xml deleted file mode 100644 index 79898445..00000000 --- a/docs/reference/pygtk-atkobjectfactory.xml +++ /dev/null @@ -1,136 +0,0 @@ - - - - - - - atk.ObjectFactory - the base object class for a factory used to create - accessible objects for objects of a specific GType. - - - - Synopsis - - - atk.ObjectFactory - gobject.GObject - - create_accessible - obj - - - invalidate - - - - get_accessible_type - - - - - - - - Ancestry - -+-- gobject.GObject - +-- atk.ObjectFactory - - - - - - atk.ObjectFactory Signal Prototypes - - gobject.GObject Signal Prototypes - - - - Description - - This class is the base object class for a factory used to create - an accessible object for a specific GType. The method atk.Registry.set_factory_type() - is normally called to store in the registry the factory type to be used - to create an accessible of a particular GType. - - - - - Methods - - - atk.ObjectFactory.create_accessible - - - create_accessible - obj - - - - - obj : - a gobject.GObject - - - Returns : - an atk.Object - that implements an accessibility interface on behalf of - obj - - - - Provides an atk.Object - that implements an accessibility interface on behalf of - obj - - - - - atk.ObjectFactory.invalidate - - - invalidate - - - - Inform the factory that it is no longer being used to create - accessibles. When called, the factory may need to inform the atk.Object - objects it has created that they need to be re-instantiated. Note: - primarily used for runtime replacement of atk.ObjectFactory - objects in object registries. - - - - - atk.ObjectFactory.get_accessible_type - - - get_accessible_type - - - - - - Returns : - the type of the accessible which is created by - the factory. - - - - Gets the GType of the accessible which is created by the - factory. The value gobject.TYPE_INVALID is - returned if no type if found. - - - - - - diff --git a/docs/reference/pygtk-atkrectangle.xml b/docs/reference/pygtk-atkrectangle.xml deleted file mode 100644 index 6b3ed2fc..00000000 --- a/docs/reference/pygtk-atkrectangle.xml +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - - atk.Rectangle - an object holding data about a rectangle - - - - Synopsis - - - atk.Rectangle - gobject.GBoxed - - atk.Rectangle - x - 0 - y - 0 - width - 0 - height - 0 - - - - - - - Attributes - -
- - - - - - - - - - "x" - Read-Write - The X coordinate of the top left corner of the - rectangle. - - - - "y" - Read-Write - The Y coordinate of the top left corner of the - rectangle. - - - - "width" - Read-Write - The width of the rectangle. - - - - "height" - Read-Write - The height of the rectangle. - - - - - -
- -
- - - Description - - A atk.Rectangle - holds the position and size of a rectangle. The position is specified by - the "x" and "y" attributes and the size, by the "width" and "height" - attributes. - - - - - Constructor - - - atk.Rectangle - - - atk.Rectangle - x - 0 - y - 0 - width - 0 - height - 0 - - - - - Returns : - a new atk.Rectangle - - - - Creates a new atk.Rectangle - with the attributes specified by x, - y, width and - height. Any unspecified attributes default to - 0. - - - - - -
diff --git a/docs/reference/pygtk-atkregistry.xml b/docs/reference/pygtk-atkregistry.xml deleted file mode 100644 index 88f01019..00000000 --- a/docs/reference/pygtk-atkregistry.xml +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - atk.Registry - an object used to store the GType of the factories used to - create an accessible object for an object of a particular GType. - - - - - Synopsis - - - atk.Registry - gobject.GObject - - set_factory_type - type - factory_type - - - get_factory_type - type - - - get_factory - type - - - - -Functions - - - atk.get_default_registry - - - - - - - Ancestry - -+-- gobject.GObject - +-- atk.Registry - - - - - - atk.Registry Signal Prototypes - - gobject.GObject Signal Prototypes - - - - Description - -The atk.Registry is -normally used to create appropriate ATK "peers" for user interface -components. Application developers usually need only interact with the atk.Registry by -associating appropriate ATK implementation classes with gobject.GObject -classes via the set_factory_type() -method, passing the appropriate GType for application custom widget -classes. - - - - - Methods - - - atk.Registry.set_factory_type - - - set_factory_type - type - factory_type - - - - - type : - an atk.Object type - - - factory_type : - an atk.ObjectFactory - type to associate with type. Must - implement the atk.Object - appropriate for type. - - - - Associate an atk.ObjectFactory - subclass with a atk.Object - type. Note: The associated factory_type will - thereafter be responsible for the creation of new atk.Object - implementations for instances appropriate for - type. - - - - - atk.Registry.get_factory_type - - - get_factory_type - type - - - - - type : - a atk.Object - type with which to look up the associated atk.ObjectFactory - subclass - - - Returns : - a atk.ObjectFactory - type associated with atk.Object - type - - - - Returns a atk.ObjectFactory - subclass associated with type. - - - - - atk.Registry.get_factory - - - get_factory - type - - - - - type : - a atk.Object - with which to look up the associated atk.ObjectFactory - - - Returns : - an atk.ObjectFactory - appropriate for creating type atk.Objects. - - - - Gets an atk.ObjectFactory - appropriate for creating type atk.Objects. - - - - - - - Functions - - - atk.get_default_registry - - - atk.get_default_registry - - - - Returns : - a default implementation of the atk.ObjectFactory - type registry - - - - Gets a default implementation of the atk.ObjectFactory - type registry. Note: For most toolkit maintainers, this will be the - correct registry for registering new atk.Object - factories. Following a call to this function, maintainers may call the - set_factory_type() - method to associate an atk.ObjectFactory - subclass with the type of objects for whom accessibility information - will be provided. - - - - - - diff --git a/docs/reference/pygtk-atkrelation.xml b/docs/reference/pygtk-atkrelation.xml deleted file mode 100644 index ec4db48b..00000000 --- a/docs/reference/pygtk-atkrelation.xml +++ /dev/null @@ -1,298 +0,0 @@ - - - - - - - atk.Relation - an object used to describe a relation between a object and - one or more other objects. - - - - Synopsis - - - atk.Relation - gobject.GObject - - atk.Relation - targets - relationship - - - get_relation_type - - - - get_target - - - - - -Functions - - - atk.relation_type_register - name - - atk.relation_type_get_name - relationship - - atk.relation_type_for_name - name - - - - - - Ancestry - -+-- gobject.GObject - +-- atk.Relation - - - - - - atk.Relation Properties - -
- - - - - - - - - "relation-type" - Read-Write - The type of the relation - one of the . Default - value: atk.RELATION_NULL. - - - - "target" - Read-Write - An array of the targets for the relation. Default value: - None. - - - - - -
- -
- - - atk.Relation Signal Prototypes - - gobject.GObject Signal Prototypes - - - - Description - - An atk.Relation - describes a relation between an object and one or more other - objects. The actual relations that an object has with other objects are - defined as an atk.RelationSet, - which contains a set of atk.Relation - objects. - - - - - - - - - - Constructor - - - atk.Relation - - - atk.Relation - targets - relationship - - - - - targets : - a sequence of atk.Object - objects - - - relationship : - one of the with which to - create the new atk.Relation - - - Returns : - a new atk.Relation - - - - Create a new relation for the specified - relationship type and the specified sequence of - targets. - - - - - - - Methods - - - atk.Relation.get_relation_type - - - get_relation_type - - - - - - Returns : - the relation type - one of the . - - - - Gets the relationship type. - - - - - atk.Relation.get_target - - - get_target - - - - - - Returns : - the target list of relation - - - - Gets the target list of atk.Object - objects. - - - - - - - Functions - - - atk.relation_type_register - - - atk.relation_type_register - name - - - - name : - a name string - - - Returns : - a new one of the that is - associated with name - - - - Associate name with a new one of the . - - - - - atk.relation_type_get_name - - - atk.relation_type_get_name - type - - - - type : - one of the . - - - Returns : - the string associated with - relationship. - - - - Gets the description string describing the relation type - specified by type. - - - - - atk.relation_type_for_name - - - atk.relation_type_for_name - name - - - - name : - a string which is the (non-localized) name of - an ATK relation type. - - - Returns : - the matching type of the corresponding - to the specified name, or - atk.RELATION_NULL if no matching relation type - is found. - - - - Get the relation type corresponding to the specified - name. - - - - - -
diff --git a/docs/reference/pygtk-atkrelationset.xml b/docs/reference/pygtk-atkrelationset.xml deleted file mode 100644 index 82a73c92..00000000 --- a/docs/reference/pygtk-atkrelationset.xml +++ /dev/null @@ -1,263 +0,0 @@ - - - - - - - atk.RelationSet - a set of atk.Relation - objects, normally the set of atk.Relation - objects that an atk.Object - has. - - - - Synopsis - - - atk.RelationSet - gobject.GObject - - atk.RelationSet - - - - contains - relationship - - - remove - relation - - - add - relation - - - get_n_relations - - - - get_relation - i - - - get_relation_by_type - relationship - - - - - - - Ancestry - -+-- gobject.GObject - +-- atk.RelationSet - - - - - - atk.RelationSet Signal Prototypes - - gobject.GObject Signal Prototypes - - - - Description - - The atk.RelationSet - held by an object establishes its relationships with objects beyond the - normal "parent/child" hierarchical relationships that all user interface - objects have. atk.RelationSet - objects establish whether objects are labelled or controlled by other - components, share group membership with other components (for instance - within a radio-button group), or share content which "flows" between - them, among other types of possible relationships. - - - - - Constructor - - - atk.RelationSet - - - atk.RelationSet - - - - - - Returns : - a new atk.RelationSet - - - - Creates a new empty relation set. - - - - - - - Methods - - - atk.RelationSet.contains - - - contains - relationship - - - - - relationship : - one of the . - - - Returns : - True if - relationship is the relationship - type. - - - - Determines whether the relation set contains a relation that - matches the type specified by - relationship. - - - - - atk.RelationSet.remove - - - remove - relation - - - - - relation : - an atk.Relation - - - - Removes a relation from the relation set. - - - - - atk.RelationSet.add - - - add - relation - - - - - relation : - an atk.Relation - - - - Add a new atk.Relation - to the current relation set if it is not already present. - - - - - atk.RelationSet.get_n_relations - - - get_n_relations - - - - - - Returns : - an integer representing the number of relations - in the set. - - - - Returns the number of relations in a relation set. - - - - - atk.RelationSet.get_relation - - - get_relation - i - - - - - i : - an index representing a position in the set, - starting from 0. - - - Returns : - the atk.Relation, - that is the relation at position i in the - set. - - - - Determines the relation at the specified position in the relation set. - - - - - atk.RelationSet.get_relation_by_type - - - get_relation_by_type - relationship - - - - - relationship : - one of the . - - - Returns : - an atk.Relation, - which is a relation matching the specified - type. - - - - Finds a relation that matches the specified type. - - - - - - diff --git a/docs/reference/pygtk-atkselection.xml b/docs/reference/pygtk-atkselection.xml deleted file mode 100644 index bcb79082..00000000 --- a/docs/reference/pygtk-atkselection.xml +++ /dev/null @@ -1,322 +0,0 @@ - - - - - - - atk.Selection - the ATK interface implemented by container objects whose - atk.Object - children can be selected. - - - - Synopsis - - - atk.Selection - gobject.GInterface - - add_selection - i - - - clear_selection - - - - ref_selection - i - - - get_selection_count - - - - is_child_selected - i - - - remove_selection - i - - - select_all_selection - - - - - - - - atk.Selection Signal Prototypes - - - - - "selection-changed" - - callback - atkselection - user_param1 - ... - - - - - - - - - Description - - atk.Selection - should be implemented by UI components with children which are exposed - by the ref_accessible_child() - and get_n_accessible_children() - methods, if the use of the parent UI component ordinarily involves - selection of one or more of the objects corresponding to those atk.Object - children - for example, selectable lists. - - Note that other types of "selection" (for instance text selection) - are accomplished a other ATK interfaces - atk.Selection - is limited to the selection/deselection of children. - - - - - Methods - - - atk.Selection.add_selection - - - add_selection - i - - - - - i : - an index specifying the child - index. - - - Returns : - True if success, - False otherwise. - - - - Adds the specified accessible child of the object to the - object's selection. - - - - - atk.Selection.clear_selection - - - clear_selection - - - - - - Returns : - True if success, - False otherwise. - - - - Clears the selection in the object so that no children in the - object are selected. - - - - - atk.Selection.ref_selection - - - ref_selection - i - - - - - i : - an index specifying the index in the selection - set. (e.g. the ith selection as opposed to the ith - child). - - - Returns : - an atk.Object - representing the selected accessible , or None - if the selection does not implement this - interface. - - - - Gets a reference to the accessible object representing the - specified selected child of the object. Note: callers should not rely - on None or on a zero value for indication of - whether the atk.Selection - interface is implemented. - - - - - atk.Selection.get_selection_count - - - get_selection_count - - - - - - Returns : - an integer representing the number of items - selected, or 0 if the selection does not implement this - interface. - - - - Gets the number of accessible children currently selected. - Note: callers should not rely on None or on a zero - value for indication of whether the atk.Selection - interface is implemented. - - - - - atk.Selection.is_child_selected - - - is_child_selected - i - - - - - i : - an index specifying the child - index. - - - Returns : - True if the specified child - is selected, or 0 if the selection does not implement this - interface. - - - - Determines if the current child of this object is selected Note: - callers should not rely on None or on a zero value - for indication of whether the atk.Selection - interface is implemented. - - - - - atk.Selection.remove_selection - - - remove_selection - i - - - - - i : - an index specifying the index in the selection - set. (e.g. the ith selection as opposed to the ith - child). - - - Returns : - True if success, - False otherwise. - - - - Removes the specified child of the object from the object's - selection. - - - - - atk.Selection.select_all_selection - - - select_all_selection - - - - - - Returns : - True if success, - False otherwise. - - - - Causes every child of the object to be selected if the object - supports multiple selections. - - - - - - - Signals - - - The "selection-changed" atk.Selection Signal - - callback - atkselection - user_param1 - ... - - - - - atkselection : - the object which received the signal. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The "selection-changed" signal is emitted by an object which - implements atk.Selection - interface when the selection changes. - - - - - - diff --git a/docs/reference/pygtk-atkstateset.xml b/docs/reference/pygtk-atkstateset.xml deleted file mode 100644 index 74baea20..00000000 --- a/docs/reference/pygtk-atkstateset.xml +++ /dev/null @@ -1,473 +0,0 @@ - - - - - - - atk.StateSet - an atk.StateSet - determines a component's state set. - - - - Synopsis - - - atk.StateSet - gobject.GObject - - atk.StateSet - - - - is_empty - - - - add_state - type - - - add_states - types - - - clear_states - - - - contains_state - type - - - contains_states - types - - - remove_state - type - - - and_sets - compare_set - - - or_sets - compare_set - - - xor_sets - compare_set - - - - -Functions - - - atk.state_type_register - name - - atk.state_type_get_name - type - - atk.state_type_for_name - name - - - - - - Ancestry - -+-- gobject.GObject - +-- atk.StateSet - - - - - - atk.StateSet Signal Prototypes - - gobject.GObject Signal Prototypes - - - - Description - - An atk.StateSet - determines a component's state set. It is composed of a set of ATK - states specified using the . - - - - - Constructor - - - atk.StateSet - - - atk.StateSet - - - - - - Returns : - a new atk.StateSet - - - - Creates a new empty state set. - - - - - - - Methods - - - atk.StateSet.is_empty - - - is_empty - - - - - - Returns : - True if the set has no - states set, otherwise - False - - - - Checks whether the state set is empty, i.e. has no states - set. - - - - - atk.StateSet.add_state - - - add_state - type - - - - - type : - one of the - - - Returns : - True if the state for - type is not already in the - set. - - - - Add a new state for the specified type to the current state set - if it is not already present. - - - - - atk.StateSet.add_states - - - add_states - types - - - - - types : - a sequence of . - - - - Add the states for the specified types to the current state - set. - - - - - atk.StateSet.clear_states - - - clear_states - - - - Removes all states from the state set. - - - - - atk.StateSet.contains_state - - - contains_state - type - - - - - type : - one of the . - - - Returns : - True if - type is the state type is in the - set. - - - - Checks whether the state for the specified type is in the - specified set. - - - - - atk.StateSet.contains_states - - - contains_states - types - - - - - types : - a sequence of - - - Returns : - True if all the states in - types are in the set. - - - - Checks whether the states for all the specified types are in the - specified set. - - - - - atk.StateSet.remove_state - - - remove_state - type - - - - - type : - one of the - - - Returns : - True if - type was in the set. - - - - Removes the state for the specified type from the state - set. - - - - - atk.StateSet.and_sets - - - and_sets - compare_set - - - - - compare_set : - another atk.StateSet - - - Returns : - a new atk.StateSet - which is the intersection of the two sets. - - - - Constructs the intersection of the two sets, returning - None if the intersection is empty. - - - - - atk.StateSet.or_sets - - - or_sets - compare_set - - - - - compare_set : - another atk.StateSet - - - Returns : - a new atk.StateSet - which is the union of the two sets, returning - None is empty. - - - - Constructs the union of the two sets. - - - - - atk.StateSet.xor_sets - - - xor_sets - compare_set - - - - - compare_set : - another atk.StateSet - - - Returns : - a new atk.StateSet - which contains the states which are in exactly one of the two - sets. - - - - Constructs the exclusive-or of the two sets, returning - None is empty. The set returned by this operation - contains the states in exactly one of the two sets. - - - - - - - Functions - - - atk.state_type_register - - - atk.state_type_register - name - - - - name : - a character string describing the new - state. - - - Returns : - a new state type value for the new - state. - - - - Registers a new object state and adds it to the . - - - - - atk.state_type_get_name - - - atk.state_type_get_name - type - - - - type : - one of the . - - - Returns : - the string describing the state - type - - - - Gets the description string describing the state type specified - bytype. - - - - - atk.state_type_for_name - - - atk.state_type_for_name - name - - - - name : - a character string state - name - - - Returns : - one of the . - - - - Gets the state type corresponding to the description string - name. - - - - - - diff --git a/docs/reference/pygtk-atkstreamablecontent.xml b/docs/reference/pygtk-atkstreamablecontent.xml deleted file mode 100644 index 6026df54..00000000 --- a/docs/reference/pygtk-atkstreamablecontent.xml +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - atk.StreamableContent - the ATK interface which provides access to streamable - content. - - - - Synopsis - - - atk.StreamableContent - gobject.GInterface - - get_n_mime_types - - - - get_mime_type - i - - - - - - - - Description - - An interface whereby an object allows its backing content to be - streamed to clients. Typical implementors would be images or icons, HTML - content, or multimedia display/rendering widgets. - - Negotiation of content type is allowed. Clients may examine the - backing data and transform, convert, or parse the content in order to - present it in an alternate form to end-users. - - The atk.StreamableContent - interface is particularly useful for saving, printing, or - post-processing entire documents, or for persisting alternate views of a - document. If document content itself is being serialized, stored, or - converted, then use of the atk.StreamableContent - interface can help address performance issues. Unlike most ATK - interfaces, this interface is not strongly tied to the current - user-agent view of the a particular document, but may in some cases give - access to the underlying model data. - - - - - Methods - - - atk.StreamableContent.get_n_mime_types - - - get_n_mime_types - - - - - - Returns : - an integer which is the number of mime types - supported by the object. - - - - Gets the number of mime types supported by this object. - - - - - atk.StreamableContent.get_mime_type - - - get_mime_type - i - - - - - i : - an index representing the position of the mime - type starting from 0 - - - Returns : - : a string* representing the specified mime - type. - - - - Gets the character string of the specified mime type. The first - mime type is at position 0, the second at position 1, and so - on. - - - - - - - - diff --git a/docs/reference/pygtk-atktable.xml b/docs/reference/pygtk-atktable.xml deleted file mode 100644 index 32acac9e..00000000 --- a/docs/reference/pygtk-atktable.xml +++ /dev/null @@ -1,1338 +0,0 @@ - - - - - - - atk.Table - the ATK interface implemented for UI components which - contain tabular or row/column information. - - - - Synopsis - - - atk.Table - gobject.GInterface - - ref_at - row - column - - - get_index_at - row - column - - - get_column_at_index - index - - - get_row_at_index - index - - - get_n_columns - - - - get_n_rows - - - - get_column_extent_at - row - column - - - get_row_extent_at - row - column - - - get_caption - - - - get_column_description - column - - - get_column_header - column - - - get_row_description - row - - - get_row_header - row - - - get_summary - - - - set_caption - caption - - - set_column_description - column - description - - - set_column_header - column - header - - - set_row_description - row - description - - - set_row_header - row - header - - - set_summary - accessible - - - get_selected_columns - selected - - - get_selected_rows - selected - - - is_column_selected - column - - - is_row_selected - row - - - is_selected - row - column - - - add_row_selection - row - - - remove_row_selection - row - - - add_column_selection - column - - - remove_column_selection - column - - - - - - - atk.Table Signal Prototypes - - - - - "column-deleted" - - callback - atktable - column - count - user_param1 - ... - - - - - "column-inserted" - - callback - atktable - column - count - user_param1 - ... - - - - - "column-reordered" - - callback - atktable - user_param1 - ... - - - - - "model-changed" - - callback - atktable - user_param1 - ... - - - - - "row-deleted" - - callback - atktable - row - count - user_param1 - ... - - - - - "row-inserted" - - callback - atktable - row - count - user_param1 - ... - - - - - "row-reordered" - - callback - atktable - user_param1 - ... - - - - - - - - - Description - - atk.Table should - be implemented by components which present elements ordered via rows and - columns. It may also be used to present tree-structured information if - the nodes of the trees can be said to contain multiple "columns". - Individual elements of an atk.Table are - typically referred to as "cells", and these cells are exposed by atk.Table as - child atk.Object - objects of the atk.Table. Both - row/column and child-index-based access to these children is - provided. - - Children of atk.Table are - frequently "lightweight" objects, that is, they may not have backing - widgets in the host UI toolkit. They are therefore often - transient. - - Since tables are often very complex, atk.Table - includes provision for offering simplified summary information, as well - as row and column headers and captions. Headers and captions are atk.Object - objects which may implement other interfaces (atk.Text, atk.Image, etc.) - as appropriate. atk.Table - summaries may themselves be (simplified) atk.Table - objects, etc. - - - - - Methods - - - atk.Table.ref_at - - - ref_at - row - column - - - - - row : - an index representing a row in - table - - - column : - an index representing a column in - table - - - Returns : - a atk.Object - representing the referred to accessible - - - - Get a reference to the table cell at row, - column. - - - - - atk.Table.get_index_at - - - get_index_at - row - column - - - - - row : - an index representing a row in - table - - - column : - an index representing a column in - table - - - Returns : - an index representing the index at specified - position - - - - Gets the index at the specified row and - column. The value -1 is returned if the object - at row,column is not a child of table or table does not implement this - interface. - - - - - atk.Table.get_column_at_index - - - get_column_at_index - index - - - - - index : - - - - Returns : - an integer representing the column at the - specified index. - - - - Gets an index representing the column at the specified - index, or -1 if the table does not implement - this interface - - - - - atk.Table.get_row_at_index - - - get_row_at_index - index - - - - - index : - - - - Returns : - an integer representing the row at the - specified index. - - - - Gets an index representing the row at the specified - index, or -1 if the table does not implement - this interface - - - - - atk.Table.get_n_columns - - - get_n_columns - - - - - - Returns : - an integer representing the number of columns, - or 0 if value does not implement this - interface. - - - - Gets the number of columns in the table. - - - - - atk.Table.get_n_rows - - - get_n_rows - - - - - - Returns : - an integer representing the number of rows, or - 0 if value does not implement this interface. - - - - Gets the number of rows in the table. - - - - - atk.Table.get_column_extent_at - - - get_column_extent_at - row - column - - - - - row : - an index representing a row in - table - - - column : - an index representing a column in - table - - - Returns : - an integer representing the column extent at - specified position, or 0 if value does not implement this - interface. - - - - Gets the number of columns occupied by the accessible object at - the specified row and - column. - - - - - atk.Table.get_row_extent_at - - - get_row_extent_at - row - column - - - - - row : - an index representing a row in - table - - - column : - an index representing a column in - table - - - Returns : - an integer representing the row extent at - specified position, or 0 if value does not implement this - interface. - - - - Gets the number of rows occupied by the accessible object at a - specified row and - column. - - - - - atk.Table.get_caption - - - get_caption - - - - - - Returns : - a atk.Object - representing the table caption, or None if - value does not implement this interface. - - - - Gets the caption for the table. - - - - - atk.Table.get_column_description - - - get_column_description - column - - - - - column : - an index representing a column in the - table - - - Returns : - a string representing the column description, - or None if value does not implement this - interface. - - - - Gets the description text of the specified - column in the table - - - - - atk.Table.get_column_header - - - get_column_header - column - - - - - column : - an index representing a column in the - table - - - Returns : - a atk.Object - representing the specified column header, or - None if value does not implement this - interface. - - - - Gets the column header of a specified column in an accessible - table. - - - - - atk.Table.get_row_description - - - get_row_description - row - - - - - row : - an index representing a row in - table - - - Returns : - a string representing the row description, or - None if value does not implement this - interface. - - - - Gets the description text of the specified row in the - table - - - - - atk.Table.get_row_header - - - get_row_header - row - - - - - row : - an index representing a row in the - table - - - Returns : - a atk.Object - representing the specified row header, or None - if value does not implement this interface. - - - - Gets the row header of a specified row in an accessible - table. - - - - - atk.Table.get_summary - - - get_summary - - - - - - Returns : - a atk.Object - representing a summary description of the table, or zero if value - does not implement this interface. - - - - Gets the summary description of the table. - - - - - atk.Table.set_caption - - - set_caption - caption - - - - - caption : - a atk.Object - representing the caption to set for table - - - - Sets the caption for the table. - - - - - atk.Table.set_column_description - - - set_column_description - column - description - - - - - column : - an index representing a column in - table - - - description : - a string representing the description text to - set for the specified column of the - table - - - - Sets the description text for the specified - column of the table. - - - - - atk.Table.set_column_header - - - set_column_header - column - header - - - - - column : - an index representing a column in - table - - - header : - an atk.Table - - - - Sets the specified column header to - header. - - - - - atk.Table.set_row_description - - - set_row_description - row - description - - - - - row : - an index representing a row in - table - - - description : - a string representing the description text to - set for the specified row of - table - - - - Sets the description text for the specified - row of table. - - - - - atk.Table.set_row_header - - - set_row_header - row - header - - - - - row : - an index representing a row in - table - - - header : - an atk.Table - - - - Sets the specified row header to - header. - - - - - atk.Table.set_summary - - - set_summary - accessible - - - - - accessible : - an atk.Object - representing the summary description to set for - table - - - - Sets the summary description of the table. - - - - - atk.Table.get_selected_columns - - - get_selected_columns - - - - - Returns : - a tuple containing the indices ofthe selected - columns. - - - - Gets the selected columns of the table. - - - - - atk.Table.get_selected_rows - - - get_selected_rows - - - - - Returns : - a tuple containing the indices ofthe selected - rows. - - - - Gets the selected rows of the table. - - - - - atk.Table.is_column_selected - - - is_column_selected - column - - - - - column : - an index representing a column in - table - - - Returns : - True if the column is - selected, or 0 if value does not implement this - interface. - - - - Gets a boolean value indicating whether the specified - column is selected - - - - - atk.Table.is_row_selected - - - is_row_selected - row - - - - - row : - an index representing a row in - table - - - Returns : - True if the row is selected, - or 0 if value does not implement this - interface. - - - - Gets a boolean value indicating whether the specified - row is selected - - - - - atk.Table.is_selected - - - is_selected - row - column - - - - - row : - an index representing a row in - table - - - column : - an index representing a column in - table - - - Returns : - True if the cell is - selected, or 0 if value does not implement this - interface. - - - - Gets a boolean value indicating whether the accessible object at - the specified row and - column is selected - - - - - atk.Table.add_row_selection - - - add_row_selection - row - - - - - row : - an index representing a row in - table - - - Returns : - True if - row was successfully added to selection, or - 0 if value does not implement this interface. - - - - Adds the specified row to the - selection. - - - - - atk.Table.remove_row_selection - - - remove_row_selection - row - - - - - row : - an index representing a row in - table - - - Returns : - True if - row was successfully removed from the - selection, or 0 if value does not implement this - interface. - - - - Removes the specified row from the - selection. - - - - - atk.Table.add_column_selection - - - add_column_selection - column - - - - - column : - an index representing a column in - table - - - Returns : - True if - column was successfully added to the - selection, or 0 if value does not implement this - interface. - - - - Adds the specified column to the - selection. - - - - - atk.Table.remove_column_selection - - - remove_column_selection - column - - - - - column : - an index representing a column in - table - - - Returns : - True if - column was successfully removed from the - selection, or 0 if value does not implement this - interface. - - - - Adds the specified column to the - selection. - - - - - - - Signals - - - The "column-deleted" atk.Table Signal - - callback - atktable - arg1 - arg2 - user_param1 - ... - - - - - atktable : - the object which received the signal. - - - column : - The index of the first column deleted. - - - count : - The number of columns deleted. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The "column-deleted" signal is emitted by an object which - implements the atk.Table - interface when a column is deleted. - - - - - The "column-inserted" atk.Table Signal - - callback - atktable - column - count - user_param1 - ... - - - - - atktable : - the object which received the signal. - - - column : - The index of the column inserted. - - - count : - The number of colums inserted. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The "column-inserted" signal is emitted by an object which - implements the atk.Table - interface when a column is inserted. - - - - - The "column-reordered" atk.Table Signal - - callback - atktable - user_param1 - ... - - - - - atktable : - the object which received the signal. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The "column-reordered" signal is emitted by an object which - implements the atk.Table - interface when the columns are reordered. - - - - - The "model-changed" atk.Table Signal - - callback - atktable - user_param1 - ... - - - - - atktable : - the object which received the signal. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The "model-changed" signal is emitted by an object which - implements the atk.Table - interface when the model displayed by the table changes. - - - - - The "row-deleted" atk.Table Signal - - callback - atktable - row - count - user_param1 - ... - - - - - atktable : - the object which received the signal. - - - row : - The index of the first row deleted. - - - count : - The number of rows deleted. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The "row-deleted" signal is emitted by an object which - implements the atk.Table - interface when a column is inserted. - - - - - The "row-inserted" atk.Table Signal - - callback - atktable - row - count - user_param1 - ... - - - - - atktable : - the object which received the signal. - - - row : - The index of the first row - deleted. - - - count : - The number of rows - deleted. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The "row-inserted" signal is emitted by an object which - implements the atk.Table - interface when a column is inserted. - - - - - The "row-reordered" atk.Table Signal - - callback - atktable - user_param1 - ... - - - - - atktable : - the object which received the signal. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The "row-reordered" signal is emitted by an object which - implements the AtkTable interface when the columns are - reordered. - - - - - - diff --git a/docs/reference/pygtk-atktext.xml b/docs/reference/pygtk-atktext.xml deleted file mode 100644 index fe69057e..00000000 --- a/docs/reference/pygtk-atktext.xml +++ /dev/null @@ -1,1275 +0,0 @@ - - - - - - - atk.Text - the ATK interface implemented by components with text - content. - - - - Synopsis - - - atk.Text - gobject.GInterface - - get_text - start_offset - end_offset - - - get_character_at_offset - offset - - - get_text_after_offset - offset - boundary_type - - - get_text_at_offset - offset - boundary_type - - - get_text_before_offset - offset - boundary_type - - - get_caret_offset - - - - get_character_extents - offset - coords - - - get_run_attributes - offset - - - get_default_attributes - - - - get_character_count - - - - get_offset_at_point - x - y - coords - - - get_n_selections - - - - get_selection - selection_num - - - add_selection - start_offset - end_offset - - - remove_selection - selection_num - - - set_selection - selection_num - start_offset - end_offset - - - set_caret_offset - offset - - - get_range_extents - start_offset - end_offset - coord_type - - - get_bounded_ranges - rect - coord_type - x_clip_type - y_clip_type - - - - -Functions - - - atk.text_attribute_get_name - attr - - atk.text_attribute_get_value - attr - index - - atk.text_attribute_register - name - - atk.text_attribute_for_name - name - - - - - - atk.Text Signal Prototypes - - - - - "text-attributes-changed" - - callback - atktext - user_param1 - ... - - - - - "text-caret-moved" - - callback - atktext - position - user_param1 - ... - - - - - "text-changed" - - callback - atktext - position - length - user_param1 - ... - - - - - "text-selection-changed" - - callback - atktext - user_param1 - ... - - - - - - - - - Description - - atk.Text should be - implemented by atk.Object - objects on behalf of widgets that have text content which is either - attributed or otherwise non-trivial. atk.Object - objects whose text content is simple, unattributed, and very brief may - expose that content via atk.Object.get_name - instead; however if the text is editable, multi-line, typically longer - than three or four words, attributed, selectable, or if the object - already uses the 'name' ATK property for other information, the atk.Text interface - should be used to expose the text content. In the case of editable text - content, atk.EditableText - (a subtype of the atk.Text - interface) should be implemented instead. - - atk.Text provides - not only traversal facilities and change notification for text content, - but also caret tracking and glyph bounding box calculations. Note that - the text strings are exposed as UTF-8, and are therefore potentially - multi-byte, and caret-to-byte offset mapping makes no assumptions about - the character length; also bounding box glyph-to-offset mapping may be - complex for languages which use ligatures. - - - - - Methods - - - atk.Text.get_text - - - get_text - start_offset - end_offset - - - - - start_offset : - start position - - - end_offset : - end position - - - Returns : - the text from - start_offset up to, but not including - end_offset. - - - - Gets the specified text. - - - - - atk.Text.get_character_at_offset - - - get_character_at_offset - offset - - - - - offset : - position - - - Returns : - the character at - offset. - - - - Gets the specified text. - - - - - atk.Text.get_text_after_offset - - - get_text_after_offset - offset - boundary_type - - - - - offset : - position - - - boundary_type : - one of the - - - Returns : - a 3-tuple containing the text after - offset bounded by the specified - boundary_type, the start offset of the - returned string and the offset of the first character after the - returned substring. - - - - Gets the specified text. - - If the boundary_type is - atk.TEXT_BOUNDARY_CHAR the character after the - offset is returned. - - If the boundary_type is - atk.TEXT_BOUNDARY_WORD_START the returned string is - from the word start after the offset to the next word start. - - The returned string will contain the word after the offset if - the offset is inside a word or if the offset is not inside a - word. - - If the boundary_type is - atk.TEXT_BOUNDARY_WORD_END the returned string is - from the word end at or after the offset to the next work end. - - The returned string will contain the word after the offset if - the offset is inside a word and will contain the word after the word - after the offset if the offset is not inside a word. - - If the boundary_type is - atk.TEXT_BOUNDARY_SENTENCE_START the returned - string is from the sentence start after the offset to the next - sentence start. - - The returned string will contain the sentence after the offset - if the offset is inside a sentence or if the offset is not inside a - sentence. - - If the boundary_type is atk.TEXT_BOUNDARY_SENTENCE_END the - returned string is from the sentence end at or after the offset to the - next sentence end. - - The returned string will contain the sentence after the offset - if the offset is inside a sentence and will contain the sentence after - the sentence after the offset if the offset is not inside a - sentence. - - If the boundary_type is - atk.TEXT_BOUNDARY_LINE_START the returned string is - from the line start after the offset to the next line start. - - If the boundary_type is - atk.TEXT_BOUNDARY_LINE_END the returned string is - from the line end at or after the offset to the next line - start. - - - - - atk.Text.get_text_at_offset - - - get_text_at_offset - offset - boundary_type - - - - - offset : - position - - - boundary_type : - one of the - - - Returns : - a 3-tuple containing the text at - offset bounded by the specified - boundary_type, the start offset of the - returned string and the offset of the first character after the - returned substring. - - - - Gets the specified text. - - If the boundary_type if - atk.TEXT_BOUNDARY_CHAR the character at the offset - is returned. - - If the boundary_type is - atk.TEXT_BOUNDARY_WORD_START the returned string is - from the word start at or before the offset to the word start after - the offset. - - The returned string will contain the word at the offset if the - offset is inside a word and will contain the word before the offset if - the offset is not inside a word. - - If the boundary_type is - atk.TEXT_BOUNDARY_WORD_END the returned string is - from the word end before the offset to the word end at or after the - offset. - - The returned string will contain the word at the offset if the - offset is inside a word and will contain the word after to the offset - if the offset is not inside a word. - - If the boundary_type is - atk.TEXT_BOUNDARY_SENTENCE_START the returned - string is from the sentence start at or before the offset to the - sentence start after the offset. - - The returned string will contain the sentence at the offset if - the offset is inside a sentence and will contain the sentence before - the offset if the offset is not inside a sentence. - - If the boundary_type is - atk.TEXT_BOUNDARY_SENTENCE_END the returned string - is from the sentence end before the offset to the sentence end at or - after the offset. - - The returned string will contain the sentence at the offset if - the offset is inside a sentence and will contain the sentence after - the offset if the offset is not inside a sentence. - - If the boundary_type is - atk.TEXT_BOUNDARY_LINE_START the returned string is - from the line start at or before the offset to the line start after - the offset. - - If the boundary_type is - atk.TEXT_BOUNDARY_LINE_END the returned string is - from the line end before the offset to the line end at or after the - offset. - - - - - atk.Text.get_text_before_offset - - - get_text_before_offset - offset - boundary_type - - - - - offset : - position - - - boundary_type : - one of the - - - Returns : - a 3-tuple containing the text before - offset bounded by the specified - boundary_type, the start offset of the - returned string and the offset of the first character after the - returned substring. - - - - Gets the specified text. - - If the boundary_type if - atk.TEXT_BOUNDARY_CHAR the character before the - offset is returned. - - If the boundary_type is - atk.TEXT_BOUNDARY_WORD_START the returned string is - from the word start before the word start before the offset to the - word start before the offset. - - The returned string will contain the word before the offset if - the offset is inside a word and will contain the word before the word - before the offset if the offset is not inside a word. - - If the boundary_type is - atk.TEXT_BOUNDARY_WORD_END the returned string is - from the word end before the word end at or before the offset to the - word end at or before the offset. - - The returned string will contain the word before the offset if - the offset is inside a word or if the offset is not inside a - word. - - If the boundary_type is - atk.TEXT_BOUNDARY_SENTENCE_START the returned - string is from the sentence start before the sentence start before the - offset to the sentence start before the offset. - - The returned string will contain the sentence before the offset - if the offset is inside a sentence and will contain the sentence - before the sentence before the offset if the offset is not inside a - sentence. - - If the boundary_type is - atk.TEXT_BOUNDARY_SENTENCE_END the returned string - is from the sentence end before the sentence end at or before the - offset to the sentence end at or before the offset. - - The returned string will contain the sentence before the offset - if the offset is inside a sentence or if the offset is not inside a - sentence. - - If the boundary_type is - atk.TEXT_BOUNDARY_LINE_START the returned string is - from the line start before the line start ar or before the offset to - the line start ar or before the offset. - - If the boundary_type is - atk.TEXT_BOUNDARY_LINE_END the returned string is - from the line end before the line end before the offset to the line - end before the offset. - - - - - atk.Text.get_caret_offset - - - get_caret_offset - - - - - - Returns : - the offset position of the caret - (cursor). - - - - Gets the offset position of the caret (cursor). - - - - - atk.Text.get_character_extents - - - get_character_extents - offset - coords - - - - - offset : - The offset of the text character for which - bounding information is required. - - - coords : - specify whether coordinates are relative to the - screen or widget window - one of the - - - Returns : - a 4-tuple containing the x, y position and - width and height of the bounding box. - - - - Get the bounding box containing the glyph representing the - character at a particular text offset. - - - - - atk.Text.get_run_attributes - - - get_run_attributes - offset - - - - - offset : - the offset at which to get the attributes - - - start_offset : - the address to put - - - end_offset : - the address to put - - - Returns : - a 3-tuple containing an attribute set tuple, - the start offset of the range and the end offset of the range. The - attribute set tuple contains a 2-tuple of (name, value) strings - for each attribute explicitly set at - offset. - - - - Creates a 3=tuple containing an attribute set (which consists of - the attributes explicitly set at the position - offset in the text), the start and end of the - range around offset where the attributes are - invariant. Note that the end offset is the offset of the first - character after the range. See the for types of text - attributes that can be returned. Note that other attributes may also - be returned. - - - - - atk.Text.get_default_attributes - - - get_default_attributes - - - - - - Returns : - a tuple containing the attribute set which - contains the default values of attributes. The attribute set tuple - contains a 2-tuple of (name, value) strings for each - attribute. - - - - Creates a tuple containing an attribute set which consists of - the default values of attributes for the text. The attribute set - tuple contains a 2-tuple of (name, value) strings for each attribute - See the for types of text - attributes that can be returned. Note that other attributes may also - be returned. - - - - - atk.Text.get_character_count - - - get_character_count - - - - - - Returns : - the number of characters. - - - - Gets the character count. - - - - - atk.Text.get_offset_at_point - - - get_offset_at_point - x - y - coords - - - - - x : - screen x-position of - character - - - y : - screen y-position of - character - - - coords : - specify whether coordinates are relative to the - screen or widget window - one of the - - - Returns : - the offset to the character which is located at - the specified x and - y coordinates. - - - - Gets the offset of the character located at coordinates - x and - y. x and - y are interpreted as being relative to the - screen or this widget's window depending on - coords. - - - - - atk.Text.get_n_selections - - - get_n_selections - - - - - - Returns : - The number of selected regions, or -1 if a - failure occurred. - - - - Gets the number of selected regions. - - - - - atk.Text.get_selection - - - get_selection - selection_num - - - - - selection_num : - The selection number. The selected regions are - assigned numbers that correspond to how far the region is from the - start of the text. The selected region closest to the beginning - of the text region is assigned the number 0, etc. Note that - adding, moving or deleting a selected region can change the - numbering. - - - Returns : - a 3-tuple containing the selected text, the - start position of the selected region and the end position of - (e.g. offset immediately past) the selected - region. - - - - Gets the text from the specified selection. - - - - - atk.Text.add_selection - - - add_selection - start_offset - end_offset - - - - - start_offset : - the start position of the selected - region - - - end_offset : - the offset of the first character after the - selected region. - - - Returns : - True if success, - False otherwise - - - - Adds a selection bounded by the specified offsets. - - - - - atk.Text.remove_selection - - - remove_selection - selection_num - - - - - selection_num : - The selection number. The selected regions are - assigned numbers that correspond to how far the region is from the - start of the text. The selected region closest to the beginning - of the text region is assigned the number 0, etc. Note that - adding, moving or deleting a selected region can change the - numbering. - - - Returns : - True if success, - False otherwise - - - - Removes the specified selection. - - - - - atk.Text.set_selection - - - set_selection - selection_num - start_offset - end_offset - - - - - selection_num : - The selection number. The selected regions are - assigned numbers that correspond to how far the region is from the - start of the text. The selected region closest to the beginning - of the text region is assigned the number 0, etc. Note that - adding, moving or deleting a selected region can change the - numbering. - - - start_offset : - the new start position of the - selection - - - end_offset : - the new end position of (e.g. offset - immediately past) the selection - - - Returns : - True if success, - False otherwise - - - - Changes the start and end offset of the specified - selection. - - - - - atk.Text.set_caret_offset - - - set_caret_offset - offset - - - - - offset : - position - - - Returns : - True if success, - False otherwise. - - - - Sets the caret (cursor) position to the specified - offset. - - - - - atk.Text.get_range_extents - - - get_range_extents - start_offset - end_offset - coord_type - - - - - start_offset : - The offset of the first text character for - which boundary information is required. - - - end_offset : - The offset of the text character after the last - character for which boundary information is - required. - - - coord_type : - Specify whether coordinates are relative to the - screen or widget window - one of the . - - - Returns : - a atk.Rectangle - containing the extents of the range. - - - - Get the bounding box for text within the specified range. - - - - - atk.Text.get_bounded_ranges - - - get_bounded_ranges - rect - coord_type - x_clip_type - y_clip_type - - - - - rect : - An atk.Rectangle - giving the dimensions of the bounding box. - - - coord_type : - Specify whether coordinates are relative to the - screen or widget window - one of the . - - - x_clip_type : - Specify the horizontal clip type - one of the - . - - - y_clip_type : - Specify the vertical clip type - one of the - . - - - Returns : - a list of text ranges. The list contains a - 4-tuple for each text range. The 4-tuple contains a atk.Rectangle - bounding the text range, the start and end offsets of the range - and the text in the range. - - - - Get the ranges of text in the specified bounding box. - - - - - - - Functions - - - atk.text_attribute_get_name - - - atk.text_attribute_get_name - attr - - - - attr : - a text attribute (one of the ) whose name is - required - - - Returns : - a string containing the name - - - - Gets the name corresponding to - attr. - - - - - atk.text_attribute_get_value - - - atk.text_attribute_get_value - attr - index - - - - attr : - a text attribute (one of the ) whose name is - required - - - index : - The index of the required - value - - - Returns : - a string containing the - value. None is returned if there are no values - maintained for the attr - value. - - - - Gets the value for the index of the text - attribute specified by attr. - - - - - atk.text_attribute_register - - - atk.text_attribute_register - name - - - - name : - a name string - - - Returns : - a new one of the that is associated - with name - - - - Associate name with a new text - attribute. - - - - - atk.text_attribute_for_name - - - atk.text_attribute_for_name - name - - - - name : - a string which is the (non-localized) name of - an ATK text attribute. - - - Returns : - the text attribute (one of the ) corresponding to - the specified name, or - atk.TEXT_ATTRIBUTE_INVALID if no matching text - attribute is found. - - - - Get the text attribute type corresponding to a text attribute - name specified by name. - - - - - - - Signals - - - The "text-attributes-changed" atk.Text Signal - - callback - atktext - user_param1 - ... - - - - - atktext : - the object which received the - signal. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The "text-attributes-changed" signal is emitted when the text - attributes of the text of an object which implements atk.Text - changes. - - - - - The "text-caret-moved" atk.Text Signal - - callback - atktext - position - user_param1 - ... - - - - - atktext : - the object which received the - signal. - - - position : - The new position of the text - caret. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The "text-caret-moved" signal is emitted when the caret position - of the text of an object which implements atk.Text - changes. - - - - - The "text-changed" atk.Text Signal - - callback - atktext - position - length - user_param1 - ... - - - - - atktext : - the object which received the signal. - - - position : - The position of the insertion or deletion. - - - length : - The length of text inserted or deleted. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The "text-changed" signal is emitted when the text of the object - which implements the atk.Text - interface changes, This signal will have a detail which is either - "insert" or "delete" which identifies whether the text change was an - insertion or a deletion - - - - - The "text-selection-changed" atk.Text Signal - - callback - atktext - user_param1 - ... - - - - - atktext : - the object which received the signal. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The "text-selection-changed" signal is emitted when the selected - text of an object which implements atk.Text - changes. - - - - - - diff --git a/docs/reference/pygtk-atkvalue.xml b/docs/reference/pygtk-atkvalue.xml deleted file mode 100644 index c14e89bf..00000000 --- a/docs/reference/pygtk-atkvalue.xml +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - atk.Value - the ATK interface implemented by valuators and components - which display or select a value from a bounded range of values. - - - - - Synopsis - - - atk.Value - gobject.GInterface - - get_current_value - - - get_maximum_value - - - get_minimum_value - - - set_current_value - value - - - - - - - Description - - atk.Value should - be implemented for components which either display a value from a - bounded range, or which allow the user to specify a value from a bounded - range, or both. For instance, most sliders and range controls, as well - as dials, should have atk.Object - representations which implement atk.Value on the - component's behalf. atk.Value objects - may be read-only, in which case attempts to alter the value return - False to indicate failure. - - - - - Methods - - - atk.Value.get_current_value - - - get_current_value - - - - - Returns : - the current accessible - value - - - - Gets the value of this object. - - - - - atk.Value.get_maximum_value - - - get_maximum_value - - - - - Returns : - the maximum accessible - value - - - - Gets the maximum value of this object. - - - - - atk.Value.get_minimum_value - - - get_minimum_value - - - - - Returns : - the minimum accessible - value - - - - Gets the minimum value of this object. - - - - - atk.Value.set_current_value - - - set_current_value - value - - - - - value : - the desired new accessible - value. - - - Returns : - True if new value is - successfully set, False - otherwise. - - - - Sets the value of this object. - - - - - - diff --git a/docs/reference/pygtk-gdk-classes.xml b/docs/reference/pygtk-gdk-classes.xml deleted file mode 100644 index 13cf4f03..00000000 --- a/docs/reference/pygtk-gdk-classes.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - The gtk.gdk Class Reference - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/pygtk-gdk-constants.xml b/docs/reference/pygtk-gdk-constants.xml deleted file mode 100644 index 486e8f04..00000000 --- a/docs/reference/pygtk-gdk-constants.xml +++ /dev/null @@ -1,2715 +0,0 @@ - - - - - - gtk.gdk Constants - the built-in constants of the gtk.gdk module - - - - Synopsis - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Description - - - GDK Drag Action Constants - - The Drag Action constants are used by gtk.gdk.DragContext -objects to indicate what the destination should do with the dropped -data. - - - - gtk.gdk.ACTION_DEFAULT - - - - - - gtk.gdk.ACTION_COPY - - Copy the data. - - - - gtk.gdk.ACTION_MOVE - - Move the data, i.e. first copy it, then delete it from -the source using the DELETE target of the X selection protocol. - - - - gtk.gdk.ACTION_LINK - - Add a link to the data. Note that this is only useful -if source and destination agree on what it means. - - - - gtk.gdk.ACTION_PRIVATE - - Special action which tells the source that the -destination will do something that the source doesn't understand. - - - - gtk.gdk.ACTION_ASK - - Ask the user what to do with the data. - - - - - - - - GDK Device Axis Use Constants - - The Device Axis constants describing the way in which a device -axis (valuator) maps onto predefined valuator types. - - - - gtk.gdk.AXIS_IGNORE - - the axis is ignored. - - - - gtk.gdk.AXIS_X - - the axis is used as the x axis. - - - - gtk.gdk.AXIS_Y - - the axis is used as the y axis. - - - - gtk.gdk.AXIS_PRESSURE - - the axis is used for pressure information. - - - - gtk.gdk.AXIS_XTILT - - the axis is used for x tilt information. - - - - gtk.gdk.AXIS_YTILT - - the axis is used for y tilt information. - - - - gtk.gdk.AXIS_WHEEL - - the axis is used for wheel information. - - - - gtk.gdk.AXIS_LAST - - a constant equal to the numerically highest axis -value. - - - - - - - - GDK Byte Order Constants - - The Byte Order constants specify a set of values describing the -possible byte-orders for storing pixel values in memory. - - - - gtk.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. - - - - gtk.gdk.MSB_FIRST - - The values are stored with the most-significant byte - first. For instance, the 32-bit value 0xffeecc would be stored - in memory as 0x00, 0xcc, 0xee, 0xff. - - - - - - - - GDK Cap Style Constants - - The Cap Style constants specify how the end of lines are -drawn. - - - - gtk.gdk.CAP_NOT_LAST - - The same as gtk.gdk.CAP_BUTT for -lines of non-zero width but for zero width lines, the final point on the -line will not be drawn. - - - - gtk.gdk.CAP_BUTT - - The ends of the lines are drawn squared off and -extending to the coordinates of the end point. - - - - gtk.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. - - - - gtk.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 Crossing Mode Constants - - The Crossing Mode constants specify the crossing mode for the -Crossing gtk.gdk.Event - - - - - - - - - - - - - - - - - - - - GDK Cursor Type Constants - - The Cursor Type constants specify the set of standard cursors -available. - - - - gtk.gdk.X_CURSOR - - - - - - gtk.gdk.ARROW - - - - - - gtk.gdk.BASED_ARROW_DOWN - - - - - - gtk.gdk.BASED_ARROW_UP - - - - - - gtk.gdk.BOAT - - - - - - gtk.gdk.BOGOSITY - - - - - - gtk.gdk.BOTTOM_LEFT_CORNER - - - - - - gtk.gdk.BOTTOM_RIGHT_CORNER - - - - - - gtk.gdk.BOTTOM_SIDE - - - - - - gtk.gdk.BOTTOM_TEE - - - - - - gtk.gdk.BOX_SPIRAL - - - - - - gtk.gdk.CENTER_PTR - - - - - - gtk.gdk.CIRCLE - - - - - - gtk.gdk.CLOCK - - - - - - gtk.gdk.COFFEE_MUG - - - - - - gtk.gdk.CROSS - - - - - - gtk.gdk.CROSS_REVERSE - - - - - - gtk.gdk.CROSSHAIR - - - - - - gtk.gdk.DIAMOND_CROSS - - - - - - gtk.gdk.DOT - - - - - - gtk.gdk.DOTBOX - - - - - - gtk.gdk.DOUBLE_ARROW - - - - - - gtk.gdk.DRAFT_LARGE - - - - - - gtk.gdk.DRAFT_SMALL - - - - - - gtk.gdk.DRAPED_BOX - - - - - - gtk.gdk.EXCHANGE - - - - - - gtk.gdk.FLEUR - - - - - - gtk.gdk.GOBBLER - - - - - - gtk.gdk.GUMBY - - - - - - gtk.gdk.HAND1 - - - - - - gtk.gdk.HAND2 - - - - - - gtk.gdk.HEART - - - - - - gtk.gdk.ICON - - - - - - gtk.gdk.IRON_CROSS - - - - - - gtk.gdk.LEFT_PTR - - - - - - gtk.gdk.LEFT_SIDE - - - - - - gtk.gdk.LEFT_TEE - - - - - - gtk.gdk.LEFTBUTTON - - - - - - gtk.gdk.LL_ANGLE - - - - - - gtk.gdk.LR_ANGLE - - - - - - gtk.gdk.MAN - - - - - - gtk.gdk.MIDDLEBUTTON - - - - - - gtk.gdk.MOUSE - - - - - - gtk.gdk.PENCIL - - - - - - gtk.gdk.PIRATE - - - - - - gtk.gdk.PLUS - - - - - - gtk.gdk.QUESTION_ARROW - - - - - - gtk.gdk.RIGHT_PTR - - - - - - gtk.gdk.RIGHT_SIDE - - - - - - gtk.gdk.RIGHT_TEE - - - - - - gtk.gdk.RIGHTBUTTON - - - - - - gtk.gdk.RTL_LOGO - - - - - - gtk.gdk.SAILBOAT - - - - - - gtk.gdk.SB_DOWN_ARROW - - - - - - gtk.gdk.SB_H_DOUBLE_ARROW - - - - - - gtk.gdk.SB_LEFT_ARROW - - - - - - gtk.gdk.SB_RIGHT_ARROW - - - - - - gtk.gdk.SB_UP_ARROW - - - - - - gtk.gdk.SB_V_DOUBLE_ARROW - - - - - - gtk.gdk.SHUTTLE - - - - - - gtk.gdk.SIZING - - - - - - gtk.gdk.SPIDER - - - - - - gtk.gdk.SPRAYCAN - - - - - - gtk.gdk.STAR - - - - - - gtk.gdk.TARGET - - - - - - gtk.gdk.TCROSS - - - - - - gtk.gdk.TOP_LEFT_ARROW - - - - - - gtk.gdk.TOP_LEFT_CORNER - - - - - - gtk.gdk.TOP_RIGHT_CORNER - - - - - - gtk.gdk.TOP_SIDE - - - - - - gtk.gdk.TOP_TEE - - - - - - gtk.gdk.TREK - - - - - - gtk.gdk.UL_ANGLE - - - - - - gtk.gdk.UMBRELLA - - - - - - gtk.gdk.UR_ANGLE - - - - - - gtk.gdk.WATCH - - - - - - gtk.gdk.XTERM - - - - - - - - - - GDK Drag Protocol Constants - - The Drag Protocol constants specify the protocol for a gtk.gdk.DragContext -according to which DND is done. - - - - gtk.gdk.DRAG_PROTO_MOTIF - - The Motif DND protocol. - - - - gtk.gdk.DRAG_PROTO_XDND - - The Xdnd protocol. - - - - gtk.gdk.DRAG_PROTO_ROOTWIN - - An extension to the Xdnd protocol for unclaimed root -window drops. - - - - gtk.gdk.DRAG_PROTO_NONE - - no protocol. - - - - gtk.gdk.DRAG_PROTO_WIN32_DROPFILES - - The simple WM_DROPFILES protocol. - - - - gtk.gdk.DRAG_PROTO_OLE2 - - The complex OLE2 DND protocol (not -implemented). - - - - gtk.gdk.DRAG_PROTO_LOCAL - - Intra-application DND. - - - - - - - - GDK Event Mask Flag Constants - - The Event Mask flag constants are a set of bit-flags that -specify the events a window is to receive. Most of these masks map onto one -or more of the Event Type -Constants. - - - - gtk.gdk.EXPOSURE_MASK - - - gtk.gdk.POINTER_MOTION_MASK - - - gtk.gdk.POINTER_MOTION_HINT_MASK - - - gtk.gdk.BUTTON_MOTION_MASK - - - gtk.gdk.BUTTON1_MOTION_MASK - - - gtk.gdk.BUTTON2_MOTION_MASK - - - gtk.gdk.BUTTON3_MOTION_MASK - - - gtk.gdk.BUTTON_PRESS_MASK - - - gtk.gdk.BUTTON_RELEASE_MASK - - - gtk.gdk.KEY_PRESS_MASK - - - gtk.gdk.KEY_RELEASE_MASK - - - gtk.gdk.ENTER_NOTIFY_MASK - - - gtk.gdk.LEAVE_NOTIFY_MASK - - - gtk.gdk.FOCUS_CHANGE_MASK - - - gtk.gdk.STRUCTURE_MASK - - - gtk.gdk.PROPERTY_CHANGE_MASK - - - gtk.gdk.VISIBILITY_NOTIFY_MASK - - - gtk.gdk.PROXIMITY_IN_MASK - - - gtk.gdk.PROXIMITY_OUT_MASK - - - gtk.gdk.SUBSTRUCTURE_MASK - - - gtk.gdk.SCROLL_MASK - - - gtk.gdk.ALL_EVENTS_MASK - - - - - - - GDK Event Type Constants - - The Event Type constants specify the type of an event. - - - - gtk.gdk.NOTHING - - a special code to indicate a null event. - - - - gtk.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. - - - - gtk.gdk.DESTROY - - the window has been destroyed. - - - - gtk.gdk.EXPOSE - - all or part of the window has become visible and needs to be redrawn. - - - - gtk.gdk.MOTION_NOTIFY - - the pointer (usually a mouse) has moved. - - - - gtk.gdk.BUTTON_PRESS - - a mouse button has been pressed. - - - - gtk.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 gtk.gdk.BUTTON_PRESS event. - - - - gtk.gdk._3BUTTON_PRESS - - a mouse button has been clicked 3 times in a short period of time. Note that each click also generates a gtk.gdk.BUTTON_PRESS event. - - - - gtk.gdk.BUTTON_RELEASE - - a mouse button has been released. - - - - gtk.gdk.KEY_PRESS - - a key has been pressed. - - - - gtk.gdk.KEY_RELEASE - - a key has been released. - - - - gtk.gdk.ENTER_NOTIFY - - the pointer has entered the window. - - - - gtk.gdk.LEAVE_NOTIFY - - the pointer has left the window. - - - - gtk.gdk.FOCUS_CHANGE - - the keyboard focus has entered or left the window. - - - - gtk.gdk.CONFIGURE - - the size, position or stacking order of the window has changed. Note that PyGTK discards these events for gtk.gdk.WINDOW_CHILD windows. - - - - gtk.gdk.MAP - - the window has been mapped. - - - - gtk.gdk.UNMAP - - the window has been unmapped. - - - - gtk.gdk.PROPERTY_NOTIFY - - a property on the window has been changed or deleted. - - - - gtk.gdk.SELECTION_CLEAR - - the application has lost ownership of a selection. - - - - gtk.gdk.SELECTION_REQUEST - - another application has requested a selection. - - - - gtk.gdk.SELECTION_NOTIFY - - a selection has been received. - - - - gtk.gdk.PROXIMITY_IN - - an input device has moved into contact with a sensing surface (e.g. a touchscreen or graphics tablet). - - - - gtk.gdk.PROXIMITY_OUT - - an input device has moved out of contact with a sensing surface. - - - - gtk.gdk.DRAG_ENTER - - the mouse has entered the window while a drag is in progress. - - - - gtk.gdk.DRAG_LEAVE - - the mouse has left the window while a drag is in progress - - - - gtk.gdk.DRAG_MOTION - - the mouse has moved in the window while a drag is in progress. - - - - gtk.gdk.DRAG_STATUS - - the status of the drag operation initiated by the window has changed. - - - - gtk.gdk.DROP_START - - a drop operation onto the window has started. - - - - gtk.gdk.DROP_FINISHED - - the drop operation initiated by the window has completed. - - - - gtk.gdk.CLIENT_EVENT - - a message has been received from another application. - - - - gtk.gdk.VISIBILITY_NOTIFY - - the window visibility status has changed. - - - - gtk.gdk.NO_EXPOSE - - indicates that the source region was completely available when parts of a drawable were copied. This is not very useful. - - - - gtk.gdk.SCROLL - - a scroll had occurred for a window - - - - gtk.gdk.WINDOW_STATE - - the window state has changed - - - - gtk.gdk.SETTING - - a setting has changed - - - - - - - - GDK Extension Mode Constants - - The Extension Mode constants specify which extension events are -desired for a particular widget. - - - - gtk.gdk.EXTENSION_EVENTS_NONE - - No extension events are desired. - - - - gtk.gdk.EXTENSION_EVENTS_ALL - - All extension events are desired. - - - - gtk.gdk.EXTENSION_EVENTS_CURSOR - - Extension events are desired only if a cursor will be - displayed for the device. - - - - - - - - GDK Fill Constants - - The Fill constants specify how primitives are drawn. - - - - gtk.gdk.SOLID - - draw with the foreground color. - - - - gtk.gdk.TILED - - draw with a tiled pixmap. - - - - gtk.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. - - - - gtk.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 Fill Rule Constants - - The Fill Rule constants specify 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. Not used in PyGTK. - - - - gtk.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. - - - - gtk.gdk.WINDING_RULE - - Overlapping areas are always included. - - - - - - - - GDK Filter Return Constants - - The Filter Return constants specify the result of filtering a -native event. See the gtk.gdk.Window.add_filter() -method for more information. - - - - gtk.gdk.FILTER_CONTINUE - - Event not handled, continue processing. - - - - gtk.gdk.FILTER_TRANSLATE - - Native event translated and stored into the gtk.gdk.Event passed -in. - - - - gtk.gdk.FILTER_REMOVE - - Event handled, terminate processing. - - - - - - - - GDK Function Constants - - The Function constants specify 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 gtk.gdk.COPY, -gtk.gdk.XOR and gtk.gdk.INVERT are -generally useful. For bitmaps, gtk.gdk.AND and -gtk.gdk.OR are also useful. - - - - gtk.gdk.COPY - - - gtk.gdk.INVERT - - - gtk.gdk.XOR - - - gtk.gdk.CLEAR - - - gtk.gdk.AND - - - gtk.gdk.AND_REVERSE. - - - gtk.gdk.AND_INVERT - - - gtk.gdk.NOOP - - - gtk.gdk.OR - - - gtk.gdk.EQUIV - - - gtk.gdk.OR_REVERSE - - - gtk.gdk.COPY_INVERT - - - gtk.gdk.OR_INVERT - - - gtk.gdk.NAND - - - gtk.gdk.NOR - - - gtk.gdk.SET - - - - - - - GDK GC Values Mask Flag Constants - - The GC Values Mask flag constants are a set of bit flags used to -specify which fields GdkGCValues structure are set. These are only used -internally by PyGTK. - - - - gtk.gdk.GC_FOREGROUND - - the foreground is set. - - - - gtk.gdk.GC_BACKGROUND - - the background is set. - - - - gtk.gdk.GC_FONT - - the font is set. - - - - gtk.gdk.GC_FUNCTION - - the function is set. - - - - gtk.gdk.GC_FILL - - the fill is set. - - - - gtk.gdk.GC_TILE - - the tile is set. - - - - gtk.gdk.GC_STIPPLE - - the stipple is set. - - - - gtk.gdk.GC_CLIP_MASK - - the clip_mask is set. - - - - gtk.gdk.GC_SUBWINDOW - - the subwindow_mode is set. - - - - gtk.gdk.GC_TS_X_ORIGIN - - the ts_x_origin is set. - - - - gtk.gdk.GC_TS_Y_ORIGIN - - the ts_y_origin is set. - - - - gtk.gdk.GC_CLIP_X_ORIGIN - - the clip_x_origin is set. - - - - gtk.gdk.GC_CLIP_Y_ORIGIN - - the clip_y_origin is set. - - - - gtk.gdk.GC_EXPOSURES - - the graphics_exposures is set. - - - - gtk.gdk.GC_LINE_WIDTH - - the line_width is set. - - - - gtk.gdk.GC_LINE_STYLE - - the line_style is set. - - - - gtk.gdk.GC_CAP_STYLE - - the cap_style is set. - - - - gtk.gdk.GC_JOIN_STYLE - - the join_style is set. - - - - - - - - GDK Gravity Constants - - The Gravity constants specify the reference point of a window -and the meaning of coordinates passed to the gtk.Window.move() -method. - - - - gtk.gdk.GRAVITY_NORTH_WEST - - The reference point is at the top left - corner. - - - - gtk.gdk.GRAVITY_NORTH - - The reference point is in the middle of the top - edge. - - - - gtk.gdk.GRAVITY_NORTH_EAST - - The reference point is at the top right - corner. - - - - gtk.gdk.GRAVITY_WEST - - The reference point is at the middle of the left - edge. - - - - gtk.gdk.GRAVITY_CENTER - - The reference point is at the center of the - window. - - - - gtk.gdk.GRAVITY_EAST - - The reference point is at the middle of the right - edge. - - - - gtk.gdk.GRAVITY_SOUTH_WEST - - The reference point is at the lower left - corner. - - - - gtk.gdk.GRAVITY_SOUTH - - The reference point is at the middle of the lower - edge. - - - - gtk.gdk.GRAVITY_SOUTH_EAST - - The reference point is at the lower right - corner. - - - - gtk.gdk.GRAVITY_STATIC - - The reference point is at the top left corner of the - window itself, ignoring window manager decorations. - - - - - - - - GDK Image Type Constants - - The Image Type constants specify the type of a gtk.gdk.Image. - - - - gtk.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. - - - - gtk.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. - - - - gtk.gdk.IMAGE_FASTEST - - Specifies that gtk.gdk.IMAGE_SHARED should be tried -first, and if that fails then gtk.gdk.IMAGE_NORMAL will be used. - - - - - - - - GDK Input Condition Flag Constants - - The Input Condition constants are a set of bit-flags that -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. - - - - gtk.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.) - - - - gtk.gdk.INPUT_WRITE - - The file descriptor has become available for - writing. - - - - gtk.gdk.INPUT_EXCEPTION - - An exception was raised on the file - descriptor. - - - - - - - - GDK Input Mode Constants - - The Input Mode constants specify the mode of an input -device. - - - - gtk.gdk.MODE_DISABLED - - the device is disabled and will not report any -events. - - - - gtk.gdk.MODE_SCREEN - - the device is enabled. The device's coordinate space -maps to the entire screen. - - - - gtk.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. - - - - - - - - GDK Input Source Constants - - The Input Source constants specify the type of an input device -in general terms. - - - - gtk.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.) - - - - gtk.gdk.SOURCE_PEN - - the device is a stylus of a graphics tablet or similar -device. - - - - gtk.gdk.SOURCE_ERASER - - the device is an eraser. Typically, this would be the -other end of a stylus on a graphics tablet. - - - - gtk.gdk.SOURCE_CURSOR - - the device is a graphics tablet "puck" or similar -device. - - - - - - - - GDK Join Style Constants - - The Join Style constants specify how the joins between segments -of a polygon are drawn. - - - - gtk.gdk.JOIN_MITER - - The sides of each line are extended to meet at an -angle. - - - - gtk.gdk.JOIN_ROUND - - The sides of the two lines are joined by a circular -arc. - - - - gtk.gdk.JOIN_BEVEL - - The sides of the two lines are joined by a straight -line which makes an equal angle with each line. - - - - - - - - GDK Line Style Constants - - The Line Style constants specify how lines are drawn. - - - - gtk.gdk.LINE_SOLID - - Lines are drawn solid. - - - - gtk.gdk.LINE_ON_OFF_DASH - - Lines are drawn dashed where even segments are drawn -but odd segments are not drawn. - - - - gtk.gdk.LINE_DOUBLE_DASH - - Lines are drawn dashed where even segments are drawn -normally but odd segments are drawn in the background color if the fill -style is gtk.gdk.SOLID, or in the background color masked -by the stipple if the fill style is -gtk.gdk.STIPPLED. - - - - - - - - GDK Modifier Constants - - The Modifier constants are a set of bit-flags to indicate the -state of modifier keys and mouse buttons in various event types. Typical -modifier keys are Shift, Control, -Meta, Super, Hyper, -Alt, Compose, Apple, -CapsLock or ShiftLock. - - - - gtk.gdk.SHIFT_MASK - - The Shift key. - - - - gtk.gdk.LOCK_MASK - - A Lock key (depending on the modifier mapping of the X -server this may either be CapsLock or ShiftLock). - - - - gtk.gdk.CONTROL_MASK - - The Control key. - - - - gtk.gdk.MOD1_MASK - - The fourth modifier key (it depends on the modifier -mapping of the X server which key is interpreted as this modifier, but -normally it is the Alt key). - - - - gtk.gdk.MOD2_MASK - - The fifth modifier key (it depends on the modifier -mapping of the X server which key is interpreted as this -modifier). - - - - gtk.gdk.MOD3_MASK - - The sixth modifier key (it depends on the modifier -mapping of the X server which key is interpreted as this -modifier). - - - - gtk.gdk.MOD4_MASK - - The seventh modifier key (it depends on the modifier -mapping of the X server which key is interpreted as this -modifier). - - - - gtk.gdk.MOD5_MASK - - The eighth modifier key (it depends on the modifier -mapping of the X server which key is interpreted as this -modifier). - - - - gtk.gdk.BUTTON1_MASK - - The first mouse button. - - - - gtk.gdk.BUTTON2_MASK - - The second mouse button. - - - - gtk.gdk.BUTTON3_MASK - - The third mouse button. - - - - gtk.gdk.BUTTON4_MASK - - The fourth mouse button. - - - - gtk.gdk.BUTTON5_MASK - - The fifth mouse button. - - - - gtk.gdk.RELEASE_MASK - - Differentiates between (keyval, modifiers) pairs from -key press and release events. - - - - gtk.gdk.MODIFIER_MASK - - all of the above - - - - - - - - GDK Notify Type Constants - - The Notify Type constants specify the kind of crossing for the -Crossing gtk.gdk.Event - - - - gtk.gdk.NOTIFY_ANCESTOR - - the window is entered from an ancestor or left toward - an ancestor. - - - - gtk.gdk.NOTIFY_VIRTUAL - - the pointer moves between an ancestor and an inferior - of the window. - - - - gtk.gdk.NOTIFY_INFERIOR - - the window is entered from an inferior or left toward - an inferior. - - - - gtk.gdk.NOTIFY_NONLINEAR - - the window is entered from or left toward a window - which is neither an ancestor nor an inferior. - - - - gtk.gdk.NOTIFY_NONLINEAR_VIRTUAL - - the pointer moves between two windows which are not - ancestors of each other and the window is part of the ancestor - chain between one of these windows and their least common - ancestor. - - - - gtk.gdk.NOTIFY_UNKNOWN - - ??? - - - - - - - - GDK Overlap Type Constants - - The Overlap Type constants specify the possible values returned - by the gtk.gdk.Region.rect_in() - method. - - - - gtk.gdk.OVERLAP_RECTANGLE_IN - - The rectangle is inside the GdkRegion. - - - - gtk.gdk.OVERLAP_RECTANGLE_OUT - - The rectangle is outside the GdkRegion. - - - - gtk.gdk.OVERLAP_RECTANGLE_PART - - The rectangle is partly inside the GdkRegion. - - - - - - - - GDK Owner Change Constants - - The Owner Change constants specify the possible values - indicating why selection ownership changed. These are used by the - gdk.OWNER_CHANGE type gtk.gdk.Event - "owner" attribute. - - - - gtk.gdk.OVERLAP_RECTANGLE_IN - - The rectangle is inside the GdkRegion. - - - - gtk.gdk.OVERLAP_RECTANGLE_OUT - - The rectangle is outside the GdkRegion. - - - - gtk.gdk.OVERLAP_RECTANGLE_PART - - The rectangle is partly inside the GdkRegion. - - - - - - - - GDK Parent Relative Constant - - - This constant is available in PyGTK 2.10 and above. - - - The Parent Relative constant is a special value (equivalent to - 1L) for gtk.gdk.Pixmap - variables, indicating that the background pixmap for a window should - be inherited from the parent window. - - - - gtk.gdk.PARENT_RELATIVE - - the background pixmap for a window should be inherited - from the parent window. - - - - - - - - GDK Pixbuf Rotation Constants - - The Pixbuf Rotation constants specify the angles that a pixbuf - can be rotated using the gtk.gdk.Pixbuf.rotate_simple() - method. - - - - gtk.gdk.PIXBUF_ROTATE_NONE - - No rotation. Rotate by 0 degrees. - - - - gtk.gdk.PIXBUF_ROTATE_COUNTERCLOCKWISE - - Rotate by 90 degrees. - - - - gtk.gdk.PIXBUF_ROTATE_UPSIDEDOWN - - Rotate by 180 degrees. - - - - gtk.gdk.PIXBUF_ROTATE_CLOCKWISE - - Rotate by 270 degrees. - - - - - - - - GDK Property Mode Constants - - The Property Mode constants specify how existing data is -combined with new data when using the the gtk.gdk.Window.property_change() -method. - - - - gtk.gdk.PROP_MODE_REPLACE - - The new data replaces the existing data. - - - - gtk.gdk.PROP_MODE_PREPEND - - The new data is prepended to the existing data. - - - - - gtk.gdk.PROP_MODE_APPEND - - The new data is appended to the existing -data. - - - - - - - - GDK Property State Constants - - The Property State constants specify the type of a property -change for a Property gtk.gdk.Event - - - - gtk.gdk.PROPERTY_NEW_VALUE - - the property value was changed. - - - - gtk.gdk.PROPERTY_DELETE - - the property was deleted. - - - - - - - - GDK RGB Dither Constants - - The RGB Dither constants specify the type of dithering to apply -to the image on display. - - - - gtk.gdk.RGB_DITHER_NONE - - Never use dithering. - - - - gtk.gdk.RGB_DITHER_NORMAL - - Use dithering in 8 bits per pixel (and below) - only. - - - - gtk.gdk.RGB_DITHER_MAX - - Use dithering in 16 bits per pixel and below. - - - - - - - - GDK Scroll Direction Constants - - The Scroll Direction constants specify the direction for the -Scroll.gtk.gdk.Event - - - - gtk.gdk.SCROLL_UP - - the window is scrolled up. - - - - gtk.gdk.SCROLL_DOWN - - the window is scrolled down. - - - - gtk.gdk.SCROLL_LEFT - - the window is scrolled to the left. - - - - gtk.gdk.SCROLL_RIGHT - - the window is scrolled to the right. - - - - - - - - GDK Setting Action Constants - - The Setting Action constants specify the kind of modification -applied to a setting in a Setting gtk.gdk.Event - - - - gtk.gdk.SETTING_ACTION_NEW - - A setting was added. - - - - gtk.gdk.SETTING_ACTION_CHANGED - - A setting was changed. - - - - gtk.gdk.SETTING_ACTION_DELETED - - A setting was deleted. - - - - - - - - GDK Subwindow Mode Constants - - The Subwindow Mode constants specify how drawing onto a window -will affect child windows of that window. - - - - gtk.gdk.CLIP_BY_CHILDREN - - only draw onto the window itself not the -subwindows. - - - - gtk.gdk.INCLUDE_INFERIORS - - draw onto the window and child windows. - - - - - - - - GDK Visibility State Constants - - The Visibility State constants specify the visibility status of a -window for the Visibility gtk.gdk.Event - - - - gtk.gdk.VISIBILITY_UNOBSCURED - - the window is completely visible. - - - - gtk.gdk.VISIBILITY_PARTIAL - - the window is partially visible. - - - - gtk.gdk.VISIBILITY_FULLY_OBSCURED - - the window is not visible at all. - - - - - - - - GDK Visual Type Constants - - The Visual Type constants specify a set of values that describe -the manner in which the pixel values for a visual are converted into RGB -values for display. - - - - gtk.gdk.VISUAL_STATIC_GRAY - - Each pixel value indexes a grayscale value -directly. - - - - gtk.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. - - - - gtk.gdk.VISUAL_STATIC_COLOR - - Each pixel value is an index into a predefined, -unmodifiable color map that maps pixel values into RGB values. - - - - gtk.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. - - - - gtk.gdk.VISUAL_TRUE_COLOR - - Each pixel value directly contains red, green, and blue -components. The red_mask, green_mask, and blue_mask fields of the gtk.gdk.Visual -structure describe how the components are assembled into a pixel -value. - - - - gtk.gdk.VISUAL_DIRECT_COLOR - - Each pixel value contains red, green, and blue components -as for gtk.gdk.TRUE_COLOR, but the components are mapped -via a color table into the final output table instead of being converted -directly. - - - - - - - - GDK Window Class Constants - - The Window Class constants specify the class of -window. gtk.gdk.INPUT_OUTPUT windows are the standard -kind of window you might expect. gtk.gdk.INPUT_ONLY -windows are invisible; they are used to trap events, but you can't draw on -them. - - - - gtk.gdk.INPUT_OUTPUT - - A window for graphics and events. - - - - gtk.gdk.INPUT_ONLY - - A window for events only. - - - - - - - - GDK Window Edge Constants - - The Window Edge constants specify window edge or corner. - - - - gtk.gdk.WINDOW_EDGE_NORTH_WEST - - The top left corner. - - - - gtk.gdk.WINDOW_EDGE_NORTH - - The top edge. - - - - gtk.gdk.WINDOW_EDGE_NORTH_EAST - - The top right corner. - - - - gtk.gdk.WINDOW_EDGE_WEST - - The left edge. - - - - gtk.gdk.WINDOW_EDGE_EAST - - The right edge. - - - - gtk.gdk.WINDOW_EDGE_SOUTH_WEST - - The lower left corner. - - - - gtk.gdk.WINDOW_EDGE_SOUTH - - The lower edge. - - - - gtk.gdk.WINDOW_EDGE_SOUTH_EAST - - The lower right corner. - - - - - - - - GDK Window Hints Constants - - The Window Hints constants specify the fields of a GdkGeometry -struct should be paid attention to. Also, the presence/absence of -gtk.gdk.HINT_POS, -gtk.gdk.HINT_USER_POS, and -gtk.gdk.HINT_USER_SIZE is significant, though they don't -directly refer to GdkGeometry -fields. gtk.gdk.HINT_USER_POS will be set automatically -by gtk.Window -if you call the gtk.Window.move() -method. gtk.gdk.HINT_USER_POS and -gtk.gdk.HINT_USER_SIZE should be set if the user -specified a size/position using a --geometry command-line argument; the -gtk.Window.parse_geometry() -method automatically sets these flags. These constants aren't useful in -PyGTK. - - - - gtk.gdk.HINT_POS - - Indicates that the program has positioned the - window - - - - gtk.gdk.HINT_MIN_SIZE - - Min size fields are set - - - - gtk.gdk.HINT_MAX_SIZE - - Max size fields are set - - - - gtk.gdk.HINT_BASE_SIZE - - Base size fields are set - - - - gtk.gdk.HINT_ASPECT - - Aspect ratio fields are set - - - - gtk.gdk.HINT_RESIZE_INC - - Resize increment fields are set - - - - gtk.gdk.HINT_WIN_GRAVITY - - Window gravity field is set - - - - gtk.gdk.HINT_USER_POS - - Indicates that the window's position was explicitly set - by the user - - - - gtk.gdk.HINT_USER_SIZE - - Indicates that the window's size was explicitly set by - the user - - - - - - - - GDK Window State Flag Constants - - The Window State flag constants are a set of bit-flags that -specify the state of a toplevel window. - - - - gtk.gdk.WINDOW_STATE_WITHDRAWN - - The window is not shown. - - - - gtk.gdk.WINDOW_STATE_ICONIFIED - - The window is minimized. - - - - gtk.gdk.WINDOW_STATE_MAXIMIZED - - The window is maximized. - - - - gtk.gdk.WINDOW_STATE_STICKY - - The window is sticky. - - - - gtk.gdk.WINDOW_STATE_FULLSCREEN - - The window is maximized without decorations. Available -in PyGTK 2.2 and above. - - - - gtk.gdk.WINDOW_STATE_ABOVE - - The window is kept above other windows. Available in -PyGTK 2.4 and above. - - - - gtk.gdk.WINDOW_STATE_BELOW - - The window is kept below other windows. Available in -PyGTK 2.4 and above. - - - - - - - - GDK Window Type Constants - - The Window Type constants specify the type of window. - - - - gtk.gdk.WINDOW_ROOT - - The root window; this window has no parent, covers the -entire screen, and is created by the window system. - - - - gtk.gdk.WINDOW_TOPLEVEL - - A toplevel window (used to implement gtk.Window). - - - - gtk.gdk.WINDOW_CHILD - - A child window (used to implement widgets e.g. gtk.Entry). - - - - gtk.gdk.WINDOW_DIALOG - - A useless/deprecated compatibility type. - - - - gtk.gdk.WINDOW_TEMP - - An override redirect temporary window (used to implement -gtk.Menu). - - - - gtk.gdk.WINDOW_FOREIGN - - A foreign window (see the gtk.gdk.window_foreign_new() -function). - - - - - - - - - GDK Window Type Hint Constants - - The Window Type Hint constants specify hints for the window -manager that indicate what type of function the window has. The window -manager can use this when determining decoration and behavior of the -window. The hint must be set before mapping the window. - - - - gtk.gdk.WINDOW_TYPE_HINT_NORMAL - - A normal toplevel window. - - - - gtk.gdk.WINDOW_TYPE_HINT_DIALOG - - A dialog window. - - - - gtk.gdk.WINDOW_TYPE_HINT_MENU - - A window used to implement a menu. - - - - gtk.gdk.WINDOW_TYPE_HINT_TOOLBAR - - A window used to implement a toolbar. - - - - gtk.gdk.WINDOW_TYPE_HINT_SPLASHSCREEN - - A window used to implement a splash screen - - - - gtk.gdk.WINDOW_TYPE_HINT_UTILITY - - - - - - gtk.gdk.WINDOW_TYPE_HINT_DOCK - - A window used to implement a docking bar. - - - - gtk.gdk.WINDOW_TYPE_HINT_DESKTOP - - A window used to implement a desktop. - - - - - - - - GDK WM Decoration Constants - - The WM Decoration constants are bit-flags that specify the hints -that the window manager can use when determining how to decorate the -window. The hints must be set before mapping the window. - - - - gtk.gdk.DECOR_ALL - - All decorations should be applied. - - - - gtk.gdk.DECOR_BORDER - - A frame should be drawn around the window. - - - - gtk.gdk.DECOR_RESIZEH - - The frame should have resize handles. - - - - gtk.gdk.DECOR_TITLE - - A titlebar should be placed above the window. - - - - gtk.gdk.DECOR_MENU - - A button for opening a menu should be included. - - - - gtk.gdk.DECOR_MINIMIZE - - A minimize button should be included. - - - - gtk.gdk.DECOR_MAXIMIZE - - A maximize button should be included. - - - - - - - - GDK WM Function Constants - - The WM Function constants specify hints originally defined by -the Motif toolkit. The window manager can use them when determining the -functions to offer for the window. The hint must be set before mapping the -window. - - - - gtk.gdk.FUNC_ALL - - All functions should be offered. - - - - gtk.gdk.FUNC_RESIZE - - The window should be resizable. - - - - gtk.gdk.FUNC_MOVE - - The window should be movable. - - - - gtk.gdk.FUNC_MINIMIZE - - The window should be minimizable. - - - - gtk.gdk.FUNC_MAXIMIZE - - The window should be maximizable. - - - - gtk.gdk.FUNC_CLOSE - - The window should be closeable. - - - - - - - - - diff --git a/docs/reference/pygtk-gdk-functions.xml b/docs/reference/pygtk-gdk-functions.xml deleted file mode 100644 index 004c0e60..00000000 --- a/docs/reference/pygtk-gdk-functions.xml +++ /dev/null @@ -1,1537 +0,0 @@ - - - - - - gtk.gdk Functions - the gtk.gdk module functions - - - - Synopsis - - - <link linkend="class-gdkatom"><classname>gtk.gdk.Atom</classname></link> Functions - - - gtk.gdk.atom_intern - name - only_if_existsFalse - - - - - - <link linkend="class-gdkcolor"><classname>gtk.gdk.Color</classname></link> Functions - - - gtk.gdk.color_parse - spec - - - - - - <link linkend="class-gdkcolormap"><classname>gtk.gdk.Colormap</classname></link> Functions - - - gtk.gdk.colormap_get_system - - - - - - - <link linkend="class-gdkdevice"><classname>gtk.gdk.Device</classname></link> Functions - - - gtk.gdk.devices_list - - - gtk.gdk.device_get_core_pointer - - - - - - - <link linkend="class-gdkdisplay"><classname>gtk.gdk.Display</classname></link> Functions - - - gtk.gdk.display_get_default - - - - - - - <link linkend="class-gdkdisplaymanager"><classname>gtk.gdk.DisplayManager</classname></link> Functions - - - gtk.gdk.display_manager_get - - - - - - - <link linkend="class-gdkevent"><classname>gtk.gdk.Event</classname></link> Functions - - - gtk.gdk.events_pending - - - gtk.gdk.event_peek - - - gtk.gdk.event_get - - - gtk.gdk.event_get_graphics_expose - window - - gtk.gdk.set_show_events - show_events - - gtk.gdk.get_show_events - - - gtk.gdk.event_handler_set - func - dataNone - - - - - - <link linkend="class-gdkkeymap"><classname>gtk.gdk.Keymap</classname></link> Functions - - - gtk.gdk.keymap_get_default - - - gtk.gdk.keymap_get_for_display - display - - gtk.gdk.keyval_name - keyval - - gtk.gdk.keyval_from_name - keyval_name - - gtk.gdk.keyval_convert_case - symbol - - gtk.gdk.keyval_to_upper - keyval - - gtk.gdk.keyval_to_lower - keyval - - gtk.gdk.keyval_is_upper - keyval - - gtk.gdk.keyval_is_lower - keyval - - gtk.gdk.keyval_to_unicode - keyval - - gtk.gdk.unicode_to_keyval - wc - - - - - - <link linkend="class-gdkpangorenderer"><classname>gtk.gdk.PangoRenderer</classname></link> Functions - - - gtk.gdk.gdk_pango_renderer_get_default - screen - - - - - - <link linkend="class-gdkpixbuf"><classname>gtk.gdk.Pixbuf</classname></link> Functions - - - gtk.gdk.pixbuf_new_from_file - filename - - gtk.gdk.pixbuf_new_from_file_at_size - filename - width - height - - gtk.gdk.pixbuf_new_from_data - data - colorspace - has_alpha - bits_per_sample - width - height - rowstride - - gtk.gdk.pixbuf_new_from_array - array - colorspace - bits_per_sample - - gtk.gdk.pixbuf_new_from_xpm_data - data - - gtk.gdk.pixbuf_new_from_inline - data_length - data - copy_pixels - - gtk.gdk.pixbuf_get_formats - - - gtk.gdk.pixbuf_get_file_info - filename - - - - - - <link linkend="class-gdkpixbufloader"><classname>gtk.gdk.PixbufLoader</classname> Functions</link> - - - gtk.gdk.pixbuf_loader_new_with_mime_type - mime_type - - - - - - <link linkend="class-gdkpixmap"><classname>gtk.gdk.Pixmap</classname></link> Functions - - - gtk.gdk.bitmap_create_from_data - drawable - data - width - height - - gtk.gdk.pixmap_create_from_data - drawable - data - width - height - depth - fg - bg - - gtk.gdk.pixmap_create_from_xpm - window - transparent_color - filename - - gtk.gdk.pixmap_colormap_create_from_xpm - window - colormap - transparent_color - filename - - gtk.gdk.pixmap_create_from_xpm_d - window - transparent_color - data - - gtk.gdk.pixmap_colormap_create_from_xpm_d - window - colormap - transparent_color - data - - gtk.gdk.pixmap_foreign_new - anid - - gtk.gdk.pixmap_lookup - anid - - gtk.gdk.pixmap_foreign_new_for_display - display - anid - - gtk.gdk.pixmap_lookup_for_display - display - anid - - - - - - <link linkend="class-gdkregion"><classname>gtk.gdk.Region</classname></link> Functions - - - gtk.gdk.region_rectangle - rectangle - - - - - - <link linkend="class-gdkscreen"><classname>gtk.gdk.Screen</classname></link> Functions - - - gtk.gdk.screen_width - - - gtk.gdk.screen_height - - - gtk.gdk.screen_width_mm - - - gtk.gdk.screen_height_mm - - - gtk.gdk.screen_get_default - - - - - - - <link linkend="class-gdkvisual"><classname>gtk.gdk.Visual</classname></link> Functions - - - gtk.gdk.list_visuals - - - gtk.gdk.visual_get_best - - - gtk.gdk.visual_get_best_depth - - - gtk.gdk.visual_get_best_type - - - gtk.gdk.visual_get_best_with_depth - depth - - gtk.gdk.visual_get_best_with_type - type - - gtk.gdk.visual_get_system - - - gtk.gdk.query_depths - - - gtk.gdk.query_visual_types - - - - - - - <link linkend="class-gdkwindow"><classname>gtk.gdk.Window</classname></link> Functions - - - gtk.gdk.window_foreign_new - anid - - gtk.gdk.window_foreign_new_for_display - display - anid - - gtk.gdk.get_default_root_window - - - gtk.gdk.window_get_toplevels - - - gtk.gdk.window_lookup - anid - - gtk.gdkwindow_lookup_for_display. - display - anid - - gtk.gdk.window_process_all_updates - - - gtk.gdk.gdk_window_set_debug_updates - - - gtk.gdk.window_at_pointer - - - - - - - Miscellaneous Functions - - - gtk.gdk.pointer_grab - window - owner_events - False - event_mask - 0 - confine_to - None - cursor - None - time - 0L - - gtk.gdk.pointer_ungrab - time - 0L - - gtk.gdk.keyboard_grab - window - owner_events - False - time - 0L - - gtk.gdk.keyboard_ungrab - time - 0L - - gtk.gdk.pointer_is_grabbed - - - gtk.gdk.flush - - - gtk.gdk.beep - - - gtk.gdk.set_double_click_time - msec - - gtk.gdk.threads_enter - - - gtk.gdk.threads_leave - - - gtk.gdk.threads_init - - - gtk.gdk.rgb_ditherable - - - gtk.gdk.rgb_get_colormap - - - gtk.gdk.rgb_set_verbose - verbose - - gtk.gdk.rgb_set_install - install - - gtk.gdk.rgb_set_min_colors - min_colors - - gtk.gdk.rgb_get_visual - - - gtk.gdk.selection_owner_get - selection - - gtk.gdk.selection_send_notify - requestor - selection - target - property - time - - gtk.gdk.set_sm_client_id - sm_client_id - - gtk.gdk.notify_startup_complete - - - gtk.gdk.get_program_class - - - gtk.gdk.set_program_class - program_class - - gtk.gdk.get_display - - - gtk.gdk.get_display_arg_name - - - gtk.gdk.gdk_pango_context_get_for_screen - screen - - gtk.gdk.gdk_pango_context_get - - - - - - - - Description - - These functions are part of the PyGTK gtk.gdk -module. All the functions are listed above with links to the function -description. Most functions are associated with a specific object class and -their descriptions are part of the class reference. Those functions that are -not directly associated with a specific class have their descriptions -below. - - - - - Functions - - - gtk.gdk.pointer_grab - - - gtk.gdk.pointer_grab - window - owner_events - False - event_mask - 0 - confine_to - None - cursor - None - time - 0L - - - - window : - the gtk.gdk.Window that -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, that is used in -accordance with owner_events. - - - confine_to : - If not None, the pointer -will be confined to this gtk.gdk.Window -during the grab. If the pointer is outside -confine_to, it will automatically be moved to the -closest edge of confine_to and enter and leave events -will be generated as necessary. - - - cursor : - the gtk.gdk.Cursor to -display while the grab is active. If this is None 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 that led to this -pointer grab. This usually comes from a gtk.gdk.Event, though -0L can be used to use the current time if the time isn't -known. - - - Returns : - a grab status value - - - - The gtk.gdk.pointer_grab() function grabs -the pointer (usually a mouse) so that all events are passed to this -application until the pointer is ungrabbed with the gtk.gdk.pointer_ungrab(), -or the grab window becomes unviewable. This overrides any previous pointer -grab by this client. This function returns a grab status value: - - - - gtk.gdk.GRAB_SUCCESS - - The resource was successfully grabbed. - - - - gtk.gdk.GRAB_ALREADY_GRABBED - - The resource is actively grabbed by another -client. - - - - gtk.gdk.GRAB_INVALID_TIME - - The resource was grabbed more recently than the -specified time. - - - - gtk.gdk.GRAB_NOT_VIEWABLE - - The grab window or the -confine_to window are not viewable. - - - - gtk.gdk.GRAB_FROZEN - - The resource is frozen by an active grab of another -client. - - - - - Pointer grabs are used for operations that need complete -control over mouse events, even if the mouse leaves the application. For -example it is used for drag and drop, for dragging the handle in the gtk.HPaned and gtk.VPaned 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. - - - - - gtk.gdk.pointer_ungrab - - - gtk.gdk.pointer_ungrab - time - 0L - - - - time : - a timestamp from a gtk.gdk.Event or 0L -to use the current time - - - - The gtk.gdk.pointer_ungrab() function -ungrabs the pointer if it is grabbed by this application. - - - - - gtk.gdk.keyboard_grab - - - gtk.gdk.keyboard_grab - window - owner_events - False - time - 0L - - - - window : - the gtk.gdk.Window that -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 always reported, independent of the event mask set by -the application. - - - time : - a timestamp from a gtk.gdk.Event or 0L -to use the current time - - - Returns : - a grab status value - - - - The gtk.gdk.keyboard_grab() function grabs -the keyboard so that all events are passed to this application until the -keyboard is ungrabbed with the gtk.gdk.keyboard_ungrab()) -function. This overrides any previous keyboard grab by this client. - - - - - gtk.gdk.keyboard_ungrab - - - gtk.gdk.keyboard_ungrab - time - 0L - - - - time : - a timestamp from a gtk.gdk.Event or 0L -to use the current time - - - - The gtk.gdk.keyboard_ungrab() function -ungrabs the keyboard if it is grabbed by this application. - - - - - gtk.gdk.pointer_is_grabbed - - - gtk.gdk.pointer_is_grabbed - - - - - Returns : - True if the pointer is -currently grabbed by this application. - - - - The gtk.gdk.pointer_is_grabbed() function -returns True if the pointer is currently grabbed by this -application. Note that this does not take the implicit pointer grab on -button presses into account. - - - - - gtk.gdk.flush - - - gtk.gdk.flush - - - - The gtk.gdk.flush() function flushes the X -output buffer and waits until all requests have been processed by the -server. This is rarely needed by applications. - - - - - gtk.gdk.beep - - - gtk.gdk.beep - - - - The gtk.gdk.beep() function emits a short -beep. - - - - - gtk.gdk.set_double_click_time - - - gtk.gdk.set_double_click_time - msec - - - - msec : - the double click time in -milliseconds - - - - The gtk.gdk.set_double_click_time() -function set the double click time for the default display. Applications -should NOT set this, it is a global user-configured setting. - - - - - gtk.gdk.threads_enter - - - gtk.gdk.threads_enter - - - - The gtk.gdk.threads_enter() function marks -the beginning of a critical section that only one thread can operate within -at a time. The critical section is guarded by a GDK -mutual exclusion lock. Python threads are enabled while waiting for the -GDK lock. See the gtk.gtk.threads_init() -function for more information about threading. - - - - - gtk.gdk.threads_leave - - - gtk.gdk.threads_leave - - - - The gtk.gdk.threads_leave() function marks -the end of a critical section started by the gtk.gdk.threads_enter() -function. See the gtk.gtk.threads_init() -function for more information about threading. - - - - - gtk.gdk.threads_init - - - gtk.gdk.threads_init - - - - The gtk.gdk.threads_init() function -initializes PyGTK to use the Python macros that allow -multiple threads to serialize access to the Python interpreter (using the -Python Global Interpreter Lock (GIL)). In addition, the -gtk.gdk.threads_init() function initializes the -GDK global lock (mutex) that serializes thread access to -the GTK and GDK libraries. Thus there -are two different global locking mechanisms at work that are initialized by -the gtk.gdk.threads_init() function: Python and -GDK. - - The gtk.gdk.threads_init() function must be -called before the gtk.main() -function. At this point in the application the Python GIL is held by the -main application thread. (Usually the main thread calls the -gtk.gdk.threads_init() function though any thread could -call it instead.) When the gtk.main() function -is called the GIL is released and other threads may use the Python -interpreter. When PyGTK signal handlers are invoked in -the main thread the GIL is reacquired so that the Python interpreter can run -the handler code. - - - - - gtk.gdk.rgb_ditherable - - - gtk.gdk.rgb_ditherable - - - - - Returns : - True if the gtk.gdk.Visual is -ditherable - - - - The gtk.gdk.rgb_ditherable() function -returns True if the gtk.gdk.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. - - - - - gtk.gdk.rgb_get_colormap - - - gtk.gdk.rgb_get_colormap - - - - - Returns : - the preferred gtk.gdk.Colormap -for rendering image data. - - - - The gtk.gdk.rgb_get_colormap() function -returns the preferred gtk.gdk.Colormap. - - - - - gtk.gdk.rgb_set_verbose - - - gtk.gdk.rgb_set_verbose - verbose - - - - verbose : - If True messages should be -verbose - - - - The gtk.gdk.rgb_set_verbose() function sets -the "verbose" flag to the value specified by verbose. -If verbose is True messages will -be verbose. This is generally only useful for debugging. - - - - - gtk.gdk.rgb_set_install - - - gtk.gdk.rgb_set_install - install - - - - install : - if True set install -mode - - - - The gtk.gdk.rgb_set_install() function sets -the "install" mode to the value of install. If -install is True, a new "private" -colormap is always installed rather than trying to find a best fit with the -colors already allocated. Ordinarily, a colormap only be installed 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. - - - - - gtk.gdk.rgb_set_min_colors - - - gtk.gdk.rgb_set_min_colors - min_colors - - - - min_colors : - the minimum number of -colors. - - - - The gtk.gdk.rgb_set_min_colors() function -sets the minimum number of colors for the color cube to the value specified -by min_colors. Generally, the largest color cube is -allocated. If a color cube at least as large as -min_colors can't be allocated, a private colormap is -installed. - - - - - gtk.gdk.rgb_get_visual - - - gtk.gdk.rgb_get_visual - - - - - Returns : - the gtk.gdk.Visual being -used - - - - The gtk.gdk.rgb_get_visual() function -returns the gtk.gdk.Visual being -used to render image data on the default screen. - - - - - gtk.gdk.selection_owner_get - - - gtk.gdk.selection_owner_get - selection - - - - selection : - an atom indentifying a -selection. - - - Returns : - the gtk.gdk.Window that -owns the selection or None. - - - - The gtk.gdk.selection_owner_get() function -returns the gtk.gdk.Window that -owns the selection specified by selection if there is -a selection owner for this window, and if it is a window known to the -current application. 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. - - - - - gtk.gdk.selection_send_notify - - - gtk.gdk.selection_send_notify - requestor - selection - target - property - time - - - - requestor : - the integer ID of the window to deliver the -response to. - - - selection : - an atom representing the selection that was -requested. - - - target : - an atom representing the target that was -selected. - - - property : - an atom representing the property in which the -selection owner stored the data. - - - time : - a timestamp - - - - The gtk.gdk.selection_send_notify() -function sends a response to a SelectionRequest event. - - - - - gtk.gdk.set_sm_client_id - - - gtk.gdk.set_sm_client_id - sm_client_id - - - - sm_client_id : - the client id string assigned by the session -manager when the connection was opened - - - - The gtk.gdk.set_sm_client_id() function -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. 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 Window System distribution.) - - - - - gtk.gdk.notify_startup_complete - - - gtk.gdk.notify_startup_complete - - - - This function is available in PyGTK 2.8 and above - - - The gtk.gdk.notify_startup_complete() -function indicates to the GUI environment that the application has finished -loading. If the applications opens windows, this function is normally called -after opening the application's initial set of windows. - - GTK+ will call this function automatically after opening the -first gtk.Window unless -the gtk.window_set_auto_startup_notification() -function is called to disable that feature. - - - - - gtk.gdk.get_program_class - - - gtk.gdk.get_program_class - - - - Returns : - the program class - - - - - This function is available in PyGTK 2.8 and above - - - The gtk.gdk.get_program_class() function -returns the program class. Unless the program class has explicitly been set -with the gtk.gdk.set_program_class() -function or with the commandline option, the -default value is the program name with the first character converted to -uppercase. - - - - - gtk.gdk.set_program_class - - - gtk.gdk.set_program_class - program_class - - - - program_class : - a string containing the program -class - - - - - This function is available in PyGTK 2.8 and above - - - The gtk.gdk.set_program_class() function -sets the program class to the string contained in -program_class. The X11 backend -uses the program class to set the class name part of the -WM_CLASS property on toplevel windows. - - - - - gtk.gdk.get_display - - - gtk.gdk.get_display - - - - Returns : - the name of the display - - - - - This function is available in PyGTK 2.8 and above - - - The gtk.gdk.get_display() function returns -the name of the display, which is usually derived from the -DISPLAY environment variable or the - command line option. - - - - - gtk.gdk.get_display_arg_name - - - gtk.gdk.get_display_arg_name - - - - Returns : - the display name, if specified explicitly, or -None. - - - - - This function is available in PyGTK 2.8 and above - - - The gtk.gdk.get_display_arg_name() function -returns the display name specified in the command line arguments, if any or -None if the display name was not explicitly set. - - - - - gtk.gdk.gdk_pango_context_get_for_screen - - - gtk.gdk.gdk_pango_context_get_for_screen - screen - - - - screen : - a gtk.gdk.Screen - - - Returns : - a new pango.Context -object - - - - - This function is available in PyGTK 2.8 and above - - - The -gtk.gdk.gdk_pango_context_get_for_screen() function -creates a new pango.Context -object for the gtk.gdk.Screen -specified by screen. Normally you should use the -get_pango_context() -method instead of this function, to get the appropriate Pango context for -the widget you intend to render text onto. - - - - - gtk.gdk.gdk_pango_context_get - - - gtk.gdk.gdk_pango_context_get - - - - Returns : - a new pango.Context -for the default display. - - - - - This function is available in PyGTK 2.8 and above - - - The gtk.gdk.gdk_pango_context_get() -function creates a new pango.Context for -the default display. Normally you should use the get_pango_context() -method instead of this function, to get the appropriate Pango context for -the widget you intend to render text onto. - - - - - - diff --git a/docs/reference/pygtk-gdkatom.xml b/docs/reference/pygtk-gdkatom.xml deleted file mode 100644 index cc085330..00000000 --- a/docs/reference/pygtk-gdkatom.xml +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - gtk.gdk.Atom - an object representing an interned string - - - - Synopsis - - - gtk.gdk.Atom - - gtk.gdk.atom_intern - name - only_if_existsFalse - - - - - - - Description - - gtk.gdk.Atom is a -PyGTK class that wraps the GTK+ -GdkAtom - an unsigned integer representing an interned -string. An interned string is a string that has an internal -GTK+ mapping between an atom and a string. gtk.gdk.Atom has no -methods. A copy of the interned string can be retrieved by using the Python -str() function. gtk.gdk.atom_intern() will -return a gtk.gdk.Atom -referencing an existing interned string but will intern a string if it isn't -already interned. - - gtk.gdk.Atom objects -are used to provide the targets for gtk.SelectionData -objects that are used by gtk.Clipboard and -gtk.TreeView, -objects and for drag and drop (see gtk.gdk.DragContext, -gtk.gdk.Window -and gtk.TreeDragSource -and gtk.Widget -for more information). The advantage of the interned string is that it is -easy to pass between processes and even systems since only an integer value -is passed. - - PyGTK 2.4 has a number of pre-defined atoms -that map to builtin GTK+ interned string atoms. The -interned strings and the PyGTK 2.4 gtk.gdk.Atom objects -are: - - - - "PRIMARY" - - gtk.gdk.SELECTION_PRIMARY - - - - "SECONDARY" - - gtk.gdk.SELECTION_SECONDARY - - - - "CLIPBOARD" - - gtk.gdk.SELECTION_CLIPBOARD - - - - "ATOM" - - gtk.gdk.SELECTION_TYPE_ATOM - - - - "BITMAP" - - gtk.gdk.TARGET_BITMAP or -gtk.gdk.SELECTION_TYPE_BITMAP - - - - "COLORMAP" - - gtk.gdk.TARGET_COLORMAP or -gtk.gdk.SELECTION_TYPE_COLORMAP - - - - "DRAWABLE" - - gtk.gdk.TARGET_DRAWABLE or -gtk.gdk.SELECTION_TYPE_DRAWABLE - - - - "PIXMAP" - - gtk.gdk.TARGET_PIXMAP or -gtk.gdk.SELECTION_TYPE_PIXMAP - - - - "STRING" - - gtk.gdk.TARGET_STRING or -gtk.gdk.SELECTION_TYPE_STRING - - - - "WINDOW" - - gtk.gdk.SELECTION_TYPE_WINDOW - - - - - Also in PyGTK 2.4, comparison between a string -and a gtk.gdk.Atom is -supported. - - - - - Constructor - - - gtk.gdk.atom_intern - name - only_if_existsFalse - - - - name : - the string to be interned or - retrieved - - - only_if_exists : - this value is ignored - - - Returns : - a new gtk.gdk.Atom - or None - - - - Creates a gtk.gdk.Atom -referencing the interned string specified by name. An -interned string is a string that has a GTK+ mapping to an -unsigned integer value. This constructor will intern the string and create a -gtk.gdk.Atom if -it does not already exist. only_if_exists is -ignored and essentially is always False. - - - - diff --git a/docs/reference/pygtk-gdkcairocontext.xml b/docs/reference/pygtk-gdkcairocontext.xml deleted file mode 100644 index 4bff8fc2..00000000 --- a/docs/reference/pygtk-gdkcairocontext.xml +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - gtk.gdk.CairoContext - object providing support for drawing using Cairo (new in -PyGTK 2.8) - - - - Synopsis - - - gtk.gdk.CairoContext - pangocairo.CairoContext - - - set_source_color - color - - - set_source_pixbuf - pixbuf - pixbuf_x - pixbuf_y - - - rectangle - rectangle - - - region - region - - - set_source_pixmap - pixmap - pixmap_x - pixmap_y - - - - - - - Ancestry - -+-- cairo.Context - +-- pangocairo.CairoContext - +-- gtk.gdk.CairoContext - - - - - - Description - - Cairo is a graphics library that supports vector graphics and -image compositing that can be used with PyGTK. Since 2.8, GTK+ and Pango do -most of their drawing using Cairo. The Cairo drawing model and primitives -are similar to PostScript which uses an imaging model of painting on a two -dimensional surface. There is a Python module that wraps the Cairo API that -is used by PyGTK via subclassing of the cairo.Context class by the pangocairo.CairoContext -class. The cairo.Context class provides most of the drawing primitives used -for drawing on Cairo surfaces. - - PyGTK (and GTK+ and GDK) does not wrap the Cairo API, instead -gtk.gdk.CairoContext -objects can be used to draw on gtk.gdk.Drawable -objects. A gtk.gdk.CairoContext -is created using the gtk.gdk.Drawable.cairo_create() -method. See the pangocairo.CairoContext -and Python cairo module documentation for additional methods. - - - - - Methods - - - gtk.gdk.CairoContext.set_source_color - - - set_source_color - color - - - - color : - a gtk.gdk.Color - - - - - This method is available in PyGTK 2.8 and above. - - - The set_source_color() method sets the -source color of the cairo context to the gtk.gdk.Color -specified by color. See the -cairo.Context.set_source_rgb() method for more information. - - - - - gtk.gdk.CairoContext.set_source_pixbuf - - - set_source_pixbuf - pixbuf - pixbuf_x - pixbuf_y - - - - pixbuf : - a gtk.gdk.Pixbuf - - - pixbuf_x : - the X coordinate of the location to place the -upper left corner of pixbuf. - - - pixbuf_y : - the Y coordinate of the location to place the -upper left corner of pixbuf. - - - - - This method is available in PyGTK 2.8 and above. - - - The set_source_pixbuf() method sets the -gtk.gdk.Pixbuf -specified by pixbuf as the source pattern for the -cairo context. The pattern has an extend mode of -cairo.EXTEND_NONE and is aligned so that the origin of -pixbuf is at the location specified by -pixbuf_x, pixbuf_y. - - - - - gtk.gdk.CairoContext.rectangle - - - rectangle - rectangle - - - - rectangle : - a gtk.gdk.Rectangle - or a 4-tuple representing a rectangle - - - - - This method is available in PyGTK 2.10 and above. - - - The rectangle() method adds the - rectangle specified by rectangle to the current - path. - - - - - gtk.gdk.CairoContext.region - - - region - region - - - - region : - a gtk.gdk.Region - - - - - This method is available in PyGTK 2.10 and above. - - - The region() method adds the - gtk.gdk.Region specified by region to the current - path. - - - - - gtk.gdk.CairoContext.set_source_pixmap - - - set_source_pixmap - pixmap - pixmap_x - pixmap_y - - - - pixmap : - a gtk.gdk.Pixmap - - - pixmap_x : - the X coordinate of the location to place the -upper left corner of pixmap. - - - pixmap_y : - the Y coordinate of the location to place the -upper left corner of pixmap. - - - - - This method is available in PyGTK 2.10 and above. - - - The set_source_pixmap() method sets the -gtk.gdk.Pixmap -specified by pixmap as the source pattern for the -cairo context. The pattern has an extend mode of -cairo.EXTEND_NONE and is aligned so that the origin of -pixmap is at the location specified by -pixmap_x, pixmap_y. - - - - - - diff --git a/docs/reference/pygtk-gdkcolor.xml b/docs/reference/pygtk-gdkcolor.xml deleted file mode 100644 index 36e987ec..00000000 --- a/docs/reference/pygtk-gdkcolor.xml +++ /dev/null @@ -1,210 +0,0 @@ - - - - - - gtk.gdk.Color - an object holding color information - - - - Synopsis - - - gtk.gdk.Color - gobject.GBoxed - - gtk.gdk.Color - red - 0 - green - 0 - blue - 0 - pixel - 0 - - - -Functions - - - gtk.gdk.color_parse - spec - - - - - - Attributes - -
- - - - - - - - - - "pixel" - Read-Write - The pixel value of the color - - - - "red" - Read-Write - The value of the red component of the color - - - - "green" - Read-Write - The value of the green component of the color - - - - "blue" - Read-Write - The value of the blue component of the color - - - - - -
- -
- - - Description - - A gtk.gdk.Color -contains the values of a color that may or may not be allocated. The red, -green and blue attributes are specified by an unsigned integer in the range -0-65535. The pixel value is an index into the colormap that has allocated -the gtk.gdk.Color. -Typically a color is allocated by using the gdk.Colormap.alloc_color() -method. Unallocated colors can be used to specify the color attributes of -gtk.Style -objects since these colors will be allocated when an attempt is made to use -the gtk.Style -object. - - - - - Constructor - - - gtk.gdk.Color - red - 0 - green - 0 - blue - 0 - pixel - 0 - - - - red : - The red color component in the range -0-65535 - - - green : - The green color component in the range -0-65535 - - - blue : - The blue color component in the range -0-65535 - - - pixel : - The index of the color when allocated in its -colormap - - - Returns : - a new gtk.gdk.Color -object - - - - Creates a new gtk.gdk.Color object -with the color component values specified by red, -green and blue (all default to -0) and using the pixel value specified by pixel. The -value of pixel will be overwritten when the color is -allocated. - - - - - Functions - - - gtk.gdk.color_parse - - - gtk.gdk.color_parse - spec - - - - - spec : - a string containing a color -specification - - - Returns : - a gtk.gdk.Color -object - - - - The gtk.gdk.color_parse() method returns -the gtk.gdk.Color -specified by spec. The format of -spec is a string containing the specification of the -color either as a name (e.g. "navajowhite") as specified in the X11 -rgb.txt file or as a hexadecimal string (e.g. -"#FF0078"). The hexadecimal string must start with '#' and must contain 3 -sets of hexadecimal digits of the same length (i.e. 1, 2 ,3 or 4 digits). -For example the following specify the same color value: "#F0A", "#FF00AA", -"#FFF000AAA" and "#FFFF0000AAAA". The gtk.gdk.Color is -not allocated. - - This function raise the ValueError (TypeError prior to PyGTK -2.4) exception if unable to parse the color specification - - - - - -
diff --git a/docs/reference/pygtk-gdkcolormap.xml b/docs/reference/pygtk-gdkcolormap.xml deleted file mode 100644 index bfb12819..00000000 --- a/docs/reference/pygtk-gdkcolormap.xml +++ /dev/null @@ -1,488 +0,0 @@ - - - - - - gtk.gdk.Colormap - a table of color display component values - - - - Synopsis - - - gtk.gdk.Colormap - gobject.GObject - - gtk.gdk.Colormap - visual - allocate - - - alloc_color - color - writeable - False - best_match - True - - - alloc_color - spec - writeable - False - best_match - True - - - alloc_color - red - green - blue - writeable - False - best_match - True - - - get_visual - - - - get_screen - - - - query_color - pixel - - - - -Functions - - - gtk.gdk.colormap_get_system - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.gdk.Colormap - - - - - - Description - - A gtk.gdk.Colormap -contains a table mapping index values to the RGB color component values used -to display the colors. The index value corresponds to the pixel value of a -gtk.gdk.Color -object and the RGB component values correspond to the gtk.gdk.Color red, -green and blue values. The gtk.Widget.get_colormap() -method is used to retrieve the colormap used by a widget. The default system -colormap is retrieved by using the gtk.gdk.colormap_get_system() -function. The alloc_color() -method has three signatures to allow the color specification using an -unallocated gtk.gdk.Color, a -string or a RGB trio. - - - - - Constructor - - - gtk.gdk.Colormap - visual - allocate - - - - visual : - the gtk.gdk.Visual to -use - - - 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 : - a gtk.gdk.Colormap -object - - - - Creates a new gtk.gdk.Colormap -for the gtk.gdk.Visual -specified by visual. If -allocate is True the colormap will -be a private colormap for the sole use of the application. - - - - - Methods - - - gtk.gdk.Colormap.alloc_color - - - alloc_color - color - writeable - False - best_match - True - - - - color : - an unallocated gtk.gdk.Color - - - writeable : - if True the colormap entry -is writeable. - - - best_match : - if True a best match to the -requested color can be used if needed. - - - Returns : - a new gtk.gdk.Color -object - - - - The alloc_color() method allocates the -color specified by color in the colormap. The value -of color should be an unallocated gtk.gdk.Color. If -writeable is True the color is -allocated writeable which means it can be changed after allocation but -cannot be shared with another application. If -best_match is True the closest -match to the color will be returned if the request could not be satisfied -exactly. - - This method raises: - - - - the ValueError (TypeError prior to PyGTK 2.4) exception if -unable to parse the color specification - - - the RuntimeError exception if the color could not be -allocated - - - - - - - - - gtk.gdk.Colormap.alloc_color - - - alloc_color - spec - writeable - False - best_match - True - - - - spec : - a string containing a color -specification - - - writeable : - if True the colormap entry -is writeable. - - - best_match : - if True a best match to the -requested color can be used if needed. - - - Returns : - a gtk.gdk.Color -object - - - - The alloc_color() method allocates the -color specified by spec in the colormap. The format -of spec is a string containing the specification of -the color either as a name (e.g. "navajowhite") as specified in the X11 -rgb.txt file or as a hexadecimal string (e.g. -"#FF0078"). The hexadecimal string must start with '#' and must contain 3 -sets of hexadecimal digits of the same length (i.e. 1, 2 ,3 or 4 digits). -For example the following specify the same color value: "#F0A", "#FF00AA", -"#FFF000AAA" and "#FFFF0000AAAA". If writeable is -True the color is allocated writeable which means it can -be changed after allocation but cannot be shared with another application. -If best_match is True the closest -match to the color will be returned if the request could not be satisfied -exactly. - - This method raises: - - - - the ValueError (TypeError prior to PyGTK 2.4) exception if -unable to parse the color specification - - - the RuntimeError exception if the color could not be -allocated - - - - - - - - - gtk.gdk.Colormap.alloc_color - - - alloc_color - red - green - blue - writeable - False - best_match - True - - - - red : - the red component of the color in the range 0-65535 - - - green : - the green component of the color in the range 0-65535 - - - blue : - the blue component of the color in the range 0-65535 - - - writeable : - a gboolean - - - best_match : - a gboolean - - - Returns : - a gtk.gdk.Color object - - - - The alloc_color() method allocates the -color specified by the component values red, -green and blue. If -writeable is True the color is -allocated writeable which means it can be changed after allocation but -cannot be shared with another application. If -best_match is True the closest -match to the color will be returned if the request could not be satisfied -exactly. - - This method raises: - - - - the ValueError (TypeError prior to PyGTK 2.4) exception if -unable to parse the color specification - - - the RuntimeError exception if the color could not be -allocated - - - - - - - - - gtk.gdk.Colormap.get_visual - - - get_visual - - - - Returns : - a gtk.gdk.Visual - - - - The get_visual() method returns the -visual the colormap was created for. See the gtk.gdk.Colormap -constructor. - - - - - gtk.gdk.Colormap.get_screen - - - get_screen - - - - - Returns : - a gtk.gdk.Screen - - - - The get_screen() method returns the -gtk.gdk.Screen -the colormap was created for. - - - - - gtk.gdk.Colormap.query_color - - - query_color - - - - - pixel : - a pixel value - - - Returns : - the gtk.gdk.Color - corresponding to pixel - - - - - This method is available in PyGTK 2.4 and above. - - - The query_color() method returns the -gtk.gdk.Color -corresponding to the hardware pixel value specified by -pixel. pixel must be a valid -pixel in the colormap. It's a programmer error to call this method with a -pixel which is not in the colormap. Hardware pixels are normally obtained -from the alloc_color() -method, or from a gtk.gdk.Image -object. (A gtk.gdk.Image -contains image data in hardware format while a gtk.gdk.Pixbuf -contains image data in a canonical 24-bit RGB format.) - - - - - - - Functions - - - gtk.gdk.colormap_get_system - - - gtk.gdk.colormap_get_system - - - - - - Returns : - the system' default -colormap - - - - The gtk.gdk.colormap_get_system() -method returns the default colormap used by the system on the default -screen. See the gtk.gdk.Screen.get_system_colormap() -method for more information. - - - - - - diff --git a/docs/reference/pygtk-gdkcursor.xml b/docs/reference/pygtk-gdkcursor.xml deleted file mode 100644 index 89186b43..00000000 --- a/docs/reference/pygtk-gdkcursor.xml +++ /dev/null @@ -1,795 +0,0 @@ - - - - - - gtk.gdk.Cursor - standard and pixmap cursors - - - - Synopsis - - - gtk.gdk.Cursor - gobject.GBoxed - - gtk.gdk.Cursor - cursor_type - - - gtk.gdk.Cursor - display - cursor_type - - - gtk.gdk.Cursor - display - pixbuf - x - y - - - gtk.gdk.Cursor - source - mask - fg - bg - x - y - - - get_display - - - - - - - - Description - - A gtk.gdk.Cursor -represents a bitmap image used for the mouse pointer. Each gtk.gdk.Window can -have its own cursor. By default a gtk.gdk.Window uses -its parent's cursor. A standard set of cursors is provided in -PyGTK: - - - - gtk.gdk.X_CURSOR - - - - - - gtk.gdk.ARROW - - - - - - gtk.gdk.BASED_ARROW_DOWN - - - - - - gtk.gdk.BASED_ARROW_UP - - - - - - gtk.gdk.BOAT - - - - - - gtk.gdk.BOGOSITY - - - - - - gtk.gdk.BOTTOM_LEFT_CORNER - - - - - - gtk.gdk.BOTTOM_RIGHT_CORNER - - - - - - gtk.gdk.BOTTOM_SIDE - - - - - - gtk.gdk.BOTTOM_TEE - - - - - - gtk.gdk.BOX_SPIRAL - - - - - - gtk.gdk.CENTER_PTR - - - - - - gtk.gdk.CIRCLE - - - - - - gtk.gdk.CLOCK - - - - - - gtk.gdk.COFFEE_MUG - - - - - - gtk.gdk.CROSS - - - - - - gtk.gdk.CROSS_REVERSE - - - - - - gtk.gdk.CROSSHAIR - - - - - - gtk.gdk.DIAMOND_CROSS - - - - - - gtk.gdk.DOT - - - - - - gtk.gdk.DOTBOX - - - - - - gtk.gdk.DOUBLE_ARROW - - - - - - gtk.gdk.DRAFT_LARGE - - - - - - gtk.gdk.DRAFT_SMALL - - - - - - gtk.gdk.DRAPED_BOX - - - - - - gtk.gdk.EXCHANGE - - - - - - gtk.gdk.FLEUR - - - - - - gtk.gdk.GOBBLER - - - - - - gtk.gdk.GUMBY - - - - - - gtk.gdk.HAND1 - - - - - - gtk.gdk.HAND2 - - - - - - gtk.gdk.HEART - - - - - - gtk.gdk.ICON - - - - - - gtk.gdk.IRON_CROSS - - - - - - gtk.gdk.LEFT_PTR - - - - - - gtk.gdk.LEFT_SIDE - - - - - - gtk.gdk.LEFT_TEE - - - - - - gtk.gdk.LEFTBUTTON - - - - - - gtk.gdk.LL_ANGLE - - - - - - gtk.gdk.LR_ANGLE - - - - - - gtk.gdk.MAN - - - - - - gtk.gdk.MIDDLEBUTTON - - - - - - gtk.gdk.MOUSE - - - - - - gtk.gdk.PENCIL - - - - - - gtk.gdk.PIRATE - - - - - - gtk.gdk.PLUS - - - - - - gtk.gdk.QUESTION_ARROW - - - - - - gtk.gdk.RIGHT_PTR - - - - - - gtk.gdk.RIGHT_SIDE - - - - - - gtk.gdk.RIGHT_TEE - - - - - - gtk.gdk.RIGHTBUTTON - - - - - - gtk.gdk.RTL_LOGO - - - - - - gtk.gdk.SAILBOAT - - - - - - gtk.gdk.SB_DOWN_ARROW - - - - - - gtk.gdk.SB_H_DOUBLE_ARROW - - - - - - gtk.gdk.SB_LEFT_ARROW - - - - - - gtk.gdk.SB_RIGHT_ARROW - - - - - - gtk.gdk.SB_UP_ARROW - - - - - - gtk.gdk.SB_V_DOUBLE_ARROW - - - - - - gtk.gdk.SHUTTLE - - - - - - gtk.gdk.SIZING - - - - - - gtk.gdk.SPIDER - - - - - - gtk.gdk.SPRAYCAN - - - - - - gtk.gdk.STAR - - - - - - gtk.gdk.TARGET - - - - - - gtk.gdk.TCROSS - - - - - - gtk.gdk.TOP_LEFT_ARROW - - - - - - gtk.gdk.TOP_LEFT_CORNER - - - - - - gtk.gdk.TOP_RIGHT_CORNER - - - - - - gtk.gdk.TOP_SIDE - - - - - - gtk.gdk.TOP_TEE - - - - - - gtk.gdk.TREK - - - - - - gtk.gdk.UL_ANGLE - - - - - - gtk.gdk.UMBRELLA - - - - - - gtk.gdk.UR_ANGLE - - - - - - gtk.gdk.WATCH - - - - - - gtk.gdk.XTERM - - - - - - - - - - - - Constructor - - - - - gtk.gdk.Cursor - cursor_type - - - - cursor_type : - the standard cursor to -create - - - Returns : - a new gtk.gdk.Cursor - - - - Creates the new gtk.gdk.Cursor from -a builtin cursor specified by cursor_type. To make -the cursor invisible, see the description of the gtk.gdk.Cursor() constructor that -creates a cursor from a pixmap below. - - - - - - - gtk.gdk.Cursor - display - cursor_type - - - - display : - the gtk.gdk.Display - to create the cursor for - - - cursor_type : - the standard cursor to -create - - - Returns : - a new gtk.gdk.Cursor - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates the new gtk.gdk.Cursor for -the gtk.gdk.Display -specified by display from a builtin cursor specified -by cursor_type. To make the cursor invisible, see the -description of the gtk.gdk.Cursor() constructor that -creates a cursor from a pixmap below. - - - - - - - gtk.gdk.Cursor - display - pixbuf - x - y - - - - display : - the gtk.gdk.Display - to create the cursor for - - - pixbuf : - the gtk.gdk.Pixbuf -holding the cursor image - - - x : - the "hot spot" x offset - - - y : - the "hot spot" y offset - - - Returns : - a new gtk.gdk.Cursor - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new gtk.gdk.Cursor for -the gtk.gdk.Display -specified by display using the gtk.gdk.Pixbuf -specified by source as the icon image. The "hotspot" -of the cursor will be located as the position specified by -x and y. To make the cursor -invisible, see the description of the gtk.gdk.Cursor() constructor that -creates a cursor from a pixmap below - - - - - - - gtk.gdk.Cursor - source - mask - fg - bg - x - y - - - - source : - the gtk.gdk.Pixmap -holding the cursor image - - - mask : - the gtk.gdk.Pixmap to -use as a mask - - - fg : - the unallocated foreground gtk.gdk.Color - - - bg : - the unallocated background gtk.gdk.Color - - - x : - the "hot spot" x offset - - - y : - the "hot spot" y offset - - - Returns : - a new gtk.gdk.Cursor - - - - Creates a new gtk.gdk.Cursor -using: - - - - the gtk.gdk.Pixmap -specified by source as the icon image - - - the gtk.gdk.Pixmap -specified by mask to mask -source (must be the same size as source) - - - the gtk.gdk.Color -specified by fg as the foreground color of the -cursor - - - the gtk.gdk.Color -specified by bg as the background color of the -cursor - - - the horizontal offset of the cursor "hot spot" specified -by x - - - the vertical offset of the cursor "hot spot" specified -by y - - - - To make the cursor invisible, create a cursor from an empty -gtk.gdk.Pixmap -as follows: - - - pixmap = gtk.gdk.Pixmap(None, 1, 1, 1) - color = gtk.gdk.Color() - cursor = gtk.gdk.Cursor(pixmap, pixmap, color, color, 0, 0) - - - - - - - - Methods - - - gtk.gdk.Cursor.get_display - - - get_display - - - - Returns : - the associated gtk.gdk.Display - - - - - This method is available in PyGTK 2.2 and above. - - - The get_display() method returns the -gtk.gdk.Display on -which the cursor is defined. - - - - - - diff --git a/docs/reference/pygtk-gdkdevice.xml b/docs/reference/pygtk-gdkdevice.xml deleted file mode 100644 index 36150fb0..00000000 --- a/docs/reference/pygtk-gdkdevice.xml +++ /dev/null @@ -1,663 +0,0 @@ - - - - - - gtk.gdk.Device - an object for supporting input devices - - - - Synopsis - - - gtk.gdk.Device - gobject.GObject - - set_source - source - - - set_mode - mode - - - set_key - index - keyval - modifiers - - - set_axis_use - index - use - - - get_state - window - - - get_history - window - start - stop - - - get_axis - axes - use - - - - -Functions - - - gtk.gdk.devices_list - - - gtk.gdk.device_get_core_pointer - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.gdk.Device - - - - - - Attributes - -
- - - - - - - - - - "axes" - Read - a tuple containing axes information. Each axes is -described by a tuple containing: use information (one of: -gtk.gdk.AXIS_IGNORE, gtk.gdk.AXIS_X, -gtk.gdk.AXIS_Y, gtk.gdk.AXIS_PRESSURE, -gtk.gdk.AXIS_XTILT, -gtk.gdk.AXIS_YTILT, -gtk.gdk.AXIS_WHEEL, -gtk.gdk.AXIS_LAST), the minimum and maximum axes -values. - - - - "has_cursor" - Read - if True the pointer follows device -motion. - - - - "keys" - Read - a tuple describing the mapped macro buttons. Each macro -button is described by a tuple containing: a key value output when the macro -button is pressed and a set of modifiers output with the key value. - - - - "mode" - Read - the mode of this device - one of: -gtk.gdk.MODE_DISABLED, -gtk.gdk.MODE_SCREEN, -gtk.gdk.MODE_WINDOW - - - - "name" - Read - the name of this device. - - - - "num_axes" - Read - the length of the axes -tuple. - - - - "num_keys" - Read - the length of the keys tuple - - - - "source" - Read - the type of this device - one of: -gtk.gdk.SOURCE_MOUSE, -gtk.gdk.SOURCE_PEN, -gtk.gdk.SOURCE_ERASER, -gtk.gdk.SOURCE_CURSOR - - - - - -
- -
- - - Description - - In addition to the normal keyboard and mouse input devices, -PyGTK 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 gtk.gdk.Window -individually using gtk.gdk.Window.input_set_extension_events(). -(Or, more typically, for gtk.Widget objects, -using the gtk.Widget.set_extension_events() -method). 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 -gtk.gdk.EXTENSION_EVENTS_CURSOR value to the gtk.gdk.Window.input_set_extension_events() -method. Otherwise, the application must retrieve the device information -using the gtk.gdk.devices_list() -function, 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 -attribute in the event structure. The events generated by pointer devices -have also been extended to contain pressure, -xtilt and ytilt attributes -which contain the extended information reported as additional valuators from -the device. The pressure attribute ranges from 0.0 to -1.0, while the tilt attributes range from -1.0 to 1.0. (With -1.0 -representing the maximum tilt to the left or up, and 1.0 representing the -maximum tilt to the right or down.) One additional attribute in each event -is the source attribute, which contains an -enumeration value describing the type of device; this currently can be one -of gtk.gdk.SOURCE_MOUSE, -gtk.gdk.SOURCE_PEN, -gtk.gdk.SOURCE_ERASER, or -gtk.gdk.SOURCE_CURSOR. This attribute 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 configure such a device is to use the -gtk.InputDialog -widget in PyGTK. 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 the gtk.gdk.devices_list() -function. Each device must be activated using the set_mode() -method, 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 the set_axis_use() -method. And the source type for each device can be set with the set_source() -method. - - 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 the set_key() -method. The interfaces in this section will most likely be considerably -modified in the future to accommodate devices that may have different sets of -additional valuators than the pressure xtilt and ytilt. - - - - - Methods - - - gtk.gdk.Device.set_source - - - set_source - source - - - - source : - the source type of the -device - - - - The set_source() method sets the source -type for the input device to the value specified by -source. The value of source -must be one of: - - - - gtk.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.) - - - - gtk.gdk.SOURCE_PEN - - the device is a stylus of a graphics tablet or similar -device. - - - - gtk.gdk.SOURCE_ERASER - - the device is an eraser. Typically, this would be the -other end of a stylus on a graphics tablet. - - - - gtk.gdk.SOURCE_CURSOR - - the device is a graphics tablet "puck" or similar -device. - - - - - - - - - - gtk.gdk.Device.set_mode - - - set_mode - mode - - - - mode : - the input mode - - - Returns : - True if the mode was -successfully changed. - - - - The set_mode() method sets the input -device mode to the value specified by mode. The value -of mode must be one of: - - - - gtk.gdk.MODE_DISABLED - - the device is disabled and will not report any -events. - - - - gtk.gdk.MODE_SCREEN - - the device is enabled. The device's coordinate space -maps to the entire screen. - - - - gtk.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. - - - - - - - - - - gtk.gdk.Device.set_key - - - set_key - index - keyval - modifiers - - - - index : - the index of the macro button to -set. - - - keyval : - the key value to generate. - - - modifiers : - the modifiers to set. - - - - The set_key() method sets the key event -to generate when a macro button of a device is pressed. The macro button is -specified by index. The key value and modifiers -generated are specified by keyval and -modifiers respectively. - - - - - gtk.gdk.Device.set_axis_use - - - set_axis_use - index - use - - - - index : - the index of the axis. - - - use : - how the axis is used. - - - - The set_axis_use() method sets the axis -(specified by index) of the input device to be used -in the fashion specified by use. The value of -use must be one of: - - - - gtk.gdk.AXIS_IGNORE - - the axis is ignored. - - - - gtk.gdk.AXIS_X - - the axis is used as the x axis. - - - - gtk.gdk.AXIS_Y - - the axis is used as the y axis. - - - - gtk.gdk.AXIS_PRESSURE - - the axis is used for pressure information. - - - - gtk.gdk.AXIS_XTILT - - the axis is used for x tilt information. - - - - gtk.gdk.AXIS_YTILT - - the axis is used for y tilt information. - - - - gtk.gdk.AXIS_WHEEL - - the axis is used for wheel information. - - - - gtk.gdk.AXIS_LAST - - a constant equal to the numerically highest axis -value. - - - - - - - - - - gtk.gdk.Device.get_state - - - get_state - window - - - - window : - a gtk.gdk.Window - - - Returns : - a tuple containing: a tuple containing the axes -data; and, the modifiers in effect. - - - - The get_state() method returns a tuple -containing: - - - - a tuple containing the axes data - - - the bitmask containing the set of key modifiers in -effect - - - - The state information is relative to the gtk.gdk.Window -specified by window. - - - - - gtk.gdk.Device.get_history - - - get_history - window - start - stop - - - - window : - a gtk.gdk.Window - - - start : - the earliest event time -limit - - - stop : - the latest event time -limit - - - Returns : - a tuple containing event tuples each with axes -data and a timestamp - - - - The get_history() method returns a -tuple containing the motion history for the device with respect to the gtk.gdk.Window -specified by window between the time limits specified by -start and stop. The motion -history is a tuple containing event motion tuples that each contain a -timestamp for the event and a tuple with the axes data for the event. - - - - - gtk.gdk.Device.get_axis - - - get_axis - axes - use - - - - axes : - a sequence of axes values - - - use : - the axis use to match - - - Returns : - the axis value from axes -that matches the use type or None if there is no -match. - - - - The get_axis() method returns the value -in axes whose axis matches the specified -use. - - - - - - - Functions - - - gtk.gdk.devices_list - - - gtk.gdk.devices_list - - - - - - Returns : - a list containing the gtk.gdk.Device -objects for the default display - - - - The gtk.gdk.devices_list() function returns -a list containing the gtk.gdk.Device -objects fro the default display. - - - - - gtk.gdk.device_get_core_pointer - - - gtk.gdk.device_get_core_pointer - - - - - - Returns : - the - - - - The gtk.gdk.device_get_core_pointer() -function returns the device that is used as the core pointer. - - - - - -
diff --git a/docs/reference/pygtk-gdkdisplay.xml b/docs/reference/pygtk-gdkdisplay.xml deleted file mode 100644 index 9633cd4d..00000000 --- a/docs/reference/pygtk-gdkdisplay.xml +++ /dev/null @@ -1,1186 +0,0 @@ - - - - - gtk.gdk.Display - - controls the keyboard/mouse pointer grabs and a set of gtk.gdk.Screen -objects - - - - Synopsis - - - gtk.gdk.Display - gobject.GObject - - gtk.gdk.Display - display_name - - - get_name - - - - get_n_screens - - - - get_screen - screen_num - - - get_default_screen - - - - pointer_ungrab - time_0L - - - keyboard_ungrab - time_0L - - - pointer_is_grabbed - - - - beep - - - - sync - - - - close - - - - list_devices - - - - get_event - - - - peek_event - - - - put_event - event - - - - - - set_double_click_time - msec - - - get_core_pointer - - - - get_pointer - - - - get_window_at_pointer - - - - - - - flush - - - - set_double_click_distance - distance - - - supports_cursor_alpha - - - - supports_cursor_color - - - - get_default_cursor_size - - - - get_maximal_cursor_size - - - - get_default_group - - - - supports_selection_notification - - - - supports_clipboard_persistence - - - - request_selection_notification - selection - - - store_clipboard - clipboard_window - time_ - targets - - - - -Functions - - - gtk.gdk.display_get_default - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.gdk.Display - - - - - - Signal Prototypes - - - - "closed" - - callback - widget - is_error - user_param1 - ... - - - - - - - - - Description - - - - This object is available in PyGTK 2.2 and above. - - - gtk.gdk.Display objects provide two capabilities: - - - - To grab/ungrab keyboard focus and mouse pointer - - - To manage and provide information about the gtk.gdk.Screen) - objects available for this gtk.gdk.Display - - - - gtk.gdk.Display -objects are the GDK representation of the X Display which -can be described as a workstation consisting of a keyboard, a pointing -device (such as a mouse) and one or more screens. It is used to open and -keep track of various gtk.gdk.Screen -objects currently instantiated by the application. It is also used to grab -and release the keyboard and the mouse pointer. - - - - - Constructor - - - gtk.gdk.Display - display_name - - - - display_name : - the name of the display to - open - - - Returns : a - gtk.gdk.Display, - or None if the display could not be - opened. - - - - - This constructor is available in PyGTK 2.2 and above. - - - Opens the display with the name specified by -display_name and returns a gtk.gdk.Display -object wrapping the display.. - - - - - - Methods - - - gtk.gdk.Display.get_name - - - get_name - - - - - Returns : a - string representing the display name. - - - - - This method is available in PyGTK 2.2 and above. - - - The get_name() method returns the name -of the display. - - - - - gtk.gdk.Display.get_n_screens - - - get_n_screens - - - - - Returns : - the number of display - screens. - - - - - This method is available in PyGTK 2.2 and above. - - - The get_n_screens() method returns the -number of screens managed by the display. - - - - - gtk.gdk.Display.get_screen - - - get_screen - screen_num - - - - screen_num : - the screen number - - - Returns : - the gtk.gdk.Screen - object - - - - - This method is available in PyGTK 2.2 and above. - - - The get_screen() method returns a gtk.gdk.Screen -object for one of the screens of the display. - - - - - gtk.gdk.Display.get_default_screen - - - get_default_screen - - - - - Returns : - the default gtk.gdk.Screen - object for display - - - - - This method is available in PyGTK 2.2 and above. - - - The get_default_screen() method returns -the default gtk.gdk.Screen for -the display - - - - gtk.gdk.Display.pointer_ungrab - - - pointer_ungrab - time_0L - - - - time_ : - a timestamp or 0L for the current - time. - - - - - This method is available in PyGTK 2.2 and above. - - - The pointer_ungrab() method releases -any pointer grab held by the display. - - - - - gtk.gdk.Display.keyboard_ungrab - - - keyboard_ungrab - time_0L - - - - time_ : - a timestamp or 0L for the current - time. - - - - - This method is available in PyGTK 2.2 and above. - - - The keyboard_ungrab() method -releases any keyboard grab held by the display. - - - - - gtk.gdk.Display.pointer_is_grabbed - - - pointer_is_grabbed - - - - - Returns : - True if an active X pointer - grab is in effect - - - - - This method is available in PyGTK 2.2 and above. - - - The pointer_is_grabbed() method returns -True if the pointer is grabbed. - - - - - gtk.gdk.Display.beep - - - beep - - - - - This method is available in PyGTK 2.2 and above. - - - The beep() method -emits a short beep on the display. - - - - gtk.gdk.Display.sync - - - sync - - - - - This method is available in PyGTK 2.2 and above. - - - The sync() method flushes any requests -queued for the windowing system and waits until all requests have been -handled. This is often used for making sure that the display is synchronized -with the current state of the program. This is most useful for X11. On -windowing systems where requests are handled synchronously, this method will -do nothing. - - - - - gtk.gdk.Display.close - - - close - - - - - This method is available in PyGTK 2.2 and above. - - - The close() method closes the -connection to the windowing system for the given display, and cleans up -associated resources. - - - - - gtk.gdk.Display.list_devices - - - list_devices - - - - - Returns : - a list of gtk.gdk.Device - objects. - - - - - This method is available in PyGTK 2.2 and above. - - - The list_devices() method returns the -list of available input devices attached to the display. - - - - - gtk.gdk.Display.get_event - - - get_event - - - - - Returns : - the next gtk.gdk.Event - to be processed, or None if no events are - pending.. - - - - - This method is available in PyGTK 2.2 and above. - - - The get_event() method returns the next -gtk.gdk.Event -to be processed for the display, fetching events from the windowing system -if necessary. The returned gtk.gdk.Event should -be freed with the gtk.gdk.Event.free() -method - - - - - gtk.gdk.Display.peek_event - - - peek_event - - - - - Returns : - a copy of the first gtk.gdk.Event - on the event queue, or None if no events are in - the queue. - - - - - This method is available in PyGTK 2.2 and above. - - - The peek_event() method returns a copy -of the first gtk.gdk.Event in the -the display's event queue, without removing the event from the queue. (Note -that this method will not get more events from the windowing system. It only -checks the events that have already been moved to the GDK -event queue.) The returned gtk.gdk.Event should -be freed with gtk.gdk.Event.free(). - - - - - gtk.gdk.Display.put_event - - - put_event - event - - - - event : - a gtk.gdk.Event. - - - - - This method is available in PyGTK 2.2 and above. - - - The put_event() method appends a copy -of the given event onto the front of the event queue for the display. - - - - - - - gtk.gdk.Display.set_double_click_time - - - set_double_click_time - msec - - - - msec : - the double click time in milliseconds - (thousandths of a second) - - - - - This method is available in PyGTK 2.2 and above. - - - The set_double_click_time() method sets -the double click time (two clicks within this time interval count as a -double click and result in a gtk.gdk._2BUTTON_PRESS -event). Applications should not set this, it is a -global user-configured setting. - - - - - gtk.gdk.Display.get_core_pointer - - - get_core_pointer - - - - - Returns : - the core pointer device - - - - - This method is available in PyGTK 2.2 and above. - - - The get_core_pointer() method returns -the core pointer device for the given display - - - - - gtk.gdk.Display.get_pointer - - - get_pointer - - - - Returns : - a 4-tuple containing the screen that the cursor - is on, the root window X and Y coordinates of the pointer and the - current modifier mask - - - - - This method is available in PyGTK 2.2 and above. - - - The get_pointer() method returns a -4-tuple containing the gtk.gdk.Screen that -the pointer is on, the current location coordinates of the pointer and the -current modifier mask for the display. The returned modifier mask is a -combination of the . - - - - - gtk.gdk.Display.get_window_at_pointer - - - get_window_at_pointer - - - - Returns : - a 3-tuple containing the gtk.gdk.Window - under the mouse pointer and the x and y coordinates of the window - origin - - - - - This method is available in PyGTK 2.2 and above. - - - The get_window_at_pointer() method -returns a 3-tuple containing the gtk.gdk.Window -underneath the mouse pointer and the location of that window's -origin. Returns None if the window under the mouse -pointer is not known to GDK (for example, belongs to -another application). - - - - - - - gtk.gdk.Display.flush - - - flush - - - - - This method is available in PyGTK 2.4 and above. - - - The flush() method flushes any requests -queued for the windowing system; this happens automatically when the main -loop blocks waiting for new events, but if your application is drawing -without returning control to the main loop, you may need to call this method -explicitly. A common case where this method needs to be called is when an -application is executing drawing commands from a thread other than the -thread where the main loop is running. - - This is most useful for X11. On windowing systems where requests -are handled synchronously, this method will do nothing. - - - - - gtk.gdk.Display.set_double_click_distance - - - set_double_click_distance - distance - - - - distance : - the distance in pixels - - - - - This method is available in PyGTK 2.4 and above. - - - The set_double_click_distance() method -sets the double click distance (two clicks within this distance count as a -double click and result in a gtk.gdk.2BUTTON_PRESS -event). See the set_double_click_time() -method for more information. Applications should not -set this, it is a global user-configured setting. - - - - - gtk.gdk.Display.supports_cursor_alpha - - - supports_cursor_alpha - - - - - Returns : - True if cursors can have - alpha channels. - - - - - This method is available in PyGTK 2.4 and above. - - - The supports_cursor_alpha() method -returns True if cursors can use an 8bit alpha channel on -the display. Otherwise, cursors are restricted to bilevel alpha (i.e. a -mask). - - - - - gtk.gdk.Display.supports_cursor_color - - - supports_cursor_color - - - - - Returns : - True if cursors can have - multiple colors. - - - - - This method is available in PyGTK 2.4 and above. - - - The supports_cursor_color() method -returns True if multicolored cursors are supported on the -display. Otherwise, cursors have only a foreground and a background -color. - - - - - gtk.gdk.Display.get_default_cursor_size - - - get_default_cursor_size - - - - - Returns : - the default cursor size. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_default_cursor_size() method -returns the default size to use for cursors on the display. - - - - - gtk.gdk.Display.get_maximal_cursor_size - - - get_maximal_cursor_size - - - - Returns : - a 2-tuple containing the maximal cursor width - and height - - - - - This method is available in PyGTK 2.4 and above. - - - The get_maximal_cursor_size() method -returns a 2-tuple containing the maximum width and height to use for cursors -on the display. - - - - - gtk.gdk.Display.get_default_group - - - get_default_group - - - - - Returns : - The default group leader window for the - display - - - - - This method is available in PyGTK 2.4 and above. - - - The get_default_group() method returns -the default group leader window for all toplevel windows on the -display. This window is implicitly created by GDK. See -the gtk.gdk.Window.set_group() -method for more information. - - - - - gtk.gdk.Display.supports_selection_notification - - - get_default_group - - - - - Returns : - True if -gtk.gdk.EventOwnerChange events will be -sent. - - - - - This method is available in PyGTK 2.6 and above. - - - The supports_selection_notification() -method returns True if -gtk.gdk.EventOwnerChange events will be sent when the -owner of a selection changes. - - - - - gtk.gdk.Display.supports_clipboard_persistence - - - supports_clipboard_persistence - - - - - Returns : - True if the display -supports clipboard persistence. - - - - - This method is available in PyGTK 2.6 and above. - - - The supports_clipboard_persistence() -method Returns whether the specified display supports clipboard persistence; -i.e. if it's possible to store the clipboard data after an application has -quit. On X11 this checks if a clipboard daemon is running. - - - - - gtk.gdk.Display.request_selection_notification - - - request_selection_notification - selection - - - - selection : - The string (or gtk.gdk.Atom) naming -the selection for which ownership change notification is -requested - - - - - This method is available in PyGTK 2.6 and above. - - - The request_selection_notification() -method requests that gtk.gdk.EventOwnerChange events will -be sent for changes in ownership of the atom specified by -selection. - - - - - gtk.gdk.Display.store_clipboard - - - store_clipboard - clipboard_window - time - targets - - - - clipboard_window : - a gtk.gdk.Window -belonging to the clipboard owner - - - time : - a timestamp - - - targets : - a list of targets that should be saved, or -None if all available targets should be -saved. - - - - - This method is available in PyGTK 2.6 and above. - - - The store_clipboard() method issues a -request to the the clipboard manager to store the clipboard data. On X11, -this is a special program that works according to the freedesktop clipboard -specification, available at http://www.freedesktop.org/Standards/clipboard-manager-spec. - - - - - - - Functions - - - gtk.gdk.display_get_default - - - gtk.gdk.display_get_default - - - - Returns : - a gtk.gdk.Display, - or None if there is no default - display. - - - - - This function is available in PyGTK 2.2 and above. - - - The gtk.gdk.display_get_default() function -returns the default gtk.gdk.Display. This -is a convenience function for: - - - display_manager = gtk.gdk.display_manager_get() - display = display.manager.get_default_display() - - - - - - - - Signals - - - The "closed" gtk.gdk.Display Signal - - - callback - display - is_error - user_param1 - ... - - - - - display : - the display that received the -signal - - - is_error : - True if the display was - closed due to an error - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "closed" signal is emitted when the connection to the -windowing system for display is closed. - - - - - - diff --git a/docs/reference/pygtk-gdkdisplaymanager.xml b/docs/reference/pygtk-gdkdisplaymanager.xml deleted file mode 100644 index 7b268605..00000000 --- a/docs/reference/pygtk-gdkdisplaymanager.xml +++ /dev/null @@ -1,279 +0,0 @@ - - - - - gtk.gdk.DisplayManager - - maintains a list of all open gtk.gdk.Display -objects - - - - Synopsis - - - gtk.gdk.DisplayManager - gobject.GObject - - get_default_display - - - set_default_display - display - - - list_displays - - - - -Functions - - - gtk.gdk.display_manager_get - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.gdk.DisplayManager - - - - - - Properties - -
- - - - - - - - - "default-display" - Read-Write - - The default gtk.gdk.Display. Available -in GTK+ 2.2 and above. - - - - - -
- -
- - - Signal Prototypes - - - - "display-opened" - - callback - displaymanager - display - user_param1 - ... - - - - - - - - - Description - - - This object is available in PyGTK 2.2 and above. - - - The gtk.gdk.DisplayManager - is a singleton object that offers notification when displays appear or - disappear or the default display changes. The global gtk.gdk.DisplayManager - object is returned from the gtk.gdk.display_manager_get() - function. - - - - - Methods - - - gtk.gdk.DisplayManager.get_default_display - - - get_default_display - - - - - Returns : - a gtk.gdk.Display, - or None if there is no default - display. - - - - - This method is available in PyGTK 2.2 and above. - - - The get_default_display() method -returns the default gtk.gdk.Display. - - - - - gtk.gdk.DisplayManager.set_default_display - - - set_default_display - display - - - - display : - a gtk.gdk.Display - - - - - This method is available in PyGTK 2.2 and above. - - - The set_default_display() method sets -the gtk.gdk.Display -specified by display as the default display. - - - - - gtk.gdk.DisplayManager.list_displays - - - list_displays - - - - Returns : - a list containing gtk.gdk.Display - objects. - - - - - This method is available in PyGTK 2.2 and above. - - - The list_displays() method returns a -list containing all currently open displays. - - - - - - - Functions - - - gtk.gdk.display_manager_get - - - gtk.gdk.display_manager_get - - - - - Returns : - the singleton gtk.gdk.DisplayManager - object. - - - - - - This function is available in PyGTK 2.2 and above. - - - The gtk.gdk.display_manager_get() -method returns the global gtk.gdk.DisplayManager -singleton. - - - - - - - Signals - - - The "display-opened" gtk.gdk.DisplayManager Signal - - - callback - displaymanager - display - user_param1 - ... - - - - - displaymanager : - the displaymanager that received the -signal - - - display : - the display that was opened - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - - This signal is available in GTK+ 2.2 and above. - - - The "display-opened" signal is emitted when display is -opened. - - - - - -
diff --git a/docs/reference/pygtk-gdkdragcontext.xml b/docs/reference/pygtk-gdkdragcontext.xml deleted file mode 100644 index d222b606..00000000 --- a/docs/reference/pygtk-gdkdragcontext.xml +++ /dev/null @@ -1,1146 +0,0 @@ - - - - - - gtk.gdk.DragContext - an object containing the drag and drop context -data - - - - Synopsis - - - gtk.gdk.DragContext - gobject.GObject - - gtk.gdk.DragContext - - - drag_status - action - time - - - drop_reply - ok - time - - - drop_finish - success - time - - - drag_get_selection - - - drag_find_window - drag_window - x_root - y_root - - - drag_find_window_for_screen - drag_window - screen - x_root - y_root - - - drag_motion - dest_window - protocol - x_root - y_root - suggested_action - possible_actions - time - - - drag_drop - time - - - drag_abort - time - - - finish - success - del_ - time - - - get_source_widget - - - set_icon_widget - widget - hot_x - hot_y - - - set_icon_pixmap - colormap - pixmap - mask - hot_x - hot_y - - - set_icon_pixbuf - pixbuf - hot_x - hot_y - - - set_icon_stock - stock_id - hot_x - hot_y - - - set_icon_name - icon_name - hot_x - hot_y - - - set_icon_default - - - - drag_drop_succeeded - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.gdk.DragContext - - - - - - Attributes - -
- - - - - - - - - - "action" - Read - the action chosen by the destination. One of: -gtk.gdk.ACTION_COPY, -gtk.gdk.ACTION_MOVE, -gtk.gdk.ACTION_LINK, -gtk.gdk.ACTION_PRIVATE - - - - "actions" - Read - a bitmask of actions proposed by the source when -suggested_action is -gtk.gdk.ACTION_ASK. A combination of: -gtk.gdk.ACTION_COPY, -gtk.gdk.ACTION_MOVE, -gtk.gdk.ACTION_LINK, -gtk.gdk.ACTION_PRIVATE - - - - "dest_window" - Read - the destination gtk.gdk.Window of -this drag. - - - - "is_source" - Read - if True the context is used on the source side. - - - - "protocol" - Read - the DND protocol which governs this drag - one of: -gtk.gdk.DRAG_PROTO_MOTIF, -gtk.gdk.DRAG_PROTO_XDND, -gtk.gdk.DRAG_PROTO_ROOTWIN, -gtk.gdk.DRAG_PROTO_NONE, -gtk.gdk.DRAG_PROTO_WIN32_DROPFILES, -gtk.gdk.DRAG_PROTO_OLE2, -gtk.gdk.DRAG_PROTO_LOCAL - - - - "source_window" - Read - the source gtk.gdk.Window of -this drag. - - - - "start_time" - Read - a timestamp recording the start time of this -drag. - - - - "suggested_action" - Read - the action suggested by the source. One of: -gtk.gdk.ACTION_DEFAULT, -gtk.gdk.ACTION_COPY, -gtk.gdk.ACTION_MOVE, -gtk.gdk.ACTION_LINK, -gtk.gdk.ACTION_PRIVATE, -gtk.gdk.ACTION_ASK - - - - "targets" - Read - a list of targets offered by the source. - - - - - -
- -
- - - Description - - A gtk.gdk.DragContext -holds information about a drag in progress. It is used for both source and -destination. A gtk.gdk.DragContext -can be created using the gtk.gdk.DragContext() -constructor but since there is no way to set its attributes the new object -is not much use. Useful gtk.gdk.DragContext -objects are created as a result of the gtk.gdk.Window.drag_begin() -or the gtk.Widget.drag_begin() -methods. - - - - - Constructor - - - gtk.gdk.DragContext - - - - Returns : - a new gtk.gdk.DragContext - - - - Creates a new gtk.gdk.DragContext -object. - - - - - Methods - - - gtk.gdk.DragContext.drag_status - - - drag_status - action - time - - - - action : - a drag action that will be taken when a drop -happens - - - time : - the timestamp for this -action - - - - The drag_status() method sets the -specified action to be taken when a drop happens. The -value of action is one of: - - - - gtk.gdk.ACTION_DEFAULT - - - - - - gtk.gdk.ACTION_COPY - - Copy the data. - - - - gtk.gdk.ACTION_MOVE - - Move the data, i.e. first copy it, then delete it from -the source using the DELETE target of the X selection protocol. - - - - gtk.gdk.ACTION_LINK - - Add a link to the data. Note that this is only useful -if source and destination agree on what it means. - - - - gtk.gdk.ACTION_PRIVATE - - Special action which tells the source that the -destination will do something that the source doesn't understand. - - - - gtk.gdk.ACTION_ASK - - Ask the user what to do with the data. - - - - - The time the action occurred is specified by -time. This method is called by the drag destination -in response to drag_motion() -called by the drag source. - - - - - - gtk.gdk.DragContext.drop_reply - - - drop_reply - ok - time - - - - ok : - if True the drop is accepted -by the destination - - - time : - the timestamp - - - - The drop_reply() method determines if -the drop is accepted or rejected according to the value specified by -ok. If ok is -True the drop is accepted. time -specifies the time that the drop reply occurred. This method is called by -the drag destination when a drop is initiated by the drag source. - - - - - gtk.gdk.DragContext.drop_finish - - - drop_finish - success - time - - - - success : - if True the data was -received - - - time : - the time of the finish - - - - The drop_finish() method ends a drag -operation and indicates if the drop was successful by setting the value of -success. time indicates the -time of the drop finish. This method is called by the drag -destination. - - - - - gtk.gdk.DragContext.drag_get_selection - - - drag_get_selection - - - - Returns : - the selection atom - - - - The drag_get_selection() method returns -the selection atom for the current source window. - - - - - gtk.gdk.DragContext.drag_find_window - - - drag_find_window - drag_window - x_root - y_root - - - - drag_window : - a gtk.gdk.Window - - - x_root : - the x position of the pointer in root -coordinates. - - - y_root : - the y position of the pointer in root -coordinates. - - - Returns : - a 2-tuple containing the drag destination gtk.gdk.Window and -the drag protocol - - - - The drag_find_window() method returns a -2-tuple containing the drag destination gtk.gdk.Window and -the drag protocol being used. The drag protocol is one of: - - - - gtk.gdk.DRAG_PROTO_MOTIF - - The Motif DND protocol. - - - - gtk.gdk.DRAG_PROTO_XDND - - The Xdnd protocol. - - - - gtk.gdk.DRAG_PROTO_ROOTWIN - - An extension to the Xdnd protocol for unclaimed root -window drops. - - - - gtk.gdk.DRAG_PROTO_NONE - - no protocol. - - - - gtk.gdk.DRAG_PROTO_WIN32_DROPFILES - - The simple WM_DROPFILES protocol. - - - - gtk.gdk.DRAG_PROTO_OLE2 - - The complex OLE2 DND protocol (not -implemented). - - - - gtk.gdk.DRAG_PROTO_LOCAL - - Intra-application DND. - - - - - drag_window is a gtk.gdk.Window and -x_root and y_root specify the -location of the mouse pointer in the root window. - - - - - gtk.gdk.DragContext.drag_find_window_for_screen - - - drag_find_window_for_screen - drag_window - screen - x_root - y_root - - - - drag_window : - a gtk.gdk.Window - - - screen : -a gtk.gdk.Screen - - - x_root : - the x position of the pointer in root -coordinates. - - - y_root : - the y position of the pointer in root -coordinates. - - - Returns : - a 2-tuple containing the drag destination gtk.gdk.Window and -the drag protocol - - - - - This method is available in PyGTK 2.2 and above. - - - The drag_find_window_for_screen() -method returns a 2-tuple containing the drag destination gtk.gdk.Window and -the drag protocol being used. The drag protocol is one of: - - - - gtk.gdk.DRAG_PROTO_MOTIF - - The Motif DND protocol. - - - - gtk.gdk.DRAG_PROTO_XDND - - The Xdnd protocol. - - - - gtk.gdk.DRAG_PROTO_ROOTWIN - - An extension to the Xdnd protocol for unclaimed root -window drops. - - - - gtk.gdk.DRAG_PROTO_NONE - - no protocol. - - - - gtk.gdk.DRAG_PROTO_WIN32_DROPFILES - - The simple WM_DROPFILES protocol. - - - - gtk.gdk.DRAG_PROTO_OLE2 - - The complex OLE2 DND protocol (not -implemented). - - - - gtk.gdk.DRAG_PROTO_LOCAL - - Intra-application DND. - - - - - drag_window is a gtk.gdk.Window and -x_root and y_root specify the -location of the mouse pointer in the root window. - - - - - gtk.gdk.DragContext.drag_motion - - - drag_motion - dest_window - protocol - x_root - y_root - suggested_action - possible_actions - time - - - - dest_window : - the destination gtk.gdk.Window the -drag is moving over - - - protocol : - the drag protocol in use - - - x_root : - the x root coordinate of the mouse -pointer - - - y_root : - the y root coordinate of the mouse -pointer - - - suggested_action : - the suggest drag action - - - possible_actions : - the possible drag actions - - - time : - the timestamp of the drag -motion - - - Returns : - True if there is a drag destination window and -the drag has paused or a drop has occurred. - - - - The drag_motion() method updates the -drag context when the pointer moves or the set of actions changes. This -method is called by the drag source. dest_window -specifies the drag destination gtk.gdk.Window; -protocol specifies the drag protocol being used (see -the drag_find_window() -method for details); x_root and -y_root specify the root window coordinates of the -mouse pointer; suggested_action specifies the -suggested drag action (see the drag_status() -method for more detail); possible_actions specifies the possible drag -actions for the drag (see the drag_status() -method for more detail); and, time specifies the -timestamp of the drag motion. - - - - - gtk.gdk.DragContext.drag_drop - - - drag_drop - time - - - - time : - the timestamp of the drag -drop. - - - - The drag_drop() method initiates a drop -on the current drag destination at the time specified by -time. This method is called by the drag -source. - - - - - gtk.gdk.DragContext.drag_abort - - - drag_abort - time - - - - time : - the time of the drag abort -operation - - - - The drag_abort() method aborts the -current drag operation at the specified time. No drop -operation is initiated. This method is called by the drag source. - - - - - gtk.gdk.DragContext.finish - - - finish - success - del_ - time - - - - success : - if True the drop was -completed - - - del_ : - if True the drag source -should delete the source data - - - time : - the time of the drag finish -operation. - - - - The finish() method informs the drag -source that the drop is finished, and that the data of the drag will no -longer be required. If success is -True the drag drop completed successfully; if -del_ is True the source data -should be deleted; time is the timestamp of the -finish operation. This method is called by the drag destination. - - - - - gtk.gdk.DragContext.get_source_widget - - - get_source_widget - - - - Returns : - the source gtk.Widget if the -drag is within the same application or None -otherwise. - - - - The get_source_widget() method returns -the source gtk.Widget if the -drag is within the application; otherwise None is -returned. - - - - - gtk.gdk.DragContext.set_icon_widget - - - set_icon_widget - widget - hot_x - hot_y - - - - 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. - - - - The set_icon_widget() method changes -the icon for a drag source to the specified widget -with its hot spot at the offset specified by hot_x -and hot_y. PyGTK 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. - - - - - gtk.gdk.DragContext.set_icon_pixmap - - - set_icon_pixmap - colormap - pixmap - mask - hot_x - hot_y - - - - colormap : - the colormap of the icon - - - pixmap : - the gtk.gdk.Pixmap image -data for the icon - - - mask : - the gtk.gdk.Pixmap -transparency mask for the icon - - - hot_x : - the X offset within -pixmap of the hotspot. - - - hot_y : - the Y offset within -pixmap of the hotspot. - - - - The set_icon_pixmap() method sets -pixmap as the icon for the drag. -mask is a bitmap mask for -pixmap and hot_x and -hot_y specify the offset of the hot spot in -pixmap. In general, gtk.gdk.DragContext.set_icon_pixbuf() -will be more convenient to use. - - - - - gtk.gdk.DragContext.set_icon_pixbuf - - - set_icon_pixbuf - pixbuf - hot_x - hot_y - - - - pixbuf : - the gtk.gdk.Pixbuf to -use as the drag icon. - - - hot_x : - the X offset within -pixbuf of the hotspot. - - - hot_y : - the Y offset within -pixbuf of the hotspot. - - - - The set_icon_pixbuf() method sets -pixbuf as the icon for the drag. -hot_x and hot_y specify the -offset of the hot spot within pixbuf. - - - - - gtk.gdk.DragContext.set_icon_stock - - - set_icon_stock - stock_id - hot_x - hot_y - - - - stock_id : - the ID of the stock icon to use for the -drag. - - - hot_x : - the X offset within the icon of the -hotspot. - - - hot_y : - the Y offset within the icon of the -hotspot. - - - - The set_icon_stock() method sets the -the icon for a given drag from a stock ID specified by -stock_id. hot_x and -hot_y specify the offset of the hot spot within the -stock icon. - - - - - gtk.gdk.DragContext.set_icon_name - - - set_icon_name - icon_name - hot_x - hot_y - - - - icon_name : - the name of the icon to use for the -drag. - - - hot_x : - the X offset within the icon of the -hotspot. - - - hot_y : - the Y offset within the icon of the -hotspot. - - - - - This method is available in PyGTK 2.10 and above. - - - The set_icon_name() method sets the the -icon for a given drag from the named themed icon specified by -icon_name. hot_x and -hot_y specify the offset of the hot spot within the -stock icon. See the docs for gtk.IconTheme for -more information. Note that the size of the icon depends on the icon theme -(the icon is loaded at the symbolic size -gtk.ICON_SIZE_DND), thus hot_x and -hot_y have to be used with care. - - - - - gtk.gdk.DragContext.set_icon_default - - - set_icon_default - - - The set_icon_default() method sets the -icon for the drag to the default icon. - - - - - gtk.gdk.DragContext.drag_drop_succeeded - - - drag_drop_succeeded - - - - - Returns : - True if the drop was -successful. - - - - The drag_drop_succeeded() method -returns True if the dropped data has been successfully -transferred. This method is intended to be used while handling a -gtk.gdk.DROP_FINISHED event, its return value is -meaningless at other times. - - - - - -
diff --git a/docs/reference/pygtk-gdkdrawable.xml b/docs/reference/pygtk-gdkdrawable.xml deleted file mode 100644 index 4b57871b..00000000 --- a/docs/reference/pygtk-gdkdrawable.xml +++ /dev/null @@ -1,2171 +0,0 @@ - - - - - - gtk.gdk.Drawable - a base class for drawing methods - - - - Synopsis - - - gtk.gdk.Drawable - gobject.GObject - - get_size - - - - set_colormap - colormap - - - get_colormap - - - - get_visual - - - - get_depth - - - get_screen - - - - get_display - - - - draw_point - gc - x - y - - - draw_line - gc - x1 - y1 - x2 - y2 - - - draw_rectangle - gc - filled - x - y - width - height - - - draw_arc - gc - filled - x - y - width - height - angle1 - angle2 - - - draw_polygon - gc - filled - points - - - draw_drawable - gc - src - xsrc - ysrc - xdest - ydest - width - height - - - draw_image - gc - image - xsrc - ysrc - xdest - ydest - width - height - - - draw_points - gc - points - - - draw_segments - gc - segs - - - draw_lines - gc - points - - - draw_pixbuf - gc - pixbuf - src_x - src_y - dest_x - dest_y - width-1 - height-1 - dithergtk.gdk.RGB_DITHER_NORMAL - x_dither0 - y_dither0 - - - draw_glyphs - gc - font - x - y - glyphs - - - draw_layout_line - gc - x - y - line - layout - foreground - None - background - None - - - draw_layout - gc - x - y - layout - foreground - None - background - None - - - get_image - x - y - width - height - - - get_clip_region - - - - get_visible_region - - - - new_gc - 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> - - - draw_rgb_image - gc - x - y - width - height - dith - rgb_buf - rowstride - -1 - xdith - 0 - ydith - 0 - - - draw_rgb_32_image - gc - x - y - width - height - dith - rgb_buf - rowstride - -1 - xdith - 0 - ydith - 0 - - - draw_gray_image - gc - x - y - width - height - dith - buf - rowstride - -1 - - - draw_indexed_image - gc - x - y - width - height - dith - buf - rowstride - cmap - - - cairo_create - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.gdk.Drawable - - - - - - Attributes - -
- - - - - - - - - - "handle" - Read - The handle of the MS Windows window associated with -the drawable. Not supported on X11. - - - - "xid" - Read - The id of the X window available with the -drawable. Not supported on MS Windows - - - - - -
- -
- - - Description - - A gtk.gdk.Drawable -is a base class providing drawing primitives for its subclasses: gtk.gdk.Pixmap and -gtk.gdk.Window. - - These methods 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 gtk.gdk.Window or -gtk.gdk.Pixmap -objects. - - Many of the drawing operations take a gtk.gdk.GC argument, -which represents a graphics context. This gtk.gdk.GC 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. - - Some of the drawing operations take Pango objects like pango.Context or -pango.Layout -as arguments. Use the gtk.Widget.create_pango_context() -or gtk.Widget.create_pango_layout() -methods to obtain these objects. - - - - - Methods - - - gtk.gdk.Drawable.get_size - - - get_size - - - - - Returns : - a tuple containing the drawable's width and -height - - - - The get_size() method returns a tuple -containing the width and height of the drawable. - - On the X11 platform, if the drawable is a gtk.gdk.Window, the -returned size is the size reported in the most-recently-processed configure -event, rather than the current size on the X server. - - - - - gtk.gdk.Drawable.set_colormap - - - set_colormap - colormap - - - - colormap : - a gtk.gdk.Colormap - - - - The set_colormap() method sets the -gtk.gdk.Colormap -associated with the drawable to the value specified by -colormap. Normally this will happen automatically -when the drawable is created; you only need to use this function if the -drawable-creating function did not have a way to determine the colormap, and -you then use drawable operations that require a colormap. The colormap for -all drawables and graphics contexts you intend to use together should match. -i.e. when using a gtk.gdk.GC to draw to a -drawable, or copying one drawable to another, the colormaps should -match. - - - - - gtk.gdk.Drawable.get_colormap - - - get_colormap - - - - - Returns : - the colormap, or -None - - - - The get_colormap() method returns the -gtk.gdk.Colormap -for the drawable or None if no colormap is set. - - - - - gtk.gdk.Drawable.get_visual - - - get_visual - - - - Returns : - a gtk.gdk.Visual - - - - The get_visual() method returns the -gtk.gdk.Visual -describing the pixel format of the drawable. - - - - - gtk.gdk.Drawable.get_depth - - - get_depth - - - - - Returns : - the number of bits per -pixel - - - - The get_depth() method returns the bit -depth of the drawable, that is, the number of bits that make up a pixel in -the drawable's visual. Examples are 8 bits per pixel, 24 bits per pixel, -etc. - - - - - gtk.gdk.Drawable.get_screen - - - get_screen - - - - - Returns : - the gtk.gdk.Screen - associated with the drawable - - - - - This method is available in PyGTK 2.2 and above. - - - The get_screen() method returns the -gtk.gdk.Screen -associated with the drawable. - - - - - - gtk.gdk.Drawable.get_display - - - get_display - - - - - Returns : - the gtk.gdk.Display - associated with the drawable - - - - - This method is available in PyGTK 2.2 and above. - - - The get_display() method returns the -gtk.gdk.Display -associated with the drawable. - - - - - gtk.gdk.Drawable.draw_point - - - draw_point - gc - x - y - - - - gc : - a graphics context - - - x : - the X coordinate of the point in drawable -coordinates - - - y : - the Y coordinate of the point in drawable -coordinates - - - - The draw_point() method draws a point -at the location specified by x and -y in the drawable using the gtk.gdk.GC graphics -context specified by gc. - - - - - gtk.gdk.Drawable.draw_line - - - draw_line - gc - x1 - y1 - x2 - y2 - - - - gc : - a graphics context - - - x1 : - the X coordinate of the first -point - - - y1 : - the Y coordinate of the first -point - - - x2 : - the X coordinate of the second -point - - - y2 : - the Y coordinate of the second -point - - - - The draw_line() method draws a line -between the two points specified by (x1, -y1) and (x2, -y2) using the gtk.gdk.GC graphics -context specified by gc. - - - - - gtk.gdk.Drawable.draw_rectangle - - - draw_rectangle - gc - filled - x - y - width - height - - - - gc : - a graphics context - - - filled : - if True the rectangle will -be filled with the foreground color - - - x : - the X coordinate of the top left -corner - - - y : - the Y coordinate of the top left -corner - - - width : - the width of the rectangle - - - height : - the height of the -rectangle - - - - The draw_rectangle() method draws a -rectangle of the specified width and -height with its top left corner at the location -specified by (x, y) using the -gtk.gdk.GC -graphics context specified by gc. If -filled is True the rectangle will -be filled with the foreground color. - - - A rectangle drawn filled is 1 pixel smaller in both dimensions -than a rectangle outlined. Calling: - - - window.draw_rectangle(gc, True, 0, 0, 20, 20) - - - results in a filled rectangle 20 pixels wide and 20 pixels -high. Calling: - - - window.draw_rectangle(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. - - - - - - gtk.gdk.Drawable.draw_arc - - - draw_arc - gc - filled - x - y - width - height - angle1 - angle2 - - - - gc : - a graphics context - - - filled : - if True the arc will be -filled with the foreground color creating 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, -counter-clockwise, in 1/64ths of a degree. - - - - The draw_arc() method draws an arc or a -filled 'pie slice' if filled is -True. The arc is defined by the bounding rectangle of the -entire ellipse (specified by x, -y, width and -height), and the start and end angles of the part of -the ellipse to be drawn (specified by angle1 and -angle2). The gtk.gdk.GC graphics -context specified by gc is used to determine the -drawing attributes. - - - - - gtk.gdk.Drawable.draw_polygon - - - draw_polygon - gc - filled - points - - - - gc : - a graphics context - - - filled : - if True the polygon will be -filled with the foreground color - - - points : - a sequence of 2-tuples - - - - The draw_polygon() method draws an -outlined or filled polygon using the points specified by -points. points is a sequence -of 2-tuples that each contain an x and y coordinate of a point. The points -are connected in the order that they are specified and the last point is -automatically connected to the first point. The gtk.gdk.GC graphics -context specified by gc is used to determine the -drawing attributes. - - - - - gtk.gdk.Drawable.draw_drawable - - - draw_drawable - gc - src - xsrc - ysrc - xdest - ydest - width - height - - - - gc : - a gtk.gdk.GC sharing the -drawable's visual and colormap - - - src : - another gtk.gdk.Drawable - - - xsrc : - the X position in src of -rectangle to draw - - - ysrc : - the Y position in src of -rectangle to draw - - - xdest : - the X position in the drawable where the -rectangle should be drawn - - - ydest : - the Y position in the drawable where the -rectangle should be drawn - - - width : - the width of rectangle to draw, or -1 for -entire src width - - - height : - the height of rectangle to draw, or -1 for -entire src height - - - - The draw_drawable() method copies the specified -width x height area of the -drawable specified by src at the specified -coordinates (xsrc, ysrc) to -the specified coordinates (xdest, -ydest) in the drawable. width -and height may be given as -1, to copy the entire -src drawable. Most fields in the gtk.gdk.GC specified by -gc are not used for this operation, but the clip mask -or clip region will be honored. - - The source and destination drawables must have the same visual -and colormap, or errors will result. (On X11, failure to match visual and -colormap results in a BadMatch error from the X server.) -A common cause of this problem is an attempt to draw a bitmap to a color -drawable. The way to draw a bitmap is to set the bitmap as a clip mask on -your gtk.gdk.GC, -then use the draw_rectangle() -method to draw a rectangle clipped to the bitmap. - - - - - gtk.gdk.Drawable.draw_image - - - draw_image - gc - image - xsrc - ysrc - xdest - ydest - width - height - - - - gc : - a graphics context - - - image : - a gtk.gdk.Image - - - xsrc : - the left edge of the source rectangle within -image. - - - ysrc : - the top edge of the source rectangle within -image. - - - xdest : - the left edge of the destination within -drawable. - - - ydest : - the top edge 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. - - - - The draw_image() method draws the -portion of the gtk.gdk.Image -specified by the rectangle (xsrc, -ysrc, width and -height) onto the drawable at the location specified -by xdest and ydest. The depth -of the gtk.gdk.Image must -match the depth of the gtk.gdk.Drawable. -The gtk.gdk.GC -graphics context specified by gc is used to determine -the drawing attributes. - - - - - gtk.gdk.Drawable.draw_points - - - draw_points - gc - points - - - - gc : - a graphics context - - - points : - a sequence of 2-tuples - - - - The draw_points() method draws the set -of points specified by points on the drawable using -the gtk.gdk.GC -graphics context specified by gc. -points is a sequence of 2-tuples each containing a -pair of x and y coordinates of a point location in the drawable. - - - - - gtk.gdk.Drawable.draw_segments - - - draw_segments - gc - segs - - - - gc : - a graphics context - - - segs : - a sequence of 4-tuples - - - - The draw_segments() method draws a set -of line segments specified by segs on the drawable -using the gtk.gdk.GC graphics -context specified by gc to specify the drawing -attributes. segs is a sequence of 4-tuples each -containing the coordinates of the start and end points of the line segment -in the format (x1, y1, x2, y2). - - - - - gtk.gdk.Drawable.draw_lines - - - draw_lines - gc - points - - - - gc : - a graphics context - - - points : - a sequence of 2-tuples - - - - The draw_lines() method draws a series -of lines connecting the points specified by points. -points is a sequence of 2-tuples each containing the -x and y coordinates of a point location. The gtk.gdk.GC graphics -context specified by gc is used to determine the -drawing attributes.The style of joins between lines is determined by the cap -style attribute in the gtk.gdk.GC. This can be -set with the gtk.gdk.GC.set_line_attributes() -method. - - - - - gtk.gdk.Drawable.draw_pixbuf - - - draw_pixbuf - gc - pixbuf - src_x - src_y - dest_x - dest_y - width-1 - height-1 - dithergtk.gdk.RGB_DITHER_NORMAL - x_dither0 - y_dither0 - - - - gc : - a gtk.gdk.GC, - used for clipping, or None - - - pixbuf : - a gtk.gdk.Pixbuf - - - 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, or -1 to - use pixbuf width. Must be specified in PyGTK - 2.2. - - - height : - Height of region to render, in pixels, or -1 to - use pixbuf height. Must be specified in PyGTK - 2.2 - - - dither : - Dithering mode for - GdkRGB. - - - x_dither : - X offset for dither. - - - y_dither : - Y offset for dither. - - - - - This method is available in PyGTK 2.2 and above. - - - The draw_pixbuf() method renders a -rectangular portion of a gtk.gdk.Pixbuf -specified by pixbuf to the drawable using the gtk.gdk.GC specified by -gc. The portion of pixbuf that -is rendered is specified by the origin point (src_x -src_y) and the width and -height arguments. pixbuf is -rendered to the location in the drawable specified by -(dest_x -dest_y). dither specifies the -dithering mode as one of: - - - - gtk.gdk.RGB_DITHER_NONE - - Never use dithering. - - - - gtk.gdk.RGB_DITHER_NORMAL - - Use dithering in 8 bits per pixel (and below) - only. - - - - gtk.gdk.RGB_DITHER_MAX - - Use dithering in 16 bits per pixel and below. - - - - - The destination drawable must have a colormap. All windows have a -colormap, however, pixmaps only have colormap by default if they were -created with a non-None window argument. Otherwise a -colormap must be set on them with the gtk.gdk.Drawable.set_colormap() -method. - - On older X servers, rendering pixbufs with an alpha channel -involves round trips to the X server, and may be somewhat slow. The clip -mask of gc is ignored, but clip rectangles and clip -regions work fine. - - - - - gtk.gdk.Drawable.draw_glyphs - - - draw_glyphs - gc - font - x - y - glyphs - - - - gc : - a gtk.gdk.GC - - - font : - the font to be used - - - x : - the X coordinate of baseline -origin - - - y : - the Y coordinate of baseline -origin - - - glyphs : - the glyphs to render - - - - The draw_glyphs() method draws the -sequence of glyphs (characters in a font) specified by -glyphs at the location specified by -x and y using the font -specified by font. Instead of using this method 99% -of text rendering should be done using the draw_layout() -method. - - - - - gtk.gdk.Drawable.draw_layout_line - - - draw_layout_line - gc - x - y - line - foreground - None - background - None - - - - gc : - base graphics to use - - - x : - the x position of start of string (in pixels) - - - y : - the y position of baseline (in pixels) - - - line : - a pango.LayoutLine - - - foreground : - a gtk.gdk.Color - to override the foreground color or - None - - - background : - a gtk.gdk.Color - to override the background color or - None - - - - - This method is available in PyGTK 2.10 and above. - - - The draw_layout_line() method renders the - pango.LayoutLine - specified by line onto the drawable at the - position specified by (x, - y). The gtk.gdk.GC - specified by gc is used as the graphics context - but the layout's normal colors may be overriden with the gtk.gdk.Colors - specified by foreground and/or - background. foreground - and background are optional and default to - None. - - If the layout's pango.Context - has a transformation matrix set, then x and - y specify the position of the left edge of the - baseline (left is in before-tranform user coordinates) in - after-transform device coordinates. - - - - - gtk.gdk.Drawable.draw_layout - - - draw_layout - gc - x - y - layout - foreground - None - background - None - - - - gc : - base graphics context to -use - - - x : - the X position of the left of the layout (in -pixels) - - - y : - the Y position of the top of the layout (in -pixels) - - - layout : - a pango.Layout - - - foreground : - a gtk.gdk.Color to -override the foreground color or -None - - - background : - a gtk.gdk.Color to -override the background color or -None - - - - The draw_layout() method renders the -pango.Layout -specified by layout onto the drawable at the location -specified by x and y. If -foreground or background has a -value other than None it is used to override the -corresponding attribute specified by gc. - - - - - gtk.gdk.Drawable.get_image - - - get_image - x - y - width - height - - - - x : - the X coordinate on the -drawable - - - y : - the Y coordinate on the -drawable - - - width : - the width of region to get - - - height : - the height or region to -get - - - Returns : - a gtk.gdk.Image -containing the contents of the drawable - - - - The get_image() method returns a gtk.gdk.Image -object containing a copy of the region in the drawable specified by -x, y, -width and height. A gtk.gdk.Image stores -client-side image data (pixels). In contrast, a gtk.gdk.Pixmap and -gtk.gdk.Window -are server-side objects. The get_image() method -retrieves the pixels from a server-side drawable as a client-side gtk.gdk.Image. The -format of a gtk.gdk.Image depends -on the gtk.gdk.Visual of -the current display, which makes manipulating gtk.gdk.Image -extremely difficult; therefore, in most cases you should use the gtk.gdk.Pixbuf.get_from_drawable() -method instead of this lower-level function. A gtk.gdk.Pixbuf -contains image data in a canonicalized RGB format, rather than a -display-dependent format. Of course, there's a convenience vs. speed -tradeoff here, so you'll want to think about what makes sense for your -application. - - You would usually copy image data to the client side if you -intend to examine the values of individual pixels, for example to darken an -image or add a red tint. It would be prohibitively slow to make a round-trip -request to the windowing system for each pixel, so instead you get all of -them at once, modify them, then copy them all back at once. If the X server -or other windowing system backend is on the local machine, this function may -use shared memory to avoid copying the image data. If the source drawable is -a gtk.gdk.Window and -partially off screen or obscured, then the obscured portions of the returned -image will contain undefined data. - - - - - gtk.gdk.Drawable.get_clip_region - - - get_clip_region - - - - Returns : - a gtk.gdk.Region. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_clip_region() method computes - and returns the gtk.gdk.Region - of the drawable that potentially can be written to by drawing - primitives. This region will not take into account the clip region for - the gtk.gdk.GC, and - may also not take into account other factors such as if the window is - obscured by other windows, but no area outside of this region will be - affected by drawing primitives. - - - - - - gtk.gdk.Drawable.get_visible_region - - - get_visible_region - - - - Returns : - a gtk.gdk.Region. This must be freed with gdk_region_destroy() - when you are done. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_visible_region() method - computes and returns the gtk.gdk.Region - of the drawable that is potentially visible. This does not - necessarily take into account if the window is obscured by other - windows, but no area outside of this region is visible. - - - - - gtk.gdk.Drawable.new_gc - - - new_gc - 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> - - - - foreground : - the foreground gtk.gdk.Color - - - background : - the background gtk.gdk.Color - - - font : - a font (deprecated and -ignored) - - - function : - the bitwise operator used to combine the -existing pixel value and a new pixel value - usually one of: -gtk.gdk.COPY, gtk.gdk.XOR or -gtk.gdk.INVERT. - - - fill : - the fill style - one of: -gtk.gdk.SOLID, gtk.gdk.TILED, -gtk.gdk.STIPPLED, -gtk.gdk.OPAQUE_STIPPLED - - - tile : - a gtk.gdk.Pixmap used -for tiling the background - - - stipple : - a gtk.gdk.Pixmap used -for stippling the background - - - clip_mask : - a gtk.gdk.Pixmap of -depth 1 used to mask pixels to be drawn - - - subwindow_mode : - the mode of drawing on subwindows in a -gtk.gdk.Window - one of: gtk.gdk.CLIP_BY_CHILDREN or -gtk.gdk.INCLUDE_INFERIORS - - - ts_x_origin : - the X coordinate of the origin of -tile or -stipple - - - ts_y_origin : - the Y coordinate of the origin of -tile or -stipple - - - clip_x_origin : - the X coordinate of the origin of -clip_mask - - - clip_y_origin : - the Y coordinate of the origin of -clip_mask - - - graphics_exposures : - if True graphics exposures -are enabled for calls to the draw_drawable() -method. - - - line_width : - the line width in pixels - - - line_style : - the line style - one of: -gtk.gdk.LINE_SOLID, -gtk.gdk.LINE_ON_OFF_DASH, -gtk.gdk.LINE_DOUBLE_DASH - - - cap_style : - the style of line ends - one of: -gtk.gdk.CAP_NOT_LAST, -gtk.gdk.CAP_BUTT, gtk.gdk.CAP_ROUND, -gtk.gdk.CAP_PROJECTING - - - join_style : - the style of line joins - one of: -gtk.gdk.JOIN_MITER, -gtk.gdk.JOIN_ROUND, -gtk.gdk.JOIN_BEVEL - - - Returns : - a graphics context - - - - The new_gc() method creates a new gtk.gdk.GC object with -the attributes as specified by the arguments. Since there are a large number -of parameters it's probably best to specify the attributes using keywords. -Any attributes not specified will use a default value. - - - - - gtk.gdk.Drawable.draw_rgb_image - - - draw_rgb_image_dithalign - gc - x - y - width - height - dith - rgb_buf - rowstride - -1 - xdith - 0 - ydith - 0 - - - - gc : - a 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 image to be -drawn. - - - height : - the height of the image to be -drawn. - - - dith : - a dither value - one of: -gtk.gdk.RGB_DITHER_NONE, -gtk.gdk.RGB_DITHER_NORMAL, -gtk.gdk.RGB_DITHER_MAX - - - 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 or -1 to -calculate the number of bytes. - - - xdith : - an X offset for dither -alignment. - - - ydith : - a Y offset for dither -alignment. - - - - The draw_rgb_image() method draws an -RGB image in the drawable, with an adjustment for dither alignment. This -method 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. - - - - - gtk.gdk.Drawable.draw_rgb_32_image - - - draw_rgb_32_image - gc - x - y - width - height - dith - rgb_buf - rowstride - -1 - xdith - 0 - ydith - 0 - - - - gc : - a 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 image to be -drawn. - - - height : - the height of the image to be -drawn. - - - dith : - a dither value - one of: -gtk.gdk.RGB_DITHER_NONE, -gtk.gdk.RGB_DITHER_NORMAL, -gtk.gdk.RGB_DITHER_MAX - - - 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 or -1 to calculate -the number of bytes. - - - xdith : - an X offset for dither -alignment. - - - ydith : - a Y offset for dither -alignment. - - - - The draw_rgb_32_image() method 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. Otherwise this method works the same as the draw_rgb_image() -method. - - - - - gtk.gdk.Drawable.draw_gray_image - - - draw_gray_image - gc - x - y - width - height - dith - buf - rowstride - -1 - - - - gc : - a 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 image to be -drawn. - - - height : - the height of the image to be -drawn. - - - dith : - a dither value - one of: -gtk.gdk.RGB_DITHER_NONE, -gtk.gdk.RGB_DITHER_NORMAL, -gtk.gdk.RGB_DITHER_MAX - - - 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 or -1 to calculate -the number of bytes. - - - - The draw_gray_image() method draws a -grayscale image on the drawable at the location specified by -x and y with the image data in -buf. - - - - - gtk.gdk.Drawable.draw_indexed_image - - - draw_indexed_image - gc - x - y - width - height - dith - buf - rowstride - colors - - - - gc : - a 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. - - - colors : - a list of colors represented as 0xRRGGBB integer - values. - - - - - This method is available in PyGTK 2.10 and above. - - - The draw_indexed_image() method draws an - indexed image in the drawable, using the list of colors specified - by colors to assign actual colors to the image's - color indices. - - - - - gtk.gdk.Drawable.cairo_create - - - cairo_create - - - - - Returns : - a gtk.gdk.CairoContext - - - - - This method is available in PyGTK 2.8 and above. - - - The cairo_create() method returns a - gtk.gdk.CairoContext - object to be used for drawing on the drawable using Cairo drawing - operations. - - - - - -
diff --git a/docs/reference/pygtk-gdkevent.xml b/docs/reference/pygtk-gdkevent.xml deleted file mode 100644 index ff36df22..00000000 --- a/docs/reference/pygtk-gdkevent.xml +++ /dev/null @@ -1,2454 +0,0 @@ - - - - - - gtk.gdk.Event - an object representing an event from the windowing -system - - - - Synopsis - - - gtk.gdk.Event - gobject.GBoxed - - gtk.gdk.Event - type - - - put - - - copy - - - free - - - get_time - - - get_state - state - - - get_coords - - - - get_root_coords - - - - get_axis - axis_use - - - set_screen - screen - - - get_screen - - - - - -Functions - - - gtk.gdk.events_pending - - - gtk.gdk.event_peek - - - gtk.gdk.event_get - - - gtk.gdk.event_get_graphics_expose - window - - gtk.gdk.set_show_events - show_events - - gtk.gdk.get_show_events - - - gtk.gdk.event_handler_set - func - dataNone - - - - - - Attributes - - The attributes available for a gtk.gdk.Event are -dependent on the type of the event. The event types are described in the -Description section. - - - <literal>gtk.gdk.NOTHING</literal> - <literal>gtk.gdk.DELETE</literal> - <literal>gtk.gdk.DESTROY</literal> - <literal>gtk.gdk.MAP</literal> - <literal>gtk.gdk.UNMAP</literal> - <literal>gtk.gdk.NO_EXPOSE</literal> - -
- - - - - - - - - - "type" - Read - The event type - see the list below in the Description section - - - - "window" - Read/Write - The gtk.gdk.Window the -event occurred on. - - - - "send_event" - Read/Write - True if the event was sent -explicitly. - - - - - -
- - Contain only the fields that are common to all event - types. - -
- - - <literal>gtk.gdk.EXPOSE</literal> - -
- - - - - - - - - - "type" - Read - The event type - see the list below in the Description section - - - - "window" - Read/Write - The gtk.gdk.Window the -event occurred on. - - - - "send_event" - Read/Write - True if the event was sent -explicitly. - - - - "area" - Read/Write - The bounding box of the area to be redrawn - - - - "count" - Read/Write - The number of contiguous gtk.gdk.EXPOSE events -following this one. The only use for this is "exposure compression", i.e. -handling all contiguous gtk.gdk.EXPOSE events in one go, though -PyGTK performs some exposure compression so this is not -normally needed. - - - - - -
- - Generated when all or part of a window becomes visible and needs - to be redrawn. - -
- - - <literal>gtk.gdk.MOTION_NOTIFY</literal> - -
- - - - - - - - - - "type" - Read - The event type - see the list below in the Description section - - - - "window" - Read/Write - The gtk.gdk.Window the -event occurred on. - - - - "send_event" - Read/Write - True if the event was sent -explicitly. - - - - "time" - Read/Write - The time of the event in milliseconds. - - - - "x" - Read/Write - The x coordinate of the pointer relative to the -window. - - - - "y" - Read/Write - The y coordinate of the pointer relative to the -window. - - - - "axes" - Read - x, y -translated to the axes of device, or -None if device is the -mouse. - - - - "state" - Read/Write - A bit-mask representing the state of the modifier -keys (e.g. Control, Shift and -Alt) and the pointer buttons. - - - - "is_hint" - Read/Write - True if the -gdk.POINTER_MOTION_HINT_MASK is set. - - - - "device" - Read - The device where the event originated. - - - - "x_root" - Read/Write - The x coordinate of the pointer relative to the root -of the screen. - - - - "y_root" - Read/Write - The y coordinate of the pointer relative to the root -of the screen. - - - - - -
- - Generated when the pointer moves. - -
- - - <literal>gtk.gdk.BUTTON_PRESS</literal> - <literal>gtk.gdk._2BUTTON_PRESS</literal> - <literal>gtk.gdk._3BUTTON_PRESS</literal> - <literal>gtk.gdk.BUTTON_RELEASE</literal> - -
- - - - - - - - - - "type" - Read - The event type - see the list below in the Description section - - - - "window" - Read/Write - The gtk.gdk.Window the -event occurred on. - - - - "send_event" - Read/Write - True if the event was sent -explicitly. - - - - "time" - Read/Write - The time of the event in milliseconds. - - - - "x" - Read/Write - The x coordinate of the pointer relative to the -window. - - - - "y" - Read/Write - The y coordinate of the pointer relative to the -window. - - - - "axes" - Read - x, y -translated to the axes of device, or -None if device is the -mouse. - - - - "state" - Read/Write - A bit-mask representing the state of the modifier -keys (e.g. Control, Shift and -Alt) and the pointer buttons. - - - - "button" - Read/Write - 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. - - - - "device" - Read - The device where the event originated. - - - - "x_root" - Read/Write - The x coordinate of the pointer relative to the root -of the screen. - - - - "y_root" - Read/Write - The y coordinate of the pointer relative to the root -of the screen. - - - - - -
- - Used for button press and button release events. - - Double and triple-clicks result in a sequence of events being - received. For double-clicks the order of events will be: - - - gtk.gdk.BUTTON_PRESS - gtk.gdk.BUTTON_RELEASE - gtk.gdk.BUTTON_PRESS - gtk.gdk.2BUTTON_PRESS - gtk.gdk.BUTTON_RELEASE - - - Note that the first click is received just like a normal button - press, while the second click results in a - gtk.gdk.2BUTTON_PRESS being received just after the - gtk.gdk.BUTTON_PRESS. - - Triple-clicks are very similar to double-clicks, except that - gtk.gdk.3BUTTON_PRESS is inserted after the third - click. The order of the events is: - - - gtk.gdk.BUTTON_PRESS - gtk.gdk.BUTTON_RELEASE - gtk.gdk.BUTTON_PRESS - gtk.gdk.2BUTTON_PRESS - gtk.gdk.BUTTON_RELEASE - gtk.gdk.BUTTON_PRESS - gtk.gdk.3BUTTON_PRESS - gtk.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. - -
- - - <literal>gtk.gdk.KEY_PRESS</literal> - <literal>gtk.gdk.KEY_RELEASE</literal> - -
- - - - - - - - - - "type" - Read - The event type - see the list below in the Description section - - - - "window" - Read/Write - The gtk.gdk.Window the -event occurred on. - - - - "send_event" - Read/Write - True if the event was sent -explicitly. - - - - "time" - Read/Write - The time of the event in milliseconds. - - - - "state" - Read/Write - A bit-mask representing the state of the modifier -keys (e.g. Control, Shift and -Alt) and the pointer buttons. - - - - "keyval" - Read/Write - The key that was pressed or released. - - - - "string" - Read/Write - A multi-byte string containing the composed -characters resulting from the key press. When text is being input, in a -gtk.Entry 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. - - - - "hardware_keycode" - Read/Write - The raw code of the key that was pressed or -released. Available in PyGTK 2.2 and above. - - - - "group" - Read/Write - the keyboard group. Available in PyGTK 2.4 and -above. - - - - - -
- - Generated for a key press or key release event. - -
- - - <literal>gtk.gdk.ENTER_NOTIFY</literal> - <literal>gtk.gdk.LEAVE_NOTIFY</literal> - -
- - - - - - - - - - "type" - Read - The event type - see the list below in the Description section - - - - "window" - Read/Write - The gtk.gdk.Window the -event occurred on. - - - - "send_event" - Read/Write - True if the event was sent -explicitly. - - - - "subwindow" - Read/Write - The window that was entered or left. - - - - "time" - Read/Write - The time of the event in milliseconds. - - - - "x" - Read/Write - The x coordinate of the pointer relative to the -window. - - - - "y" - Read/Write - The y coordinate of the pointer relative to the -window. - - - - "x_root" - Read/Write - The x coordinate of the pointer relative to the root -of the screen. - - - - "y_root" - Read/Write - The y coordinate of the pointer relative to the root -of the screen. - - - - "mode" - Read/Write - The crossing mode -(gtk.gdk.CROSSING_NORMAL, -gtk.gdk.CROSSING_GRAB or -gtk.gdk.CROSSING_UNGRAB). - - - - "detail" - Read/Write - The kind of crossing that happened -(gtk.gdk.NOTIFY_INFERIOR, -gtk.gdk.NOTIFY_ANCESTOR, -gtk.gdk.NOTIFY_VIRTUAL, -gtk.gdk.NOTIFY_NONLINEAR or -gtk.gdk.NOTIFY_NONLINEAR_VIRTUAL). - - - - "focus" - Read/Write - True if -window is the focus window or an inferior. - - - - "state" - Read/Write - A bit-mask representing the state of the modifier -keys (e.g. Control, Shift and -Alt) and the pointer buttons. - - - - - -
- - Generated when the pointer enters or leaves a window. - -
- - - <literal>gtk.gdk.FOCUS_CHANGE</literal> - -
- - - - - - - - - - "type" - Read - The event type - see the list below in the Description section - - - - "window" - Read/Write - The gtk.gdk.Window the -event occurred on. - - - - "send_event" - Read/Write - True if the event was sent -explicitly. - - - - "in_" - Read/Write - True if the window has gained the -keyboard focus, False if it has lost the focus. - - - - - -
- - Describes a change of keyboard focus. - -
- - - <literal>gtk.gdk.CONFIGURE</literal> - -
- - - - - - - - - - "type" - Read - The event type - see the list below in the Description section - - - - "window" - Read/Write - The gtk.gdk.Window the -event occurred on. - - - - "send_event" - Read/Write - True if the event was sent -explicitly. - - - - "x" - Read/Write - The new x coordinate of the window relative to its -parent. - - - - "y" - Read/Write - The new y coordinate of the window relative to its -parent. - - - - "width" - Read/Write - The new width of the window. - - - - "height" - Read/Write - The new height of the window. - - - - - -
- - Generated when a window size or position has changed. - -
- - - <literal>gtk.gdk.PROPERTY_NOTIFY</literal> - -
- - - - - - - - - - "type" - Read - The event type - see the list below in the Description section - - - - "window" - Read/Write - The gtk.gdk.Window the -event occurred on. - - - - "send_event" - Read/Write - True if the event was sent -explicitly. - - - - "atom" - Read - The property that was changed. - - - - "time" - Read/Write - The time of the event in milliseconds. - - - - "state" - Read/Write - The property was changed -(gtk.gdk.PROPERTY_NEW_VALUE) or deleted -(gtk.gdk.PROPERTY_DELETE). - - - - - -
- - Describes a property change on a window. - -
- - - <literal>gtk.gdk.SELECTION_CLEAR</literal> - <literal>gtk.gdk.SELECTION_REQUEST</literal> - <literal>gtk.gdk.SELECTION_NOTIFY</literal> - -
- - - - - - - - - - "type" - Read - The event type - see the list below in the Description section - - - - "window" - Read/Write - The gtk.gdk.Window the -event occurred on. - - - - "send_event" - Read/Write - True if the event was sent -explicitly. - - - - "selection" - Read - The selection. - - - - "target" - Read - The target to which the selection should be -converted. - - - - "property" - Read - The property in which to place the result of the -conversion. - - - - "requestor" - Read/Write - the native window ID on which to place -property. - - - - "time" - Read/Write - The time of the event in milliseconds. - - - - - -
- - Generated when a selection is requested or ownership of a - selection is taken over by another client application. - -
- - - <literal>gtk.gdk.PROXIMITY_IN</literal> - <literal>gtk.gdk.PROXIMITY_OUT</literal> - -
- - - - - - - - - - "type" - Read - The event type - see the list below in the Description section - - - - "window" - Read/Write - The gtk.gdk.Window the -event occurred on. - - - - "send_event" - Read/Write - True if the event was sent -explicitly. - - - - "time" - Read/Write - The time of the event in milliseconds. - - - - "device" - Read - The device where the event originated. - - - - - -
- - Proximity events are generated when using GDK's wrapper for the - XInput extension. The XInput extension is an add-on for standard X - that allows you to use nonstandard devices such as graphics tablets. A - proximity event indicates that the stylus has moved in or out of - contact with the tablet, or perhaps that the user's finger has moved - in or out of contact with a touch screen. - -
- - - <literal>gtk.gdk.DRAG_ENTER</literal> - <literal>gtk.gdk.DRAG_LEAVE</literal> - <literal>gtk.gdk.DRAG_MOTION</literal> - <literal>gtk.gdk.DRAG_STATUS</literal> - <literal>gtk.gdk.DRAG_START</literal> - <literal>gtk.gdk.DRAG_FINISHED</literal> - -
- - - - - - - - - - "type" - Read - The event type - see the list below in the Description section - - - - "window" - Read/Write - The gtk.gdk.Window the -event occurred on. - - - - "send_event" - Read/Write - True if the event was sent -explicitly. - - - - "context" - Read - The gtk.gdk.DragContext -for the current DND operation. - - - - "time" - Read/Write - The time of the event in milliseconds. - - - - "x_root" - Read/Write - The x coordinate of the pointer relative to the root -of the screen only set for gtk.gdk.DRAG_MOTION and -gtk.gdk.DROP_START. - - - - "y_root" - Read/Write - The y coordinate of the pointer relative to the root -of the screen only set for gtk.gdk.DRAG_MOTION and -gtk.gdk.DROP_START. - - - - - -
- - Generated during Drag and Drop operations. - -
- - - <literal>gtk.gdk.CLIENT_EVENT</literal> - -
- - - - - - - - - - "type" - Read - The event type - see the list below in the Description section - - - - "window" - Read/Write - The gtk.gdk.Window the -event occurred on. - - - - "send_event" - Read/Write - True if the event was sent -explicitly. - - - - "message_type" - Read/Write - The type of the message, which can be defined by the -application. - - - - "data_format" - Read/Write - The format of the data, given as the number of bits -in each data element, i.e. 8, 16, or 32. - - - - "data" - Read/Write - The data as a string of 8-bit characters. - - - - - -
- - An event sent by another client application. - -
- - - <literal>gtk.gdk.VISIBILITY_NOTIFY</literal> - -
- - - - - - - - - - "type" - Read - The event type - see the list below in the Description section - - - - "window" - Read/Write - The gtk.gdk.Window the -event occurred on. - - - - "send_event" - Read/Write - True if the event was sent -explicitly. - - - - "state" - Read/Write - The new visibility state -(gtk.gdk.VISIBILITY_FULLY_OBSCURED, -gtk.gdk.VISIBILITY_PARTIAL or -gtk.gdk.VISIBILITY_UNOBSCURED). - - - - - -
- - Generated when the window visibility status has changed. - -
- - - <literal>gtk.gdk.SCROLL</literal> - -
- - - - - - - - - - "type" - Read - The event type - see the list below in the Description section - - - - "window" - Read/Write - The gtk.gdk.Window the -event occurred on. - - - - "send_event" - Read/Write - True if the event was sent -explicitly. - - - - "time" - Read/Write - The time of the event in milliseconds. - - - - "x" - Read/Write - The x coordinate of the pointer relative to the -window. - - - - "y" - Read/Write - The y coordinate of the pointer relative to the -window. - - - - "state" - Read/Write - A bit-mask representing the state of the modifier -keys (e.g. Control, Shift and -Alt) and the pointer buttons. - - - - "direction" - Read/Write - The direction to scroll to (one of -gtk.gdk.SCROLL_UP, -gtk.gdk.SCROLL_DOWN, -gtk.gdk.SCROLL_LEFT or -gtk.gdk.SCROLL_RIGHT). - - - - "device" - Read - The device where the event originated. - - - - "x_root" - Read/Write - The x coordinate of the pointer relative to the root -of the screen. - - - - "y_root" - Read/Write - The y coordinate of the pointer relative to the root -of the screen. - - - - - -
- - Generated from button presses for the buttons 4 to 7. Wheel mice - are usually configured to generate button press events for buttons 4 - and 5 when the wheel is turned. - -
- - - <literal>gtk.gdk.WINDOW_STATE</literal> - -
- - - - - - - - - - "type" - Read - The event type - see the list below in the Description section - - - - "window" - Read/Write - The gtk.gdk.Window the -event occurred on. - - - - "send_event" - Read/Write - True if the event was sent -explicitly. - - - - "changed_mask" - Read/Write - The mask specifying what flags have changed - a -combination of: gtk.gdk.WINDOW_STATE_WITHDRAWN, -gtk.gdk.WINDOW_STATE_ICONIFIED, -gtk.gdk.WINDOW_STATE_MAXIMIZED and -gtk.gdk.WINDOW_STATE_STICKY - - - - "new_window_state" - Read/Write - The new window state - a combination of: -gtk.gdk.WINDOW_STATE_WITHDRAWN, -gtk.gdk.WINDOW_STATE_ICONIFIED, -gtk.gdk.WINDOW_STATE_MAXIMIZED and -gtk.gdk.WINDOW_STATE_STICKY - - - - - -
- - Generated when the state of a toplevel window changes. - -
- - - <literal>gtk.gdk.SETTING</literal> - -
- - - - - - - - - - "type" - Read - The event type - see the list below in the Description section - - - - "window" - Read/Write - The gtk.gdk.Window the -event occurred on. - - - - "send_event" - Read/Write - True if the event was sent -explicitly. - - - - "action" - Read/Write - What happened to the setting -(gtk.gdk.SETTING_ACTION_NEW, -gtk.gdk.SETTING_ACTION_CHANGED or -gtk.gdk.SETTING_ACTION_DELETED). - - - - "name" - Read/Write - The name of the setting. - - - - - -
- - Generated when a setting is modified. - -
- - - <literal>gtk.gdk.OWNER_CHANGE</literal> - - - This Event type is available in PyGTK 2.8 and above. - - -
- - - - - - - - - - "type" - Read - The event type - see the list below in the Description section - - - - "window" - Read/Write - The gtk.gdk.Window the -event occurred on. - - - - "send_event" - Read/Write - True if the event was sent -explicitly. - - - - "owner" - Read/Write - the new owner of the selection - the native window - ID as an integer - - - - "reason" - Read/Write - the reason for the ownership change indicated by one - of the . - - - - "selection" - Read - the atom identifying the selection - - - - "time" - Read/Write - the timestamp of the event - - - - "selection_time" - Read/Write - the time at which the selection ownership was taken - over - - - - - -
- - Generated when the owner of a selection changes. On X11, this - information is only available if the X server supports the XFIXES - extension. - -
- - - <literal>gtk.gdk.GRAB_BROKEN</literal> - - - This Event type is available in PyGTK 2.8 and above. - - -
- - - - - - - - - - "type" - Read - The event type - see the list below in the Description section - - - - "window" - Read/Write - The gtk.gdk.Window the -event occurred on. - - - - "send_event" - Read/Write - True if the event was sent -explicitly. - - - - "keyboard" - Read/Write - if True a keyboard grab was - broken; if False a pointer grab was - broken - - - - "implicit" - Read/Write - if True the broken grab was implicit - - - - "grab_window" - Read - If this event is caused by another grab in the same - application, grab_window contains the - new grab window. Otherwise - grab_window is - None. - - - - - -
- - Generated when a pointer or keyboard grab is broken. On X11, - this happens when the grab window becomes unviewable (i.e. it or one - of its ancestors is unmapped), or if the same application grabs the - pointer or keyboard again. Note that implicit grabs (which are - initiated by button presses) can also cause - gtk.gdk.GRAB_BROKEN events. - -
- - - -
- - - Description - - A gtk.gdk.Event - represents an event from the windowing system. The gtk.gdk.Event - methods are usually not used by applications since the - PyGTK main loop generates signals and invokes the - appropriate signal handler. The event types are: - - - - gtk.gdk.NOTHING - - a special code to indicate a null event. - - - - gtk.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. - - - - gtk.gdk.DESTROY - - the window has been destroyed. - - - - gtk.gdk.EXPOSE - - all or part of the window has become visible and needs to be redrawn. - - - - gtk.gdk.MOTION_NOTIFY - - the pointer (usually a mouse) has moved. - - - - gtk.gdk.BUTTON_PRESS - - a mouse button has been pressed. - - - - gtk.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 gtk.gdk.BUTTON_PRESS event. - - - - gtk.gdk._3BUTTON_PRESS - - a mouse button has been clicked 3 times in a short period of time. Note that each click also generates a gtk.gdk.BUTTON_PRESS event. - - - - gtk.gdk.BUTTON_RELEASE - - a mouse button has been released. - - - - gtk.gdk.KEY_PRESS - - a key has been pressed. - - - - gtk.gdk.KEY_RELEASE - - a key has been released. - - - - gtk.gdk.ENTER_NOTIFY - - the pointer has entered the window. - - - - gtk.gdk.LEAVE_NOTIFY - - the pointer has left the window. - - - - gtk.gdk.FOCUS_CHANGE - - the keyboard focus has entered or left the window. - - - - gtk.gdk.CONFIGURE - - the size, position or stacking order of the window has changed. Note that PyGTK discards these events for gtk.gdk.WINDOW_CHILD windows. - - - - gtk.gdk.MAP - - the window has been mapped. - - - - gtk.gdk.UNMA - - the window has been unmapped. - - - - gtk.gdk.PROPERTY_NOTIFY - - a property on the window has been changed or deleted. - - - - gtk.gdk.SELECTION_CLEAR - - the application has lost ownership of a selection. - - - - gtk.gdk.SELECTION_REQUEST - - another application has requested a selection. - - - - gtk.gdk.SELECTION_NOTIFY - - a selection has been received. - - - - gtk.gdk.PROXIMITY_IN - - an input device has moved into contact with a sensing surface (e.g. a touchscreen or graphics tablet). - - - - gtk.gdk.PROXIMITY_OUT - - an input device has moved out of contact with a sensing surface. - - - - gtk.gdk.DRAG_ENTER - - the mouse has entered the window while a drag is in progress. - - - - gtk.gdk.DRAG_LEAVE - - the mouse has left the window while a drag is in progress - - - - gtk.gdk.DRAG_MOTION - - the mouse has moved in the window while a drag is in progress. - - - - gtk.gdk.DRAG_STATUS - - the status of the drag operation initiated by the window has changed. - - - - gtk.gdk.DROP_START - - a drop operation onto the window has started. - - - - gtk.gdk.DROP_FINISHED - - the drop operation initiated by the window has completed. - - - - gtk.gdk.CLIENT_EVENT - - a message has been received from another application. - - - - gtk.gdk.VISIBILITY_NOTIFY - - the window visibility status has changed. - - - - gtk.gdk.NO_EXPOSE - - indicates that the source region was completely available when parts of a drawable were copied. This is not very useful. - - - - gtk.gdk.SCROLL - - a scroll had occurred for a window - - - - gtk.gdk.WINDOW_STATE - - the window state has changed - - - - gtk.gdk.SETTING - - a setting has changed - - - - gtk.gdk.OWNER_CHANGE - - the owner of a selection has changed. Added in GTK+ - 2.6 - - - - gtk.gdk.GRAB_BROKEN - - a pointer or keyboard grab was broken. Added in GTK+ - 2.8. - - - - - A set of bit-flags is used to indicate which events a window is to - receive. Most of these masks map onto one or more of the event types - above. Use the gtk.Widget.set_events() - method to indicate which events a widget should receive. - - The gtk.gdk.POINTER_MOTION_HINT_MASK is a -special mask which is used to reduce the number of -gtk.gdk.MOTION_NOTIFY events received. Normally a -gtk.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 -gtk.gdk.POINTER_MOTION_HINT_MASK the server will only -send a single gtk.gdk.MOTION_NOTIFY event (which is -marked as a hint) until the application asks for more, by calling the gtk.gdk.Window.get_pointer() -method. The masks are: - - - - gtk.gdk.EXPOSURE_MASK - - - gtk.gdk.POINTER_MOTION_MASK - - - gtk.gdk.POINTER_MOTION_HINT_MASK - - - gtk.gdk.BUTTON_MOTION_MASK - - - gtk.gdk.BUTTON1_MOTION_MASK - - - gtk.gdk.BUTTON2_MOTION_MASK - - - gtk.gdk.BUTTON3_MOTION_MASK - - - gtk.gdk.BUTTON_PRESS_MASK - - - gtk.gdk.BUTTON_RELEASE_MASK - - - gtk.gdk.KEY_PRESS_MASK - - - gtk.gdk.KEY_RELEASE_MASK - - - gtk.gdk.ENTER_NOTIFY_MASK - - - gtk.gdk.LEAVE_NOTIFY_MASK - - - gtk.gdk.FOCUS_CHANGE_MASK - - - gtk.gdk.STRUCTURE_MASK - - - gtk.gdk.PROPERTY_CHANGE_MASK - - - gtk.gdk.VISIBILITY_NOTIFY_MASK - - - gtk.gdk.PROXIMITY_IN_MASK - - - gtk.gdk.PROXIMITY_OUT_MASK - - - gtk.gdk.SUBSTRUCTURE_MASK - - - gtk.gdk.SCROLL_MASK - - - gtk.gdk.ALL_EVENTS_MASK - - - - gtk.gdk.ALL_EVENTS_MASK is a combination of all -the event masks. - - - - - Constructor - - - gtk.gdk.Event - type - - - - type : a - event type - see the Description - above - - - Returns : - a newly-allocated gtk.gdk.Event. - - - - - This constructor is available in PyGTK 2.2 and above. - - - Creates a new gtk.gdk.Event of the -given type. All fields are set to 0. - - - - - Methods - - - gtk.gdk.Event.put - - - put - - - The put() method appends a copy of the -given event onto the tail of the event queue. - - - - - gtk.gdk.Event.copy - - - copy - - - - Returns : - a copy of the event - - - - The copy() method copies the event, - copying or incrementing the reference count of the resources - associated with it (e.g. windows and strings). - - - - - gtk.gdk.Event.free - - - free - - - - This method is deprecated and should not be used since it may -crash your application. - - - The free() method frees the event, -freeing or decrementing any resources associated with it. Note that this -method should only be called on gtk.gdk.Event objects -returned from methods or functions such as gtk.gdk.event_peek(), -gtk.gdk.event_get(), -gtk.gdk.event_get_graphics_expose() -and copy(). - - - - - gtk.gdk.Event.get_time - - - get_time - - - - Returns : - the time stamp field from the -event - - - - The get_time() method returns the time -stamp from the event, if there is one; otherwise returns 0. - - - - - gtk.gdk.Event.get_state - - - get_state - - - - - Returns : - the modifier state - - - - - This method is available in PyGTK 2.4 and above. - - - The get_state() method returns the - value of the modifier "state" field. If the event has no "state" field - the empty state value (0) is returned. The "state" field contains a - modifier type: a combination of the . - - - - - <literal>gtk.gdk.NOTHING</literal> - <literal>gtk.gdk.DELETE</literal> - <literal>gtk.gdk.DESTROY</literal> - <literal>gtk.gdk.MAP</literal> - <literal>gtk.gdk.UNMAP</literal> - <literal>gtk.gdk.NO_EXPOSE</literal> - -
- These events do not have any additional attributes. -
-
- - - gtk.gdk.Event.get_coords - - - get_coords - - - - - Returns : - a tuple containing the event window x and y -coordinates or an empty tuple if the event did not deliver event window -coordinates - - - - The get_coords() method returns a tuple -containing the x and y coordinates of an event relative to the event gtk.gdk.Window or an -empty tuple if the event did not deliver event window coordinates. - - - - - gtk.gdk.Event.get_root_coords - - - get_root_coords - - - - - Returns : - a tuple containing the root window x and y -coordinates or an empty tuple if the event did not deliver root window -coordinates - - - - The get_root_coords() method returns a -tuple containing the x and y coordinates from an event relative to the root -window or an empty tuple if the event did not deliver root window -coordinates. - - - - - gtk.gdk.Event.get_axis - - - get_axis - axis_use - - - - axis_use : - the axis use to look for - - - Returns : - the value found or None if -the axis was not found. - - - - The get_axis() method returns the axis -value for the axis use specified by axis_use from an -event structure. The value of axis_use must be one -of: - - - - gtk.gdk.AXIS_IGNORE - - the axis is ignored. - - - - gtk.gdk.AXIS_X - - the axis is used as the x axis. - - - - gtk.gdk.AXIS_Y - - the axis is used as the y axis. - - - - gtk.gdk.AXIS_PRESSURE - - the axis is used for pressure information. - - - - gtk.gdk.AXIS_XTILT - - the axis is used for x tilt information. - - - - gtk.gdk.AXIS_YTILT - - the axis is used for y tilt information. - - - - gtk.gdk.AXIS_WHEEL - - the axis is used for wheel information. - - - - gtk.gdk.AXIS_LAST - - a constant equal to the numerically highest axis -value. - - - - - If an axis with the specified axis use is not found, this method -returns None. - - - - - gtk.gdk.Event.set_screen - - - set_screen - screen - - - - screen : - a gtk.gdk.Screen - - - - - This method is available in PyGTK 2.2 and above. - - - The set_screen() method sets the gtk.gdk.Screen to -the value of screen. The event must have been -allocated by PyGTK, for instance, by the gtk.gdk.Event.copy() -method. - - - - - gtk.gdk.Event.get_screen - - - get_screen - - - - - Returns : - the screen for the event - - - - - This method is available in PyGTK 2.2 and above. - - - The get_screen() method returns the -gtk.gdk.Screen -for the event. The screen is typically the screen for the event window, but -for events such as mouse events, it is the screen where the the pointer was -when the event occurs - that is, the screen that has the root window for the -event. - - - -
- - - Functions - - - gtk.gdk.events_pending - - - gtk.gdk.events_pending - - - - - - Returns : - True if any events are -pending - - - - The gtk.gdk.events_pending() function -returns True if any events are ready to be -processed. - - - - - gtk.gdk.event_peek - - - gtk.gdk.event_peek - - - - - - Returns : - a copy of the first gtk.gdk.Event on the -event queue or None if there is no event in the -queue. - - - - The gtk.gdk.event_peek() function returns a -copy of the first gtk.gdk.Event on the -event queue or None if there is no event on the event -queue. - - - - - gtk.gdk.event_get - - - gtk.gdk.event_get - - - - - - Returns : - the next gtk.gdk.Event to be -processed, or None if no events are -pending. - - - - The gtk.gdk.event_get() function returns -the next gtk.gdk.Event to be -processed or None if no events are available. - - - - - gtk.gdk.event_get_graphics_expose - - - gtk.gdk.event_get_graphics_expose - window - - - - - window : - a gtk.gdk.Window - - - Returns : - an expose gtk.gdk.Event if a -GraphicsExpose was received, or None -if a NoExpose event was received. - - - - The gtk.gdk.event_get_graphics_expose() -function waits for and returns returns an expose gtk.gdk.Event if a -GraphicsExpose was received, or None -if a NoExpose event was received. - - - - - gtk.gdk.set_show_events - - - gtk.gdk.set_show_events - show_events - - - - - show_events : - if True output event debug -information - - - - The gtk.gdk.set_show_events() function sets -the debug events flag if show_events is -True. Otherwise the debug events flag is unset. - - - - - gtk.gdk.get_show_events - - - gtk.gdk.get_show_events - - - - - - Returns : - True if the debug events -flag is set. - - - - The gtk.gdk.get_show_events() function -returns the setting of the internal debug events flag. - - - - - gtk.gdk.event_handler_set - - - gtk.gdk.event_handler_set - func - dataNone - - - - - func : - the function to call to handle events from GDK - or None. - - - data : - user data to pass to the function. - - - - - This function is available in PyGTK 2.10 and above. - - - The gtk.gdk.event_handler_set() function - specifies func as the function to call to - handle all events from GDK. data is the - optional user data to pass to func. - - The signature of func is: - - - def func(event, user_data): - - - where event is the gtk.gdk.Event - and user_data is - data. - - - - - -
diff --git a/docs/reference/pygtk-gdkfont.xml b/docs/reference/pygtk-gdkfont.xml deleted file mode 100644 index 63d79c18..00000000 --- a/docs/reference/pygtk-gdkfont.xml +++ /dev/null @@ -1,521 +0,0 @@ - - - - - gtk.gdk.Font - 3 - PyGTK Docs - - - - gtk.gdk.Font - - - - Synopsis - - - gtk.gdk.Font - gobject.GBoxed - - __init__ - font_name - - - id - - - string_width - string - - - width - text - text_length-1 - - - text_width_wc - text - text_length - - - char_width - character - - - char_width_wc - character - - - string_measure - string - - - measure - text - text_length-1 - - - char_measure - character - - - string_height - string - - - height - text - text_length-1 - - - char_height - character - - - extents - text - text_length - lbearing - rbearing - width - ascent - descent - - - text_extents_wc - text - text_length - lbearing - rbearing - width - ascent - descent - - - string_extents - string - lbearing - rbearing - width - ascent - descent - - - - - - Constructor - - - __init__ - font_name - - - - font_name : - a const-gchar* - - - Returns : - a GdkFont* - - - - - - - - Methods - - - gtk.gdk.Font.id - - - id - - - - Returns : - a gint - - - - - - - gtk.gdk.Font.string_width - - - string_width - string - - - - string : - a const-gchar* - - - Returns : - a gint - - - - - - - gtk.gdk.Font.width - - - width - text - text_length-1 - - - - text : - a const-gchar* - - - text_length : - a gint - - - Returns : - a gint - - - - - - - gtk.gdk.Font.text_width_wc - - - text_width_wc - text - text_length - - - - text : - a const-GdkWChar* - - - text_length : - a gint - - - Returns : - a gint - - - - - - - gtk.gdk.Font.char_width - - - char_width - character - - - - character : - a gchar - - - Returns : - a gint - - - - - - - gtk.gdk.Font.char_width_wc - - - char_width_wc - character - - - - character : - a GdkWChar - - - Returns : - a gint - - - - - - - gtk.gdk.Font.string_measure - - - string_measure - string - - - - string : - a const-gchar* - - - Returns : - a gint - - - - - - - gtk.gdk.Font.measure - - - measure - text - text_length-1 - - - - text : - a const-gchar* - - - text_length : - a gint - - - Returns : - a gint - - - - - - - gtk.gdk.Font.char_measure - - - char_measure - character - - - - character : - a gchar - - - Returns : - a gint - - - - - - - gtk.gdk.Font.string_height - - - string_height - string - - - - string : - a const-gchar* - - - Returns : - a gint - - - - - - - gtk.gdk.Font.height - - - height - text - text_length-1 - - - - text : - a const-gchar* - - - text_length : - a gint - - - Returns : - a gint - - - - - - - gtk.gdk.Font.char_height - - - char_height - character - - - - character : - a gchar - - - Returns : - a gint - - - - - - - gtk.gdk.Font.extents - - - extents - text - text_length - lbearing - rbearing - width - ascent - descent - - - - text : - a const-gchar* - - - text_length : - a gint - - - lbearing : - a gint* - - - rbearing : - a gint* - - - width : - a gint* - - - ascent : - a gint* - - - descent : - a gint* - - - - - - - gtk.gdk.Font.text_extents_wc - - - text_extents_wc - text - text_length - lbearing - rbearing - width - ascent - descent - - - - text : - a const-GdkWChar* - - - text_length : - a gint - - - lbearing : - a gint* - - - rbearing : - a gint* - - - width : - a gint* - - - ascent : - a gint* - - - descent : - a gint* - - - - - - - gtk.gdk.Font.string_extents - - - string_extents - string - lbearing - rbearing - width - ascent - descent - - - - string : - a const-gchar* - - - lbearing : - a gint* - - - rbearing : - a gint* - - - width : - a gint* - - - ascent : - a gint* - - - descent : - a gint* - - - - - - - diff --git a/docs/reference/pygtk-gdkgc.xml b/docs/reference/pygtk-gdkgc.xml deleted file mode 100644 index 17a71798..00000000 --- a/docs/reference/pygtk-gdkgc.xml +++ /dev/null @@ -1,1622 +0,0 @@ - - - - - - gtk.gdk.GC - objects to encapsulate drawing properties. - - - - Synopsis - - - gtk.gdk.GC - gobject.GObject - - gtk.gdk.GC - drawable - 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> - - - - - - set_values - 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> - - - set_foreground - color - - - set_background - color - - - set_function - function - - - set_fill - fill - - - set_tile - tile - - - set_stipple - stipple - - - set_ts_origin - x - y - - - set_clip_origin - x - y - - - set_clip_mask - mask - - - set_clip_rectangle - rectangle - - - set_clip_region - region - - - set_subwindow - mode - - - set_exposures - exposures - - - set_line_attributes - line_width - line_style - cap_style - join_style - - - set_dashes - dash_offset - dash_list - - - offset - x_offset - y_offset - - - copy - src_gc - - - set_colormap - colormap - - - get_colormap - - - set_rgb_fg_color - color - - - set_rgb_bg_color - color - - - get_screen - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.gdk.GC - - - - - - Attributes - -
- - - - - - - - - - "background" - Read-Write - The background gtk.gdk.Color. - - - - "cap_style" - Read-Write - The style of drawing the ends of lines - one of: -gtk.gdk.CAP_NOT_LAST, -gtk.gdk.CAP_BUTT, gtk.gdk.CAP_ROUND or -gtk.gdk.CAP_PROJECTING. - - - - "clip_mask" - Read-Write - A gtk.gdk.Pixmap -bitmap used to clip the drawing operation. - - - - "clip_x_origin" - Read-Write - The x origin of the clip mask. - - - - "clip_y_origin" - Read-Write - The y origin of the clip mask. - - - - "fill" - Read-Write - The fill style - one of: -gtk.gdk.SOLID, gtk.gdk.TILED, -gtk.gdk.STIPPLED or -gtk.gdk.OPAQUE_STIPPLED. - - - - "font" - Read-Write - The default font (deprecated and unused) - - - - "foreground" - Read-Write - The foreground gtk.gdk.Color. - - - - "function" - Read-Write - A bitwise operation type to combine source and -destination pixels - one of: gtk.gdk.COPY, -gtk.gdk.INVERT, gtk.gdk.XOR, -gtk.gdk.CLEAR, gtk.gdk.AND, -gtk.gdk.AND_REVERSE, -gtk.gdk.AND_INVERT, gtk.gdk.NOOP, -gtk.gdk.OR, gtk.gdk.EQUIV, -gtk.gdk.OR_REVERSE, -gtk.gdk.COPY_INVERT, -gtk.gdk.OR_INVERT, gtk.gdk.NAND, -gtk.gdk.NOR or gtk.gdk.SET. - - - - "graphics_exposures" - Read-Write - If True graphics exposures are -enabled. - - - - "join_style" - Read-Write - The style used to join lines - one of: -gtk.gdk.JOIN_MITER, gtk.gdk.JOIN_ROUND -or gtk.gdk.JOIN_BEVEL. - - - - "line_style" - Read-Write - The style of drawing lines - one of: -gtk.gdk.LINE_SOLID, -gtk.gdk.LINE_ON_OFF_DASH or -gtk.gdk.LINE_DOUBLE_DASH. - - - - "line_width" - Read-Write - The width of a line in pixels. - - - - "stipple" - Read-Write - The gtk.gdk.Pixmap -bitmap used to stipple the background. - - - - "sub_window" - Read-Write - The mode of drawing in a gtk.gdk.Window with -subwindows - one of: gtk.gdk.CLIP_BY_CHILDREN or -gtk.gdk.INCLUDE_INFERIORS. - - - - "tile" - Read-Write - The gtk.gdk.Pixmap used -to tile the background. - - - - "ts_x_origin" - Read-Write - The x origin of the tile or stipple. - - - - "ts_y_origin" - Read-Write - The y origin of the tile or stipple. - - - - - -
- -
- - - Description - - All drawing operations in PyGTK take a graphics -context (gtk.gdk.GC) argument -(See the gtk.gdk.Drawable -description). 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 gtk.gdk.Drawable.new_gc(), -or can be set one-by-one using functions such as set_foreground() -or by setting a gtk.gdk.GC attribute. A -few of the values in the gtk.gdk.GC, such as the -dash pattern, can only be set by the latter method. - - - - - Constructor - - - gtk.gdk.GC - drawable - 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> - - - - drawable : - A gtk.gdk.Drawable -(gtk.gdk.Window or -gtk.gdk.Pixmap) - - - foreground : - the foreground gtk.gdk.Color - - - background : - the background gtk.gdk.Color - - - font : - a font (deprecated and -ignored) - - - function : - the bitwise operator used to combine the existing -pixel value and a new pixel value - usually one of: -gtk.gdk.COPY, gtk.gdk.XOR or -gtk.gdk.INVERT. - - - fill : - the fill style - one of: -gtk.gdk.SOLID, gtk.gdk.TILED, -gtk.gdk.STIPPLED, -gtk.gdk.OPAQUE_STIPPLED - - - tile : - a gtk.gdk.Pixmap used -for tiling the background - - - stipple : - a gtk.gdk.Pixmap used -for stippling the background - - - clip_mask : - a gtk.gdk.Pixmap of -depth 1 used to mask pixels to be drawn - - - subwindow_mode : - the mode of drawing on subwindows in a gtk.gdk.Window -- one of: gtk.gdk.CLIP_BY_CHILDREN or -gtk.gdk.INCLUDE_INFERIORS - - - ts_x_origin : - the X coordinate of the origin of -tile or -stipple - - - ts_y_origin : - the Y coordinate of the origin of -tile or -stipple - - - clip_x_origin : - the X coordinate of the origin of -clip_mask - - - clip_y_origin : - the Y coordinate of the origin of -clip_mask - - - graphics_exposures : - if True graphics exposures are -enabled for calls to the gtk.gdk.Drawable.draw_drawable() -method. - - - line_width : - the line width in pixels - - - line_style : - the line style - one of: -gtk.gdk.LINE_SOLID, -gtk.gdk.LINE_ON_OFF_DASH, -gtk.gdk.LINE_DOUBLE_DASH - - - cap_style : - the style of line ends - one of: -gtk.gdk.CAP_NOT_LAST, -gtk.gdk.CAP_BUTT, gtk.gdk.CAP_ROUND, -gtk.gdk.CAP_PROJECTING - - - join_style : - the style of line joins - one of: -gtk.gdk.JOIN_MITER, -gtk.gdk.JOIN_ROUND, -gtk.gdk.JOIN_BEVEL - - - Returns : - a new gtk.gdk.GC -object - - - - Creates a new gtk.gdk.GC object for -the gtk.gdk.Drawable -specified by drawable with the optional attributes as -specified by the arguments. The drawable parameter must be specified but the -rest of the parameters are optional. Any attributes not specified will use a -default value. This is an alternative to the gtk.gdk.Drawable.new_gc() -method. Since there are a large number of optional attribute parameters it's -probably best to specify the attribute values using keywords. - - - - - Methods - - - - - gtk.gdk.GC.set_values - - - set_values - values - 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> - - - - foreground : - the foreground gtk.gdk.Color - - - background : - the background gtk.gdk.Color - - - font : - a font (deprecated and -ignored) - - - function : - the bitwise operator used to combine the -existing pixel value and a new pixel value - usually one of: -gtk.gdk.COPY, gtk.gdk.XOR or -gtk.gdk.INVERT. - - - fill : - the fill style - one of: -gtk.gdk.SOLID, gtk.gdk.TILED, -gtk.gdk.STIPPLED, -gtk.gdk.OPAQUE_STIPPLED - - - tile : - a gtk.gdk.Pixmap used -for tiling the background - - - stipple : - a gtk.gdk.Pixmap used -for stippling the background - - - clip_mask : - a gtk.gdk.Pixmap of -depth 1 used to mask pixels to be drawn - - - subwindow_mode : - the mode of drawing on subwindows in a -gtk.gdk.Window - one of: gtk.gdk.CLIP_BY_CHILDREN or -gtk.gdk.INCLUDE_INFERIORS - - - ts_x_origin : - the X coordinate of the origin of -tile or -stipple - - - ts_y_origin : - the Y coordinate of the origin of -tile or -stipple - - - clip_x_origin : - the X coordinate of the origin of -clip_mask - - - clip_y_origin : - the Y coordinate of the origin of -clip_mask - - - graphics_exposures : - if True graphics exposures -are enabled for calls to the gtk.gdk.Drawable.draw_drawable() -method. - - - line_width : - the line width in pixels - - - line_style : - the line style - one of: -gtk.gdk.LINE_SOLID, -gtk.gdk.LINE_ON_OFF_DASH, -gtk.gdk.LINE_DOUBLE_DASH - - - cap_style : - the style of line ends - one of: -gtk.gdk.CAP_NOT_LAST, -gtk.gdk.CAP_BUTT, gtk.gdk.CAP_ROUND, -gtk.gdk.CAP_PROJECTING - - - join_style : - the style of line joins - one of: -gtk.gdk.JOIN_MITER, -gtk.gdk.JOIN_ROUND, -gtk.gdk.JOIN_BEVEL - - - - The set_values() method sets the -attributes of a graphics context in bulk using the optional parameters. -Since there are a large number of attribute parameters it's probably best to -specify the attribute values using keywords. Any attributes not specified -will be left as is. - - - - - gtk.gdk.GC.set_foreground - - - set_foreground - color - - - - color : - the new foreground gtk.gdk.Color - - - - The set_foreground() method sets the -foreground gtk.gdk.Color to the -value specified by color. - - - - - gtk.gdk.GC.set_background - - - set_background - color - - - - color : - the new background gtk.gdk.Color - - - - The set_background() method sets the -background gtk.gdk.Color to the -value specified by color. - - - - - gtk.gdk.GC.set_function - - - set_function - function - - - - function : - the bitwise operator used to combine the -existing pixel value and a new pixel value - usually one of: -gtk.gdk.COPY, gtk.gdk.XOR or -gtk.gdk.INVERT. - - - - The set_function() method sets the -function attribute to the value specified by -function. The value of -function must be one of: - - - - gtk.gdk.COPY - - - gtk.gdk.INVERT - - - gtk.gdk.XOR - - - gtk.gdk.CLEAR - - - gtk.gdk.AND - - - gtk.gdk.AND_REVERSE. - - - gtk.gdk.AND_INVERT - - - gtk.gdk.NOOP - - - gtk.gdk.OR - - - gtk.gdk.EQUIV - - - gtk.gdk.OR_REVERSE - - - gtk.gdk.COPY_INVERT - - - gtk.gdk.OR_INVERT - - - gtk.gdk.NAND - - - gtk.gdk.NOR - - - gtk.gdk.SET - - - - Only a couple of these values are usually useful. For colored -images, only gtk.gdk.COPY, gtk.gdk.XOR -and gtk.gdk.INVERT are generally useful. For bitmaps, -gtk.gdk.AND and gtk.gdk.OR are also -useful. - - - - - gtk.gdk.GC.set_fill - - - set_fill - fill - - - - fill : - the new fill mode - - - - The set_fill() method sets the fill -mode for the graphics context to the value specified by -fill. The value of fill must -be one of: - - - - gtk.gdk.SOLID - - draw with the foreground color. - - - - gtk.gdk.TILED - - draw with a tiled pixmap. - - - - gtk.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. - - - - gtk.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. - - - - - - - - - - gtk.gdk.GC.set_tile - - - set_tile - tile - - - - tile : - a gtk.gdk.Pixmap - - - - The set_tile() method sets the gtk.gdk.Pixmap -specified by tile to be used for filling the -background when the fill mode is gtk.gdk.TILED. - - - - - gtk.gdk.GC.set_stipple - - - set_stipple - stipple - - - - stipple : - a gtk.gdk.Pixmap bitmap - - - - The set_stipple() method sets the gtk.gdk.Pixmap -bitmap specified by stipple to be used for stippling -the background. stipple will only be used if the fill -mode is gtk.gdk.STIPPLED or -gtk.gdk.OPAQUE_STIPPLED. - - - - - gtk.gdk.GC.set_ts_origin - - - set_ts_origin - x - y - - - - x : - the x origin of the tile or -stipple - - - y : - the y origin of the tile or -stipple - - - - The set_ts_origin() method sets the -origin of the tile or stipple to the value specified by -x and y. The tile or stipple -will be aligned such that the upper left corner of the tile or stipple will -coincide with this point. - - - - - gtk.gdk.GC.set_clip_origin - - - set_clip_origin - x - y - - - - x : - the x origin of the clip -mask - - - y : - the y origin of the clip -mask - - - - The set_clip_origin() method sets the -origin of the clip mask to the value specified by x -and y. The coordinates are interpreted relative to -the upper-left corner of the destination drawable of the current -operation. - - - - - gtk.gdk.GC.set_clip_mask - - - set_clip_mask - mask - - - - mask : - a gtk.gdk.Pixmap - - - - The set_clip_mask() method sets the -clip mask (a gtk.gdk.Pixmap bit -map) to the value specified by mask. The clip mask is -interpreted relative to the clip origin. See the set_clip_origin() -method. - - - - - gtk.gdk.GC.set_clip_rectangle - - - set_clip_rectangle - rectangle - - - - rectangle : a -gtk.gdk.Rectangle -to use for clipping - - - - The set_clip_rectangle() method sets -the clip mask for the graphics context from the gtk.gdk.Rectangle -specified by rectangle and sets the clip origin to -(0, 0). The clip origin can be changed using the set_clip_origin() -method. - - - - - gtk.gdk.GC.set_clip_region - - - set_clip_region - region - - - - region : - a gtk.gdk.Region - - - - - This method is available in PyGTK 2.10 and above. - - - The set_clip_region() method sets the - clip mask for a graphics context from the gtk.gdk.Region - specified by region. The clip mask is - interpreted relative to the clip origin. (See the set_clip_origin() - method). - - - - - gtk.gdk.GC.set_subwindow - - - set_subwindow - mode - - - - mode : - the new subwindow mode - - - - The set_subwindow() method sets the -mode of drawing on subwindows when drawing on a gtk.gdk.Window to -the value specified by mode. The value of mode must -be one of: - - - - gtk.gdk.CLIP_BY_CHILDREN - - only draw onto the window itself not the -subwindows. - - - - gtk.gdk.INCLUDE_INFERIORS - - draw onto the window and child windows. - - - - - - - - - - gtk.gdk.GC.set_exposures - - - set_exposures - exposures - - - - exposures : - if True exposure events will -be generated for non-visible areas - - - - The set_exposures() method sets an -attribute that determines if copying non-visible portions of a drawable -using this graphics context will generate exposure events for the -corresponding regions of the destination drawable. If -exposures is True exposure events -will be generated for non-visible areas. See the gtk.gdk.Drawable.draw_drawable() -method. - - - - - gtk.gdk.GC.set_line_attributes - - - set_line_attributes - line_width - line_style - cap_style - join_style - - - - line_width : - the new line width in -pixels - - - line_style : - the new line style - - - cap_style : - the new line end style - - - join_style : - the new line join style - - - - The set_line_attributes() method sets -the attributes to be used when drawing a line using the graphics context to -the values specified by line_width, -line_style, cap_style and -join_style. The value of -line_style must be one of: - - - - gtk.gdk.LINE_SOLID - - Lines are drawn solid. - - - - gtk.gdk.LINE_ON_OFF_DASH - - Lines are drawn dashed where even segments are drawn -but odd segments are not drawn. - - - - gtk.gdk.LINE_DOUBLE_DASH - - Lines are drawn dashed where even segments are drawn -normally but odd segments are drawn in the background color if the fill -style is gtk.gdk.SOLID, or in the background color masked -by the stipple if the fill style is -gtk.gdk.STIPPLED. - - - - - The value of cap_style must be one of: - - - - gtk.gdk.CAP_NOT_LAST - - The same as gtk.gdk.CAP_BUTT for -lines of non-zero width but for zero width lines, the final point on the -line will not be drawn. - - - - gtk.gdk.CAP_BUTT - - The ends of the lines are drawn squared off and -extending to the coordinates of the end point. - - - - gtk.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. - - - - gtk.gdk.CAP_PROJECTING - - The ends of the lines are drawn squared off and -extending half the width of the line beyond the end point. - - - - - The value of join_style must be one of: - - - - gtk.gdk.JOIN_MITER - - The sides of each line are extended to meet at an -angle. - - - - gtk.gdk.JOIN_ROUND - - The sides of the two lines are joined by a circular -arc. - - - - gtk.gdk.JOIN_BEVEL - - The sides of the two lines are joined by a straight -line which makes an equal angle with each line. - - - - - - - - - - gtk.gdk.GC.set_dashes - - - set_dashes - dash_offset - dash_list - n - - - - dash_offset : - the index of the length in -dash_list to use as the firstst -dash - - - dash_list : - the tuple or list of dash lengths in -pixels - - - - The set_dashes() method sets the -pattern for drawing dashed lines using the tuple or list of dash lengths -specified by dash_list with the index of the starting -dash length specified by dash_offset. The dashes are -drawn starting with the number of pixels at the offset position; then the -next number of pixels is skipped; and then the next number is drawn; and so -on rotating through all the dash_list numbers and -starting over when the end is reached. For example, if -dash_list is (2, 4, 8, 16) and the offset is 1, the -dashes will be drawn as: draw 4 pixels, skip 8 pixels, draw 16 pixels, skip -2 pixels, draw 4 pixels and so on. - - - - - gtk.gdk.GC.offset - - - offset - x_offset - y_offset - - - - x_offset : - the amount by which to offset the graphics context in the X -direction - - - y_offset : - the amount by which to offset the graphics context in the Y -direction - - - - The offset() method sets offset -attributes such as the clip and tile-stipple origins of the graphics context so that -drawing at x - x_offset, y - -y_offset with the offset graphics context has the same effect as -drawing at x, y with the original graphics context. - - - - - gtk.gdk.GC.copy - - - copy - src_gc - - - - src_gc : - the gtk.gdk.GC to -copy - - - - The copy() method copies the attributes -of the gtk.gdk.GC -specified by src_gc into this graphics context. - - - - - gtk.gdk.GC.set_colormap - - - set_colormap - colormap - - - - colormap : - a gtk.gdk.Colormap - - - - The set_colormap() method sets the -colormap for the graphics context to the specified -colormap. The depth of the colormap's visual must -match the depth of the drawable for which the graphics context was -created. - - - - - gtk.gdk.GC.get_colormap - - - get_colormap - - - - Returns : - the colormap used by the graphics -context - - - - The get_colormap() method returns the -colormap for the graphics context, if it exists. A graphics context will -have a colormap if the drawable for which it was created has a colormap, or -if a colormap was set explicitly with the set_colormap() -method. - - - - - gtk.gdk.GC.set_rgb_fg_color - - - set_rgb_fg_color - color - - - - color : - an unallocated gtk.gdk.Color. - - - - The set_rgb_fg_color() method sets the -foreground color of a graphics context using the specified unallocated -color. The pixel value for -color will be determined using GdkRGB. If the -colormap for the graphics context has not previously been initialized for -GdkRGB, then for pseudo-color colormaps (colormaps with a small modifiable -number of colors), a colorcube will be allocated in the colormap. Calling -this method for a graphics context without a colormap is an error. - - - - - gtk.gdk.GC.set_rgb_bg_color - - - set_rgb_bg_color - color - - - - color : - an unallocated gtk.gdk.Color. - - - - The set_rgb_bg_color() method sets the -background color of a graphics context using the specified unallocated -color. The pixel value for -color will be determined using GdkRGB. If the -colormap for the graphics context has not previously been initialized for -GdkRGB, then for pseudo-color colormaps (colormaps with a small modifiable -number of colors), a colorcube will be allocated in the colormap. Calling -this method for a graphics context without a colormap is an error. - - - - - gtk.gdk.GC.get_screen - - - get_screen - - - - - Returns : - the gtk.gdk.Screen - for the gc - - - - - This method is available in PyGTK 2.2. and above. - - - The get_screen() method returns the -gtk.gdk.Screen -on which the gc was created. - - - - - -
diff --git a/docs/reference/pygtk-gdkimage.xml b/docs/reference/pygtk-gdkimage.xml deleted file mode 100644 index 81b111cb..00000000 --- a/docs/reference/pygtk-gdkimage.xml +++ /dev/null @@ -1,281 +0,0 @@ - - - - - - gtk.gdk.Image - an area for bit-mapped graphics stored on the X Windows -client. - - - - Synopsis - - - gtk.gdk.Image - gobject.GObject - - gtk.gdk.Image - type - visual - width - height - - - put_pixel - x - y - pixel - - - get_pixel - x - y - - - set_colormap - colormap - - - get_colormap - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.gdk.Image - - - - - - Description - - The gtk.gdk.Image type -represents an area for drawing graphics. It has now been superseded to a -large extent by the much more flexible RGB methods (see gtk.gdk.Drawable). - - - - - Constructor - - - gtk.gdk.Image - type - visual - width - height - - - - type : - a gtk.gdk.Image -type - - - visual : - a gtk.gdk.Visual - - - width : - the width in pixels of the -image - - - height : - the height in pixels of the -image - - - Returns : - a new gtk.gdk.Image -object - - - - Creates a new gtk.gdk.Image object -of the specified type, width -and height and using the gtk.gdk.Visual -specified by visual. The value of -type must be one of: - - - - gtk.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. - - - - gtk.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. - - - - gtk.gdk.IMAGE_FASTEST - - Specifies that gtk.gdk.IMAGE_SHARED should be tried -first, and if that fails then gtk.gdk.IMAGE_NORMAL will be used. - - - - - Usually using gtk.gdk.IMAGE_FASTEST is the best -choice. - - - - - Methods - - - gtk.gdk.Image.put_pixel - - - put_pixel - x - y - pixel - - - - x : - the x coordinate of the pixel to -set. - - - y : - the y coordinate of the pixel to -set. - - - pixel : - the pixel value to set. - - - - The put_pixel() method sets the value -of the pixel in the image at the location specified by -x and y to the value specified -by pixel. - - - - - gtk.gdk.Image.get_pixel - - - get_pixel - x - y - - - - x : - the x coordinate of the pixel to -get. - - - y : - the y coordinate of the pixel to -get. - - - Returns : - the pixel value at the image -location - - - - The get_pixel() method returns the -value of the pixel at the image location specified by -x and y. - - - - - gtk.gdk.Image.set_colormap - - - set_colormap - colormap - - - - colormap : - a gtk.gdk.Colormap - - - - The set_colormap() method sets the -colormap for the image to the specified colormap. -Normally there's no need to use this method since images are created with -the correct colormap if you get the image from a drawable. If you create the -image from scratch, use the colormap of the drawable you intend to render -the image to. - - - - - gtk.gdk.Image.get_colormap - - - get_colormap - - - - Returns : - the colormap for the image - - - - The get_colormap() method returns the -colormap for a given image, if it exists. An image will have a colormap if -the drawable from which it was created has a colormap, or if a colormap was -set explicitly with the set_colormap() -method. - - - - - - diff --git a/docs/reference/pygtk-gdkkeymap.xml b/docs/reference/pygtk-gdkkeymap.xml deleted file mode 100644 index adce874d..00000000 --- a/docs/reference/pygtk-gdkkeymap.xml +++ /dev/null @@ -1,858 +0,0 @@ - - - - - - gtk.gdk.Keymap - an object containing mappings of keys to key -values. - - - - Synopsis - - - gtk.gdk.Keymap - gobject.GObject - - lookup_key - keycode - group - level - - - translate_keyboard_state - keycode - state - group - - - get_entries_for_keyval - keyval - - - get_entries_for_keycode - hardware_keycode - - - get_direction - - - - -Functions - - - gtk.gdk.keymap_get_default - - - gtk.gdk.keymap_get_for_display - display - - gtk.gdk.keyval_name - keyval - - gtk.gdk.keyval_from_name - keyval_name - - gtk.gdk.keyval_convert_case - symbol - - gtk.gdk.keyval_to_upper - keyval - - gtk.gdk.keyval_to_lower - keyval - - gtk.gdk.keyval_is_upper - keyval - - gtk.gdk.keyval_is_lower - keyval - - gtk.gdk.keyval_to_unicode - keyval - - gtk.gdk.unicode_to_keyval - wc - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.gdk.Keymap - - - - - - Signal Prototypes - - - - "direction-changed" - - callback - gdkkeymap - user_param1 - ... - - - - - "keys-changed" - - callback - gdkkeymap - user_param1 - ... - - - - - - - - - Description - - A gtk.gdk.Keymap -defines the translation from keyboard state (including a hardware key, a -modifier mask, and active keyboard group) to a keyval. This translation has -two phases. The first phase is to determine the effective keyboard group and -level for the keyboard state; the second phase is to look up the -keycode/group/level triplet in the keymap and see what keyval it corresponds -to. One gtk.gdk.Keymap -object exists for each user display. PyGTK supports only -one display, so gtk.gdk.keymap_get_default()() -returns the singleton gtk.gdk.Keymap. - - A keymap is a mapping from a Keymap key to key values. You can -think of a Keymap key as a representation of a symbol printed on a physical -keyboard key. That is, it contains three pieces of information. First, it -contains the hardware keycode; this is an identifying number for a physical -key. Second, it contains the level of the key. The level indicates which -symbol on the key will be used, in a vertical direction. So on a standard US -keyboard, the key with the number "1" on it also has the exclamation point -("!") character on it. The level indicates whether to use the "1" or the "!" -symbol. The letter keys are considered to have a lowercase letter at level -0, and an uppercase letter at level 1, though only the uppercase letter is -printed. Third, the Keymap key contains a group; groups are not used on -standard US keyboards, but are used in many other countries. On a keyboard -with groups, there can be 3 or 4 symbols printed on a single key. The group -indicates movement in a horizontal direction. Usually groups are used for -two different languages. In group 0, a key might have two English -characters, and in group 1 it might have two Hebrew characters. The Hebrew -characters will be printed on the key next to the English characters. - - - - - - Methods - - - gtk.gdk.Keymap.lookup_key - - - lookup_key - keycode - group - level - - - - keycode : - the hardware keycode. - - - group : - the key group - - - level : - the key level - - - Returns : - a keyval, or 0 if none was mapped to the - (keycode, group, - level) triplet. - - - - - This method is available in PyGTK 2.4 and above. - - - The lookup_key() method returns the -keyval mapped to the specified (keycode, -group, level) triplet. This -method returns 0 if no keyval is found. For normal user input, you want to -use the translate_keyboard_state() -method instead of this method, since the effective group or level may not be -the same as the current keyboard state. - - The parameters to this method are: - - - - keycode : - - the hardware keycode. This is an identifying number for -a physical key. - - - - group : - - indicates movement in a horizontal direction. Usually -groups are used for two different languages. In group 0, a key might have -two English characters, and in group 1 it might have two Hebrew -characters. The Hebrew characters will be printed on the key next to the -English characters. - - - - level : - - indicates which symbol on the key will be used, in a -vertical direction. So on a standard US keyboard, the key with the number -"1" on it also has the exclamation point ("!") character on it. The level -indicates whether to use the "1" or the "!" symbol. The letter keys are -considered to have a lowercase letter at level 0, and an uppercase letter at -level 1, though only the uppercase letter is printed. - - - - - - - - - - gtk.gdk.Keymap.translate_keyboard_state - - - translate_keyboard_state - keycode - state - group - - - - keycode : - a keycode - - - state : - a modifier state - - - group : - an active keyboard group - - - Returns : - - a 4-tuple containing the keyval, the effective group, -the level and the modifiers that were used to determine the group or -level - - - - - - This method is available in PyGTK 2.4 and above. - - - The translate_keyboard_state() method - translates the contents of a keyboard gtk.gdk.Event - (specified by keycode, - state and group) into a - keyval, effective group, level and consumed modifiers that affected - the translation (and are unavailable for application use) which are - returned in a 4-tuple. See the lookup_key() - method for an explanation of groups and levels. The effective group is - the group that was actually used for the translation; some keys such - as Enter are not affected by the active keyboard - group. The level is derived from state. For - convenience, the keyboard gtk.gdk.Event - already contains the translated keyval, so this method isn't as useful - as you might think. - - The value of state or the consumed - modifiers is a combination of the . - - - Consumed Modifiers - - The consumed modifiers are modifiers that should be masked out -from state when comparing this key press to a hot -key. For instance, on a US keyboard, the plus symbol is -shifted, so when comparing a key press to a - - Controlplus - accelerator Shift should be masked out. For - example: - - - # We want to ignore irrelevant modifiers like ScrollLock - ALL_ACCELS_MASK = (gtk.gdk.CONTROL_MASK | gtk.gdk.SHIFT_MASK - | gtk.gdk.MOD1_MASK) - keyval, egroup, level, consumed = keymap.translate_keyboard_state( - event.hardware_keycode, event.state, event.group) - if (keyval == gtk.keysyms.plus and - (event.state & ~consumed & ALL_ACCELS_MASK) == gtk.gdk.CONTROL_MASK): - # Control was pressed - - - Note that most keys that are affected by the -Shift key will have gtk.gdk.SHIFT_MASK -part of the consumed modifiers (e.g. -ControlShiftTab -). - - All single modifier combinations that could affect the key for -any combination of modifiers will be returned in consumed_modifiers. -Multi-modifier combinations are returned only when actually found in -state. When you store accelerators, you should always -store them with consumed modifiers removed. Store <Control>plus, not -<Control><Shift>plus, - - - - - - - gtk.gdk.Keymap.get_entries_for_keyval - - - get_entries_for_keyval - keyval - - - - keyval : - a keyval, such as GDK_a, -GDK_Up, GDK_Return, -etc. - - - Returns : - a tuple containing 3-tuple containing a keycode, -a group and a level that will generate -keyval. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_entries_for_keyval() method -returns a tuple of (keycode, group, level) 3-tuples that will generate -keyval. Groups and levels are two kinds of keyboard -mode; in general, the level determines whether the top or bottom symbol on a -key is used, and the group determines whether the left or right symbol is -used. On US keyboards, the shift key changes the keyboard level, and there -are no groups. A group switch key might convert a keyboard between Hebrew to -English modes, for example, the gtk.gdk.KEY_PRESS and -gtk.gdk.KEY_RELEASE gtk.gdk.Event objects -contain a group attribute that indicates the active -keyboard group. The level is computed from the modifier mask. - - - - - gtk.gdk.Keymap.get_entries_for_keycode - - - get_entries_for_keycode - hardware_keycode - - - - hardware_keycode : - a keycode - - - Returns : - a tuple containing 4-tuples: (keyval, keycode, -group, level) - - - - - This method is available in PyGTK 2.4 and above. - - - The get_entries_for_keycode() method -returns a tuple containing 4-tuples with: the keyvals bound to -hardware_keycode, the keycode, the group and the -level. When a keycode is pressed by the user, the keyval from this list of -entries is selected by considering the effective keyboard group and -level. See the translate_keyboard_state() -method for more information. - - - - - gtk.gdk.Keymap.get_direction - - - get_direction - - - - Returns : - a Pango direction: pango.DIRECTION_LTR or pango.DIRECTION_RTL. - - - - The get_direction() method returns the direction of the keymap. - - - - - - - Functions - - - gtk.gdk.keymap_get_default - - - gtk.gdk.keymap_get_default - - - - - - Returns : - the default gdk keymap for the -display. - - - - The gtk.gdk.keymap_get_default() function -returns the default gtk.gdk.Keymap for -the display. - - - - - gtk.gdk.keymap_get_for_display - - - gtk.gdk.keymap_get_for_display - display - - - - - display : - a gtk.gdk.Display - - - Returns : - the keymap for - display. - - - - - This function is available in PyGTK 2.2 and above. - - - The gtk.gdk.keymap_get_for_display() -function returns the gtk.gdk.Keymap for -the gtk.gdk.Display -specified by display. - - - - - gtk.gdk.keyval_name - - - gtk.gdk.keyval_name - keyval - - - - - keyval : - a key value - - - Returns : - a string containing the name of the key, or -None if keyval is not a valid key. - - - - The gtk.gdk.keyval_name() function converts -the key value specified by keyval into a symbolic -name. - - - - - gtk.gdk.keyval_from_name - - - gtk.gdk.keyval_from_name - keyval_name - - - - - keyval_name : - a key name - - - Returns : - the corresponding key value or 0 if the key -name is not a valid key. - - - - The gtk.gdk.keyval_from_name() function -converts the key name specified by keyval_name to a -key value. - - - - - gtk.gdk.keyval_convert_case - - - gtk.gdk.keyval_convert_case - symbol - - - - - symbol : - a keyval - - - Returns : - a 2-tuple containing the lowercase and - uppercase versions of - symbol - - - - - This function is available in PyGTK 2.4 and above. - - - The gtk.gdk.keyval_convert_case() function -returns the lowercase and uppercase versions of the keyval specified by -symbol. - - - - - gtk.gdk.keyval_to_upper - - - gtk.gdk.keyval_to_upper - keyval - - - - - 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. - - - - The gtk.gdk.keyval_to_upper() function -converts the key value specified by keyval to upper -case, if applicable. - - - - - gtk.gdk.keyval_to_lower - - - gtk.gdk.keyval_to_lower - keyval - - - - - keyval : - the 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. - - - - The gtk.gdk.keyval_to_lower() function -converts the key value specified by keyval to lower -case, if applicable. - - - - - gtk.gdk.keyval_is_upper - - - gtk.gdk.keyval_is_upper - keyval - - - - - keyval : - the key value - - - Returns : - True if -keyval is in upper case or if keyval is not subject -to case conversion. - - - - The gtk.gdk.keyval_is_upper() function -returns True if the key value specified by -keyval is in upper case or not subject to case -conversion. - - - - - gtk.gdk.keyval_is_lower - - - gtk.gdk.keyval_is_lower - keyval - - - - - keyval : - the key value - - - Returns : - True if -keyval is in lower case, or if -keyval is not subject to case -conversion. - - - - The gtk.gdk.keyval_is_lower() function -returns True if the key value specified by -keyval is in lower case or is not subject to case -conversion. - - - - - gtk.gdk.keyval_to_unicode - - - gtk.gdk.keyval_to_unicode - keyval - - - - - keyval : - the key value - - - Returns : - the corresponding unicode character, or 0 if -there is no corresponding character. - - - - The gtk.gdk.keyval_to_unicode() function -converts the key value specified by keyval to the -corresponding ISO10646 (Unicode) character. - - - - - gtk.gdk.unicode_to_keyval - - - gtk.gdk.unicode_to_keyval - wc - - - - - wc : - a ISO10646 encoded (unicode) -character - - - Returns : - the corresponding key value, if one exists. or, -if there is no corresponding symbol, wc | -0x01000000 - - - - The gtk.gdk.unicode_to_keyval() function -converts the ISO10646 (unicode) character specified by -wc to a key value. - - - - - - - Signals - - - The "direction-changed" gtk.gdk.Keymap Signal - - - callback - gdkkeymap - user_param1 - ... - - - - - gdkkeymap : - the gdkkeymap that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "direction-changed" signal is emitted when the pango text -direction of gdkkeymap is changed - - - - - The "keys-changed" gtk.gdk.Keymap Signal - - - callback - gdkkeymap - user_param1 - ... - - - - - gdkkeymap : - the gdkkeymap that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.2 and above. - - - The "keys-changed" signal is emitted when the mapping -represented by keymap changes. - - - - - - diff --git a/docs/reference/pygtk-gdkpangorenderer.xml b/docs/reference/pygtk-gdkpangorenderer.xml deleted file mode 100644 index df729352..00000000 --- a/docs/reference/pygtk-gdkpangorenderer.xml +++ /dev/null @@ -1,404 +0,0 @@ - - - - - - gtk.gdk.PangoRenderer - an object providing use of Pango in GDK (new in PyGTK -2.8) - - - - Synopsis - - - gtk.gdk.PangoRenderer - pango.Renderer - - pango.Renderer - screenNone - - - set_drawable - drawable - - - set_gc - gc - - - set_stipple - part - stipple - - - set_override_color - part - color - - - - -Functions - - - gtk.gdk.gdk_pango_renderer_get_default - screen - - - - - - Ancestry - -+-- gobject.GObject - +-- pango.Renderer - +-- gtkgdk.PangoRenderer - - - - - - Properties - -
- - - - - - - - - "screen" - Read-Write-Construct Only - The gtk.gdk.Screen -for the renderer. Available in GTK+ 2.8 and above. - - - - - -
- -
- - - Description - - Pango is the text layout system used by PyGTK (via GDK and -GTK+). The functions and types in this section are used to render Pango -objects to gtk.gdk.Drawable -objects, and also extend the set of Pango attributes to include stippling -and embossing. - - Creating a pango.Layout -object is the first step in rendering text, and requires getting a handle to -a pango.Context. -For PyGTK programs, you'll usually want to use the gtk.Widget.get_pango_context() -method, or the create_pango_layout()) -method, rather than using the lowlevel gtk.gdk.gdk_pango_context_get_for_screen() -function. Once you have a pango.Layout, you -can set the text and attributes of it with Pango methods like pango.Layout.set_text() -and get its size using the get_size() -method. (Note that Pango uses a fixed point system internally, so convert -between Pango units and pixels using pango.SCALE or the -pango.PIXELS() -function.) - - Rendering a Pango layout is done most simply with the draw_layout() -method; you can also draw pieces of the layout with the draw_layout() -method or the draw_glyphs() -method. - - gtk.gdk.PangoRenderer -is a subclass of pango.Renderer -that is used internally to implement these functions. Using it directly or -subclassing it can be useful in some cases. The default renderer for a -particular screen is obtained with the gtk.gdk.gdk_pango_renderer_get_default() -function. Pango methods like pango.Renderer.draw_layout() -and pango.Renderer.draw_layout_line() -are then used to draw objects with the renderer. - - In most simple cases, applications can just use the draw_layout() -method, and don't need to directly use gtk.gdk.PangoRenderer -at all. Using the gtk.gdk.PangoRenderer -directly is most useful when working with a transformation such as a -rotation, because the Pango drawing functions take user space coordinates -(coordinates before the transformation) instead of device -coordinates. - - In certain cases it can be useful to subclass gtk.gdk.PangoRenderer. Examples -of reasons to do this are to add handling of custom attributes by overriding -'prepare_run' or to do custom drawing of embedded objects by overriding -'draw_shape'. - - - - - Constructor - - - gtk.gdk.PangoRenderer - screen - - - - screen : - a gtk.gdk.Screen - - - Returns : - a new gtk.gdk.PangoRenderer -object - - - - - This constructor is available in PyGTK 2.8 and above. - - - Creates a new gtk.gdk.PangoRenderer -object for the gtk.gdk.Screen -specified by screen. Normally you can use the results of the gtk.gdk.gdk_pango_renderer_get_default() -function rather than creating a new renderer. - - - - - Methods - - - gtk.gdk.PangoRenderer.set_drawable - - - set_drawable - drawable - - - - drawable : - the new target gtk.gdk.Drawable or - None. - - - - - This method is available in PyGTK 2.8 and above. - - - The set_drawable() method sets the -gtk.gdk.Drawable -specified by drawable as the drawable for -rendering. - -In PyGTK 2.10, drawable may be -None to unset the drawable. - - - - - gtk.gdk.PangoRenderer.set_gc - - - set_gc - gc - - - - gc : - a gtk.gdk.GC or - None. - - - - - This method is available in PyGTK 2.8 and above. - - - The set_gc() method sets the graphics -context the renderer draws with to the gtk.gdk.GC specified by -gc. - -In PyGTK 2.10, gc may be -None to unset the gc to use for drawing. - - - - - gtk.gdk.PangoRenderer.set_stipple - - - set_stipple - part - stipple - - - - part : - the part to render with the -stipple - - - stipple : - the new stipple bitmap or - None. - - - - - This method is available in PyGTK 2.8 and above. - - - The set_stipple() method sets the -stipple for one render part (foreground, background, underline, -strikethrough) to the bitmap specified by -stipple. The value of part must be one of the . Note that this is -overwritten when iterating through the individual styled runs of a pango.Layout or -pango.LayoutLine. This -method is thus only useful when you call low level methods like draw_glyphs() -directly, or in the 'prepare_run' virtual function of a subclass of gtk.gdk.PangoRenderer. - -In PyGTK 2.10 stipple may be set to -None. - - - - - gtk.gdk.PangoRenderer.set_override_color - - - set_override_color - part - color - - - - part : - the part to render with -color - - - color : - a gtk.gdk.Color or - None. - - - - - This method is available in PyGTK 2.8 and above. - - - The set_override_color() method sets -the color for a particular render part (foreground, background, underline, -strikethrough.) to the gtk.gdk.Color -specified by color, overriding any attributes on the -layouts renderered with this renderer. - -In PyGTK 2.10 color may be set to -None. - - - - - - - Functions - - - gtk.gdk.gdk_pango_renderer_get_default - - - gtk.gdk.gdk_pango_renderer_get_default - screen - - - - screen : - a gtk.gdk.Screen - - - Returns : - the default gtk.gdk.PangoRenderer -object for screen. - - - - - This function is available in PyGTK 2.8 and above. - - - The -gtk.gdk.gdk_pango_renderer_get_default() function -returns the default gtk.gdk.PangoRenderer -for the gtk.gdk.Screen -specified by screen. This default renderer is shared -by all users of the display, so properties such as the color or -transformation matrix set for the renderer may be overwritten by methods -such as gtk.gdk.Drawable.draw_layout(). - - Before using the renderer, you need to call the set_drawable() -and set_gc() -methods to set the drawable and graphics context to use for drawing. - - - - - -
diff --git a/docs/reference/pygtk-gdkpixbuf.xml b/docs/reference/pygtk-gdkpixbuf.xml deleted file mode 100644 index e64183ed..00000000 --- a/docs/reference/pygtk-gdkpixbuf.xml +++ /dev/null @@ -1,2915 +0,0 @@ - - - - - - gtk.gdk.Pixbuf - an object containing a client side image. - - - - Synopsis - - - gtk.gdk.Pixbuf - gobject.GObject - - gtk.gdk.Pixbuf - colorspace - has_alpha - bits_per_sample - width - height - - - render_to_drawable - drawable - gc - src_x - src_y - dest_x - dest_y - width - height - dither - x_dither - y_dither - - - render_to_drawable_alpha - drawable - src_x - src_y - dest_x - dest_y - width - height - alpha_mode - alpha_threshold - dither - x_dither - y_dither - - - render_pixmap_and_mask - alpha_threshold127 - - - get_from_drawable - src - cmap - src_x - src_y - dest_x - dest_y - width - height - - - get_from_image - src - cmap - src_x - src_y - dest_x - dest_y - width - height - - - get_colorspace - - - get_n_channels - - - get_has_alpha - - - get_bits_per_sample - - - get_pixels - - - get_width - - - get_height - - - get_rowstride - - - get_option - key - - - copy - - - fill - pixel - - - save - filename - type - options - None - - - - - - save_to_callback - save_func - type - options - None - user_data - None - - - add_alpha - substitute_color - r - g - b - - - copy_area - src_x - src_y - width - height - dest_pixbuf - dest_x - dest_y - - - saturate_and_pixelate - dest - saturation - pixelate - - - scale - dest - dest_x - dest_y - dest_width - dest_height - offset_x - offset_y - scale_x - scale_y - interp_type - - - composite - dest - dest_x - dest_y - dest_width - dest_height - offset_x - offset_y - scale_x - scale_y - interp_type - overall_alpha - - - composite_color - dest - dest_x - dest_y - dest_width - dest_height - offset_x - offset_y - scale_x - scale_y - interp_type - overall_alpha - check_x - check_y - check_size - color1 - color2 - - - scale_simple - dest_width - dest_height - interp_type - - - composite_color_simple - dest_width - dest_height - interp_type - overall_alpha - check_size - color1 - color2 - - - get_pixels_array - - - - subpixbuf - src_x - src_y - width - height - - - rotate_simple - angle - - - - -Functions - - - gtk.gdk.pixbuf_new_from_file - filename - - gtk.gdk.pixbuf_new_from_file_at_size - filename - width - height - - gtk.gdk.pixbuf_new_from_data - data - colorspace - has_alpha - bits_per_sample - width - height - rowstride - - gtk.gdk.pixbuf_new_from_array - array - colorspace - bits_per_sample - - gtk.gdk.pixbuf_new_from_xpm_data - data - - gtk.gdk.pixbuf_new_from_inline - data_length - data - copy_pixels - - gtk.gdk.pixbuf_get_formats - - gtk.gdk.pixbuf_get_file_info - filename - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.gdk.Pixbuf - - - - - - Attributes - -
- - - - - - - - - - "pixel_array" - Read - A numeric array containing the pixel values of the -gtk.gdk.Pixbuf. The -contents of the numeric array can be changed even though the array is -read-only. However you cannot change the pixel data of pixbufs that are -backed by a const string such as stock icon pixbufs. -PyGTK must be compiled with Numeric Python support for -this to work. - - - - - -
- -
- - - Properties - -
- - - - - - - - - "bits-per-sample" - Read-Write-Construct Only - The number of bits per sample. Available in GTK+ 2.4 -and above. - - - - "colorspace" - Read-Write-Construct Only - The colorspace in which the samples are interpreted.Available in GTK+ 2.4 and above. - - - - "has-alpha" - Read-Write-Construct Only - If True,the pixbuf has an alpha -channel. Available in GTK+ 2.4 and above. - - - - "height" - Read-Write-Construct Only - The number of rows of the pixbuf. Available in GTK+ 2.4 -and above. - - - - "n-channels" - Read-Write-Construct Only - The number of samples per pixel. Available in GTK+ 2.4 -and above. - - - - "pixels" - Read-Write-Construct Only - A pointer to the pixel data of the pixbuf. Available -in GTK+ 2.4 and above. - - - - "rowstride" - Read-Write-Construct Only - The number of bytes between the start of a row and -the start of the next row. Available in GTK+ 2.4 and above. - - - - "width" - Read-Write-Construct Only - The number of columns of the pixbuf. Available in GTK+ 2.4 -and above. - - - - - -
- -
- - - Description - - A gtk.gdk.Pixbuf -object contains the data that describes an image using client side -resources. By contrast a gtk.gdk.Pixmap uses -server side resources to hold image data. Manipulating the image data in a -gtk.gdk.Pixmap -may involve round trip transfers between a client and a server in X11 while -manipulating image data in a gtk.gdk.Pixbuf -involves only client side operations. Therefore using gtk.gdk.Pixbuf -objects may be more efficient than using gtk.gdk.Pixmap -objects if a lot of image manipulation is necessary. - - In addition to the methods associated with a gtk.gdk.Pixbuf -object there are a number of functions that can be used to create gtk.gdk.Pixbuf -objects from file and inline data. - - - - - Constructor - - - gtk.gdk.Pixbuf - colorspace - has_alpha - bits_per_sample - width - height - - - - colorspace : - the color space for the image - currently only -gtk.gdk.COLORSPACE_RGB. - - - has_alpha : - if True the image will have -transparency information. - - - bits_per_sample : - the number of bits per color sample - currently -must be 8. - - - width : - the width of image in -pixels. - - - height : - the height of image in -pixels. - - - Returns : - a newly-created gtk.gdk.Pixbuf. - - - - Creates a new gtk.gdk.Pixbuf -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 yourself. The size of the image is specified by -width and height. - - - - - Methods - - - gtk.gdk.Pixbuf.render_to_drawable - - - render_to_drawable - drawable - gc - src_x - src_y - dest_x - dest_y - width - height - dither - x_dither - y_dither - - - - drawable : - the destination gtk.gdk.Drawable. - - - gc : - the gtk.gdk.GC used for -rendering. - - - src_x : - the X coordinate within the -pixbuf. - - - src_y : - the Y coordinate within the -pixbuf. - - - dest_x : - the X coordinate within -drawable. - - - dest_y : - the Y coordinate within -drawable. - - - width : - the width of region to render, in pixels, or -1 -to use pixbuf width - - - height : - the height of region to render, in pixels, or --1 to use pixbuf height - - - dither : - the dithering mode. - - - x_dither : - the X offset for -dithering. - - - y_dither : - the Y offset for -dithering. - - - - - This method is deprecated in PyGTK 2.2 and above. Use the -gtk.gdk.Drawable.draw_pixbuf() -method instead. - - - The render_to_drawable() method renders -a rectangular portion of the pixbuf to a gtk.gdk.Drawable -specified by drawable while using the gtk.gdk.GC specified by -gc. This is done using GdkRGB, so the specified -drawable must have the GdkRGB visual and colormap. Note that this method -will ignore the opacity information for images with an alpha channel; the -gtk.gdk.GC must -already have the clipping mask set if you want transparent regions to show -through. - - The dither offset is important when re-rendering partial regions -of an image to a rendered version of the full image, or 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. - - - - - gtk.gdk.Pixbuf.render_to_drawable_alpha - - - render_to_drawable_alpha - drawable - src_x - src_y - dest_x - dest_y - width - height - alpha_mode - alpha_threshold - dither - x_dither - y_dither - - - - drawable : - the destination gtk.gdk.Drawable. - - - gc : - the gtk.gdk.GC used for -rendering. - - - src_x : - the X coordinate within the -pixbuf. - - - src_y : - the Y coordinate within the -pixbuf. - - - dest_x : - the X coordinate within -drawable. - - - dest_y : - the Y coordinate within -drawable. - - - width : - the width of region to render, in pixels, or -1 -to use pixbuf width - - - height : - the height of region to render, in pixels, or --1 to use pixbuf height - - - alpha_mode : - Ignored. Present for backward -compatibility. - - - alpha_threshold : - Ignored. Present for backward -compatibility - - - dither : - the dithering mode. - - - x_dither : - the X offset for -dithering. - - - y_dither : - the Y offset for -dithering. - - - - - This method is deprecated in PyGTK 2.2 and above. Use the -gtk.gdk.Drawable.draw_pixbuf() -method instead. - - - The render_to_drawable_alpha() method -renders a rectangular portion of the pixbuf to a gtk.gdk.Drawable -specified by drawable. -drawable must have a colormap. All windows have a -colormap; however, pixmaps only have colormap by default if they were -created with a window argument.specifying a gtk.gdk.Window. -Otherwise a colormap must be set on them with the gtk.gdk.Drawable.set_colormap() -method. On older X servers, rendering pixbufs with an alpha channel involves -round trips to the X server, and may be somewhat slow. - - - - - gtk.gdk.Pixbuf.render_pixmap_and_mask - - - render_pixmap_and_mask - alpha_threshold127 - - - - alpha_threshold : - the threshold value for opacity -values. - - - Returns : - a tuple containing the created pixmap and -mask. - - - - The render_to_pixmap_and_mask() method -returns a tuple containing a pixmap and a mask bitmap that the pixbuf and -its corresponding thresholded alpha mask are rendered to. This is merely a -convenience method; applications that need to render pixbufs with dither -offsets or to specific drawables should use the render_to_drawable_alpha() -or render_to_drawable() -methods. If the pixbuf does not have an alpha channel, then the mask -returned will be None. - - - - - gtk.gdk.Pixbuf.get_from_drawable - - - get_from_drawable - src - cmap - src_x - src_y - dest_x - dest_y - width - height - - - - src : - the source gtk.gdk.Drawable. - - - cmap : - a colormap if src -doesn't have one set. - - - src_x : - the X coordinate within -drawable. - - - src_y : - the Y coordinate within -drawable. - - - dest_x : - the X coordinate in the -pixbuf. - - - dest_y : - the Y coordinate in the -pixbuf. - - - width : - the width in pixels of the region to -get. - - - height : - the height in pixels of the region to -get. - - - Returns : - the pixbuf or None on -error - - - - The get_from_drawable() method -transfers image data from the gtk.gdk.Drawable -specified by src and converts it to an RGB(A) -representation inside a gtk.gdk.Pixbuf. In -other words, copies image data from a server-side drawable to a client-side -RGB(A) buffer. This allows you to efficiently read individual pixels on the -client side. If src has no colormap (the gtk.gdk.Drawable.get_colormap() -method returns None), then a suitable colormap must be -specified as cmap. Typically a gtk.gdk.Window or a -pixmap created by passing a gtk.gdk.Window to -gtk.gdk.Pixmap() will already have a colormap -associated with it. If src has a colormap, the -cmap argument will be ignored. If -src is a bitmap (1 bit per pixel pixmap), then a -colormap is not required; pixels with a value of 1 are assumed to be white, -and pixels with a value of 0 are assumed to be black. For taking -screenshots, the gtk.gdk.colormap_get_system() -function returns the correct colormap to use. - - If src is a pixmap, then the requested -source rectangle must be completely contained within the pixmap, otherwise -the function will return None. For pixmaps only (not for -windows) passing -1 for width or -height is allowed to mean the full width or height of -the pixmap. If src is a window, and the window -is off the screen, then there is no image data in the obscured/offscreen -regions to be placed in the pixbuf. The contents of portions of the pixbuf -corresponding to the offscreen region are undefined. - - If the window you're obtaining data from is partially obscured -by other windows, then the contents of the pixbuf areas corresponding to the -obscured regions are undefined. If the target drawable is not mapped -(typically because it's iconified/minimized or not on the current -workspace), None will be returned. If memory can't be -allocated for the return value, None will be returned -instead. (In short, there are several ways this method can fail, and if it -fails it returns None; so check the return value.) - - This method calls the gtk.gdk.Drawable.get_image() -method internally and converts the resulting image to a gtk.gdk.Pixbuf, so -the documentation for the gtk.gdk.Drawable.get_image() -method may also be helpful. - - - - - gtk.gdk.Pixbuf.get_from_image - - - get_from_image - src - cmap - src_x - src_y - dest_x - dest_y - width - height - - - - src : - the source gtk.gdk.Image. - - - cmap : - a colormap if src -doesn't have one set or None. - - - src_x : - the X coordinate within -src. - - - src_y : - the Y coordinate within -src. - - - dest_x : - the X coordinate in the -pixbuf. - - - dest_y : - the Y coordinate in the -pixbuf. - - - width : - the width in pixels of the region to -get. - - - height : - the height in pixels of the region to -get. - - - Returns : - the pixbuf or None on -error - - - - The get_from_image() method is the same -as the get_from_drawable() -method but gets the pixbuf from the gtk.gdk.Image -specified by src. - - - - - gtk.gdk.Pixbuf.get_colorspace - - - get_colorspace - - - - Returns : - the color space. - - - - The get_colorspace() method returns the -color space of the pixbuf. - - - - - gtk.gdk.Pixbuf.get_n_channels - - - get_n_channels - - - - Returns : - the number of channels. - - - - The get_n_channels() method returns the -number of channels of a pixbuf. - - - - - gtk.gdk.Pixbuf.get_has_alpha - - - get_has_alpha - - - - Returns : - True if the pixbuf has an -alpha channel. - - - - The get_has_alpha() method returns -True if the pixbuf has an alpha channel (opacity -information). - - - - - gtk.gdk.Pixbuf.get_bits_per_sample - - - get_bits_per_sample - - - - Returns : - the number of bits per color -sample. - - - - The get_bits_per_sample() method returns -the number of bits per color sample in a pixbuf. - - - - - gtk.gdk.Pixbuf.get_pixels - - - get_pixels - - - - Returns : - a string containing the pixel data of the -pixbuf - - - - The get_pixels() method returns a sting -containing the pixel data of the pixbuf. - - - - - gtk.gdk.Pixbuf.get_width - - - get_width - - - - Returns : - the width in pixels. - - - - The get_width() method returns the -width of the pixbuf. - - - - - gtk.gdk.Pixbuf.get_height - - - get_height - - - - Returns : - the height in pixels. - - - - The get_height() method returns the -height of the pixbuf. - - - - - gtk.gdk.Pixbuf.get_rowstride - - - get_rowstride - - - - Returns : - the number of bytes between -rows. - - - - The get_rowstride() method returns the -rowstride of a pixbuf, which is the number of bytes between rows. - - - - - gtk.gdk.Pixbuf.get_option - - - get_option - key - - - - key : - a key string - - - Returns : - the value associated with -key - - - - The get_option() method looks up -key in the list of options that may have been -attached to the pixbuf when it was loaded. - - - - - gtk.gdk.Pixbuf.copy - - - copy - - - - Returns : - A newly-created pixbuf or -None if not enough memory could be -allocated. - - - - The copy() method returns a new gtk.gdk.Pixbuf with -a copy of the data in the pixbuf. - - - - - gtk.gdk.Pixbuf.fill - - - fill - pixel - - - - pixel : - the RGBA pixel to clear to (0xffffffff is -opaque white, 0x00000000 transparent black) - - - - The fill() method clears the pixbuf to -the RGBA value specified by pixel, converting the -RGBA value into the pixbuf's pixel format. The alpha will be ignored if the -pixbuf doesn't have an alpha channel. - - - - - gtk.gdk.Pixbuf.save - - - save - filename - type - options - None - - - - filename : - the name of file to save. - - - type : - the name of the file -format. - - - options : - a Python dict containing key-value string pairs -or None - - - - The save() method saves the pixbuf to a -file in the format specified by type, which may be -"jpeg" or "png". If options is not -None it should be a Python dict containing key-value -string pairs that modify the save parameters. For example: - - - pixbuf.save(filename, "jpeg", {"quality":"100"}) - - - Currently only a few parameters exist. JPEG images can be saved -with a "quality" parameter; its value should be in the range [0,100]. Text -chunks can be attached to PNG images by specifying parameters of the form -"tEXt::key", where key is an ASCII string of length 1-79. Note however that -PNG text chunks are stored in ISO-8859-1 encoding, so you can only set texts -that can be represented in this encoding. The values are UTF-8 encoded -strings. ICO images can be saved in depth 16, 24, or 32, by using the -"depth" parameter. When the ICO saver is given "x_hot" and "y_hot" -parameters, it produces a CUR instead of an ICO. - - This method raises the GError exception if an error occurs -during the save operation. - - - - - - - gtk.gdk.Pixbuf.save_to_callback - - - save_to_callback - save_func - type - options - None - user_data - None - - - - save_func : - a function that is called to save each block -of data that the save routine generates. - - - type : - the name of the file -format. - - - options : - a Python dict containing key-value string pairs -or None - - - user_data : - user-specified data passed to -save_func or None - - - - - This method was available in PyGTK 2.8 and above. - - - The save_to_callback() method saves the -pixbuf in the format specified by type by feeding the -pixbuf data to the callback function specified by -save_func. type may be "jpeg", -"png" or "ico" or other installed formats. If options -is not None it should be a Python dict containing -key-value string pairs that modify the save parameters. For example: - - - pixbuf.save_to_callback(func, "jpeg", {"quality":"100"}) - - - See the save() -method for more information on formats. If user_data -is not None it is passed to save_func with each -invocation. - - This method raises a GError exception or exceptions raised by -save_func if an error occurs during the save -operation. - - The signature of save_func is: - - -def pixbuf_save_func(buf, data=None): - - - where buf is a Python string containing -the pixbuf data and data is -user_data. pixbuf_save_func -returns True if successful or False on -failure. - - - - - gtk.gdk.Pixbuf.add_alpha - - - add_alpha - substitute_color - r - g - b - - - - substitute_color : - if False, the -(r, g, -b) arguments will be ignored. - - - r : - the red value to -substitute. - - - g : - the green value to -substitute. - - - b : - the blue value to -substitute. - - - Returns : - a new gtk.gdk.Pixbuf. - - - - The add_alpha() method returns a new gtk.gdk.Pixbuf -created from the pixbuf with an alpha channel added. If the pixbuf already -had an alpha channel, the channel values are copied; otherwise, the alpha -channel is initialized to 255 (full opacity). - - If substitute_color is -True, then the color specified by -(r, g, -b) will be assigned zero opacity. That is, if you -pass (255, 255, 255) for the substitute color, all white pixels will become -fully transparent. - - - - - gtk.gdk.Pixbuf.copy_area - - - copy_area - src_x - src_y - width - height - dest_pixbuf - dest_x - dest_y - - - - src_x : - the X coordinate within the -pixbuf. - - - src_y : - the Y coordinate within the -pixbuf. - - - width : - the width of the area to -copy. - - - height : - the height of the area to -copy. - - - dest_pixbuf : - the destination pixbuf. - - - dest_x : - the X coordinate within -dest_pixbuf. - - - dest_y : - the Y coordinate within -dest_pixbuf. - - - - The copy_area() method copies a -rectangular area from the pixbuf to the destination gtk.gdk.Pixbuf -specified by dest_pixbuf. Conversion of pixbuf -formats is done automatically. - - - - - gtk.gdk.Pixbuf.saturate_and_pixelate - - - saturate_and_pixelate - dest - saturation - pixelate - - - - dest : - the gtk.gdk.Pixbuf to -write the modified version of the pixbuf - - - saturation : - the saturation factor - - - pixelate : - if True pixelate -dest - - - - The saturate_and_pixelate() method -modifies the saturation and optionally pixelates the pixbuf, placing the -result in dest. the pixbuf and -dest may be the same gtk.gdk.Pixbuf with -no ill effects. If saturation is 1.0 then saturation -is not changed. If it's less than 1.0, saturation is reduced (the image is -darkened); if greater than 1.0, saturation is increased (the image is -brightened). If pixelate is True, -then pixels are faded in a checkerboard pattern to create a pixelated image. -The pixbuf and dest must have the same image format, -size, and rowstride. - - - - - gtk.gdk.Pixbuf.scale - - - scale - dest - dest_x - dest_y - dest_width - dest_height - offset_x - offset_y - scale_x - scale_y - interp_type - - - - dest : - the gtk.gdk.Pixbuf the -scaling is rendered to. - - - dest_x : - the X coordinate for the -rectangle - - - dest_y : - the Y coordinate for the -rectangle - - - dest_width : - the width of the rectangle - - - dest_height : - the height of the -rectangle - - - 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 - - - interp_type : - the interpolation type for the -transformation. - - - - The scale() method creates a -transformation of the pixbuf's image by scaling by -scale_x and scale_y and -translating by offset_x and -offset_y it, then rendering the rectangle -(dest_x, dest_y, -dest_width, dest_height) of -the resulting image onto the destination image specified by -dest replacing the previous contents. The value of -interp_type must be one of: - - - - gtk.gdk.INTERP_NEAREST - - Nearest neighbor sampling; this is the fastest and -lowest quality mode. Quality is normally unacceptable when scaling down, but -may be OK when scaling up. - - - - gtk.gdk.INTERP_TILES - - This is an accurate simulation of the PostScript image -operator without any interpolation enabled. Each pixel is rendered as a tiny -parallelogram of solid color, the edges of which are implemented with -antialiasing. It resembles nearest neighbor for enlargement, and bilinear -for reduction. - - - - gtk.gdk.INTERP_BILINEAR - - Best quality/speed balance; use this mode by default. -Bilinear interpolation. For enlargement, it is equivalent to point-sampling -the ideal bilinear-interpolated image. For reduction, it is equivalent to -laying down small tiles and integrating over the coverage area. - - - - gtk.gdk.INTERP_HYPER - - This is the slowest and 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). - - - - - Try the scale_simple() -method as an alternative with a simpler interface. - - - - - gtk.gdk.Pixbuf.composite - - - composite - dest - dest_x - dest_y - dest_width - dest_height - offset_x - offset_y - scale_x - scale_y - interp_type - overall_alpha - - - - dest : - the output gtk.gdk.Pixbuf - - - dest_x : - the X coordinate for the -rectangle - - - dest_y : - the top coordinate for the -rectangle - - - dest_width : - the width of the rectangle - - - dest_height : - the height of the -rectangle - - - 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 - - - interp_type : - the interpolation type for the -transformation. - - - overall_alpha : - overall alpha for source image -(0..255) - - - - The composite() method creates a -transformation of the pixbuf's image by scaling by -scale_x and scale_y and -translating by offset_x and -offset_y, then compositing the rectangle -(dest_x, dest_y, -dest_width, dest_height) of -the resulting image onto the destination image. The value of -interp_type must be one of: - - - - gtk.gdk.INTERP_NEAREST - - Nearest neighbor sampling; this is the fastest and -lowest quality mode. Quality is normally unacceptable when scaling down, but -may be OK when scaling up. - - - - gtk.gdk.INTERP_TILES - - This is an accurate simulation of the PostScript image -operator without any interpolation enabled. Each pixel is rendered as a tiny -parallelogram of solid color, the edges of which are implemented with -antialiasing. It resembles nearest neighbor for enlargement, and bilinear -for reduction. - - - - gtk.gdk.INTERP_BILINEAR - - Best quality/speed balance; use this mode by default. -Bilinear interpolation. For enlargement, it is equivalent to point-sampling -the ideal bilinear-interpolated image. For reduction, it is equivalent to -laying down small tiles and integrating over the coverage area. - - - - gtk.gdk.INTERP_HYPER - - This is the slowest and 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). - - - - - - - - - - gtk.gdk.Pixbuf.composite_color - - - composite_color - dest - dest_x - dest_y - dest_width - dest_height - offset_x - offset_y - scale_x - scale_y - interp_type - overall_alpha - check_x - check_y - check_size - color1 - color2 - - - - dest : - the output gtk.gdk.Pixbuf - - - dest_x : - the X coordinate for the -rectangle - - - dest_y : - the top coordinate for the -rectangle - - - dest_width : - the width of the rectangle - - - dest_height : - the height of the -rectangle - - - 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 - - - interp_type : - the interpolation type 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 - - - - The composite_color() method creates a -transformation of the source image src by scaling by -scale_x and scale_y and -translating by offset_x and -offset_y, then compositing the rectangle -(dest_x ,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 image. The value of -interp_type must be one of: - - - - gtk.gdk.INTERP_NEAREST - - Nearest neighbor sampling; this is the fastest and -lowest quality mode. Quality is normally unacceptable when scaling down, but -may be OK when scaling up. - - - - gtk.gdk.INTERP_TILES - - This is an accurate simulation of the PostScript image -operator without any interpolation enabled. Each pixel is rendered as a tiny -parallelogram of solid color, the edges of which are implemented with -antialiasing. It resembles nearest neighbor for enlargement, and bilinear -for reduction. - - - - gtk.gdk.INTERP_BILINEAR - - Best quality/speed balance; use this mode by default. -Bilinear interpolation. For enlargement, it is equivalent to point-sampling -the ideal bilinear-interpolated image. For reduction, it is equivalent to -laying down small tiles and integrating over the coverage area. - - - - gtk.gdk.INTERP_HYPER - - This is the slowest and 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). - - - - - See the composite_color_simple() -method for a simpler variant of this method suitable for most tasks. - - - - - gtk.gdk.Pixbuf.scale_simple - - - scale_simple - dest_width - dest_height - interp_type - - - - dest_width : - the width of destination -image - - - dest_height : - the height of destination -image - - - interp_type : - the interpolation type for the -transformation. - - - Returns : - the new gtk.gdk.Pixbuf, or -None if not enough memory could be allocated for -it. - - - - The scale_simple() method returns a new -gtk.gdk.Pixbuf -containing a copy of the pixbuf scaled to dest_width -x dest_height. The pixbuf is unaffected by the -scaling operation. The value of interp_type must be -one of: - - - - gtk.gdk.INTERP_NEAREST - - Nearest neighbor sampling; this is the fastest and -lowest quality mode. Quality is normally unacceptable when scaling down, but -may be OK when scaling up. - - - - gtk.gdk.INTERP_TILES - - This is an accurate simulation of the PostScript image -operator without any interpolation enabled. Each pixel is rendered as a tiny -parallelogram of solid color, the edges of which are implemented with -antialiasing. It resembles nearest neighbor for enlargement, and bilinear -for reduction. - - - - gtk.gdk.INTERP_BILINEAR - - Best quality/speed balance; use this mode by default. -Bilinear interpolation. For enlargement, it is equivalent to point-sampling -the ideal bilinear-interpolated image. For reduction, it is equivalent to -laying down small tiles and integrating over the coverage area. - - - - gtk.gdk.INTERP_HYPER - - This is the slowest and 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). - - - - - interp_type should be -gtk.gdk.INTERP_NEAREST if you want maximum speed (but -when scaling down gtk.gdk.INTERP_NEAREST is usually -unusably ugly). The default interp_type should be -GDK_INTERP_BILINEAR which offers reasonable quality and -speed. - - You can scale a sub-portion of src by -creating a sub-pixbuf pointing into src; see the -subpixbuf() -method for more information. - - For more complicated scaling/compositing see the scale() -and composite() -methods. - - - - - gtk.gdk.Pixbuf.composite_color_simple - - - composite_color_simple - dest_width - dest_height - interp_type - overall_alpha - check_size - color1 - color2 - - - - dest_width : - the width of destination -image - - - dest_height : - the height of destination -image - - - interp_type : - the interpolation type 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 - - - Returns : - the new gtk.gdk.Pixbuf, or -NULL if not enough memory could be allocated for -it. - - - - The composite_color_simple() method -returns a new gtk.gdk.Pixbuf by -scaling the pixbuf to dest_width x -dest_height and compositing the result with a -checkboard of colors color1 and -color2. The value of interp_type must be -one of: - - - - gtk.gdk.INTERP_NEAREST - - Nearest neighbor sampling; this is the fastest and -lowest quality mode. Quality is normally unacceptable when scaling down, but -may be OK when scaling up. - - - - gtk.gdk.INTERP_TILES - - This is an accurate simulation of the PostScript image -operator without any interpolation enabled. Each pixel is rendered as a tiny -parallelogram of solid color, the edges of which are implemented with -antialiasing. It resembles nearest neighbor for enlargement, and bilinear -for reduction. - - - - gtk.gdk.INTERP_BILINEAR - - Best quality/speed balance; use this mode by default. -Bilinear interpolation. For enlargement, it is equivalent to point-sampling -the ideal bilinear-interpolated image. For reduction, it is equivalent to -laying down small tiles and integrating over the coverage area. - - - - gtk.gdk.INTERP_HYPER - - This is the slowest and 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). - - - - - See the composite_color() -method for a more powerful but complicated interface. - - - - - gtk.gdk.Pixbuf.get_pixels_array - - - get_pixels_array - - - - - Returns : - a Numeric Python array containing the pixel - data of the pixbuf - - - - - This method is available in PyGTK 2.2 and above. - - - The get_pixels_array() method returns a -Numeric Python array containing the pixel data of the pixbuf. - - - PyGTK must be compiled with Numeric Python support for this -method to be available. - - - - - - gtk.gdk.Pixbuf.subpixbuf - - - subpixbuf - src_x - src_y - width - height - - - - src_x : - X coord in the pixbuf - - - src_y : - Y coord in the pixbuf - - - width : - width of region in the pixbuf - - - height : - height of region in the pixbuf - - - Returns : - a new gtk.gdk.Pixbuf - - - - - This method is available in PyGTK 2.4 and above. - - - The subpixbuf() method creates a new -gtk.gdk.Pixbuf -that represents a sub-region of the pixbuf. The new pixbuf shares its pixels -with the original pixbuf, so writing to one affects both. - - - - - gtk.gdk.Pixbuf.rotate_simple - - - rotate_simple - angle - - - - angle : - the rotation angle - - - Returns : - a new gtk.gdk.Pixbuf - - - - - This method is available in PyGTK 2.10 and above. - - - The rotate_simple() method creates a - new gtk.gdk.Pixbuf - by roatating the given pixbuf by a multiple of 90 degrees as specified - by angle which is one of the - - - - - - - Functions - - - gtk.gdk.pixbuf_new_from_file - - - gtk.gdk.pixbuf_new_from_file - filename - - - - - filename : - the name of the file containing the image to -load - - - Returns : - a new gtk.gdk.Pixbuf. - - - - The gtk.gdk.pixbuf_new_from_file() function -returns a new gtk.gdk.Pixbuf -containing an image loaded from the file specified by -filename. The image file format is detected -automatically. The application will block until the image is done loading. -This method can be used by applications in which blocking is acceptable -while an image is being loaded (small images in general). Applications that -need progressive loading should use gtk.gdk.PixbufLoader -instead. - - This function raises the GError exception if an error occurs -during the loading of the pixbuf. - - - - - gtk.gdk.pixbuf_new_from_file_at_size - - - gtk.gdk.pixbuf_new_from_file_at_size - filename - width - height - - - - - filename : - the name of the file containing the image to -load - - - width : - The width the image should - have - - - height : - The height the image should - have - - - Returns : - a new gtk.gdk.Pixbuf. - - - - - This function is available in PyGTK 2.4 and above. - - - The gtk.gdk.pixbuf_new_from_file_at_size() -function returns a new gtk.gdk.Pixbuf -containing an image loaded from the file specified by -filename with it scaled to the size specified by -width and height. The image -file format is detected automatically. The application will block until the -image is done loading. This function can be used by applications in which -blocking is acceptable while an image is being loaded (small images in -general). Applications that need progressive loading should use a gtk.gdk.PixbufLoader -instead. - - This function raises the GError exception if an error occurs -during the loading of the pixbuf. - - - - - gtk.gdk.pixbuf_new_from_data - - - gtk.gdk.pixbuf_new_from_data - data - colorspace - has_alpha - bits_per_sample - width - height - rowstride - - - - - data : - a string containing image data in 8-bit/sample - packed format. - - - colorspace : - the colorspace for the image - data. - - - has_alpha : - If True, the data has an - opacity channel. - - - bits_per_sample : - the number of bits per - sample. - - - width : - the width of the image in pixels. - - - height : - the height of the image in pixels. - - - rowstride : - the distance in bytes between row - starts. - - - Returns : - a gtk.gdk.Pixbuf - - - - - This function is available in PyGTK 2.2 and above. - - - The gtk.gdk.pixbuf_new_from_data() function -returns a new pixbuf created from the string specified by -data. data must be RGB image -data with 8 bits per sample. colorspace must be -gtk.gdk.COLORSPACE_RGB. - - - - - gtk.gdk.pixbuf_new_from_array - - - gtk.gdk.pixbuf_new_from_array - array - colorspace - bits_per_sample - - - - - array : - a string containing image data in 8-bit/sample - packed format. - - - colorspace : - the colorspace for the image - data. - - - bits_per_sample : - the number of bits per - sample. - - - Returns : - a gtk.gdk.Pixbuf - - - - - This function is available in PyGTK 2.2 and above. - - - The gtk.gdk.pixbuf_new_from_array() -function returns a new pixbuf created from the Numeric Python array -specified by array. array must -be a 3 or 4 dimensional array (4 if the image has an alpha channel) with -bits_per_sample bits per sample. -colorspace must be -gtk.gdk.COLORSPACE_RGB. - - - PyGTK must be compiled with the Numeric Python module to -support this function. - - - - - - gtk.gdk.pixbuf_new_from_xpm_data - - - gtk.gdk.pixbuf_new_from_xpm_data - data - - - - - data : - a list of strings containing the XPM image -data - - - Returns : - a gtk.gdk.Pixbuf - - - - The gtk.gdk.pixbuf_new_from_xpm_data() -function returns a new gtk.gdk.Pixbuf by -parsing XPM data in memory specified by -data. data is a list of -strings containing the XPM data. - - - - - gtk.gdk.pixbuf_new_from_inline - - - gtk.gdk.pixbuf_new_from_inline - data_length - data - copy_pixels - - - - - data_length : - the length in bytes of the -data - - - data : - a string containing the inline pixbuf -data - - - copy_pixels : - if True the pixel data -should be copied - - - Returns : - a new gtk.gdk.Pixbuf -object - - - - The gtk.gdk.pixbuf_new_from_inline() -function returns a gtk.gdk.Pixbuf from -a flat representation that is suitable for storing as inline data in a -program. This is useful if you want to ship a program with images, but don't -want to depend on any external files. - - GTK+ ships with a program called -gdk-pixbuf-csource which allows for conversion of an -image into such a inline representation.In almost all cases, you should pass -the flag to gdk-pixbuf-csource. A -sample invocation would be: - - - gdk-pixbuf-csource --raw --name=myimage_inline myimage.png - - - For the typical case where the inline pixbuf is read-only static -data, you don't need to copy the pixel data unless you intend to write to -it, so you can pass False for -copy_pixels. - - This function raises the GError exception if an error occurs -during the loading of the pixbuf. - - - - - gtk.gdk.pixbuf_get_formats - - - gtk.gdk.pixbuf_get_formats - - - - Returns : - a list of image formats as Python - dicts - - - - The gtk.gdk.pixbuf_get_formats() function -returns a list of the supported image formats as a Python dict. The keys -of the image format dict are: - - - - name : - the name of the image format. - - - description : - a description of the image - format. - - - mime_types : - a list of the mime types this image - matches. - - - extensions : - a list of typical filename extensions for the - image format. - - - is_writable : - if True the image can be - written to a file - - - - - - - gtk.gdk.pixbuf_get_file_info - - - gtk.gdk.pixbuf_get_file_info - filename - - - - filename : - the name of the file to check - - - Returns : - an image format as a Python dict - - - - The gtk.gdk.pixbuf_get_file_info() function -reads enough of the file specified by filename to -determine its image format and then returns the image format information in -a Python dict. See the gtk.gdk.pixbuf_get_formats() -function for more details on the image format dict. - - - - - -
diff --git a/docs/reference/pygtk-gdkpixbufanimation.xml b/docs/reference/pygtk-gdkpixbufanimation.xml deleted file mode 100644 index fe9c2f4a..00000000 --- a/docs/reference/pygtk-gdkpixbufanimation.xml +++ /dev/null @@ -1,264 +0,0 @@ - - - - - - gtk.gdk.PixbufAnimation - an object holding an animation - - - - Synopsis - - - gtk.gdk.PixbufAnimation - gobject.GObject - - gtk.gdk.PixbufAnimation - filename - - - get_width - - - get_height - - - is_static_image - - - get_static_image - - - get_iter - start_time - 0.0 - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.gdk.PixbufAnimation - - - - - - Description - - A gtk.gdk.PixbufAnimation -is an object that holds an animation. An animation is conceptually a series -of frames to be displayed over time. Each frame is the same size. The -animation may not be represented as a series of frames internally; for -example, it may be stored as a sprite and instructions for moving the sprite -around a background. To display an animation you don't need to understand -its representation, you just ask a gtk.gdk.PixbufAnimationIter -for the next frame that should be displayed at a given point in time. - - - - - Constructor - - - gtk.gdk.PixbufAnimation - filename - - - - filename : - the name of the file to -load. - - - Returns : - a new gtk.gdk.PixbufAnimation - object. - - - - Creates a new gtk.gdk.PixbufAnimation -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. - - This constructor raises the GError exception 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. - - - - - Methods - - - gtk.gdk.PixbufAnimation.get_width - - - get_width - - - - Returns : - the width of the bounding box of the -animation. - - - - The get_width() method returns the -width of the bounding box of a pixbuf animation. - - - - - gtk.gdk.PixbufAnimation.get_height - - - get_height - - - - Returns : - the height of the bounding box of the -animation. - - - - The get_height() method returns the -height of the bounding box of a pixbuf animation. - - - - - gtk.gdk.PixbufAnimation.is_static_image - - - is_static_image - - - - Returns : - True if the "animation" was -really just an image - - - - The is_static_image() method returns -True if you load a file containing a plain, unanimated image. Use the get_static_image() -method to retrieve the image. - - - - - gtk.gdk.PixbufAnimation.get_static_image - - - get_static_image - - - - Returns : - the unanimated image representing the -animation - - - - The get_static_image() method returns a -gtk.gdk.Pixbuf -that represents a static image of the animation. If the animation is really -just a plain image (has only one frame), this method returns that image. If -the animation is an animation, this method returns a reasonable thing to -display as a static unanimated image, which might be the first frame, or -something more sophisticated. If an animation hasn't loaded any frames yet, -this method will return None. - - - - - gtk.gdk.PixbufAnimation.get_iter - - - get_iter - start_time - 0.0 - - - - start_time : - the time when the animation starts -playing - - - Returns : - a gtk.gdk.PixbufAnimationIter -object - - - - The get_iter() method returns a gtk.gdk.PixbufAnimationIter -that is used to access the frames of the animation. The iterator provides -the frames that should be displayed at specific times. -start_time is the start time specified as a float as -output from the Python time.time() function. -start_time marks the beginning of the animation -playback. After creating an iterator, you should immediately display the -pixbuf returned by the gtk.gdk.PixbufAnimationIter.get_pixbuf() -method. Then, you should install a timeout (with the gobject.timeout_add()() -function) or by some other mechanism ensure that you'll update the image -after the number of milliseconds specified by the gtk.gdk.PixbufAnimationIter.get_delay_time() -method. Each time the image is updated, you should reinstall the timeout -with the new, possibly-changed delay time. As a shortcut, if -start_time is 0.0 (the default), the current time -will be used. - - To update the image (i.e. possibly change the result of the -gtk.gdk.PixbufAnimationIter.get_pixbuf() -method to a new frame of the animation), call the gtk.gdk.PixbufAnimationIter.advance() -method. - - If you're using a gtk.gdk.PixbufLoader, -in addition to updating the image after the delay time, you should also -update it whenever you receive the "area_updated" signal and the gtk.gdk.PixbufAnimationIter.on_currently_loading_frame() -method returns True. In this case, the frame currently -being fed into the loader has received new data, so needs to be refreshed. -The delay time for a frame may also be modified after an "area_updated" -signal, for example if the delay time for a frame is encoded in the data -after the frame itself. So your timeout should be reinstalled after any -area_updated signal. A delay time of -1 is possible, indicating -"infinite." - - - - - - diff --git a/docs/reference/pygtk-gdkpixbufanimationiter.xml b/docs/reference/pygtk-gdkpixbufanimationiter.xml deleted file mode 100644 index d4d12c22..00000000 --- a/docs/reference/pygtk-gdkpixbufanimationiter.xml +++ /dev/null @@ -1,225 +0,0 @@ - - - - - - gtk.gdk.PixbufAnimationIter - an object providing access to the frames of a gtk.gdk.PixbufAnimation - - - - Synopsis - - - gtk.gdk.PixbufAnimationIter - gobject.GObject - - get_delay_time - - - get_pixbuf - - - on_currently_loading_frame - - - advance - current_time - 0.0 - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.gdk.PixbufAnimationIter - - - - - - Description - - A gtk.gdk.PixbufAnimationIter -is used to access the frames of a gtk.gdk.PixbufAnimation -at specified times. A gtk.gdk.PixbufAnimationIter -object is created using the gtk.gdk.PixbufAnimation.get_iter() -method. After creating an iterator, you should immediately display the -pixbuf returned by the get_pixbuf() -method. Then, you should install a timeout (with the gobject.timeout_add()() -function) or by some other mechanism ensure that you'll update the image -after the number of milliseconds specified by the get_delay_time() -method. Each time the image is updated, you should reinstall the timeout -with the new, possibly-changed delay time. - - To update the image (i.e. possibly change the result of the get_pixbuf() -method to a new frame of the animation), call the advance() -method. - - If you're using a gtk.gdk.PixbufLoader, -in addition to updating the image after the delay time, you should also -update it whenever you receive the "area_updated" signal and the on_currently_loading_frame() -method returns True. In this case, the frame currently -being fed into the loader has received new data, so needs to be refreshed. -The delay time for a frame may also be modified after an "area_updated" -signal, for example if the delay time for a frame is encoded in the data -after the frame itself. So your timeout should be reinstalled after any -area_updated signal. A delay time of -1 is possible, indicating -"infinite." - - - - - Methods - - - gtk.gdk.PixbufAnimationIter.get_delay_time - - - get_delay_time - - - - Returns : - the delay time in milliseconds (thousandths of -a second) - - - - The get_delay_time() method returns the -number of milliseconds the current pixbuf should be displayed, or -1 if the -current pixbuf should be displayed forever. The gobject.timeout_add()() -function conveniently takes a timeout in milliseconds, so you can use a -timeout to schedule the next update. - - - - - gtk.gdk.PixbufAnimationIter.get_pixbuf - - - get_pixbuf - - - - Returns : - the current gtk.gdk.Pixbuf to be -displayed - - - - The get_pixbuf() method returns the -current gtk.gdk.Pixbuf that -should be displayed. The pixbuf will be the same size as the animation -itself (see the gtk.gdk.PixbufAnimation.get_width() -and gtk.gdk.PixbufAnimation.get_height() -methods). The gtk.gdk.Pixbuf -should be displayed for the number of milliseconds specified by the get_delay_time() -method. - - - - - gtk.gdk.PixbufAnimationIter.on_currently_loading_frame - - - on_currently_loading_frame - - - - Returns : - True if the frame we're on -is partially loaded, or the last frame - - - - The on_currently_loading_frame() method -returns True if the frame currently pointed to by the -iterator is partially loaded or the last frame. This method is used to -determine how to respond to the "area_updated" signal on gtk.gdk.PixbufLoader -when loading an animation. The "area_updated" signal is emitted for an area -of the frame currently streaming in to the loader. So if you're on the -currently loading frame, you need to redraw the screen for the updated -area. - - - - - gtk.gdk.PixbufAnimationIter.advance - - - advance - current_time - 0.0 - - - - current_time : - the current time as a float or 0.0 to -automatically determine the current time - - - Returns : - True if the image may need -updating - - - - The advance() method attempts to -advance an animation to a new frame. The frame is chosen based on the start -time passed to the gtk.gdk.PixbufAnimation.get_iter() -method. current_time is normally the current time (as -specified by the Python time.time() function) and must be greater than or -equal to the time passed to the gtk.gdk.PixbufAnimation.get_iter() -method, and must increase or remain unchanged each time the get_pixbuf() -method is called. That is, you can't go backward in time; animations only -play forward. As a shortcut, pass 0.0 (the default) for the current time and -the current time will automatically be determined an used. So you only need -to explicitly pass current_time if you're doing -something odd like playing the animation at double speed. - - If this method returns False, there's no need -to update the animation display, assuming the display had been rendered -prior to advancing; if True, you need to call the get_pixbuf() -method and update the display with the new pixbuf. - - - - - - diff --git a/docs/reference/pygtk-gdkpixbufloader.xml b/docs/reference/pygtk-gdkpixbufloader.xml deleted file mode 100644 index f45fa3e9..00000000 --- a/docs/reference/pygtk-gdkpixbufloader.xml +++ /dev/null @@ -1,666 +0,0 @@ - - - - - - gtk.gdk.PixbufLoader - an object providing application-driven progressive image -loading - - - - Synopsis - - - gtk.gdk.PixbufLoader - gobject.GObject - - gtk.gdk.PixbufLoader - image_type - None - - - write - buf - count - -1 - - - get_pixbuf - - - get_animation - - - - close - - - set_size - width - height - - - get_format - - - - - -Functions - - - gtk.gdk.pixbuf_loader_new_with_mime_type - mime_type - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.gdk.PixbufLoader - - - - - - Signal Prototypes - - - - "area-prepared" - - callback - pixbufloader - user_param1 - ... - - - - - "area-updated" - - callback - pixbufloader - x - y - width - height - user_param1 - ... - - - - - "closed" - - callback - pixbufloader - user_param1 - ... - - - - - "size-prepared" - - callback - pixbufloader - width - height - user_param1 - ... - - - - - - - - - Description - - A gtk.gdk.PixbufLoader -provides a way for applications to drive the process of loading an image, by -letting them send the image data directly to the loader instead of having -the loader read the data from a file. Applications can use this instead of -the gtk.gdk.pixbuf_new_from_file function -or the gtk.gdk.PixbufAnimation -constructor 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 gtk.gdk.PixbufLoader -to load an image, just create a new one, and call the write() -method to send the data to it. When done, the close() -method 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. The application can call the -get_pixbuf() -method to retrieve the pixbuf. No actual image data will be in the pixbuf, -so it can be safely filled with any temporary graphics (or an initial color) -as needed. - - The "area-updated" signal is emitted 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 almost as easy as loading an image. Once -the first "area-prepared" signal has been emitted, you can call the get_animation() -method to get the gtk.gdk.PixbufAnimation -object and the gtk.gdk.PixbufAnimation.get_iter() -method to get an gtk.gdk.PixbufAnimationIter -for displaying it. - - - - - - - Constructor - - - gtk.gdk.PixbufLoader - image_type - None - - - - image_type : - the name of the image format or -None - - - Returns : - A new gtk.gdk.PixbufLoader -object. - - - - Creates a new gtk.gdk.PixbufLoader -object. If image_type is not specified or is -None the image type will be automatically deduced from -the image data. If image_type is specified the gtk.gdk.PixbufLoader -attempts to parse the image data as if it were an image of the specified -type. Identifying the image type is useful if you want an error if the image -isn't the expected type, for loading image formats that can't be reliably -identified by looking at the data, or if the user manually forces a specific -type. - - This constructor raises the GError exception if an error occurs -trying to load the module for image_type. - - - - - Methods - - - gtk.gdk.PixbufLoader.write - - - write - buf - count - -1 - - - - buf : - a string containing some portion of the image -data. - - - count : - the length of buf in -bytes. - - - Returns : - True if the write was -successful. - - - - The write() method causes the pixbuf -loader to parse the bytes of an image contained in the string specified by -buf. If count is specified and -is in the range (0, len(buf)) only count bytes of -buf are used. This method returns -True if the image data was loaded successfully. If an -error occurred this method raises the GError exception and will not accept -further writes. The loader may or may not be closed depending on the -error. - - - - - gtk.gdk.PixbufLoader.get_pixbuf - - - get_pixbuf - - - - Returns : - the gtk.gdk.Pixbuf that -the loader is creating, or None if not enough data has -been read to determine how to create the image buffer. - - - - The get_pixbuf() method returns the -gtk.gdk.Pixbuf -that a pixbuf loader is currently creating. In general it only makes sense -to call this method after the "area-prepared" signal has been emitted by -the loader which 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 the write() -method, this method returns None. The same pixbuf will be -returned in all future calls to this method. Also, if the loader is an -animation, it will return the "static image" of the animation (see the gtk.gdk.PixbufAnimation.get_static_image() -method). - - - - - gtk.gdk.PixbufLoader.get_animation - - - get_animation - - - - Returns : - the gtk.gdk.PixbufAnimation -that the loader is loading, or None if not enough data -has been read to determine the information. - - - - The get_animation() method returns the -gtk.gdk.PixbufAnimation -that the pixbuf loader is currently creating. In general it only makes sense -to call this method after the "area-prepared" signal has been emitted by the -loader. If the loader doesn't have enough bytes yet (hasn't emitted the -"area-prepared" signal) this method will return -None. - - - - - gtk.gdk.PixbufLoader.close - - - close - - - - Returns : - True if all image data -written so far was successfully passed out via the "area_update" -signal - - - - The close() method informs the pixbuf -loader that no further writes using the write() -will occur, so that it can free its internal loading structures. Also, the -pixbuf loader tries to parse any data that hasn't yet been parsed and if the -remaining data is partial or corrupt, the GError exception will be -raised. - - - - - gtk.gdk.PixbufLoader.set_size - - - set_size - width - height - - - - width : - The desired width for the image being - loaded. - - - height : - The desired height for the image being - loaded. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_size() method causes the image -to be scaled to the size specified by width and -height while it is being loaded. The desired image -size can be determined relative to the original size of the image by calling -the set_size() -from a signal handler for the "size-prepared" -signal. - - Attempts to set the desired image size are ignored after the -emission of the "size-prepared". - - - - - gtk.gdk.PixbufLoader.get_format - - - get_format - - - - - Returns : - a Python dict containing the image format - information or None - - - - - This method is available in PyGTK 2.4 and above. - - - The get_format() method returns the -available information about the format of the currently loading image -file. This method returns None if their is no information available -e.g. before the image has started loading. - - - - - - - Functions - - - gtk.gdk.pixbuf_loader_new_with_mime_type - - - gtk.gdk.pixbuf_loader_new_with_mime_type - mime_type - - - - mime_type : - the mime type to be loaded - - - Returns : - a new gtk.gdk.PixbufLoader - object. - - - - - This function is available in PyGTK 2.4 and above. - - - The -gtk.gdk.pixbuf_loader_new_with_mime_type() function -creates a new pixbuf loader object that always attempts to parse image data -as if it were an image of the mime type specified by -mime_type, instead of identifying the type -automatically. Useful if you want an error if the image isn't the expected -mime type, for loading image formats that can't be reliably identified by -looking at the data, or if the user manually forces a specific mime -type. - - This function raises the GError exception if an error occurs -during the loading of the mime type image module. - - - - - - - Signals - - - The "area-prepared" gtk.gdk.PixbufLoader Signal - - - callback - pixbufloader - user_param1 - ... - - - - - pixbufloader : - the pixbufloader that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "area-prepared" signal is emitted when sufficient image data -has been received and parsed to determine the size of the image. - - - - - The "area-updated" gtk.gdk.PixbufLoader Signal - - - callback - pixbufloader - x - y - width - height - user_param1 - ... - - - - - pixbufloader : - the pixbufloader that received the -signal - - - x : - the X coordinate of the -region - - - y : - the Y coordinate of the -region - - - width : - the width of the region - - - height : - the height of the region - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "area-updated" signal is emitted when sufficient image data -has been received and parsed to allow the region specified by -x, y, -width and height to be -displayed. - - - - - The "closed" gtk.gdk.PixbufLoader Signal - - - callback - pixbufloader - user_param1 - ... - - - - - pixbufloader : - the pixbufloader that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "closed" signal is emitted when the -pixbufloader is closed by calling the close() -method. - - - - - The "size-prepared" gtk.gdk.PixbufLoader Signal - - - callback - pixbufloader - width - height - user_param1 - ... - - - - - pixbufloader : - the pixbufloader that received the -signal - - - width : - the original width of the - image - - - height : - he original height of the - image - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.2 and above. - - - The "size-prepared" signal is emitted when the pixbuf loader has -been fed the initial amount of data that is required to figure out the size -of the image that it will create. Applications can call the set_size() -method in response to this signal to set the desired size of the -image. - - - - - - diff --git a/docs/reference/pygtk-gdkpixmap.xml b/docs/reference/pygtk-gdkpixmap.xml deleted file mode 100644 index 05029da8..00000000 --- a/docs/reference/pygtk-gdkpixmap.xml +++ /dev/null @@ -1,766 +0,0 @@ - - - - - - gtk.gdk.Pixmap - An offscreen gtk.gdk.Drawable - - - - Synopsis - - - gtk.gdk.Pixmap - gtk.gdk.Drawable - - gtk.gdk.Pixmap - drawable - width - height - depth - -1 - - - - - -Functions - - - gtk.gdk.bitmap_create_from_data - drawable - data - width - height - - gtk.gdk.pixmap_create_from_data - drawable - data - width - height - depth - fg - bg - - gtk.gdk.pixmap_create_from_xpm - window - transparent_color - filename - - gtk.gdk.pixmap_colormap_create_from_xpm - window - colormap - transparent_color - filename - - gtk.gdk.pixmap_create_from_xpm_d - window - transparent_color - data - - gtk.gdk.pixmap_colormap_create_from_xpm_d - window - colormap - transparent_color - data - - gtk.gdk.pixmap_foreign_new - anid - - gtk.gdk.pixmap_lookup - anid - - gtk.gdk.pixmap_foreign_new_for_display - display - anid - - gtk.gdk.pixmap_lookup_for_display - display - anid - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.gdk.Drawable - +-- gtk.gdk.Pixmap - - - - - - Description - - A gtk.gdk.Pixmap is an -offscreen gtk.gdk.Drawable. -It can be drawn upon with the standard gtk.gdk.Drawable -drawing primitives, then copied to another gtk.gdk.Drawable -(such as a gtk.gdk.Window) with -the draw_drawable() -method. The depth of a pixmap is the number of bits per pixels. A bitmaps -are simply a gtk.gdk.Pixmap with -a depth of 1. (That is, they are monochrome pixmaps - each pixel can be -either on or off). - - - - - Constructor - - - gtk.gdk.Pixmap - drawable - width - height - depth-1 - - - - drawable : - a gtk.gdk.Drawable used -to determine default values for the new pixmap or None 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 or -1 to use the depth of -drawable. - - - Returns : - a new gtk.gdk.Pixmap -object - - - - Creates a new gtk.gdk.Pixmap with -the size specified by width and -height and the number of bits per pixel specified by -depth. - - - - - Functions - - - gtk.gdk.bitmap_create_from_data - - - gtk.gdk.bitmap_create_from_data - drawable - data - width - height - - - - drawable : - a gtk.gdk.Drawable used -to determine default values for the new pixmap or None -to use the root window. - - - data : - a string containing the XBM -data - - - width : - the width of the new bitmap in -pixels. - - - height : - the height of the new bitmap in -pixels. - - - Returns : - a new bitmap (gtk.gdk.Pixmap) -object - - - - The gtk.gdk.bitmap_create_from_data() -function returns a new bitmap of the size specified by -width and height from the -XBM format string specified by -data. - - - - - gtk.gdk.pixmap_create_from_data - - - gtk.gdk.pixmap_create_from_data - drawable - data - width - height - depth - fg - bg - - - - drawable : - a gtk.gdk.Drawable used -to determine default values for the new pixmap or None if -depth is specified. - - - data : - the string containing the pixmap -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 or -1 to use the depth of -drawable. - - - fg : - the foreground color. - - - bg : - he background color. - - - Returns : - a new gtk.gdk.Pixmap -object - - - - The gtk.gdk.pixmap_create_from_data() -function creates a two-color gtk.gdk.Pixmap of -the size specified by width and -height from the XBM format string -specified by data. The foreground and background -colors of the pixmap are specified by fg and -bg respectively. If depth is --1 drawable is used to determine the bits per pixels -otherwise the value of depth is used. - - - - - gtk.gdk.pixmap_create_from_xpm - - gtk.gdk.pixmap_create_from_xpm - window - transparent_color - - - filename - - - - window : - a gtk.gdk.Drawable, - used to determine default values for the new gtk.gdk.Pixmap. - - - transparent_color : - the color to be used for the pixels that are -transparent in the input file or None to use a default -color. - - - filename : - the name of a file containing -XPM data. - - - Returns : - a tuple containing a new gtk.gdk.Pixmap -object and a bitmap that is the transparency mask. - - - - The gtk.gdk.pixmap_create_from_xpm() -function returns a tuple containing a gtk.gdk.Pixmap and a -bitmap transparency mask created from the XPM data in the -file specified by filename. -transparent_color (if not None) -specifies the gtk.gdk.Color to by -used for the transparent pixels. - - - - - gtk.gdk.pixmap_colormap_create_from_xpm - - - gtk.gdk.pixmap_colormap_create_from_xpm - window - colormap - transparent_color - filename - - - - window : - a gtk.gdk.Drawable, -used to determine default values for the new gtk.gdk.Pixmap or -None if a gtk.gdk.Colormap -is specified. - - - colormap : - the gtk.gdk.Colormap -that the new gtk.gdk.Pixmap will -be use or None to use the colormap of -window. - - - transparent_color : - the color to be used for the pixels that are -transparent in the input file or None to use a default -color. - - - filename : - the name of a file containing -XPM data. - - - Returns : - a tuple containing a new gtk.gdk.Pixmap -object and a bitmap that is the transparency mask. - - - - The -gtk.gdk.pixmap_colormap_create_from_xpm() function -returns a tuple containing a gtk.gdk.Pixmap and a -bitmap transparency mask created from the XPM data in the -file specified by filename. -transparent_color (if not None) -specifies the gtk.gdk.Color to by -used for the transparent pixels. If colormap is not -None it must specify a gtk.gdk.Colormap -that the new gtk.gdk.Pixmap will -use. If colormap is None the new -gtk.gdk.Pixmap -will use the colormap of window. - - - - - gtk.gdk.pixmap_create_from_xpm_d - - - gtk.gdk.pixmap_create_from_xpm_d - window - transparent_color - data - - - - window : - a gtk.gdk.Drawable, -used to determine default values for the new gtk.gdk.Pixmap. - - - transparent_color : - the color to be used for the pixels that are -transparent in the input file or None to use a default -color. - - - data : - a list of strings containing the -XPM data. - - - Returns : - a tuple containing a new gtk.gdk.Pixmap -object and a bitmap that is the transparency mask. - - - - The gtk.gdk.pixmap_create_from_xpm_d() -function returns a tuple containing a new gtk.gdk.Pixmap and a -bitmap transparency mask created from the XPM data -contained in data. -transparent_color (if not None) -specifies the gtk.gdk.Color to by -used for the transparent pixels. - - - - - gtk.gdk.pixmap_colormap_create_from_xpm_d - - - gtk.gdk.pixmap_colormap_create_from_xpm_d - window - colormap - transparent_color - data - - - - window : - a gtk.gdk.Drawable, -used to determine default values for the new gtk.gdk.Pixmap. - - - colormap : - the gtk.gdk.Colormap -that the new gtk.gdk.Pixmap will -be use or None to use the colormap of -window. - - - transparent_color : - the color to be used for the pixels that are -transparent in the input file or None to use a default -color. - - - data : - a list of strings containing the -XPM data. - - - Returns : - a tuple containing a new gtk.gdk.Pixmap -object and a bitmap that is the transparency mask. - - - - The -gtk.gdk.pixmap_colormap_create_from_xpm_d() function -returns a tuple containing a new gtk.gdk.Pixmap and a -bitmap transparency mask created from the XPM data -contained in data. -transparent_color (if not None) -specifies the gtk.gdk.Color to by -used for the transparent pixels. If colormap is not -None it must specify a gtk.gdk.Colormap -that the new gtk.gdk.Pixmap will -use. If colormap is None the new -gtk.gdk.Pixmap -will use the colormap of window. - - - - - gtk.gdk.pixmap_foreign_new - - - gtk.gdk.pixmap_foreign_new - anid - - - - anid : - a native window system pixmap -handle. - - - Returns : - the new gtk.gdk.Pixmap -wrapper for the native pixmap or None if the pixmap has -been destroyed. - - - - The gtk.gdk.pixmap_foreign_new() function -returns a gtk.gdk.Pixmap that -wraps the native window specified by anid for the -default display. If the pixmap has been destroyed this function returns -None. In the X backend, anid must -specify an Xlib XID that is a native pixmap handle. - - - - - gtk.gdk.pixmap_lookup - - - gtk.gdk.pixmap_lookup - anid - - - - anid : - a native window system pixmap -handle. - - - Returns : - the new gtk.gdk.Pixmap -wrapper for the native pixmap or None if the pixmap has -been destroyed. - - - - The gtk.gdk.pixmap_lookup() function -returns looks up and returns the gtk.gdk.Pixmap that -wraps the native pixmap handle specified by anid. -This method returns None if no gtk.gdk.Pixmap wraps -anid. In the X backend, anid -must specify an Xlib XID that is a native pixmap handle. - - - - - gtk.gdk.pixmap_foreign_new_for_display - - - gtk.gdk.pixmap_foreign_new_for_display - display - anid - - - - display : - a gtk.gdk.Display - object - - - anid : - a native window system pixmap -handle. - - - Returns : - the new gtk.gdk.Pixmap -wrapper for the native pixmap or None if the pixmap has -been destroyed. - - - - - This function is available in PyGTK2.2 and above. - - - The -gtk.gdk.pixmap_foreign_new_for_display() function -returns a gtk.gdk.Pixmap that -wraps the native window specified by anid for the -gtk.gdk.Display -specified by display. If the pixmap has been -destroyed this function returns None. In the X backend, -anid must specify an Xlib XID that is a native pixmap -handle. - - - - - gtk.gdk.pixmap_lookup_for_display - - - gtk.gdk.pixmap_lookup_for_display - display - anid - - - - display : - a gtk.gdk.Display - object - - - anid : - a native window system pixmap -handle. - - - Returns : - the new gtk.gdk.Pixmap -wrapper for the native pixmap or None if the pixmap has -been destroyed. - - - - - This function is available in PyGTK2.2 and above. - - - The gtk.gdk.pixmap_lookup_for_display() -function returns looks up and returns the gtk.gdk.Pixmap that -wraps the native pixmap handle specified by anid for -the gtk.gdk.Display -specified by display. This method returns -None if no gtk.gdk.Pixmap wraps -anid. In the X backend, anid -must specify an Xlib XID that is a native pixmap handle. - - - - - - diff --git a/docs/reference/pygtk-gdkrectangle.xml b/docs/reference/pygtk-gdkrectangle.xml deleted file mode 100644 index 19de9bb3..00000000 --- a/docs/reference/pygtk-gdkrectangle.xml +++ /dev/null @@ -1,240 +0,0 @@ - - - - - - gtk.gdk.Rectangle - an object holding data about a rectangle - - - - Synopsis - - - gtk.gdk.Rectangle - gobject.GBoxed - - gtk.gdk.Rectangle - x - 0 - y - 0 - width - 0 - height - 0 - - - intersect - src - - - union - src - - - - - - - - Attributes - -
- - - - - - - - - - "x" - Read-Write - The X coordinate of the top left corner of the -rectangle. - - - - "y" - Read-Write - The Y coordinate of the top left corner of the -rectangle. - - - - "width" - Read-Write - The width of the rectangle. - - - - "height" - Read-Write - The height of the rectangle. - - - - - -
- -
- - - Description - - A gtk.gdk.Rectangle -holds the position and size of a rectangle. The position is specified by the -"x" and "y" attributes and the size, by the "width" and "height" -attributes. - - - - - Constructor - - - gtk.gdk.Rectangle - x - 0 - y - 0 - width - 0 - height - 0 - - - - x : - the X coordinate of the top left corner of the -rectangle - - - y : - the Y coordinate of the top left corner of the -rectangle - - - width : - the width of the rectangle - - - height : - the height of the rectangle - - - Returns : - a new gtk.gdk.Rectangle -object - - - - Creates a new gtk.gdk.Rectangle -with the attributes specified by x, -y, width and -height. Any unspecified attributes default to -0. - - - - - Methods - - - gtk.gdk.Rectangle.intersect - - - intersect - src - - - - src : - a gtk.gdk.Rectangle -of a 4-tuple specifying the attributes of a rectangle as (x, y, width, -height) - - - Returns : - a gtk.gdk.Rectangle -that is the intersection of src and the -rectangle - - - - The intersect() method returns a gtk.gdk.Rectangle -that is the intersection of this rectangle and the gtk.gdk.Rectangle -specified by src. The value of -src is either a gtk.gdk.Rectangle -or a 4-tuple containing the position and size of a rectangle. If the -rectangles do not intersect the returned gtk.gdk.Rectangle -will have all attributes set to 0. - - - - - gtk.gdk.Rectangle.union - - - union - src - - - - src : - a gtk.gdk.Rectangle -of a 4-tuple specifying the attributes of a rectangle as (x, y, width, -height) - - - Returns : - a gtk.gdk.Rectangle -that includes both src and the -rectangle - - - - The union() method returns a gtk.gdk.Rectangle -that is the smallest rectangle containing both this rectangle and the gtk.gdk.Rectangle -specified by src. The value of -src is either a gtk.gdk.Rectangle -or a 4-tuple containing the position and size of a rectangle. - - - - - -
diff --git a/docs/reference/pygtk-gdkregion.xml b/docs/reference/pygtk-gdkregion.xml deleted file mode 100644 index d2631743..00000000 --- a/docs/reference/pygtk-gdkregion.xml +++ /dev/null @@ -1,579 +0,0 @@ - - - - - - gtk.gdk.Region - an object representing a set of pixels on the screen (new in - PyGTK 2.10) - - - - Synopsis - - - gtk.gdk.Region - gobject.GBoxed - - gtk.gdk.Region - - - - get_clipbox - - - - empty - - - - equal - other - - - point_in - x - y - - - rect_in - rect - - - copy - - - - offset - dx - dy - - - shrink - dx - dy - - - union_with_rect - rect - - - intersect - source2 - - - union - source2 - - - subtract - source2 - - - xor - source2 - - - - -Functions - - - gtk.gdk.region_rectangle - rectangle - - - - - - Description - - A gtk.gdk.Region - is an objrect holding a set of arbitrary pixels, and is usually used for - clipping graphical operations (see the gtk.gdk.GC.set_clip_region() - method). - - - - - Constructor - - - gtk.gdk.Region - - - - Returns : - a new gtk.gdk.Region -object - - - - - This constructor is available in PyGTK 2.10 and above. - - - Creates a new gtk.gdk.Region. - - - - - Methods - - - gtk.gdk.Region.get_clipbox - - - get_clipbox - - - - Returns : - returns the smallest rectangle which includes all - of the region. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_clipbox() method returns the - smallest rectangle which includes the entire region. - - - - - gtk.gdk.Region.empty - - - empty - - - - Returns : - True if the region is empty. - - - - - This method is available in PyGTK 2.10 and above. - - - The empty() method returns True if the - region is empty. - - - - - gtk.gdk.Region.equal - - - equal - other - - - - other : - a gtk.gdk.Region - - - Returns : - True if the region is equal to - other - - - - - This method is available in PyGTK 2.10 and above. - - - The equal() method returns True if the - region specified by other is equal to this - region. - - - - - gtk.gdk.Region.point_in - - - point_in - x - y - - - - x : - the x coordinate of a point. - - - y : - the y coordinate of a point. - - - Returns : - True if the point (x,y) is in the - region. - - - - - This method is available in PyGTK 2.10 and above. - - - The () method returns True if the point - specified by the coordinates x and - y is in a region. - - - - - gtk.gdk.Region.rect_in - - - rect_in - rect - - - - rect : - a rectangle (gtk.gdk.Rectangle - or 4-tuple representing a rectangle) - - - Returns : - a value indicating whether - rectangle is inside or outside the - region. - - - - - This method is available in PyGTK 2.10 and above. - - - The rect_in() method returns one of the - depending whether - the rectangle specified by rect is inside, - outside, or partly inside this region. - - - - - gtk.gdk.Region.copy - - - copy - - - - Returns : - a new gtk.gdk.Region - identical to the region - - - - - This method is available in PyGTK 2.10 and above. - - - The copy() method returns a new gtk.gdk.Region - identical to this region. - - - - - gtk.gdk.Region.offset - - - offset - dx - dy - - - - dx : - the distance to move this region - horizontally. - - - dy : - the distance to move this region - vertically. - - - - - This method is available in PyGTK 2.10 and above. - - - The offset() method moves this region - the distance specified by dx and - dy. - - - - - gtk.gdk.Region.shrink - - - shrink - dx - dy - - - - dx : - the number of pixels to shrink this region - horizontally. - - - dy : - the number of pixels to shrink this region - vertically. - - - - - This method is available in PyGTK 2.10 and above. - - - The shrink() method resizes this region - by the amount specified by dx and - dy. Positive values shrink the region. Negative - values expand it. - - - - - gtk.gdk.Region.union_with_rect - - - union_with_rect - rect - - - - rect : - a rectangle - - - - - This method is available in PyGTK 2.10 and above. - - - The union_with_rect() method sets the - area of this region to the union of the areas of this region and the - rectangle specified by rect. The resulting area - is the set of pixels contained in either the region or - rect. The value of rect - is either a gtk.gdk.Rectangle - or a 4-tuple containing the position and size of a rectangle. - - - - - gtk.gdk.Region.intersect - - - intersect - source2 - - - - source2 : - a gtk.gdk.Region - - - - - This method is available in PyGTK 2.10 and above. - - - The intersect() method sets the area of - this region to the intersection of the areas of this region and the - region specified by source2. The resulting area - is the set of pixels contained in both this region and - source2. - - - - - gtk.gdk.Region.union - - - union - source2 - - - - source2 : - a gtk.gdk.Region. - - - - - This method is available in PyGTK 2.10 and above. - - - The union() method sets the area of - this region to the union of the areas of this region and the region - specified by source2. The resulting area is the - set of pixels contained in either this region or - source2. - - - - - gtk.gdk.Region.subtract - - - subtract - source2 - - - - source2 : - a gtk.gdk.Region. - - - - - This method is available in PyGTK 2.10 and above. - - - The subtract() method sets the area of - this region to the subtraction of the areas of this region and the - region specified by source2. The resulting area - is the set of pixels contained in this region but not in - source2. - - - - - gtk.gdk.Region.xor - - - xor - source2 - - - - source2 : - a gtk.gdk.Region. - - - - - This method is available in PyGTK 2.10 and above. - - - The xor() method sets the area of this - region to the exclusive-OR of the areas of this region and the region - specified by source2. The resulting area is the - set of pixels contained in either this region or - source2 but not both. - - - - - - - Functions - - - gtk.gdk.region_rectangle - - - gtk.gdk.region_rectangle - rectangle - - - - rectangle : - a gtk.gdk.Rectangle - or a 4-tuple representing a rectangle. - - - Returns : - a new gtk.gdk.Region - - - - - This function is available in PyGTK 2.10 and above. - - - The gtk.gdk.region_rectangle() function - creates a new gtk.gdk.Region - containing the area specified by - rectangle. - - - - - - diff --git a/docs/reference/pygtk-gdkscreen.xml b/docs/reference/pygtk-gdkscreen.xml deleted file mode 100644 index 1b334944..00000000 --- a/docs/reference/pygtk-gdkscreen.xml +++ /dev/null @@ -1,1028 +0,0 @@ - - - - - gtk.gdk.Screen - an object representing a physical screen - - - - Synopsis - - - gtk.gdk.Screen - gobject.GObject - - get_default_colormap - - - - set_default_colormap - colormap - - - get_system_colormap - - - - get_system_visual - - - - get_rgb_colormap - - - - get_rgb_visual - - - - get_root_window - - - - get_display - - - - get_number - - - - get_width - - - - get_height - - - - get_width_mm - - - - get_height_mm - - - - list_visuals - - - - get_toplevel_windows - - - - make_display_name - - - - get_n_monitors - - - - get_monitor_geometry - monitor_num - - - get_monitor_at_point - x - y - - - get_monitor_at_window - window - - - broadcast_client_message - event - - - get_setting - name - - - get_rgba_colormap - - - - get_rgba_visual - - - - - -Functions - - - gtk.gdk.screen_width - - - gtk.gdk.screen_height - - - gtk.gdk.screen_width_mm - - - gtk.gdk.screen_height_mm - - - gtk.gdk.screen_get_default - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.gdk.Screen - - - - - - Signal Prototypes - - - - "size-changed" - - callback - screen - user_param1 - ... - - - - - - - - - Description - - - This object is available in PyGTK 2.2 and above. - - - gtk.gdk.Screen -objects are the PyGTK representation of a physical -screen. It is used throughout PyGTK to specify which -screen the top level windows are to be displayed on. It is also used to -query the screen specification and default settings such as the default -colormap (the get_default_colormap() -method), the screen width (the get_width() -method), etc. - - - a screen may consist of multiple monitors that are merged to -form a large screen area. - - - - - - Methods - - - gtk.gdk.Screen.get_default_colormap - - - get_default_colormap - - - - - Returns : - the default gtk.gdk.Colormap. - - - - - This method is available in PyGTK 2.2 and above. - - - The get_default_colormap() method -returns the default gtk.gdk.Colormap -for the screen. - - - - - gtk.gdk.Screen.set_default_colormap - - - set_default_colormap - colormap - - - - colormap : - a gtk.gdk.Colormap - - - - - This method is available in PyGTK 2.2 and above. - - - The set_default_colormap() method sets -the gtk.gdk.Colormap -specified by colormap as the default colormap for the -screen. - - - - - gtk.gdk.Screen.get_system_colormap - - - get_system_colormap - - - - - Returns : - the default colormap for the screen. - -Since: 2.2 - - - - - This method is available in PyGTK 2.2 and above. - - - The get_system_colormap() method -returns the system's default colormap for the screen - - - - - gtk.gdk.Screen.get_system_visual - - - get_system_visual - - - - - Returns : - the system gtk.gdk.Visual - - - - - This method is available in PyGTK 2.2 and above. - - - The get_system_visual() method returns -the system's default gtk.gdk.Visual for -the screen. This is the visual for the root window of the display. - - - - - gtk.gdk.Screen.get_rgb_colormap - - - get_rgb_colormap - - - - - Returns : - a gtk.gdk.Colormap - - - - - This method is available in PyGTK 2.2 and above. - - - The get_rgb_colormap() method returns -the preferred colormap for rendering image data on the screen. Not a very -useful function; historically, GDK could only render RGB -image data to one colormap and visual, but in the current version it can -render to any colormap and visual. So there's no need to call this -function. - - - - - gtk.gdk.Screen.get_rgb_visual - - - get_rgb_visual - - - - - Returns : - a gtk.gdk.Visual - - - - - This method is available in PyGTK 2.2 and above. - - - The get_rgb_visual() method returns a -"preferred visual" chosen for rendering RGB image data on -the screen. - - - - - gtk.gdk.Screen.get_root_window - - - get_root_window - - - - - Returns : - the root gtk.gdk.Window - - - - - This method is available in PyGTK 2.2 and above. - - - The get_root_window() method returns -the root gtk.gdk.Window of -the screen. - - - - - gtk.gdk.Screen.get_display - - - get_display - - - - - Returns : - the display that the screen belongs - to - - - - - This method is available in PyGTK 2.2 and above. - - - The get_display() method returns the -gtk.gdk.Display -that the screen belongs to. - - - - - gtk.gdk.Screen.get_number - - - get_number - - - - - Returns : - the index - - - - - This method is available in PyGTK 2.2 and above. - - - The get_number() method returns the -index of the screen among the screens in its display. (See the get_display() -method) - - - - - gtk.gdk.Screen.get_width - - - get_width - - - - - Returns : - the width of the screen in - pixels. - - - - - This method is available in PyGTK 2.2 and above. - - - The get_width() method returns the -width of the screen in pixels - - - - - gtk.gdk.Screen.get_height - - - get_height - - - - - Returns : - the height of the screen in - pixels. - - - - - This method is available in PyGTK 2.2 and above. - - - The get_height() method returns the -height of the screen in pixels - - - - - gtk.gdk.Screen.get_width_mm - - - get_width_mm - - - - - Returns : - the width of the screen in - millimeters. - - - - - This method is available in PyGTK 2.2 and above. - - - The get_width_mm() method returns the -width of the screen in millimeters. Note that on some X servers this value -will not be correct. - - - - - gtk.gdk.Screen.get_height_mm - - - get_height_mm - - - - - Returns : - the height of the screen in pixels. - -Since: 2.2 - - - - - This method is available in PyGTK 2.2 and above. - - - The get_height_mm() method returns the -height of the screen in millimeters. Note that on some X servers this value -will not be correct. - - - - - gtk.gdk.Screen.list_visuals - - - list_visuals - - - - - Returns : - a list of gtk.gdk.Visual - - - - - This method is available in PyGTK 2.2 and above. - - - The list_visuals() method returns a list -of the available visuals for the screen. A gtk.gdk.Visual -describes a hardware image data format. For example, a visual might support -24-bit color, or 8-bit color, and might expect pixels to be in a certain -format. - - - - - gtk.gdk.Screen.get_toplevel_windows - - - get_toplevel_windows - - - - - Returns : - a list of the toplevel gtk.gdk.Window objects - - - - - This method is available in PyGTK 2.2 and above. - - - The get_toplevel_windows() method -returns a list of all toplevel gtk.gdk.Window -objects known to PyGTK on the screen. A toplevel window -is a child of the root window (see the gtk.gdk.get_default_root_window() -function). - - - - - gtk.gdk.Screen.make_display_name - - - make_display_name - - - - - Returns : - a generated nae - - - - - This method is available in PyGTK 2.2 and above. - - - The make_display_name() method -determines the name to pass to gtk.gdk.Display() to get -a gtk.gdk.Display -with this screen as the default screen. - - - - - gtk.gdk.Screen.get_n_monitors - - - get_n_monitors - - - - - Returns : - the number of monitors that the screen consists - of. - - - - - This method is available in PyGTK 2.2 and above. - - - The get_n_monitors() method returns the -number of monitors that the screen consists of. - - - - - gtk.gdk.Screen.get_monitor_geometry - - - get_monitor_geometry - monitor_num - - - - monitor_num : - the monitor number. - - - Returns : - a gtk.gdk.Rectangle - containing the monitor geometry - - - - - This method is available in PyGTK 2.2 and above. - - - The get_monitor_geometry() method -returns a gtk.gdk.Rectangle -representing the size and position of the individual monitor within the the -entire screen area. - - Note that the size of the entire screen area can be retrieved -via the get_width() -and get_height(). methods. - - - - - gtk.gdk.Screen.get_monitor_at_point - - - get_monitor_at_point - x - y - - - - x : - an x coordinate in the virtual - screen. - - - y : - a y coordinate in the virtual - screen. - - - Returns : - the number of the monitor that the point - (x,y) lies in, or a - monitor close to - (x,y) if the point - is not in any monitor. - - - - - This method is available in PyGTK 2.2 and above. - - - The get_monitor_at_point() method -returns the number of the monitor in which the point -(x,y) is located or the -closest monitor if not in a monitor. - - - - - gtk.gdk.Screen.get_monitor_at_window - - - get_monitor_at_window - window - - - - window : - a gtk.gdk.Window - - - Returns : - the number of the monitor that most of window is located. - - -Since: 2.2 - - - - - This method is available in PyGTK 2.2 and above. - - - The get_monitor_at_window() method -returns the number of the monitor that most of the gtk.gdk.Window -specified by window is in. If -window does not intersect any monitors, the closest -monitor to the main bounding rectangle of window is -returned. - - - - - gtk.gdk.Screen.broadcast_client_message - - - broadcast_client_message - event - - - - event : - the gtk.gdk.Event. - - - - - This method is available in PyGTK 2.2 and above. - - - The broadcast_client_message() method -sends a message to all top level windows. On X11, sends an X ClientMessage -event to all toplevel windows on the screen. - - 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. - - On Windows, broadcasts a message registered with the name -GDK_WIN32_CLIENT_MESSAGE to all top-level windows. The -amount of data is limited to one long, i.e. four bytes. - - - - - gtk.gdk.Screen.get_setting - - - get_setting - name - - - - name : - the name of the setting - - - Returns : - the value of - setting - - - - - This method is available in PyGTK 2.2 and above. - - - The get_setting() method returns the -value of the desktop-wide setting (specified by -setting) such as double-click time for the -screen. - - - - - gtk.gdk.Screen.get_rgba_colormap - - - get_rgba_colormap - - - - - Returns : - a gtk.gdk.Colormap - for use with windows with an alpha channel or None - if the capability is not available. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_rgba_colormap() method returns - a colormap to use for creating windows or pixmaps with an alpha - channel. The windowing system on which PyGTK is running may not - support this capability, in which case None will be - returned. Even if a non-None value is returned, - it's possible that the window's alpha channel won't be honored when - displaying the window on the screen: in particular, for X an - appropriate windowing manager and compositing manager must be running - to provide appropriate display. - - - - - gtk.gdk.Screen.get_rgba_visual - - - get_rgba_visual - - - - - Returns : - a gtk.gdk.Visual - to use for windows with an alpha channel or None - if the capability is not available. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_rgba_visual() method returns a - visual to use for creating windows or pixmaps with an alpha - channel. See the get_rgba_colormap() - method for caveats. - - - - - - - Functions - - - gtk.gdk.screen_width - - - gtk.gdk.screen_width - - - - Returns : - the width of the default screen in pixels. - - - - The gtk.gdk.screen_width() function -returns the width of the default screen in pixels. - - - - - gtk.gdk.screen_height - - - gtk.gdk.screen_height - - - - Returns : - the height of the default screen in pixels. - - - - The gtk.gdk.screen_height() function -returns the height of the default screen in pixels. - - - - - gtk.gdk.screen_width_mm - - - gtk.gdk.screen_width_mm - - - - Returns : - the width of the default screen in millimeters, though it is not - always correct. - - - - The gtk.gdk.screen_width_mm() function -returns the width of the default screen in millimeters. Note that on many X -servers this value will not be correct. - - - - - gtk.gdk.screen_height_mm - - - gtk.gdk.screen_height_mm - - - - Returns : - the height of the default screen in millimeters, though it is not - always correct. - - - - The gtk.gdk.screen_height_mm() function -returns the height of the default screen in millimeters. Note that on many X -servers this value will not be correct. - - - - - gtk.gdk.screen_get_default - - - gtk.gdk.screen_get_default - - - - Returns : - a gtk.gdk.Screen, - or None if there is no default - display. - - - - - - This function is available in PyGTK 2.2 and above. - - - The gtk.gdk.screen_get_default() function -returns the default gtk.gdk.Screen for -the default gtk.gdk.Display. (See -the gtk.gdk.display_get_default() -function). - - - - - - - Signals - - - The "size-changed" gtk.gdk.Screen Signal - - - callback - screen - user_param1 - ... - - - - - screen : - the screen that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "size-changed" signal is emitted when the pixel width or -height of a screen changes. - - - - - - diff --git a/docs/reference/pygtk-gdkvisual.xml b/docs/reference/pygtk-gdkvisual.xml deleted file mode 100644 index b659c1a6..00000000 --- a/docs/reference/pygtk-gdkvisual.xml +++ /dev/null @@ -1,716 +0,0 @@ - - - - - - gtk.gdk.Visual - an object containing hardware display -information - - - - Synopsis - - - gtk.gdk.Visual - gobject.GObject - - gtk.gdk.Visual - depth - visual_type - - - get_screen - - - - - -Functions - - - gtk.gdk.list_visuals - - - gtk.gdk.visual_get_best - - - gtk.gdk.visual_get_best_depth - - - gtk.gdk.visual_get_best_type - - - gtk.gdk.visual_get_best_with_depth - depth - - gtk.gdk.visual_get_best_with_type - type - - gtk.gdk.visual_get_system - - - gtk.gdk.query_depths - - - gtk.gdk.query_visual_types - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.gdk.Visual - - - - - - Attributes - -
- - - - - - - - - - "bits_per_rgb" - Read - The number of significant bits per red, green, or blue -when specifying colors for this visual. (For instance, for the gtk.gdk.Colormap.alloc_color() -method) - - - - "blue_mask" - Read - A mask giving the bits in a pixel value that correspond -to the blue field. - - - - "blue_prec" - Read - See above. - - - - "blue_shift" - Read - The blue_shift and -blue_prec give an alternate presentation of the -information in blue_mask. - - - - "byte_order" - Read - The byte-order for this visual - either: -gtk.gdk.LSB_FIRST or -gtk.gdk.MSB_FIRST. - - - - "colormap_size" - Read - The number of entries in the colormap, for visuals of -type gtk.gdk.VISUAL_PSEUDO_COLOR or -gtk.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. - - - - "depth" - Read - The number of bits per pixel. - - - - "green_mask" - Read - A mask giving the bits in a pixel value that correspond -to the green field. - - - - "green_prec" - Read - See above. - - - - "green_shift" - Read - The green_shift and -green_prec give an alternate presentation of the -information in green_mask. - - - - "red_mask" - Read - A mask giving the bits in a pixel value that correspond -to the red field. Significant only for -gtk.gdk.VISUAL_PSEUDOCOLOR and -gtk.gdk.VISUAL_DIRECTCOLOR. - - - - "red_prec" - Read - See above. - - - - "red_shift" - Read - 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 bits starting at bit number -red_shift. - - - - "type" - Read - The type of this visual - one of: -gtk.gdk.VISUAL_STATIC_GRAY, -gtk.gdk.VISUAL_GRAYSCALE, -gtk.gdk.VISUAL_STATIC_COLOR, -gtk.gdk.VISUAL_PSEUDO_COLOR, -gtk.gdk.VISUAL_TRUE_COLOR, -gtk.gdk.VISUAL_DIRECT_COLOR - - - - - -
- -
- - - Description - - A gtk.gdk.Visual -describes a particular video hardware display format. 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. For example, a piece of display hardware might support -24-bit color, 16-bit color, or 8-bit color; meaning 24/16/8-bit pixel sizes. -For a given pixel size, pixels can be in different formats; for example the -"red" element of an RGB pixel may be in the top 8 bits of the pixel, or may -be in the lower 4 bits. - - Usually you can avoid thinking about visuals in -PyGTK. Visuals are useful to interpret the contents of a -gtk.gdk.Image, -but you should avoid gtk.gdk.Image -precisely because its contents depend on the display hardware; use gtk.gdk.Pixbuf -instead, for all but the most low-level purposes. Also, anytime you provide -a gtk.gdk.Colormap, -the visual is implied as part of the colormap (see the gtk.gdk.Colormap.get_visual() -method), so you won't have to provide a visual in addition. - - There are several standard visuals. The visual returned by the -gtk.gdk.visual_get_system() -function is the system's default visual. The gtk.gdk.rgb_get_visual() -function returns 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 the gtk.gdk.rgb_get_colormap() -function). - - 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, -gtk.gdk.VISUAL_PSEUDO_COLOR is preferred at 8bpp, -otherwise, the visual types are ranked in the order of (highest to lowest) -gtk.gdk.VISUAL_DIRECT_COLOR, -gtk.gdk.VISUAL_TRUE_COLOR, -gtk.gdk.VISUAL_PSEUDO_COLOR, -gtk.gdk.VISUAL_STATIC_COLOR, -gtk.gdk.VISUAL_GRAYSCALE, then -gtk.gdk.VISUAL_STATIC_GRAY. - - - - - Constructor - - - gtk.gdk.Visual - depth - visual_type - - - - depth : - a bit depth - - - visual_type : - a visual type - - - Returns : - the best gtk.gdk.Visual with -both depth and visual_type, or -None if none - - - - Creates a new gtk.gdk.Visual that -is the best choice for the specified depth and -visual_type. Color visuals and visuals with mutable -colormaps are preferred over grayscale or fixed-colormap visuals and visuals -with higher color depths are considered better. The value of -visual_type must be one of: - - - - gtk.gdk.VISUAL_STATIC_GRAY - - Each pixel value indexes a grayscale value -directly. - - - - gtk.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. - - - - gtk.gdk.VISUAL_STATIC_COLOR - - Each pixel value is an index into a predefined, -unmodifiable color map that maps pixel values into RGB values. - - - - gtk.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. - - - - gtk.gdk.VISUAL_TRUE_COLOR - - Each pixel value directly contains red, green, and blue -components. The red_mask, green_mask, and blue_mask fields of the gtk.gdk.Visual -structure describe how the components are assembled into a pixel -value. - - - - gtk.gdk.VISUAL_DIRECT_COLOR - - Each pixel value contains red, green, and blue components -as for gtk.gdk.TRUE_COLOR, but the components are mapped -via a color table into the final output table instead of being converted -directly. - - - - - - - - - - Methods - - - gtk.gdk.Visual.get_screen - - - get_screen - - - - Returns : - the screen that this visual belongs -to. - - - - - This method is available in PyGTK 2.2 and above. - - - The get_screen() method returns the -gtk.gdk.Screen -that this visual belongs to. - - - - - - - Functions - - - gtk.gdk.list_visuals - - - gtk.gdk.list_visuals - - - - Returns : - a list of gtk.gdk.Visual -objects - - - - The gtk.gdk.list_visuals() function returns -a list containing the available gtk.gdk.Visual -objects for the default screen. - - - - - gtk.gdk.visual_get_best - - - gtk.gdk.visual_get_best - - - - Returns : - the best gtk.gdk.Visual for -the default screen - - - - The gtk.gdk.visual_get_best() function -returns the visual with the most available colors for the default -screen. - - - - - gtk.gdk.visual_get_best_depth - - - gtk.gdk.visual_get_best_depth - - - - Returns : - the gtk.gdk.Visual with -the best depth. - - - - The gtk.gdk.visual_get_best_depth() -function returns the gtk.gdk.Visual with -the best depth for the default screen where "best" means the largest - - - - - gtk.gdk.visual_get_best_type - - - gtk.gdk.visual_get_best_type - - - - Returns : - the gtk.gdk.Visual with -the best type for the default screen - - - - The gtk.gdk.visual_get_best_type() function -returns the best available gtk.gdk.Visual type -for the default screen. - - - - - gtk.gdk.visual_get_best_with_depth - - - gtk.gdk.visual_get_best_with_depth - depth - - - - depth : - the number of bits per -pixel - - - Returns : - the best gtk.gdk.Visual for -the specified depth - - - - The gtk.gdk.visual_get_best_with_depth() -function returns the best gtk.gdk.Visual with -the specified depth. - - - - - gtk.gdk.visual_get_best_with_type - - - gtk.gdk.visual_get_best_with_type - type - - - - type : - a visual type - - - Returns : - the best gdkVisual for the visual type -specified by type - - - - The gtk.gdk.visual_get_best_with_type() -function returns the best gtk.gdk.Visual for -the visual type specified by type. The value of -visual_type must be one of: - - - - gtk.gdk.VISUAL_STATIC_GRAY - - Each pixel value indexes a grayscale value -directly. - - - - gtk.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. - - - - gtk.gdk.VISUAL_STATIC_COLOR - - Each pixel value is an index into a predefined, -unmodifiable color map that maps pixel values into RGB values. - - - - gtk.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. - - - - gtk.gdk.VISUAL_TRUE_COLOR - - Each pixel value directly contains red, green, and blue -components. The red_mask, green_mask, and blue_mask fields of the gtk.gdk.Visual -structure describe how the components are assembled into a pixel -value. - - - - gtk.gdk.VISUAL_DIRECT_COLOR - - Each pixel value contains red, green, and blue -components as for gtk.gdk.TRUE_COLOR, but the components -are mapped via a color table into the final output table instead of being -converted directly. - - - - - - - - - - gtk.gdk.visual_get_system - - - gtk.gdk.visual_get_system - - - Returns : - the system gtk.gdk.Visual - - - - - The gtk.gdk.visual_get_system() function -returns the default gtk.gdk.Visual for -the system's default screen. - - - - - gtk.gdk.query_depths - - - gtk.gdk.query_depths - - - Returns : - a tuple containing the unique supported - visual depths - - - - - - This function is available in PyGTK 2.4 and above. - - - The gtk.gdk.query_depths() function returns -a tuple containing the unique supported visual depths for the default -screen. It's equivalent to listing the visuals (see the gtk.gdk.list_visuals() -function) and then looking at the depth field in each visual, removing -duplicates. - - - - - gtk.gdk.query_visual_types - - - gtk.gdk.query_visual_types - - - Returns : - the system gtk.gdk.Visual - - - - - The gtk.gdk.query_visual_types() function -returns a tuple containing the unique visual types supported by the default -screen.It's equivalent to listing the visuals (see the gtk.gdk.list_visuals() -function) and then looking at the type field in each visual, removing -duplicates. - - The returned value will be one of: - - - - gtk.gdk.VISUAL_STATIC_GRAY - - Each pixel value indexes a grayscale value - directly. - - - - gtk.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. - - - - gtk.gdk.VISUAL_STATIC_COLOR - - Each pixel value is an index into a predefined, - unmodifiable color map that maps pixel values into RGB - values. - - - - gtk.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. - - - - gtk.gdk.VISUAL_TRUE_COLOR - - Each pixel value directly contains red, green, and blue - components. The red_mask, green_mask, and blue_mask fields of - the gtk.gdk.Visual - structure describe how the components are assembled into a pixel - value. - - - - gtk.gdk.VISUAL_DIRECT_COLOR - - Each pixel value contains red, green, and blue - components as for gtk.gdk.VISUAL_TRUE_COLOR, - but the components are mapped via a color table into the final - output table instead of being converted directly. - - - - - - - - - - -
diff --git a/docs/reference/pygtk-gdkwindow.xml b/docs/reference/pygtk-gdkwindow.xml deleted file mode 100644 index dd7a0b20..00000000 --- a/docs/reference/pygtk-gdkwindow.xml +++ /dev/null @@ -1,4414 +0,0 @@ - - - - - - gtk.gdk.Window - on-screen display areas in the target window -system - - - - Synopsis - - - gtk.gdk.Window - gtk.gdk.Drawable - - - gtk.gdk.Window - parent - width - height - window_type - event_mask - wclass - title - None - x - -1 - y - -1 - visual - None - colormap - None - cursor - None - wmclass_name - None - wmclass_class - None - override_redirect - -1 - - - drag_begin - targets - - - input_set_extension_events - mask - mode - - - property_get - property - type - None - pdelete - False - - - property_change - property - type - format - mode - data - - - property_delete - property - - - selection_convert - selection - target - time - - - - - - set_keep_above - setting - - - set_keep_below - setting - - - destroy - - - - get_window_type - - - - show - - - - hide - - - - withdraw - - - - move - x - y - - - resize - width - height - - - move_resize - x - y - width - height - - - reparent - new_parent - x - y - - - clear - - - - clear_area - x - y - width - height - - - clear_area_e - x - y - width - height - - - raise_ - - - - lower - - - - focus - timestamp - 0L - - - set_user_data - user_data - - - get_user_data - - - - set_override_redirect - override_redirect - - - add_filter - function - dataNone - - - - - - scroll - dx - dy - - - shape_combine_mask - shape_mask - offset_x - offset_y - - - set_child_shapes - - - - merge_child_shapes - - - - is_visible - - - - is_viewable - - - - get_state - - - - set_static_gravities - use_static - - - set_type_hint - hint - - - set_modal_hint - modal - - - set_skip_taskbar_hint - skips_taskbar - - - set_skip_pager_hint - skips_pager - - - set_geometry_hints - min_width-1 - min_height-1 - max_width-1 - max_height-1 - base_width-1 - base_height-1 - width_inc-1 - height_inc-1 - min_aspect-1.0 - max_aspect-1.0 - - - begin_paint_rect - rectangle - - - begin_paint_region - region - - - end_paint - - - - set_title - title - - - set_role - role - - - set_transient_for - leader - - - set_background - color - - - set_back_pixmap - pixmap - parent_relative - - - set_cursor - cursor - - - get_geometry - - - - get_position - - - - get_origin - - - - get_root_origin - - - - get_frame_extents - - - - get_pointer - - - - get_parent - - - - get_toplevel - - - - get_children - - - - get_events - - - - set_events - event_mask - - - set_icon_list - pixbufs - - - set_icon - icon_window - pixmap - mask - - - set_icon_name - name - - - set_group - leader - - - get_group - - - - set_decorations - decorations - - - get_decorations - - - set_functions - functions - - - iconify - - - - deiconify - - - - stick - - - - unstick - - - - maximize - - - - unmaximize - - - - fullscreen - - - - unfullscreen - - - - register_dnd - - - - begin_resize_drag - edge - button - root_x - root_y - timestamp - - - begin_move_drag - button - root_x - root_y - timestamp - - - invalidate_rect - rect - invalidate_children - - - invalidate_region - region - invalidate_children - - - - - - get_update_area - - - - freeze_updates - - - - thaw_updates - - - - process_updates - update_children - - - - - - set_accept_focus - accept_focus - - - enable_synchronized_configure - - - - configure_finished - - - - set_focus_on_map - focus_on_map - - - set_urgency_hint - urgent - - - move_region - region - dx - dy - - - shape_combine_region - shape_region - offset_x - offset_y - - - input_shape_combine_mask - mask - x - y - - - input_shape_combine_region - shape_region - offset_x - offset_y - - - - -Functions - - - gtk.gdk.window_foreign_new - anid - - gtk.gdk.window_foreign_new_for_display - display - anid - - gtk.gdk.get_default_root_window - - - gtk.gdk.window_get_toplevels - - - gtk.gdk.window_lookup - anid - - gtk.gdk.window_lookup_for_display - display - anid - - gtk.gdk.window_process_all_updates - - - gtk.gdk.gdk_window_set_debug_updates - setting - - gtk.gdk.window_at_pointer - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.gdk.Drawable - +-- gtk.gdk.Window - - - - - - Description - - gtk.gdk.Window is a -rectangular region on the screen. It's a low-level object, used to implement -high-level objects such as gtk.Widget and gtk.Window. A gtk.Window is a -toplevel window, the object a user might think of as a "window" with a -titlebar and so on. A gtk.Window may -contain several gtk.gdk.Window -objects since most widgets use a gtk.gdk.Window. - - A gtk.gdk.Window -object interacts with the native window system for input and events. Some -gtk.Widget -objects do not have an associated gtk.gdk.Window and -therefore cannot receive events. To receive events on behalf of these -"windowless" widgets a gtk.EventBox must -be used. - - - - - Constructor - - - gtk.gdk.Window - parent - width - height - window_type - event_mask - wclass - title - None - x - -1 - y - -1 - visual - None - colormap - None - cursor - None - wmclass_name - None - wmclass_class - None - override_redirect - -1 - - - - parent : - a gtk.gdk.Window - - - width : - the width of the window in -pixels - - - height : - the height of the window in -pixels - - - window_type : - the window type - - - event_mask : - the bitmask of events received by the -window - - - wclass : - the class of window - either -gtk.gdk.INPUT_OUTPUT or -gtk.gdk.INPUT_ONLY - - - title : - the window title if a toplevel -window - - - x : - the x coordinate of the window position relative -to parent - - - y : - the y coordinate of the window position relative -to parent - - - visual : - the gtk.gdk.Visual for -the window - - - colormap : - the gtk.gdk.Colormap -for the window - - - cursor : - the gtk.gdk.Cursor for -the window - - - wmclass_name : - don't use this - see the gtk.Window.set_wmclass() -method for more information. - - - wmclass_class : - don't use this - see the gtk.Window.set_wmclass() -method for more information. - - - override_redirect : - if True bypass the window -manager - - - Returns : - the new gtk.gdk.Window - - - - Creates a new gtk.gdk.Window of -the type and class specified by window_type and -wclass. The window will be a child of the specified -parent and will have the specified -width and height. -event_mask is a bitfield specifying the events that -the window will receive - see the set_events() -method for more information. The value of window_type -must be one of the . - - The value of wclass must be one of the -. - - If the optional parameters are not specified the corresponding -attribute values will have default values: - - - - x - - 0 - - - - y - - 0 - - - - visual - - the default system visual - see the gtk.gdk.visual_get_system() -function - - - - colormap - - either the system gtk.gdk.Colormap -if using the system gtk.gdk.Visual (see -the gtk.gdk.colormap_get_system() -function) or a new gtk.gdk.Colormap -using visual - - - - cursor - - use the parent window's cursor - - - - override_redirect - - False - - - - - - - - - - Methods - - - gtk.gdk.Window.drag_begin - - - drag_begin - targets - - - - targets : - a list of offered targets - - - Returns : - a new gtk.gdk.DragContext - - - - The drag_begin() method starts a drag -operation and returns the new gtk.gdk.DragContext -created for it. The list of targets (integer values) supported by the drag -source are specified by targets. - - - - - gtk.gdk.Window.input_set_extension_events - - - input_set_extension_events - mask - mode - - - - mask : - the event mask to be used - - - mode : - the set of extension events to -receive - - - - The input_set_extension_events() method -enables or disables the extension events specified by -mode for the window when using the event mask -specified by mask. The value of -mode must be one of the . - - - - - gtk.gdk.Window.property_get - - - property_get - property - type - 0 - pdelete - False - - - - property : - the property to get - - - type : - the type of property to get or not specified if -any type of property data is acceptable. - - - pdelete : - if True, delete the property -after retrieving the data. - - - Returns : - a tuple containing the actual property type, -the data format and the data - - - - The property_get() method returns a -tuple containing the actual property type (as a gtk.gdk.Atom), the -format and the data of the specified property with -the specified type. The value of -type may not be be specified in which case it will be -0 to match any type of property. the returned data will be a string if the -data format is 8; a list of integers if the data format is 16; or, a list of -gtk.gdk.Atom -objects or integers if the data format is 32. If -property cannot be found None is -returned. property and type -(if specified) must be a string or a gtk.gdk.Atom. - - - - - gtk.gdk.Window.property_change - - - property_change - property - type - format - mode - data - - - - property : - the property to change - - - type : - the new type of the property. If -mode is gtk.gdk.PROP_MODE_PREPEND -or gtk.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 gtk.gdk.PROP_MODE_PREPEND -or gtk.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 for the property - - - - The property_change() method changes -the contents of the specified property to the -specified data with the specified -type and format. The value of -mode must be one of the which describes how the -new data is to be combined with the existing property data.The value of -format must be 8, 16 or -32. property and type must be -a string or a gtk.gdk.Atom. - - - - - gtk.gdk.Window.property_delete - - - property_delete - property - - - - property : - the property to delete - - - - The property_delete() method deletes -the specified property from the window. -property must be a string or a gtk.gdk.Atom. - - - - - gtk.gdk.Window.selection_convert - - - selection_convert - selection - target - time - - - - selection : - the selection to retrieve - - - target : - the target form of -selection - - - time : - the timestamp to use when retrieving -selection. The selection owner may refuse the request -if it did not own the selection at the time indicated by the -timestamp. - - - - The selection_convert() method converts -the specified selection to the specified -form. - - - - - - - gtk.gdk.Window.set_keep_above - - - set_keep_above - setting - - - - setting : - xif True keep the window - above other windows - - - - - This method is available in PyGTK 2.4 and above. - - - The set_keep_above() method sets the -"keep-above" setting to the value of setting. If -setting is True the window must be -kept above other windows. If the window is already above, then this method -does nothing. - - On X11, asks the window manager to keep the window above, if the -window manager supports this operation. Not all window managers support -this, and some deliberately ignore it or don't have a concept of "keep -above", but most standard window managers do. - - - - - gtk.gdk.Window.set_keep_below - - - set_keep_below - setting - - - - setting : - if True, keep the window - below other windows - - - - - This method is available in PyGTK 2.4 and above. - - - The set_keep_below() method sets the -"keep-below" setting to the value of setting. If -setting is True the window must be -kept below other windows. If the window was already below, then this -method does nothing. - - On X11, asks the window manager to keep the window below, if the -window manager supports this operation. Not all window managers support -this, and some deliberately ignore it or don't have a concept of "keep -below" but most standard window managers do. - - - - - gtk.gdk.Window.destroy - - - destroy - - - - The destroy() method destroys the -window (destroys the server-side resource associated with the window). All -children of the window are also destroyed. There's normally no need to use -this method since windows are automatically destroyed when their reference -count reaches 0. - - - - - gtk.gdk.Window.get_window_type - - - get_window_type - - - - - Returns : - the type of window - - - - The get_window_type() method returns -the type of the window which is one of the . - - - - - gtk.gdk.Window.show - - - show - - - - The show() method maps the window so -it's visible on-screen and also raises it to the top of the window stack -(moves the window to the front of the Z-order). This method is opposite to -the hide() -method. When implementing a gtk.Widget, you -should call this method on the widget's gtk.gdk.Window as -part of the "map" method. - - - - - gtk.gdk.Window.hide - - - hide - - - - The hide() method withdraws toplevel -windows, so they will no longer be known to the window manager and for all -windows, unmaps them, so they won't be displayed. This is normally done -automatically as part of the gtk.Widget.hide() -method. - - - - - gtk.gdk.Window.withdraw - - - withdraw - - - - The withdraw() method withdraws the -window (unmaps it and asks the window manager to forget about it). This is -normally done automatically by the gtk.Widget.hide() -method called on a gtk.Window. - - - - - gtk.gdk.Window.move - - - move - x - y - - - - x : - the X coordinate relative to the window's -parent - - - y : - the Y coordinate relative to the window's -parent - - - - The move() method repositions the -window to the location specified by x and -y relative to its parent window. For toplevel -windows, window managers may ignore or modify the move. You should probably -use the gtk.Window.move() -method on a gtk.Window widget -anyway, instead of using this method. For child windows, the move will -reliably succeed. If you're also planning to resize the window, use the -move_resize() -method to both move and resize simultaneously, for a nicer visual -effect. - - - - - gtk.gdk.Window.resize - - - resize - width - height - - - - width : - the new width of the -window - - - height : - the new height of the -window - - - - The resize() method resizes the window -to the specified width and -height. For toplevel windows, this method asks the -window manager to resize the window. However, the window manager may not -allow the resize. You should use the gtk.Window.resize() -method instead of this low-level method. Windows may not be resized smaller -than 1x1. If you're also planning to move the window, use the move_resize() -method to both move and resize simultaneously, for a nicer visual -effect. - - - - - gtk.gdk.Window.move_resize - - - move_resize - x - y - width - height - - - - x : - the new X position relative to the window's -parent - - - y : - the new Y position relative to the window's -parent - - - width : - the new width - - - height : - the new height - - - - The move_resize() method repositions -the window to the location specified by x and -y with the size specified by -width and height. This method -is equivalent to calling the move() and -resize() -methods, except that both operations are performed at once, avoiding strange -visual effects. (i.e. the user may be able to see the window first move, -then resize, if you don't use the move_resize() -method.) - - - - - gtk.gdk.Window.reparent - - - reparent - new_parent - x - y - - - - new_parent : - the new parent gtk.gdk.Window to -move the window into - - - x : - the X location inside the new -parent - - - y : - the Y location inside the new -parent - - - - The reparent() method reparents the -window into the gtk.gdk.Window -specified new_parent. The window being reparented -will be unmapped as a side effect. - - - - - gtk.gdk.Window.clear - - - clear - - - - The clear() method clears an entire the -window to the background color or background pixmap. - - - - - gtk.gdk.Window.clear_area - - - clear_area - x - y - width - height - - - - x : - the X coordinate of the rectangle to -clear - - - y : - the Y coordinate of the rectangle to -clear - - - width : - the width of the rectangle to -clear - - - height : - the height of the rectangle to -clear - - - - The clear_area() method clears the area -(specified by x, y, -width and height) of the -window to the background color or background pixmap. - - - - - gtk.gdk.Window.clear_area_e - - - clear_area_e - x - y - width - height - - - - x : - the X coordinate of the rectangle to -clear - - - y : - the Y coordinate of the rectangle to -clear - - - width : - the width of the rectangle to -clear - - - height : - the height of the rectangle to -clear - - - - The clear_area_e() method is like the -clear_area(), -but also generates an expose event for the cleared area. - - - - - gtk.gdk.Window.raise_ - - - raise_ - - - - The raise_() method raises the window to -the top of the Z-order (stacking order), so that other windows with the same -parent window appear below the window. If the window is a toplevel, the -window manager may choose to deny the request to move the window in the -Z-order. Therefore, the raise_() -method only requests the restack, it does not guarantee it. - - - This method is called raise() in - the C API, but was renamed raise_() - since raise is a reserved Python keyword. - - - - - gtk.gdk.Window.lower - - - lower - - - - The lower() method lowers the window to the bottom of the -Z-order (stacking order), so that other windows with the same parent window -appear above the window. If the window is a toplevel, the window manager may -choose to deny the request to move the window in the Z-order. Therefore, the -lower() -only requests the restack, it does not guarantee it. Note that the show() -method raises the window again, so don't call this method before calling the -show() -method to avoid duplication. - - - - - gtk.gdk.Window.focus - - - focus - timestamp - 0L - - - - timestamp : - the timestamp of the event triggering the -window focus - - - - The focus() method sets keyboard focus -to the window. If the window is not on-screen this will not work. In most -cases, the gtk.Window.present() -method should be used on a gtk.Window, rather -than calling this method. - - - - - gtk.gdk.Window.set_user_data - - - set_user_data - user_data - - - - user_data : - a gtk.Widget - - - - - This method is available in PyGTK 2.4 and above. - - - The set_user_data() method stores the -underlying GTK+ widget of the PyGTK widget that is specified by -user_data as the user data of the window. In general -GTK+ stores the widget that owns a gtk.gdk.Window as -user data on a gtk.Window. So, -custom widget implementations in PyGTK should use this -method to provide that capability. If GTK+ receives an -event for a gtk.gdk.Window, and -the user data for the window is set, GTK+ will assume the -user data is a gtk.Widget, and -forward the event to that widget. - - In PyGTK 2.4 and above this method will raise the TypeError -exception if user_data is not a gtk.Widget. - - - This method is deprecated for any use other than the above. To -set other user data on a gtk.gdk.Window use -the gobject.GObject.set_data() -method instead. - - - - - - gtk.gdk.Window.get_user_data - - - get_user_data - - - - - Returns : - the user data set on the - window - - - - - This method is available in PyGTK 2.4 and above. - - - The get_user_data() method returns the -PyGTK widget that was set as the user data of the window using the set_user_data() -method. This method raises the ValueError exception if the user data is not -set or is not a PyGTK object. - - - - - gtk.gdk.Window.set_override_redirect - - - set_override_redirect - override_redirect - - - - override_redirect : - if True the window should be -override redirect - - - - The set_override_redirect() method sets -the "override redirect" attribute on the window to the value specified by -override_redirect. If -override_redirect is True the -window is not under the control of the window manager. This means it won't -have a titlebar, won't be minimizable, etc. - it will be entirely under the -control of the application. The window manager can't see the override -redirect window at all. Override redirect should only be used for -short-lived temporary windows, such as popup menus. gtk.Menu uses an -override redirect window in its implementation, for example. This method -does not work on MS Windows. - - - - - gtk.gdk.Window.add_filter - - - add_filter - function - dataNone - - - - function : - a function - - - data : - data to pass to - function - - - - - This method is available in PyGTK 2.2 and above. - - - The add_filter() method adds an event -filter function specified by function to the window, -allowing you to intercept events before they reach GDK. This is a low-level -operation and makes it easy to break GDK and/or GTK+, so you have to know -what you're doing. Once added there is no way to remove a filter -function. The function signature is: - - - def function(event, user_data) - - - where event is a gtk.gdk.Event and -user_data is data. If -data is not specified then -user_data is not passed to -function. - - function should return one of the -following values which is on of the . - - - - - - - gtk.gdk.Window.scroll - - - scroll - dx - dy - - - - dx : - the amount to scroll in the X -direction - - - dy : - the amount to scroll in the Y -direction - - - - The scroll() method scrolls the -contents of the window, both pixels and children, by the horizontal and -vertical amounts specified by dx and -dy respectively. The window itself does not move. -Portions of the window that the scroll operation brings in from off-screen -areas are invalidated. The invalidated region may be bigger than what would -strictly be necessary. (For X11, a minimum area will be invalidated if the -window has no subwindows, or if the edges of the window's parent do not -extend beyond the edges of the window. In other cases, a multi-step process -is used to scroll the window which may produce temporary visual artifacts -and unnecessary invalidations.) - - - - - gtk.gdk.Window.shape_combine_mask - - - shape_combine_mask - shape_mask - offset_x - offset_y - - - - shape_mask : - the shape bitmap mask - - - offset_x : - the X position of shape mask with respect to -the window - - - offset_y : - the Y position of shape mask with respect to -the window - - - - The shape_combine_mask() method applies -the bitmap mask specified by shape_mask to the window -at the location specified by x and -y. Pixels in the window corresponding to set bits in -the shape_mask will be visible; pixels in the window -corresponding to unset bits in the shape_mask will be -transparent. This method provides a non-rectangular window. If -shape_mask is None, the shape mask -will be unset, and the x/y -parameters are not used. - - On the X11 platform, this uses an X server extension which is -widely available on most common platforms, but not available on very old X -servers, and occasionally the implementation will be buggy. On servers -without the shape extension, this function will do nothing. - - - - - gtk.gdk.Window.set_child_shapes - - - set_child_shapes - - - - The set_child_shapes() method sets the -shape mask of the window to the union of shape masks for all children of the -window, ignoring the shape mask of the window itself. Contrast this method -with the merge_child_shapes() -method that includes the shape mask of the window in the masks to be -merged. - - - - - gtk.gdk.Window.merge_child_shapes - - - merge_child_shapes - - - - The merge_child_shapes() method merges -the shape masks for any child windows into the shape mask for the window. -i.e. the union of all masks for the window and its children will become the -new mask for the window. See the shape_combine_mask() -method. This method is distinct from the set_child_shapes() -method because it includes the window's shape mask in the set of shapes to -be merged. - - - - - gtk.gdk.Window.is_visible - - - is_visible - - - - - Returns : - True if the window is -mapped - - - - The is_visible() method returns -True if the window has been mapped (with the show() -method. - - - - - gtk.gdk.Window.is_viewable - - - is_viewable - - - - - Returns : - True if the window is -viewable - - - - The is_viewable() method returns -True if the window and all its ancestors are mapped. -(This is not necessarily "viewable" in the X sense, since we only check as -far as we have gtk.gdk.Window -parents, not to the root window.) - - - - - gtk.gdk.Window.get_state - - - get_state - - - - - Returns : - the window state bitfield - - - - The get_state() method returns the -bitwise OR of the currently active . - - - - - gtk.gdk.Window.set_static_gravities - - - set_static_gravities - use_static - - - - use_static : - if True turn on static -gravity - - - Returns : - True if the server supports -static gravity - - - - The set_static_gravities() method sets -the bit gravity of the given window to the value specified by -use_static. If use_static is -True the window uses static gravity and all children get -static subwindow gravity as well. This method returns -True if the window system server supports static -gravity. - - - - gtk.gdk.Window.set_type_hint - - - set_type_hint - hint - - - - hint : - a hint of the function this window will -have - - - - The set_type_hint() method provides the -specified hint to the window manager about the -functionality of a window. The window manager can use this information when -determining the decoration and behavior of the window. The hint must be set -before the window is mapped. The value of hint must be one of the . - - - - - gtk.gdk.Window.set_modal_hint - - - set_modal_hint - modal - - - - modal : - if True the window is -modal. - - - - The set_modal_hint() method sets the -window's modal hint to the value specified by modal. -If modal is True the window is -modal. The window manager can use this information to handle modal windows -in a special way which usually means that the window gets all the input for -the application effectively blocking input to other windows in the -application. . You should only use this on windows for which you have -previously called the set_transient_for() -method - - - - - gtk.gdk.Window.set_skip_taskbar_hint - - - set_skip_taskbar_hint - modal - - - - skip_taskbar : - if True skip the - taskbar. - - - - - This method is available in PyGTK 2.2 and above. - - - The set_skip_taskbar_hint() method sets -the "skip_taskbar" setting to the value specified by -skips_taskbar. If -skips_taskbar is True the window -should not appear in a task list or window -list. If the window's semantic type as specified with the set_type_hint() -method already fully describes the window, this method should not be called in addition; instead you should allow -the window to be treated according to standard policy for its semantic -type. - - - - - gtk.gdk.Window.set_skip_pager_hint - - - set_skip_pager_hint - skips_pager - - - - skips_pager : - if True skip the pager - - - - - This method is available in PyGTK 2.2 and above. - - - The set_skip_pager_hint() method sets -the "skip_pager" setting to the value of skips_pager. If skips_pager is True -the window should not appear in a pager (a -workspace switcher, or other desktop utility program that displays a small -thumbnail representation of the windows on the desktop). If the window's -semantic type as specified with set_type_hint() -already fully describes the window, this method should not be called in addition, instead you should allow -the window to be treated according to standard policy for its semantic -type. - - - - - gtk.gdk.Window.set_geometry_hints - - - set_geometry_hints - min_width-1 - min_height-1 - max_width-1 - max_height-1 - base_width-1 - base_height-1 - width_inc-1 - height_inc-1 - min_aspect-1.0 - max_aspect-1.0 - - - - min_width : - minimum width of window or -1 to use -requisition - - - min_height : - minimum height of window or -1 to use -requisition - - - max_width : - maximum width of window or -1 to use -requisition - - - max_height : - maximum height of window or -1 to use -requisition - - - base_width : - allowed window widths are -base_width + width_inc * N (where N is any integer) or --1 - - - base_height : - allowed window widths are -base_height + height_inc * N (where N is any integer) or --1 - - - width_inc : - width resize increment - - - height_inc : - height resize increment - - - min_aspect : - minimum width/height ratio - - - max_aspect : - maximum width/height ratio - - - - - This method is available in PyGTK 2.2 and above. - - - The set_geometry_hints() method sets -the geometry hints for the window. - - This method provides hints to the windowing system about -acceptable sizes for a toplevel window. The purpose of this is to constrain -user resizing, but the windowing system will typically (but is not required -to) also constrain the current size of the window to the provided values and -constrain programmatic resizing via gdk_window_resize() or -gdk_window_move_resize(). - - Note that on X11, this effect has no effect on windows of type -GDK_WINDOW_TEMP or windows where override_redirect has been turned on via -the set_override_redirect() -method since these windows are not resizable by the user. - - - - - - - gtk.gdk.Window.begin_paint_rect - - - begin_paint_rect - rectangle - - - - rectangle : - the rectangle you intend to draw -to - - - - The begin_paint_rect() method indicates -that you are beginning the process of redrawing the area specified by -rectangle. A backing store (off-screen buffer) large -enough to contain rectangle will be created. The -backing store will be initialized with the background color or background -pixmap for window. Then, all drawing operations performed on the window will -be diverted to the backing store. When you call the end_paint() -method, the backing store will be copied to the window, making it visible -on-screen. Only the part of window contained in region will be modified; that -is, drawing operations are clipped to rectangle. The -net result of all this is to remove flicker, because the user sees the -finished product appear all at once when you call the end_paint() -method. If you draw to window directly without calling the -begin_paint_rect() method, the user may see flicker -as individual drawing operations are performed in sequence. The clipping and -background initializing features of the -begin_paint_rect() are conveniences for the -programmer, so you can avoid doing that work yourself. - - - - - gtk.gdk.Window.begin_paint_region - - - begin_paint_region - region - - - - region : - the region you intend to draw to - - - - - This method is available in PyGTK 2.10 and above. - - - The begin_paint_region() method - indicates that you are beginning the process of redrawing the gtk.gdk.Region - specified by region. A backing store - (off-screen buffer) large enough to contain - region will be created. The backing store will - be initialized with the background color or background pixmap for the - window. Then, all drawing operations performed on the window will be - diverted to the backing store. When you call the end_paint() - method, the backing store will be copied to the window, making it - visible on-screen. Only the part of the window contained in - region will be modified; that is, drawing - operations are clipped to region. - - The net result of all this is to remove flicker, because the - user sees the finished product appear all at once when you call the - end_paint() - method. If you draw to the window directly without calling the begin_paint_region() - method, the user may see flicker as individual drawing operations are - performed in sequence. The clipping and background initializing - features of the begin_paint_region() - method are conveniences for the programmer, so you can avoid doing - that work yourself. - - The widget system automatically places calls to the begin_paint_region() - and end_paint() - methods around emissions of the "expose_event" signal. That is, if - you're writing an expose event handler, you can assume that the - exposed area in a gtk.gdk.EXPOSE type gtk.gdk.Event - has already been cleared to the window background, is already set as - the clip region, and already has a backing store. Therefore in most - cases, application code need not call the begin_paint_region() - method. (You can disable the automatic calls around expose events on a - widget-by-widget basis by calling gtk.Widget.set_double_buffered().) - - If you call this method multiple times before calling the - matching the end_paint() - method, the backing stores are pushed onto a stack. The end_paint() - method copies the topmost backing store on-screen, subtracts the - topmost region from all other regions in the stack, and pops the - stack. All drawing operations affect only the topmost backing store in - the stack. One matching call to the end_paint() - method is required for each call to the begin_paint_region() - method. - - - - - gtk.gdk.Window.end_paint - - - end_paint - - - - The end_paint() method indicates that -the backing store created by the most recent call to the begin_paint_rect() -method should be copied on-screen and deleted, leaving the next-most-recent -backing store or no backing store at all as the active paint region. It is -an error to call this function without a matching call to the begin_paint_rect() -method first. - - - - - gtk.gdk.Window.set_title - - - set_title - title - - - - title : - the new title of the -window - - - - The set_title() method sets the title -of a toplevel window, to the string specified by -title. If you haven't explicitly set the icon name -for the window (using the set_icon_name() -method), the icon name will be set to title as well. -title must be in UTF-8 encoding (as with all -user-readable strings in PyGTK). - - - - - gtk.gdk.Window.set_role - - - set_role - role - - - - role : - a string indicating its -role - - - - The set_role() method sets the string -specified by role as the window's role. When using -PyGTK, you should generally use the gtk.Window.set_role() -method instead of this low-level function. The window manager and session -manager use a window's role to distinguish it from other kinds of window in -the same application. When an application is restarted after being saved in -a previous session, all windows with the same title and role are treated as -interchangeable. So if you have two windows with the same title that should -be distinguished for session management purposes, you should set the role on -those windows. It doesn't matter what string you use for the role, as long -as you have a different role for each non-interchangeable kind of -window. - - - - - gtk.gdk.Window.set_transient_for - - - set_transient_for - leader - - - - leader : - another gtk.gdk.Window - - - - The set_transient_for() method -indicates to the window manager that the window is a transient dialog -associated with the application window leader. This -allows the window manager to do things like center the window on -leader and keep the window above -leader. See the gtk.Window.set_transient_for() -method if you're using a gtk.Window or gtk.Dialog. - - - - - gtk.gdk.Window.set_background - - - set_background - color - - - - color : - an allocated gtk.gdk.Color - - - - The set_background() method sets the -background gtk.gdk.Color of the -window to the value specified by color. (However, -when using PyGTK, set the background of a widget with the -gtk.Widget.modify_bg() -method from an application - or the gtk.Style.set_background() -method from a custom widget implementation.) The -color must be allocated Also see the set_back_pixmap() -method. - - - - - gtk.gdk.Window.set_back_pixmap - - - set_back_pixmap - pixmap - parent_relative - - - - pixmap : - a gtk.gdk.Pixmap, or -None - - - parent_relative : - if True the tiling origin is -at the origin of the window's parent - - - - The set_back_pixmap() method sets the -background pixmap of the window to the value specified by -pixmap A background pixmap will be tiled, positioning -the first tile at the origin of the window, or if -parent_relative is True, the -tiling will be done based on the origin of the parent window (useful to -align tiles in a parent with tiles in a child). If -pixmap is None the window will -have no background which means it will never have its background filled by -the windowing system. Instead the window will contain whatever pixels were -already in the corresponding area of the display. The windowing system will -normally fill a window with its background when the window is obscured then -exposed, and when you call the clear() -method. - - - - - gtk.gdk.Window.set_cursor - - - set_cursor - cursor - - - - cursor : - a gtk.gdk.Cursor or -None - - - - The set_cursor() method sets the mouse -pointer for a gtk.gdk.Window. Use -either the gtk.gdk.Cursor() or -gtk.gdk.Cursor() constructors -to create the cursor. To make the cursor invisible, use the gtk.gdk.Cursor() constructor to -create a cursor with no pixels in it. Passing None for -the cursor argument to the -set_cursor() method means that the window will use -the cursor of its parent window. Most windows should use this -default. - - - - - gtk.gdk.Window.get_geometry - - - get_geometry - - - - - Returns : - a 5-tuple containing the X and Y coordinate of -the location of the window relative to its parent and the width and height -of the window and the bit depth of the window. - - - - The get_geometry() method returns a -5-tuple containing the window's location and size (x, y, width, height) and -the bit depth of the window. The X and Y coordinates returned are relative -to the parent window of the window, which for toplevels usually means -relative to the window decorations (titlebar, etc.) rather than relative to -the root window (screen-size background window). - - -On the X11 platform, the geometry is obtained from the X server, so reflects -the latest position of the window; this may be out-of-sync with the position -of the window delivered in the most-recently-processed -GdkEventConfigure. the get_position() -method in contrast gets the position from the most recent configure -event. - - - - - gtk.gdk.Window.get_position - - - get_position - - - - - Returns : - a 2-tuple containing the X and Y coordinates of -the window location. - - - - The get_position() returns a 2-tuple -containing the position of the window as reported in the -most-recently-processed GdkEventConfigure. By comparison -with the get_geometry() -method that queries the X server for the current window position, regardless -of what events have been received or processed. The position coordinates are -relative to the window's parent window. - - - - - gtk.gdk.Window.get_origin - - - get_origin - - - - - Returns : - a 2-tuple containing the X and Y coordinates of -the window - - - - The get_origin() method returns a -2-tuple containing the x and y coordinates of the position of a window in -root window coordinates. (Compare this method with the get_position() -and get_geometry() -methods that return the position of a window relative to its parent -window.) - - - - - gtk.gdk.Window.get_root_origin - - - get_root_origin - - - - - Returns : - a 2-tuple containing the X and Y coordinates of -the window frame position - - - - The get_root_origin() method returns a -2-tuple containing the top-left corner of the window manager frame in root -window coordinates. - - - - - gtk.gdk.Window.get_frame_extents - - - get_frame_extents - - - - - Returns : - a gtk.gdk.Rectangle -specifying the bounding box of the window frame - - - - The get_frame_extents() method returns -a gtk.gdk.Rectangle -specifying the bounding box of the window, including window manager -titlebar/borders if any. The frame position is given in root window -coordinates. To get the position of the window itself (rather than the -frame) in root window coordinates, use the get_origin() -method. - - - - - gtk.gdk.Window.get_pointer - - - get_pointer - - - - - Returns : - a 3-tuple containing the X and Y coordinates of -the mouse pointer and the modifier mask - - - - The get_pointer() method returns a -3-tuple containing the coordinates of the mouse pointer location relative to -the window and the modifier state. The modifier state is a combination of -the . - - - - - gtk.gdk.Window.get_parent - - - get_parent - - - - - Returns : - the parent gtk.gdk.Window of -the window - - - - The get_parent() method returns the -parent of the window as set when the gtk.gdk.Window was -created or when the reparent() -method was called. - - - - - gtk.gdk.Window.get_toplevel - - - get_toplevel - - - - - Returns : - the toplevel gtk.gdk.Window -containing the window - - - - The get_toplevel() method returns the -toplevel gtk.gdk.Window -that's an ancestor of the window. - - - - - gtk.gdk.Window.get_children - - - get_children - - - - - Returns : - the list of child windows inside the -window - - - - The get_children() method returns the -list of children gtk.gdk.Window -objects of the window. This method only returns children created via -PyGTK, so for example it's useless when used with the -root window; it only returns windows an application created itself. - - - - - gtk.gdk.Window.get_events - - - get_events - - - - - Returns : - the event mask for the -window - - - - The get_events() method returns the -event mask for the window. See the set_events() -method for more detail. - - - - - gtk.gdk.Window.set_events - - - set_events - event_mask - - - - event_mask : - the event mask for the -window - - - - The set_events() method sets the event -mask to the value specified by event_mask for the window. The event mask -determines which events will be reported for the window. For example, an -event mask including gtk.gdk.BUTTON_PRESS_MASK means the -window should report button press events. The event mask is the bitwise OR -of the . - - - - - gtk.gdk.Window.set_icon_list - - - set_icon_list - pixbufs - - - - pixbufs : - a list (or tuple) containing pixbufs, of - different sizes. - - - - - This method is available in PyGTK 2.2 and above. - - - The set_icon_list() method sets the -list of icons for the window. pixbufs is a list or tuple containing gtk.gdk.Pixbuf -objects to be used as the icon images. One of these will be used to -represent the window when it has been iconified. The icon is usually shown -in an icon box or some sort of task bar. Which icon size is shown depends on -the window manager. The window manager can scale the icon but setting -several size icons can give better image quality since the window manager -may only need to scale the icon by a small amount or not at all. - - - - - gtk.gdk.Window.set_icon - - - set_icon - icon_window - pixmap - mask - - - - icon_window : - a gtk.gdk.Window to -use for the icon - - - pixmap : - a gtk.gdk.Pixmap to -use as the icon - - - mask : - a 1-bit pixmap (GdkBitmap) -to use as mask for pixmap - - - - The set_icon() method sets the icon of -the window as a gtk.gdk.Pixmap -(specified by pixmap) or gtk.gdk.Window -specified by icon_window). Investigate the gtk.window_set_default_icon_list()() -function first, and then the gtk.Window.set_icon_list() -and gtk.Window.set_icon() -methods. If those don't meet your needs, look at the set_icon_list() -method. Only if all those are too high-level do you want to fall back to the -set_icon(). - - - - - gtk.gdk.Window.set_icon_name - - - set_icon_name - name - - - - name : - the name of the window while iconified -(minimized) - - - - The set_icon_name() method sets the -name of the window when it is iconified to the value of -name. Windows may have a name used while minimized, -distinct from the name they display in their titlebar. Most of the time this -is a bad idea from a user interface standpoint. But you can set such a name -with this method, if you like. - - - - - gtk.gdk.Window.set_group - - - set_group - leader - - - - leader : - the group leader gtk.gdk.Window - - - - The set_group() method sets the group -leader for the window to the gtk.gdk.Window -specified by leader. By default, the group leader -for all toplevel windows is set to a global window implicitly created by -PyGTK. With this method you can override this default. -The group leader window allows the window manager to distinguish all windows -that belong to a single application. It may for example allow users to -minimize or unminimize all windows belonging to an application at once. You -should only set a non-default group window if your application pretends to -be multiple applications. The group leader window may not be changed after a -window has been mapped (with the show() -method for example). - - - - - gtk.gdk.Window.get_group - - - get_group - - - - - Returns : - the group leader gtk.gdk.Window - for the window - - - - - This method is available in PyGTK 2.4 and above. - - - The get_group() method returns the -group leader gtk.gdk.Window for -the window. See the set_group() -method for more information. - - - - - gtk.gdk.Window.set_decorations - - - set_decorations - decorations - - - - decorations : - the decoration hint mask - - - - The set_decorations() method sets the -specified decorations for the window. "Decorations" are the features the -window manager adds to a toplevel gtk.gdk.Window. This -method sets the traditional Motif window manager hints that tell the window -manager which decorations you would like your window to have. Usually you -should use the gtk.Window.set_decorated() -method on a gtk.Window instead -of using this method directly. The value of -decorations is the logical OR of the . - - - - - gtk.gdk.Window.get_decorations - - - get_decorations - - - - - Returns : - the window decorations - - - - The get_decorations() method returns -the decorations set on the window with the set_decorations -method. - - - - - gtk.gdk.Window.set_functions - - - set_functions - functions - - - - functions : - the bitmask of operations to allow on the -window - - - - The set_functions() method sets the -traditional Motif window manager hint for which operations the window -manager should allow on a toplevel window. However, few window managers do -anything reliable or interesting with this hint. Many ignore it -entirely. The functions argument is the logical OR of -the . - - - - - gtk.gdk.Window.iconify - - - iconify - - - - The iconify() method asks the window -manager to iconify (minimize) the window. The window manager may choose to -ignore the request, but normally will honor it. Using the gtk.Window.iconify() -method is preferred, if you have a gtk.Window -widget. - - - - - gtk.gdk.Window.deiconify - - - deiconify - - - - The deiconify() method asks the window -manager to deiconify (unminimize) the window. On X11 the window manager may -choose to ignore the request to deiconify. Using the gtk.Window.deiconify() -method is preferred. Or better yet, use the gtk.Window.present(), -which raises the window, focuses it, unminimizes it, and puts it on the -current desktop. - - - - - gtk.gdk.Window.stick - - - stick - - - - The stick() method "pins" a window such -that it's on all workspaces and does not scroll with viewports, for window -managers that have scrollable viewports. (When using a gtk.Window, the -gtk.Window.stick() -method may be more useful.) On the X11 platform, this method depends on -window manager support, so may have no effect with many window managers. -However, PyGTK will do the best it can to convince the -window manager to stick the window. For window managers that don't support -this operation, there's nothing you can do to force it to happen. - - - - - gtk.gdk.Window.unstick - - - unstick - - - - The unstick() method reverses the -effect of the stick() -method. See the stick() -and gtk.Window.unstick() -methods for more information. - - - - - gtk.gdk.Window.maximize - - - maximize - - - - The maximize() method asks the window -manager to maximize the window, if the window manager supports this -operation. Not all window managers support this, and some deliberately -ignore it or don't have a concept of "maximized"; so you can't rely on the -maximization actually happening. But it will happen with most standard -window managers. If the window was already maximized, then this method does -nothing. - - - - - gtk.gdk.Window.unmaximize - - - unmaximize - - - - The unmaximize() method asks the window -manager to unmaximize the window, if the window manager supports this -operation. Not all window managers support this, and some deliberately -ignore it or don't have a concept of "maximized"; so you can't rely on the -unmaximization actually happening. But it will happen with most standard -window managers. If the window wasn't maximized, then this method does -nothing. - - - - - gtk.gdk.Window.fullscreen - - - fullscreen - - - - - This method is available in PyGTK 2.2 and above. - - - The fullscreen() method moves the window -into fullscreen mode. This means the window covers the entire screen and is -above any panels or task bars. - - If the window was already fullscreen, then this method does -nothing. - - On X11, asks the window manager to put the window in a -fullscreen state, if the window manager supports this operation. Not all -window managers support this, and some deliberately ignore it or don't have -a concept of "fullscreen" but most standard window managers do. - - - - - gtk.gdk.Window.unfullscreen - - - unfullscreen - - - - - This method is available in PyGTK 2.2 and above. - - - The unfullscreen() method moves the -window out of fullscreen mode. If the window was not fullscreen, does -nothing. - - On X11, asks the window manager to move the window out of the -fullscreen state, if the window manager supports this operation. Not all -window managers support this, and some deliberately ignore it or don't have -a concept of "fullscreen" but most standard window managers do. - - - - - gtk.gdk.Window.register_dnd - - - register_dnd - - - - The register_dnd() method registers the -window as a potential drop destination. - - - - - gtk.gdk.Window.begin_resize_drag - - - begin_resize_drag - edge - button - root_x - root_y - timestamp - - - - edge : - the edge or corner from which the drag is -started - - - button : - the mouse button being used to -drag - - - root_x : - the root window X coordinate of the mouse click -that began the drag - - - root_y : - the root window Y coordinate of the mouse click -that began the drag - - - timestamp : - the timestamp of the mouse click that began the -drag (use the gtk.gdk.Event.get_time() -method) - - - - The begin_resize_drag() method begins a -window resize operation (for a toplevel gtk.gdk.Window) from -the specified edge using the specified -button starting at the location specified by -root_x and root_y. The value -of edge must be one of the . - - You might use this -method to implement a "window resize grip," for example; in fact the gtk.Statusbar -uses it. The method works best with window managers that support the -Extended Window Manager Hints spec (see http://www.freedesktop.org), -but has a fallback implementation for other window managers. - - - - - gtk.gdk.Window.begin_move_drag - - - begin_move_drag - button - root_x - root_y - timestamp - - - - button : - the button being used to -drag - - - root_x : - the root window X coordinate of the mouse click -that began the drag - - - root_y : - the root window Y coordinate of the mouse click -that began the drag - - - timestamp : - the timestamp of the mouse click that began the -drag - - - - The begin_move_drag() method begins a -window move operation (for a toplevel window) using the specified -button starting at the location specified by -root_x and root_y. You might -use this method to implement a "window move grip," for example. The method -works best with window managers that support the Extended Window Manager -Hints spec (see http://www.freedesktop.org), -but has a fallback implementation for other window managers. - - - - - gtk.gdk.Window.invalidate_rect - - - invalidate_rect - rect - invalidate_children - - - - rect : - the rectangle to -invalidate - - - invalidate_children : - if True invalidate child -gtk.gdk.Window -objects - - - - The invalidate_rect() method -invalidates the rectangular region specified by rect. If -invalidate_children is True the -child gtk.gdk.Window -object of the window are also invalidated. - - - - - gtk.gdk.Window.invalidate_region - - - invalidate_region - region - invalidate_children - - - - region : - a gtk.gdk.Region - - - invalidate_children : - If True also invalidate child - windows - - - - - This method is available in PyGTK 2.10 and above. - - - The invalidate_region() method adds the - gtk.gdk.Region - specified by region to the update area for the - window. The update area is the region that needs to be redrawn, or the - "dirty region." The call to the process_updates() - method sends one or more expose events to the window, which together - cover the entire update area. An application would normally redraw the - contents of the window in response to those expose events. - - PyGTK will call the gtk.gdk.window_process_all_updates() - method on your behalf whenever your program returns to the main loop - and becomes idle, so normally there's no need to do that manually, you - just need to invalidate regions that you know should be - redrawn. - - The invalidate_children parameter - controls whether the region of each child window that intersects - region will also be invalidated. If - False, then the update area for child windows will - remain unaffected. - - - - - - - - - gtk.gdk.Window.get_update_area - - - get_update_area - - - - - Returns : - a gtk.gdk.Region - conatining the update area for the window - - - - - This method is available in PyGTK 2.10 and above. - - - The get_update_area() method returns a - gtk.gdk.Region - containing the update area and transfers ownership of the update area from - the window to the caller of the method. That is, after calling this - method, the window will no longer have an invalid/dirty region; the update - area is removed from the window and passed in the returned gtk.gdk.Region. If - a window has no update area, the get_update_area() - method returns None. - - - - - gtk.gdk.Window.freeze_updates - - - freeze_updates - - - - The freeze_updates() method temporarily -freezes the window such that it won't receive expose events. The window will -begin receiving expose events again when the thaw_updates() -method is called. If the freeze_updates() method -has been called more than once, the thaw_updates() -method must be called an equal number of times to begin processing -exposes. - - - - - gtk.gdk.Window.thaw_updates - - - thaw_updates - - - - The thaw_updates() method thaws a -window frozen with the freeze_updates() -method. - - - - - gtk.gdk.Window.process_updates - - - process_updates - update_children - - - - update_children : - if True process updates for -child windows - - - - The process_updates() method sends one -or more expose events to the window. The areas in each expose event will -cover the entire update area for the window (see the invalidate_rect() -method for details). Normally PyGTK calls the gtk.gdk.window_process_all_updates() -function on your behalf, so there's no need to call this method unless you -want to force expose events to be delivered immediately and synchronously -(vs. the usual case, where PyGTK delivers them in an idle -handler). Occasionally this is useful to produce nicer scrolling behavior, -for example. - - - - - - - gtk.gdk.Window.set_accept_focus - - - set_accept_focus - accept_focus - - - - accept_focus : - if True, the window should - receive input focus - - - - - This method is available in PyGTK 2.4 and above. - - - The set_accept_focus() method sets the -"accept_focus setting to the value of -accept_focus. If accept_focus -is True the window will accept focus; if -False hints to the desktop environment that the window -doesn't want to receive input focus. - - On X, it is the responsibility of the window manager to -interpret this hint. ICCCM-compliant window manager usually respect -it. - - - - - gtk.gdk.Window.enable_synchronized_configure - - - enable_synchronized_configure - - - - This method is available in PyGTK 2.6 and above. - - - The enable_synchronized_configure() -method indicates that the application will cooperate with the window system -in synchronizing the window repaint with the window manager during resizing -operations. After an application calls this method, it must call the configure_finished() -method every time it has finished all processing associated with a set of -Configure events. Toplevel GTK+ windows automatically use this -protocol. - - On X, calling this function makes window participate in the -_NET_WM_SYNC_REQUEST window manager protocol. - - - - - gtk.gdk.Window.configure_finished - - - configure_finished - - - - This method is available in PyGTK 2.6 and above. - - - The configure_finished() method signals -to the window system that the application has finished handling all the -Configure events it has received. Window Managers can use this to better -synchronize the frame repaint with the application. GTK+ applications will -automatically call this function when appropriate. - - This function can only be called if the enable_synchronized_configure() -method was called previously. - - - - - gtk.gdk.Window.set_focus_on_map - - - set_focus_on_map - focus_on_map - - - - focus_on_map : - if True the window should -receive input focus when mapped. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_focus_on_map() method sets the -a hint for the desktop environment to the value specified by -focus_on_map. If focus_on_map -is True the window sets a hint for the desktop -environment indicating that it would like to receive input focus when -mapped. - - On X, it is the responsibility of the window manager to -interpret this hint. Window managers following the freedesktop.org window manager -extension specification should respect it. - - - - - gtk.gdk.Window.set_urgency_hint - - - set_urgency_hint - urgent - - - - urgent : - if True the window requires -urgent user attention. - - - - - This method is available in PyGTK 2.10 and above. - - - The set_urgency_hint() method sets the -a hint for the desktop environment to the value specified by -urgent. If urgent is -True the window sets a hint for the desktop environment -indicating that it needs urgent user attention. - - - - - gtk.gdk.Window.move_region - - - move_region - region - dx - dy - - - - region : - the gtk.gdk.Region to move - - - dx : - the distance to move horizontally - - - dy : - the distance to move vertically - - - - - This method is available in PyGTK 2.10 and above. - - - The move_region() method moves the part - of window indicated by the gtk.gdk.Region - specified by region by - dy pixels in the Y direction and - dx pixels in the X direction. The portions of - region that are not covered by the new position - of region are invalidated. - - - - - gtk.gdk.Window.shape_combine_region - - - shape_combine_region - shape_region - offset_x - offset_y - - - - shape_region : - the region of the window to leave - opaque - - - offset_x : - X position of shape_region - in window coordinates - - - offset_y : - Y position of shape_region - in window coordinates - - - - - This method is available in PyGTK 2.10 and above. - - - The shape_combine_region() method makes - pixels in the window outside of the gtk.gdk.Region - specified by shape_region transparent, so - that the window may be nonrectangular. See the shape_combine_mask() - method to use a bitmap as the mask. - - If shape_region is - None, the shape will be unset, so the whole window - will be opaque again. offset_x and - offset_y are ignored if - shape_region is None. - - This method works on both toplevel and child windows. - - On the X11 platform, this uses an X server extension which is - widely available on most common platforms, but not available on very - old X servers, and occasionally the implementation will be buggy. On - servers without the shape extension, this method will do - nothing. - - - - - gtk.gdk.Window.input_shape_combine_mask - - - input_shape_combine_mask - mask - x - y - - - - mask : - the shape bitmap mask - - - x : - the X position of shape mask with respect to -the window - - - y : - the Y position of shape mask with respect to -the window - - - - - This method is available in PyGTK 2.10 and above. - - - The input_shape_combine_mask() method - is similar to the shape_combine_mask() - method but the shape applies only to event handling. Mouse events - which happen while the pointer position corresponds to an unset bit in - the mask will be passed onto the window below this window. - - An input shape is typically used with RGBA windows. The alpha - channel of the window defines which pixels are invisible and allows - for nicely antialiased borders, and the input shape controls where the - window is "clickable". - - On the X11 platform, this requires version 1.1 of the shape - extension. - - - - - gtk.gdk.Window.input_shape_combine_region - - - input_shape_combine_region - shape_region - offset_x - offset_y - - - - shape_region : - the region of the window to leave - opaque - - - offset_x : - X position of shape_region - in window coordinates - - - offset_y : - Y position of shape_region - in window coordinates - - - - - This method is available in PyGTK 2.10 and above. - - - The input_shape_combine_region() method - is similar to the shape_combine_region() - method, but the shape applies only to event handling. Mouse events - which happen while the pointer position corresponds to an unset bit in - shape_region will be passed onto the window - below this window. - - An input shape is typically used with RGBA windows. The alpha - channel of the window defines which pixels are invisible and allows - for nicely antialiased borders, and the input shape controls where the - window is "clickable". - - On the X11 platform, this requires version 1.1 of the shape - extension. - - - - - - - Functions - - - gtk.gdk.window_foreign_new - - - gtk.gdk.window_foreign_new - anid - - - - anid : - a native window system ID - - - Returns : - the new gtk.gdk.Window -wrapper for the native window or None if the window has -been destroyed. - - - - The gtk.gdk.window_foreign_new() function -wraps a native window specified by anid for the default display in a gtk.gdk.Window. This -may fail if the window has been destroyed. For example in the X Window -System backend, a native window handle is an Xlib -XID. - - - - - gtk.gdk.window_foreign_new_for_display - - - gtk.gdk.window_foreign_new_for_display - display - anid - - - - display : - a gtk.gdk.Display - - - anid : - a native window system ID - - - Returns : - the new gtk.gdk.Window -wrapper for the native window or None if the window has -been destroyed. - - - - - This function is available in PyGTK 2.2 and above. - - - The -gtk.gdk.window_foreign_new_for_display() function wraps -a native window specified by anid for the gtk.gdk.Display -specified by display in a gtk.gdk.Window. This -may fail if the window has been destroyed. For example in the X Window -System backend, a native window handle is an Xlib -XID. - - - - - gtk.gdk.get_default_root_window - - - gtk.gdk.get_default_root_window - - - - - Returns : - the default root gtk.gdk.Window - - - - The gtk.gdk.get_default_root_window() -function returns the root gtk.gdk.Window (the -parent window that all other windows are inside) for the default display and -screen. - - - - - gtk.gdk.window_get_toplevels - - - gtk.gdk.window_get_toplevels - - - - - Returns : - a list containing the toplevel gtk.gdk.Window -object - - - - The gtk.gdk.window_get_toplevels() function -returns a list of all toplevel windows known to PyGTK on -the default screen. A toplevel window is a child of the root window (see the -gtk.gdk.get_default_root_window() -function). - - - - - gtk.gdk.window_lookup - - - gtk.gdk.window_lookup - anid - - - - anid : - a native window system ID - - - Returns : - the gtk.gdk.Window -wrapper for the native window or None if there is -none. - - - - The gtk.gdk.window_lookup() function looks -up the gtk.gdk.Window that -wraps the native window handle specified by anid. For -example in the X Window System backend, a native window handle is an Xlib -XID. - - - - - gtk.gdk.window_lookup_for_display - - - gtk.gdk.window_lookup_for_display - display - anid - - - - display : - a gtk.gdk.Display - - - anid : - a native window system ID - - - Returns : - the gtk.gdk.Window -wrapper for the native window or None if there is -none. - - - - - This function is available in PyGTK 2.2 and above. - - - The gtk.gdk.window_lookup_for_display() -function looks up the gtk.gdk.Window that -wraps the native window handle specified by anid for -the gtk.gdk.Display -specified by display. For example in the X Window -System backend, a native window handle is an Xlib -XID. - - - - - gtk.gdk.window_process_all_updates - - - gtk.gdk.window_process_all_updates - - - - The gtk.gdk.process_all_updates() function -calls the process_updates() -method for each gtk.gdk.Window in -the application. - - - - - gtk.gdk.gdk_window_set_debug_updates - - - gtk.gdk.gdk_window_set_debug_updates - setting - - - - setting : - if True enable update -debugging - - - - The gtk.gdk.gdk_set_debug_updates() function -sets the update debugging flag to the value of -setting. If setting is -True, update debugging is enabled. With update debugging -enabled, calls to the invalidate_rect() -method clear the invalidated rectangle of the screen to a noticeable color, -and PyGTK pauses for a short time before sending exposes -to windows during the process_updates() -method. The net effect is that you can see the invalid region for each -window and watch redraws as they occur. This allows you to diagnose -inefficiencies in your application.In essence, because the -GDK rendering model prevents all flicker, if you are -redrawing the same region 400 times you may never notice, aside from -noticing a speed problem. Enabling update debugging causes -PyGTK to flicker slowly and noticeably, so you can see -exactly what's being redrawn when, in what order. - - The command line option -passed to PyGTK programs enables this debug option at -application startup time. That's usually more useful than calling -gtk.gdk.gdk_set_debug_updates() yourself, though you might -want to use this function to enable updates sometime after application -startup time. - - - - - gtk.gdk.window_at_pointer - - - gtk.gdk.window_at_pointer - - - - Returns : - a 3 tuple containing the gtk.gdk.Window - and the pointer location in the window or - None. - - - - - This function is available in PyGTK 2.4 and above. - - - The gtk.gdk.window_at_pointer() function -returns a 3-tuple containing the gtk.gdk.Window -underneath the mouse pointer, and the location of the pointer in the -window. This function returns None if the window under -the mouse pointer is not known to GDK (if the window belongs to another -application and a gtk.gdk.Window -hasn't been created for it with the gtk.gdk.window_foreign_new() -function) - - - For multi-head-aware widgets or applications use the gtk.gdk.Display.get_window_at_pointer() -method instead. - - - - - - - diff --git a/docs/reference/pygtk-glade-classes.xml b/docs/reference/pygtk-glade-classes.xml deleted file mode 100644 index 678c11e7..00000000 --- a/docs/reference/pygtk-glade-classes.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - The gtk.glade Class Reference - - - - - - diff --git a/docs/reference/pygtk-gladexml.xml b/docs/reference/pygtk-gladexml.xml deleted file mode 100644 index e9ff5630..00000000 --- a/docs/reference/pygtk-gladexml.xml +++ /dev/null @@ -1,541 +0,0 @@ - - - - - - gtk.glade.XML - Allows dynamic loading of user interfaces - from XML descriptions. - - - - Synopsis - - - gtk.glade.XML - gobject.GObject - - gtk.glade.XML - fname - root"" - domain"" - typedict{} - - signal_connect - handler_name - func - - signal_autoconnect - dict - - get_widget - name - - get_widget_prefix - name - - relative_file - filename - - - - -Functions - - - gtk.glade.xml_new_from_buffer - buffer - size - root"" - domain"" - typedict{} - - gtk.glade.get_widget_name - widget - - gtk.glade.get_widget_tree - widget - - gtk.glade.set_custom_handler - handler - user_data - - gtk.glade.bindtextdomain - domainname - dirname"" - - gtk.glade.textdomain - domainname"" - - gtk.glade.set_custom_widget_callbacks - dict - - - - - Ancestry - - +-- gobject.GObject - +-- gtk.glade.XML - - - - - - gtk.glade.XML Signal Prototypes - - gobject.GObject Signal Prototypes - - - - Description - - This object represents an `instantiation' of an XML interface -description. When one of these objects is created, the XML file is read, -and the interface is created. The gtk.glade.XML object -then provides an interface for accessing the widgets in the interface by the -names assigned to them inside the XML description. - - The gtk.glade.XML object -can also be used to connect handlers to the named signals in the -description. Libglade also provides an interface by which it can look up -the signal handler names in the program's symbol table and automatically -connect as many handlers up as it can that way. - - - - - Constructor - - - gtk.glade.XML - fname - root"" - domain"" - typedict{} - - - - - fname : - the XML file name - - - root : - the widget node in fname to -start building from (or "") - - - domain : - the translation domain for the XML file (or -"" for default) - - - typedict : - A dictionary used to lookup types (or -{} for default) - - - Returns : - - a new gtk.glade.XML -object - - - - - Creates a new gtk.glade.XML object -(and the corresponding widgets) from the XML file specified by -fname. Optionally it will only build the interface -from the widget node specified by root (if it is not -""). This feature is useful if you only want to build -say a toolbar or menu from the XML file, but not the window it is embedded -in. Note also that the XML parse tree is cached to speed up creating another -gtk.glade.XML -object for the same file. - - - - - Methods - - - gtk.glade.XML.signal_connect - - - signal_connect - handler_name - func - - - - handler_name : - the signal handler name - - - func : - the signal handler function - - - - In the glade interface descriptions, signal handlers are -specified for widgets by name. The signal_connect() -method allows you to connect a callback specified by -func to all signals in the gtk.glade.XML file -with the signal handler name specified by -handler_name. - - - - - gtk.glade.XML.signal_autoconnect - - - signal_autoconnect - dict - - - - dict : - a mapping or an instance - - - - The signal_autoconnect() method is a -variation of the gtk.glade.XML.signal_connect -method. It uses Python's introspective features to look at the keys (if -dict is a mapping) or attributes (if -dict is an instance) and tries to match them with the -signal handler names given in the interface description. The callbacks -referenced by each matched key or attribute are connected to their matching -signals. The argument is called dict due to compatibility -reasons since originally only the mapping interface was supported. The -instance variant was introduced in PyGTK 2.0. - - - - - gtk.glade.XML.get_widget - - - get_widget - name - - - - name : - the name of the widget - - - Returns : - - the widget matching the name or -None - - - - - The get_widget() method returns a -reference to the gtk.Widget specified -by name in the interface -description. None is returned, if -name doesn't specify a widget in the -interface. - - - - - gtk.glade.XML.get_widget_prefix - - - get_widget_prefix - name - - - - name : - the prefix the widget names or -"" for all widgets - - - Returns : - - A list of widgets that match name -as the start of their name or None - - - - - The get_widget_prefix() method returns -a list of interface gtk.Widget objects -that have names prefixed by -name. None is returned if no -interface widget names match the prefix name. - - - - - gtk.glade.XML.relative_file - - - relative_file - filename - - - - filename : - a relative file pathname - - - Returns : - - the absolute file pathname - - - - - The relative_file() method resolves the -relative pathname specified by filename, using the -directory of the XML file as a base. If filename -contains an absolute pathname, then the original file name is -returned. - - - - - - - Functions - - - gtk.glade.xml_new_from_buffer - - - gtk.image_new_from_buffer - buffer - size - root"" - domain"" - typedict{} - - - - - buffer : - the string containing the XML buffer - - - size : - size of the string - - - root : - the widget node in fname to start building from -(or "") - - - domain : - the translation domain for the XML file (or -"" for default) - - - typedict : - A dictionary used to lookup types (or -{} for default) - - - Returns : - - a new gtk.glade.XML - object. - - - - - The gtk.glade.xml_new_from_buffer() -function creates a new gtk.glade.XML object -(and the corresponding widgets) from the string specified by -buffer. Optionally it will only build the interface -from the widget node specified by root (if it is not -""). This feature is useful if you only want to build -say a toolbar or menu from the XML document, but not the window it is -embedded in. - - - - - gtk.glade.get_widget_name - - - gtk.glade.get_widget_name - widget - - - - - widget : - a gtk.Widget - - - Returns : - - the name of the widget - - - - - The gtk.glade.get_widget_name() function -returns the name of the gtk.Widget specified -by widget that was generated by a gtk.glade.XML -object. - - - - - gtk.glade.get_widget_tree - - - gtk.glade.get_widget_tree - widget - - - - - widget : - a gtk.Widget - - - Returns : - - the gtk.glade.XML -object that built widget - - - - - This gtk.glade.get_widget_tree() function -is used to get the gtk.glade.XML object -that built the gtk.Widget specified -by widget. - - - - - gtk.glade.set_custom_handler - - - gtk.glade.set_custom_handler - handler - user_data - - - - - handler : - the custom widget handler. - - - user_data : - user data passed to the custom handler. - - - - This gtk.glade.set_custom_handler() function - allows you to override the default behaviour when a Custom widget is found in an interface. - - - - - gtk.glade.bindtextdomain - - - gtk.glade.bindtextdomain - domainname - dirname - - - - - domainname : - the name of the application. - - - dirname : - the directory where to find locales. - - - Returns : - the value of dirname - - - - This gtk.glade.bindtextdomain() function allows you to use internationalisation with glade. - - - - - gtk.glade.textdomain - - - gtk.glade.textdomain - domainname - - - - - domainname : - the name of the application. - - - Returns : - the value of domainname - - - - This gtk.glade.textdomain() function allows you to use internationalisation with glade. - - - - - gtk.glade.set_custom_widget_callbacks - - - gtk.glade.set_custom_widget_callbacks - dict - - - - - dict : - a dictionary of function names. - - - - This gtk.glade.set_custom_widget_callbacks() function - takes a dictionary of function names->functions, for an example see - PyGTK FAQ 22.7 - for an example. - - - - diff --git a/docs/reference/pygtk-gobject-classes.xml b/docs/reference/pygtk-gobject-classes.xml deleted file mode 100644 index 25b37a09..00000000 --- a/docs/reference/pygtk-gobject-classes.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - -The gobject Class Reference - - - - - - - - - - - - - diff --git a/docs/reference/pygtk-gobject-constants.xml b/docs/reference/pygtk-gobject-constants.xml deleted file mode 100644 index 894c8aeb..00000000 --- a/docs/reference/pygtk-gobject-constants.xml +++ /dev/null @@ -1,495 +0,0 @@ - - - - - - gobject Constants - the built-in constants of the gobject module - - - - Synopsis - - - - - - - - - - - - - - - Description - - - GObject IO Condition Constants - - The IO Condition constants are a set of bit-flags that specify a -condition to watch for on an event source. - - - - gobject.IO_IN - - There is data to read - - - - gobject.IO_OUT - - Data can be written (without blocking). - - - - gobject.IO_PRI - - There is urgent data to read. - - - - gobject.IO_ERR - - Error condition. - - - - gobject.IO_HUP - - Hung up (the connection has been broken, usually for - pipes and sockets). - - - - gobject.IO_NVAL - - Invalid request. The file descriptor is not - open. - - - - - - - - GObject Param Flag Constants - - The Param Flag constants are a set of bit-flags that specify -certain aspects of parameters that can be configured. - - - - gobject.PARAM_READABLE - - The parameter is readable - - - - gobject.PARAM_WRITABLE - - The parameter is writable - - - - gobject.PARAM_CONSTRUCT - - The parameter will be set upon object - construction - - - - gobject.PARAM_CONSTRUCT_ONLY - - The parameter will only be set upon object - construction - - - - gobject.PARAM_LAX_VALIDATION - - Upon parameter conversion strict validation is not - required - - - - - - - - GObject Priority Constants - - The Priority constants specify - - - - gobject.PRIORITY_HIGH - - Use this for high priority event sources. - - - - gobject.PRIORITY_DEFAULT - - Use this for default priority event sources. This - priority is used when adding timeout functions with the gobject.timeout_add() - function. This priority is also used for events from the X - server. - - - - gobject.PRIORITY_HIGH_IDLE - - Use this for high priority idle functions. For example, - gobject.PRIORITY_HIGH_IDLE + 10 is used for resizing operations; - and, gobject.PRIORITY_HIGH_IDLE + 20, for redrawing - operations. (This is done to ensure that any pending resizes are - processed before any pending redraws, so that widgets are not - redrawn twice unnecessarily.) - - - - gobject.PRIORITY_DEFAULT_IDLE - - Use this for default priority idle functions. This - priority is used when adding idle functions with the gobject.idle_add() - function. - - - - gobject.PRIORITY_LOW - - Use this for very low priority background - tasks. - - - - - - - - GObject Signal Flag Constants - - The Signal Flag constants are a set of bit-flags that specify a -signal's behavior. The overall signal description outlines how especially -the RUN flags control the stages of a signal -emission. - - - - gobject.SIGNAL_RUN_FIRST - - Invoke the object method handler in the first emission - stage. - - - - gobject.SIGNAL_RUN_LAST - - Invoke the object method handler in the third emission - stage. - - - - gobject.SIGNAL_RUN_CLEANUP - - Invoke the object method handler in the last emission - stage. - - - - gobject.SIGNAL_NO_RECURSE - - Signals being emitted for an object while currently - being in emission for this very object will not be emitted - recursively, but instead cause the first emission to be - restarted. - - - - gobject.SIGNAL_DETAILED - - This signal supports "::detail" appendices to the - signal name upon handler connections and emissions. - - - - gobject.SIGNAL_ACTION - - Action signals are signals that may freely be emitted - on alive objects from user code via the gobject.emit() - method and friends, without the need of being embedded into - extra code that performs pre or post emission adjustments on the - object. They can also be thought of as object methods which can - be called generically by third-party code. - - - - gobject.SIGNAL_NO_HOOKS - - No emissions hooks are supported for this - signal. - - - - - - - - GObject Spawn Flag Constants - - The Spawn Flag constants are a set of bit-flags that can be -passed to the gobject.spawn_async() -function. - - - - gobject.SPAWN_LEAVE_DESCRIPTORS_OPEN - - the parent's open file descriptors will be inherited by -the child; otherwise all descriptors except stdin/stdout/stderr will be -closed before calling exec() in the child. - - - - gobject.SPAWN_DO_NOT_REAP_CHILD - - the child will not be automatically reaped; you must -call waitpid() or handle SIGCHLD -yourself, or the child will become a zombie. - - - - gobject.SPAWN_SEARCH_PATH - - argv[0] need not be an absolute -path, it will be looked for in the user's PATH. - - - - gobject.SPAWN_STDOUT_TO_DEV_NULL - - the child's standard output will be discarded, instead -of going to the same location as the parent's standard output. - - - - gobject.SPAWN_STDERR_TO_DEV_NULL - - the child's standard error will be discarded. - - - - gobject.SPAWN_CHILD_INHERITS_STDIN - - the child will inherit the parent's standard input (by -default, the child's standard input is attached to /dev/null). - - - - gobject.SPAWN_FILE_AND_ARGV_ZERO - - the first element of argv is the -file to execute, while the remaining elements are the actual argument vector -to pass to the file. Normally gobject.spawn_async() -uses argv[0] as the file to execute, and passes all -of argv to the child. - - - - - - - - GObject Built-in Type Constants - - The Built-in Type constants specify the pre-defined types used -by gobject. - - - - gobject.TYPE_INVALID - - An invalid type, used as error return value in some - functions. - - - - gobject.TYPE_NONE - - A fundamental type indicating no type. - - - - gobject.TYPE_INTERFACE - - The fundamental type from which all interfaces are - derived. - - - - gobject.TYPE_CHAR - - The fundamental type corresponding to a - character. This maps to a string in Python. - - - - gobject.TYPE_UCHAR - - The fundamental type corresponding to an unsigned - character. This maps to a string in Python. - - - - gobject.TYPE_BOOLEAN - - The fundamental type corresponding to a True or False - value. This maps to an integer in Python. - - - - gobject.TYPE_INT - - The fundamental type corresponding to an - integer. This maps to an integer in Python. - - - - gobject.TYPE_UINT - - he fundamental type corresponding to an unsigned - integer. This maps to an integer in Python. - - - - gobject.TYPE_LONG - - The fundamental type corresponding to a long - integer. This maps to an integer in Python. - - - - gobject.TYPE_ULONG - - The fundamental type corresponding to an unsigned - integer. This maps to an integer in Python. - - - - gobject.TYPE_INT64 - - The fundamental type corresponding to an long long - integer. This maps to a long integer in Python. - - - - gobject.TYPE_UINT64 - - The fundamental type corresponding to an unsigned long - long integer. This maps to a long integer in Python. - - - - gobject.TYPE_ENUM - - The fundamental type corresponding to an enumeration - type. This maps to an integer in Python. - - - - gobject.TYPE_FLAGS - - The fundamental type corresponding to a flag - type. This maps to an integer in Python. - - - - gobject.TYPE_FLOAT - - The fundamental type corresponding to a floating point - number. This maps to a float in Python. - - - - gobject.TYPE_DOUBLE - - The fundamental type corresponding to a double - floating point number. This maps to a float in Python. - - - - gobject.TYPE_STRING - - The fundamental type corresponding to a string. - - - - gobject.TYPE_POINTER - - The fundamental type corresponding to a pointer to an - anonymous type. This has no corresponding Python type. - - - - gobject.TYPE_BOXED - - The fundamental type corresponding to a boxed object - type. - - - - gobject.TYPE_PARAM - - The fundamental type corresponding to a GParamSpec - type. - - - - gobject.TYPE_OBJECT - - The fundamental type corresponding to a GObject - type. - - - - gobject.TYPE_PYOBJECT - - The fundamental type corresponding to a Python Object - type. - - - - - - - - GObject Version Constants - - The Version constants specify the version of -GLIB used by PyGTK as a 3-tuple containing the major, -minor and patch release numbers. - - - - gobject.glib_version - - A 3-tuple containing (major, minor, patch) release - numbers. - - - - - - - - - diff --git a/docs/reference/pygtk-gobject-functions.xml b/docs/reference/pygtk-gobject-functions.xml deleted file mode 100644 index 5e0145fc..00000000 --- a/docs/reference/pygtk-gobject-functions.xml +++ /dev/null @@ -1,1373 +0,0 @@ - - - - - - gobject Functions - miscellaneous functions - - - - Synopsis - - - - gobject.type_name - type - - gobject.type_from_name - type_name - - gobject.type_parent - type - - gobject.type_is_a - type - parent_type - - gobject.type_children - type - - gobject.type_interfaces - type - - gobject.type_register - class - - gobject.signal_new - signal_name - type - flags - return_type - param_types - - gobject.signal_list_names - type - - gobject.signal_list_ids - type - - gobject.signal_lookup - name - type - - gobject.signal_name - signal_id - - gobject.signal_query - name - type - - gobject.signal_query - signal_id - - gobject.list_properties - type - - gobject.new - type - ... - - gobject.idle_add - callback - ... - - gobject.timeout_add - interval - callback - ... - - gobject.io_add_watch - fd - condition - callback - ... - - gobject.source_remove - tag - - gobject.main_context_default - - - gobject.markup_escape_text - text - - gobject.child_watch_add - pid - function - dataNone - prioritygobject.PRIORITY_DEFAULT - - gobject.spawn_async - argv - envpNone - working_directoryNone - flags0 - child_setupNone - user_dataNone - standard_inputNone - standard_outputNone - standard_errorNone - - gobject.get_current_time - - gobject.main_depth - - - - - - Description - - These functions are part of the PyGTK gobject -module but are not directly associated with a specific class. - - - - - Functions - - - gobject.type_name - - - gobject.type_name - type - - - - type : - a GObject type, type ID or -instance - - - Returns : - - - - - The gobject.type_name() function returns -the unique name that is assigned to the specified -type. type can be a GObject -type, type ID or instance. This function raises a TypeError exception -if type isn't a PyGTK type. - - - - - gobject.type_from_name - - - gobject.type_from_name - type_name - - - - type_name : - a string containing the name of a -type - - - Returns : - the type ID named -type_name - - - - The gobject.type_from_name() function -returns the type ID of the PyGTK type with the name -specified by type_name. This function raises a -RuntimeError exception if no type matches -type_name. - - - - - gobject.type_parent - - - gobject.type_parent - type - - - - type : - a GObject type, type ID or -instance - - - Returns : - the parent type ID - - - - The gobject.type_parent() function returns -the direct parent type ID of the specified type. -type can be a GObject type, type ID or instance. If -type has no parent, i.e. is a fundamental type, the -RuntimeError exception is raised. - - - - - gobject.type_is_a - - - gobject.type_is_a - type - parent_type - - - - type : - a GObject type, type ID or -instance - - - parent_type : - a GObject type, type ID or -instance - - - Returns : - True if -parent_type is an ancestor of -type - - - - The gobject.type_is_a() function returns -True if the specified type is a -descendant of the type specified by parent_type. This -function also returns True if -parent_type is an interface and -type conforms to it. - - - - - gobject.type_children - - - gobject.type_children - type - - - - type : - a GObject type, type ID or -instance - - - Returns : - a list of the child types of -type - - - - The gobject.type_children() function -returns a list containing the child types of the specified -type. - - - - - gobject.type_interfaces - - - gobject.type_interfaces - type - - - - type : - a GObject type, type ID or -instance - - - Returns : - a list of the interface types supported by -type - - - - The gobject.type_interfaces() function -returns a list of the interface types supported by -type. type can be a GObject -type, type ID or instance. This function returns a RuntimeError exception if -type is not a valid type or has no interfaces. - - - - - gobject.type_register - - - gobject.type_register - class - - - - class : - a Python class that is a descendant of gobject.GObject - - - - The gobject.type_register() function -registers the specified Python class as a PyGTK type. -class must be a descendant of gobject.GObject. The function generates a name for the new type. - - - - - gobject.signal_new - - - gobject.signal_new - signal_name - type - flags - return_type - param_types - - - - signal_name : - a string containing the name of the -signal - - - type : - the object type that the signal is associated -with - - - flags : - the signal flags - - - return_type : - the return type of the signal -handler - - - param_types : - the parameter types passed to the signal -handler - - - Returns : - a unique integer signal ID - - - - The gobject.signal_new() function registers -a signal with the specified signal_name for the -specified object type. The value of -flags is a combination of: - - - - gobject.SIGNAL_RUN_FIRST - - Invoke the object method handler in the first emission -stage. - - - - gobject.SIGNAL_RUN_LAST - - Invoke the object method handler in the third emission -stage. - - - - gobject.SIGNAL_RUN_CLEANUP - - Invoke the object method handler in the last emission -stage. - - - - gobject.SIGNAL_NO_RECURSE - - Signals being emitted for an object while currently -being in emission for this very object will not be emitted recursively, but -instead cause the first emission to be restarted. - - - - gobject.SIGNAL_DETAILED - - This signal supports "::detail" appendixes to the -signal name upon handler connections and emissions. - - - - gobject.SIGNAL_ACTION - - Action signals are signals that may freely be emitted -on alive objects from user code via gobject.emit()() -and friends, without the need of being embedded into extra code that -performs pre or post emission adjustments on the object. They can also be -thought of as generically callable object methods. - - - - gobject.SIGNAL_NO_HOOKS - - No emissions hooks are supported for this -signal. - - - - - return_type is the type of the return -value from a signal handler and may be a gobject type, type ID or instance. -The param_types parameter is a list of additional -types that are passed to the signal handler. Each parameter type may be -specified as a gobject type, type ID or instance. For example, to add a -signal to the gtk.Window type called "my-signal" that calls a handler with a -gtk.Button widget and an integer value and a return value that is a -boolean, use: - - - gobject.signal_new("my_signal", gtk.Window, gobject.SIGNAL_RUN_LAST, gobject.TYPE_BOOLEAN, (gtk.Button, gobject.TYPE_INT)) - - - - - - gobject.signal_list_names - - - gobject.signal_list_names - type - - - - type : - a GObject type, type ID or -instance - - - Returns : - a list of the signal names supported by -type - - - - The gobject.signal_list_names() function -returns a list of the names of the signals that are supported by the -specified GObject type - - - The type keyword is available in PyGTK 2.6 and above. - - - - - - gobject.signal_list_ids - - - gobject.signal_list_ids - type - - - - type : - a GObject type, type ID or -instance - - - Returns : - a list of the signal ids supported by -type - - - - - This method is available in PyGTK 2.6 and above. - - - The gobject.signal_list_ids() function -returns a list of the integer ids of the signals that are supported by the -GObject specified by type - - - - - gobject.signal_lookup - - - gobject.signal_lookup - name - type - - - - name : - the name of a signal for -type - - - type : - a GObject type, type ID or -instance - - - Returns : - the integer id of a signal supported by -type or 0. - - - - - This method is available in PyGTK 2.6 and above. - - - The gobject.signal_lookup() function -returns the id of the signal with the name specified by -name that is supported by the GObject specified -specified bytype. 0 is returned if the signal is not -found. - - - - - gobject.signal_name - - - gobject.signal_name - signal_id - - - - signal_id : - an integer signal id - - - Returns : - the name of the signal or -None. - - - - - This method is available in PyGTK 2.6 and above. - - - The gobject.signal_name() function returns -the name of the signal that has the signal id specified by -id. - - - - - gobject.signal_query - - - gobject.signal_query - name - type - - - - name : - the name of a signal for -type - - - type : - a GObject type, type ID or -instance - - - Returns : - a 6-tuple containing signal information or -None - - - - - This method is available in PyGTK 2.6 and above. - - - The gobject.signal_query() function returns -a 6-tuple containing information about the signal with the name specified by -name that is supported by the GObject specified by -type. If the signal is not found -None is returned. - - The signal information 6-tuple contains: - - - - the integer signal id - - - the signal name - - - the GType that the signal is registered for - - - the signal flags (see the ) - - - the GType of the return from the signal callback -function - - - a tuple containing the GTypes of the parameters that are -passed to the signal callback function. Note that these may not correspond -exactly to the PyGTK signal callback parameters. - - - - - - - gobject.signal_query - - - gobject.signal_query - signal_id - - - - signal_id : - the integer id of a signal - - - Returns : - a 6-tuple containing signal information or -None - - - - - This method is available in PyGTK 2.6 and above. - - - The gobject.signal_query() function returns -a 6-tuple containing information about the signal with the id specified by -signal_id. If the signal is not found -None is returned. - - The signal information 6-tuple contains: - - - - the integer signal id - - - the signal name - - - the GType that the signal is registered for - - - the signal flags (see the ) - - - the GType of the return from the signal callback -function - - - a tuple containing the GTypes of the parameters that are -passed to the signal callback function. Note that these may not correspond -exactly to the PyGTK signal callback parameters. - - - - - - - gobject.list_properties - - - gobject.list_properties - type - - - - type : - a GObject type, type ID or -instance - - - Returns : - a list of the properties (as GParam objects) -supported by type - - - - The gobject.list_properties() function -returns a list of the properties (as GParam objects) supported by -type. - - - - - gobject.new - - - gobject.new - type - ... - - - - type : - a GObject type, type ID or -instance - - - ... : - zero or more property-value -pairs - - - Returns : - a new object if the specified -type - - - - The gobject.new() function returns a new -object of the specified type. type must specify a -type that is a descendant of gobject.GObject. A -TypeError exception is raised if type specifies an -abstract class or a type that is not a descendant of gobject.GObject. A set -of property-value pairs may be specified to set the value of the object's -properties. - - - - - gobject.idle_add - - - gobject.idle_add - callback - ... - - - - callback : - a function to call when -PyGTK is idle - - - ... : - optionals arguments to be passed to -callback - - - Returns : - an integer ID - - - - The gobject.idle_add() function adds a -function (specified by callback) to be called -whenever there are no higher priority events pending to the default main -loop. The function is given the default idle priority, -gobject.PRIORITY_DEFAULT_IDLE. Additional arguments to -pass to callback can be specified after -callback. The idle priority can be specified as a -keyword-value pair with the keyword "priority". If -callback returns False it is -automatically removed from the list of event sources and will not be called -again. - - - - - gobject.timeout_add - - - gobject.timeout_add - interval - callback - ... - - - - interval : - the time between calls to the function, in -milliseconds - - - callback : - the function to call - - - ... : - zero or more arguments that will be passed to -callback - - - Returns : - an integer ID of the event -source - - - - The gobject.timeout_add() function sets a -function (specified by callback) to be called at -regular intervals (specified by interval, with the -default priority, gobject.PRIORITY_DEFAULT. Additional -arguments to pass to callback can be specified after -callback. The idle priority may be specified as a -keyword-value pair with the keyword "priority". - - The function is called repeatedly until it returns -False, at which point the timeout is automatically -destroyed and the function will not be called again. The first call to the -function will be at the end of the first interval. Note that timeout -functions may be delayed, due to the processing of other event sources. Thus -they should not be relied on for precise timing. After each call to the -timeout function, the time of the next timeout is recalculated based on the -current time and the given interval (it does not try to 'catch up' time lost -in delays). - - - - - gobject.io_add_watch - - - gobject.io_add_watch - fd - condition - callback - ... - - - - fd : - a Python file object or an integer file -descriptor ID - - - condition : - a condition mask - - - callback : - a function to call - - - ... : - additional arguments to pass to -callback - - - Returns : - an integer ID of the event source - - - - The gobject.io_add_watch() function -arranges for the file (specified by fd) to be -monitored by the main loop for the specified -condition. fd may be a Python -file object or an integer file descriptor. The value of condition is a -combination of: - - - - gobject.IO_IN - - There is data to read. - - - - gobject.IO_OUT - - Data can be written (without blocking). - - - - gobject.IO_PRI - - There is urgent data to read. - - - - gobject.IO_ERR - - Error condition. - - - - gobject.IO_HUP - - Hung up (the connection has been broken, usually for -pipes and sockets). - - - - - Additional arguments to pass to callback -can be specified after callback. The idle priority -may be specified as a keyword-value pair with the keyword "priority". The -signature of the callback function is: - - - def callback(source, cb_condition, ...) - - - where source is -fd, the file descriptor; -cb_condition is the condition that triggered the -signal; and, ... are the zero or more arguments that -were passed to the gobject.io_add_watch() -function. - - If the callback function returns False it -will be automatically removed from the list of event sources and will not be -called again. If it returns True it will be called again -when the condition is matched. - - - - - gobject.source_remove - - - gobject.source_remove - tag - - - - tag : - an integer ID - - - Returns : - True if the event source was -removed - - - - The gobject.source_remove() function -removes the event source specified by tag (as returned by the gobject.idle_add(), -gobject.timeout_add() -and gobject.io_add_watch() -functions) - - - - - gobject.main_context_default - - - gobject.main_context_default - - - - - Returns : - the default gobject.MainContext -object - - - - The gobject.main_context_default() function -returns the default gobject.MainContext object. - - - - - gobject.markup_escape_text - - - gobject.markup_escape_text - text - - - - text : - the UTF-8 string to be -escaped - - - Returns : - the escaped text - - - - - This function is available in PyGTK 2.8 and above. - - - The gobject.markup_escape_text() function -escapes the string specified by text so that the -markup parser will parse it verbatim. Less than, greater than, ampersand, -etc. are replaced with the corresponding entities. This function would -typically be used when writing out a file to be parsed with the markup -parser. - - Note that this function doesn't protect whitespace and line -endings from being processed according to the XML rules for normalization of -line endings and attribute values. - - - - - gobject.child_watch_add - - - gobject.child_watch_add - pid - function - dataNone - prioritygobject.PRIORITY_DEFAULT - - - - pid : - process id of a child process to watch - - function : - the function to call - - - data : - the optional data to pass to -function - - - priority : - the priority of the idle source - one of the - - - - Returns : - the id of event source. - - - - This function is available in PyGTK 2.6 and above. - - - The gobject.child_watch_add() function sets -the function specified by function to be called with -the user data specified by data when the child -indicated by pid exits. The signature for the -callback is: - - -def callback(pid, condition, user_data) - - - where pid is is the child process id, -condition is the status information about the child -process and user_data is data -PyGTK supports only a single callback per process id. - - - - - gobject.spawn_async - - - gobject.spawn_async - argv - envpNone - working_directoryNone - flags0 - child_setupNone - user_dataNone - standard_inputNone - standard_outputNone - standard_errorNone - - - - argv : - a sequence of strings containing the arguments -of the child process - - - envp : - the child's environment or -None to inherit the parent's -environment. - - - working_directory : - the child's current working directory, or -None to inherit parent's - - - flags : - flags from the . - - - child_setup : - a function to run in the child just before -calling exec() - - - user_data : - the user data for the -child_setup function - - - standard_input : - if True return the file -descriptor for the child's stdin - - - standard_output : - if True return the file -descriptor for the child's stdout - - - standard_error : - if True return the file -descriptor for the child's stderr - - - Returns : - a 4-tuple containing the child's process id and -the stdin, stdout and stderr file descriptor integers. - - - - This function is available in PyGTK 2.6 and above. - - - The gobject.spawn_async() function executes -a child program asynchronously (your program will not block waiting for the -child to exit). The child program is specified by the only argument that -must be provided, argv. argv -should be a sequence of strings, to be passed as the argument vector for the -child. The first string in argv is of course the name -of the program to execute. By default, the name of the program must be a -full path; the PATH shell variable will only be searched if -you pass the gobject.SPAWN_SEARCH_PATH flag in -flags. The function returns a 4-tuple containing the -child's process id and the file descriptors for the child's stdin, stdout -and stderr. The stdin, stdout and stderr file descriptors are returned only -ofthe corresponding standard_input, -standard_output or -standard_error params are -True. - - On Windows, the low-level child process creation API -(CreateProcess()) doesn't use argument vectors, but a -command line. The C runtime library's spawn*() family -of functions (which gobject.spawn_async() -eventually calls) paste the argument vector elements into a command line, -and the C runtime startup code does a corresponding reconstruction of an -argument vector from the command line, to be passed to -main(). Complications arise when you have argument -vector elements that contain spaces of double quotes. The -spawn*() functions don't do any quoting or escaping, -but on the other hand the startup code does do unquoting and unescaping in -order to enable receiving arguments with embedded spaces or double -quotes. To work around this asymmetry, the gobject.spawn_async() -function will do quoting and escaping on argument vector elements that need -it before calling the C runtime spawn() -function. - - envp is a sequence of strings, where each - string has the form KEY=VALUE. This will become the - child's environment. If envp is - None or not specified, the child inherits its - parent's environment. - - flags should be the bitwise -OR of the you want to affect the -function's behaviour. The gobject.SPAWN_DO_NOT_REAP_CHILD -flag means that the child will not automatically be reaped; you must use a -GChildWatch source to be notified about the death of the child -process. Eventually you must call g_spawn_close_pid() on the child_pid, in -order to free resources which may be associated with the child process. (On -Unix, using a GChildWatch source is equivalent to calling -waitpid() or handling the SIGCHLD -signal manually. On Windows, calling g_spawn_close_pid() is equivalent to -calling CloseHandle() on the process handle -returned). - - gobject.SPAWN_LEAVE_DESCRIPTORS_OPEN means -that the parent's open file descriptors will be inherited by the child; -otherwise all descriptors except stdin/stdout/stderr will be closed before -calling exec() in the -child. gobject.SPAWN_SEARCH_PATH means that -argv[0] need not be an absolute path, it will be -looked for in the user's -PATH. gobject.SPAWN_STDOUT_TO_DEV_NULL -means that the child's standard output will be discarded, instead of going -to the same location as the parent's standard output. If you use this flag, -standard_output must be -None. gobject.SPAWN_STDERR_TO_DEV_NULL -means that the child's standard error will be discarded, instead of going to -the same location as the parent's standard error. If you use this flag, -standard_error must be -None. gobject.SPAWN_CHILD_INHERITS_STDIN -means that the child will inherit the parent's standard input (by default, -the child's standard input is attached to -/dev/null). If you use this flag, -standard_input must be -None. gobject.SPAWN_FILE_AND_ARGV_ZERO -means that the first element of argv is the file to -execute, while the remaining elements are the actual argument vector to pass -to the file. Normally the gobject.spawn_async() -function uses argv[0] as the file to execute, and -passes all of argv to the child. - - child_setup and -user_data are a function and user data. On POSIX -platforms, the function is called in the child after GLib has performed all -the setup it plans to perform (including creating pipes, closing file -descriptors, etc.) but before calling exec(). That is, -child_setup is called just before calling -exec() in the child. Obviously actions taken in this -function will only affect the child, not the parent. On Windows, there is no -separate fork() and exec() -functionality. Child processes are created and run right away with one API -call, -CreateProcess(). child_setup is -called in the parent process just before creating the child process. You -should carefully consider what you do in child_setup -if you intend your software to be portable to Windows. - - The returned child process id can be used to send signals to the -child, or to wait for the child if you specified the -gobject.SPAWN_DO_NOT_REAP_CHILD flag. On Windows, child -pid will be returned only if you specified the -gobject.SPAWN_DO_NOT_REAP_CHILD flag. - - The caller of the gobject.spawn_async() -must close any returned file descriptors when they are no longer in -use. - - If standard_input is -None, the child's standard input is attached to -/dev/null unless -gobject.SPAWN_CHILD_INHERITS_STDIN is set. - - If standard_error is -None, the child's standard error goes to the same -location as the parent's standard error unless -gobject.SPAWN_STDERR_TO_DEV_NULL is set. - - If standard_output is -None, the child's standard output goes to the same -location as the parent's standard output unless -gobject.SPAWN_STDOUT_TO_DEV_NULL is set. - - If an error occurs, the gobject.GError exception will be -raised. - - - - - gobject.get_current_time - - - gobject.get_current_time - - - - Returns : - the current time as the number of seconds and -microseconds from the epoch. - - - - This function is available in PyGTK 2.8 and above. - - - The gobject.get_current_time() function -reurns the current time of day as the number of seconds and microseconds -from the epoch. - - - - - gobject.main_depth - - - gobject.main_depth - - - - Returns : - he depth of the stack of calls to the main -context. - - - - This function is available in PyGTK 2.8 and above. - - - The main_depth() function returns the depth -of the stack of calls in the main context. That is, when called from the -toplevel, it gives 0. When called from within a callback from the gobject.MainContext.iteration() -method (or the gobject.MainLoop.run() -method, etc.) it returns 1. When called from within a callback to a -recursive call to the gobject.MainContext.iteration() -method), it returns 2. And so forth. - - - - - - diff --git a/docs/reference/pygtk-gobject-gboxed.xml b/docs/reference/pygtk-gobject-gboxed.xml deleted file mode 100644 index f7f24387..00000000 --- a/docs/reference/pygtk-gobject-gboxed.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - gobject.GBoxed - an object containing an opaque chunk of data - - - - Synopsis - - - gobject.GBoxed - - copy - - - - - - - Ancestry - -+-- gobject.GBoxed - - - - - - Description - - gobject.GBoxed -is an abstract base class that encapsulates an opaque chunk of data to -provide an object-oriented interface and a type that is registered with the -GLIB type system. A boxed type is registered with -functions that provide for the copying and freeing of the underlying data -structure - this allows PyGTK to encapsulate these as Python objects. - - - - - Methods - - - gobject.GBoxed.copy - - - copy - - - - Returns : - a copy of the gobject.GBoxed - object - - - - The copy() method makes and returns a copy of the boxed object. - - - - - - diff --git a/docs/reference/pygtk-gobject-ginterface.xml b/docs/reference/pygtk-gobject-ginterface.xml deleted file mode 100644 index 1b29ddf7..00000000 --- a/docs/reference/pygtk-gobject-ginterface.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - gobject.GInterface - - an object representing a GInterface - - - - Synopsis - - - gobject.GInterface - - - - - - Ancestry - -+-- gobject.GInterface - - - - - - Description - - gobject.GInterface -is an abstract base class that encapsulates a GInterface. - - - - diff --git a/docs/reference/pygtk-gobject-gpointer.xml b/docs/reference/pygtk-gobject-gpointer.xml deleted file mode 100644 index da169542..00000000 --- a/docs/reference/pygtk-gobject-gpointer.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - gobject.GPointer - - an object containing a completely opaque chunk of - data - - - - Synopsis - - - gobject.GPointer - - - - - - Ancestry - -+-- gobject.GPointer - - - - - - Description - - gobject.GPointer -is an abstract base class that encapsulates an opaque chunk of data and -registers it with the GLIB type system. A pointer type -has no methods and generic ways of copying and freeing the data. It -shouldn't be used in PyGTK. - - - - diff --git a/docs/reference/pygtk-gobject-maincontext.xml b/docs/reference/pygtk-gobject-maincontext.xml deleted file mode 100644 index ef688780..00000000 --- a/docs/reference/pygtk-gobject-maincontext.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - gobject.MainContext - - an object representing a set of event sources to be handled -in a gobject.MainLoop. - - - - Synopsis - - - gobject.MainContext - - gobject.MainContext - - - iteration - may_block - - - pending - - - - - - - Ancestry - -+-- gobject.MainContext - - - - - - Description - - A gobject.MainContext -represents a set of event sources that can be run in a single thread. File -descriptors (plain files, pipes or sockets) and timeouts are the standard -event sources for GTK and PyGTK though -others can be added. Each event source is assigned a priority. The default -priority, gobject.PRIORITY_DEFAULT, is 0. Values less -than 0 denote higher priorities. Values greater than 0 denote lower -priorities. Events from high priority sources are always processed before -events from lower priority sources. Single iterations of a gobject.MainContext -can be run with the iteration() -method. - - - - - Constructor - - - gobject.MainContext - - - - Returns : - a new gobject.MainContext - object. - - - - Creates a new gobject.MainContext -object. - - - - - Methods - - - gobject.MainContext.iteration - - - iteration - - - - may_block : - if True the call may block - waiting for an event. - - - Returns : - True if events were - dispatched. - - - - The iteration() method runs a single -iteration. This involves: - - - - checking to see if any associated event sources are ready -to be processed; - - - then if no events sources are ready and -may_block is True, waiting for a -source to become ready; - - - and finally, dispatching the highest priority events -sources that are ready - - - - Note that even when may_block is -True, it is still possible for -iteration() to return False, -since the the wait may be interrupted for other reasons than an event source -becoming ready. - - - - - gobject.MainContext.pending - - - pending - - - - Returns : - True if events are - pending. - - - - The pending() method checks if any -associated sources have pending events. - - - - - - diff --git a/docs/reference/pygtk-gobject-mainloop.xml b/docs/reference/pygtk-gobject-mainloop.xml deleted file mode 100644 index 41454038..00000000 --- a/docs/reference/pygtk-gobject-mainloop.xml +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - gobject.MainLoop - - an object representing the main event loop of a PyGTK - application. - - - - Synopsis - - - gobject.MainLoop - - gobject.MainLoop - contextNone - is_running0 - - - get_context - - - is_running - - - quit - - - run - - - - - - - Ancestry - -+-- gobject.MainLoop - - - - - - Description - - gobject.MainLoop -represents a main event loop. A gobject.MainLoop -is created with the gobject.MainLoop() -constructor. After adding the initial event sources, the run() -method is called. This continuously checks for new events from each of the -event sources and dispatches them. Finally, the processing of an event from -one of the sources leads to a call to the quit() -method to exit the main loop, and the run() -method returns. - - It is possible to create new instances of gobject.MainLoop -recursively. This is often used in PyGTK applications -when showing modal dialog boxes. Note that event sources are associated with -a particular gobject.MainContext, -and will be checked and dispatched for all main loops associated with that -gobject.MainContext. - - PyGTK contains wrappers of some of these -functions, e.g. the gtk.main(), gtk.main_quit() -and gtk.events_pending() -functions. - - - - - Constructor - - - gobject.MainLoop - contextNone - is_runningNone - - - - context : - a gobject.MainContext - or None to use the default - context. - - - is_running : - if True indicates that the - loop is running. This is not very important since calling the run() - method will set this to True - anyway. - - - Returns : - a new gobject.MainLoop - object. - - - - Creates a new gobject.MainLoop -object. - - - - - Methods - - - gobject.MainLoop.get_context - - - get_context - - - - Returns : - the gobject.MainContext - the mainloop is associated with - - - - The get_context() method returns the -gobject.MainContext -that the mainloop was created with. - - - - - gobject.MainLoop.is_running - - - is_running - - - - Returns : - True if the mainloop is - currently being run. - - - - The is_running() method checks to see -if the mainloop is currently being run via the run() -method. - - - - - gobject.MainLoop.quit - - - quit - - - The quit() method stops the mainloop -from running. Any subsequent calls to the run() -method will return immediately. - - - - - gobject.MainLoop.run - - - run - - - The run() method runs a mainloop until -the quit() -method is called. If this is called for the thread of the loop's gobject.MainContext, -it will process events from the loop, otherwise it will simply wait. - - - - - - diff --git a/docs/reference/pygtk-gobject.xml b/docs/reference/pygtk-gobject.xml deleted file mode 100644 index 7364c06b..00000000 --- a/docs/reference/pygtk-gobject.xml +++ /dev/null @@ -1,867 +0,0 @@ - - - - - gobject.GObject - 3 - PyGTK Docs - - - - gobject.GObject - the base class - - - - Synopsis - - - gobject.GObject - - get_property - property_name - - - set_property - property_name - value - - - freeze_notify - - - notify - property_name - - - thaw_notify - - - get_data - key - - - set_data - key - data - - - connect - detailed_signal - handler - - - connect_after - detailed_signal - handler - - - connect_object - detailed_signal - handler - - - connect_object_after - detailed_signal - handler - - - disconnect - handler_id - - - handler_disconnect - handler_id - - - handler_is_connected - handler_id - - - handler_block - handler_id - - - handler_unblock - handler_id - - - emit - detailed_signal - - - stop_emission - detailed_signal - - - emit_stop_by_name - detailed_signal - - - chain - - - - - - - Ancestry - -+-- gobject.GObject - - - - - - Attributes - -
- - - - - - - - - - "__doc__" - Read - The documentation for the object type. Uses - "__gdoc__" if no specific documentation set. - - - "__gdoc__" - Read - The generated documentation for the underlying GObject - type. - - - "__gtype__" - Read - The underlying GObject type. - - - "__grefcount__" - Read - The reference count for the underlying GObject. - - - - - -
- -
- - - gobject.GObject Signal Prototypes - - - - - "notify" - - callback - gobject - property_spec - user_param1 - ... - - - - - - - - - Description - The gobject.GObject - class is the base class providing the common attributes and methods for - the PyGTK classes. The gobject.GObject - class is not a user interface widget class. - - The gobject.GObject - class provides the signal management methods, the object property access - methods and the object data management methods. - - - - - Methods - - - gobject.GObject.get_property - - - get_property - property_name - - - - property_name : - a string containing the property name for the -GObject - - - Returns : - a Python object containing the value of the -property - - - - The get_property() method returns the -value of the property specified by property_name or -None if there is no value associated with the property. - The TypeError exception is raised -if the property name is not registered with the object class. - - - - - gobject.GObject.set_property - - - set_property - property_name - value - - - - property_name : - a string containing the property -name - - - value : - a Python object containing the property value -to be set - - - - The set_property() method sets the -property specified by property_name to the specified -value. - The TypeError exception is raised -if the property name is not registered with the object class or if the value -specified could not be converted to the property type. - - - - - gobject.GObject.freeze_notify - - - freeze_notify - - - - The freeze_notify() method freezes the -object's property-changed notification queue so that "notify" signals are -blocked until the thaw_notify() method is -called. - - - - - gobject.GObject.notify - - - notify - property_name - - - - property_name : - a string containing a property -name - - - - The notify() method causes the "notify" -signal for the property specified by property_name to -be emitted. - - - - - gobject.GObject.thaw_notify - - - thaw_notify - - - - The thaw_notify() method thaws the -object's property-changed notification queue so that "notify" signals are -emitted. - - - - - gobject.GObject.get_data - - - get_data - key - - - - key : - a string used as the key - - - Returns : - a Python object containing the associated -data - - - - The get_data() method returns the -Python object associated with the specified key or -None if there is no data associated with the key or -if there is no key associated with the object. - - - - - gobject.GObject.set_data - - - set_data - key - data - - - - key : - a string used as a key - - - data : - a Python object that is the value to be -associated with the key - - - - The set_data() method associates the -specified Python object (data) with -key. - - - - - gobject.GObject.connect - - - connect - detailed_signal - handler - ... - - - - detailed_signal : - a string containing the signal -name - - - handler : - a Python function or method -object. - - - ... : - additional optional -parameters - - - Returns : - an integer identifier - - - - The connect() method adds a function or -method (handler)to the end of the list of signal -handlers for the named detailed_signal but before the -default class signal handler. An optional set of parameters may be specified -after the handler parameter. These will all be passed -to the signal handler when invoked. - For example if a function handler was connected to a signal -using: - - handler_id = object.connect("signal_name", handler, arg1, arg2, arg3) - - The handler should be defined as: - - def handler(object, arg1, arg2, arg3): - - A method handler connected to a signal using: - - handler_id = object.connect("signal_name", self.handler, arg1, arg2) - - requires an additional argument when defined: - - def handler(self, object, arg1, arg2) - - A TypeError exception is raised -if detailed_signal identifies a signal name that is -not associated with the object. - - - - - gobject.GObject.connect_after - - - connect_after - detailed_signal - handler - ... - - - - detailed_signal : - a string containing the signal -name - - - handler : - a Python function or method -object - - - ... : - additional optional -parameters - - - Returns : - an integer handler -identifier - - - - The connect_after() method is similar -to the connect() method except that the -handler is added to the signal handler list after the -default class signal handler. Otherwise the details of -handler definition and invocation are the -same. - - - - - gobject.GObject.connect_object - - - connect_object - detailed_signal - handler - gobject - - - - detailed_signal : - a string containing the signal -name - - - handler : - a Python function or method -object - - - gobject : - a GObject - - - Returns : - an integer handler -identifier - - - - The connect_object() method is the same -as the connect() method except that the -handler is invoked with the specified -gobject in place of the object invoking the -connect_object() method. For example, a call with a -function handler: - - handler_id = object("signal_name", handler, gobject) - - will cause the handler to be invoked -as: - - handler(gobject) - - Likewise a method handler will be invoked as: - - self.handler(gobject) - - This can be helpful in invoking PyGTK widget methods that -require no arguments except the widget itself (e.g. -widget.destroy()) by using the class method as the -handler. For example, a Button "clicked" signal can be set up to invoke the -Window destroy() method as: - - - handler_id = button.connect_object("clicked", Window.destroy, window) - - - When the button is clicked the handler is invoked as: - - - Window.destroy(window) - - - which is the same as: - - - window.destroy() - - - Additional arguments may be passed to the handler as with the -connect() method handler invocations. - - - - - gobject.GObject.connect_object_after - - - connect_object_after - detailed_signal - handler - - - - detailed_signal : - a string containing the signal -name - - - handler : - a Python function or method -object - - - gobject : - a GObject - - - Returns : - an integer handler -identifier - - - - The connect_object_after() method is -similar to the connect_object() method except that -the handler is added to the signal handler list after -the default class signal handler. Otherwise the details of -handler definition and invocation are the -same. - - - - - gobject.GObject.disconnect - - - disconnect - handler_id - - - - handler_id : - an integer handler -identifier - - - - The disconnect() method removes the -signal handler with the specified handler_id from the -list of signal handlers for the object. - - - - - gobject.GObject.handler_disconnect - - - handler_disconnect - handler_id - - - - handler_id : - an integer handler -identifier - - - - The handler_disconnect() method removes -the signal handler with the specified handler_id from -the list of signal handlers for the object. - - - - - gobject.GObject.handler_is_connected - - - handler_is_connected - handler_id - - - - handler_id : - an integer handler -identifier - - - Returns : - True if the signal handler -is connected to the object. - - - - The handler_is_connected() method -returns True if the signal handler with the specified -handler_id is connected to the object. - - - - - gobject.GObject.handler_block - - - handler_block - handler_id - - - - handler_id : - an integer handler -identifier - - - - The handler_block() method blocks the -signal handler with the specified handler_id from -being invoked until it is unblocked. - - - - - gobject.GObject.handler_unblock - - - handler_unblock - handler_id - - - - handler_id : - an integer handler -identifier - - - - The handler_unblock() method unblocks -the signal handler with the specified handler_id -thereby allowing it to be invoked when the associated signal is -emitted. - - - - - gobject.GObject.emit - - - emit - detailed_signal - ... - - - - detailed_signal : - a string containing the signal -name - - - ... : - additional parameters - - - Returns : - a PyObject* - - - The emit() method causes the object to -emit the signal specified by detailed_signal. The -additional parameters must match the number and type of the required signal -handler parameters. In most cases no additional parameters are needed. for -example: - - button.emit("clicked") - - is all that is required to emit the "clicked" signal for a -button. The most common case requiring additional parameters occurs when -emitting an event signal; for example: - - button.emit("button_press_event", event) - - - - - - gobject.GObject.stop_emission - - - stop_emission - detailed_signal - - - - detailed_signal : - a string containing the signal -name - - - - The stop_emission() method stops the -current emission of the signal specified by -detailed_signal. Any signal handlers in the list -still to be run will not be invoked. - - - - - gobject.GObject.emit_stop_by_name - - - emit_stop_by_name - detailed_signal - - - - detailed_signal : - a string containing the signal -name - - - - The emit_stop_by_name() method stops -the current emission of the signal specified by -detailed_signal. Any signal handlers in the list -still to be run will not be invoked. - - - - - gobject.GObject.chain - - - chain - ... - - - - ... : - additional parameters - - - Returns : - a Python object - - - - The chain() method does something. - - - - - - - Signals - - - The GObject "notify" Signal - - - callback - gobject - property_spec - user_param1 - ... - - - - - gobject : - the gobject that received the -signal - - - property_spec : - the gobject.GParamSpec of the property that was -changed - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "notify" signal is emitted on a gobject when one of its -properties has been changed. Note that getting this signal doesn't guarantee -that the value of the property has actually changed, it may also be emitted -when the setter for the property is called to reinstate the previous -value. For example to be notified of the change of the title of a gtk.Window you could -connect to the "notify" signal similar to: - - - window.connect("notify::title", callback) - - - - - - -
diff --git a/docs/reference/pygtk-gtk-classes.xml b/docs/reference/pygtk-gtk-classes.xml deleted file mode 100644 index 354ebbaf..00000000 --- a/docs/reference/pygtk-gtk-classes.xml +++ /dev/null @@ -1,192 +0,0 @@ - - - - The gtk Class Reference - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/pygtk-gtk-constants.xml b/docs/reference/pygtk-gtk-constants.xml deleted file mode 100644 index 3db49cd2..00000000 --- a/docs/reference/pygtk-gtk-constants.xml +++ /dev/null @@ -1,4188 +0,0 @@ - - - - - - gtk Constants - the built-in constants of the gtk module - - - - Synopsis - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Description - - - GTK Accel Flags Constants - - The Accel Flags constants are a set of bit-flags that specify -characteristics of the accelerator. - - - - gtk.ACCEL_VISIBLE - - if set, the accelerator is visible in a label - - - - gtk.ACCEL_LOCKED - - If set the accelerator cannot be changed by the - user. - - - - gtk.ACCEL_MASK - - A mask for the Accel Flags - - - - - - - - GTK Anchor Type Constants - - The Anchor Type constants specify the anchor point of a - widget. - - - - 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 - - Same as gtk.ANCHOR_NORTH - - - - gtk.ANCHOR_NW - - Same as gtk.ANCHOR_NORTH_WEST - - - - gtk.ANCHOR_NE - - Same as gtk.ANCHOR_NORTH_EAST - - - - gtk.ANCHOR_S - - Same as gtk.ANCHOR_SOUTH - - - - gtk.ANCHOR_SW - - Same as gtk.ANCHOR_SOUTH_WEST - - - - gtk.ANCHOR_SE - - Same as gtk.ANCHOR_SOUTH_EAST - - - - gtk.ANCHOR_W - - Same as gtk.ANCHOR_WEST - - - - gtk.ANCHOR_E - - Same as gtk.ANCHOR_EAST - - - - - - - - GTK Arrow Type Constants - - The Arrow Type constants specify the direction a gtk.Arrow should -point. - - - - gtk.ARROW_UP - - Represents an upward pointing arrow. - - - - gtk.ARROW_DOWN - - Represents a downward pointing arrow. - - - - gtk.ARROW_LEFT - - Represents a left pointing arrow. - - - - gtk.ARROW_RIGHT - - Represents a right pointing arrow. - - - - - - - - GTK Assistant Page Type Constants - - The Assistant Page Type constants are used to determine the page - role inside the gtk.Assistant. It's - used to handle buttons sensitivity and visibility. - - - An assistant needs to end its page flow with a page of type - gtk.ASSISTANT_PAGE_CONFIRM or - gtk.ASSISTANT_PAGE_SUMMARY to be correct. - - - - - gtk.ASSISTANT_PAGE_CONTENT - - The page has regular contents. - - - - gtk.ASSISTANT_PAGE_INTRO - - The page contains an introduction to the assistant - task. - - - - gtk.ASSISTANT_PAGE_CONFIRM - - The page lets the user confirm or deny the - changes. - - - - gtk.ASSISTANT_PAGE_SUMMARY - - The page informs the user of the changes done. - - - - gtk.ASSISTANT_PAGE_PROGRESS - - Used for tasks that take a long time to complete, - blocks the assistant until the page is marked as - complete. - - - - - - - - GTK Attach Flag Options Constants - - The Attach Flag Options constants are a set of bit-flags that -specify the expansion properties that a widget will have when it (or its -parent) is resized. - - - - gtk.EXPAND - - The widget should expand to take up any extra space in -its container that has been allocated. - - - - gtk.SHRINK - - The widget should shrink as and when -possible. - - - - gtk.FILL - - The widget should fill the space allocated to -it. - - - - - - - - GTK ButtonBox Style Constants - - The ButtonBox Style constants specify the style that a gtk.ButtonBox -uses to layout the buttons it contains. (See also: gtk.VButtonBox -and gtk.HButtonBox). - - - - gtk.BUTTONBOX_DEFAULT_STYLE - - Default packing. - - - - gtk.BUTTONBOX_SPREAD - - Buttons are evenly spread across the ButtonBox. - - - - gtk.BUTTONBOX_EDGE - - Buttons are placed at the edges of the - ButtonBox. - - - - gtk.BUTTONBOX_START - - Buttons are grouped toward the start of box, (on the - left for a HBox, or the top for a VBox). - - - - gtk.BUTTONBOX_END - - Buttons are grouped toward the end of a box, (on the - right for a HBox, or the bottom for a VBox). - - - - - - - - GTK Buttons Type Constants - - The Buttons Type constants specify the pre-defined sets of -buttons for the dialog. If none of these choices are appropriate, simply use -gtk.BUTTONS_NONE then call the add_buttons() -method. - - - - gtk.BUTTONS_NONE - - no buttons at all - - - - gtk.BUTTONS_OK - - an OK button - - - - gtk.BUTTONS_CLOSE - - a Close button - - - - gtk.BUTTONS_CANCEL - - a Cancel button - - - - gtk.BUTTONS_YES_NO - - Yes and No buttons - - - - gtk.BUTTONS_OK_CANCEL - - OK and Cancel buttons - - - - - - - - GTK Calendar Display Options Constants - - The Calendar Display Options constants are a set of bit-flags -that specify the display and behavior of a gtk.Calendar. - - - - 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 - - Since GTK+ 2.4, this option is deprecated and ignored - by GTK+. The information on which day the calendar week starts - is derived from the locale. - - - - - - - - GTK CellRenderer Mode Constants - - The CellRenderer Mode constants specify how the user can -interact with a particular cell. - - - - gtk.CELL_RENDERER_MODE_INERT - - The cell is just for display and cannot be interacted -with. Note that this doesn't mean that e.g. the row being drawn can't be -selected -- just that a particular element of it cannot be individually -modified. - - - - gtk.CELL_RENDERER_MODE_ACTIVATABLE - - The cell can be clicked. - - - - gtk.CELL_RENDERER_MODE_EDITABLE - - The cell can be edited or otherwise modified. - - - - - - - - GTK CellRenderer State Constants - - The CellRenderer State constants specify how a cell is to be -rendered. - - - - gtk.CELL_RENDERER_SELECTED - - The cell is currently selected, and probably has a - selection colored background to render to. - - - - gtk.CELL_RENDERER_PRELIT - - The mouse is hovering over the cell. - - - - gtk.CELL_RENDERER_INSENSITIVE - - The cell is drawn in an insensitive manner - - - - gtk.CELL_RENDERER_SORTED - - The cell is in a sorted row - - - - gtk.CELL_RENDERER_FOCUSED - - The cell has the focus. - - - - - - - - GTK CellRendererAccel Mode Constants - - The CellRendererAccel Mode constants specify if the edited - accelerators are GTK+ accelerators. If they are, consumed modifiers - are suppressed, only accelerators accepted by GTK+ are allowed, and - the accelerators are rendered in the same way as they are in - menus. - - - - gtk.CELL_RENDERER_ACCEL_MODE_GTK - - Only accelerators accepted by GTK+ are allowed. - - - - gtk.CELL_RENDERER_ACCEL_MODE_OTHER - - Any accelerators are allowed. - - - - - - - - GTK Corner Type Constants - - The Corner Type constants specify the corner a child widget -should be placed in when packed into a gtk.ScrolledWindow. This -is effectively the opposite of where the scroll bars are placed. - - - - gtk.CORNER_TOP_LEFT - - Place the scrollbars on the right and bottom of the -widget (default behavior). - - - - gtk.CORNER_BOTTOM_LEFT - - Place the scrollbars on the top and right of the -widget. - - - - gtk.CORNER_TOP_RIGHT - - Place the scrollbars on the left and bottom of the -widget. - - - - gtk.CORNER_BOTTOM_RIGHT - - Place the scrollbars on the top and left of the -widget. - - - - - - - - GTK Curve Type Constants - - The Curve Type constants specify the type of curve to use for a -gtk.Curve. - - - - gtk.CURVE_TYPE_LINEAR - - Linear interpolation - - - - gtk.CURVE_TYPE_SPLINE - - Spline interpolation - - - - gtk.CURVE_TYPE_FREE - - Free form curve - - - - - - - - GTK Debug Flag Constants - - The Debug Flag constants are a set of bit-flags that specify the -debug options. - - - - gtk.DEBUG_MISC - - - - - - gtk.DEBUG_PLUGSOCKET - - - - - - gtk.DEBUG_TEXT - - - - - - gtk.DEBUG_TREE - - - - - - gtk.DEBUG_UPDATES - - - - - - gtk.DEBUG_KEYBINDINGS - - - - - - gtk.DEBUG_MULTIHEAD - - - - - - - - - - GTK Delete Type Constants - - The Delete Type constants specify the deletion type. - - - - gtk.DELETE_CHARS - - Delete a character at the cursor - - - - gtk.DELETE_WORD_ENDS - - Delete from the cursor to the end of a word - - - - gtk.DELETE_WORDS - - Delete a number of words - - - - gtk.DELETE_DISPLAY_LINES - - Delete a single line at the cursor - - - - gtk.DELETE_DISPLAY_LINE_ENDS, - - Delete from the cursor to the end of the line. - - - - gtk.DELETE_PARAGRAPH_ENDS - - Delete from the cursor to a paragraph end (usually to - the period) - - - - gtk.DELETE_PARAGRAPHS - - Delete several complete paragraphs at the cursor - - - - gtk.DELETE_WHITESPACE - - Delete the whitespace at the cursor. - - - - - - - - GTK Dest Defaults Constants - - The Dest Defaults constants are a set of bit-flags that specify -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, during a drag over this widget -will check if the drag matches this widget's list of possible targets and -actions. The gtk.gdk.DragContext.drag_status() -method will be called as appropriate. - - - - gtk.DEST_DEFAULT_HIGHLIGHT - - If set for a widget, draw a highlight on this widget -as long as a drag is over this widget and the widget drag format and action -are acceptable. - - - - gtk.DEST_DEFAULT_DROP - - If set for a widget, when a drop occurs, check if the -drag matches this widget's list of possible targets and actions. If so, call -the gtk.Widget.drag_get_data() -method on behalf of the widget. Whether or not the drop is successful, call -the gtk.gdk.DragContext.finish() -method. If the action was a move, then if the drag was successful, then -True will be passed for the delete parameter to the gtk.gdk.DragContext.finish() -method. - - - - gtk.DEST_DEFAULT_ALL - - If set, specifies that all default actions should be -taken. - - - - - - - - GTK Dialog Flag Constants - - The Dialog Flag constants are a set of bit-flags that specify -characteristics of a dialog. - - - - gtk.DIALOG_MODAL - - If set, the dialog grabs all keyboard - events - - - - gtk.DIALOG_DESTROY_WITH_PARENT - - If set, the dialog is destroyed when its parent - is. - - - - gtk.DIALOG_NO_SEPARATOR - - If set, there is no separator bar above the - buttons. - - - - - - - - GTK Direction Type Constants - - The Direction Type constants specify a direction for moving a -cursor or focus. - - - - gtk.DIR_TAB_FORWARD - - Tab forward. - - - - gtk.DIR_TAB_BACKWARD - - Tab backward. - - - - gtk.DIR_UP - - Up. - - - - gtk.DIR_DOWN - - Down. - - - - gtk.DIR_LEFT - - Left. - - - - gtk.DIR_RIGHT - - Right. - - - - - - - - GTK Expander Style Constants - - The Expander Style constants specify the style of the expanders -drawn by a gtk.TreeView - - - - gtk.EXPANDER_COLLAPSED - - The style used for a collapsed subtree. - - - - gtk.EXPANDER_SEMI_COLLAPSED - - Intermediate style used during animation. - - - - gtk.EXPANDER_SEMI_EXPANDED - - Intermediate style used during animation. - - - - gtk.EXPANDER_EXPANDED - - The style used for an expanded subtree. - - - - - - - - GTK FileChooser Action Constants - - The FileChooser Action constants specify the mode of a gtk.FileChooser -i.e. whether it is being used to open existing files or to save to a -possibly new file. - - - - gtk.FILE_CHOOSER_ACTION_OPEN - - Indicates open mode. The file chooser will only let the - user pick an existing file. - - - - gtk.FILE_CHOOSER_ACTION_SAVE - - Indicates save mode. The file chooser will let the user - pick an existing file, or type in a new filename. - - - - gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER - - Indicates an Open mode for selecting folders. The file - chooser will let the user pick an existing folder. - - - - gtk.FILE_CHOOSER_ACTION_CREATE_FOLDER - - Indicates a mode for creating a new folder. The file - chooser will let the user name an existing or new - folder. - - - - - - - - GTK FileChooser Confirmation Constants - - - These constants are available in PyGTK 2.8 and above. - - - The FileChooser Confirmation constants are used to specify the -return value of a gtk.FileChooser -"confirm-overwrite" -signal handler. This value determines whether the file chooser will present -the stock confirmation dialog, accept the user's choice of a filename, or -let the user choose another filename. - - - - gtk.FILE_CHOOSER_CONFIRMATION_CONFIRM - - The file chooser will present its stock dialog to -confirm overwriting an existing file. - - - - gtk.FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME - - The file chooser will terminate and accept the user's -choice of a file name. - - - - gtk.FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN - - The file chooser will continue running, allowing -the user to select another file name. - - - - - - - - GTK FileChooser Error Constants - - The FileChooser Error constants specify the various errors that -can occur while calling gtk.FileChooser -functions. - - - - gtk.FILE_CHOOSER_ERROR_NONEXISTENT - - Indicates that a file does not exist. - - - - gtk.FILE_CHOOSER_ERROR_BAD_FILENAME - - Indicates a malformed filename. - - - - - - - - GTK FileFilter Flags Constants - - The FileFilter Flags constants are a set of bit-flags that -specify the file types to filter the files against. - - - - gtk.FILE_FILTER_FILENAME - - The full pathname of the file e.g. /tmp/junk. - - - - gtk.FILE_FILTER_URI - - The full URI of the file - e.g. file:///tmp/junk. - - - - gtk.FILE_FILTER_DISPLAY_NAME - - The simple name of the file e.g. junk. - - - - gtk.FILE_FILTER_MIME_TYPE - - The MIME type of the file e.g. text/html. - - - - - - - - GTK Icon Lookup Flags Constants - - The Icon Lookup Flags constants are a set of bit-flags that -specify options for the gtk.IconTheme.lookup_icon() -method - - - - gtk.ICON_LOOKUP_NO_SVG - - Never return SVG (Scalable Vector Graphics) icons, -even if gdk-pixbuf supports them. Cannot be used together with -gtk.ICON_LOOKUP_FORCE_SVG. - - - - gtk.ICON_LOOKUP_FORCE_SVG - - Return SVG icons, even if gdk-pixbuf doesn't support -them. Cannot be used together with -gtk.ICON_LOOKUP_NO_SVG. - - - - gtk.ICON_LOOKUP_USE_BUILTIN - - When passed to the gtk.IconTheme.lookup_icon() -method includes builtin icons as well as files. For a builtin icon, the -gtk.IconInfo.get_filename() -method returns None and you need to call the gtk.IconInfo.get_builtin_pixbuf() -method. - - - - - - - - GTK Icon Size Constants - - The Icon Size constants specify the pre-defined sizes of icons -for various application uses. - - - - gtk.ICON_SIZE_INVALID - - - - - - gtk.ICON_SIZE_MENU - - - - - - gtk.ICON_SIZE_SMALL_TOOLBAR - - - - - - gtk.ICON_SIZE_LARGE_TOOLBAR - - - - - - gtk.ICON_SIZE_BUTTON - - - - - - gtk.ICON_SIZE_DND - - - - - - gtk.ICON_SIZE_DIALOG - - - - - - - - - - GTK IconTheme Error Constants - - The IconTheme Error constants specify error codes for gtk.IconTheme -operations. - - - - gtk.ICON_THEME_NOT_FOUND - - The icon specified does not exist in the - theme - - - - gtk.ICON_THEME_FAILED - - An unspecified error occurred. - - - - - - - - GTK IconView Drop Position Constants - - The IconView Drop Position constants specify the location relative to the receiving item where the drop should take place. - - - - gtk.ICON_VIEW_NO_DROP - - - - - - gtk.ICON_VIEW_DROP_INTO - - - - - - gtk.ICON_VIEW_DROP_LEFT - - - - - - gtk.ICON_VIEW_DROP_RIGHT - - - - - - gtk.ICON_VIEW_DROP_ABOVE - - - - - - gtk.ICON_VIEW_DROP_BELOW - - - - - - - - - - GTK IM Pre-edit Style Constants - - The IM Pre-edit Style constants specify the style of input method -pre-edit display. - - - - gtk.IM_PREEDIT_NOTHING - - - - - - gtk.IM_PREEDIT_CALLBACK - - - - - - gtk.IM_PREEDIT_NONE - - - - - - - - - - GTK IM Status Style Constants - - The IM Status Style constants specify the style of input method -display. - - - - gtk.IM_STATUS_NOTHING - - - - - - gtk.IM_STATUS_CALLBACK - - - - - - gtk.IM_STATUS_NONE - - - - - - - - - - GTK Image Type Constants - - The Image Type constants specify the type of image in a gtk.Image. - - - - gtk.IMAGE_EMPTY - - There is no image displayed by the widget - - - - gtk.IMAGE_PIXMAP - - The widget contains a gtk.gdk.Pixmap - - - - gtk.IMAGE_IMAGE - - The widget contains a gtk.gdk.Image - - - - gtk.IMAGE_PIXBUF - - The widget contains a gtk.gdk.Pixbuf - - - - gtk.IMAGE_STOCK - - The widget contains a stock icon name (see the Stock Items reference) - - - - gtk.IMAGE_ICON_SET - - The widget contains a gtk.IconSet - - - - gtk.IMAGE_ANIMATION - - The widget contains a gtk.gdk.PixbufAnimation - - - - - - - - GTK Justification Constants - - The Justification constants specify the justification of the -text inside a gtk.Label -widget. (See also gtk.Alignment). - - - - gtk.JUSTIFY_LEFT - - The text is placed at the left edge of the - label. - - - - gtk.JUSTIFY_RIGHT - - The text is placed at the right edge of the - label. - - - - gtk.JUSTIFY_CENTER - - The text is placed in the center of the - label. - - - - gtk.JUSTIFY_FILL - - The text is placed is distributed across the - label. - - - - - - - - GTK Menu Direction Type Constants - - The Menu Direction Type constants specify 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 Message Type Constants - - The Message Type constants specify the type of message being -displayed in the message dialog. - - - - gtk.MESSAGE_INFO - - Informational message - - - - gtk.MESSAGE_WARNING - - Nonfatal warning message - - - - gtk.MESSAGE_QUESTION - - Question requiring a choice - - - - gtk.MESSAGE_ERROR - - Fatal error message - - - - - - - - GTK Metric Type Constants - - The Metric Type constants specify the metric used by a gtk.Ruler. - - - - gtk.PIXELS - - Pixels. - - - - gtk.INCHES - - Inches. - - - - gtk.CENTIMETERS - - Centimeters. - - - - - - - - GTK Movement Step Constants - - The Movement Step constants specify the steps used in movement -through text. - - - - gtk.MOVEMENT_LOGICAL_POSITIONS - - move by graphemes - - - - gtk.MOVEMENT_VISUAL_POSITIONS - - move by graphemes - - - - gtk.MOVEMENT_WORDS - - move by words - - - - gtk.MOVEMENT_DISPLAY_LINES - - move by lines(wrapped lines) - - - - gtk.MOVEMENT_DISPLAY_LINE_ENDS - - move to line ends(wrapped lines) - - - - gtk.MOVEMENT_PARAGRAPHS - - move by paragraphs(newline-ended lines) - - - - gtk.MOVEMENT_PARAGRAPH_ENDS - - move to ends of a paragraph - - - - gtk.MOVEMENT_PAGES - - move by pages - - - - gtk.MOVEMENT_BUFFER_ENDS - - move to ends of the buffer - - - - - - - - GTK Notebook Tab Constants - - The Notebook Tab constants specify the tab position to receive -focus. - - - - gtk.NOTEBOOK_TAB_FIRST - - The first gtk.Notebook -tab - - - - gtk.NOTEBOOK_TAB_LAST - - The last gtk.Notebook -tab - - - - - - - - GTK Object Flags Constants - - The Object Flags constants are a set of bit-flags that specify -the state of the gtk.Object. - - - - gtk.IN_DESTRUCTION - - The object is currently being destroyed. This is used - internally to prevent reinvocations during - destruction. - - - - gtk.FLOATING - - The object is orphaned. - - - - - - - - GTK Orientation Constants - - The Orientation constants specify the orientation of widgets -which can be switched between horizontal and vertical orientation on the -fly, like gtk.Toolbar. - - - - gtk.ORIENTATION_HORIZONTAL - - The widget is in horizontal orientation. - - - - gtk.ORIENTATION_VERTICAL - - The widget is in vertical orientation. - - - - - - - - GTK Pack Direction Constants - - The Pack Direction constants specify the arrangement of gtk.MenuItems in a -gtk.MenuBar -or in a child gtk.MenuItem of a -menubar. - - - - gtk.ACK_DIRECTION_LTR - - Pack left to right - - - - gtk.PACK_DIRECTION_RTL - - Pack right to left - - - - gtk.PACK_DIRECTION_TTB - - Pack top to bottom - - - - gtk.PACK_DIRECTION_BTT - - Pack bottom to top - - - - - - - - GTK Pack Type Constants - - The Pack Type constants specify the packing location gtk.Box children. (See: -gtk.VBox, gtk.HBox, and gtk.ButtonBox). - - - - gtk.PACK_START - - The child is packed into the start of the box - - - - gtk.PACK_END - - The child is packed into the end of the box - - - - - - - - GTK Page Orientation Constants - - The Page Orientation constants specify the orientation of a - page. - - - - gtk.PAGE_ORIENTATION_PORTRAIT - - - - - - gtk.PAGE_ORIENTATION_LANDSCAPE - - - - - - gtk.PAGE_ORIENTATION_REVERSE_PORTRAIT - - - - - - gtk.PAGE_ORIENTATION_REVERSE_LANDSCAPE - - - - - - - - - - GTK Page Set Constants - - The Page Set constants specify the set of - pages to print. - - - - gtk.PAGE_SET_ALL - - print all pages - - - - gtk.PAGE_SET_EVEN - - print even pages only - - - - gtk.PAGE_SET_ODD - - print odd pages only - - - - - - - - GTK Papaer Name Constants - - The Paper Name constants specify the common standard sizes of - paper as a string. - - - - gtk.PAPER_NAME_A3 - - Name for the A4 paper size. - - - - gtk.PAPER_NAME_A4 - - Name for the A4 paper size. - - - - gtk.PAPER_NAME_A5 - - Name for the A5 paper size. - - - - gtk.PAPER_NAME_B5 - - Name for the B5 paper size. - - - - gtk.PAPER_NAME_LETTER - - Name for the Letter paper size. - - - - gtk.PAPER_NAME_EXECUTIVE - - Name for the Executive paper size. - - - - gtk.Name for the Legal paper size. - - - - - - - - - - GTK Path Priority Type Constants - - The Path Priority Type constants are a set of bit-flags that -specify the priority of path lookup. - - - - gtk.PATH_PRIO_LOWEST - - - - - - gtk.PATH_PRIO_GTK - - - - - - gtk.PATH_PRIO_APPLICATION - - - - - - gtk.PATH_PRIO_THEME - - - - - - gtk.PATH_PRIO_RC - - - - - - gtk.PATH_PRIO_HIGHEST - - - - - - - - - - GTK Path Type Constants - - The Path Type constants specify - - - - gtk.PATH_WIDGET - - - - - - gtk.PATH_WIDGET_CLASS - - - - - - gtk.PATH_CLASS - - - - - - - - - - GTK Policy Type Constants - - The Policy Type constants specify when a scroll bar will be -visible. - - - - gtk.POLICY_ALWAYS - - the scrollbar is always present - - - - gtk.POLICY_AUTOMATIC - - the scrollbar is present only if needed i.e. the -contents are larger than the window - - - - gtk.POLICY_NEVER - - the scrollbar is never present - - - - - - - - GTK Position Type Constants - - The Position Type constants specify - - - - gtk.POS_LEFT - - The feature is at the left edge. - - - - gtk.POS_RIGHT - - The feature is at the right edge. - - - - gtk.POS_TOP - - The feature is at the top edge. - - - - gtk.POS_BOTTOM - - The feature is at the bottom edge - - - - - - - - GTK Print Duplex Constants - - The Print Status constants specify how the output pages should - be duplexed: - - - - gtk.PRINT_DUPLEX_SIMPLEX - - one page per sheet i.e. no duplexing - - - - gtk.PRINT_DUPLEX_HORIZONTAL - - two pages per sheet horizontally duplexed - - - - gtk.PRINT_DUPLEX_VERTICAL - - two pages per sheet vertically duplexed - - - - - - - - GTK Print Error Constants - - The Print Error constants specify the type of printing - error: - - - - gtk.PRINT_ERROR_GENERAL - - - - - - gtk.PRINT_ERROR_INTERNAL_ERROR - - - - - - gtk.PRINT_ERROR_NOMEM - - - - - - - - - - GTK Print Pages Constants - - The Print Pages constants specify the set that should be - printed: - - - - gtk.PRINT_PAGES_ALL - - print all pages - - - - gtk.PRINT_PAGES_CURRENT - - print the current page - - - - gtk.PRINT_PAGES_RANGES - - print the specified ranges of pages - - - - - - - - GTK Print Operation Action Constants - - The Print Operation Action constants specify the print operation - to be performed: - - - - gtk.PRINT_OPERATION_ACTION_PRINT_DIALOG - - Show the print dialog. - - - - gtk.PRINT_OPERATION_ACTION_PRINT - - Start to print without showing the print dialog, based - on the current print settings. - - - - gtk.PRINT_OPERATION_ACTION_PREVIEW - - Show the print preview. - - - - gtk.PRINT_OPERATION_ACTION_EXPORT - - Export to a file. This requires the "export-filename" - property to be set. - - - - - - - - GTK Print Operation Result Constants - - The Print Operation Result constants specify the result of the - print operation as returned by the gtk.PrintOperation.run()) - method: - - - - gtk.PRINT_OPERATION_RESULT_ERROR - - An error has occured. - - - - gtk.PRINT_OPERATION_RESULT_APPLY - - The print settings should be stored. - - - - gtk.PRINT_OPERATION_RESULT_CANCEL - - The print operation has been canceled, the print - settings should not be stored. - - - - gtk.PRINT_OPERATION_RESULT_IN_PROGRESS - - The print operation is complete yet. This value will - only be returned when running asynchronously. - - - - - - - - GTK Print Quality Constants - - The Print Quality constants specify the quality that should be - used when printing the output pages: - - - - gtk.PRINT_QUALITY_LOW - - low quality - - - - gtk.PRINT_QUALITY_NORMAL - - normal quality - - - - gtk.PRINT_QUALITY_HIGH - - high quality - - - - gtk.PRINT_QUALITY_DRAFT - - draft quality - - - - - - - - GTK Print Status Constants - - The Print Status constants specify - - - - gtk.PRINT_STATUS_INITIAL - - The printing has not started yet; this status is set - initially, and while the print dialog is shown. - - - - gtk.PRINT_STATUS_PREPARING - - This status is set while the "begin-print" signal is - emitted and during pagination. - - - - gtk.PRINT_STATUS_GENERATING_DATA - - This status is set while the pages are being - rendered. - - - - gtk.PRINT_STATUS_SENDING_DATA - - The print job is being sent off to the - printer. - - - - gtk.PRINT_STATUS_PENDING - - The print job has been sent to the printer, but is not - printed for some reason, e.g. the printer may be - stopped. - - - - gtk.PRINT_STATUS_PENDING_ISSUE - - Some problem has occurred during printing, e.g. a paper - jam. - - - - gtk.PRINT_STATUS_PRINTING - - The printer is processing the print job. - - - - gtk.PRINT_STATUS_FINISHED - - The printing has been completed successfully. - - - - gtk.PRINT_STATUS_FINISHED_ABORTED - - The printing has been aborted. - - - - - - - - GTK ProgressBar Orientation Constants - - The ProgressBar Orientation constants specify the orientation -and growth direction for a 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. - - - - - - - - GTK ProgressBar Style Constants - - The ProgressBar Style constants specify the style of the gtk.ProgressBar -display. - - - - gtk.PROGRESS_CONTINUOUS - - The progress bar grows in a smooth, continuous - manner. - - - - gtk.PROGRESS_DISCRETE - - The progress bar grows in discrete, visible - blocks. - - - - - - - - GTK RC Flags Constants - - The>RC Flags constants are a set of bit-flags that specify which -fields of a gtk.RcStyle 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 Token Type Constants - - The RC Token Type constants specify 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_TEXT - - - - - - gtk.RC_TOKEN_BASE - - - - - - gtk.RC_TOKEN_XTHICKNESS - - - - - - gtk.RC_TOKEN_YTHICKNESS - - - - - - gtk.RC_TOKEN_FONT - - - - - - gtk.RC_TOKEN_FONTSET - - - - - - gtk.RC_TOKEN_FONT_NAME - - - - - - gtk.RC_TOKEN_BG_PIXMAP - - - - - - gtk.RC_TOKEN_PIXMAP_PATH - - - - - - gtk.RC_TOKEN_STYLE - - - - - - gtk.RC_TOKEN_BINDING - - - - - - gtk.RC_TOKEN_BIND - - - - - - gtk.RC_TOKEN_WIDGET - - - - - - gtk.RC_TOKEN_WIDGET_CLASS - - - - - - gtk.RC_TOKEN_CLASS - - - - - - gtk.RC_TOKEN_LOWEST - - - - - - gtk.RC_TOKEN_GTK - - - - - - gtk.RC_TOKEN_APPLICATION - - - - - - gtk.RC_TOKEN_THEME - - - - - - gtk.RC_TOKEN_RC - - - - - - gtk.RC_TOKEN_HIGHEST - - - - - - gtk.RC_TOKEN_ENGINE - - - - - - gtk.RC_TOKEN_MODULE_PATH - - - - - - gtk.RC_TOKEN_IM_MODULE_PATH - - - - - - gtk.RC_TOKEN_IM_MODULE_FILE - - - - - - gtk.RC_TOKEN_STOCK - - - - - - gtk.RC_TOKEN_LTR - - - - - - gtk.RC_TOKEN_RTL - - - - - - gtk.RC_TOKEN_LAST - - - - - - - - - - GTK Recent Chooser Error Constants - - The Recent Recent Chooser Error constants specify the various - errors that can occur while calling gtk.RecentChooser - methods: - - - - gtk.RECENT_CHOOSER_ERROR_NOT_FOUND - - Indicates that a file does not exist - - - - gtk.RECENT_CHOOSER_ERROR_INVALID_URI - - Indicates a malformed URI - - - - - - - - GTK Recent Filter Flags - - The Recent Filter Flags specify what types of filtering are - needed: - - - - gtk.RECENT_FILTER_URI - - the URI of the file being tested - - - - gtk.RECENT_FILTER_DISPLAY_NAME - - the string that will be used to display the file in the - recent chooser - - - - gtk.RECENT_FILTER_MIME_TYPE - - the mime type of the file - - - - gtk.RECENT_FILTER_APPLICATION - - the list of applications that have registered the - file - - - - gtk.RECENT_FILTER_GROUP - - the groups to which the file belongs - - - - gtk.RECENT_FILTER_AGE - - the number of days elapsed since the file has been - registered - - - - - - - - GTK Recent Sort Type Constants - - The Recent Sort Type constants specify the sorting method to be - applyed to the recently used resource list. - - - - gtk.RECENT_SORT_NONE - - Do not sort the returned list of recently used - resources. - - - - gtk.RECENT_SORT_MRU - - Sort the returned list with the most recently used - items first. - - - - gtk.RECENT_SORT_LRU - - Sort the returned list with the least recently used - items first. - - - - gtk.RECENT_SORT_CUSTOM - - Sort the returned list using a custom sorting function - passed using the gtk.RecentChooser.set_sort_func() - method. - - - - - - - - GTK Relief Style Constants - - The Relief Style constants specify - - - - gtk.RELIEF_NORMAL - - Draw a normal relief. - - - - gtk.RELIEF_HALF - - Draw a half relief. - - - - gtk.RELIEF_NONE - - Draw no relief. - - - - - - - - GTK Resize Mode Constants - - The Resize Mode constants specify how resize requests are -handled by a widget. - - - - gtk.RESIZE_PARENT - - Pass resize request to the parent - - - - gtk.RESIZE_QUEUE - - Queue resizes on this widget - - - - gtk.RESIZE_IMMEDIATE - - Perform the resizes now - - - - - - - - GTK Response Type Constants - - The Response Type constants specify pre-defined response - values. - - - - gtk.RESPONSE_NONE - - - gtk.RESPONSE_REJECT - - - gtk.RESPONSE_ACCEPT - - - gtk.RESPONSE_DELETE_EVENT - - - gtk.RESPONSE_OK - - - gtk.RESPONSE_CANCEL - - - gtk.RESPONSE_CLOSE - - - gtk.RESPONSE_YES - - - gtk.RESPONSE_NO - - - gtk.RESPONSE_APPLY - - - gtk.RESPONSE_HELP - - - - - - - GTK Scroll Step Constants - - The Scroll Step constants specify the size of the scroll -movements. - - - - gtk.SCROLL_STEPS - - Scroll up or down in step increments - - - - gtk.SCROLL_PAGES, - - Scroll up or down in page increments - - - - gtk.SCROLL_ENDS - - Scroll to the beginning or end - - - - gtk.SCROLL_HORIZONTAL_STEPS - - Scroll left or right in step increments - - - - gtk.SCROLL_HORIZONTAL_PAGES - - Scroll left or right in step increments - - - - gtk.SCROLL_HORIZONTAL_ENDS - - Scroll to the far left end or far right end. - - - - - - - - GTK Scroll Type Constants - - The Scroll Type constants specify the type of scroll - \movement. - - - - gtk.SCROLL_NONE - - - - - - gtk.SCROLL_JUMP - - - - - - gtk.SCROLL_STEP_BACKWARD - - - - - - gtk.SCROLL_STEP_FORWARD - - - - - - gtk.SCROLL_PAGE_BACKWARD - - - - - - gtk.SCROLL_PAGE_FORWARD - - - - - - gtk.SCROLL_STEP_UP - - - - - - gtk.SCROLL_STEP_DOWN - - - - - - gtk.SCROLL_PAGE_UP - - - - - - gtk.SCROLL_PAGE_DOWN - - - - - - gtk.SCROLL_STEP_LEFT, - - - - - - gtk.SCROLL_STEP_RIGHT - - - - - - gtk.SCROLL_PAGE_LEFT - - - - - - gtk.SCROLL_PAGE_RIGHT - - - - - - gtk.SCROLL_START - - - - - - gtk.SCROLL_END - - - - - - - - - - GTK Selection Mode Constants - - The Selection Mode constants specify the mode of gtk.TreeSelection - in a gtk.Treeview - - - - gtk.SELECTION_NONE - - No selection allowed. - - - - gtk.SELECTION_SINGLE - - A single selection allowed by clicking. - - - - gtk.SELECTION_BROWSE - - A single selection allowed by browsing with the -pointer. - - - - gtk.SELECTION_MULTIPLE - - Multiple items can be selected at once. - - - - gtk.SELECTION_EXTENDED - - Deprecated. - - - - - - - - GTK Shadow Type Constants - - The Shadow Type constants specify the appearance of an outline -typically provided by a gtk.Frame. - - - - gtk.SHADOW_NONE - - No outline. - - - - gtk.SHADOW_IN - - The outline is beveled inward. - - - - gtk.SHADOW_OUT - - The outline is beveled outward like a button. - - - - gtk.SHADOW_ETCHED_IN - - The outline itself is an inward bevel, but the frame - bevels outward - - - - gtk.SHADOW_ETCHED_OUT - - The outline itself is an outward bevel, but the frame - bevels inward - - - - - - - - GTK SizeGroup Mode Constants - - The SizeGroup Mode constants specify the directions in which the -size group affects the requested sizes of its component widgets. - - - - gtk.SIZE_GROUP_NONE - - The group has no affect - - - - gtk.SIZE_GROUP_HORIZONTAL - - The group affects horizontal requisition - - - - gtk.SIZE_GROUP_VERTICAL - - The group affects vertical requisition - - - - gtk.SIZE_GROUP_BOTH - - The group affects both horizontal and vertical - requisition - - - - - - - - GTK Sort Type Constants - - The Sort Type constants specify he direction of a sort. - - - - gtk.SORT_ASCENDING - - Sorting is in ascending order. - - - - gtk.SORT_DESCENDING - - Sorting is in descending order. - - - - - - - - GTK SpinButton Update Policy Constants - - The SpinButton Update Policy constants specify the update policy -for a gtk.SpinButton. - - - - gtk.UPDATE_ALWAYS - - When refreshing a gtk.SpinButton, -the value is always displayed. - - - - gtk.UPDATE_IF_VALID - - When refreshing a gtk.SpinButton, -the value is only displayed if it is valid within the bounds of the spin -button's gtk.Adjustment. - - - - - - - - GTK Spin Type Constants - - The Spin Type constants specify the step movement of a gtk.SpinButton. - - - - gtk.SPIN_STEP_FORWARD - - Spin a gtk.SpinButton -forward by the step value of the spin button's gtk.Adjustment. - - - - gtk.SPIN_STEP_BACKWARD - - Spin a gtk.SpinButton -backward by the step value of the spin button's gtk.Adjustment. - - - - gtk.SPIN_PAGE_FORWARD - - Spin a gtk.SpinButton -forward by the page value of the spin button's gtk.Adjustment. - - - - gtk.SPIN_PAGE_BACKWARD - - Spin a gtk.SpinButton -backward by the page value of the spin button's gtk.Adjustment. - - - - gtk.SPIN_HOME - - Set the spin button's value to the minimum possible -value specified by its gtk.Adjustment - - - - gtk.SPIN_END - - Set the spin button's value to the maximum possible -value specified by its gtk.Adjustment - - - - gtk.SPIN_USER_DEFINED - - The programmer must specify the exact amount to spin -the gtk.SpinButton. - - - - - - - - GTK State Type Constants - - The State Type constants specify the current state of a widget; -the state determines how the widget is drawn. The State Type constants are -also used to identify different colors in a gtk.Style for -drawing, so states can be used for subparts of a widget as well as entire -widgets. - - - - gtk.STATE_NORMAL - - State during normal operation. - - - - gtk.STATE_ACTIVE - - State of a currently active widget, such as a depressed - button. - - - - gtk.STATE_PRELIGHT - - State indicating that the mouse pointer is over the - widget and the widget will respond to mouse clicks. - - - - gtk.STATE_SELECTED - - State of a selected item, such the selected row in a - list. - - - - gtk.STATE_INSENSITIVE - - State indicating that the widget is unresponsive to - user actions. - - - - - - - - GTK Target Flags Constants - - The Target Flags constants are a set of bit-flags that specify -constraints on the target of a drag operation. - - - - gtk.TARGET_SAME_APP - - If this is set, the target will only be selected for -drags within a single application. - - - - gtk.TARGET_SAME_WIDGET - - f this is set, the target will only be selected for -drags within a single widget. - - - - - - - - GTK Text Direction Constants - - The Text Direction constants specify the direction of the -text. - - - - gtk.TEXT_DIR_NONE - - Text direction not specified. - - - - gtk.TEXT_DIR_LTR, - - Left to right direction. - - - - gtk.TEXT_DIR_RTL - - Right to left direction - - - - - - - - GTK Text Search Flags Constants Constants - - The Text Search Flags constants are a set of bit-flags that specify what types of text are -suitable for search matches in a gtk.TextView. - - - - gtk.TEXT_SEARCH_VISIBLE_ONLY - - Only visible text can match the search - criteria. - - - - gtk.TEXT_SEARCH_TEXT_ONLY - - Both visible and invisible text can match the search - criteria. - - - - - - - - GTK Text Window Type Constants - - The Text Window Type constants specify the gtk.gdk.Window -objects that make up a gtk.TextView. See -the gtk.TextView.get_window() -method for more detail. - - - - gtk.TEXT_WINDOW_WIDGET - - The gtk.gdk.Window of -the gtk.TextView -widget. - - - - gtk.TEXT_WINDOW_TEXT - - The gtk.gdk.Window that -contains the text in the gtk.TextView. - - - - gtk.TEXT_WINDOW_LEFT - - The left child gtk.gdk.Window of -the gtk.TextView. - - - - gtk.TEXT_WINDOW_RIGHT - - The right child gtk.gdk.Window of -the gtk.TextView. - - - - gtk.TEXT_WINDOW_TOP - - The top child gtk.gdk.Window of -the gtk.TextView. - - - - gtk.TEXT_WINDOW_BOTTOM - - The bottom child gtk.gdk.Window of -the gtk.TextView. - - - - - - - - GTK TextBuffer Target Info Constants - - The TextBuffer Target Info constants specify the info integer - for use with the gtk.target_list_add_rich_text_targets() - and gtk.target_list_add_text_targets() - functions. - - - - gtk.TEXT_BUFFER_TARGET_INFO_BUFFER_CONTENTS - - - - - - gtk.TEXT_BUFFER_TARGET_INFO_RICH_TEXT - - - - - - gtk.TEXT_BUFFER_TARGET_INFO_TEXT - - - - - - - - - - GTK Toolbar Space Style Constants - - The Toolbar Space Style constants specify whether a spacer is -displayed as a vertical line or space. - - - - gtk.TOOLBAR_SPACE_EMPTY, - - Show as an empty space - - - - gtk.TOOLBAR_SPACE_LINE - - Show as a vertical line. - - - - - - - - GTK Toolbar Style Constants - - The Toolbar Style constants specify the appearance of a gtk.Toolbar. Note -that setting the toolbar style overrides the user's preferences for the -default toolbar style. - - - - gtk.TOOLBAR_ICONS - - Buttons display only icons in the toolbar. - - - - gtk.TOOLBAR_TEXT - - Buttons display only text labels in the - toolbar. - - - - gtk.TOOLBAR_BOTH - - Buttons display text and icons in the - toolbar. - - - - gtk.TOOLBAR_BOTH_HORIZ - - Buttons display icons and text alongside each other, - rather than vertically stacked - - - - - - - - GTK TreeModel Flags Constants - - The TreeModel Flags constants are a set of bit-flags that -specify various properties of a gtk.TreeModel. They -are returned by the gtk.TreeModel.get_flags() -method, and must be static for the lifetime of the object. A more complete -description of gtk.TREE_MODEL_ITERS_PERSIST can be found -in the gtk.TreeView -reference description. - - - - gtk.TREE_MODEL_ITERS_PERSIST - - Iterators survive all signals emitted by the - tree. - - - - gtk.TREE_MODEL_LIST_ONLY - - The model is a list only, and never has - children - - - - - - - - GTK TreeView Drop Position Constants - - The TreeView Drop Position constants specify where a dropped row -goes. - - - - gtk.TREE_VIEW_DROP_BEFORE - - The dropped item goes before the row it's dropped -on. - - - - gtk.TREE_VIEW_DROP_AFTER - - The dropped item goes after the row it's dropped -on. - - - - gtk.TREE_VIEW_DROP_INTO_OR_BEFORE - - The dropped item becomes a child of the row it's dropped -on. Fallback to goes before. - - - - gtk.TREE_VIEW_DROP_INTO_OR_AFTER - - The dropped item becomes a child of the row it's dropped -on. Fallback to goes after. - - - - - - - - GTK TreeView Grid Lines Constants - - The TreeView Grid Lines constants specify how grid lines should be applied to a TreeView. - - - - gtk.TREE_VIEW_GRID_LINES_NONE - - - - - - gtk.TREE_VIEW_GRID_LINES_HORIZONTAL - - - - - - gtk.TREE_VIEW_GRID_LINES_VERTICAL - - - - - - gtk.TREE_VIEW_GRID_LINES_BOTH - - - - - - - - - - GTK TreeViewColumn Sizing Constants - - The TreeViewColumn Sizing constants specify the sizing method the -column uses to determine its width. Please note that -gtk.TREE_VIEW_COLUMN_AUTOSIZE are inefficient for large -views, and can make columns appear choppy. - - - - gtk.TREE_VIEW_COLUMN_GROW_ONLY - - Columns only get bigger in reaction to changes in the - model - - - - gtk.TREE_VIEW_COLUMN_AUTOSIZE - - Columns resize to be the optimal size every time the - model changes. - - - - gtk.TREE_VIEW_COLUMN_FIXED - - Columns are a fixed numbers of pixels wide. - - - - - - - - GTK UIManager Item Type Constants - - The UIManager Item Type constants specify what UI element to -create. - - - - gtk.UI_MANAGER_AUTO - - Pick the type of the UI element according to - context. - - - - gtk.UI_MANAGER_MENUBAR - - Create a menubar. - - - - gtk.UI_MANAGER_MENU - - Create a menu. - - - - gtk.UI_MANAGER_TOOLBAR - - Create a toolbar. - - - - gtk.UI_MANAGER_PLACEHOLDER - - Insert a placeholder. - - - - gtk.UI_MANAGER_POPUP - - Create a popup menu. - - - - gtk.UI_MANAGER_MENUITEM - - Create a menuitem. - - - - gtk.UI_MANAGER_TOOLITEM - - Create a toolitem. - - - - gtk.UI_MANAGER_SEPARATOR - - Create a separator. - - - - gtk.UI_MANAGER_ACCELERATOR - - Install an accelerator. - - - - - - - - GTK Unit Constants - - The Unit constants specify the - - - - gtk.UNIT_PIXEL - - - - - - gtk.UNIT_POINTS - - - - - - gtk.UNIT_INCH - - - - - - gtk.UNIT_MM - - - - - - - - - - GTK Update Type Constants - - The Update Type constants specify the update policy of a gtk.Range and gtk.SpinButton. - - - - gtk.UPDATE_CONTINUOUS - - Update the display continuously as the pointer is - moved. - - - - gtk.UPDATE_DISCONTINUOUS - - Update the display at intervals while the pointer is - being moved. - - - - gtk.UPDATE_DELAYED - - Update the display after the pointer has finished - moving. - - - - - - - - GTK Version Constants - - The Version constants specify the versions of -GTK+ and PyGTK as a 3-tuple containing -the major, minor and patch release numbers. - - - - gtk.gtk_version - - A 3-tuple containing the GTK+ - (major, minor, patch) release numbers. - - - - gtk.pygtk_version - - A 3-tuple containing the PyGTK - (major, minor, patch) release numbers. - - - - - - - - GTK Widget Flags Constants - - The Widget Flags constants are a set of bit-flags that specify -certain properties of the widget. - - - - gtk.TOPLEVEL - - Widgets without a real parent, as there are gtk.Window and gtk.Menu objects that -have this flag set throughout their lifetime. Toplevel widgets always -contain their own gtk.gdk.Window. - - - - gtk.NO_WINDOW - - Indicative for a widget that does not provide its own -gtk.gdk.Window. Visible -action (e.g. drawing) is performed on the parent's gtk.gdk.Window. - - - - gtk.REALIZED - - Set by the gtk.Widget.realize() -method , unset by the gtk.Widget.unrealize() -method. A realized widget has an associated gtk.gdk.Window. - - - - gtk.MAPPED - - Set by the gtk.Widget.map() -method, unset by the gtk.Widget.unmap() -method. Only realized widgets can be mapped. It means that the gtk.Window.show() -method has been called on the widgets window(s). - - - - gtk.VISIBLE - - Set by the gtk.Widget.show() -method, unset by the gtk.Widget.hide() -method. Implies that a widget will be mapped as soon as its parent is -mapped. - - - - gtk.SENSITIVE - - Set and unset by the gtk.Widget.set_sensitive() -method. The sensitivity of a widget determines whether it will receive -certain events (e.g. button or key presses). One premise for the widgets -sensitivity is to have this flag set. - - - - gtk.PARENT_SENSITIVE - - Set and unset by the gtk.Widget.set_sensitive() -method operations on the parents of the widget. This is the second premise -for the widgets sensitivity. Once it has gtk.SENSITIVE -and gtk.PARENT_SENSITIVE set, its state is effectively -sensitive. - - - - gtk.CAN_FOCUS - - Determines if a widget is able to handle focus - grabs. - - - - gtk.HAS_FOCUS - - Set by the gtk.Widget.grab_focus() -method for widgets that also have gtk.CAN_FOCUS set. The -flag will be unset once another widget grabs the focus. - - - - gtk.CAN_DEFAULT - - The widget is allowed to receive the default action via -the gtk.Widget.grab_default() -method. - - - - gtk.HAS_DEFAULT - - The widget currently is receiving the default - action. - - - - gtk.HAS_GRAB - - Set by the gtk.Widget.grab_add() -method, unset by the gtk.Widget.grab_remove() -method. It means that the widget is in the grab_widgets stack, and will be -the preferred one for receiving events other than ones of cosmetic -value. - - - - gtk.RC_STYLE - - Indicates that the widgets style has been looked up -through the rc mechanism. It does not imply that the widget actually had a -style defined through the rc mechanism. - - - - gtk.COMPOSITE_CHILD - - Indicates that the widget is a composite child of its -parent; see the gtk.widget_push_composite_child() -and gtk.widget_pop_composite_child() -functions. - - - - gtk.NO_REPARENT - - Unused. - - - - gtk.APP_PAINTABLE - - Set and unset by the gtk.Widget.set_app_paintable() -method. Must be set on widgets whose window the application directly draws -on, in order to keep PyGTK and GTK+ from overwriting the drawn -stuff. - - - - gtk.RECEIVES_DEFAULT - - The widget when focused will receive the default action -and have gtk.HAS_DEFAULT set even if there is a different -widget set as default. - - - - gtk.DOUBLE_BUFFERED - - Set and unset by the gtk.Widget.set_double_buffered() -method. Indicates that exposes done on the widget should be -double-buffered. - - - - gtk.NO_SHOW_ALL - - If True, the show_all() -and hide_all() -methods do not affect the widget. - - - - - - - - GTK Widget Help Type Constants - - The Widget Help Type constants specify the help type of the -widget. - - - - gtk.WIDGET_HELP_TOOLTIP - - Tooltip help. - - - - gtk.WIDGET_HELP_WHATS_THIS - - What's this help. - - - - - - - - GTK Window Position Constants - - The Window Position constants specify hints for initial window -placement. - - - - gtk.WIN_POS_NONE - - No influence is made on placement. - - - - gtk.WIN_POS_CENTER - - Windows should be placed in the center of the screen. - - - - gtk.WIN_POS_MOUSE - - Windows should be placed at the current mouse position. - - - - gtk.WIN_POS_CENTER_ALWAYS - - Keep window centered as it changes size, etc. - - - - gtk.WIN_POS_CENTER_ON_PARENT - - Center the window on its transient parent (see the - gtk.Window.set_transient_for()) - method. - - - - - - - - GTK Window Type Constants - - The Window Type constants specify the type of a gtk.Window. Most -things you'd consider a "window" should have type -gtk.WINDOW_TOPLEVEL; windows with this type are managed -by the window manager and have a frame by default (call the set_decorated() -method to toggle the frame). Windows with type -gtk.WINDOW_POPUP are ignored by the window manager; -window manager keybindings won't work on them, the window manager won't -decorate the window with a frame, many GTK+ features that rely on the window -manager will not work (e.g. resize grips and -maximization/minimization). gtk.WINDOW_POPUP is used to -implement widgets such as gtk.Menu or tooltips -that you normally don't think of as windows per se. Nearly all windows -should be gtk.WINDOW_TOPLEVEL. In particular, do not use -gtk.WINDOW_POPUP just to turn off the window borders; use -the gtk.Window.set_decorated() -method for that. - - - - gtk.WINDOW_TOPLEVEL - - A regular window, such as a dialog. - - - - gtk.WINDOW_POPUP - - A special window such as a tooltip. - - - - - - - - GTK Wrap Mode Constants - - The Wrap Mode constants specify the type of line wrapping in a -gtk.TextView. - - - - gtk.WRAP_NONE - - Do not wrap lines - just make the text area -wider - - - - gtk.WRAP_CHAR - - Wrap text, breaking lines anywhere the cursor can -appear (usually between characters) - - - - gtk.WRAP_WORD - - Wrap text, breaking lines in between words - - - - gtk.WRAP_WORD_CHAR - - Wrap text, breaking lines in between words, or if that -is not enough, also between graphemes. - - - - - - - - - diff --git a/docs/reference/pygtk-gtk-functions.xml b/docs/reference/pygtk-gtk-functions.xml deleted file mode 100644 index 728778fa..00000000 --- a/docs/reference/pygtk-gtk-functions.xml +++ /dev/null @@ -1,1386 +0,0 @@ - - - - - - gtk Functions - miscellaneous functions - - - - Synopsis - - - <link linkend="class-gtkaboutdialog"><classname>gtk.AboutDialog</classname></link> Functions - - - gtk.about_dialog_set_email_hook - func - data - - gtk.about_dialog_set_url_hook - func - data - - - - - - <link linkend="class-gtkaccelgroup"><classname>gtk.AccelGroup</classname></link> Functions - - - gtk.accelerator_valid - keyval - modifiers - - gtk.accelerator_parse - accelerator - - gtk.accelerator_name - accelerator_key - accelerator_mods - - gtk.accelerator_set_default_mod_mask - default_mod_mask - - gtk.accelerator_get_default_mod_mask - - gtk.accelerator_get_label - accelerator_key - accelerator_mods - - gtk.accel_groups_from_object - object - - - - - - <link linkend="class-gtkaccelmap"><classname>gtk.AccelMap</classname></link> Functions - - - gtk.accel_map_add_entry - accel_path - accel_key - accel_mods - - gtk.accel_map_lookup_entry - accel_path - - gtk.accel_map_change_entry - accel_path - accel_key - accel_mods - replace - gtk.accel_map_foreach - foreach_func - dataNone - - gtk.accel_map_foreach_unfiltered - foreach_func - dataNone - - gtk.accel_map_get - - - gtk.accel_map_load - file_name - - gtk.accel_map_save - file_name - - gtk.accel_map_load_fd - fd - - gtk.accel_map_save_fd - fd - - gtk.accel_map_lock_path - accel_path - - gtk.accel_map_unlock_path - accel_path - - gtk.accel_map_add_filter - filter_pattern - - - - - - <link linkend="class-gtkcellview"><classname>gtk.CellView</classname></link> Functions - - - gtk.cell_view_new_with_text - text - - gtk.cell_view_new_with_markup - markup - - gtk.cell_view_new_with_pixbuf - pixbuf - - - - - - <link linkend="class-gtkclipboard"><classname>gtk.Clipboard</classname></link> Functions - - - gtk.clipboard_get - - - - - - - <link linkend="class-gtkcolorselection"><classname>gtk.ColorSelection</classname></link> Functions - - - gtk.color_selection_palette_from_string - str - - gtk.color_selection_palette_to_string - colors - - - - - - <link linkend="class-gtkcombobox"><classname>gtk.ComboBox</classname></link> Functions - - - gtk.combo_box_new_text - - - - - - - <link linkend="class-gtkcomboboxentry"><classname>gtk.ComboBoxEntry</classname></link> Functions - - - gtk.combo_box_entry_new_text - - - - - - - <link linkend="class-gtkcomboboxentry"><classname>gtk.Container</classname></link> Functions - - - gtk.container_class_install_child_property - klass - property_id - pspec - - gtk.container_class_list_child_properties - klass - - - - - - <link linkend="class-gtkdialog"><classname>gtk.Dialog</classname></link> Functions - - - gtk.alternative_dialog_button_order - screenNone - - - - - - <link linkend="class-gtkexpander"><classname>gtk.Expander</classname></link> Functions - - - gtk.expander_new_with_mnemonic - label - - - - - - <link linkend="class-gtkiconfactory"><classname>gtk.IconFactory</classname></link> Functions - - - gtk.icon_factory_lookup_default - stock_id - - - - - - - <link linkend="class-gtkiconsource"><classname>gtk.IconSource</classname></link> Functions - - - gtk.icon_size_lookup - icon_size - - gtk.icon_size_lookup_for_settings - settings - icon_size - - gtk.icon_size_register - name - width - height - - gtk.icon_size_register_alias - alias - target - - gtk.icon_size_from_name - name - - gtk.icon_size_get_name - size - - - - - - <link linkend="class-gtkicontheme"><classname>gtk.IconTheme</classname></link> Functions - - - gtk.icon_theme_get_default - - gtk.icon_theme_get_for_screen - screen - - gtk.icon_theme_add_builtin_icon - icon_name - size - pixbuf - - - - - - <link linkend="class-gtkimage"><classname>gtk.Image</classname></link> Functions - - - gtk.image_new_from_stock - stock_id - size - - gtk.image_new_from_icon_set - icon_set - size - - gtk.image_new_from_animation - animation - - gtk.image_new_from_icon_name - icon_name - size - - - - - - <link linkend="class-gtkitemfactory"><classname>gtk.ItemFactory</classname></link> Functions - - - gtk.item_factory_from_widget - widget - - gtk.item_factory_path_from_widget - widget - - - - - - <link linkend="class-gtklinkbutton"><classname>gtk.LinkButton</classname></link> Functions - - - gtk.link_button_set_uri_hook - func - dataNone - - - - - - <link linkend="class-gtkobject"><classname>gtk.Object</classname></link> Functions - - - gtk.bindings_activate - object - keyval - modifiers - - gtk.bindings_activate_event - object - event - - gtk.binding_entry_add_signal - object - keyval - modifiers - signal_name - ... - - gtk.binding_entry_remove - class_type - keyval - modifiers - - - - - - <link linkend="class-gtkpapersize"><classname>gtk.PaperSize</classname></link> Functions - - - gtk.paper_size_new_from_ppd - ppd_name - ppd_display_name - width - height - - gtk.paper_size_new_cutom - name - display_name - width - height - unit - - gtk.paper_size_get_default - - - - - - - <link linkend="class-gtkplug"><classname>gtk.Plug</classname></link> Functions - - - gtk.plug_new_for_display - display socket_id - - - - - - <link linkend="class-gtkrcstyle"><classname>gtk.RcStyle</classname></link> Functions - - - gtk.rc_add_default_file - filename - - gtk.rc_set_default_files - filenames - - gtk.rc_get_default_files - - - gtk.rc_get_style_by_paths - settings - widget_path class_path - type - - gtk.rc_reparse_all_for_settings - settings - force_load - - gtk.rc_reset_styles - settings - - gtk.rc_parse - filename - - gtk.rc_parse_string - rc_string - - gtk.rc_reparse_all - - - gtk.rc_find_module_in_path - module_file - gtk.rc_get_theme_dir - - - gtk.rc_get_module_dir - - - gtk.rc_get_im_module_path - - - gtk.rc_get_im_module_file - - - - - - - <link linkend="class-gtkrecentmanager"><classname>gtk.RecentManager</classname></link> Functions - - - gtk.recent_manager_get_default - - - gtk.recent_manager_get_for_screen - screen - - - - - - <link linkend="class-gtkselectiondata"><classname>gtk.SelectionData</classname></link> Functions - - - gtk.selection_owner_set_for_display - display - widget - selection - time0 - - gtk.target_list_add_image_targets - listNone - info0 - writableFalse - - gtk.target_list_add_text_targets - listNone - info0 - - gtk.target_list_add_uri_targets - listNone - info0 - - - - - - <link linkend="class-gtksettings"><classname>gtk.Settings</classname></link> Functions - - - gtk.settings_get_default - - - gtk.settings_get_for_screen - screen - - - - - - <link linkend="class-gtkstatusicon"><classname>gtk.StatusIcon</classname></link> Functions - - - gtk.status_icon_new_from_pixbuf - pixbuf - - gtk.status_icon_new_from_file - filename - - gtk.status_icon_new_from_stock - stock_id - - gtk.status_icon_new_from_icon_name - icon_name - - gtk.status_icon_position_menu - menu - statusicon - - - - - - <link linkend="class-gtktooltips"><classname>gtk.Tooltips</classname></link> Functions - - - gtk.tooltips_data_get - widget - - - - - - <link linkend="class-gtktreemodel"><classname>gtk.TreeModel</classname></link> Functions - - - gtk.tree_row_reference_inserted - proxy - path - - gtk.tree_row_reference_deleted - proxy - path - - - - - - <link linkend="class-gtkwidget"><classname>gtk.Widget</classname></link> Functions - - - gtk.widget_push_colormap - cmap - - gtk.widget_push_composite_child - - - gtk.widget_pop_composite_child - - - gtk.widget_pop_colormap - - - gtk.widget_get_default_style - - - gtk.widget_set_default_colormap - colormap - - gtk.widget_get_default_colormap - - - gtk.widget_get_default_visual - - - gtk.widget_set_default_direction - dir - - gtk.widget_get_default_direction - - - gtk.widget_class_list_style_properties - widget - - gtk.widget_class_install_style_property - widget - pspec - - - - - - <link linkend="class-gtkwindow"><classname>gtk.Window</classname></link> Functions - - - gtk.window_set_default_icon - icon - gtk.window_set_default_icon_from_file - filename - gtk.window_set_default_icon_list - ... - gtk.window_get_default_icon_list - - - gtk.window_set_auto_startup_notification - setting - gtk.window_list_toplevels - - - gtk.window_set_default_icon_name - name - - - - - - <link linkend="gtk-stock-items">Stock Item</link> Functions - - - gtk.stock_add - items - - gtk.stock_lookup - stock_id - - gtk.stock_list_ids - - - - - - - Miscellaneous Functions - - - gtk.check_version - required_major - required_minor - required_micro - - gtk.draw_insertion_cursor - widget - drawable - area - location - is_primary - direction - draw_arrow - - gtk.get_default_language - - - gtk.events_pending - - - gtk.main_do_event - event - - gtk.main - - - gtk.main_level - - - gtk.main_quit - - - gtk.main_iteration - block - - gtk.main_iteration_do - block - - gtk.grab_get_current - - - gtk.quit_add - level - func - ... - - gtk.quit_remove - quit_handler_id - - gtk.get_current_event - - gtk.get_current_event_state - - gtk.get_current_event_time - - gtk.init_check - - - - - - - - Description - - All PyGTK functions for the gtk module are -listed above categorized by class. Those functions associated with a class -have their descriptions included with the class reference. Those functions -that are not associated with a specific class are described below. - - - - - Functions - - - gtk.check_version - - - gtk.check_version - required_major - required_minor - required_micro - - - - required_major : - the required major version -number - - - required_minor : - the required minor version -number - - - required_micro : - the required micro version -number - - - Returns : - None if the underlying -GTK+ library is compatible or a string describing the -mismatch - - - - The gtk.check_version() function checks the -underlying GTK+ library version against the version -specified by required_major, -required_minor and -required_micro. If the library is compatible this -function returns None; otherwise it returns a string -describing the mismatch. - - - - - gtk.draw_insertion_cursor - - - gtk.draw_insertion_cursor - widget - drawable - area - location - is_primary - direction - draw_arrow - - - - widget : - a gtk.Widget - - - drawable : - a gtk.gdk.Drawable - - - area : - the rectangle to which the output is clipped, or -None if the output should not be clipped - - - location : - the location to draw the cursor - (location.width is - ignored) - - - is_primary : - if True the cursor should - be the primary cursor color. - - - direction : - the direction of the cursor; either - gtk.TEXT_DIR_LTR or - gtk.TEXT_DIR_RTL - - - draw_arrow : - if True draw a directional - arrow on the cursor. Should be False unless the - cursor is split. - - - - - This function is available in PyGTK 2.4 and above. - - - The gtk.draw_insertion_cursor() function -draws a text caret on the gtk.gdk.Drawable -specified by drawable at the position specified by -location. area specifies a -clipping rectangle or is None if the output should not be -clipped. If is_primary is True the -cursor should be the primary cursor color. direction -specifies whether the cursor is right-to-left or left-to-right. This is a -convenience function for drawing the standard cursor shape. - - - - - gtk.get_default_language - - - gtk.get_default_language - - - - - Returns : - a pango.Language -object for the default language - - - - The gtk.get_default_language() function -returns a pango.Language -describing the default language. - - - - - gtk.events_pending - - - gtk.events_pending - - - - - Returns : - True if any events are -pending - - - - The gtk.events_pending() function returns -True if any events are pending. This can be used to -update the user interface and invoke timeouts etc. while doing some time -intensive computation. - - - - - gtk.main_do_event - - - gtk.main_do_event - - - - - event : - a gtk.gdk.Event to -process - - - - The gtk.main_do_event() function processes -a single gtk.gdk.Event. This -function is public only to allow filtering of events between -GDK and GTK+. You will not usually -need to call this function directly. While you should not call this function -directly, you might want to know how exactly events are handled. So here is -what this function does with the event: - - - - Compress enter/leave notify events. If the event passed -builds an enter-leave pair together with the next event (peeked from -GDK) both events are thrown away. This is to avoid a -backlog of (de-)highlighting widgets crossed by the pointer. - - - Find the widget which got the event. If the widget can't -be determined the event is thrown away unless it belongs to a -INCR transaction. In that case it is passed to -gtk_selection_incr_event(). - - - Then the event is passed on a stack so you can query the -currently handled event with gtk.get_current_event(). - - - The event is sent to a widget. If a grab is active all -events for widgets that are not in the contained in the grab widget are sent -to the latter with a few exceptions: - - - Deletion and destruction events are still sent to the -event widget for obvious reasons. - - - Events which directly relate to the visual -representation of the event widget. - - - Leave events are delivered to the event widget if -there was an enter event delivered to it before without the paired leave -event. - - - Drag events are not redirected because it is unclear -what the semantics of that would be. - - - Another point of interest might be that all key events -are first passed through the key snooper functions if there are any. Read -the description of gtk_key_snooper_install() if you -need this feature. - - - After finishing the delivery the event is popped from the -event stack. - - - - - - - - - gtk.main - - - gtk.main - - - - The gtk.main() function runs the main loop -until the gtk.main_quit() -function is called. You can nest calls to gtk.main(). -In that case the call to the gtk.main_quit() -function will make the innermost invocation of the main loop return. - - - - - gtk.main_level - - - gtk.main_level - - - - - Returns : - the nesting level of the current invocation of -the main loop - - - - The gtk.main_level() function returns the -current nesting level of the main loop. The nesting level is increased by -calling the gtk.main() function -and reduced by calling the gtk.main_quit() -function. - - - - - gtk.main_quit - - - gtk.main_quit - - - - The gtk.main_quit() function terminates the -current main loop level started by the most recent call to the gtk.main() -function. The nesting level of the main loop is reduced by calling this -function. - - - - - gtk.main_iteration - - - gtk.main_iteration - block - True - - - - block : - if True block if no events -are pending - - - Returns : - True if the gtk.main_quit() -function has been called for the innermost main loop. - - - - The gtk.main_iteration() function runs a -single iteration of the mainloop. If no events are waiting to be processed -PyGTK will block until the next event is noticed if -block is True. This function is -identical to the gtk.main_iteration_do() -function. - - - - - gtk.main_iteration_do - - - gtk.main_iteration_do - block - True - - - - block : - if True block if no events -are pending - - - Returns : - True if the gtk.main_quit() -function has been called for the innermost main loop. - - - - The gtk.main_iteration_do() function runs a -single iteration of the main loop. If block is -True block until an event occurs. This function is -identical to the gtk.main_iteration() -function. - - - - - gtk.grab_get_current - - - gtk.grab_get_current - - - - - Returns : - the gtk.Widget that has -the grab currently or None if no grab is -active - - - - The gtk.grab_get_current() function returns -the gtk.Widget -that has the grab or None if no grab is active. - - - - - gtk.quit_add - - - gtk.quit_add - level - func - ... - - - - level : - the level at which termination -func shall be called. You can pass 0 here to have -func run at the termination of the current main -loop. - - - func : - the function to call - it should return 0 to be -removed from the list of quit handlers - - - ... : - optional parameter(s) to be passed to -func - - - Returns : - a handle for this quit handler (you need this -for the gtk.quit_remove() -function). - - - - The gtk.quit_add() function registers a -function specified by func to be called when the -specified main loop level is exited. -func should return 0 to be removed from the list of -quit handlers. This function returns a handler ID that is used when removing -the handler with the gtk.quit_remove() -function. - - - - - gtk.quit_remove - - - gtk.quit_remove - quit_handler_id - - - - quit_handler_id : - the ID of a quit handler - - - - The gtk.quit_remove() function removes the -quit handler specified by quit_handler_id from the -list of quit handlers. - - - - - gtk.get_current_event - - - gtk.get_current_event - - - - - Returns : - a copy of the current event or -None - - - - - This function is available in PyGTK 2.6 and above. - - - The gtk.get_current_event() function -returns a copy of the event currently being processed by GTK+. For example, -if you get a "clicked" signal from gtk.Button, the -current event will be the GdkEventButton that triggered the "clicked" -signal. If there is no current event, the function returns -None. - - - - - gtk.get_current_event_state - - - gtk.get_current_event_state - - - - - Returns : - the state of the current event if any or -None if there is no current event or -state - - - - - This function is available in PyGTK 2.6 and above. - - - The gtk.get_current_event_state() function -returns the state of the current event or None if there -is no current event or state. - - - - - gtk.get_current_event_time - - - gtk.get_current_event_time - - - - - Returns : - the timestamp of the current event or -0L - - - - The gtk.get_current_event_time() function -returns the timestamp from the current event or 0L if there is no current -event. - - - - - gtk.init_check - - - gtk.init_check - - - - - Returns : - True if GTK has been - successfully initialized - - - - The gtk.init_check() function tries to - initialize GTK and returns True if - successful. - - - - - gtk.remove_log_handlers - - - gtk.remove_log_handlers - - - - - This function is available in PyGTK 2.10 and above. - - - The gtk.remove_log_handlers() function - removes the default PyGTK log handlers, - - - - - gtk.add_log_handlers - - - gtk.add_log_handlers - - - - - This function is available in PyGTK 2.10 and above. - - - The gtk.add_log_handlers() function - installs the default PyGTK log handlers, - - - - - - diff --git a/docs/reference/pygtk-gtk-stock-items.xml b/docs/reference/pygtk-gtk-stock-items.xml deleted file mode 100644 index e68128f8..00000000 --- a/docs/reference/pygtk-gtk-stock-items.xml +++ /dev/null @@ -1,1205 +0,0 @@ - - - - - - Stock Items - prebuilt common menu/toolbar items and corresponding -icons - - - - Synopsis - - -Functions - - - gtk.stock_add - items - - gtk.stock_lookup - stock_id - - gtk.stock_list_ids - - - - - - - Description - - Stock items represent commonly-used menu or toolbar items such as -"Open" or "Exit". Each stock item is identified by a stock ID; stock IDs are -just strings, but macros such as gtk.STOCK_OPEN are -provided to avoid typing mistakes in the strings. Applications can register -their own stock items in addition to those built-in to -PyGTK. - - The stock items are: - - - - gtk.STOCK_ABOUT - - - - - - Available in GTK+ 2.6 and above. - - - - - gtk.STOCK_ADD - - - - - - - - - - - gtk.STOCK_APPLY - - - - - - - - - - - gtk.STOCK_BOLD - - - - - - - - - - - gtk.STOCK_CANCEL - - - - - - - - - - - gtk.STOCK_CDROM - - - - - - - - - - - gtk.STOCK_CLEAR - - - - - - - - - - - gtk.STOCK_CLOSE - - - - - - - - - - - gtk.STOCK_COLOR_PICKER - - - - - - Available in GTK+ 2.2 and above. - - - - - gtk.STOCK_CONVERT - - - - - - - - - - - gtk.STOCK_CONNECT - - - - - - Available in GTK+ 2.6 and above. - - - - - gtk.STOCK_COPY - - - - - - - - - - - gtk.STOCK_CUT - - - - - - - - - - - gtk.STOCK_DELETE - - - - - - - - - - - gtk.STOCK_DIALOG_AUTHENTICATION - - - - - - Available in GTK+ 2.4 and above. - - - - - gtk.STOCK_DIALOG_ERROR - - - - - - - - - - - gtk.STOCK_DIALOG_INFO - - - - - - - - - - - gtk.STOCK_DIALOG_QUESTION - - - - - - - - - - - gtk.STOCK_DIALOG_WARNING - - - - - - - - - - - gtk.STOCK_DIRECTORY - - - - - - Available in GTK+ 2.6 and above. - - - - - gtk.STOCK_DISCONNECT - - - - - - Available in GTK+ 2.6 and above. - - - - - gtk.STOCK_DND - - - - - - - - - - - gtk.STOCK_DND_MULTIPLE - - - - - - - - - - - gtk.STOCK_EDIT - - - - - - Available in GTK+ 2.6 and above. - - - - - gtk.STOCK_EXECUTE - - - - - - - - - - - gtk.STOCK_FILE - - - - - - Available in GTK+ 2.6 and above. - - - - - gtk.STOCK_FIND - - - - - - - - - - - gtk.STOCK_FIND_AND_REPLACE - - - - - - - - - - - gtk.STOCK_FLOPPY - - - - - - - - - - - gtk.STOCK_FULLSCREEN - - - - - - Available in GTK+ 2.8 and above. - - - - - gtk.STOCK_GOTO_BOTTOM - - - - - - - - - - - gtk.STOCK_GOTO_FIRST - - - - - - - - - - - gtk.STOCK_GOTO_LAST - - - - - - - - - - - gtk.STOCK_GOTO_TOP - - - - - - - - - - - gtk.STOCK_GO_BACK - - - - - - - - - - - gtk.STOCK_GO_DOWN - - - - - - - - - - - gtk.STOCK_GO_FORWARD - - - - - - - - - - - gtk.STOCK_GO_UP - - - - - - - - - - - gtk.STOCK_HARDDISK - - - - - - Available in GTK+ 2.4 and above - - - - - gtk.STOCK_HELP - - - - - - - - - - - gtk.STOCK_HOME - - - - - - - - - - - gtk.STOCK_INDENT - - - - - - Available in GTK+ 2.4 and above. - - - - - gtk.STOCK_INDEX - - - - - - - - - - - gtk.STOCK_INFO - - - - - - Available in GTK+ 2.8 and above. - - - - - gtk.STOCK_ITALIC - - - - - - - - - - - gtk.STOCK_JUMP_TO - - - - - - RTL version is - - - - - - - - - gtk.STOCK_JUSTIFY_CENTER - - - - - - - - - - - gtk.STOCK_JUSTIFY_FILL - - - - - - - - - - - gtk.STOCK_JUSTIFY_LEFT - - - - - - - - - - - gtk.STOCK_JUSTIFY_RIGHT - - - - - - - - - - - gtk.STOCK_LEAVE_FULLSCREEN - - - - - - Available in GTK+ 2.8 and above. - - - - - gtk.STOCK_MEDIA_FORWARD - - - - - - Available in GTK+ 2.6 and above. - - - - - gtk.STOCK_MEDIA_NEXT - - - - - - Available in GTK+ 2.6 and above. - - - - - gtk.STOCK_MEDIA_PAUSE - - - - - - Available in GTK+ 2.6 and above. - - - - - gtk.STOCK_MEDIA_PLAY - - - - - - RTL version is - - - - Available in GTK+ 2.6 and above. - - - - - gtk.STOCK_MEDIA_PREVIOUS - - - - - - Available in GTK+ 2.6 and above. - - - - - gtk.STOCK_MEDIA_RECORD - - - - - - Available in GTK+ 2.6 and above. - - - - - gtk.STOCK_MEDIA_REWIND - - - - - - Available in GTK+ 2.6 and above. - - - - - gtk.STOCK_MEDIA_STOP - - - - - - Available in GTK+ 2.6 and above. - - - - - gtk.STOCK_MISSING_IMAGE - - - - - - - - - - - gtk.STOCK_NETWORK - - - - - - -Available in GTK+ 2.4 and above. - - - - - gtk.STOCK_NEW - - - - - - - - - - - gtk.STOCK_NO - - - - - - - - - - - gtk.STOCK_OK - - - - - - - - - - - gtk.STOCK_OPEN - - - - - - - - - - - gtk.STOCK_PASTE - - - - - - - - - - - gtk.STOCK_PREFERENCES - - - - - - - - - - - gtk.STOCK_PRINT - - - - - - - - - - - gtk.STOCK_PRINT_PREVIEW - - - - - - - - - - - gtk.STOCK_PROPERTIES - - - - - - - - - - - gtk.STOCK_QUIT - - - - - - - - - - - gtk.STOCK_REDO - - - - - - RTL version is - - - - - - - - - gtk.STOCK_REFRESH - - - - - - - - - - - gtk.STOCK_REMOVE - - - - - - - - - - - gtk.STOCK_REVERT_TO_SAVED - - - - - - RTL version is - - - - - - - - - gtk.STOCK_SAVE - - - - - - - - - - - gtk.STOCK_SAVE_AS - - - - - - - - - - - gtk.STOCK_SELECT_COLOR - - - - - - - - - - - gtk.STOCK_SELECT_FONT - - - - - - - - - - - gtk.STOCK_SORT_ASCENDING - - - - - - - - - - - gtk.STOCK_SORT_DESCENDING - - - - - - - - - - - gtk.STOCK_SPELL_CHECK - - - - - - - - - - - gtk.STOCK_STOP - - - - - - - - - - - gtk.STOCK_STRIKETHROUGH - - - - - - - - - - - gtk.STOCK_UNDELETE - - - - - - RTL version is - - - - - - - - - gtk.STOCK_UNDERLINE - - - - - - - - - - - gtk.STOCK_UNDO - - - - - - RTL version is - - - - - - - - - gtk.STOCK_UNINDENT - - - - - - Available in GTK+ 2.4 and above. - - - - - gtk.STOCK_YES - - - - - - - - - - - gtk.STOCK_ZOOM_100 - - - - - - - - - - - gtk.STOCK_ZOOM_FIT - - - - - - - - - - - gtk.STOCK_ZOOM_IN - - - - - - - - - - - gtk.STOCK_ZOOM_OUT - - - - - - - - - - - - - - - - Functions - - - gtk.stock_add - - - gtk.stock_add - items - - - - items : - a list or tuple containing 5-tuples of stock - items - - - - The gtk.stock_add() function registers each -of the stock items in the list or tuple specified by -items. The stock items are specified by a 5-tuple -containing: - - - - stock_id - a string identifier - - - label - a string to use for a label - - - modifier - a modifier mask (see the section for more detail on -modifiers) - - - keyval - an integer key value (see gtk.gdk.Keymap) - Together with the modifiers specifies an accelerator. - - - translation_domain - a string identifier of a translation - domain - - - - If an item already exists with the same stock ID as one of the -items, the old item gets replaced. - - - - - gtk.stock_lookup - - - gtk.stock_lookup - stock_id - - - - stock_id : - a stock item name - - - Returns : - a 5-tuple containing the stock item info or - None if stock_id is - unknown - - - - The gtk.stock_lookup() function looks up -the stock item identified by stock_id and returns a -5-tuple containing its information. If stock_id is -not known this function returns None. See the gtk.stock_add() -function for more detail. - - - - - gtk.stock_list_ids - - - gtk.stock_list_ids - - - - Returns : - a list of known stock IDs - - - - The gtk.stock_list_ids() function returns a -list containing all of the known stock IDs added to a gtk.IconFactory -or registered with the gtk.stock_add() -function. - - - - - - diff --git a/docs/reference/pygtk-gtkaboutdialog.xml b/docs/reference/pygtk-gtkaboutdialog.xml deleted file mode 100644 index 9ea36ad8..00000000 --- a/docs/reference/pygtk-gtkaboutdialog.xml +++ /dev/null @@ -1,1212 +0,0 @@ - - - - - - gtk.AboutDialog - popup window displaying information about an -application (new in PyGTK 2.6) - - - - Synopsis - - - gtk.AboutDialog - gtk.Dialog - - gtk.AboutDialog - - - - get_name - - - set_name - name - - get_version - - - set_version - version - - get_copyright - - - set_copyright - copyright - - get_comments - - - set_comments - comments - - get_license - - - set_license - license - - get_wrap_license - - - set_wrap_license - license - - get_website - - - set_website - website - - get_website_label - - - set_website_label - website_label - - get_authors - - - set_authors - authors - - get_documenters - - - set_documenters - documenters - - get_artists - - - set_artists - artists - - get_translator_credits - - - set_translator_credits - translator_credits - - get_logo - - - set_logo - logo - - get_logo_icon_name - - - set_logo_icon_name - icon_name - - - - -Functions - - - gtk.about_dialog_set_email_hook - func - data - - gtk.about_dialog_set_url_hook - func - data - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Window - +-- gtk.Dialog - +--gtk.AboutDialog - - - - - - gtk.AboutDialog Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Window Properties - gtk.Dialog Properties - -
- - - - - - - - - "artists" - Read-Write - The list of people who have contributed artwork to -the program. -This property is available in GTK+ 2.6 and above. - - - "authors" - Read-Write - The list of authors of the program. -This property is available in GTK+ 2.6 and above. - - - "comments" - Read-Write - A string containing comments about the program. -Default value: None. -This property is available in GTK+ 2.6 and above. - - - "copyright" - Read-Write - A string containing copyright information for -the program. Default value: None. -This property is available in GTK+ 2.6 and above. - - - "documenters" - Read-Write - The list of people documenting the program. -This property is available in GTK+ 2.6 and above. - - - "license" - Read-Write - A string containing the license of the program. -Default value: None. -This property is available in GTK+ 2.6 and above. - - - "logo" - Read-Write - A logo for the about box. If this is not set, -it defaults to the default window icon list. -This property is available in GTK+ 2.6 and above. - - - "logo-icon-name" - Read-Write - The name of an icon to use as the logo for the -about box. Default value: None. -This property is available in GTK+ 2.6 and above. - - - "name" - Read-Write - The name of the program. If this is not set, it -defaults to g_get_application_name(). -Default value: None. -This property is available in GTK+ 2.6 and above. - - - "translator-credits" - Read-Write - Credits to the translators. This string should be -marked as translatable. Default value: None. -This property is available in GTK+ 2.6 and above. - - - "version" - Read-Write - A string containing the version of the program. -Default value: None. -This property is available in GTK+ 2.6 and above. - - - "website" - Read-Write - The URL for the link to the website of the -program. Default value: None. -This property is available in GTK+ 2.6 and above. - - - "website-label" - Read-Write - The label for the link to the website of the program. -If this is not set, it defaults to the URL. -Default value: None. -This property is available in GTK+ 2.6 and above. - - - "wrap-license" - Read-Write - If True the license text should be -wrapped. Default value: False. -This property is available in GTK+ 2.6 and above. - - - - - -
- -
- - - gtk.AboutDialog Style Properties - - gtk.Widget Style Properties - gtk.Dialog Style Properties - -
- - - - - - - - - "link-color" - Read - The color of hyperlinks. This property is not available - in GTK+ 2.10 and above. - - - - - -
- -
- - - gtk.AboutDialog Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Window Signal Prototypes - gtk.Dialog Signal Prototypes - - - - Description - - - This widget is available in PyGTK 2.6 and above. - - - The gtk.AboutDialog - offers a simple way to display information about a program like its - logo, name, copyright, website and license. It is also possible to give - credits to the authors, documenters, translators and artists who have - worked on the program. An about dialog is typically opened when the user - selects the HelpAbout - menu. All parts of the dialog are optional. - - About dialog often contain links and email addresses. gtk.AboutDialog - supports this by offering global hooks, which are called when the user - clicks on a link or email address, see the gtk.about_dialog_set_email_hook() - and gtk.about_dialog_set_url_hook() - functions. Email addresses in the authors, documenters and artists - properties are recognized by looking for <user@host>, URLs are recognized by looking for - http://url, with url extending to - the next space, tab or line break. - - - - - Constructor - - - gtk.AboutDialog - - - - - Returns : - a new gtk.AboutDialog - - - - - This constructor is available in PyGTK 2.6 and above. - - - Creates a new gtk.AboutDialog with default property values. - - - - - Methods - - - gtk.AboutDialog.get_name - - - get_name - - - - - Returns : - The program name or -None. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_name() method returns the value -of the "name" property which is the program name displayed in the about -dialog. get_name() returns None -if the name is not set. - - - - - gtk.AboutDialog.set_name - - - set_name - name - - - - name : - a string containing the program -name or None to use the default name. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_name() method sets the "name" -property to the string contained in name. The "name" -property is used as the program name in the about dialog. If -name is None, it defaults to -g_get_application_name(). - - - - - gtk.AboutDialog.get_version - - - get_version - - - - - Returns : - The version string or -None. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_version() method returns the -string contained in the "version" property. - - - - - gtk.AboutDialog.set_version - - - set_version - version - - - - version : - the version string or -None - - - - - This method is available in PyGTK 2.6 and above. - - - The set_version() method sets the -"version" property to the string in version. - - - - - gtk.AboutDialog.get_copyright - - - get_copyright - - - - - Returns : - the copyright string or -None. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_copyright() method returns the -string contained in the "copyright" property. - - - - - gtk.AboutDialog.set_copyright - - - set_copyright - copyright - - - - copyright : - a string containing the copyright -notice or None. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_copyright() method sets the -"copyright" property to the string contained in -copyright. If copyright is -None, the copyright notice is hidden. - - - - - gtk.AboutDialog.get_comments - - - get_comments - - - - - Returns : - a string containing the -comments or None - - - - - This method is available in PyGTK 2.6 and above. - - - The get_comments() method returns the -string contained in the "comments" property. - - - - - gtk.AboutDialog.set_comments - - - set_comments - comments - - - - comments : - a string containing the -comments or None. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_comments() method sets the -"comments" property to the string contained in -comments. If comments is -None the comments label is hidden. - - - - - gtk.AboutDialog.get_license - - - get_license - - - - - Returns : - a string containing the license -information or None - - - - - This method is available in PyGTK 2.6 and above. - - - The get_license() method returns the -string contained in the "license" property. - - - - - gtk.AboutDialog.set_license - - - set_license - license - - - - license : - - - - - - This method is available in PyGTK 2.6 and above. - - - The set_license() method sets the -"license" property to the string contained in -license. If license is -None the license button is hidden. - - - - - gtk.AboutDialog.get_wrap_license - - - get_wrap_license - - - - - Returns : - True if the license text -should be wrapped - - - - - This method is available in PyGTK 2.8 and above. - - - The get_wrap_license() method returns -the value of the "wrap-license" property. If "wrap-license" is -True the license text should be automatically -wrapped. - - - - - gtk.AboutDialog.set_wrap_license - - - set_wrap_license - wrap_license - - - - wrap_license : - - - - - - This method is available in PyGTK 2.8 and above. - - - The set_wrap_license() method sets the -"wrap-license" property to the value of -wrap_license. If wrap_license -is True the license text should be automatically -wrapped. - - - - - gtk.AboutDialog.get_website - - - get_website - - - - - Returns : - a string containing the website URL or -None - - - - - This method is available in PyGTK 2.6 and above. - - - The get_website() method returns the -string contained in the "website" property. The website should be a -URL. - - - - - gtk.AboutDialog.set_website - - - set_website - website - - - - website : - a string containing the URL of the program's -website or None - - - - - This method is available in PyGTK 2.6 and above. - - - The set_website() method sets the -"website" property to the string contained in -website. The string should be a valid URL. - - - - - gtk.AboutDialog.get_website_label - - - get_website_label - - - - - Returns : - a string containing the website link -label - - - - - This method is available in PyGTK 2.6 and above. - - - The get_website_label() method returns -the contents of the "website_label" property. The website label is used if -the url hook has been set using the gtk.about_dialog_set_url_hook() -function. - - - - - gtk.AboutDialog.set_website_label - - - set_website_label - website_label - - - - website_label : - - - - - - This method is available in PyGTK 2.6 and above. - - - The set_website_label() method sets the -"website_label" property to the string contained in -website_label if the url hook has been set using the -gtk.about_dialog_set_url_hook() -function. - - - - - gtk.AboutDialog.get_authors - - - get_authors - - - - - Returns : - a list containing the names of the program -authors - - - - - This method is available in PyGTK 2.6 and above. - - - The get_authors() method returns the -contents of the "authors" property. The "authors" property contains a list -of the names of the authors of the program. - - - - - gtk.AboutDialog.set_authors - - - set_authors - authors - - - - authors : - a list containing the names of the program -authors. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_authors() method sets the -"authors" property to the list contained in -authors. The author names are displayed in the -authors tab of the secondary credits -dialog. set_authors() method will show the -Credits button if it is not displayed. - - - - - gtk.AboutDialog.get_documenters - - - get_documenters - - - - - Returns : - a list of the program -documenters - - - - - This method is available in PyGTK 2.6 and above. - - - The get_documenters() method returns -the contents of the "documenters" property which contains a list of the -names of the program documenters. - - - - - gtk.AboutDialog.set_documenters - - - set_documenters - documenters - - - - documenters : - a list of the names of the program -documenters - - - - - This method is available in PyGTK 2.6 and above. - - - The set_documenters() method sets the -"documenters" property to the contents of -documenters. The documenter names are displayed in -the documenters tab of the secondary credits -dialog. set_documenters() method will show the -Credits button if it is not displayed. - - - - - gtk.AboutDialog.get_artists - - - get_artists - - - - - Returns : - a list of the names of the program -artists - - - - - This method is available in PyGTK 2.6 and above. - - - The get_artists() method returns the -contents of the "artists" property which contains a list of the names of the -program artists. - - - - - gtk.AboutDialog.set_artists - - - set_artists - artists - - - - artists : - a list of the names of the program -artists - - - - - This method is available in PyGTK 2.6 and above. - - - The set_artists() method sets the -"artists" property to the contents of artists. The -artist names are displayed in the artists tab of the secondary credits -dialog. set_artists() method will show the -Credits button if it is not displayed. - - - - - gtk.AboutDialog.get_translator_credits - - - get_translator_credits - - - - - Returns : - a string containing the translator -credits - - - - - This method is available in PyGTK 2.6 and above. - - - The get_translator_credits() method -returns the contents of the "translator-credits" property which contains the -credits for the current translation. - - - - - gtk.AboutDialog.set_translator_credits - - - set_translator_credits - translator_credits - - - - translator_credits : - a string containing the current translation -credits - - - - - This method is available in PyGTK 2.6 and above. - - - The set_translator_credits() method -sets the "translator_credits" property to the value of -translator_credits. The translator credits are -displayed in the translators tab of the secondary credits dialog. - - The intended use for this string is to display the translator of -the language which is currently used in the user interface. Using the -gettext() function, a simple way to achieve that is to -mark the string for translation. - - It is a good idea to use the customary msgid -"translator-credits" for this purpose, since translators will already know -the purpose of that msgid, and since gtk.AboutDialog -will detect if "translator-credits" is untranslated and hide the tab. - - - - - - - - - gtk.AboutDialog.get_logo_icon_name - - - get_logo_icon_name - - - - - Returns : - the name of the icon used as the -logo - - - - - This method is available in PyGTK 2.6 and above. - - - The get_logo_name() method returns the -contents of the "logo-icon-name" property which contains the name of the -icon used as the logo. - - - - - gtk.AboutDialog.set_logo_icon_name - - - set_logo_icon_name - icon_name - - - - icon_name : - the name of an icon or -None - - - - - This method is available in PyGTK 2.6 and above. - - - The set_logo_icon_name() method sets -the "logo-icon-name" property to the value of -icon_name. If icon_name is -None, the default window icon set with the gtk.window_set_default_icon_list() -function will be used. - - - - - - - Functions - - - gtk.about_dialog_set_email_hook - - - gtk.about_dialog_set_email_hook - func - data - - - - func : - a function to call when an email link is -activated. - - - data : - data to pass to -func - - - - - This function is available in PyGTK 2.6 and above. - - - The gtk.about_dialog_set_email_hook -function installs a global function (specified by -func) to be called whenever the user activates an -email link in an about dialog. - - The signature of the callback function -func is: - - -def func(dialog, link, user_data) - - - where link is the email address -destination of the activated link, dialog is the -gtk.AboutDialog -containing link and user_data -is the data argument passed to gtk.about_dialog_set_email_hook(). - - - - - gtk.about_dialog_set_url_hook - - - gtk.about_dialog_set_url_hook - func - data - - - - func : - a function to call when a URL link is -activated. - - - data : - data to pass to -func - - - - - This function is available in PyGTK 2.6 and above. - - - The gtk.about_dialog_set_url_hook function -installs a global function (specified by func) to be -called whenever the user activates a URL link in an about dialog. - - The signature of the callback function -func is: - - -def func(dialog, link, user_data) - - - where link is the URL destination of the -activated link, dialog is the gtk.AboutDialog -containing link and user_data -is the data argument passed to gtk.about_dialog_set_url_hook(). - - - - - -
diff --git a/docs/reference/pygtk-gtkaccelgroup.xml b/docs/reference/pygtk-gtkaccelgroup.xml deleted file mode 100644 index 0d3d13a5..00000000 --- a/docs/reference/pygtk-gtkaccelgroup.xml +++ /dev/null @@ -1,855 +0,0 @@ - - - - - - - gtk.AccelGroup - a group of accelerators for a Window hierarchy - - - - Synopsis - - - gtk.AccelGroup - gobject.GObject - - gtk.AccelGroup - - - lock - - - unlock - - - connect - accel_key - accel_mods - accel_flags - callback - - - connect_group - accel_key - accel_mods - accel_flags - callback - - - connect_by_path - accel_path - callback - - - - disconnect_key - accel_key - accel_mods - - - - - -Functions - - - gtk.accelerator_valid - keyval - modifiers - - gtk.accelerator_parse - accelerator - - gtk.accelerator_name - accelerator_key - accelerator_mods - - gtk.accelerator_set_default_mod_mask - default_mod_mask - - gtk.accelerator_get_default_mod_mask - - gtk.accelerator_get_label - accelerator_key - accelerator_mods - - gtk.accel_groups_from_object - object - - - - - - Ancestry - - -+-- gobject.GObject - +-- gtk.AccelGroup - - - - - - gtk.AccelGroup Signal Prototypes - - - - "accel-activate" - - callback - accelgroup - acceleratable - accel_key - accel_mods - user_param1 - ... - - - - - - "accel-changed" - - callback - accelgroup - accel_key - accel_mods - closure - user_param1 - ... - - - - - - - - - - Description - A gtk.AccelGroup -object groups all the accelerators for the associated window hierarchy -(either gtk.Window (or a -descendant) or gtk.MenuShell (or -a descendant)). Once the gtk.AccelGroup -is associated with a window or menu (using gtk.Window.add_accel_group() -or gtk.Menu.set_accel_group()), -accelerators can be added to the widget or one of its children by using -gtk.Widget.add_accelerator() -. Accelerators can also be added by using a gtk.ItemFactory. - Note that accelerators are different from mnemonics. Accelerators -are shortcuts for activating a menu item; they appear alongside the menu -item they're a shortcut for. For example -CtrlQ - might appear alongside the -FilesQuit - menu item. Mnemonics are shortcuts for GUI elements such -as text entries or buttons; they appear as underlined characters. Of course, -menu items can have both accelerators and mnemonics. - - - - - Constructor - - - gtk.AccelGroup - - - - Returns : - an AccelGroup object - - - - Creates a new gtk.AccelGroup -object. - - - - - Methods - - - gtk.AccelGroup.lock - - - lock - - - The lock() method locks the accelerator -group. preventing its accelerators from being changed during runtime. Refer -to gtk.accel_map_change_entry() -about runtime accelerator changes. - - If called more than once, the accelerator group remains locked -until gtk.AccelGroup.unlock() -has been called an equivalent number of times. - - - - - gtk.AccelGroup.unlock - - - unlock - - - The unlock() method undoes the last -call to gtk.AccelGroup.lock() -for this accelerator group. - - - - - gtk.AccelGroup.connect_group - - - connect - accel_key - accel_mods - accel_flags - callback - - - - accel_key : - key value of the -accelerator - - - accel_mods : - modifier combination of the -accelerator - - - accel_flags : - a flag mask to configure this -accelerator - - - callback : - a function or method to be executed upon -accelerator activation - - - - - This method is available in PyGTK 2.2 as - connect() and was changed in PyGTK 2.4 and - above to connect_group() to avoid conflict - with the gobject.GObject.connect() - method. - - - The connect_group() method installs an -accelerator in the accelerator group. When the accelerator group is being -activated, the function (or method) specified by -callback will be invoked if the accelerator key and -modifier key match those specified by accel_key and -accel_mods. - - The value of modifier is a combination of -the . accel_flags -is a combination of gtk.ACCEL_VISIBLE and -gtk.ACCEL_LOCKED. - - The callback function is defined as: - - - def callback(accel_group, acceleratable, keyval, modifier) - - - where accel_group is the accelerator -group, acceleratable is the object that the -accel_group is attached to (e.g. a gtk.Window), -keyval is the accelerator key and -modifier is the key -modifier. callback returns True if -the accelerator was handled by callback. - - Due to implementation details, a single function or method -can only be connected to one accelerator group. - - - - - - gtk.AccelGroup.connect_by_path - - - connect_by_path - accel_path - callback - - - - accel_path : - path used for determining key and -modifiers. - - - callback : - function or method to be executed upon accelerator -activation - - - - - This method is available in PyGTK 2.4 and above - - - The connect_by_path() method installs -an accelerator in the accelerator group, using an accelerator path to look -up the appropriate key and modifiers (see the function gtk.accel_map_add_entry()). When -the accelerator group is being activated, the function (or method) specified -by callback will be invoked if the -accel_key and accel_mods that -cause the activation match the key and modifiers for the accelerator path -specified by accel_path. - - The callback function is defined as: - - - def callback(accel_group, acceleratable, keyval, modifier) - - - where accel_group is the accelerator -group, acceleratable is the object that the -accel_group is attached to (e.g. a gtk.Window), -keyval is the accelerator key and -modifier is the key -modifier. callback returns True if -the accelerator was handled by callback. - - - - - - - - gtk.AccelGroup.disconnect_key - - - disconnect_key - accel_key - accel_mods - - - - - accel_key : - key value of the -accelerator - - - accel_mods : - modifier combination of the -accelerator - - - Returns : - True if there was an - accelerator which was removed, False - otherwise - - - - The disconnect() method removes a -previously installed accelerator specified by -accel_key and accel_mods from -the accelerator group. - - - - - - - - - Functions - - - gtk.accelerator_valid - - - gtk.accelerator_valid - keyval - modifiers - - - - keyval : - a key value - - - modifiers : - a modifier mask - - - Returns : - True if the accelerator is -valid - - - - The gtk.accelerator_valid() function -returns True if the specified -keyval and modifiers -constitute a valid keyboard accelerator. For example, the -ord('a') keyval plus -gtk.gdk.CONTROL_MASK is valid - this is a Controla -accelerator. The value of modifiers is a combination -of the . - - - - - gtk.accelerator_parse - - - gtk.accelerator_parse - accelerator - - - - accelerator : - a string representing an -accelerator - - - Returns : - a 2-tuple containing the keyval and modifier -mask of the accelerator - - - - The gtk.accelerator_parse() function parses -the specified accelerator string and returns a -2-tuple containing the keyval and modifier mask corresponding to -accelerator. The format looks like "<Control>a" or -"<Shift><Alt>F1" or "<Release>z" (the last one is for key release). The -parser is fairly liberal and allows lower or upper case, and also -abbreviations such as "<Ctl>" and "<Ctrl>". If the parse fails, the tuple -values will both be 0 (zero). See the gtk.accelerator_valid() -function for more details. - - - - - gtk.accelerator_name - - - gtk.accelerator_name - - - - - accelerator_key : - a key value - - - accelerator_mods : - a modifier mask - - - Returns : - a string representing the accelerator or -None if not a valid accelerator - - - - The gtk.accelerator_name() function -converts the accelerator keyval and modifier mask (specified by -accelerator_key and -accelerator_mods) into a string parseable by the -gtk.accelerator_parse() -function. For example, if you pass in ord('q') and -gtk.gdk.CONTROL_MASK, this function returns -"<Control>q". - - - - - gtk.accelerator_set_default_mod_mask - - - gtk.accelerator_set_default_mod_mask - default_mod_mask - - - - default_mod_mask : - the new default accelerator modifier -mask - - - - The gtk.accelerator_set_default_mod_mask() -function sets the modifiers (specified by -default_mod_mask) that will be considered significant -for keyboard accelerators. The default mod mask is -gtk.gdk.CONTROL_MASK | -gtk.gdk.SHIFT_MASK | -gtk.gdk.MOD1_MASK, that is, Control, -Shift, and Alt. Other modifiers will by -default be ignored by gtk.AccelGroup. -You must include at least the three default modifiers in any value you pass -to this function. The default mod mask should be changed on application -startup, before using any accelerator groups. The value of -default_mod_mask is a combination of the . - - - - - gtk.accelerator_get_default_mod_mask - - - gtk.accelerator_get_default_mod_mask - - - - Returns : - the default accelerator modifier -mask - - - - The gtk.accelerator_get_default_mod_mask() -function returns the default accelerator modifier mask as set by the gtk.accelerator_set_default_mod_mask() -function. See the gtk.accelerator_set_default_mod_mask() -function for more detail on modifier masks. - - - - - gtk.accelerator_get_label - - - gtk.accelerator_get_label - accelerator_key - accelerator_mods - - - - accelerator_key : - a key value - - - accelerator_mods : - a modifier mask - - - Returns : - a string representing the -accelerator - - - - - This function is available in PyGTK 2.6 and above. - - - The gtk.accelerator_get_label() function -converts the accelerator keyval and modifier mask specified by -accelerator_key and -accelerator_mods respectively into a string which can -be used to represent the accelerator to the user. The value of -accelerator_mods is a combination of the . - - - - - gtk.accel_groups_from_object - - - gtk.accel_groups_from_object - object - - - - object : - a GObject usually a gtk.Window - - - - - This function is available in PyGTK 2.4 and above. - - - The gtk.accel_groups_from_object() function -returns a list of all the gtk.AccelGroup -objects attached to the object specified by -object. - - - - - - - Signals - - - The "accel-activate" gtk.AccelGroup Signal - - - callback - accelgroup - acceleratable - accel_key - accel_mods - user_param1 - ... - - - - - accelgroup : - the accelgroup that received the -signal - - - acceleratable : - the object that the accelerator is associated -with - - - accel_key : - the accelerator key value - - - accel_mods : - the accelerator modifiers - - - user_param1 : - the first user parameter (if any) specified -with the gobject.GObject.connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the accelerator -was handled - - - - The "accel-activate" signal is emitted when an accelerator is -activated. - - - - - The "accel-changed" gtk.AccelGroup Signal - - - callback - accelgroup - accel_key - accel_mods - closure - user_param1 - ... - - - - - accelgroup : - the accelgroup that received the -signal - - - accel_key : - the key value of the -accelerator - - - accel_mods : - the modifiers of the -accelerator - - - closure : - the closure of the -accelerator - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "accel-changed" signal is emitted when an accelerator is -added or removed from an accelerator group. - - - - - - diff --git a/docs/reference/pygtk-gtkaccellabel.xml b/docs/reference/pygtk-gtkaccellabel.xml deleted file mode 100644 index 52c47488..00000000 --- a/docs/reference/pygtk-gtkaccellabel.xml +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - - gtk.AccelLabel - a label which displays accelerator info to the right of the text - - - - Synopsis - - - gtk.AccelLabel - gtk.Label - - gtk.AccelLabel - string - - - accelerator_width - - - get_accel_widget - - - get_accel_width - - - set_accel_widget - accel_widget - - - - refetch - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Misc - +-- gtk.Label - +-- gtk.AccelLabel - - - - - - gtk.AccelLabel Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Misc Properties - gtk.Label Properties -
- - - - - - - - - "accel-closure" - Read-Write - The closure to be monitored for accelerator -changes - - - "accel-widget" - Read-Write - The widget associated with the accelerator -label - - - - - -
- -
- - - gtk.AccelLabel Style Properties - - gtk.Widget Style Properties - - - - - - gtk.AccelLabel Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Label Signal Prototypes - - - - Description - - The gtk.AccelLabel -widget is a subclass of gtk.Label that -displays an accelerator string to the right of the label text, e.g. -CtrlS - . It is commonly used in menus to show the keyboard -shortcuts for commands. The accelerator string to display is not set -explicitly; instead, the gtk.AccelLabel -displays the accelerators which have been added to the associated widget. A -widget is associated with the accelerator label by calling set_accel_widget(). - - For example, a gtk.MenuItem -widget may have an accelerator added to emit the "activate" signal when the -CtrlS - key combination is pressed. A gtk.AccelLabel -is created and added to the gtk.MenuItem, and -set_accel_widget() is called with the gtk.MenuItem as -the first argument. The gtk.AccelLabel -will now display CtrlS - after its label. - - Creating a gtk.MenuItem with -the gtk.MenuItem() -function (or one of the similar functions gtk.CheckMenuItem() -and gtk.RadioMenuItem()) -and specifying a label, automatically adds a gtk.AccelLabel -to the gtk.MenuItem and -calls set_accel_widget() -to set it up for you. - - A gtk.AccelLabel -will only display accelerators which have -gtk.ACCEL_VISIBLE set. A gtk.AccelLabel -can display multiple accelerators and even signal names, though it is almost -always used to display just one accelerator. - - The following code fragment creates a simple menu item with an -accelerator and enables the display of the accelerator key string in the -menu item label: - - -Creating a simple menu item with an accelerator key. - - # Create an accelgroup and add it to the window - accel_group = gtk.AccelGroup() - window.add_accel_group(accel_group) - - # Create the menu item - save_item = gtk.MenuItem("Save") - save_item.show() - menu.add(save_item) - - # Now add the accelerator to the menu item. Note that since we created - # the menu item with a label the AccelLabel is automatically setup to - # display the accelerators. - save_item.add_accelerator("activate", accel_group, ord("S"), - gtk.gdk.CONTROL_MASK, gtk.ACCEL_VISIBLE) - - - - - - - Constructor - - - gtk.AccelLabel - string - - - - - string : - the label string - - - Returns : - a new gtk.AccelLabel -object - - - - gtk.AccelLabel() creates a new gtk.AccelLabel -object. The string parameter specifies the text to be -displayed by the label. The accelerator text is automatically added by the -associated widget. - - - - - Methods - - - gtk.AccelLabel.accelerator_width - - - accelerator_width - - - - Returns : - the width in pixels needed - - - - The accelerator_width() method returns -the width in pixels needed to display the accelerator(s). It is used by -menus to align all of the gtk.MenuItem -widgets, and isn't usually needed by applications. - accelerator_width() is deprecated -- use the get_accel_width() -method instead. - - - - - - gtk.AccelLabel.get_accel_widget - - - get_accel_widget - - - - Returns : - the widget associated with the accelerator -label, or None. - - - - The get_accel_widget() method retrieves -the widget associated with this accelerator label. See gtk.AccelLabel.set_accel_widget(). - - - - - - gtk.AccelLabel.get_accel_width - - - get_accel_width - - - - - Returns : - the width in pixels needed - - - - The get_accel_width() method returns -the width in pixels needed to display the accelerator(s). It is used by -menus to align all of the gtk.MenuItem -widgets, and isn't usually needed by applications. - - - - - gtk.AccelLabel.set_accel_widget - - - set_accel_widget - accel_widget - - - - - accel_widget : - the widget to be -associated. - - - - The set_accel_widget() method -associates the accelerator label with the widget specified by -accel_widget. - - - - - - - gtk.AccelLabel.refetch - - - refetch - - - - Returns : - False - - - - The refetch() method recreates the -accelerator label string holding the accelerator information when the -accelerator is changed. The size of the string is also recalculated. - - This method is not usually needed by applications since the -accelerator label string is automatically updated whenever accelerators are -added or removed from the associated widget. - - - - - -
diff --git a/docs/reference/pygtk-gtkaccelmap.xml b/docs/reference/pygtk-gtkaccelmap.xml deleted file mode 100644 index 47d6185f..00000000 --- a/docs/reference/pygtk-gtkaccelmap.xml +++ /dev/null @@ -1,688 +0,0 @@ - - - - - - - gtk.AccelMap - Loadable keyboard accelerator specifications (new in PyGTK - 2.10) - - - - Synopsis - - - gtk.AccelMap - gobject.GObject - - - -Functions - - gtk.accel_map_add_entry - accel_path - accel_key - accel_mods - - gtk.accel_map_lookup_entry - accel_path - - gtk.accel_map_change_entry - accel_path - accel_key - accel_mods - replace - - gtk.accel_map_foreach - foreach_func - dataNone - - gtk.accel_map_foreach_unfiltered - foreach_func - dataNone - - gtk.accel_map_get - - - gtk.accel_map_load - file_name - - gtk.accel_map_save - file_name - - gtk.accel_map_load_fd - fd - - gtk.accel_map_save_fd - fd - - gtk.accel_map_lock_path - accel_path - - gtk.accel_map_unlock_path - accel_path - - gtk.accel_map_add_filter - filter_pattern - - gtk.accel_groups_from_object - object - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.AccelMap - - - - - - gtk.AccelMap Signal Prototypes - - gobject.GObject Signal Prototypes - - - - "changed" - - callback - object - accel_path - accel_key - accel_mods - user_param1 - ... - - - - - - - - - Description - - - - - - - Functions - - - gtk.accel_map_add_entry - - - gtk.accel_map_add_entry - accel_path - accel_key - accel_mods - - - - accel_path : - a valid accelerator path - - - accel_key : - the accelerator key - - - accel_mods : - the accelerator modifiers - - - - - This function is available in PyGTK 2.4 and above. - - - The gtk.accel_map_add_entry() function -registers a new accelerator specified by accel_key -and accel_mods with the global accelerator map. The -accelerator will be associated with the accelerator path specified by -accel_path. This function should only be called once -per accel_path with the canonical -accel_key and accel_mods for -this path. To change the accelerator during runtime programatically, use the -gtk.accel_map_change_entry() -function. The accelerator path must consist of -"<WINDOWTYPE>/Category1/Category2/.../Action", where -<WINDOWTYPE> should be a unique application-specific identifier, that -corresponds to the kind of window the accelerator is being used in, -e.g. "Gimp-Image", "Abiword-Document" or "Gnumeric-Settings". The -Category1/.../Action portion is most appropriately chosen by the action the -accelerator triggers, i.e. for accelerators on menu items, choose the item's -menu path, e.g. "File/Save As", "Image/View/Zoom" or "Edit/Select All". So a -full valid accelerator path may look like: -"<Gimp-Toolbox>/File/Dialogs/Tool Options...". - - - - - gtk.accel_map_lookup_entry - - - gtk.accel_map_lookup_entry - accel_path - - - - accel_path : - a valid accelerator path - - - Returns : - a 2-tuple containing the keyval and modifier -mask corresponding to accel_path or -None if not valid - - - - The gtk.accel_map_lookup_entry() function -returns a 2-tuple containing the keyval and modifier mask corresponding to -the accelerator path specified by accel_path or -None if accel_path is not a valid -accelerator path. - - The accelerator path must consist of -"<WINDOWTYPE>/Category1/Category2/.../Action", where <WINDOWTYPE> should be -a unique application-specific identifier, that corresponds to the kind of -window the accelerator is being used in, e.g. "Gimp-Image", -"Abiword-Document" or "Gnumeric-Settings". The Category1/.../Action portion -is most appropriately chosen by the action the accelerator triggers, i.e. -for accelerators on menu items, choose the item's menu path, e.g. "File/Save -As", "Image/View/Zoom" or "Edit/Select All". So a full valid accelerator -path may look like: "<Gimp-Toolbox>/File/Dialogs/Tool Options...". - - - - - gtk.accel_map_change_entry - - - gtk.accel_map_change_entry - accel_path - accel_key - accel_mods - replace - - - - accel_path : - a valid accelerator path - - - accel_key : - the new accelerator key - - - accel_mods : - the new accelerator -modifiers - - - replace : - if True other accelerators -may be deleted if conflicting - - - Returns : - True if the accelerator -could be changed - - - - The gtk.accel_map_change_entry() function -changes the keyval and modifier mask currently associated with the -accelerator path specified by accel_path to the -values specified by accel_key and -accel_mods respectively. Due to conflicts with other -accelerators, a change may not always be possible. If -replace is True the other -accelerators may be deleted to resolve such conflicts. A change will only -occur if all conflicts could be resolved (which might not be the case if -conflicting accelerators are locked). Successful changes are indicated by a -True return value. - - - - - gtk.accel_map_foreach - - - gtk.accel_map_foreach - foreach_func - dataNone - - - - - foreach_func : - function to be executed for each accel map - entry which is not filtered out - - - data : - data to be passed into - foreach_func - - - - - This function is available in PyGTK 2.10 and above. - - - Loops over the entries in the accelerator map whose accel path - doesn't match any of the filters added with the gtk.accel_map_add_filter() - function, and executes foreach_func on - each. The signature of foreach_func is: - - - def foreach_func(accel_path, accel_key, accel_mode, changed, user_data): - - - where accel_path, - accel_key and accel_mode - describe the accel map accelerator entry and the - changed parameter indicates whether this - accelerator was changed during runtime ( and thus, would need saving - during an accelerator map dump). user_data is - data if data was - specified. See the gtk.accel_map_add_entry() - function for more information. - - - - gtk.accel_map_foreach_unfiltered - - - gtk.accel_map_foreach_unfiltered - foreach_func - dataNone - - - - - foreach_func : - function to be executed for each accel map - entry - - - data : - data to be passed into - foreach_func - - - - - This function is available in PyGTK 2.10 and above. - - - Loops over all entries in the accelerator map, and executes - foreach_func on each. The signature of - foreach_func is: - - - def foreach_func(accel_path, accel_key, accel_mode, changed, user_data): - - - where accel_path, - accel_key and accel_mode - describe the accel map accelerator entry and the - changed parameter indicates whether this - accelerator was changed during runtime (thus, would need saving during - an accelerator map dump). user_data is - data if data was - specified. See the gtk.accel_map_add_entry() - function for more information. - - - - gtk.accel_map_get - - - gtk.accel_map_get - - - - - - Returns : - the global gtk.AccelMap - object - - - - - This function is available in PyGTK 2.10 and above. - - - Gets the singleton global gtk.AccelMap - object. This object is useful only for notification of changes to the - accelerator map via the "changed" signal. it has no methods or - properties. - - - - gtk.accel_map_load - - - gtk.accel_map_load - file_name - - - - file_name : - the file containing accelerator -specifications - - - - The gtk.accel_map_load() function parses -the file (specified by file_name) previously saved -with the gtk.accel_map_save() -function for accelerator specifications, and propagates them -accordingly. - - - - - gtk.accel_map_save - - - gtk.accel_map_save - file_name - - - - file_name : - the file to save the accelerator specifications -in - - - - The gtk.accel_map_save() function saves -current accelerator specifications (accelerator path, key and modifiers) to -the file specified by file_name. The file is written -in a format suitable to be read back in by the gtk.accel_map_load() -function. - - - - - gtk.accel_map_load_fd - - - gtk.accel_map_load_fd - fd - - - - fd : - a Python file object or an integer file -descriptor - - - - The gtk.accel_map_load_fd() function loads -the accelerator map from the open Python file object specified by -fd. fd may also be an integer -file descriptor. See the gtk.accel_map_load() -function. - - - - - gtk.accel_map_save_fd - - - gtk.accel_map_save_fd - fd - - - - fd : - a Python file object or an integer file -descriptor - - - - The gtk.accel_map_save_fd() function saves -the accelerator map into the open Python file object specified by fd. -fd may also be an integer file descriptor. See the -gtk.accel_map_save() -function. - - - - - gtk.accel_map_lock_path - - - gtk.accel_map_lock_path - accel_path - - - - accel_path : - a valid accelerator path - - - - - This function is available in PyGTK 2.4 and above. - - - The gtk.accel_map_lock_path() function - locks the accelerator path specified by - accel_path. If the accelerator map doesn't yet - contain an entry for accel_path, a new one is - created. - - Locking an accelerator path prevents its accelerator from being - changed during runtime. A locked accelerator path can be unlocked by - the gtk.accel_map_unlock_path() - function. Refer to the gtk.accel_map_change_entry() - function for information about runtime accelerator changes. - - If called more than once, accel_path - remains locked until the gtk.accel_map_unlock_path() - function has been called an equivalent number of times. - - Note that locking of individual accelerator paths is independent - from locking the gtk.AccelGroup - containing them. For runtime accelerator changes to be possible both - the accelerator path and its gtk.AccelGroup - have to be unlocked. - - - - - gtk.accel_map_unlock_path - - - gtk.accel_map_unlock_path - accel_path - - - - accel_path : - a valid accelerator path - - - - - This function is available in PyGTK 2.4 and above. - - - The gtk.accel_map_unlock_path() function - undoes the last call to the gtk.accel_map_lock_path() - function on the accelerator path specified by - accel_path. Refer to the gtk.accel_map_lock_path() - function for information about accelerator path locking. - - - - - gtk.accel_map_add_filter - - - gtk.accel_map_add_filter - filter_pattern - - - - filter_pattern : - a glob-style pattern - - - Returns : - - - - - The gtk.accel_map_add_filter() function - adds the filter pattern specified by - filter_pattern to the global list of accel path - filters. The pattern specified by - filter_pattern contain '*' and '?' wildcards - with similar semantics as the Python glob.py and - fnmatch.py modules: '*' matches an arbitrary, - possibly empty, string, '?' matches an arbitrary character. Note that - in contrast to glob.py, the '/' character can be - matched by the wildcards, there are no '[...]' character ranges and - '*' and '?' can not be escaped to include them literally in a - pattern. Accelerator map entries whose accelerator path matches one of - the filters are skipped by the gtk.accel_map_foreach() - function. This function is intended for PyGTK - modules that create their own menus, but don't want them to be saved - into the applications accelerator map dump. - - - - - - - Signals - - - The "changed" gtk.AccelMap Signal - - callback - object - accel_path - accel_key - accel_mods - user_param1 - ... - - - - - object : - the global accel map object - - - accel_path : - the path of the accelerator that - changed - - - accel_key : - the key value for the new - accelerator - - - accel_mods : - the modifier mask for the new - accelerator - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if - any) - - - - - This signal is available in GTK+ 2.4 and above. - - - Notifies of a change in the global accelerator map. The path is - also used as the detail for the signal, so it is possible to connect - to changed::accel_path. - - - - - - diff --git a/docs/reference/pygtk-gtkaccessible.xml b/docs/reference/pygtk-gtkaccessible.xml deleted file mode 100644 index b69f70aa..00000000 --- a/docs/reference/pygtk-gtkaccessible.xml +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - gtk.Accessible - accessibility support for widgets. - - - - Synopsis - - - gtk.Accessible - atk.Object - - connect_widget_destroyed - - - - - - - Ancestry - -+-- gobject.GObject - +-- atk.Object - +-- gtk.Accessible - - - - - - gtk.Accessible Properties - - atk.Object Properties - - - - - - gtk.Accessible Signal Prototypes - - gobject.GObject Signal Prototypes - atk.Object Signal Prototypes - - - - Description - - The gtk.Accessible class is an abstract base class. - - - - Methods - - - gtk.Accessible.connect_widget_destroyed - - - connect_widget_destroyed - - - This method specifies the callback function to be called when -the widget corresponding to a gtk.Accessible is -destroyed. - - - - - - diff --git a/docs/reference/pygtk-gtkaction.xml b/docs/reference/pygtk-gtkaction.xml deleted file mode 100644 index 51e38a8f..00000000 --- a/docs/reference/pygtk-gtkaction.xml +++ /dev/null @@ -1,1144 +0,0 @@ - - - - - gtk.Action - an action which can be triggered by a menu or toolbar -item (new in PyGTK 2.4) - - - - Synopsis - - - gtk.Action - gobject.GObject - - gtk.Action - name - label - tooltip - stock_id - - - get_name - - - - is_sensitive - - - - get_sensitive - - - - is_visible - - - - get_visible - - - - activate - - - - create_icon - icon_size - - - create_menu_item - - - - create_tool_item - - - - connect_proxy - proxy - - - disconnect_proxy - proxy - - - get_proxies - - - - connect_accelerator - - - - disconnect_accelerator - - - - block_activate_from - proxy - - - unblock_activate_from - proxy - - - get_accel_path - - - - set_accel_path - accel_path - - - set_accel_group - accel_group - - - set_sensitive - sensitive - - - set_visible - visible - - - set_menu_item_type - visible - - - set_tool_item_type - visible - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Action - - - - - - gtk.Action Properties - -
- - - - - - - - - "action-group" - Read-Write - - The gtk.ActionGroup -this gtk.Action is -associated with, or None (for internal use). - - - - "hide-if-empty" - Read-Write - If True, empty menu proxies for this -action are hidden. - - - - "is-important" - Read-Write - If True, gtk.ToolItem -proxies for this action show text in -gtk.TOOLBAR_BOTH_HORIZ mode. - - - - "label" - Read-Write - The label used for menu items and buttons that activate -this action. - - - - "name" - Read-Write-Construct Only - A unique name for the action. - - - - "sensitive" - Read-Write - If True, the action is -enabled. - - - - "short-label" - Read-Write - A shorter label that may be used on toolbar -buttons. - - - - "stock-id" - Read-Write - The stock icon displayed in widgets representing this -action. - - - - "tooltip" - Read-Write - A tooltip for this action. - - - - "visible" - Read-Write - If True, the action is -visible. - - - - "visible-horizontal" - Read-Write - If True, the toolbar item is -visible when the toolbar is in a horizontal orientation. - - - - "visible-vertical" - Read-Write - If True, the toolbar item is -visible when the toolbar is in a vertical orientation. - - - - - -
- -
- - - gtk.Action Signal Prototypes - - gobject.GObject Signal Prototypes - - - - "activate" - - callback - action - user_param1 - ... - - - - - - - - - Description - - - This widget is available in PyGTK 2.4 and above. - - - A gtk.Action -represents operations that the user can perform, along with some information -how it should be presented in the interface. Each gtk.Action provides -methods to create icons, menu items and toolbar items representing -itself. - - As well as the callback that is called when the action gets -activated, the following also gets associated with the action: - - - - a name (not translated, for path lookup) - - - a label (translated, for display) - - - an accelerator - - - whether the label indicates a stock id - - - a tooltip (optional, translated) - - - a toolbar label (optional, shorter than label) - - - - The action will also have some state information: - - - - visible (shown/hidden) - - - sensitive (enabled/disabled) - - - - Apart from regular actions, there are toggle actions, which can be -toggled between two states and radio actions, where only one in a group -can be in the "active" state. Other actions can be implemented as gtk.Action -subclasses. - - Each gtk.Action can have -one or more proxy menu items, toolbar buttons or other proxy -widgets. Proxies mirror the state of the action (text label, tooltip, icon, -visible, sensitive, etc), and should change when the action's state -changes. When the proxy is activated, it should activate its action. - - - - - Constructor - - - gtk.Action - name - label - tooltip - stock_id - - - - name : - a unique name for the gtk.Action - - - label : - the label displayed in menu items and on -buttons - - - tooltip : - a tooltip for the action - - - stock_id : - the stock icon to display in widgets -representing the action - - - Returns : - a new gtk.Action - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new gtk.Action -object. To add the action to a gtk.ActionGroup -and set the accelerator for the action, call the gtk.ActionGroup.add_action_with_accel(). - - - - - Methods - - - gtk.Action.get_name - - - get_name - - - - - Returns : - the name of the action. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_name() method returns the value -of the "name" property containing the name of the action. - - - - - gtk.Action.is_sensitive - - - is_sensitive - - - - - Returns : - True if the action and its -associated action group are both sensitive. - - - - - This method is available in PyGTK 2.4 and above. - - - The is_sensitive() method returns -True if the action is effectively sensitive i.e. both the -gtk.Action and -its associated gtk.ActionGroup -are sensitive. - - - - - gtk.Action.get_sensitive - - - get_sensitive - - - - - Returns : - True if the action itself -is sensitive. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_sensitive() method returns the -value of the "sensitive" property. If "sensitive" is True -the action itself is sensitive. Note that this doesn't necessarily mean -effective sensitivity. See the is_sensitive() -method for more information. - - - - - gtk.Action.is_visible - - - is_visible - - - - - Returns : - True if the action and -its associated action group are both visible. - - - - - This method is available in PyGTK 2.4 and above. - - - The is_visible() method returns -True if the action is effectively visible i.e. both the -gtk.Action and -its associated gtk.ActionGroup -as visible. - - - - - gtk.Action.get_visible - - - get_visible - - - - - Returns : - True if the action itself -is visible. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_visible() method returns the -value of the "visible" property. If "visible" is True the -gtk.Action -itself is visible. Note that this doesn't necessarily mean effective -visibility. See the is_visible() -method for more information. - - - - - gtk.Action.activate - - - activate - - - - - This method is available in PyGTK 2.4 and above. - - - The activate() method emits the -"activate" signal on the gtk.Action, if it -isn't insensitive. This gets called by the proxy widgets when they get -activated. It can also be used to manually activate an action. - - - - - gtk.Action.create_icon - - - create_icon - icon_size - - - - icon_size : - the size of the icon that should be -created. - - - Returns : - a widget that displays the icon for this -action. - - - - - This method is available in PyGTK 2.4 and above. - - - The create_icon() method creates and -returns a gtk.Image with the -size specified by size from the icon contained in the -"stock-id" property if it exists. The value of size -must be one of: - - - - gtk.ICON_SIZE_MENU - - - gtk.ICON_SIZE_SMALL_TOOLBAR - - - gtk.ICON_SIZE_LARGE_TOOLBAR - - - gtk.ICON_SIZE_BUTTON - - - gtk.ICON_SIZE_DND - - - gtk.ICON_SIZE_DIALOG - - - - This method is intended for use by gtk.Action -implementations to create icons displayed in the proxy widgets. - - - - - gtk.Action.create_menu_item - - - create_menu_item - - - - - Returns : - a menu item connected to the -action. - - - - - This method is available in PyGTK 2.4 and above. - - - The create_menu_item() method creates -and returns a menu item widget that proxies for the gtk.Action. - - - - - gtk.Action.create_tool_item - - - create_tool_item - - - - Returns : - a tool item connected to the -action. - - - - - This method is available in PyGTK 2.4 and above. - - - The create_tool_item() method creates -and returns a tool item widget that proxies for the gtk.Action. - - - - - gtk.Action.connect_proxy - - - connect_proxy - proxy - - - - proxy : - the proxy widget - - - - - This method is available in PyGTK 2.4 and above. - - - The connect_proxy() method connects the -widget specified by proxy to the gtk.Action object as -a proxy. This method synchronizes various properties of the gtk.Action with the -widget (such as label text, icon, tooltip, etc), and attaches a callback so -that the gtk.Action is -activated when proxy is. - - If proxy is already connected to another -gtk.Action, it -is disconnected first. The gtk.Action should be -added to a gtk.ActionGroup -before calling this method. - - - - - gtk.Action.disconnect_proxy - - - disconnect_proxy - proxy - - - - proxy : - the proxy widget - - - - - This method is available in PyGTK 2.4 and above. - - - The disconnect_proxy() method -disconnects the widget specified by proxy from the -gtk.Action. This -method does not destroy the widget. The gtk.Action should be -added to a gtk.ActionGroup -before calling this method. - - - - - gtk.Action.get_proxies - - - get_proxies - - - - - Returns : - a list of proxy widgets. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_proxies() method returns a list -containing the proxy widgets associated with the gtk.Action. - - - - - gtk.Action.connect_accelerator - - - connect_accelerator - - - - - This method is available in PyGTK 2.4 and above. - - - The connect_accelerator() method -installs the accelerator for the gtk.Action if it has -an associated accel path and gtk.AccelGroup. See -the set_accel_path() -and the set_accel_group() -methods. - - Since multiple proxies may independently trigger the -installation of the accelerator, the gtk.Action counts -the number of times this method has been called and doesn't remove the -accelerator until disconnect_accelerator() -has been called as many times. - - - - - gtk.Action.disconnect_accelerator - - - disconnect_accelerator - - - - - This method is available in PyGTK 2.4 and above. - - - The disconnect_accelerator() method -undoes the effect of one call to the connect_accelerator() -method. - - - - - gtk.Action.block_activate_from - - - block_activate_from - proxy - - - - proxy : - a proxy widget - - - - - This method is available in PyGTK 2.4 and above. - - - The block_activate_from() method -disables calls to the activate() -method by signals on the widget specified by -proxy. This is used to break notification loops for -things like check or radio actions. - - This method is intended for use by gtk.Action -implementations. - - - - - gtk.Action.unblock_activate_from - - - unblock_activate_from - proxy - - - - proxy : - a proxy widget - - - - - This method is available in PyGTK 2.4 and above. - - - The unblock_activate_from() method -re-enables calls to the activate() -method by signals on the widget specified by proxy. -This undoes the blocking done by the block_activate_from() -method. - - This method is intended for use by gtk.Action -implementations. - - - - - gtk.Action.get_accel_path - - - get_accel_path - - - - - Returns : - the accelerator path associated with the action -or None - - - - - This method is available in PyGTK 2.6 and above. - - - The get_accel_path() method returns the -accel path for the action or None if no accel path is -set. - - - - - gtk.Action.set_accel_path - - - set_accel_path - accel_path - - - - accel_path : - the accelerator path - - - - - This method is available in PyGTK 2.4 and above. - - - The set_accel_path() method sets the -accel path for the action to the value of -accel_path. All proxy widgets associated with the -action will have this accel path, so that their accelerators are -consistent. - - - - - gtk.Action.set_accel_group - - - set_accel_group - accel_group - - - - accel_group : - a gtk.AccelGroup or None - - - - - This method is available in PyGTK 2.4 and above. - - - The set_accel_group() method sets the -gtk.AccelGroup -specified by accel_group as the accelerator group for -the gtk.Action. - - - - - gtk.Action.set_sensitive - - - set_sensitive - sensitive - - - - sensitive : - if True make the action -sensitive - - - - - This method is available in PyGTK 2.6 and above. - - - The set_sensitive() method sets the -"sensitive" property to the value of sensitive. Note -that this doesn't necessarily set the effective sensitivity. See the is_sensitive() -method for more information. - - - - - gtk.Action.set_visible - - - set_visible - visible - - - - visible : - if True make the action -visible - - - - - This method is available in PyGTK 2.6 and above. - - - The set_visible() method sets the -"visible" property to the value of visible. Note that -this doesn't necessarily set the effective visibility. See the is_visible() -method for more information. - - - - - gtk.Action.set_menu_item_type - - - set_menu_item_type - visible - - - - type : - the type of menuitem to be created for the - action - - - - - This method is available in PyGTK 2.10 and above. - - - The set_menu_item_type() method is a - classmethod that sets the type of menuitem to be created for the - action to that specified by type. This is - useful when using the gtk.UIManager - and you would like to use something other than a gtk.ImageMenuItem - (gtk.Action) or - a gtk.CheckMenuItem - (gtk.ToogleAction - or gtk.RadioAction). - - - - - gtk.Action.set_tool_item_type - - - set_tool_item_type - visible - - - - type : - the type of toolitem to be created for the - action - - - - - This method is available in PyGTK 2.10 and above. - - - The set_tool_item_type() method is a - classmethod that sets the type of toolitem to be created for the - action to that specified by type. This is - useful when using the gtk.UIManager - and you would like to use something other than a gtk.ToolButton - (gtk.Action) or - a gtk.ToggleToolButton - (gtk.ToogleAction - or gtk.RadioAction). - - For example, to use a gtk.MenuToolButton - in a toolbar you would subclass gtk.Action: - - - class MenuToolAction(gtk.Action): - __gtype_name__ = "MenuToolAction" - - gobject.type_register(MenuToolAction) - - - and then call set_tool_item_type(): - - - MenuToolAction.set_tool_item_type(gtk.MenuToolButton) - - - You have to create, name and add an instance of - MenuToolAction to your gtk.ActionGroup: - - - actiongroup.add_action(MenuToolAction("my_menutoolaction", "_MTB_label", - "do something", None)) - - - The ui description should reference the - MenuToolAction like: - - - <toolitem action="my_menutoolaction"/> - - - After the gtk.UIManager - creates the toolbar including the gtk.MenuToolButton - proxy for the MenuToolAction, you would have to - create and add a menu to the gtk.MenuToolButton - instance. - - This technique can be extended by subclassing gtk.ToolItem - and adding custom widgets to it. - - - - - - - Signals - - - The "activate" gtk.Action Signal - - - callback - action - user_param1 - ... - - - - - action : - the gtk.Action that -received the signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in PyGTK 2.4 and above. - - - The "activate" signal is emitted when -action is activated. - - - - - -
diff --git a/docs/reference/pygtk-gtkactiongroup.xml b/docs/reference/pygtk-gtkactiongroup.xml deleted file mode 100644 index 6ef84f5e..00000000 --- a/docs/reference/pygtk-gtkactiongroup.xml +++ /dev/null @@ -1,1054 +0,0 @@ - - - - - gtk.ActionGroup - a group of actions (new in PyGTK 2.4) - - - - Synopsis - - - gtk.ActionGroup - gobject.GObject - - gtk.ActionGroup - name - - - get_name - - - - get_sensitive - - - - set_sensitive - sensitive - - - get_visible - - - - set_visible - visible - - - get_action - action_name - - - list_actions - - - add_action - action - - - add_action_with_accel - action - accelerator - - - remove_action - action - - - add_actions - entries - user_dataNone - - - add_toggle_actions - entries - user_dataNone - - - add_radio_actions - entries - value0 - on_changeNone - user_dataNone - - - set_translation_domain - domain - - - translate_string - string - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.ActionGroup - - - - - - gtk.ActionGroup Properties - -
- - - - - - - - - "name" - Read-Write - A name for the action group. - - - - "sensitive" - Read-Write - If True, the action group is -enabled. - - - - "visible" - Read-Write - If True, the action group is -visible. - - - - - -
- -
- - - gtk.ActionGroup Signal Prototypes - - gobject.GObject Signal Prototypes - - - - "connect-proxy" - - callback - actiongroup - action - proxy - user_param1 - ... - - - - - "disconnect-proxy" - - callback - actiongroup - action - proxy - user_param1 - ... - - - - - "post-activate" - - callback - actiongroup - action - user_param1 - ... - - - - - "pre-activate" - - callback - actiongroup - action - user_param1 - ... - - - - - - - - - Description - - - This object is available in PyGTK 2.4 and above. - - - gtk.Action objects -are organized into gtk.ActionGroup -objects. An action group is basically a map from names to gtk.Action -objects. - - All actions that would make sense to use in a particular context -should be in a single action group. Multiple action groups may be used for a -particular user interface. In fact, it is expected that most nontrivial -applications will make use of multiple groups. For example, in an -application that can edit multiple documents, there could be one group -holding global actions (e.g. quit, about, new), and one group per document -holding actions that act on that document (e.g. save, cut/copy/paste, -etc). Each window's menus would be constructed from a combination of the two -action groups. - - Accelerators are handled by the GTK+ accelerator map. All actions -are assigned an accelerator path (which normally has the form -"<Actions>/group-name/action-name") and a shortcut is associated with -this accelerator path. All menuitems and toolitems take on this accelerator -path. The GTK+ accelerator map code makes sure that the correct shortcut is -displayed next to the menu item. - - - - - Constructor - - - gtk.ActionGroup - name - - - - name : - the name of the action group. - - - Returns : - the new gtk.ActionGroup - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new gtk.ActionGroup -object with the name specified by name. The name of -the action group is used when associating keybindings with the -actions. - - - - - Methods - - - gtk.ActionGroup.get_name - - - get_name - - - - - Returns : - the name of the action -group. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_name() method returns the value -of the "name" property that contains the name of the action group. - - - - - gtk.ActionGroup.get_sensitive - - - get_sensitive - - - - - Returns : - True if the group is -sensitive. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_sensitive() method returns the -value of the "sensitive" property. If "sensitive" is True -the group is enabled. The constituent actions can only be logically -sensitive (see the gtk.Action.is_sensitive() -method) if they are sensitive (see the gtk.Action.get_sensitive() -method) and their group is sensitive. - - - - - gtk.ActionGroup.set_sensitive - - - set_sensitive - sensitive - - - - sensitive : - if True, the group is -enabled - - - - - This method is available in PyGTK 2.4 and above. - - - The set_sensitive() method sets the - "sensitive" property to the value of - sensitive. If sensitive - is True, the gtk.ActionGroup - is enabled. - - - - - gtk.ActionGroup.get_visible - - - get_visible - - - - - Returns : - True if the group is -visible. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_visible() method returns the -value of the "visible" property. If "visible" is True, -the group is visible. The constituent actions can only be logically visible -(see the gtk.Action.is_visible() -method) if they are visible (see the gtk.Action.get_visible() -method) and their group is visible. - - - - - gtk.ActionGroup.set_visible - - - set_visible - visible - - - - visible : - if True, the group will be -visible - - - - - This method is available in PyGTK 2.4 and above. - - - The set_visible() method sets the -"visible" property to the value of visible. If -visible is True the gtk.ActionGroup -will be visible. - - - - - gtk.ActionGroup.get_action - - - get_action - action_name - - - - action_name : - the name of the action - - - Returns : - the action, or None if no -action with that name exists. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_action() method retrieves the -action in the action group with the name specified by -action_name. - - - - - gtk.ActionGroup.list_actions - - - list_actions - - - - Returns : - a list of the action objects in the action -group - - - - - This method is available in PyGTK 2.4 and above. - - - The list_action() method returns a list -containing the gtk.Action objects -in the action group. - - - - - gtk.ActionGroup.add_action - - - add_action - action - - - - action : - an action - - - - - This method is available in PyGTK 2.4 and above. - - - The add_action() method adds the gtk.Action specified -by action to the action group. - - - - - gtk.ActionGroup.add_action_with_accel - - - add_action_with_accel - action - accelerator - - - - action : - the action to add - - - accelerator : - the accelerator for the action, in the format - understood by the gtk.accelerator_parse() - function, or None to use the stock - accelerator - - - - - This method is available in PyGTK 2.4 and above. - - - The add_action_with_accel() method adds -a gtk.Action -specified by action to the action group and sets up -the accelerator specified by accelerator. - - If accelerator is -None, this method attempts to use the accelerator -associated with the "stock_id" property of the gtk.Action. - - Accel paths are set to -<Actions>/group-name/action-name. - - - - - gtk.ActionGroup.remove_action - - - remove_action - action - - - - action : - a gtk.Action - - - - - This method is available in PyGTK 2.4 and above. - - - The remove_action() method removes the -gtk.Action -specified by action from the action group. - - - - - gtk.ActionGroup.add_actions - - - add_actions - entries - user_dataNone - - - - entries : - a list or tuple of action -descriptions - - - user_data : - data to pass to the action -callbacks - - - - - This method is available in PyGTK 2.4 and above. - - - The add_actions() method is a -convenience method that creates a number of gtk.Action objects -based on the information in the list of action entry tuples contained in -entries and adds them to the action group. The entry -tuples can vary in size from one to six items with the following -information: - - - - The name of the action. Must be specified. - - - The stock id for the action. Optional with a default -value of None if a label is specified. - - - The label for the action. This field should typically be -marked for translation, see the set_translation_domain() -method. Optional with a default value of None if a stock -id is specified. - - - The accelerator for the action, in the format understood by -the gtk.accelerator_parse() -function. Optional with a default value of -None. - - - The tooltip for the action. This field should typically be -marked for translation, see the set_translation_domain() -method. Optional with a default value of None. - - - The callback function invoked when the action is -activated. Optional with a default value of -None. - - - - The "activate" signals of the actions are connected to the -callbacks and their accel paths are set to -<Actions>/group-name/action-name. - - - - - gtk.ActionGroup.add_toggle_actions - - - add_toggle_actions - entries - user_dataNone - - - - entries : - a list or tuple of toggle action entry -tuples - - - user_data : - data to pass to the action -callbacks - - - - - This method is available in PyGTK 2.4 and above. - - - The add_toggle_actions() method is a -convenience method that creates a number of gtk.ToggleAction -objects based on the information in the list of action entry tuples -contained in entries and adds them to the action -group. The toggle action entry tuples can vary in size from one to six items -with the following information: - - - - The name of the action. Must be specified. - - - The stock id for the action. Optional with a default -value of None if a label is specified. - - - The label for the action. This field should typically be -marked for translation, see the set_translation_domain() -method. Optional with a default value of None if a stock -id is specified. - - - The accelerator for the action, in the format understood by -the gtk.accelerator_parse() -function. Optional with a default value of -None. - - - The tooltip for the action. This field should typically be -marked for translation, see the set_translation_domain() -method. Optional with a default value of None. - - - The callback function invoked when the action is -activated. Optional with a default value of -None. - - - A flag indicating whether the toggle action is -active. Optional with a default value of False. - - - - The "activate" signals of the actions are connected to the -callbacks and their accel paths are set to -<Actions>/group-name/action-name. - - - - - gtk.ActionGroup.add_radio_actions - - - add_radio_actions - entries - value0 - on_changeNone - user_dataNone - - - - entries : - a list or tuple of radio action entry -tuples - - - value : - the value of the radio action to set -active - - - on_change : - a callback to connect to the "changed" signal -of the first radio action - - - user_data : - data to pass to the -on_change callback - - - - - This method is available in PyGTK 2.4 and above. - - - The add_radio_actions() method is a -convenience method that creates a number of gtk.RadioAction -objects based on the information in the list of action entry tuples -contained in entries and adds them to the action -group. The entry tuples can vary in size from one to six items with the -following information: - - - - The name of the action. Must be specified. - - - The stock id for the action. Optional with a default -value of None if a label is specified. - - - The label for the action. This field should typically be -marked for translation, see the set_translation_domain() -method. Optional with a default value of None if a stock -id is specified. - - - The accelerator for the action, in the format understood by -the gtk.accelerator_parse() -function. Optional with a default value of -None. - - - The tooltip for the action. This field should typically be -marked for translation, see the set_translation_domain() -method. Optional with a default value of None. - - - The value to set on the radio action. Optional with a -default value of 0. Should be specified in -applications. - - - - The value parameter specifies the radio -action that should be set active. The "changed" signal of the first radio -action is connected to the on_change callback (if -specified and not None) and the accel paths of the -actions are set to -<Actions>/group-name/action-name. - - - - - gtk.ActionGroup.set_translation_domain - - - set_translation_domain - domain - - - - domain : - the translation domain to use for -dgettext() calls - - - - - This method is available in PyGTK 2.4 and above. - - - The set_translation_domain() method -sets the translation domain to the string specified by -domain and uses dgettext() -for translating the label and -tooltip strings of the actions added by the add_actions(), -add_toggle_actions() -and add_radio_actions() -methods. - - - - - gtk.ActionGroup.translate_string - - - translate_string - string - - - - string : - the string to be translated - - - Returns : - the translation of -string - - - - - This method is available in PyGTK 2.6 and above. - - - The translate_string() method -translates the string specified by string using the -specified translate_func(). This is mainly intended for -language bindings. - - - - - - - Signals - - - The "connect-proxy" gtk.ActionGroup Signal - - - callback - actiongroup - action - proxy - user_param1 - ... - - - - - actiongroup : - the actiongroup that received the -signal - - - action : - the action that is associated with -proxy - - - proxy : - the proxy widget associated with -action - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in PyGTK 2.4 and above. - - - The "connect-proxy" signal is emitted when the widget specified -by proxy is connected to the gtk.Action specified -by action. - - - - - The "disconnect-proxy" gtk.ActionGroup Signal - - - callback - actiongroup - action - proxy - user_param1 - ... - - - - - actiongroup : - the actiongroup that received the -signal - - - action : - the action that is associated with -proxy - - - proxy : - the proxy widget associated with -action - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in PyGTK 2.4 and above. - - - The "disconnect-proxy" signal is emitted when the widget -specified by proxy is disconnected from the gtk.Action specified -by action. - - - - - The "post-activate" gtk.ActionGroup Signal - - - callback - actiongroup - action - user_param1 - ... - - - - - actiongroup : - the actiongroup that received the -signal - - - action : - the action that is being -activated - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in PyGTK 2.4 and above. - - - The "post-activate" signal is emitted after the gtk.Action specified -by action has been activated. - - - - - The "pre-activate" gtk.ActionGroup Signal - - - callback - actiongroup - action - user_param1 - ... - - - - - actiongroup : - the actiongroup that received the -signal - - - action : - the action that is being -activated - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in PyGTK 2.4 and above. - - - The "pre-activate" signal is emitted before the gtk.Action specified -by action is activated. - - - - - -
diff --git a/docs/reference/pygtk-gtkadjustment.xml b/docs/reference/pygtk-gtkadjustment.xml deleted file mode 100644 index 6c3aead1..00000000 --- a/docs/reference/pygtk-gtkadjustment.xml +++ /dev/null @@ -1,628 +0,0 @@ - - - - - - gtk.Adjustment - an object representing an adjustable bounded -value - - - - Synopsis - - - gtk.Adjustment - gtk.Object - - gtk.Adjustment - value0 - lower0 - upper0 - step_incr0 - page_incr0 - page_size0 - - - set_all - value - lower - upper - step_increment - page_increment - page_size - - - changed - - - value_changed - - - clamp_page - lower - upper - - - get_value - - - set_value - value - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Adjustment - - - - - - gtk.Adjustment Properties - - gtk.Object Properties - - - These properties are available in GTK+ 2.4 and above. The GTK+ - version is contained in the 3-tuple gtk.gtk_version. - - -
- - - - - - - - - "lower" - Read-Write - The minimum value of the adjustment. (float) - - - - "page-increment" - Read-Write - The page increment of the adjustment. (float) - - - - "page-size" - Read-Write - The page size of the adjustment. (float) - - - - "step-increment" - Read-Write - The step increment of the adjustment. (float) - - - - "upper" - Read-Write - The maximum value of the adjustment. (float) - - - - "value" - Read-Write - The value of the adjustment. (float) - - - - - -
- -
- - - Attributes - -
- - - - - - - - - "value" - Read-Write - the current value (float) - - - - "lower" - Read-Write - the minimum value (float) - - - - "upper" - Read-Write - the maximum value (float) - - - - "step_increment" - Read-Write - the increment to use to make minor changes to the -value. In a gtk.Scrollbar -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. (float) - - - - "page_increment" - Read-Write - the increment to use to make major changes to the -value. In a gtk.Scrollbar -this increment is used when the mouse is clicked in the trough, to scroll by -a large amount. (float) - - - - "page_size" - Read-Write - a widget specific size. In a gtk.Scrollbar -this is the size of the area which is currently visible. (float) - - - - - -
- -
- - - gtk.Adjustment Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - - - - "changed" - - callback - adjustment - - user_param1 - - ... - - - - - - "value-changed" - - callback - adjustment - - user_param1 - - ... - - - - - - - - - - Description - - The gtk.Adjustment -object contains a value which has an associated lower and upper bound, -together with step and page increments, and a page size. It is used in -conjunction with several PyGTK widgets, including gtk.SpinButton, -gtk.Viewport, -and gtk.Range (which -is a base class for gtk.HScrollbar, -gtk.VScrollbar, -gtk.HScale, and -gtk.VScale). - - A gtk.Adjustment -can be shared by multiple widgets. The gtk.Adjustment -object does not update the value itself. Instead it is left up to the -associated widget(s) that use the gtk.Adjustment -to control the value. - - The widget using the gtk.Adjustment -typically calls the value_changed() -or changed() -methods after changing the value or its bounds. This results in the emission -of the "value_changed" or "changed" signal respectively. - - A gtk.Adjustment -object contains several attributes that provide access to its value and -bounds: - - - value - - - lower - - - upper - - - step_increment - - - page_increment - - - page_size - - - - The attribute values can be retrieved and set similar to: - - - adjustment.upper = 25.0 - lower = adjustment.lower - - - - - - Constructor - - - gtk.Adjustment - value0 - lower0 - upper0 - step_incr0 - page_incr0 - page_size0 - - - - - value : - the initial value. - - - lower : - the minimum value. - - - upper : - the maximum value. - - - step_incr : - the step increment. - - - page_incr : - the page increment. - - - page_size : - the page size. - - - Returns : - a new gtk.Adjustment object - - - - gtk.Adjustment() creates a new gtk.Adjustment -object with the specified attributes. Any attributes not specified are set -to 0.0 by default. - - - - - Methods - - - gtk.Adjustment.set_all - - - set_all - value - lower - upper - step_increment - page_increment - page_size - - - - - value : - the new value. - - - lower : - the new minimum value. - - - upper : - the new maximum value. - - - step_increment : - the new step increment. - - - page_increment : - the new page increment. - - - page_size : - the new page size. - - - - The set_all() method sets the -attributes of the adjustment to the specified values. - - - - - gtk.Adjustment.changed - - - changed - - - The changed() method emits a "changed" -signal from the adjustment. This must typically be called if any of the -adjustment attributes other than value has changed so that the widget(s) -using the adjustment can reflect the changes. Applications usually will not -need to use this method since setting the attributes directly will automatically -invoke this method. - - - - - - gtk.Adjustment.value_changed - - - value_changed - - - The value_changed() method emits a -"value_changed" signal from the adjustment. This must typically be called -after the value attribute of the adjustment has changed. Applications -usually will not need to use this method since setting the attribute -directly will automatically invoke this method as will using the set_value() -method. - - - - - - gtk.Adjustment.clamp_page - - - clamp_page - lower - upper - - - - - lower : - the lower value - - - upper : - the upper value - - - - The clamp_page() method updates the -adjustment 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. - - - - - - gtk.Adjustment.get_value - - - get_value - - - - - Returns : - The current value of the -adjustment. - - - - The get_value() method gets the current -value of the adjustment. - - - - - - gtk.Adjustment.set_value - - - set_value - value - - - - - value : - the new value - - - - The set_value() method sets the value -of the adjustment to the specified value. - - - - - - - - Signals - - - The "changed" gtk.Adjustment Signal - - - callback - adjustment - user_param1 - ... - - - - - adjustment : - the object that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "changed" signal is emitted when one (or more) of the -adjustment attributes (except the value attribute) has changed. - - - - - The "value-changed" gtk.Adjustment Signal - - - callback - adjustment - user_param1 - ... - - - - - adjustment : - the object that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "value-changed" signal is emitted when the adjustment value -attribute has changed. - - - - -
diff --git a/docs/reference/pygtk-gtkalignment.xml b/docs/reference/pygtk-gtkalignment.xml deleted file mode 100644 index 9fb07ab0..00000000 --- a/docs/reference/pygtk-gtkalignment.xml +++ /dev/null @@ -1,402 +0,0 @@ - - - - - - gtk.Alignment - a widget that controls the alignment and size of its -child - - - - Synopsis - - - gtk.Alignment - gtk.Bin - - gtk.Alignment - xalign0.0 - yalign0.0 - xscale0.0 - yscale0.0 - - - set - xalign - yalign - xscale - yscale - - - set_padding - padding_top - padding_bottom - padding_left - padding_right - - - get_padding - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Alignment - - - - - - gtk.Alignment Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - - -
- - - - - - - - - "bottom-padding" Read/Write - The padding to insert at the bottom of the widget. GTK+ 2.4 - and above. - - - - "left-padding" - Read/Write - The padding to insert at the left of the widget. GTK+ 2.4 - and above. - - - - "right-padding" - Read/Write - The padding to insert at the right of the widget. GTK+ 2.4 - and above. - - - - "top-padding" - Read/Write - The padding to insert at the top of the widget. GTK+ 2.4 - and above. - - - - "xalign" - Read/Write - The fraction of horizontal free space - to the left of the child. 0.0 means no free - space to the left, 1.0 means all free space - to the left. - - - - "xscale" - Read/Write - The fraction of horizontal free space -(beyond that needed by the child) that the child will absorb. 0.0 means the -child will absorb none, 1.0 means the child will absorb all - - - - "yalign" - Read/Write - The fraction of vertical free space - above the child. 0.0 means no free space - above, 1.0 means all free space - above. - - - - "yscale" - Read/Write - The fraction of vertical free space -(beyond that needed by the child) that the child will absorb. 0.0 means the -child will absorb none, 1.0 means the child will absorb all - - - - - -
- -
- - - gtk.Alignment Style Properties - - gtk.Widget Style Properties - - - - - - gtk.Alignment Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - Description - - The gtk.Alignment -widget controls the alignment and size of its child widget. It has four -properties: xscale, yscale, xalign, and yalign. The scale properties are -used to specify how much of the free (extra) space -allocated to the gtk.Alignment -should be absorbed by the child widget. The values can range from 0.0 -(meaning the child absorbs none) to 1.0 (meaning the child absorbs all of -the free space). If the value is 0.5, the child widget -absorbs half the free space. The align properties are -used to place the child widget within the available area by specifying the -fraction of free space that will be placed above or to -the left of the child widget. The values range from 0.0 (no -free space above or to the left of the child) to 1.0 -(all free space above or to the left of the child). Of -course, if the scale properties are both set to 1.0, the alignment -properties have no effect. - - An example may make this clearer. A gtk.Button widget (32 -pixels wide by 32 pixels high) is placed inside a gtk.Alignment -widget (256 pixels wide by 128 pixels high) which has xalign of 0.25, yalign -of 0.25, xscale of 0.25 and yscale of 0.25. The horizontal -free space is 256-32=224 pixels and the vertical -free space is 128-32=96 pixels. The button will absorb -0.25x224=56 pixels horizontally and 0.25x96=24 pixels vertically since the -xscale and yscale are 0.25 thus becoming 32+56=88 pixels wide by 32+24=56 -pixels high. This will leave 256-88=168 pixels of horizontal -free space and 128-56=72 pixels of vertical -free space. Since the xalign value is 0.25 the -horizontal free space will be allocated as 0.25x168=42 -pixels to the left of the button and 0.72x168=126 pixels to the right. -Likewise since the yalign is 0.25 the vertical free -space is allocated as 0.25x72=18 pixels above the button and 0.75*72=54 -pixels below. - - - - - Constructor - - - gtk.Alignment - xalign0.0 - yalign0.0 - xscale0.0 - yscale0.0 - - - - xalign : - the fraction of horizontal -free space to the left of the child widget. Ranges from -0.0 to 1.0 - - - yalign : - the fraction of vertical -free space above the child widget. Ranges from 0.0 to -1.0 - - - xscale : - the fraction of horizontal -free space that the child widget absorbs, from 0.0 to -1.0 - - - yscale : - the fraction of vertical -free space that the child widget absorbs, from 0.0 to -1.0 - - - Returns : - a new alignment object - - - - Creates a new alignment widget with the specified properties. If -the scale and alignment parameters are not specified they default to -0.0. - - - - - Methods - - - gtk.Alignment.set - - - set - xalign - yalign - xscale - yscale - - - - xalign : - the fraction of horizontal -free space to the left of the child widget. Ranges from -0.0 to 1.0 - - - yalign : - the fraction of vertical -free space above the child widget. Ranges from 0.0 to -1.0 - - - xscale : - the fraction of horizontal -free space that the child widget absorbs, from 0.0 to -1.0 - - - yscale : - the fraction of vertical -free space that the child widget absorbs, from 0.0 to -1.0 - - - - The set() method sets the properties of -the alignment widget to the specified values. - - - - - gtk.Alignment.set_padding - - - set_padding - padding_top - padding_bottom - padding_left - padding_right - - - - padding_top : - the padding at the top of the - widget - - - padding_bottom : - the padding at the bottom of the - widget - - - padding_left : - the padding at the left of the - widget - - - padding_right : - the padding at the right of the - widget. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_padding() method sets the -padding around the sides of the alignment widget to the values specified by -padding_top, padding_bottom, -padding_left and -padding_right. The padding adds blank space to the -sides of the widget. For instance, this can be used to indent the child -widget toward the right by adding padding on the left. - - - - - gtk.Alignment.get_padding - - - get_padding - - - - - Returns : - a 4-tuple containing the padding set on the - top, bottom, left and right sides of the - widget - - - - - This method is available in PyGTK 2.4 and above. - - - The get_padding() method returns a - 4-tuple containing the padding set on the sides of the widget. - - - - - -
diff --git a/docs/reference/pygtk-gtkarrow.xml b/docs/reference/pygtk-gtkarrow.xml deleted file mode 100644 index e992151d..00000000 --- a/docs/reference/pygtk-gtkarrow.xml +++ /dev/null @@ -1,200 +0,0 @@ - - - - - - gtk.Arrow - produces an arrow pointing in one of the four cardinal -directions. - - - - Synopsis - - - gtk.Arrow - gtk.Misc - - gtk.Arrow - arrow_type - shadow_type - - - set - arrow_type - shadow_type - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Misc - +-- gtk.Arrow - - - - - - gtk.Arrow Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Misc Properties - -
- - - - - - - - - "arrow-type" - Read/Write - The direction the arrow should point (gtk.ARROW_UP, -gtk.ARROW_DOWN, gtk.ARROW_LEFT, or gtk.ARROW_RIGHT) - - - - "shadow-type" - Read/Write - Appearance of the shadow surrounding the arrow - (gtk.SHADOW IN, gtk.SHADOW OUT, gtk.ETCHED IN, or - gtk.ETCHED OUT) - - - - - -
- -
- - - gtk.Arrow Style Properties - - gtk.Widget Style Properties - - - - - - gtk.Arrow Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - - - - Description - - The gtk.Arrow is used to -draw simple arrows that point in one of the four cardinal directions -(gtk.ARROW_UP, gtk.ARROW_DOWN, gtk.ARROW_LEFT, or gtk.ARROW_RIGHT). The -shadow style of the arrow can be one of gtk.SHADOW IN, gtk.SHADOW OUT, -gtk.ETCHED IN, or gtk.ETCHED OUT. - - A gtk.Arrow will fill -any space alloted to it, but since it is inherited from gtk.Misc, it can be -padded and/or aligned, to fill exactly the space desired. - - Arrows are created with a call to gtk.Arrow(). -The direction or style of an arrow can be changed after creation by using -arrow_set(). - - - - - Constructor - - - gtk.Arrow - arrow_type - shadow_type - - - - arrow_type : - one of the - - - shadow_type : - one -of the - - - Returns : - a gtk.Arrow - widget - - - - Creates a new arrow widget with the specified -arrow_type and -arrow_shadow. - - - - - Methods - - - gtk.Arrow.set - - - set - arrow_type - shadow_type - - - - arrow_type : - a GtkArrowType - - - shadow_type : - one of the - - - - The set() method sets the -arrow_type and shadow_type of -the arrow widget. - - - - - -
diff --git a/docs/reference/pygtk-gtkaspectframe.xml b/docs/reference/pygtk-gtkaspectframe.xml deleted file mode 100644 index d5975a0a..00000000 --- a/docs/reference/pygtk-gtkaspectframe.xml +++ /dev/null @@ -1,293 +0,0 @@ - - - - - - gtk.AspectFrame - A frame that constrains its child to a particular aspect -ratio. - - - - Synopsis - - - gtk.AspectFrame - gtk.Frame - - gtk.AspectFrame - labelNone - xalign0.5 - yalign0.5 - ratio1.0 - obey_childTrue - - - set - xalign0.0 - yalign0.0 - ratio1.0 - obey_childTrue - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Frame - +-- gtk.AspectFrame - - - - - - gtk.AspectFrame Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Frame Properties -
- - - - - - - - - "obey-child" - Read/Write - Make aspect ratio match that of the child widget - - - - "xalign" - Read/Write - The fraction of horizontal free space - to the left of the child. 0.0 means no free - space to the left, 1.0 means all free space - to the left. - - - - "ratio" - Read/Write - The aspect ratio of the widget in the range of 0.0001 to - 10000.0 if "obey-child" is False. - - - - "yalign" - Read/Write - The fraction of vertical free space - above the child. 0.0 means no free space - above, 1.0 means all free space - above. - - - - - -
- -
- - - gtk.AspectFrame Style Properties - - gtk.Widget Style Properties - - - - - - gtk.AspectFrame Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - Description - - The gtk.AspectFrame -packs 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. -gtk.AspectFrame -derives from gtk.Frame, so it can -draw a label and a frame around the child. The frame will be -"shrink-wrapped" to the size of the child. - - The aspect frame "ratio" property determines the widget -width:height ratio. An aspect ratio of 0.5 means the width is one half the -height; an aspect ratio of 2.0 means the width is twice the height. The -default value for the "ratio" property is 1.0. - - The align properties are used to place the child widget within the -available area by specifying the fraction of free space -(space in the aspect frame that is not used by the child widget) that is -placed above or to the left of the child widget. The values range from 0.0 -(meaning no free space above or to the left of the -child) to 1.0 (meaning all free space above or to the -left of the child) . The default value for both align properties is -0.5. - - If the "obey-child" property is True (the default value), the -"ratio" property is ignored and the aspect ratio is set by the child -widget. - - - - - Constructor - - - gtk.AspectFrame - labelNone - xalign0.5 - yalign0.5 - ratio1.0 - obey_childTrue - - - - - label : - a string used to set the aspect frame -label - - - xalign : - The fraction of horizontal -free space to the left of the child. 0.0 means no -free space to the left, 1.0 means all -free space to the left. - - - yalign : - The fraction of vertical -free space above the child. 0.0 means no -free space above, 1.0 means all -free space above. - - - ratio : - the ratio of the child width to height (in the -range 0.0001 to 10000.0) if obey_child is -False - - - obey_child : - if True, ratio is ignored, -and the aspect ratio is taken from the requisition of the -child. - - - Returns : - a new aspect frame object - - - - Creates a new aspect frame object with the specified -label, xalign and -yalign values. The default values are: -label, None; xalign, 0.5; and, -yalign, 0.5. If obey_child is -True the ratio value is ignored. If -obey_child is False, ratio -sets the aspect ratio for the child widget. The default value for -ratio is 1.0. The default value for -obey_child is True. - - - - - Methods - - - gtk.AspectFrame.set - - - set - xalign0.0 - yalign0.0 - ratio1.0 - obey_childTrue - - - - xalign : - The fraction of horizontal -free space to the left of the child. 0.0 means no -free space to the left, 1.0 means all -free space to the left. - - - yalign : - The fraction of vertical -free space above the child. 0.0 means no -free space above, 1.0 means all -free space above. - - - ratio : - the ratio of the child width to height (in the -range 0.0001 to 10000.0) if obey_child is -False - - - obey_child : - if True, ratio is -ignored, and the aspect ratio is taken from the requisition of the -child - - - - The set() method changes the aspect -frame properties to the values specified by xalign, -yalign, ratio and -obey_child. The default values are: -xalign, 0; yalign, 0.0; -ratio, 1.0; and, obey_child, -True. - - - - - -
diff --git a/docs/reference/pygtk-gtkassistant.xml b/docs/reference/pygtk-gtkassistant.xml deleted file mode 100644 index 00d30a8d..00000000 --- a/docs/reference/pygtk-gtkassistant.xml +++ /dev/null @@ -1,1179 +0,0 @@ - - - - - - gtk.Assistant - a widget used to guide users through multi-step operations - (new in PyGTK 2.10) - - - - Synopsis - - - gtk.Assistant - gtk.Window - - gtk.Assistant - - - - get_current_page - - - - set_current_page - page_num - - - get_n_pages - - - - get_nth_page - page_num - - - prepend_page - page - - - append_page - page - - - insert_page - page - position - - - set_forward_page_func - page_func - data - - - set_page_type - page - type - - - get_page_type - page - - - set_page_title - page - title - - - get_page_title - page - - - set_page_header_image - page - pixbufNone - - - get_page_header_image - page - - - set_page_side_image - page - pixbufNone - - - get_page_side_image - page - - - set_page_complete - page - complete - - - get_page_complete - page - - - add_action_widget - child - - - remove_action_widget - child - - - update_buttons_state - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Window - +-- gtk.Assistant - - - - - - gtk.Assistant Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Window Properties - - - - - gtk.Assistant Style Properties - - gtk.Widget Style Properties - -
- - - - - - - - - "content-padding" - Read - Number of pixels around the content pages. Allowed - values: >= 0. Default value: 1. This property is available in - GTK+ 2.10 and above. - - - - "header-padding" - Read - Number of pixels around the header. Allowed values: >= - 0 Default value: 6. This property is available in GTK+ 2.10 - and above. - - - - - -
- -
- - - gtk.Assistant Child Properties - -
- - - - - - - - - "complete" - Read-Write - If True, marks a page as complete - (i.e.: all the required fields are filled out). GTK+ uses this - information to control the sensitivity of the navigation - buttons. Default value: False. This property - is available in GTK+ 2.10 and above. - - - - "header-image" - Read-Write - The gtk.gdk.Pixbuf - image that is displayed in the page header. This property is - available in GTK+ 2.10 and above. - - - - "page-type" - Read-Write - The type of the assistant page - one of the . - Default value: - gtk.ASSISTANT_PAGE_CONTENT. This property - is available in GTK+ 2.10 and above. - - - - "sidebar-image" - Read-Write - The gtk.gdk.Pixbuf - image displayed in the sidebar for the assistant page. Set - this to None to make the sidebar - disappear. This property is available in GTK+ 2.10 and - above. - - - - "title" - Read-Write - The title that is displayed in the page header. If - "title" and "header-image" are both None, - no header is displayed. Default value: - None. This property is available in GTK+ - 2.10 and above. - - - - - -
- -
- - - gtk.Assistant Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Window Signal Prototypes - - - - "apply" - - callback - widget - user_param1 - ... - - - - - "cancel" - - callback - widget - user_param1 - ... - - - - - "close" - - callback - widget - user_param1 - ... - - - - - "prepare" - - callback - widget - page - user_param1 - ... - - - - - - - - - Description - - A gtk.Assistant - is a widget used to guide the user through a complex operation by - breaking it into several steps. Each step is generally handled by one - assistant page. The assistant controls the page flow to collect the - necessary data to complete the application task. - - - - - Constructor - - - gtk.Assistant - - - gtk.Assistant - - - - Returns : - a new gtk.Assistant - object. - - - - - This constructor is available in PyGTK 2.10 and above. - - - Creates a new gtk.Assistant. - - - - - - - Methods - - - gtk.Assistant.get_current_page - - - get_current_page - - - - Returns : -  : - The index (starting from 0) of the current page - in the assistant, if the assistant has no pages, -1 will be - returned. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_current_page() method returns - the page number of the current page. - - - - - gtk.Assistant.set_current_page - - - set_current_page - page_num - - - - page_num : - the index of the page to switch to, starting - from 0. If negative, the last page will be used. If greater than - the number of pages in the assistant, there will be no - change. - - - - - This method is available in PyGTK 2.10 and above. - - - The set_current_page() method switches - the page to the page specified by - page_num. Note that this will only be necessary - in custom buttons, as the assistant flow can be set with the set_forward_page_func() - method. - - - - - gtk.Assistant.get_n_pages - - - get_n_pages - - - - - - Returns : - The number of pages in the assistant. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_n_pages() method returns the - number of pages in the assistant - - - - - gtk.Assistant.get_nth_page - - - get_nth_page - page_num - - - - - page_num : - The index of a page in the assistant, or -1 to - get the last page; - - - Returns : - The child widget, or None if - page_num is out of - bounds. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_nth_page() method returns the - child widget contained in the page specified by - page_num. - - - - - gtk.Assistant.prepend_page - - - prepend_page - page - - - - - page : - a gtk.Widget - - - Returns : - the index (starting at 0) of the inserted - page - - - - - This method is available in PyGTK 2.10 and above. - - - The prepend_page() method prepends the - page specified by page to the assistant. - - - - - gtk.Assistant.append_page - - - append_page - page - - - - - page : - a gtk.Widget - - - Returns : - the index (starting at 0) of the inserted - page - - - - - This method is available in PyGTK 2.10 and above. - - - The append_page() method appends the - page specified by page to the assistant. - - - - - gtk.Assistant.insert_page - - - insert_page - page - position - - - - - page : - a gtk.Widget - - - position : - the index (starting at 0) at which to insert the - page, or -1 to append the page to the assistant - - - Returns : - the index (starting from 0) of the inserted - page - - - - - This method is available in PyGTK 2.10 and above. - - - The insert_page() method inserts the - page specified by page in the assistant at the - position index specified by position. - - - - - gtk.Assistant.set_forward_page_func - - - set_forward_page_func - page_func - data - - - - - page_func : - the function, or None to use - the default function. - - - data : - user data for - page_func - - - - - This method is available in PyGTK 2.10 and above. - - - The set_forward_page_func() method sets - the page forwarding function to be - page_func. This function will be used to - determine what will be the next page when the user presses the forward - button. Setting page_func to - None will make the assistant use the default - forward function, which just goes to the next visible page. - - The signature of page_func is: - - - def page_func(current_page, user_data): - - - where current_page is the index of the - current page and user_data is - data. - - - - - gtk.Assistant.set_page_type - - - set_page_type - page - type - - - - - page : - a page in the assistant - - - type : - the new type for - page - - - - - This method is available in PyGTK 2.10 and above. - - - The set_page_type() method sets the - page type, which specifies the page behavior, for the page specified - by page to the value specified by - type. The page type must be one of the . - - - - - gtk.Assistant.get_page_type - - - get_page_type - page - - - - - page : - a page in the assistant - - - Returns : - the page type of - page. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_page_type() method returns the - page type of the page specified by page. The - page type will be one of the . - - - - - gtk.Assistant.set_page_title - - - set_page_title - page - title - - - - - page : - a page of the assistant - - - title : - the new title for - page - - - - - This method is available in PyGTK 2.10 and above. - - - The set_page_title() method sets the - title for the page specified by page to the - string specified by title. The title is - displayed in the header area of the assistant when - page is the current page. - - - - - gtk.Assistant.get_page_title - - - get_page_title - page - - - - - page : - a page of the assistant - - - Returns : - the title for - page. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_page_title() method returns the - title for the page specified by page. - - - - - gtk.Assistant.set_page_header_image - - - set_page_header_image - page - pixbufNone - - - - - page : - a page of the assistant - - - pixbuf : - the new header image for - page or - None. - - - - - This method is available in PyGTK 2.10 and above. - - - The set_page_header_image() method sets - the gtk.gdk.Pixbuf - specified by pixbuf as the header image for the - page specified by page. This image is displayed - in the header area of the assistant when page - is the current page. If pixbuf is - None the header image will be removed. - - - - - gtk.Assistant.get_page_header_image - - - get_page_header_image - page - - - - - page : - a page of the assistant - - - Returns : - the header image for page, - or None if there's no header image for the - page. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_page_header_image() method - returns the header image for the page specified by - page. - - - - - gtk.Assistant.set_page_side_image - - - set_page_side_image - page - pixbufNone - - - - - page : - a page of the assistant - - - pixbuf : - the new side image for - page or - None. - - - - - This method is available in PyGTK 2.10 and above. - - - The set_page_side_image() method sets - the gtk.gdk.Pixbuf - specified by pixbuf as the header image for the - page specified by page. This image is displayed - in the side area of the assistant when page is - the current page. If pixbuf is - None the side image will be removed. - - - - - gtk.Assistant.get_page_side_image - - - get_page_side_image - page - - - - - page : - a page of the assistant - - - Returns : - the side image for page, - or None if there's no side image for the - page. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_page_side_image() method - returns the header image for the page specified by - page. - - - - - gtk.Assistant.set_page_complete - - - set_page_complete - page - complete - - - - - page : - a page of the assistant - - - complete : - if True the page status is - complete. - - - - - This method is available in PyGTK 2.10 and above. - - - The set_page_complete() method sets the - "complete" property of the page specified by - page to the value specified by - complete. If complete is - True the page contents are - complete. This will make the assistant update the state of its - buttons. - - - - - gtk.Assistant.get_page_complete - - - get_page_complete - page - - - - - page : - a page of the assistant - - - Returns : - True if - page is complete. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_page_complete() method returns - the value of the "complete" property of the page specified by - page. If the return value is - True, the page contents are - complete. - - - - - gtk.Assistant.add_action_widget - - - add_action_widget - child - - - - - child : - a gtk.Widget - - - - - This method is available in PyGTK 2.10 and above. - - - The add_action_widget() method adds the - widget specified by child to the action area of - the assistant. - - - - - gtk.Assistant.remove_action_widget - - - remove_action_widget - child - - - - - child : - a gtk.Widget - - - - - This method is available in PyGTK 2.10 and above. - - - The remove_action_widget() method - removes the widget specified by child from the - action area of the assistant. - - - - - gtk.Assistant.update_buttons_state - - - update_buttons_state - - - - - This method is available in PyGTK 2.10 and above. - - - The update_buttons_state() method - forces the assistant to recompute the state of its buttons. - - PyGTK automatically takes care of this in most situations, - e.g. when the user goes to a different page, or when the visibility or - completeness of a page changes. - - One situation where it can be necessary to call this function is - when changing a value on the current page affects the future page flow - of the assistant. - - - - - - - Signals - - - The "apply" Signal - - - callback - assistant - user_param1 - ... - - - - - assistant : - the gtk.Assistant - that received the signal - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if - any) - - - - The "apply" signal is emitted when the apply button is - clicked. The default behavior of the gtk.Assistant - is to switch to the page after the current page, unless the current - page is the last one. - - A handler for the "apply" signal should carry out the actions - for which the wizard has collected data. If the action takes a long - time to complete, you might consider to put a page of type - gtk.ASSISTANT_PAGE_PROGRESS after the confirmation - page and handle this operation within the "prepare" signal of the - progress page. - - - - - The "cancel" Signal - - - callback - assistant - user_param1 - ... - - - - - assistant : - the gtk.Assistant - that received the signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "cancel" signal is emitted when the cancel button is - clicked. - - - - - The "close" Signal - - - callback - assistant - user_param1 - ... - - - - - assistant : - the gtk.Assistant - that received the signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "close" signal is emitted either when the close button of a - summary page is clicked, or when the apply button in the last page in - the flow (of type gtk.ASSISTANT_PAGE_CONFIRM) is - clicked. - - - - - The "prepare" Signal - - - callback - assistant - page - user_param1 - ... - - - - - assistant : - the gtk.Assistant - that received the signal - - - page : - the new page to prepare for - display - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "prepare" signal is emitted when a new page is set as the - assistant's current page, but before making the new page visible. A - handler for this signal can do any preparation that are necessary - before showing page. - - - - - -
diff --git a/docs/reference/pygtk-gtkbin.xml b/docs/reference/pygtk-gtkbin.xml deleted file mode 100644 index 9de8dd51..00000000 --- a/docs/reference/pygtk-gtkbin.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - gtk.Bin - an abstract base class defining a container with just one -child. - - - - Synopsis - - - gtk.Bin - gtk.Container - - get_child - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - - - - - - gtk.Bin Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - - - - - - gtk.Bin Style Properties - - gtk.Widget Style Properties - - - - - - gtk.Bin Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - Attributes - -
- - - - - - - - - "child" - Read - The child widget or None if there -is no child. - - - - - -
- -
- - - Description - - gtk.Bin -is an abstract base class defining a widget that is a container with just -one child. It is useful for deriving subclasses, since it provides the -common code needed for handling a single child widget. Many PyGTK widgets -are subclasses of gtk.Bin, including -gtk.Window, -gtk.Button, -gtk.Frame, -gtk.HandleBox, -and gtk.ScrolledWindow. - - - - - Methods - - - gtk.Bin.get_child - - - get_child - - - - Returns : - a reference to the child -widget - - - - The get_child() method returns a -reference to the child of the bin, or None if the bin -contains no child widget. - - - - - -
diff --git a/docs/reference/pygtk-gtkborder.xml b/docs/reference/pygtk-gtkborder.xml deleted file mode 100644 index 59294189..00000000 --- a/docs/reference/pygtk-gtkborder.xml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - gtk.Border - an object containing data for a border (new in PyGTK 2.4) - - - - Synopsis - - - gtk.Border - gobject.GBoxed - - copy - - - - free - - - - - - - - Description - - - This object is available in PyGTK 2.4 and above. - - - A gtk.Border object -contains the integer values for the left, right, top and bottom values of a -border. gtk.Border is used -in gtk.Style -specifications. gtk.Border has two -methods: copy() and -free(). - - - - - Methods - - - gtk.Border.copy - - - copy - - - - - Returns : - a copy of the border. - - - - - This method is available in PyGTK 2.4 and above. - - - The copy() method returns a copy of the -border object. - - - - - gtk.Border.free - - - free - - - - This method is available in PyGTK 2.4 and above. - - - - This method is deprecated and should not be used since it can - crash your application. - - - The free() method frees the memory used - by the border. - - - - - - diff --git a/docs/reference/pygtk-gtkbox.xml b/docs/reference/pygtk-gtkbox.xml deleted file mode 100644 index a1b4f601..00000000 --- a/docs/reference/pygtk-gtkbox.xml +++ /dev/null @@ -1,706 +0,0 @@ - - - - - - gtk.Box - an abstract base class for box containers - - - - Synopsis - - - gtk.Box - gtk.Container - - pack_start - child - expandTrue - fillTrue - padding0 - - - pack_end - child - expandTrue - fillTrue - padding0 - - - pack_start_defaults - widget - - - pack_end_defaults - widget - - - set_homogeneous - homogeneous - - - get_homogeneous - - - set_spacing - spacing - - - get_spacing - - - reorder_child - child - position - - - query_child_packing - child - - - set_child_packing - child - expand - fill - padding - pack_type - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Box - - - - - - gtk.Box Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - -
- - - - - - - - - "spacing" - Read/Write - The amount of space between children. - - - - "homogeneous" - Read/Write - If True the children should all be the same size. - - - - "spacing" - Read/Write - The amount of space between children. - - - - - -
- -
- - - gtk.Box Style Properties - - gtk.Widget Style Properties - - - - - - gtk.Box Child Properties - -
- - - - - - - - - "expand" - Read/Write - If True the child should receive - extra space when the parent grows - - - - "fill" - Read/Write - If True extra space given to the - child should be allocated to the child; if - False extra space given to the child should - be used as padding - - - - "padding" - Read/Write - The amount of extra space to put between the child and - its neighbors, in pixels - - - - "pack-type" - Read/Write - Indicates whether the child is packed with reference to - the start (gtk.PACK_START) or end - (gtk.PACK_END) of the parent - - - - "position" - Read/Write - The index of the child in the parent - - - - - -
- -
- - - gtk.Box Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - Description - - The gtk.Box class is an -abstract base class defining a widget that encapsulates functionality for a -particular kind of container, one that organizes a variable number of -widgets into a rectangular area. gtk.Box currently has -two derived classes, gtk.HBox and gtk.VBox. - - The rectangular area of a gtk.Box is organized -into either a single row or a single column of child widgets depending upon -whether the box is of type gtk.HBox or gtk.VBox, -respectively. Thus, all children of a gtk.Box are allocated -one dimension in common, which is the height of a row, or the width of a -column. - - gtk.Box -uses a notion of packing. Packing refers to adding widgets with reference to -a particular position in a gtk.Container. For a -gtk.Box, there -are two reference positions: the start and the end of the box. For a gtk.VBox, the start is -defined as the top of the box and the end is defined as the bottom. For a -gtk.HBox the -start is defined as the left side and the end is defined as the right -side. - - Repeated calls to pack_start() -pack widgets into a gtk.Box from start to -end. The pack_end() -method adds widgets from end to start. You may intersperse these calls and -add widgets from both ends of the same gtk.Box. - - Because gtk.Box is a gtk.Container, -you may also use add() to -insert widgets into the box, and they will be packed as if with the pack_start() -method. Use remove() -to remove widgets from the gtk.Box. - - The set_homogeneous() -method specifies whether or not all children of the gtk.Box are forced to -get the same amount of space. - - The set_spacing() -method determines how much space will be minimally placed between all -children in the gtk.Box. - - The reorder_child() -method moves a gtk.Box child to a -different place in the box. - - The set_child_packing() -method resets the expand, fill, and padding attributes of any gtk.Box child. Use the -query_child_packing() -to query these properties. - - - - - Methods - - - gtk.Box.pack_start - - - pack_start - child - expandTrue - fillTrue - padding0 - - - - child : - the widget to be added to the -box - - - expand : - True if 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 gtk.HBox and the full -width of a gtk.VBox. This option -affects the other dimension. - - - padding : - extra space in pixels to put between -child and its neighbors, over and above the global -amount specified by spacing in gtk.Box. 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. - - - - The pack_start() method adds -child to the 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. - - - - - gtk.Box.pack_end - - - pack_end - child - expandTrue - fillTrue - padding0 - - - - child : - the widget to be added to the -box - - - expand : - True if 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 gtk.HBox and the full -width of a gtk.VBox. This option -affects the other dimension. - - - padding : - extra space in pixels to put between -child and its neighbors, over and above the global -amount specified by spacing in gtk.Box. 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. - - - - The pack_end() method adds -child to the box, packed with reference to the end of -the box. The child is packed after (away from end of) -any other child packed with reference to the end of the box. - - - - - gtk.Box.pack_start_defaults - - - pack_start_defaults - widget - - - - widget : - the widget to be added to the -box - - - - - This method is deprecated in PyGTK 2.4 and above. - - - The pack_start_defaults() method adds -widget to the box, packed with reference to the start -of the box. The widget is packed after any other -child widget packed with reference to the start of box. The parameters for -packing the child widget: expand, fill, and padding are given their default -values, True, True, and 0, respectively. - - - - - gtk.Box.pack_end_defaults - - - pack_end_defaults - widget - - - - widget : - the widget to be added to the -box - - - - - This method is deprecated in PyGTK 2.4 and above. - - - The pack_end_defaults() method adds -widget to the box, packed with reference to the end -of the box. The widget is packed after (away from the -end of) any other child widget packed with reference to the end of the box. -The parameters for packing the child widget: expand, fill, and padding are -given their default values, True, True, and 0, respectively. - - - - - gtk.Box.set_homogeneous - - - set_homogeneous - homogeneous - - - - homogeneous : - If True the box is -homogeneous i.e. all children are allocated the same space otherwise the -allocations vary for each child. - - - - The set_homogeneous() method sets the -homogeneous (all children are allocated the same space) property of the -box. - - - - - gtk.Box.get_homogeneous - - - get_homogeneous - - - - Returns : - True if the box is -homogeneous. - - - The get_homogeneous() method returns -whether the box is homogeneous (all children are allocated the same space). -See gtk.Box.set_homogeneous(). - - - - - gtk.Box.set_spacing - - - set_spacing - spacing - - - - spacing : - the number of pixels to put between -children. - - - - The set_spacing() method sets the -number of pixels to place between children of the box. - - - - - gtk.Box.get_spacing - - - get_spacing - - - - Returns : - the spacing in pixels between -children - - - - The get_spacing() method returns the -number of pixels used as padding between children as set by the set_spacing(). - - - - - gtk.Box.reorder_child - - - reorder_child - child - position - - - - child : - the child widget to move - - - position : - the new position for child in the children list -of the box starting from 0. If negative, indicates the end of the -list. - - - - Moves child to a new position in the list of the box children. -The list 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. - - - - - gtk.Box.query_child_packing - - - query_child_packing - child - - - - child : - the child widget to be queried for its packing -information - - - expand : - the child's expand value - - - fill : - the child's fill value - - - padding : - the child's padding value - - - pack_type : - the child's pack_type -value - - - - The query_child_packing() method -returns a tuple containing information about how child -is packed into the box. The tuple members are: (expand, fill, padding, -pack_type) where: expand and fill are 0 or 1 (corresponding to False or -True); padding is the number of pixels of padding; and pack_type is -gtk.PACK_START or gtk.PACK_END. - - - - - gtk.Box.set_child_packing - - - set_child_packing - child - expand - fill - padding - pack_type - - - - child : - the child widget to be queried for its packing -information - - - expand : - the child's new expand -value - - - fill : - the child's new fill value - - - padding : - the child's new padding -value - - - pack_type : - the child's new pack_type -value - - - - - The set_child_packing() method sets the -way child is packed into the box. - - - -
diff --git a/docs/reference/pygtk-gtkbutton.xml b/docs/reference/pygtk-gtkbutton.xml deleted file mode 100644 index 7f15fdef..00000000 --- a/docs/reference/pygtk-gtkbutton.xml +++ /dev/null @@ -1,1207 +0,0 @@ - - - - - - gtk.Button - A pushbutton widget that issues a signal when -clicked. - - - - Synopsis - - - gtk.Button - gtk.Bin - - gtk.Button - labelNone - stockNone - use_underlineTrue - - - pressed - - - released - - - clicked - - - enter - - - leave - - - set_relief - newstyle - - - get_relief - - - set_label - label - - - get_label - - - set_use_underline - use_underline - - - get_use_underline - - - set_use_stock - use_stock - - - get_use_stock - - - set_focus_on_click - focus_on_click - - - get_focus_on_click - - - set_alignment - xalign - yalign - - - get_alignment - - - - set_image - image - - - get_image - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Button - - - - - - gtk.Button Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - -
- - - - - - - - - "focus-on-click" - Read/Write - If True the button grabs focus when - it is clicked with the mouse. Default value: -True. This property is available in GTK+ 2.4 and -above. - - - - "image" - Read/Write - The child widget to appear next to the button text. Default -value: None. -This property is available in GTK+ 2.6 and above. - - - - "image-position" - Read/Write - The position of the image relative to the text inside the - button. One of the . Default - value: gtk.POS_LEFT. This property is - available in GTK+ 2.10 and above. - - - - "label" - Read/Write - Text of the label widget inside the button, if the button -contains a label widget. Default value: None. - - - - "relief" - Read/Write - The border relief style. One of: -gtk.RELIEF_NORMAL, gtk.RELIEF_HALF or -gtk.RELIEF_NONE. Default value: -gtk.RELIEF_NORMAL. - - - - "use-stock" - Read/Write - If True, the label text is used to pick -a stock item instead of being displayed. -Default value: False. - - - - "use-underline" - Read/Write - If True, an underscore in the text -indicates the next character should be underlined and used for the mnemonic -accelerator key if it is the first character so marked. -Default value: False. - - - - "xalign" - Read/Write - If the - child of the button is a gtk.Misc or - gtk.Alignment, - this property can be used to control it's horizontal - alignment. The value ranges from 0.0 to 1.0 representing the fraction - of freespace to the left of the widget. Default value: 0.5. -This property is available in GTK+ 2.4 and above. - - - - "yalign" - Read/Write - If the - child of the button is a gtk.Misc or - gtk.Alignment, - this property can be used to control it's vertical - alignment. The value ranges from 0.0 to 1.0 representing the fraction -of freespace above the widget. Default value: 0.5. -This property is available in GTK+ 2.4 and above. - - - - - -
- -
- - - gtk.Button Style Properties - - gtk.Widget Style Properties - -
- - - - - - - - - "child-displacement-x" - Read - The number of pixels in the x direction to move the child -when the button is depressed. Default value: 0 - - - - "child-displacement-y" - Read - The number of pixels in the y direction to move the child -when the button is depressed. Default value: 0 - - - - "default-border" - Read - The extra space to add for - gtk.CAN_DEFAULT buttons as a gtk.Border - - - - "default-outside-border" - Read - The extra space to add for - gtk.CAN_DEFAULT buttons always drawn outside - the border as a gtk.Border - - - - "displace-focus" - Read - If True the "child-displacement-x" and - "child-displacement-y" properties should also affect the focus - rectangle. Default value: False. This property - is available in GTK+ 2.6 and above. - - - - "inner-border" - Read - The border between the button edges and child as a gtk.Border. - This property is available in GTK+ 2.10 and above. - - - - - -
- -
- - - gtk.Button Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - "activate" - - callback - button - - user_param1 - - ... - - - - - - "clicked" - - callback - button - - user_param1 - - ... - - - - - - "enter" - - callback - button - - user_param1 - - ... - - - - - - "leave" - - callback - button - - user_param1 - - ... - - - - - - "pressed" - - callback - button - - user_param1 - - ... - - - - - - "released" - - callback - button - - user_param1 - - ... - - - - - - - - - - Description - - The gtk.Button widget is -usually displayed as a pushbutton with a text label (gtk.Label) though it -can contain any valid widget. The gtk.Button is -generally used to attach a callback function or method that is called when -the button is clicked. Buttons generate signals that indicate: - - - - "clicked" - the user pressed and released a mouse button -over the button - - - "pressed" - the user pressed a mouse button over the -button - - - "released" - the user released a mouse button over the -button - - - "enter" - the pointer entered the button - - - "leave" - the pointer left the button - - - - The "clicked" signal is usually the only signal that an -application needs to handle. - - If a label is being used by the button its text (the "label" -property) is retrieved using the get_label() -method. The label text is changed using the set_label() -method. - - The property ("use_underline") that tells a button to use the -first underscore to indicate a mnemonic key is changed using the set_use_underline(). -method. It can be retrieved using the get_use_underline() -method. - - The button's relief style (the "relief" property) is retrieved -using the method get_relief(). -The relief style is set to one of gtk.RELIEF_NONE, -gtk.RELIEF_HALF or gtk.RELIEF_NORMAL -using the method set_relief(). - - - - - Constructor - - - gtk.Button - labelNone - stockNone - use_underlineTrue - - - - - label : - the text to be displayed by the button label -including an underscore to indicate the mnemonic character if desired or -None if no label is required. - - - stock : - the stock id identifying the stock image and text -to be used in the button or None if no stock id is to be -used. - - - use_underline : - if True, an underscore in the -text indicates the next character should be underlined and used for the -mnemonic accelerator key if it is the first character so -marked. Available in PyGTK 2.4 and above. - - - Returns : - a new button object - - - - Creates a new button widget with the content depending on the -parameters: label, stock and -use_underline. The default values for -stock and label are -None and, in PyGTK 2.4 and above, -use_underline is available and defaults to -True. If both label and -stock are specified stock -takes precedence. If neither is specified the button is created with no -child widget. A child widget can be added later with the add() -method. - - If stock is specified the "use-stock" -property will be set to True. - - If label is specified the "label" property -will be set with the text of the label, the "use_underline" property will be -set to True and any characters that are preceded by an -underscore are underlined (use two underscores to insert an underscore in a -label). The first underscored character will become the mnemonic character -used as the keyboard accelerator for the button when pressed simultaneously -with the Alt key. In PyGTK 2.4 and above the -"use-underline" property can be set by using the optional -use_underline parameter. - - - - - Methods - - - gtk.Button.pressed - - - pressed - - - The pressed() method emits the -"pressed" signal to the button. - - - - - gtk.Button.released - - - released - - - The released() method emits the -"released" signal to the button. - - - - - gtk.Button.clicked - - - clicked - - - The clicked() method emits the -"clicked" signal to the button. - - - - - gtk.Button.enter - - - enter - - - The enter() method emits the "enter" -signal to the button. - - - - - gtk.Button.leave - - - leave - - - The leave() method emits the "leave" -signal to the button. - - - - - gtk.Button.set_relief - - - set_relief - newstyle - - - - newstyle : - - one of gtk.RELIEF_NONE, -gtk.RELIEF_NORMAL or -gtk.RELIEF_HALF - - - - - The set_relief() method sets the relief -style of the edges of the button. Three styles exist, -gtk.RELIEF_NORMAL, gtk.RELIEF_HALF, -gtk.RELIEF_NONE. The default style is, as one can guess, -gtk.RELIEF_NORMAL. - - - - - gtk.Button.get_relief - - - get_relief - - - - Returns : - the relief style - - - - The get_relief() method retrieves the -current relief style (the "relief" property) set for the button. - - - - - gtk.Button.set_label - - - set_label - label - - - - label : - - a string to be set as the text in the button -label - - - - - The set_label() method sets the text of -the button label to label (also sets the "label" -property). This string is also used to select the stock item if the -"use_stock" property is True and the string references a -stock item. Any previously set labels will be cleared. - - - - - gtk.Button.get_label - - - get_label - - - - Returns : - the text of the label -widget. - - - - The get_label() method retrieves the -text from the label of the button, as set by set_label() -or by the gtk.Button() -constructor. This string is owned by the widget and must not be modified or -freed. If the label text has not been set the return value will be -None. This will be the case if you create an empty button -with gtk.Button() -to use as a container. - - - - - gtk.Button.set_use_underline - - - set_use_underline - use_underline - - - - use_underline : - - True if underscores in the text -indicate mnemonics - - - - - The set_use_underline() method sets the -"use_underline" property to the value of -use_underline. If -use_underline is True, an -underscore in the text of the button label indicates that the next character -should be underlined and used for the mnemonic accelerator key if it is also -the first underlined character. - - - - - gtk.Button.get_use_underline - - - get_use_underline - - - - Returns : - - True if an underscore in the button -label indicates the mnemonic accelerator keys. - - - - - The get_use_underline() method returns -whether the "use_underline" property is True meaning that -an underscore in the button label indicates a mnemonic. See set_use_underline(). - - - - - gtk.Button.set_use_stock - - - set_use_stock - use_stock - - - - use_stock : - - If True the button should use a -stock item - - - - - The set_use_stock() method sets the -"use_stock" property to the value of use_stock. If -use_stock is True, the label set -on the button is used as a stock id to select the stock item for the -button. - - - - - gtk.Button.get_use_stock - - - get_use_stock - - - - Returns : - - the value of the "use_stock" property. - - - - - The get_use_stock() method returns the -value of the "use_stock" property. If True the button -label is used to select a stock item instead of being used directly as the -label text. - - - - - gtk.Button.set_focus_on_click - - - set_focus_on_click - focus_on_click - - - - focus_on_click : - - If True the button grabs focus when - clicked with the mouse. - - - - - - This method is available in PyGTK 2.4 and above. - - - The set_focus_on_click() method sets -the "focus-on-click" property to the value of -focus_on_click. If -focus_on_click is True, the button -grabs focus when it is clicked by the mouse. - - - - - gtk.Button.get_focus_on_click - - - get_focus_on_click - - - - Returns : - - the value of the "focus-on-click" property. - - - - - - This method is available in PyGTK 2.4 and above. - - - The get_focus_on_click() method returns -the value of the "focus-on-click" property. If True the -button grabs focus when it is clicked by the mouse . - - - - - gtk.Button.set_alignment - - - set_alignment - xalign - yalign - - - - xalign : - - the horizontal alignment of the child widget. The value - ranges from 0.0 to 1.0 and represents the fraction of freespace - to the left of the child widget. - - - - yalign : - - the vertical alignment of the child widget. The value - ranges from 0.0 to 1.0 and represents the fraction of freespace - above the child widget. - - - - - - This method is available in PyGTK 2.4 and above. - - - The set_alignment() method sets the -"xalign" and "yalign" properties to the value of -xalign and yalign -respectively. This property has no effect unless the child is a gtk.Misc or a gtk.Alignment. - - - - - gtk.Button.get_alignment - - - get_alignment - - - - - Returns : - - a 2-tuple containing the values of the "xalign" and - "yalign" properties. - - - - - - This method is available in PyGTK 2.4 and above. - - - The get_alignment() method returns the -values of the "xalign" and "yalign" properties. See the set_alignment() method for more information. - - - - - gtk.Button.set_image - - - set_image - image - - - - image : - - the widget to set as the image for the button. - - - - - - This method is available in PyGTK 2.6 and above. - - - The set_image() method sets the "image" -property to the value of image. This property has no -effect unless the "gtk-button-images" property is -True. See the gtk.Settings -reference for more information. Note you do not have to call the gtk.Widget.show() -method for image. - - - - - gtk.Button.get_image - - - get_image - - - - - Returns : - - the gtk.Widget used as -the button image or None if there is no image. - - - - - - This method is available in PyGTK 2.6 and above. - - - The get_image() method returns the -value of the "image" property. See the set_image() -method for more information. - - - - - - - Signals - - - The "activate" gtk.Button Signal - - - callback - button - user_param1 - ... - - - - - button : - the button that received the "activate" -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "activate" signal is emitted when the gtk.Widget.activate() -method is called. For a button it causes the "clicked" signal to be -emitted. - - - - - The "clicked" gtk.Button Signal - - - callback - button - user_param1 - ... - - - - - button : - the button that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "clicked" signal is emitted when the mouse button is pressed -and released while the pointer is over the button. - - - - - The "enter" gtk.Button Signal - - - callback - button - user_param1 - ... - - - - - button : - the button that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "enter" signal is emitted when the pointer enters the -button. - - - - - The "leave" gtk.Button Signal - - - callback - button - user_param1 - ... - - - - - button : - the button that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "leave" signal is emitted when the pointer leaves the -button. - - - - - The "pressed" gtk.Button Signal - - - callback - button - user_param1 - ... - - - - - button : - the button that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "pressed" signal is emitted when the mouse button is pressed -while the pointer is over the button. - - - - - The "released" gtk.Button Signal - - - callback - button - user_param1 - ... - - - - - button : - the button that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "released" signal is emitted when the button is released no -matter where the pointer is. - - - - - -
diff --git a/docs/reference/pygtk-gtkbuttonbox.xml b/docs/reference/pygtk-gtkbuttonbox.xml deleted file mode 100644 index 9e583eb1..00000000 --- a/docs/reference/pygtk-gtkbuttonbox.xml +++ /dev/null @@ -1,346 +0,0 @@ - - - - - - gtk.ButtonBox - the base class for widgets that contain multiple -buttons - - - - Synopsis - - - gtk.ButtonBox - gtk.Box - - get_layout - - - set_layout - layout_style - - - get_child_secondary - child - - - set_child_secondary - child - is_secondary - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Box - +-- gtk.ButtonBox - - - - - - gtk.ButtonBox Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Box Properties - -
- - - - - - - - - "layout-style" - Read/Write - the style used to layout the buttons in the box. The layout -styles are: gtk.BUTTONBOX_SPREAD, -gtk.BUTTONBOX_EDGE, -gtk.BUTTONBOX_START and -gtk.BUTTONBOX_END. - - - - - -
- -
- - - gtk.ButtonBox Style Properties - - gtk.Widget Style Properties - -
- - - - - - - - - "child-internal-pad-x" - Read - The amount of padding that increases a child's size on - the top and bottom - - - - "child-internal-pad-y" - Read - The amount of padding that increases a child's size on - the top and bottom - - - - "child-min-height" - Read - The minimum height of buttons inside the box. - - - - "child-min-width" - Read - The minimum width of buttons inside the box. - - - - - -
- -
- - - gtk.ButtonBox Child Properties - - gtk.Box Child Properties - -
- - - - - - - - - "secondary" - Read/Write - If True, the child appears in a secondary -group of children, suitable for, e.g., help buttons. - - - - - -
- -
- - - gtk.ButtonBox Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - Description - - A button box is used to provide a consistent layout of buttons -throughout an application. The gtk.ButtonBox is -subclassed by the gtk.HButtonBox -and gtk.VButtonBox -classes to provide horizontal and vertical button layouts respectively. The -same effect could be achieved by using a gtk.Box but less -conveniently. - - A buttonbox provides one default layout and a default spacing -value that are persistent across all 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. - - The gtk.Box.get_spacing() -method and the gtk.Box.set_spacing() -methods retrieve and change the default number of pixels between buttons. -The get_layout() -and set_layout() -methods retrieve and alter the style used to spread the buttons in a button -box across the container. The layout styles are: -gtk.BUTTONBOX_SPREAD, -gtk.BUTTONBOX_EDGE, -gtk.BUTTONBOX_START and -gtk.BUTTONBOX_END. - - - - - Methods - - - gtk.ButtonBox.get_layout - - - get_layout - - - - Returns : - the layout style used by the -buttonbox - - - - The get_layout() method returns the -current value of the "layout-style" property. The possible values are: -gtk.BUTTONBOX_SPREAD, -gtk.BUTTONBOX_EDGE, -gtk.BUTTONBOX_START and -gtk.BUTTONBOX_END. - - - - - gtk.ButtonBox.set_layout - - - set_layout - layout_style - - - - layout_style : - the new layout style - - - - The set_layout() method sets the -"layout-style" property to the value in layout_style. -The possible values are: gtk.BUTTONBOX_SPREAD, -gtk.BUTTONBOX_EDGE, -gtk.BUTTONBOX_START and -gtk.BUTTONBOX_END. - - - - - gtk.ButtonBox.get_child_secondary - - - get_child_secondary - child - - - - child : - a child button of the -buttonbox - - - Returns : - if True, the -child appears in a secondary group of the button -box. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_child_secondary() method -returns True if child should -appear in a secondary group of children. See the set_child_secondary() -method for more information. - - - - - gtk.ButtonBox.set_child_secondary - - - set_child_secondary - child - is_secondary - - - - child : - a child button of the -buttonbox - - - is_secondary : - if True, the -child appears in a secondary group of the button -box. - - - - The set_child_secondary() method sets -whether child should appear in a secondary group of -children. The typical use of a secondary child is the help button in a -dialog that is displayed away from the main group of buttons e.g. right -aligned. - - The secondary group appears after the other children if the -style is gtk.BUTTONBOX_START, -gtk.BUTTONBOX_SPREAD or -gtk.BUTTONBOX_EDGE, and before the the other children if -the style is gtk.BUTTONBOX_END. For horizontal button -boxes, the definition of before/after depends on direction of the widget -(see gtk.Widget.set_direction()). -If the style is gtk.BUTTONBOX_START or -gtk.BUTTONBOX_END, then the secondary children are -aligned at the other end of the button box from the main children. For the -other styles, they appear immediately next to the main children. - - - - - -
diff --git a/docs/reference/pygtk-gtkcalendar.xml b/docs/reference/pygtk-gtkcalendar.xml deleted file mode 100644 index 9f04151a..00000000 --- a/docs/reference/pygtk-gtkcalendar.xml +++ /dev/null @@ -1,991 +0,0 @@ - - - - - - gtk.Calendar - a widget that displays a calendar and allows the user to -select a date. - - - - Synopsis - - - gtk.Calendar - gtk.Widget - - gtk.Calendar - - - select_month - month - year - - - select_day - day - - - mark_day - day - - - unmark_day - day - - - clear_marks - - - get_display_options - - - - set_display_options - flags - - - display_options - flags - - - get_date - - - - freeze - - - thaw - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Calendar - - - - gtk.Calendar Properties - - gtk.Object Properties - gtk.Widget Properties - - - These properties are available in GTK+ 2.4 and above. - - -
- - - - - - - - - "day" - Read-Write - The selected day (as a number between 1 and 31, or 0 to -unselect the currently selected day). - - - - "month" - Read-Write - The selected month (as a number between 0 and 11). - - - - "no-month-change" - Read-Write - If True the selected month cannot be -changed. - - - - "show-day-names" - Read-Write - If True, day names are -displayed. - - - - "show-heading" - Read-Write - If True, a heading is -displayed. - - - - "show-week-numbers" - Read-Write - If True, week numbers are -displayed. - - - - "year" - Read-Write - The selected year. - - - - - -
- -
- -
- - - gtk.Calendar Style Properties - - gtk.Widget Style Properties - - - - - gtk.Calendar Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - - - - "day-selected" - - callback - calendar - - user_param1 - - ... - - - - - - "day-selected-double-click" - - callback - calendar - - user_param1 - - ... - - - - - - "month-changed" - - callback - calendar - - user_param1 - - ... - - - - - - "next-month" - - callback - calendar - - user_param1 - - ... - - - - - - "next-year" - - callback - calendar - - user_param1 - - ... - - - - - - "prev-month" - - callback - calendar - - user_param1 - - ... - - - - - - "prev-year" - - callback - calendar - - user_param1 - - ... - - - - - - - - - - Description - - The gtk.Calendar is a -widget that displays a simple calendar, one month at a time. In addition, -the calendar can display the days of the week and navigation controls that -allow a user to change the month and year displayed by calling the display_options() -(set_display_options() -in PyGTK 2.4 and above) method. The possible display options are: - - - - 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. - - - - - The month and year currently displayed are programatically -changed by calling the select_month() -method. The exact day is selected from the displayed month using the select_day() -method. - - To place a visual marker on a particular day, use the mark_day() -method and to remove the marker, the unmark_day() -method. All marks are cleared by calling the clear_marks() -method. - - The selected date can be retrieved from a gtk.Calendar using -the get_date() -method. If performing many 'mark' operations, the calendar can be frozen to -prevent flicker, using the freeze() -method, and 'thawed' again using the thaw() -method. - - - Note that month is zero-based (i.e it allowed values are 0-11) while selected_day - is one-based (i.e. allowed values are 1-31). - - - - - - Constructor - - - gtk.Calendar - - - - Returns : - a calendar object - - - - Creates a calendar object that displays the current month and year -with the current day selected. The default calendar display style is: -gtk.CALENDAR_SHOW_HEADING | gtk.CALENDAR_SHOW_DAY_NAMES that shows the days -of the week and the month and year heading with navigation controls. - - - - - Methods - - - gtk.Calendar.select_month - - - select_month - month - year - - - - month : - the new month number between 0 and -11 - - - year : - the new year number - - - Returns : - True if the month is set - - - - The select_month() method changes the -calendar display to the specified month and -year. - - - - - gtk.Calendar.select_day - - - select_day - day - - - - day : - the new day number between 1 and 31 - 0 removes -the current selection - - - - The select_day() method selects the -specified day on the calendar when -day has a value between 1 and 31. If -day is 0 then the current day selection is -removed. - - - - - gtk.Calendar.mark_day - - - mark_day - day - - - - day : - the number of the day to be -marked - - - Returns : - True - - - - The mark_day() method marks the -specified month day with a visual marker (typically -by making the number bold). If the calendar month and year are changed the -marked days remain marked. - - - - - gtk.Calendar.unmark_day - - - unmark_day - day - - - - day : - the number of the day to be -unmarked - - - Returns : - True - - - - The unmark_day() method unmarks the -specified month day. - - - - - gtk.Calendar.clear_marks - - - clear_marks - - - The clear_marks() method clears all -marked days. - - - - - gtk.Calendar.get_display_options - - - get_display_options - - - - - Returns : - the calendar display options - - - - - This method is available in PyGTK 2.4 and above. - - - The get_display_options() method -returns the current calendar display options. See the set_display_options() -method for more information. - - - - - gtk.Calendar.set_display_options - - - set_display_options - flags - - - - flags : - the new calendar display -options - - - - - This method is available in PyGTK 2.4 and above. - - - The set_display_options() method sets the -calendar display options to the value specified by -flags. The possible display options are a combination -of: - - - - 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. - - - - - The display options can be removed by passing 0 as the value of -flags. - - - - - gtk.Calendar.display_options - - - display_options - flags - - - - flags : - the new calendar display -options - - - - - This method is deprecated in PyGTK 2.4 and should be replaced - by the set_display_options() - method. - - - The display_options() method sets the -calendar display options to the value specified by -flags. The possible display options are a combination -of: - - - - 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. - - - - - The display options can be removed by passing 0 as the value of -flags. - - - - - gtk.Calendar.get_date - - - get_date - - - - - Returns : - a tuple containing the year, month and -day - - - - The get_date() method retrieves the -calendar's current year, month and selected day numbers as a tuple (year, -month, day). - - - Note that month is zero-based (i.e it allowed values are 0-11) while selected_day - is one-based (i.e. allowed values are 1-31). - - - - - - gtk.Calendar.freeze - - - freeze - - - The freeze() method stops the update of -the calendar display until the thaw() -method is called. This method is used to reduce calendar flicker when doing -a large number of updates to the calendar. - - - - - gtk.Calendar.thaw - - - thaw - - - The thaw() method reenables the update -of the calendar after a freeze() -method is called. All changes made since the last freeze() -are displayed - - - - - - - Signals - - - The "day-selected" gtk.Calendar Signal - - - callback - calendar - user_param1 - ... - - - - - calendar : - the calendar that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "day-selected" signal is emitted when a day is selected -either by the user or programatically. - - - - - The "day-selected-double-click" gtk.Calendar Signal - - - callback - calendar - user_param1 - ... - - - - - calendar : - the calendar that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "day-selected-double-click" signal is emitted when a -calendar day is doubled-clicked by the user. - - - - - The "month-changed" gtk.Calendar Signal - - - callback - calendar - user_param1 - ... - - - - - calendar : - the calendar that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "month-changed" signal is emitted when the calendar month is -changed programatically or by the user. - - - - - The "next-month" gtk.Calendar Signal - - - callback - calendar - user_param1 - ... - - - - - calendar : - the calendar that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "next-month" signal is emitted when the user clicks the -"next-month" navigation control in the calendar header. - - - - - The "next-year" gtk.Calendar Signal - - - callback - calendar - user_param1 - ... - - - - - calendar : - the calendar that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "next-year" signal is emitted when the user clicks the -"next-year" navigation control in the calendar header. - - - - - The "prev-month" gtk.Calendar Signal - - - callback - calendar - user_param1 - ... - - - - - calendar : - the calendar that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "prev-month" signal is emitted when the user clicks the -"prev-month" navigation control in the calendar header. - - - - - The "prev-year" gtk.Calendar Signal - - - callback - calendar - user_param1 - ... - - - - - calendar : - the calendar that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "prev-year" signal is emitted when the user clicks the -"prev-year" navigation control in the calendar header. - - - - - -
diff --git a/docs/reference/pygtk-gtkcelleditable.xml b/docs/reference/pygtk-gtkcelleditable.xml deleted file mode 100644 index 05a3137b..00000000 --- a/docs/reference/pygtk-gtkcelleditable.xml +++ /dev/null @@ -1,220 +0,0 @@ - - - - - - gtk.CellEditable - an interface for editing a TreeView cell - - - - Synopsis - - - gtk.CellEditable - gobject.GInterface - - start_editing - event - - - editing_done - - - remove_widget - - - - - - - gtk.CellEditable Signal Prototypes - - - - "editing-done" - - callback - celleditable - - user_param1 - - ... - - - - - - "remove-widget" - - callback - celleditable - - user_param1 - - ... - - - - - - - - - - Description - - The gtk.CellEditable -is an interface that provides editing of a cell in a gtk.TreeView -cell. - - - - - Methods - - - gtk.CellEditable.start_editing - - - start_editing - event - - - - event : - A gtk.gdk.Event, or -None - - - - The start_editing() method begins the -editing on a cell_editable widget that has been -reparented over the treeview cell. event is the -gtk.gdk.Event -that began the editing process. If the editing was initiated through -programmatic means, event may be -None, . - - - - - - gtk.CellEditable.editing_done - - - editing_done - - - The editing_done() method emits the -"editing_done" signal that notifies the cell renderer to update it's value -from the cell. - - - - - gtk.CellEditable.remove_widget - - - remove_widget - - - The remove_widget() method emits the "remove_widget" signal that -indicates that the cell is finished editing, and the celleditable widget may -now be destroyed. - - - - - - - Signals - - - The "editing-done" gtk.CellEditable Signal - - - callback - celleditable - user_param1 - ... - - - - - celleditable : - the celleditable that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "editing-done" signal is emitted when the editing_done() -method is called. - - - - - The "remove-widget" gtk.CellEditable Signal - - - callback - celleditable - user_param1 - ... - - - - - celleditable : - the celleditable that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "remove-widget" signal is emitted when the cellrenderer for -the treeview cell has retrieved the edited information and the celleditable -widget can be destroyed. - - - - - - diff --git a/docs/reference/pygtk-gtkcelllayout.xml b/docs/reference/pygtk-gtkcelllayout.xml deleted file mode 100644 index 44ef82aa..00000000 --- a/docs/reference/pygtk-gtkcelllayout.xml +++ /dev/null @@ -1,385 +0,0 @@ - - - - - gtk.CellLayout - an interface for packing cells - - - - Synopsis - - - gtk.CellLayout - gobject.GInterface - - pack_start - cell - expandTrue - - - pack_end - cell - expandTrue - - - clear - - - set_attributes - cell - ... - - - add_attribute - cell - attribute - column - - - set_cell_data_func - cell - func - func_data - - - clear_attributes - cell - - - reorder - cell - position - - - - - - - Description - - - This interface is available in PyGTK 2.4 and above. - - - gtk.CellLayout -is an interface to be implemented by all objects that want to provide a -gtk.TreeViewColumn-like -API for packing cells, setting attributes and data funcs. The gtk.CellLayout -interface is implemented by the gtk.ComboBoxEntry, -gtk.ComboBox, -gtk.EntryCompletion -and gtk.TreeViewColumn -widgets. - - - - - Methods - - - gtk.CellLayout.pack_start - - - pack_start - cell - expandTrue - - - - cell : - A gtk.CellRenderer. - - - expand : - if True, the - cell is to be given extra space that is - allocated to the cell layout. - - - - - This method is available in PyGTK 2.4 and above. - - - The pack_start() method packs the gtk.CellRenderer -specified by cell into the beginning of the cell -layout. If the optional parameter expand is -False, then cell is allocated no -more space than it needs. Any unused space is divided evenly between cells -for which expand is True. - - - - - gtk.CellLayout.pack_end - - - pack_end - cell - expandTrue - - - - cell : - A gtk.CellRenderer. - - - expand : - if True, the - cell is to be given extra space that is - allocated to the cell layout. - - - - - This method is available in PyGTK 2.4 and above. - - - The pack_end() method adds the gtk.CellRenderer -specified by cell to the end of the cell layout. If -the optional parameter expand is -False, then the cell is allocated -no more space than it needs. Any unused space is divided evenly between -cells for which expand is -True. - - - - - gtk.CellLayout.clear - - - clear - - - - This method is available in PyGTK 2.4 and above. - - - The clear() method unsets all the -attribute mappings on all cell renderers in the cell layout. - - - - - gtk.CellLayout.set_attributes - - - set_attributes - cell - ... - - - - cell : - A gtk.CellRenderer. - - - ... : - Zero or more keyword-value arguments in the format - attribute=column. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_attributes() method sets the -attributes provided as a keyword argument list as the attributes of the -gtk.CellRenderer -specified by cell. The attributes should be supplied -as keyword-value arguments in the format: attribute=column (e.g. text=0, -background=1). All existing attributes are removed, and replaced with the -new attributes. - - - - - gtk.CellLayout.add_attribute - - - add_attribute - cell - attribute - column - - - - cell : - A gtk.CellRenderer. - - - attribute : - An attribute on the renderer. - - - column : - The column number in the model to get the attribute from. - - - - - This method is available in PyGTK 2.4 and above. - - - The add_attribute() method adds an -attribute mapping to the list in the cell layout. The -column parameter is the column of the model to get a -value from, and the attribute parameter is the -attribute of cell to be set from the value. So for -example if column 2 of the model contains strings, you could have the "text" -attribute of a gtk.CellRendererText -get its values from column 2. - - - - - gtk.CellLayout.set_cell_data_func - - - set_cell_data_func - cell - func - func_data - - - - cell : - A gtk.CellRenderer. - - - func : - The function to use. - - - func_data : - The user data for func. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_cell_data_func() method sets -the function (or method) specified by func to be used -for setting the column value of the gtk.CellRenderer -specified by cell instead of using the standard -attribute mapping method. func may be -None to remove the current function. The signature of -func is: - - - - celldatafunction - celllayout - cell - model - iter - user_data - - - celldatamethod - self - celllayout - cell - model - iter - user_data - - - - where celllayout is the gtk.CellLayout, -cell is the gtk.CellRenderer -for celllayout, model is the -gtk.TreeModel and -iter is the gtk.TreeIter -pointing at the row. - - - - - gtk.CellLayout.clear_attributes - - - clear_attributes - cell - - - - cell : - A gtk.CellRenderer to clear the attribute mapping on. - - - - - This method is available in PyGTK 2.4 and above. - - - The clear_attributes() method clears -all existing attribute mappings from the gtk.CellRenderer -specified by cell previously set with the set_attributes() -or add_attribute() -methods. - - - - - gtk.CellLayout.reorder - - - reorder - cell - position - - - - cell : - A gtk.CellRenderer to reorder. - - - position : - New position to insert cell at. - - - - - This method is available in PyGTK 2.4 and above. - - - The reorder() method re-inserts the -gtk.CellRenderer -specified by cell at -position. Note that cell has -to already be packed into cell_layout for this to -function properly. - - - - - - diff --git a/docs/reference/pygtk-gtkcellrenderer.xml b/docs/reference/pygtk-gtkcellrenderer.xml deleted file mode 100644 index 267394ce..00000000 --- a/docs/reference/pygtk-gtkcellrenderer.xml +++ /dev/null @@ -1,790 +0,0 @@ - - - - - - gtk.CellRenderer - a base class for objects that render on a gtk.gdk.Drawable - - - - Synopsis - - - gtk.CellRenderer - gtk.Object - - get_size - widget - cell_area - None - - - render - window - widget - background_area - cell_area - expose_area - flags - - - activate - event - widget - path - background_area - cell_area - flags - - - start_editing - event - widget - path - background_area - cell_area - flags - - - editing_canceled - - - - stop_editing - canceled - - - set_fixed_size - width - height - - - get_fixed_size - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.CellRenderer - - - - - - gtk.CellRenderer Properties - - gtk.Object Properties - -
- - - - - - - - - "cell-background" - Write - The background color of the cell as a string. -Default: None. - - - - "cell-background-gdk" - Read/Write - The background color of the cell as a gtk.gdk.Color. - - - - "cell-background-set" - Read/Write - If True the cell background color is set by this -cellrenderer. Default: False. - - - - "height" - Read/Write - The fixed height of the cell. Allowed values >= -1. -Default: -1. - - - - "is-expanded" - Read/Write - If True the row has children and it is expanded to show the -children. Default: False. - - - - "is-expander" - Read/Write - If True the row has children. Default: False. - - - - "mode" - Read/Write - The editable mode of the cellrenderer. One of the . -Default: gtk.CELL_RENDERER_MODE_INERT, - - - - "sensitive" - Read/Write - If True the cell is displayed as sensitive. Available in - GTK+ 2.6 and above. Default: True. - - - - "visible" - Read/Write - If True the cell is displayed. Default: True. - - - - "width" - Read/Write - The fixed width of the cell. Allowed values >= -1. -Default: -1. - - - - "xalign" - Read/Write - The fraction of free space to the left - of the cell in the range 0.0 to 1.0. Allowed values between 0 and - 1. Default: 0.5. - - - - "xpad" - Read/Write - The amount of padding to the left and right of the - cell. Default: 0. - - - - "yalign" - Read/Write - The fraction of free space above the - cell in the range 0.0 to 1.0. Allowed values between 0 and 1. - Default: 0.5. - - - - "ypad" - Read/Write - The amount of padding above and below cell. Default: - 0. - - - - - -
- -
- - - gtk.CellRenderer Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - - - - "editing-canceled" - - callback - cellrenderer - user_param1 - ... - - - - - "editing-started" - - callback - cellrenderer - editable - path - user_param1 - ... - - - - - - - - - Description - - The gtk.CellRenderer -is a base class for a set of objects used for rendering a cell to a gtk.gdk.Drawable. The -gtk.CellRenderer -provides the common attributes and methods for its subclasses (gtk.CellRendererPixbuf, -gtk.CellRendererText -and gtk.CellRendererToggle). - - The primary use of a gtk.CellRenderer - is for drawing a certain graphical elements on a gtk.gdk.Drawable. Typically, - one cell renderer is used to draw many cells on the screen. To this - extent, it isn't expected that a CellRenderer keep any permanent state - around. Instead, any state is set just prior to use using the GObjects - property system. Then, the cell is measured using the get_size() - method. Finally, the cell is rendered in the correct location using the - render() - method. - - - - - Methods - - - gtk.CellRenderer.get_size - - - get_size - widget - cell_area - - - - widget : - the widget the renderer is rendering -to - - - cell_area : - The area a cell will be allocated, or -None - - - Returns : - a tuple containing the xoffset, yoffset, width -and height - - - - The get_size() method obtains the width -and height needed to render the cell. These values are returned as part of a -tuple containing the x_offset, y_offset, width and height. -get_size() is used by view widgets to determine the -appropriate size for the cell_area to be passed to -the gtk.CellRenderer.render() -method. If cell_area is not None, -the x and y offsets of the cell relative to this location are returned. -Please note that the values set in the returned width and height, as well as -those in x_offset and y_offset are inclusive of the xpad and ypad -properties. - - - - - gtk.CellRenderer.render - - - render - window - widget - background_area - cell_area - expose_area - flags - - - - window : - a gtk.gdk.Drawable -to draw to - - - widget : - the widget owning -window - - - background_area : - entire cell area (including tree expanders and -maybe padding on the sides) - - - cell_area : - area normally rendered by a cell -renderer - - - expose_area : - area that actually needs -updating - - - flags : - flags that affect -rendering - - - - The render() method invokes the virtual -render function of the gtk.CellRenderer. -The three passed-in rectangles are areas of window. -Most renderers will draw within cell_area; the -xalign, yalign, xpad, and ypad properties of the gtk.CellRenderer -should be honored with respect to cell_area. -background_area includes the blank space around the -cell, and also the area containing the tree expander; so the -background_area rectangles for all cells tile to -cover the entire window. -expose_area is a clip rectangle. - - The flags value is one of: -gtk.CELL_RENDERER_SELECTED, -gtk.CELL_RENDERER_PRELIT, -gtk.CELL_RENDERER_INSENSITIVE or -gtk.CELL_RENDERER_SORTED - - - - - gtk.CellRenderer.activate - - - activate - event - widget - path - background_area - cell_area - flags - - - - event : - a gtk.gdk.Event - - - widget : - widget that received the -event - - - path : - widget-dependent string representation of the -event location; e.g. for gtk.TreeView, a -string representation of -gtk.TreePath - - - background_area : - background area as passed to render() - - - cell_area : - cell area as passed to render() - - - flags : - render flags - - - Returns : - True if the event was -consumed/handled - - - - The activate() method passes an -activate event to the cell renderer for possible processing. Some cell -renderers may use events; for example, gtk.CellRendererToggle -toggles when it gets a mouse click. - - The flags value is one of: -gtk.CELL_RENDERER_SELECTED, -gtk.CELL_RENDERER_PRELIT, -gtk.CELL_RENDERER_INSENSITIVE or -gtk.CELL_RENDERER_SORTED - - - - - gtk.CellRenderer.start_editing - - - start_editing - event - widget - path - background_area - cell_area - flags - - - - event : - a gtk.gdk.Event - - - widget : - the widget that received the -event - - - path : - a widget-dependent string representation of the -event location; e.g. for gtk.TreeView, a -string representation of -gtk.TreePath - - - background_area : - background area as passed to render(). - - - cell_area : - cell area as passed to render() - - - flags : - render flags - - - Returns : - A new gtk.CellEditable, -or None - - - - The start_editing() method initiates -the editing of a cell. - - - - - gtk.CellRenderer.editing_canceled - - - editing_canceled - - - - - This method is available in PyGTK 2.4 and above. - - - - This method is deprecated in PyGTK 2.6 and above. Use the -stop_editing() -method instead. - - - The editing_canceled() method causes -the cell renderer to emit the "editing-canceled" signal. This method is for -use only by implementations of cell renderers that need to notify the client -program that an editing process was canceled and the changes were not -committed. - - - - - gtk.CellRenderer.stop_editing - - - stop_editing - canceled - - - - canceled : - if True the editing has been -canceled - - - - - This method is available in PyGTK 2.6 and above. - - - The stop_editing() method informs the -cell renderer that the editing is stopped. If -canceled is True, the cell -renderer will emit the "editing-canceled" signal. This method should be -called by cell renderer implementations in response to the "editing-done" -signal of gtk.CellEditable. - - - - - gtk.CellRenderer.set_fixed_size - - - set_fixed_size - width - height - - - - width : - the width of the cell renderer, or --1 - - - height : - the height of the cell renderer, or --1 - - - - The set_fixed_size() method sets the -renderer size to the specified width and -height, independent of the properties set. - - - - - gtk.CellRenderer.get_fixed_size - - - get_fixed_size - - - - - Returns : - - a tuple containing the width and height of the -cell - - - - - The get_fixed_size() method retrieves a -tuple containing the fixed width and -height of the cell. - - - - - - - Signals - - - The "editing-canceled" gtk.CellRenderer Signal - - - callback - cellrenderer - user_param1 - ... - - - - - cellrenderer : - the cellrenderer that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.4 and above. - - - The "editing-canceled" signal is emitted when the user cancels - the process of editing a cell. For example, an editable cell renderer - could be written to cancel editing when the user presses Escape. Also - see the editing_canceled() - method. - - - - - The "editing-started" gtk.CellRenderer Signal - - - callback - cellrenderer - editable - path - user_param1 - ... - - - - - cellrenderer : - the cellrenderer that received the -signal - - - editable : - the gtk.CellEditable - - - path : - he path identifying the edited -cell - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.6 and above. - - - The "editing-started" signal is emitted when a cell starts to be -edited. The intended use of this signal is to do special setup on -editable, e.g. adding a gtk.EntryCompletion -or setting up additional columns in a gtk.ComboBox. - - Note that GTK+ doesn't guarantee that cell renderers will -continue to use the same kind of widget for editing in future releases, -therefore you should check the type of editable before doing any specific -setup, as in the following example: - - -def text_editing_started(cell, editable, path, data): - if isinstance(editable, gtk.Entry): - # ... create a GtkEntryCompletion - completion = gtk.EntryCompletion() - editable.set_completion(completion) - ... - ... - - - - - - -
diff --git a/docs/reference/pygtk-gtkcellrendereraccel.xml b/docs/reference/pygtk-gtkcellrendereraccel.xml deleted file mode 100644 index 19ea8546..00000000 --- a/docs/reference/pygtk-gtkcellrendereraccel.xml +++ /dev/null @@ -1,296 +0,0 @@ - - - - - - - gtk.CellRendererAccel - an object that renders a keyboard accelerator in a cell - (new in PyGTK 2.10) - - - - Synopsis - - - gtk.CellRendererAccel - gtk.CellRendererText - - gtk.CellRendererAccel - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.CellRenderer - +-- gtk.CellRendererText - +-- gtk.CellRendererAccel - - - - - - gtk.CellRendererAccel Properties - - gtk.Object Properties - gtk.CellRenderer Properties - gtk.CellRendererText Properties - -
- - - - - - - - - "accel-key" - Read-Write - The keyval of the accelerator. Default value: 0. This - property is available in GTK+ 2.10 and above. - - - - "accel-mode" - Read-Write - Determines if the edited accelerators are GTK+ - accelerators. If they are, consumed modifiers are suppressed, - only accelerators accepted by GTK+ are allowed, and the - accelerators are rendered in the same way as they are in - menus. one of the . Default - value: - gtk.CELL_RENDERER_ACCEL_MODE_GTK. This - property is available in GTK+ 2.10 and above. - - - - "accel-mods" - Read-Write - The modifier mask of the accelerator. One of the . This property - is available in GTK+ 2.10 and above. - - - - "keycode" - Read-Write - The hardware keycode of the accelerator. Note that the - hardware keycode is only relevant if the key does not have a - keyval. Normally, the keyboard configuration should assign - keyvals to all keys. Default value: 0. This property is - available in GTK+ 2.10 and above. - - - - - -
- -
- - - gtk.CellRendererAccel Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.CellRenderer Signal Prototypes - gtk.CellRendererText Signal Prototypes - - - - "accel-cleared" - - callback - cellrendereraccel - path_string - user_param1 - ... - - - - - - - - "accel-edited" - - callback - cellrendereraccel - path_string - accel_key - accel_mods - hardware_keycode - user_param1 - ... - - - - - - - - - Description - - gtk.CellRendererAccel - displays a keyboard accelerator (i.e. a key combination like - Controla). If the - cell renderer is editable, the accelerator can be changed by simply - typing the new combination. - - - - - Constructor - - - gtk.CellRendererAccel - - - gtk.CellRendererAccel - - - - - - Returns : - the new cell renderer - - - - - This constructor is available in PyGTK 2.10 and above. - - - Creates a new gtk.CellRendererAccel. - - - - - - - Signals - - - The "accel-cleared" Signal - - - callback - cellrendereraccel - path_string - user_param1 - ... - - - - - cellrendereraccel : - the cellrendereraccel that received the -signal - - - path_string : - the path identifying the row of the cleared - cell as a string - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.10 and above. - - - The "accel-cleared" signal is emitted when the user has removed - the accelerator. - - - - - The "accel-edited" Signal - - - callback - cellrendereraccel - path_string - accel_key - accel_mods - hardware_keycode - user_param1 - ... - - - - - cellrendereraccel : - the cellrendereraccel that received the -signal - - - path_string : - the path identifying the row of the edited cell - as a string - - - accel_key : - the new accelerator keyval - - - accel_mods : - the new acclerator modifier - mask - - - hardware_keycode : - the keycode of the new - accelerator - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.10 and above. - - - The "accel-edited" signal is emitted when the user has selected - a new accelerator. - - - - - -
diff --git a/docs/reference/pygtk-gtkcellrenderercombo.xml b/docs/reference/pygtk-gtkcellrenderercombo.xml deleted file mode 100644 index 47e4d238..00000000 --- a/docs/reference/pygtk-gtkcellrenderercombo.xml +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - gtk.CellRendererCombo an object that - renders a gtk.ComboBoxEntry - into a gtk.TreeView - cell (new in PyGTK 2.6) - - - - Synopsis - - - gtk.CellRendererCombo - gtk.CellRendererText - - gtk.CellRendererCombo - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.CellRenderer - +-- gtk.CellRendererText - +-- gtk.CellRendererCombo - - - - - - gtk.CellRendererCombo Properties - - gtk.Object Properties - gtk.CellRenderer Properties - gtk.CellRendererText Properties - -
- - - - - - - - - "has-entry" - Read/Write - If False, don't allow entering strings -other than the given ones. Default value: True. Available -in GTK+ 2.6 and above. - - - - "model" - Read/Write - The tree model containing the possible values for the combo -box entry. Available in GTK+ 2.6 and above. - - - - "text-column" - Read/Write - A column in the data source model to get the strings from. -Allowed values: >= -1. Default value: -1. Available in GTK+ 2.6 and -above. - - - - - -
- -
- - - gtk.CellRendererCombo Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.CellRenderer Signal Prototypes - gtk.CellRendererText Signal Prototypes - - - - Description - - - This object is available in PyGTK 2.6 and above. - - - The gtk.CellRendererCombo -manages the rendering of a gtk.ComboBoxEntry -into a gtk.TreeView -cell. - - - - - Constructor - - - gtk.CellRendererCombo - - - - Returns : - the new cell renderer - - - - - This constructor is available in PyGTK 2.6 and above. - - - Creates a new gtk.CellRendererCombo. -Rendering parameters are adjusted using the object properties. The object -properties can be set globally (with set_property()). -Also, with gtk.TreeViewColumn, -you can bind a property to a value in a gtk.TreeModel. -For example, you can bind the "text" property on the cell renderer to a -string value in the model, thus rendering a different string in each row of -the gtk.TreeView. - - - -
diff --git a/docs/reference/pygtk-gtkcellrendererpixbuf.xml b/docs/reference/pygtk-gtkcellrendererpixbuf.xml deleted file mode 100644 index 47a22a08..00000000 --- a/docs/reference/pygtk-gtkcellrendererpixbuf.xml +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - gtk.CellRendererPixbuf an object that - renders a pixbuf into a gtk.TreeView - cell - - - - Synopsis - - - gtk.CellRendererPixbuf - gtk.CellRenderer - - gtk.CellRendererPixbuf - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.CellRenderer - +-- gtk.CellRendererPixbuf - - - - - - gtk.CellRendererPixbuf Properties - - gtk.Object Properties - gtk.CellRenderer Properties - -
- - - - - - - - - "follow-state" - Read-Write - If True the rendered pixbuf should be - colorized according to the . This - property is available in GTK+ 2.8 and above. - - - - "icon-name" - Read-Write - The name of the themed icon to display. This property only - has an effect if not overridden by "stock_id" or "pixbuf" - properties. This property is available in GTK+ 2.8 and - above. - - - - "pixbuf" - Read/Write - The pixbuf to render. - - - - "pixbuf-expander-closed" - Read/Write - Pixbuf for closed expander. - - - - "pixbuf-expander-open" - Read/Write - Pixbuf for open expander. - - - - "stock-detail" - Read/Write - Render detail to pass to the theme engine - - - - "stock-id" - Read/Write - The stock ID of the stock icon to render - - - - "stock-size" - Read/Write - The size of the rendered icon - - - - - -
- -
- - - gtk.CellRendererPixbuf Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.CellRenderer Signal Prototypes - - - - Description - - The gtk.CellRendererPixbuf -manages the rendering of a pixbuf into a gtk.TreeView -cell. - - - - - Constructor - - - gtk.CellRendererPixbuf - - - - Returns : - the new cell renderer - - - - Creates a new gtk.CellRendererPixbuf. -Rendering parameters are adjusted using the object properties. The object -properties can be set globally (with set_property()). -Also, with gtk.TreeViewColumn, -you can bind a property to a value in a gtk.TreeModel. -For example, you can bind the "pixbuf" property on the cell renderer to a -pixbuf value in the model, thus rendering a different image in each row of -the gtk.TreeView. - - - -
diff --git a/docs/reference/pygtk-gtkcellrendererprogress.xml b/docs/reference/pygtk-gtkcellrendererprogress.xml deleted file mode 100644 index 4f57e85e..00000000 --- a/docs/reference/pygtk-gtkcellrendererprogress.xml +++ /dev/null @@ -1,134 +0,0 @@ - - - - - - gtk.CellRendererProgress - an object that renders numbers as progress bars in a gtk.TreeView - (new in PyGTK 2.6) - - - - Synopsis - - - gtk.CellRendererProgress - gtk.CellRenderer - - gtk.CellRendererProgress - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.CellRenderer - +-- gtk.CellRendererProgress - - - - - - gtk.CellRendererProgress Properties - - gtk.Object Properties - gtk.CellRenderer Properties - -
- - - - - - - - - "text" - Read/Write - The text in the label that will be drawn over the progress bar. -Setting this property to None causes the default label to -be displayed. Setting this property to an empty string causes no label to be -displayed. Default value: None. Available in GTK+ 2.6 and -above. - - - - "value" - Read/Write - The percentage that the progress bar is "filled in". -Available in GTK+ 2.6 and above. - - - - - -
- -
- - - gtk.CellRendererProgress Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.CellRenderer Signal Prototypes - - - - Description - - - This object is available in PyGTK 2.6 and above. - - - The gtk.CellRendererProgress -manages the rendering of a number as a progress bar in a gtk.TreeView -cell. - - - - - Constructor - - - gtk.CellRendererProgress - - - - Returns : - the new cell renderer - - - - - This constructor is available in PyGTK 2.6 and above. - - - Creates a new gtk.CellRendererProgress. -Rendering parameters are adjusted using the object properties. The object -properties can be set globally (with set_property()). -Also, with gtk.TreeViewColumn, -you can bind a property to a value in a gtk.TreeModel. -For example, you can bind the "text" property on the cell renderer to a -string value in the model, thus rendering a different string in each row of -the gtk.TreeView. - - - -
diff --git a/docs/reference/pygtk-gtkcellrendererspin.xml b/docs/reference/pygtk-gtkcellrendererspin.xml deleted file mode 100644 index f319fa63..00000000 --- a/docs/reference/pygtk-gtkcellrendererspin.xml +++ /dev/null @@ -1,155 +0,0 @@ - - - - - - - gtk.CellRendererSpin - an object that renders a spin button in a cell (new in - PyGTK 2.10) - - - - Synopsis - - - gtk.CellRendererSpin - gtk.CellRendererText - - gtk.CellRendererSpin - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.CellRenderer - +-- gtk.CellRendererText - +-- gtk.CellRendererSpin - - - - - - gtk.CellRendererSpin Properties - - gtk.Object Properties - gtk.CellRenderer Properties - gtk.CellRendererText Properties - -
- - - - - - - - - "adjustment" - Read-Write - The gtk.Adjustment - that holds the value of the spinbutton. This must be non-None - for the cell renderer to be editable. Default value: - None. Available in GTK+ 2.10 and above. - - - - "climb-rate" - Read-Write - The acceleration rate when you hold down a - button. Range: [0.0,MAXDOUBLE]. Default value: 0.0. Available - in GTK+ 2.10 and above. - - - - "digits" - Read-Write - The number of decimal places to display. Range: - [0,20]. Default value: 0. Available in GTK+ 2.10 and - above. - - - - - -
- -
- - - gtk.CellRendererSpin Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.CellRenderer Signal Prototypes - gtk.CellRendererText Signal Prototypes - - - - Description - - gtk.CellRendererSpin - renders text in a cell like gtk.CellRendererText - from which it is derived. But while gtk.CellRendererText - offers a simple entry to edit the text, gtk.CellRendererSpin - offers a gtk.SpinButton - widget. Of course, that means that the text has to be parseable as a - floating point number. - - The range of the spinbutton is taken from the "adjustment" - property of the cell renderer, which can be set explicitly or mapped to - a column in the tree model. Like all properties of cellrenderers. gtk.CellRendererSpin - also has properties for the "climb-rate" and the number of "digits" to - display. Other gtk.SpinButton - properties can be set in a handler for the "gtk.CellRenderer.editing-started" - signal. - - - - - Constructor - - - gtk.CellRendererSpin - - - gtk.CellRendererSpin - - - - - - Returns : - a new gtk.CellRendererSpin - - - - - This constructor is available in PyGTK 2.10 and above. - - - Creates a new gtk.CellRendererSpin. - - - - - -
diff --git a/docs/reference/pygtk-gtkcellrenderertext.xml b/docs/reference/pygtk-gtkcellrenderertext.xml deleted file mode 100644 index dfb15d6f..00000000 --- a/docs/reference/pygtk-gtkcellrenderertext.xml +++ /dev/null @@ -1,538 +0,0 @@ - - - - - - gtk.CellRendererText - - an object that renders text into a gtk.TreeView -cell - - - - Synopsis - - - gtk.CellRendererText - gtk.CellRenderer - - gtk.CellRendererText - - - set_fixed_height_from_font - number_of_rows - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.CellRenderer - +-- gtk.CellRendererText - - - - - - gtk.CellRendererText Properties - - gtk.Object Properties - gtk.CellRenderer Properties - -
- - - - - - - - - "alignment" - Read/Write - Specifies how to align the lines of text using one of the - Default value: - pango.ALIGN_LEFT. This propserty is available - in GTK+ 2.10 and above. - - - - - "attributes" - Read/Write - A list of style attributes to apply to the text of the -renderer. - - - - "background" - Write - Background color as a string. Default: - None - - - - "background-gdk" - Read/Write - Background color as a gtk.gdk.Color - - - - "background-set" - Read/Write - If True this tag affects the background -color. Default: False - - - - "editable" - Read/Write - If True the text can be modified by the -user. GTK+ 2.4 and above. Default: False - - - - "editable-set" - Read/Write - If True this tag affects the text -editability. GTK+ 2.4 and above. Default: False - - - - "ellipsize" - Read/Write - The preferred place to ellipsize the string, if the cell -renderer does not have enough room to display the entire string, if at all. -GTK+ 2.6 and above. Default: pango.ELLIPSIZE_NONE - - - - "ellipsize-set" - Read/Write - If True this tag affects the text -editability. Default: False - - - - "family" - Read/Write - Name of the font family, e.g. Sans, Helvetica, Times, -Monospace. Default: None - - - - "family-set" - Read/Write - If True this tag affects the font -family. Default: False - - - - "font" - Read/Write - Font description as a string. Default: -None - - - - "font-desc" - Read/Write - Font description as a pango.FontDescription - - - - "foreground" - Write - Foreground color as a string. Default: -None - - - - "foreground-gdk" - Read/Write - Foreground color as a gtk.gdk.Color - - - - "foreground-set" - Read/Write - If True this tag affects the foreground -color. Default: False - - - - "language" - Read/Write - The language this text is in, as an ISO code. Pango can use -this as a hint when rendering the text. If you don't understand this parameter, -you probably don't need it. GTK+ 2.4 and above. Default: -None - - - - "language-set" - Read/Write - If True this tag affects the -language used to render the text. GTK+ 2.4 and above. Default: -False - - - - "markup" - Write - Marked up text to render. Default: -None - - - - "rise" - Read/Write - Offset of text above the baseline (below the baseline if -rise is negative). Default: 0 - - - - "rise-set" - Read/Write - If True this tag affects the -rise. Default: False - - - - "scale" - Read/Write - Font scaling factor. Allowed values >= 0. -Default: 1 - - - - "scale-set" - Read/Write - If True this tag scales the font. -Default: False - - - - "single-paragraph-mode" - Read/Write - If True, keep all text in a single -paragraph. GTK+ 2.4 and above. Default: False - - - - "size" - Read/Write - Font size. Allowed values >= 0. Default: 0 - - - - "size-points" - Read/Write - Font size in points. Allowed values >= 0. -Default: 0 - - - - "size-set" - Read/Write - If True this tag affects the font -size. Default: False - - - - "stretch" - Read/Write - Font stretch. Default: -pango.STRETCH_NORMAL - - - - "stretch-set" - Read/Write - If True this tag affects the font -stretch. Default: False - - - - "strikethrough" - Read/Write - If True strike through the text. -Default: False - - - - "strikethrough-set" - Read/Write - If True this tag affects the -strikethrough. Default: False - - - - "style" - Read/Write - Font style. Default: -pango.STYLE_NORMAL - - - - "style-set" - Read/Write - If True this tag affects the font -style. Default: False - - - - "text" - Read/Write - Text to render. Default: None - - - - "underline" - Read/Write - Style of underline for this text. -Default: pango.UNDERLINE_NONE - - - - "underline-set" - Read/Write - If True this tag affects the text -underlining. Default: False - - - - "variant" - Read/Write - Font variant. Default: -pango.VARIANT_NORMAL - - - - "variant-set" - Read/Write - If True this tag affects the font -variant. Default: False - - - - "weight" - Read/Write - Font weight. Allowed values >= 0. Default value: -400 - - - - "weight-set" - Read/Write - If True this tag affects the font -weight. Default: False - - - - "width-chars" - Read/Write The desired width of the cell, in - characters. If this property is set to -1, the width will be - calculated automatically, otherwise the cell will request either 3 - characters or the property value, whichever is greater. GTK+ 2.6 - and above. Allowed values >= -1. Default value: -1 - - - - "wrap-mode" - Read-Write - Specifies how to break the string into multiple lines, if - the cell renderer does not have enough room to display the entire - string. This property has no effect unless the "wrap-width" - property is set. This property is available in GTK+ 2.8 and - above. - - - - "wrap-width" - Read-Write - Specifies the width at which the text is wrapped. The - "wrap-mode" property can be used to influence at what character - positions the line breaks can be placed. Setting "wrap-width" to - -1 turns wrapping off. This property is available in GTK+ 2.8 and - above. - - - - - -
- -
- - - gtk.CellRendererText Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.CellRenderer Signal Prototypes - - - - "edited" - - callback - cellrenderertext - - path - - new_text - - user_param1 - - ... - - - - - - - - - - Description - - The gtk.CellRendererText - manages the rendering of text into a gtk.TreeView - cell, using the font, color and style information provided by its - properties. The text will be ellipsized if it is too long and the - "ellipsize" property allows it. - - - - - Constructor - - - gtk.CellRendererText - - - - Returns : - the new cell renderer - - - - Creates a new gtk.CellRendererText. -The way that text is drawn is changed using object properties. The object -properties can be set globally (with set_property()). -Also, with gtk.TreeViewColumn, -you can bind a property to a value in a gtk.TreeModel. -For example, you can bind the "text" property on the cell renderer to a -string value in the model, thus rendering a different string in each row of -the gtk.TreeView. - - - - - Methods - - - gtk.CellRendererText.set_fixed_height_from_font - - - set_fixed_height_from_font - number_of_rows - - - - number_of_rows : - Number of rows of text each cell renderer is -allocated, or -1 - - - - The set_fixed_height_from_font() sets -the height of a renderer to explicitly be determined by the "font" and -"ypad" properties set on it. This method must be called each time these -properties are changed to affect the height. This function is inflexible, -and should really only be used if calculating the size of a cell is too slow -(i.e. a massive number of cells displayed). If -number_of_rows is -1, then the fixed height is unset, -and the height is determined by the properties again. - - - - - - - Signals - - - The "edited" gtk.CellRendererText Signal - - - callback - cellrenderertext - path - new_text - user_param1 - ... - - - - - cellrenderertext : - the cellrenderertext that received the -"edited" signal - - - path : - the path string of the -cellrenderertext - - - new_text : - the new text of the -cellrenderertext - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "edited" signal is emitted when the text in the cell has -been edited. - - - - - -
diff --git a/docs/reference/pygtk-gtkcellrenderertoggle.xml b/docs/reference/pygtk-gtkcellrenderertoggle.xml deleted file mode 100644 index bf4ea707..00000000 --- a/docs/reference/pygtk-gtkcellrenderertoggle.xml +++ /dev/null @@ -1,324 +0,0 @@ - - - - - gtk.CellRendererToggle - an object that renders a toggle button into a TreeView -cell - - - - Synopsis - - - gtk.CellRendererToggle - gtk.CellRenderer - - gtk.CellRendererToggle - - - get_radio - - - set_radio - radio - - - get_active - - - set_active - setting - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.CellRenderer - +-- gtk.CellRendererToggle - - - - - - gtk.CellRendererToggle Properties - - gtk.Object Properties - gtk.CellRenderer Properties - -
- - - - - - - - - "activatable" - Read/Write - If True, the toggle button can be - activated - - - - "active" - Read/Write - If True, the button is active. - - - - "inconsistent" - Read/Write - If True, the button is in an - inconsistent state. GTK+ 2.2 and above. - - - - "indicator-size" - Read-Write - Size of check or radio indicator. Allowed values: >= 0. - Default value: 12. - - - - "radio" - Read/Write - If True, draw the toggle button as a - radio button - - - - - -
- -
- - - gtk.CellRendererToggle Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.CellRenderer Signal Prototypes - - - - "toggled" - - callback - cellrenderertoggle - - path - - user_param1 - - ... - - - - - - - - - - Description - - The gtk.CellRendererToggle - manages the rendering of toggle button into a gtk.TreeView - cell. The button is drawn as a radio- or checkbutton, depending on the - "radio" property. When activated, it emits the toggled signal. - - - - - Constructor - - - gtk.CellRendererToggle - - - - Returns : - the new cell renderer - - - - Creates a new gtk.CellRendererToggle. -The toggle button rendering parameters are adjusted using the object -properties. The object properties can be set globally (with set_property()). -Also, with gtk.TreeViewColumn, -you can bind a property to a value in a gtk.TreeModel. -For example, you can bind the "active" property on the cell renderer to a -boolean value in the model, thus causing the check button to reflect the -state of the model. - - - - - Methods - - - gtk.CellRendererToggle.get_radio - - - get_radio - - - - Returns : - True if we're rendering -radio toggles rather than checkboxes - - - - The get_radio() method returns -True if radio toggles rather than checkboxes are being -rendered. - - - - - gtk.CellRendererToggle.set_radio - - - set_radio - radio - - - - radio : - If True make the toggle look -like a radio button - - - - The set_radio() method sets the style -of the toggle button. If radio is -True, the cell renderer renders a radio toggle (i.e. a -toggle in a group of mutually-exclusive toggles). If -False, it renders a check toggle (a standalone boolean -option). This can be set globally for the cell renderer, or changed just -before rendering each cell in the model (for gtk.TreeView, you -set up a per-row setting using gtk.TreeViewColumn -to associate model columns with cell renderer properties). - - - - - gtk.CellRendererToggle.get_active - - - get_active - - - - Returns : - True if the cell renderer is -active. - - - - The get_active() method returns -True if the cell renderer is active. See gtk.CellRendererToggle.set_active(). - - - - - gtk.CellRendererToggle.set_active - - - set_active - setting - - - - setting : - the value to set. - - - - The set_active() method activates a -cell renderer if setting is True -and or deactivates a cell renderer if setting is -False. - - - - - - - Signals - - - The "toggled" gtk.CellRendererToggle Signal - - - callback - cellrenderertoggle - path - user_param1 - ... - - - - - cellrenderertoggle : - the cellrenderertoggle that received the -"toggled" signal - - - path : - the path of the cellrenderertoggle represented - as a string - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "toggled" signal is emitted when the toggle button in the - cell changes state. - - - - - -
diff --git a/docs/reference/pygtk-gtkcellview.xml b/docs/reference/pygtk-gtkcellview.xml deleted file mode 100644 index 4262b7ef..00000000 --- a/docs/reference/pygtk-gtkcellview.xml +++ /dev/null @@ -1,467 +0,0 @@ - - - - - - gtk.CellView - a widget displaying a single row of a gtk.TreeModel -(new in PyGTK 2.6). - - - - Synopsis - - - gtk.CellView - gtk.Widget - gtk.CellLayout - - gtk.CellView - - - - set_model - model - - - set_displayed_row - path - - - get_displayed_row - - - - get_size_of_row - path - requisition - - - set_background_color - color - - - get_cell_renderers - - - - - -Functions - - - gtk.cell_view_new_with_text - text - - gtk.cell_view_new_with_markup - markup - - gtk.cell_view_new_with_pixbuf - pixbuf - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.CellView (implements gtk.CellLayout) - - - - - - gtk.CellView Properties - - gtk.Object Properties - gtk.Widget Properties - -
- - - - - - - - - "background" - Write - The background color as a string. Default value: -None - - - - "background-gdk" - Read-Write - The background color as a gtk.gdk.Color. - - - - "background-set" - Read-Write - If True, use the "background-gdk" -property to set the background color. - - - - "model" - Read-Write - The model for cell view. Available in GTK+ 2.10 and - above. - - - - - -
- -
- - - gtk.CellView Style Properties - - gtk.Widget Style Properties - - - - - gtk.CellView Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - - - - Description - - - This widget is available in PyGTK 2.6 and above. - - - The gtk.CellView is a -widget that displays one row of a gtk.TreeModel. gtk.CellView -implements the gtk.CellLayout -interface that provides for the addition and management of gtk.CellRenderer -objects. - - - - Constructor - - - gtk.CellView - - - - - Returns : - a new gtk.CellView - - - - - This constructor is available in PyGTK 2.6 and above. - - - Creates a new gtk.CellView -widget. - - - - - Methods - - - gtk.CellView.set_model - - - set_model - model - - - - model : - a gtk.TreeModel or None - - - - - This method is available in PyGTK 2.6 and above. - - - The set_model() method sets the gtk.TreeModel -used by the cell view to that specified by model. If -model is None the cell view's -model will be unset. - - - - - gtk.CellView.set_displayed_row - - - set_displayed_row - path - - - - path : - a tree path or None to unset -the row - - - - - This method is available in PyGTK 2.6 and above. - - - The set_displayed_row() method sets the -row of the model that is currently displayed to the path specified by -path. If path is -None the display row will be unset, and the contents of -the cell view "stick" at their last value. This is not normally a desired -result, but may be a needed intermediate state if say, the model for the -cell view becomes temporarily empty. - - - - - gtk.CellView.get_displayed_row - - - get_displayed_row - - - - - Returns : - the path of the currently displayed row in the -cell view's model - - - - - This method is available in PyGTK 2.6 and above. - - - The get_displayed_row() method returns -the path of the currently displayed row as set by the set-displayed_row() -method. - - - - - gtk.CellView.get_size_of_row - - - get_size_of_row - path - - - - path : - the path of a row - - - Returns : - a gtk.Requisition -containing the required size data - - - - - This method is available in PyGTK 2.6 and above. - - - The get_size_of_row() method returns a -gtk.Requisition -containing the size required for displaying the row with the tree path -specified by path. - - - - - gtk.CellView.set_background_color - - - set_background_color - color - - - - color : - - - - - - This method is available in PyGTK 2.6 and above. - - - The set_background_color() method sets -the background color of the cell view to the gtk.gdk.Color -specified by color. - - - - - gtk.CellView.get_cell_renderers - - - get_cell_renderers - - - - - Returns : - a list of the gtk.CellRenderer -objects of the cell view. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_cell_renderers() method returns -a list containing the gtk.CellRenderer -objects used by the cell view. - - - - - - - Functions - - - gtk.cell_view_new_with_text - - - gtk.cell_view_new_with_text - text - - - - text : - a string - - - Returns : - a new gtk.CellView - - - - - This function is available in PyGTK 2.6 and above. - - - The gtk.cell_view_new_with_text() function -creates a new gtk.CellView with -a gtk.CellRendererText -displaying the string specified by text. - - - - - gtk.cell_view_new_with_markup - - - gtk.cell_view_new_with_markup - markup - - - - markup : - a string containing Pango markup to be -displayed. - - - Returns : - a new gtk.CellView - - - - - This function is available in PyGTK 2.6 and above. - - - The gtk.cell_view_new_with_markup() -function creates a new gtk.CellView with -a gtk.CellRendererText -displaying the Pango markup specified by -markup. - - - - - gtk.cell_view_new_with_pixbuf - - - gtk.cell_view_new_with_pixbuf - pixbuf - - - - pixbuf : - a gtk.gdk.Pixbuf - - - Returns : - a new gtk.CellView - - - - - This function is available in PyGTK 2.6 and above. - - - The gtk.cell_view_new_with_pixbuf() -function creates a new gtk.CellView with -a gtk.CellRendererPixbuf -displaying the gtk.gdk.Pixbuf -specified by pixbuf. - - - - - -
diff --git a/docs/reference/pygtk-gtkcheckbutton.xml b/docs/reference/pygtk-gtkcheckbutton.xml deleted file mode 100644 index b1ea8042..00000000 --- a/docs/reference/pygtk-gtkcheckbutton.xml +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - gtk.CheckButton - a toggle button widget styled as a checkbox and label - - - - - Synopsis - - - gtk.CheckButton - gtk.ToggleButton - - gtk.CheckButton - labelNone - use_underline - True - - - - - - Ancestry - - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Button - +-- gtk.ToggleButton - +-- gtk.CheckButton - - - - - - gtk.CheckButton Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Button Properties - gtk.ToggleButton Properties - - - - - gtk.CheckButton Style Properties - - gtk.Widget Style Properties - gtk.Button Style Properties - -
- - - - - - - - - "indicator-size" - Read/Write - The size of the check or radio indicator - - - - "indicator-spacing" - Read/Write - The spacing around the check or radio indicator - - - - - -
- -
- - - gtk.CheckButton Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Button Signal Prototypes - gtk.ToggleButton Signal Prototypes - - - - Description - - A gtk.CheckButton -places a discrete gtk.ToggleButton -next to a widget, (usually a gtk.Label). See the -section on gtk.ToggleButton -widgets for more information about toggle and check buttons. The signal -('toggled') is also inherited from gtk.ToggleButton. - - - - - Constructor - - - gtk.CheckButton - labelNone - use_underline - True - - - - - - label : - a string to be used as the label text or -None - - - use_underline : - if True, an underscore in the - label text indicates the next character should be underlined and - used for the mnemonic accelerator key if it is the first character - so marked. Available in PyGTK 2.4 and above. - - - Returns : - a new checkbutton object - - - - Creates a new checkbutton with a text label specified by -label. If label is -None or not specified then no label is created. If -label contains underscore characters then the -character following the underscore will be underlined and the character -following the first underscore will be used as the mnemonic keyboard -accelerator. - - In PyGTK 2.4 and above the use_underline -parameter is available and defaults to True. If -use_underline is set to False the -label text will not be parsed for mnemonic characters. - - - -
diff --git a/docs/reference/pygtk-gtkcheckmenuitem.xml b/docs/reference/pygtk-gtkcheckmenuitem.xml deleted file mode 100644 index 8912a5ed..00000000 --- a/docs/reference/pygtk-gtkcheckmenuitem.xml +++ /dev/null @@ -1,471 +0,0 @@ - - - - - - gtk.CheckMenuItem - a menu item with a check box. - - - - Synopsis - - - gtk.CheckMenuItem - gtk.MenuItem - - gtk.CheckMenuItem - label - None - use_underline - True - - - set_active - is_active - - - get_active - - - toggled - - - set_inconsistent - setting - - - get_inconsistent - - - set_draw_as_radio - draw_as_radio - - - get_draw_as_radio - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Item - +-- gtk.MenuItem - +-- gtk.CheckMenuItem - - - - - - gtk.CheckMenuItem Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - -
- - - - - - - - - "active" - Read/Write - If True, the menu item is checked. - - - - "inconsistent" - Read/Write - If True, display an "inconsistent" -state. - - - - "draw-as-radio" - Read/Write - If True, display like a radio menu item. -GTK+ 2.4 and above. - - - - - -
- -
- - - gtk.CheckMenuItem Style Properties - - gtk.Widget Style Properties - gtk.MenuItem Style Properties - -
- - - - - - - - - "indicator-size" - Read - The size of the check or radio indicator. - - - - - -
- -
- - - Attributes - -
- - - - - - - - - - "active" - Read - If True, the menu item is -checked. - - - - - -
- -
- - - gtk.CheckMenuItem Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Item Signal Prototypes - gtk.MenuItem Signal Prototypes - - - - "toggled" - - callback - checkmenuitem - - user_param1 - - ... - - - - - - - - - - Description - - A gtk.CheckMenuItem -is a menu item that maintains the state of a boolean value in addition to a -gtk.MenuItem'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 gtk.MenuItem. -Activating the gtk.MenuItem -toggles the value. - - - - - Constructor - - - gtk.CheckMenuItem - labelNone - use_underline - True - - - - label : - a string to be used as the label text or -None - - - use_underline : - if True, an underscore in the -label text indicates the next character should be underlined and used for the -mnemonic accelerator key if it is the first character so -marked. Available in PyGTK 2.4 and above. - - - Returns : - a new checkmenuitem - - - - Creates a new checkmenuitem with a text label specified by -label. If label is -None or not specified then no label is created. If -label contains underscore characters then the -character following the underscore will be underlined and the character -following the first underscore will be used as the mnemonic keyboard -accelerator. - - In PyGTK 2.4 and above the use_underline -parameter is available and defaults to True. If -use_underline is set to False the -label text will not be parsed for mnemonic characters. - - - - - Methods - - - gtk.CheckMenuItem.set_active - - - set_active - is_active - - - - is_active : - If True set the check box -active - - - - The set_active() method sets the active -state of the menu item's check box according to the value of -is_active. - - - - - gtk.CheckMenuItem.get_active - - - get_active - - - - Returns : - True if the menu item is -checked (check box is active). - - - - The get_active() method returns whether -the check menu item is active. See gtk.CheckMenuItem.set_active(). - - - - - gtk.CheckMenuItem.toggled - - - toggled - - - The toggle() method emits the "toggled" signal on the -checkmenuitem - - - - - gtk.CheckMenuItem.set_inconsistent - - - set_inconsistent - setting - - - - setting : - If True display an -"inconsistent" third state check - - - - The set_inconsistent() method sets the -check box to display an "inconsistent" state if the value of -setting is True. The -"inconsistent" state display is removed if setting is -False. - - An application may want to display an "inconsistent" state if -the user has selected a range of elements (such as some text or spreadsheet -cells) that are affected by a boolean setting, and the current values for -those elements cannot be represented by a single checkmenuitem state. The -set_inconsistent() method only affects visual -appearance, it doesn't affect the semantics of the widget. - - - - - gtk.CheckMenuItem.get_inconsistent - - - get_inconsistent - - - - Returns : - True if the checkmenuitem -displays the "inconsistent" state - - - - The get_inconsistent() method retrieves -the value set by the set_inconsistent() -method. - - - - - gtk.CheckMenuItem.set_draw_as_radio - - - set_draw_as_radio - draw_as_radio - - - - draw_as_radio : - If True display the check - menu item like a radio menu item - - - - - This method is available in PyGTK 2.4 and above. - - - The set_draw_as_radio() method displays -the check menu item like a radio menu item if the value of -draw_as_radio is True. If -draw_as_radio is False the check -menu item is displayed as normal. - - - - - gtk.CheckMenuItem.get_draw_as_radio - - - get_draw_as_radio - - - - Returns : - True if the checkmenuitem - should be displayed like a radio menu item. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_draw_as_radio() method -retrieves the value set by the set_draw_as_radio() -method. - - - - - - - Signals - - - The "toggled" gtk.CheckMenuItem Signal - - - callback - checkmenuitem - user_param1 - ... - - - - - checkmenuitem : - the checkmenuitem that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "toggled" signal is emitted when the checkmenuitem changes -state. - - - - - -
diff --git a/docs/reference/pygtk-gtkclipboard.xml b/docs/reference/pygtk-gtkclipboard.xml deleted file mode 100644 index ee4d73c5..00000000 --- a/docs/reference/pygtk-gtkclipboard.xml +++ /dev/null @@ -1,1281 +0,0 @@ - - - - - gtk.Clipboard an object to store data to - and retrieve data from (new in PyGTK 2.2) - - - - Synopsis - - - gtk.Clipboard - gobject.GObject - - gtk.Clipboard - displaygtk.gdk.display_get_default() - selection"CLIPBOARD" - - - get_display - - - - set_with_data - targets - get_func - clear_func - user_data - - - get_owner - - - - clear - - - - set_text - text - len-1 - - - request_contents - target - callback - user_dataNone - - - request_text - callback - user_dataNone - - - request_targets - callback - user_dataNone - - - wait_for_contents - target - - - wait_for_text - - - - wait_is_text_available - - - - wait_for_targets - - - wait_is_target_available - target - - set_can_store - targets - - store - - - request_image - callback - user_dataNone - - - wait_for_image - - - - set_image - pixbuf - - - wait_is_image_available - - - - request_rich_text - buffer - callback - user_dataNone - - - wait_for_rich_text - buffer - - - wait_is_rich_text_available - buffer - - - - -Functions - - - gtk.clipboard_get - selection"CLIPBOARD" - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Clipboard - - - - - - gtk.Clipboard Signal Prototypes - - gobject.GObject Signal Prototypes - - - - "owner-change - - callback - clipboard - event - user_param1 - ... - - - - - - - - - Description - - - This object is available in PyGTK 2.2 and above. - - - The gtk.Clipboard -object represents a clipboard of data shared between different processes or -between different widgets in the same process. Each clipboard is identified -by a name encoded as a gtk.gdk.Atom. The -gtk.Clipboard is -basically a higher-level interface to the lower-level gtk.SelectionData -and selection interface. The built-in atoms are: - - - - "PRIMARY" - - - "SECONDARY" - - - "CLIPBOARD" - - - "BITMAP" - - - "COLORMAP" - - - "DRAWABLE" - - - "PIXMAP" - - - "STRING" - - - "WINDOW" - - - - Creating a gtk.gdk.Atom from -strings can be done with the gtk.gdk.atom_intern() -constructor function though PyGTK will usually do the -conversion under the covers as needed. The name of a gtk.gdk.Atom can be -retrieved using the Python str() function: - - - name = str(atom) - - - The default clipboard corresponds to the "CLIPBOARD" atom; another -commonly used clipboard is the "PRIMARY" clipboard, which, in X, -traditionally contains the currently selected text. - -To simultaneously support different formats on the clipboard, the -clipboard mechanism allows you to provide callbacks instead of the actual -data. When you set the contents of the clipboard, you can either supply the -data directly (via a method like set_text()), -or you can supply a callback to be called when the data is needed (via the -set_with_data() -method.) Providing a callback also avoids making unnecessary copies of the -data. - -Along with the methods to get the clipboard contents as an arbitrary -data chunk, there is a method to retrieve it as text, the wait_for_text() -method. This method takes care of determining which formats are advertised -by the clipboard provider, asking for the clipboard in the best available -format and converting the results into the UTF-8 encoding. (The standard -form for representing strings in GTK+.) - - - - - Constructor - - - gtk.Clipboard - displaygtk.gdk.display_get_default() - selection"CLIPBOARD" - - - - display : - the gtk.gdk.Display -for which the clipboard is to be retrieved or created. - - - selection : - a string that identifies the clipboard -to use. - - - Returns : - the appropriate clipboard object or if no - clipboard already exists, a new one will be created. Once a - clipboard object has been created, it is persistent for all time and - cannot be freed. - - - - - This constructor is available in PyGTK 2.2 and above. - - - Returns the clipboard object for the gtk.gdk.Display -specified by display and the selection specified by -the string in selection. Cut/copy/paste menu items -and keyboard shortcuts should use the default clipboard, returned by passing -"CLIPBOARD" for selection. The -currently-selected object or text should be provided on the clipboard -identified by "PRIMARY". Cut/copy/paste menu items -conceptually copy the contents of the "PRIMARY" clipboard -to the default clipboard, i.e. they copy the selection to what the user sees -as the clipboard. - - See -http://www.freedesktop.org/standards/clipboards-spec/clipboards.txt -for a detailed discussion of the "CLIPBOARD" vs. "PRIMARY" selections under -the X window system. On Win32 the "PRIMARY" clipboard is -essentially ignored. - - It's possible to have arbitrarily named clipboards. If you do -invent new clipboards, you should prefix the selection name with an -underscore (because the ICCCM requires that nonstandard atoms are -underscore-prefixed), and namespace it as well. For example, if your -application called "Foo" has a special-purpose clipboard, you might call it -"_FOO_SPECIAL_CLIPBOARD". - - In PyGTK 2.4 and above, the display -argument is optional and defaults to the default display returned from the -gtk.gdk.display_get_default() -function. - - In PyGTK 2.4 and above, the selection -argument is optional and defaults to "CLIPBOARD". - - - - - Methods - - - gtk.Clipboard.get_display - - - get_display - - - - - Returns : - the gtk.gdk.Display -associated with the clipboard - - - - - This method is available in PyGTK 2.2 and above. - - - The get_display() method returns the -gtk.gdk.Display -associated with the clipboard. - - - - - gtk.Clipboard.set_with_data - - - set_with_data - targets - get_func - clear_func - user_data - - - - targets : - a list of 3-tuples containing information about -the available forms for the clipboard data - - - get_func : - a function to call to get the actual clipboard -data - - - clear_func : - when the clipboard contents are set again, -this function will be called, and get_func will not -be subsequently called. - - - user_data : - the user data to pass to -get_func and -clear_func. - - - Returns : - True if setting the -clipboard data succeeded. If setting the clipboard data failed the -provided callback functions will be ignored. - - - - - This method is available in PyGTK 2.2 and above. - - - The set_with_data() method virtually -sets the contents of the specified clipboard by providing a list of -supported formats (specified by targets) for the -clipboard data and a function (specified by get_func) -to call to get the actual data when it is -requested. clear_func is a function that is called -when the contents of the clipboard are being changed to provide cleanup -operations on -user_data. user_data is passed -to get_func and clear_func -when they are invoked. The 3-tuples listed in targets -contain the following items: - - - - a string representing a target supported by the -clipboard - - - a flags value used for drag and drop - a combination of: -gtk.TARGET_SAME_APP and -gtk.TARGET_SAME_WIDGET - - - an application assigned integer that is passed as a signal -parameter to help identify the target type - - - - The signature of get_func is: - - - def get_func(clipboard, selectiondata, info, data): - - - where clipboard is the gtk.Clipboard, -selectiondata is a gtk.SelectionData -object to set with the data, info is the application -assigned integer associated with a target, and data -is the user_data argument. - - The signature of clear_func is: - - - def clear_func(clipboard, data): - - - where clipboard is the gtk.Clipboard and -data is the user_data -argument. - - - - - gtk.Clipboard.get_owner - - - get_owner - - - - - Returns : - the owner of the clipboard, if any; otherwise -None. - - - - - This method is available in PyGTK 2.2 and above. - - - The get_owner() method returns the -owner set by the set_with_owner() method if neither -the set_with_data() -method nor the clear() -method have been subsequently called. This method returns -None otherwise. - - - - - gtk.Clipboard.clear - - - clear - - - - - This method is available in PyGTK 2.2 and above. - - - The clear() method clears the contents -of the clipboard. Generally this should only be called between the time you -call the set_with_data(), -and when the clear_func you supplied is -called. Otherwise, the clipboard may be owned by someone else. - - - - - gtk.Clipboard.set_text - - - set_text - text - len-1 - - - - text : - a string. - - - len : - the length of text, in -bytes, or -1, to calculate the length. - - - - - This method is available in PyGTK 2.2 and above. - - - The set_text() method sets the contents -of the clipboard to the string specified by text. If -len is given it determines the length of -text to be copied. If len is -not specified it defaults to -1 and the method calculates the text -length. - - - - - gtk.Clipboard.request_contents - - - request_contents - target - callback - user_dataNone - - - - target : - a gtk.gdk.Atom -or string representing the form that the clipboard owner should convert -the selection to. - - - callback : - a function to call when the results are received -(or the retrieval fails). - - - user_data : - user data to pass to callback - - - - - This method is available in PyGTK 2.4 and above. - - - The request_contents() method requests -the contents of clipboard in the form specified by -target. When the results of the request are later -received the function specified by callback will be -invoked and passed the data specified by -user_data. The signature of -callback is: - - - def callback(clipboard, selection_data, data): - - - where clipboard is the gtk.Clipboard -that invoked callback and selection_data is the gtk.SelectionData -containing the target data and data is -user_data. - - - - - gtk.Clipboard.request_text - - - request_text - callback - user_dataNone - - - - callback : - a function to call when the text is received, -or the retrieval fails. (It will always be called -one way or the other.) - - - user_data : - user data to pass to -callback. - - - - - This method is available in PyGTK 2.4 and above. - - - The request_text() method requests the -contents of the clipboard as text. When the text is later received, it will -be converted to UTF-8 if necessary, and callback will -be called with the data specified by user_data. The -signature of callback is: - - - def callback(clipboard, text, data): - - - where clipboard is the gtk.Clipboard -that text is retrieved from and -data is user_data. -text will contain the resulting text if the request -succeeded, or the empty string if it failed. This could happen for various -reasons, in particular if the clipboard was empty or if the contents of the -clipboard could not be converted into text form. - - - - - gtk.Clipboard.request_targets - - - request_targets - callback - user_dataNone - - - - callback : - a function to call when the targets are received, -or the retrieval fails. (It will always be called -one way or the other.) - - - user_data : - user data to pass to -callback. - - - - - This method is available in PyGTK 2.4 and above. - - - The request_targets() method requests -the contents of the clipboard as list of supported targets. When the list -is later received, callback will be called with the -data specified by user_data. The signature of -callback is: - - - def callback(clipboard, targets, data): - - - where clipboard is the gtk.Clipboard -that targets is retrieved -from. targets is a tuple containing the gtk.gdk.Atom objects -corresponding to the targets of clipboard. targets -will contain the resulting targets if the request succeeded, or an empty -tuple if it failed. - - - - - gtk.Clipboard.wait_for_contents - - - wait_for_contents - target - - - - target : - an atom or string representing the form into -which the clipboard owner should convert the selection. - - - Returns : - a newly-allocated gtk.SelectionData -object or None if retrieving the given target -failed. - - - - - This method is available in PyGTK 2.2 and above. - - - The wait_for_contents() method requests -the contents of the clipboard using the target specified by -target. This method waits for the data to be received -using the main loop, so events, timeouts, etc, may be dispatched during the -wait. - - - - - gtk.Clipboard.wait_for_text - - - wait_for_text - - - - - Returns : - a string, or None if -retrieving the selection data failed. (This could happen for various reasons, -in particular if the clipboard was empty or if the contents of the -clipboard could not be converted into text form.) - - - - - This method is available in PyGTK 2.2 and above. - - - The wait_for_text() method requests the -contents of the clipboard as text and converts the result to UTF-8 if -necessary. This method waits for the data to be received using the main -loop, so events, timeouts, etc, may be dispatched during the wait. - - - - - gtk.Clipboard.wait_is_text_available - - - wait_is_text_available - - - - - Returns : - True is there is text -available. - - - - - This method is available in PyGTK 2.2 and above. - - - The wait_is_text_available() method -tests to see if there is text available to be copied from the clipboard. -This is done by requesting the "TARGETS" atom and checking if it contains -any of the names: "STRING", "TEXT", "COMPOUND_TEXT", "UTF8_STRING". This -method waits for the data to be received using the main loop, so events, -timeouts, etc, may be dispatched during the wait. - - This method is a little faster than calling the wait_for_text() -since it doesn't need to retrieve the actual text. - - - - - gtk.Clipboard.wait_for_targets - - - wait_for_targets - - - - Returns : - returns a tuple containing any targets that are -present on the clipboard or None. - - - - - This method is available in PyGTK 2.4 and above. - - - The wait_for_targets() method returns a -tuple containing the targets (as gtk.gdk.Atom objects) -that are present on the clipboard, or None if there -aren't any targets available. This function waits for the data to be -received using the main loop, so events, timeouts, etc, may be dispatched -during the wait. - - - - - gtk.Clipboard.wait_is_target_available - - - wait_is_target_available - target - - - - target : - an atom or string representing the target of -interest. - - - Returns : - True if the target is -available. - - - - - This method is available in PyGTK 2.6 and above. - - - The wait_is_target_available() method -tests to see if the target specified by target is -available to be copied from the clipboard. This method can be used to -determine if a Paste menu item should be -insensitive or not. - - If you want to see if there's text available on the clipboard, -use the wait_is_text_available() -method instead. - - - - - gtk.Clipboard.set_can_store - - - set_can_store - - - - targets : - a list of 3-tuples containing information about -the available forms that should be stored or None to -indicate that all forms should be stored. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_can_store() method sets a hint -that the gtk.Clipboard can -store the list of targets specified by targets can be -stored somewhere when the application exits or when the store() -method is called. This value is reset when the clipboard owner -changes. Where the clipboard data is stored is platform dependent, see the -gtk.gdk.Display.store_clipboard() -method for more information. If targets is -None all target forms currently available on the -clipboard should be stored. - - The 3-tuples listed in targets contain -the following items: - - - - a string representing a target supported by the -clipboard - - - a flags value used for drag and drop - a combination of: -gtk.TARGET_SAME_APP and -gtk.TARGET_SAME_WIDGET - - - an application assigned integer that is passed as a signal -parameter to help identify the target type - - - - - - - gtk.Clipboard.store - - - store - - - - - - This method is available in PyGTK 2.6 and above. - - - The store() method stores the current -clipboard data (as specified by the set_can_store() -method) somewhere so that it will stay around after the application has -quit. - - - - - gtk.Clipboard.request_image - - - request_image - callback - user_dataNone - - - - callback : - a function to call when the image is received, -or the retrieval fails. (It will always be called -one way or the other.) - - - user_data : - user data to pass to -callback. - - - - - This method is available in PyGTK 2.10 and above. - - - The request_image() method requests the -contents of the clipboard as a gtk.gdk.Pixbuf -image. When the image is later received, it will be converted to a gtk.gdk.Pixbuf and -callback will be called with the data specified by -user_data. The signature of -callback is: - - - def callback(clipboard, pixbuf, data): - - - where clipboard is the gtk.Clipboard -that pixbuf is retrieved from and -data is user_data. -pixbuf will contain the resulting image data if the -request succeeded, or None if it failed. This could -happen for various reasons, in particular if the clipboard was empty or if -the contents of the clipboard could not be converted into an image. - - - - - gtk.Clipboard.wait_for_image - - - wait_for_image - - - - - Returns : - a gtk.gdk.Pixbuf, -or None if retrieving the selection data failed. -(This could happen for various reasons, in particular if the clipboard was -empty or if the contents of the clipboard could not be converted into an -image.) - - - - - This method is available in PyGTK 2.10 and above. - - - The wait_for_image() method requests -the contents of the clipboard as an image and converts the result to a gtk.gdk.Pixbuf. This -method waits for the data to be received using the main loop, so events, -timeouts, etc, may be dispatched during the wait. - - - - - gtk.Clipboard.set_image - - - set_image - pixbuf - - - - pixbuf : - a gtk.gdk.Pixbuf. - - - - - This method is available in PyGTK 2.10 and above. - - - The set_image() method sets the -contents of the clipboard to the gtk.gdk.Pixbuf -specified by pixbuf. GTK+ will take responsibility -for responding for requests for the image, and for converting the image into -the requested format. - - - - - gtk.Clipboard.wait_is_image_available - - - wait_is_image_available - - - - - Returns : - True is there is an image -available. - - - - - This method is available in PyGTK 2.10 and above. - - - The wait_is_image_available() method -tests to see if there is an image available to be copied from the clipboard. -This is done by requesting the "TARGETS" atom and checking if it contains -any of the supported image targets. This method waits for the data to be -received using the main loop, so events, timeouts, etc, may be dispatched -during the wait. - - This method is a little faster than calling the wait_for_image() -since it doesn't need to retrieve the actual image data. - - - - - gtk.Clipboard.request_rich_text - - - request_rich_text - buffer - callback - user_dataNone - - - - - buffer : - a gtk.TextBuffer - to retrieve the deserialize formats from. - - - callback : - a function to call when the text is received, - or the retrieval fails. (It will always be called one way or the - other.) - - - user_data : - user data to pass to - callback. - - - - - This method is available in PyGTK 2.10 and above. - - - The request_rich_text() method requests - the contents of the clipboard as rich text. When the rich text is - later received, the function specified by - callback will be called with the argument - specified by user_data. - - The signature of the callback is: - - - def callback(clipboard, format, text, length, data): - - - where format is the atom indicating the - text format, text contains the resulting rich - text if the request succeeded, or None if it - failed, length contains the length of - text and data is - user_data. This function can fail for various - reasons, in particular if the clipboard was empty or if the contents - of the clipboard could not be converted into rich text form. - - - - - gtk.Clipboard.wait_for_rich_text - - - wait_for_rich_text - buffer - - - - - buffer : - a gtk.TextBuffer - to retrieve the deserialize formats from. - - - Returns : - a 2-tuple containing the rich text as a string - and the format string , or None if retrieving - the selection data failed. (This could happen for various reasons, - in particular if the clipboard was empty or if the contents of the - clipboard could not be converted into text - form.) - - - - - This method is available in PyGTK 2.10 and above. - - - The wait_for_rich_text() method - requests the contents of the clipboard as rich text. This method - waits for the data to be received using the main loop, so events, - timeouts, etc, may be dispatched during the wait. - - - - - gtk.Clipboard.wait_is_rich_text_available - - - wait_is_rich_text_available - buffer - - - - - buffer : - a gtk.TextBuffer - to retrieve the deserialize formats from. - - - Returns : - True if is there is rich - text available, False - otherwise. - - - - - This method is available in PyGTK 2.10 and above. - - - The wait_is_rich_text_available() - method tests to see if there is rich text available to be pasted. This - is done by requesting the TARGETS atom and checking - if it contains any of the supported rich text targets. This method - waits for the data to be received using the main loop, so events, - timeouts, etc, may be dispatched during the wait. - - This method is a little faster than calling wait_for_rich_text() - since it doesn't need to retrieve the actual text. - - - - - - - Functions - - - gtk.clipboard_get - - - gtk.clipboard_get - selection"CLIPBOARD" - - - - selection : - a string specifying a gtk.Clipboard. If - not specified it defaults to "CLIPBOARD". - - - Returns : - the appropriate clipboard object or if no - clipboard already exists, a new one will be created. Once a - clipboard object has been created, it is persistent for all time and - cannot be freed. - - - - - This function is available in PyGTK 2.4 and above. - - - The gtk.clipboard_get() function returns -the gtk.Clipboard -specified by selection for the default gtk.gdk.Display. See -the gtk.Clipboard -constructor for more information. - - - - - - - Signals - - - The "owner-change" gtk.Clipboard Signal - - callback - clipboard - event - user_param1 - ... - - - - - clipboard : - the object that received the signal. - - - event : - the event marking the ownership - change. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - - This signal is available in GTK+ 2.8 and above. - - - The "owner-changed" signal is emitted when the owner of the - clipboard is changed. - - - - - - diff --git a/docs/reference/pygtk-gtkcolorbutton.xml b/docs/reference/pygtk-gtkcolorbutton.xml deleted file mode 100644 index 51ff7d49..00000000 --- a/docs/reference/pygtk-gtkcolorbutton.xml +++ /dev/null @@ -1,459 +0,0 @@ - - - - - - gtk.ColorButton a button to launch a - color selection dialog (new in PyGTK 2.4) - - - - Synopsis - - - gtk.ColorButton - gtk.Button - - gtk.ColorButton - colorgtk.gdk.Color(0,0,0) - - - set_color - color - - - get_color - - - - set_alpha - alpha - - - get_alpha - - - set_use_alpha - use_alpha - - - get_use_alpha - - - set_title - title - - - get_title - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Button - +-- gtk.ColorButton - - - - - - gtk.ColorButton Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Button Properties - -
- - - - - - - - - "alpha" - Read-Write - The selected opacity value (0 fully transparent, 65535 -fully opaque). Available in GTK+ 2.4 and above. - - - - "color" - Read-Write - The selected color. Available in GTK+ 2.4 and above. - - - - "title" - Read-Write - The title of the color selection dialog. Available in - GTK+ 2.4 and above. - - - - "use-alpha" - Read-Write - If True, the color swatch on the - button is rendered against a checkerboard background to show - its opacity and the opacity slider is displayed in the color - selection dialog. Available in GTK+ 2.4 and above. - - - - - -
- -
- - - gtk.ColorButton Style Properties - - gtk.Widget Style Properties - gtk.Button Style Properties - - - - - gtk.ColorButton Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Button Signal Prototypes - - - - "color-set" - - callback - colorbutton - user_param1 - ... - - - - - - - - - Description - - The gtk.ColorButton - is a button that displays the currently selected color and, when - clicked, opens a gtk.ColorSelectionDialog - to change the color. It's a suitable widget for selecting a color in a - preference dialog. The gtk.ColorButton - is available in PyGTK 2.4 and above. - - - - - Constructor - - - gtk.ColorButton - colorgtk.gdk.Color(0,0,0) - - - - color : - an optional gtk.gdk.Color to set the current color with - - - Returns : - a new color button. - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new color button with the current color set to the color -specified by the optional gtk.gdk.Color -color. A color button is a small button containing a -swatch representing the current selected color. When the button is clicked, -a gtk.ColorSelectionDialog -will open, allowing the user to select a color. The swatch will be updated -to reflect the new color the user selects. - - - - - Methods - - - gtk.ColorButton.set_color - - - set_color - color - - - - color : - A gtk.gdk.Color to set the current color with. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_color() method sets the current - color (and the "color" property) to the color specified by the gtk.gdk.Color - color. - - - - - gtk.ColorButton.get_color - - - get_color - - - - - Returns : - a gtk.gdk.Color - specifying the current color. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_color() method returns the - value of the "color" property which is a gtk.gdk.Color - specifying the current color in the gtk.ColorButton - widget. - - - - - gtk.ColorButton.set_alpha - - - set_alpha - alpha - - - - alpha : - The opacity in the range 0 to - 65535. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_alpha() method sets the current - opacity (and the "alpha" property) to the value specified by - alpha. - - - - - gtk.ColorButton.get_alpha - - - get_alpha - - - - Returns : - the opacity in the range 0 to - 65535. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_alpha() method returns the - value of the "alpha" property that contains the opacity setting. - - - - - gtk.ColorButton.set_use_alpha - - - set_use_alpha - use_alpha - - - - use_alpha : - if True, the color button - should use the alpha channel. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_use_alpha() method sets the - "use-alpha" property to the value of - use_alpha. If use_alpha - is True, the color swatch on the button is rendered - against a checkerboard background to show its opacity and the opacity - slider is displayed in the color selection dialog. - - - - - gtk.ColorButton.get_use_alpha - - - get_use_alpha - - - - Returns : - True if the color sample - should use the alpha channel - - - - - This method is available in PyGTK 2.4 and above. - - - The get_use_alpha() method returns the - value of the "use-alpha" property. If True the - color selection dialog should use the alpha channel. - - - - - gtk.ColorButton.set_title - - - set_title - title - - - - title : - a string containing the new gtk.ColorSelectionDialog - title. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_title() method sets the title - for the color selection dialog to the string contained in - title. The "title" property is also set. - - - - - gtk.ColorButton.get_title - - - get_title - - - - Returns : - the title of the gtk.ColorSelectionDialog - - - - - This method is available in PyGTK 2.4 and above. - - - The get_title() method returns the - value of the "title" property that contains the title of the color - selection dialog. - - - - - - - Signals - - - The "color-set" gtk.ColorButton Signal - - - callback - colorbutton - user_param1 - ... - - - - - colorbutton : - the colorbutton that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in PyGTK 2.4 and above. - - - The "color-set" signal is emitted when the user selects a - color. When handling this signal, use the get_color() - and the get_alpha() - methods to find out what color was just selected. - - - - - -
diff --git a/docs/reference/pygtk-gtkcolorselection.xml b/docs/reference/pygtk-gtkcolorselection.xml deleted file mode 100644 index 2f0cd263..00000000 --- a/docs/reference/pygtk-gtkcolorselection.xml +++ /dev/null @@ -1,661 +0,0 @@ - - - - - - gtk.ColorSelection - a widget used to select a color. - - - - Synopsis - - - gtk.ColorSelection - gtk.VBox - - gtk.ColorSelection - - - get_has_opacity_control - - - set_has_opacity_control - has_opacity - - - get_has_palette - - - set_has_palette - has_palette - - - set_current_color - color - - - set_current_alpha - alpha - - - get_current_color - - - - get_current_alpha - - - set_previous_color - color - - - set_previous_alpha - alpha - - - get_previous_color - - - - get_previous_alpha - - - is_adjusting - - - - -Functions - - - gtk.color_selection_palette_from_string - str - - gtk.color_selection_palette_to_string - colors - - - - - - Ancestry - - +-- gobject.GObject - +--gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Box - +-- gtk.VBox - +-- gtk.ColorSelection - - - - - - gtk.ColorSelection Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Box Properties - -
- - - - - - - - - "current-alpha" - Read/Write - The current opacity value (0 fully transparent, 65535 fully - opaque) - - - - "current-color" - Read/Write - The current color as a gtk.gdk.Color - - - - "has-opacity-control" - Read/Write - If True, the color selector should allow - setting opacity - - - - "has-palette" - Read/Write - If True, a palette should be used - - - - - -
- -
- - - gtk.ColorSelection Style Properties - - gtk.Widget Style Properties - - - - - gtk.ColorSelection Child Properties - - gtk.Box Child Properties - - - - - gtk.ColorSelection Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - "color-changed" - - callback - colorselection - - user_param1 - - ... - - - - - - - - - - Description - - The gtk.ColorSelection -is a widget that is used to select a color. It consists of a color wheel and -entry boxes for color parameters such as hue, saturation, value, red, green, -blue, and color name and optionally an opacity control and/or a color -palette. It is found on the standard color selection dialog box gtk.ColorSelectionDialog. -The color wheel can be manipulated to set a new color or new entries can be -made in the entry boxes. The new color is displayed next to the previous -color. An eyedropper button is available to allow the selection of a color -from a pixel location on the display. - - - - - Constructor - - - gtk.ColorSelection - - - - Returns : - a new gtk.ColorSelection - - - - Creates a new gtk.ColorSelection -widget. - - - - - Methods - - - gtk.ColorSelection.get_has_opacity_control - - - get_has_opacity_control - - - - Returns : - True if the -colorsel has an opacity control; -False if it doesn't. - - - - The get_opacity() method determines -whether the colorselection is displaying an opacity control. - - - - - gtk.ColorSelection.set_has_opacity_control - - - set_has_opacity_control - has_opacity - - - - has_opacity : - If True the colorselection -will display the opacity control. - - - - The set_has_opacity_control() method -sets the "has-opacity-control" property to the value of -has_opacity. If has_opacity is -True the colorselection will display the opacity control -slider and entry box; otherwise the opacity control is not displayed. - - - - - gtk.ColorSelection.get_has_palette - - - get_has_palette - - - - Returns : - True if the selector has a -palette; False if it hasn't. - - - - The get_has_palette() method returns -the value of the "has-palette" property that determines whether the color -selector displays a color palette. - - - - - gtk.ColorSelection.set_has_palette - - - set_has_palette - has_palette - - - - has_palette : - If True the color palette is -displayed. - - - - The set_has_palette() method sets the -"has-palette" property to the value of has_palette. -If has_palette is True the palette will be displayed; -otherwise the palette will be hidden. - - - - - gtk.ColorSelection.set_current_color - - - set_current_color - color - - - - color : - A gtk.gdk.Color to set -the current color with. - - - - The set_current_color() method sets the -current color to the value of color. The first time -this is called, it will also set the previous color to the value of -color too. - - - - - gtk.ColorSelection.set_current_alpha - - - set_current_alpha - alpha - - - - alpha : - an integer between 0 and -65535. - - - - The set_current_alpha() method sets the -"current-alpha" property (the opacity) to the value of alpha. The alpha -(opacity) is displayed in the range of 0 to 255 in the colorselection. The -first time this is called, it will also set the previous opacity to the -value of alpha too. - - - - - gtk.ColorSelection.get_current_color - - - get_current_color - - - - - Returns : - a gtk.gdk.Color -representing the current color. - - - - The get_current_color() method -retrieves the current color in the colorselection. - - - - - gtk.ColorSelection.get_current_alpha - - - get_current_alpha - - - - Returns : - the current alpha value in the range 0 to -65535. - - - - The get_current_alpha() method returns -the value of the "current_alpha" property that controls the opacity -value. - - - - - gtk.ColorSelection.set_previous_color - - - set_previous_color - color - - - - color : - a gtk.gdk.Color to set -the previous color with. - - - - The set_previous_color() method sets -the 'previous' color to the value of color. -Applications usually do not call this method. The first time set_current_color() -the 'previous' color will be set. - - - - - gtk.ColorSelection.set_previous_alpha - - - set_previous_alpha - alpha - - - - alpha : - an integer between 0 and -65535. - - - - The set_previous_alpha() method sets the 'previous' alpha to the -value of alpha. Applications usually do not call this -method. The first time set_current_alpha() -the 'previous' alpha will be set. - - - - - gtk.ColorSelection.get_previous_color - - - get_previous_color - - - - - Returns : - a gtk.gdk.Color with -the previous color value. - - - - The get_previous_color() method -retrieves the previous color value. - - - - - - gtk.ColorSelection.get_previous_alpha - - - get_previous_alpha - - - - Returns : - an integer between 0 and -65535. - - - - The get_previous_alpha() method returns the previous alpha -value. - - - - - gtk.ColorSelection.is_adjusting - - - is_adjusting - - - - Returns : - True if the user is -currently dragging a color around, and False if the -selection has stopped. - - - - The is_adjusting() method retrieves the -current state of the colorselection. If True the user is in the process of -changing the current color. - - - - - - - Functions - - - gtk.color_selection_palette_from_string - - - gtk.color_selection_palette_from_string - str - - - - str : - the string containing the list of -colors - - - Returns : - a list of gtk.gdk.Color objects -or None if the conversion fails - - - - The -gtk.color_selection_palette_from_string() function -returns a list of gtk.gdk.Color objects -corresponding to the color specifications in the string specified by -str. str is a colon-separated list of color names -readable by gtk.gtk.color_parse(). -If str cannot be converted to a list of color this -function returns None. - - - - - gtk.color_selection_palette_to_string - - - gtk.color_selection_palette_to_string - colors - - - - colors : - a list or tuple of gtk.gdk.Color -objects - - - Returns : - a string containing a colon-separated list of -colors - - - - The gtk.color_selection_palette_to_string() -function returns a string containing a colon-separated list of the -representation of the gtk.gdk.Color objects -in colors. - - This function is useful to save a special palette of colors for -a gtk.ColorSelection -as a string that can later be used by calling the gobject.set_property() -method to set the "gtk-color-palette" property on the default gtk.Settings -returned from the gtk.settings_get_default()) -function. - - - - - - - Signals - - - The "color-changed" gtk.ColorSelection Signal - - - callback - colorselection - user_param1 - ... - - - - - colorselection : - the colorselection that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "color-changed" signal is emitted when the current color in -the colorselection changes. - - - - - -
diff --git a/docs/reference/pygtk-gtkcolorselectiondialog.xml b/docs/reference/pygtk-gtkcolorselectiondialog.xml deleted file mode 100644 index 4c4bfcd0..00000000 --- a/docs/reference/pygtk-gtkcolorselectiondialog.xml +++ /dev/null @@ -1,165 +0,0 @@ - - - - - - gtk.ColorSelectionDialog - a standard dialog for selecting a color. - - - - Synopsis - - - gtk.ColorSelectionDialog - gtk.Dialog - - gtk.ColorSelectionDialog - title - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Window - +-- gtk.Dialog - +-- gtk.ColorSelectionDialog - - - - - - gtk.ColorSelectionDialog Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Window Properties - gtk.Dialog Properties - - - - - gtk.ColorSelectionDialog Style Properties - - gtk.Widget Style Properties - gtk.Dialog Style Properties - - - - - Attributes - -
- - - - - - - - - "colorsel" - Read - The gtk.ColorSelection -widget contained in the dialog. - - - - "ok_button" - Read - The "OK" button contained in the dialog. - - - - "cancel_button" - Read - The "Cancel" button contained in the dialog. - - - - "help_button" - Read - The "Help" button contained in the dialog. - - - - - -
- -
- - - gtk.ColorSelectionDialog Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Window Signal Prototypes - gtk.Dialog Signal Prototypes - - - - Description - - The gtk.ColorSelectionDialog -provides a standard dialog that allows a user to select a color. The gtk.ColorSelectionDialog -uses an embedded gtk.ColorSelection -to provide color selection capability. - - Use the attributes (ok_button, cancel_button and help_button) of -the colorselectiondialog to connect handlers to the "OK", "Cancel" and -"Help" button "clicked" signals. The colorsel attribute provides access to -the colorselection widget. Connect a handler to its "color-changed" signal -to be notified when the color is changed. The current color can be retrieved -using the gtk.ColorSelection.get_current_color() -method. - - - - - Constructor - - - gtk.ColorSelectionDialog - title - - - - title : - a string to be used as the dialog -title. - - - Returns : - a new colorselectiondialog - - - - Creates a new gtk.ColorSelectionDialog -using the string contained in title as the text for -the dialog title. - - - -
diff --git a/docs/reference/pygtk-gtkcombo.xml b/docs/reference/pygtk-gtkcombo.xml deleted file mode 100644 index 11c77c31..00000000 --- a/docs/reference/pygtk-gtkcombo.xml +++ /dev/null @@ -1,435 +0,0 @@ - - - - - - gtk.Combo - a text entry field with a dropdown list. - - - - Synopsis - - - gtk.Combo - gtk.HBox - - gtk.Combo - - - set_value_in_list - val - ok_if_empty - - - set_use_arrows - val - - - set_use_arrows_always - val - - - set_case_sensitive - val - - - set_item_string - item - item_value - - - set_popdown_strings - strings - - - disable_activate - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Box - +-- gtk.HBox - +-- gtk.Combo - - - - - - gtk.Combo Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Box Properties - -
- - - - - - - - - "allow-empty" - Read/Write - If True, an empty value may be entered - in this field - - - "case-sensitive" - Read/Write - If True, list item matching is case - sensitive - - - "enable-arrow-keys" - Read/Write - If True, the arrow keys move through the - list of items - - - "enable-arrows-always" - Read/Write - If True, the arrow keys work, even if - the entry contents are not in the list - - - "value-in-list" - Read/Write - If True, entered values must already be - present in the list - - - - - -
- -
- - - gtk.Combo Style Properties - - gtk.Widget Style Properties - - - - - gtk.Combo Child Properties - - gtk.Box Child Properties - - - - - Attributes - -
- - - - - - - - - "entry" - Read - the text entry widget - - - - "list" - Read - the list shown in the drop-down window - - - - - -
- -
- - - gtk.Combo Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - Description - - - The gtk.Combo is - deprecated in GTK+ 2.4 and PyGTK 2.4 in favor of the gtk.ComboBox. - - - The gtk.Combo 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 -gtk.List widget and can be accessed using the list -attribute of the gtk.Combo. 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() method. 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 behavior can be turned off with the -set_use_arrows() -method. 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 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. - - Note the list attribute references a gtk.List which is a -deprecated widget so the combo widget may be changed or deprecated in the -future. - - - - - Constructor - - - gtk.Combo - - - - Returns : - a combo object* - - - - Creates an new gtk.Combo -object. - - - - - Methods - - - gtk.Combo.set_value_in_list - - - set_value_in_list - val - ok_if_empty - - - - val : - If True the value entered must match one of the -values in the list. - - - ok_if_empty : - If True an empty value is considered -valid. - - - - The set_value_in_list() method -specifies whether the value entered in the text entry field must match one -of the values in the list. This method sets the "value-in-list" property to -the value of val and the "allow-empty" property to -the value of ok_if_empty. - - If val is True the user will not be able -to perform any other action (the widget grabs the focus) until a valid value -has been entered. If ok_if_empty is True an empty -field is considered an acceptable value. - - - - - gtk.Combo.set_use_arrows - - - set_use_arrows - val - - - - val : - If True can be used to navigate through the -list items - - - - The set_use_arrows() method sets the -"enable-use-arrows" property to the value of val. If -val is True the arrows keys can be used to navigate -through the list items. - - - - - gtk.Combo.set_use_arrows_always - - - set_use_arrows_always - val - - - - val : - If True the arrow keys will still work even if -the text entry field does not match any of the list -items. - - - - The set_use_arrows_always() method sets -the "enable-arrows-always" property to the values of -val. If val is True the arrow -keys will work even if the text entry field does not match any of the list -items. - - - - - gtk.Combo.set_case_sensitive - - - set_case_sensitive - val - - - - val : - If True the text in the list items is case -sensitive. - - - - The set_case_sensitive() method sets -the "case-sensitive" property to the value of val. If -val is True the text in the combo list items and the -text entry field are case sensitive. The default value of -"set-case-sensitive" is False. - - - - - - gtk.Combo.set_item_string - - - set_item_string - item - item_value - - - - item : - a list item - - - item_value : - a string to place in the entry field when -item is selected - - - - The set_item_string() method sets the -string (from item_value) to place in the combo text -entry field when the item is selected. This method is -only needed if the list item is other than a simple label (e.g. a -pixmap). - - - - - - gtk.Combo.set_popdown_strings - - - set_popdown_strings - strings - - - - strings : - a list of strings to populate the -list - - - - The set_popdown_strings() method is a -convenience method that sets the strings used in the popdown list from. -strings (a Python list or tuple object). - - - - - - gtk.Combo.disable_activate - - - disable_activate - - - The disable_activate() method prevents -the combo from showing the popup list when the entry 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. - - - - - -
diff --git a/docs/reference/pygtk-gtkcombobox.xml b/docs/reference/pygtk-gtkcombobox.xml deleted file mode 100644 index d1eceed6..00000000 --- a/docs/reference/pygtk-gtkcombobox.xml +++ /dev/null @@ -1,1286 +0,0 @@ - - - - - - gtk.ComboBox a widget used to choose from - a list of items (new in PyGTK 2.4) - - - - Synopsis - - - gtk.ComboBox - gtk.Bin - gtk.CellLayout - - gtk.ComboBox - modelNone - - get_wrap_width - - - - set_wrap_width - width - - - get_row_span_column - - - - set_row_span_column - row_span - - - get_column_span_column - - - - set_column_span_column - column_span - - - get_active - - - set_active - index - - - get_active_iter - - - - set_active_iter - iter - - - set_model - modelNone - - - get_model - - - append_text - text - - - insert_text - position - text - - - prepend_text - text - - - remove_text - position - - - get_active_text - - - - popup - - - popdown - - - get_popup_accessible - - - - - - set_row_separator_func - funcNone - dataNone - - - get_add_tearoffs - - - - set_add_tearoffs - add_tearoffs - - - get_focus_on_click - - - - set_focus_on_click - focus_on_click - - - get_title - - - - set_title - title - - - - -Functions - - - gtk.combo_box_new_text - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.ComboBox (implements gtk.CellLayout) - - - - - - gtk.ComboBox Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - -
- - - - - - - - - "active" - Read-Write - The index of the item that is currently active.. If the - model is a non-flat treemodel, and the active item is not an - immediate child of the root of the tree, this property has the - value of the first index of the path of the item. This - property is available in GTK+ 2.4 and above. - - - - "add-tearoffs" - Read-Write - If True generated menus have tearoff - menu items. Note that this only affects menu style combo - boxes. Default value: False. Available in - GTK+ 2.6 and above. - - - - "column-span-column" - Read-Write - The TreeModel column containing the column span values. - This property is available in GTK+ 2.4 and above - - - - "focus-on-click" - Read-Write - If True the combo box grabs focus - when it is clicked with the mouse. Default value: - True - - - - "has-frame" - Read-Write - If True the combo box grabs focus - when it is clicked with the mouse. Default value: - True. Available in GTK+ 2.6 and - above. - - - - "model" - Read-Write - The TreeModel for the combo box. This property is - available in GTK+ 2.4 and above. - - - - "popup-shown" - Read-Write - If True the dropdown menu of the - combobox is popped up. Note that this property is mainly - useful, because it allows you to connect to the - "notify::popup-shown" signal. Available in GTK+ 2.10 and - above. - - - - "row-span-column" - Read-Write - The TreeModel column containing the row span - values. This property is available in GTK+ 2.4 and - above. - - - - "tearoff-title" - Read-Write - A title that may be displayed by the window manager - when the popup is torn-off. Default value: "". Available in - GTK+ 2.10 and above - - - - "wrap-width" - Read-Write - The number of columns to use to lay out the popup - items. This property is available in GTK+ 2.4 and - above. - - - - - -
- -
- - - gtk.ComboBox Style Properties - - gtk.Widget Style Properties - -
- - - - - - - - - "appears-as-list" - Read-Write - If True, the combo box dropdowns - should look like lists rather than menus. - - - - - -
- -
- - - gtk.ComboBox Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.CellEditable Signal Prototypes - - - - "changed" - - callback - combobox - user_param1 - ... - - - - - - - - - Description - - - This widget is available in GTK+ 2.4 and PyGTK 2.4 and above. - - - The gtk.ComboBox - is a replacement for the gtk.OptionMenu. The - gtk.ComboBox - implements the gtk.CellLayout - interface that provides a number of useful methods for managing the - contents. A gtk.ComboBox - is created with the gtk.ComboBox() constructor that - is associated with the optional gtk.TreeModel. If - no gtk.TreeModel - is specified it can be added later with the set_model() - method. - - Alternatively, the gtk.combo_box_new_text() - function creates a simple gtk.ComboBox - and associated gtk.ListStore - model. A gtk.CellRendererText - is also created and packed in the new combo box. In this simple combo - box each list item is a text string that can be selected. The - convenience methods append_text(), - prepend_text(), - insert_text() - and remove_text() - can be used to manage the contents of the gtk.ComboBox. Using - the gtk.combo_box_new_text() - function is equivalent to: - - - liststore = gtk.ListStore(gobject.TYPE_STRING) - combobox = gtk.ComboBox(liststore) - cell = gtk.CellRendererText() - combobox.pack_start(cell, True) - combobox.add_attribute(cell, 'text', 0) - - - - - - Constructor - - - gtk.ComboBox - modelNone - - - - model : - A valid gtk.TreeModel. - - - Returns : - A new gtk.ComboBox. - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new gtk.ComboBox - associated with the optional gtk.TreeModel - specified by model. If - model is not specified the combo box will not - have an associated tree model. - - - - - Methods - - - gtk.ComboBox.get_wrap_width - - - get_wrap_width - - - - - Returns : - The wrap width. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_wrap_width() method returns the -value of the "wrap-width" property of the combo box as set by the set_wrap_width() -method. The wrap width is basically the preferred number of columns to use -to lay out the popup i.e. lays out the popup items in a table with -width columns. - - - - - gtk.ComboBox.set_wrap_width - - - set_wrap_width - width - - - - width : - The preferred number of columns of -width. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_wrap_width() method sets the -wrap width (and the "wrap-width" property) of the combo box to the value -specified by width. The wrap width is basically the -preferred number of columns to use to lay out the popup i.e. lays out the -popup items in a table with width columns. - - - - - gtk.ComboBox.get_row_span_column - - - get_row_span_column - - - - - Returns : - The row span column. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_row_span_column() method -returns the value of the "row-span-column" property. The "row-span-column" -property indicates the column in the associated gtk.TreeModel row -that contains an integer that indicates how many rows the item should -span. - - - - - gtk.ComboBox.set_row_span_column - - - set_row_span_column - row_span - - - - row_span : - A column in the model passed during construction. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_row_span_column() method sets -the "row-span-column" property to the value specified by -row_span. The "row-span-column" property indicates -the column in the associated gtk.TreeModel row -that contains an integer that indicates how many rows the item should -span. - - - - - gtk.ComboBox.get_column_span_column - - - get_column_span_column - - - - - Returns : - The column span column. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_column_span_column() method -returns the value of the "column-span-column" property. The -"column-span-column" property indicates the column in the associated gtk.TreeModel row -that contains an integer that indicates how many columns the item should -span. - - - - - gtk.ComboBox.set_column_span_column - - - set_column_span_column - column_span - - - - column_span : - A column in the model passed during construction. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_column_span_column() method -sets the "column-span-column" property to the value specified by -column_span. The "column-span-column" property -indicates the column in the associated gtk.TreeModel row -that contains an integer that indicates how many columns the item should -span. - - - - - gtk.ComboBox.get_active - - - get_active - - - - Returns : - An integer which is the model index of the - currently active item, or -1 if there's no active - item. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_active() method returns the - value of the "active" property which is the index in the model of the - currently active item, or -1 if there's no active item. If the model - is a non-flat treemodel, and the active item is not an immediate child - of the root of the tree, this method returns the first path index of - the active item. For example if the path of the active item is (1, 0, - 2) this method will return 1. - - - - - gtk.ComboBox.set_active - - - set_active - index - - - - index : - An index in the model passed during - construction, or -1 to have no active item. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_active() method sets the active -item of the combo_box to the item with the model index specified by -index. If index is -1 the -combo box will have no active item. The "active" property is also set to the -value of index. - - - - - gtk.ComboBox.get_active_iter - - - get_active_iter - - - - - Returns : - A gtk.TreeIter - that points at the active item or None if there - is no active item. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_active_iter() method returns a - gtk.TreeIter - that points to the current active item or None if - there is no active item. - - - - - gtk.ComboBox.set_active_iter - - - set_active_iter - iter - - - - iter : - A valid gtk.TreeIter - pointing at an item in the associated gtk.TreeModel. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_active_iter() method sets the -current active item to be the one referenced by iter -in the associated gtk.TreeModel. -iter must correspond to a path of depth one. The -"active" property is also set by this method. - - - - - gtk.ComboBox.set_model - - - set_model - modelNone - - - - model : - A gtk.TreeModel. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_model() method sets the model -used by the combo box to the value specified by -model. The "model" property will also be set to the -value of model. A previously set model will be -unset. If model is None or not -specified, the old model will be unset. - - - In PyGTK 2.4.0 the model could not be None -and did not default to None. - - - - - - gtk.ComboBox.get_model - - - get_model - - - - Returns : - A gtk.TreeModel - or None. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_model() method returns the -value of the "model" property which contains the gtk.TreeModel -that is acting as data source for the combo_box or None -if no gtk.TreeModel is -associated with the combo box. - - - - - gtk.ComboBox.append_text - - - append_text - text - - - - text : - A string. - - - - - This method is available in PyGTK 2.4 and above. - - - The append_text() method appends the -string specified by text to the list of strings -stored in the combo box gtk.ListStore. Note -that you can only use this method with combo boxes constructed with the -gtk.combo_box_new_text() -function. - - - - - gtk.ComboBox.insert_text - - - insert_text - position - text - - - - position : - A model index where the - text should be - inserted. - - - text : - A string. - - - - - This method is available in PyGTK 2.4 and above. - - - The insert_text() method inserts the -string specified by text in the combo box gtk.ListStore at -the index specified by position. Note that you can -only use this method with combo boxes constructed with the gtk.combo_box_new_text() -function. - - - - - gtk.ComboBox.prepend_text - - - prepend_text - text - - - - text : - A string. - - - - - This method is available in PyGTK 2.4 and above. - - - The prepend_text() method prepends the -string specified by text to the list of strings -stored in the gtk.ListStore -associated with the combo_box. Note that you can only use this method with -combo boxes constructed with the gtk.combo_box_new_text() -function. - - - - - gtk.ComboBox.remove_text - - - remove_text - position - - - - position : - Index of the item to remove. - - - - - This method is available in PyGTK 2.4 and above. - - - The remove_text() method removes the -string at the index specified by position in the -associated gtk.ListStore. Note -that you can only use this function with combo boxes constructed with the -gtk.combo_box_new_text() -function. - - - - - gtk.ComboBox.get_active_text - - - get_active_text - - - - - Returns : - The currently active text. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_active_text() method returns -the currently active string or None if no entry is -selected. Note that you can only use this function with combo boxes -constructed with the gtk.combo_box_new_text() -function. - - - - - gtk.ComboBox.popup - - - popup - - - - This method is available in PyGTK 2.4 and above. - - - The popup() method pops up the menu or - dropdown list of the combo box. This method is mostly intended for use - by accessibility technologies; applications should have little use for - it. - - - - - gtk.ComboBox.popdown - - - popdown - - - - This method is available in PyGTK 2.4 and above. - - - The popdown() method hides the menu or -dropdown list of the combo box. This method is mostly intended for use by -accessibility technologies; applications should have little use for -it. - - - - - gtk.ComboBox.get_popup_accessible - - - get_popup_accessible - - - - - Returns : - the accessible object corresponding to the -popup. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_popup_accessible() method gets -the accessible object corresponding to the popup. This method is mostly -intended for use by accessibility technologies; applications should have -little use for it. - - - - - - - gtk.ComboBox.set_row_separator_func - - - set_row_separator_func - funcNone - dataNone - - - - func : - a function or -None - - - data : - user data to pass to -func - - - - - This method is available in PyGTK 2.6 and above. - - - The set_row_separator_func() method -sets the row separator function to func, which is -used to determine if a row should be drawn as a separator. If func is -None, no separators are drawn. This is the default -value. - - The signature of func is: - - - def func(model, iter, user_data): - - - where model is the gtk.TreeModel -used by the combo box, iter is a gtk.TreeIter -pointing at a row in model and -user_data is -data. func returns -True if the row is a separator. A common way to implement -func is to have a boolean column in -model, that indicates if the row is a -separator. - - - - - gtk.ComboBox.get_add_tearoffs - - - get_add_tearoffs - - - - - Returns : - True if menus should have a -tearoff menuitem. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_add_tearoffs() method returns the -value of the "add-tearoffs" property. - - - - - gtk.ComboBox.set_add_tearoffs - - - set_add_tearoffs - add_tearoffs - - - - add_tearoffs : - if True add tearoff menu items - - - - - This method is available in PyGTK 2.6 and above. - - - The set_add_tearoffs() method sets the -"add-tearoffs" property to the value of -add_tearoffs. If add_tearoffs -is True, the popup menu should have a tearoff menu -item. - - - - - gtk.ComboBox.get_focus_on_click - - - get_focus_on_click - - - - - Returns : - True if the combo box grabs -focus when it is clicked with the mouse. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_focus_on_click() method returns -the value of the "focus-on-click" property. - - - - - gtk.ComboBox.set_focus_on_click - - - set_focus_on_click - focus_on_click - - - - focus_on_click : - if True the combo box grabs -focus when clicked with the mouse. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_focus_on_click() method sets the -value of the "focus-on-click" property to the value of -focus_on_click. If -focus_on_click is True the combo -box grabs focus when clicked with the mouse. - - - - - gtk.ComboBox.get_title - - - get_title - - - - - - Returns : - the menu's title in tearoff - mode.. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_title() method returns the - value of the "tearoff-title" property that contains the current title - of the menu in tearoff mode. See the set_add_tearoffs() - method for more information. - - - - - gtk.ComboBox.set_title - - - set_title - title - - - - - title : - a title for the menu in tearoff - mode. - - - - - This method is available in PyGTK 2.10 and above. - - - The set_title() method sets the - "tearoff-title" property to the value of - title. The "tearoff-title" property contains - the menu's title in tearoff mode. - - - - - - - Functions - - - gtk.combo_box_new_text - - - gtk.combo_box_new_text - - - - - Returns : - A new gtk.ComboBox - for text items. - - - - - This function is available in PyGTK 2.4 and above. - - - The gtk.combo_box_new_text() function is a -convenience function that constructs a new text combo box, which is a gtk.ComboBox just -displaying strings. If you use this function to create a text combo box, you -should only manipulate its data source with the following convenience -methods: append_text(), -insert_text(), -prepend_text() -and remove_text(). - - - - - - - Signals - - - The "changed" gtk.ComboBox Signal - - - callback - combobox - user_param1 - ... - - - - - combobox : - the combo box that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in PyGTK 2.4 and above. - - - The "changed" signal is emitted when a new item in the combo box -is selected. - - - - - -
diff --git a/docs/reference/pygtk-gtkcomboboxentry.xml b/docs/reference/pygtk-gtkcomboboxentry.xml deleted file mode 100644 index 1301eedc..00000000 --- a/docs/reference/pygtk-gtkcomboboxentry.xml +++ /dev/null @@ -1,344 +0,0 @@ - - - - - gtk.ComboBoxEntry a text entry field with - a dropdown list (new in PyGTK 2.4) - - - - Synopsis - - - gtk.ComboBoxEntry - gtk.ComboBox - gtk.CellLayout - - gtk.ComboBoxEntry - modelNone - column-1 - - - set_text_column - text_column - - - get_text_column - - - - - -Functions - - - gtk.combo_box_entry_new_text - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.ComboBox - +-- gtk.ComboBoxEntry (implements gtk.CellLayout) - - - - - - gtk.ComboBoxEntry Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.ComboBox Properties - -
- - - - - - - - - "text-column" - Read-Write - The column in the gtk.TreeModel - to get the strings from. - - - - - -
- -
- - - gtk.ComboBoxEntry Style Properties - - gtk.Widget Style Properties - gtk.ComboBox Style Properties - - - - - gtk.ComboBoxEntry Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.ComboBox Signal Prototypes - gtk.CellEditable Signal Prototypes - - - - Description - - - This widget is available in GTK+ 2.4 and PyGTK 2.4 and - above. - - The gtk.ComboBoxEntry -is a replacement for the gtk.Combo. The gtk.ComboBoxEntry -is subclassed from gtk.ComboBox and -implements the gtk.CellLayout -interface; refer to their descriptions for a number of useful methods and -properties for managing the contents of a combo box entry. A gtk.ComboBoxEntry -also contains a child gtk.Entry accessed by -using the child attribute of the combo box entry: - - - entry = comboboxentry.child - - - A gtk.ComboBoxEntry -is created with the gtk.ComboBoxEntry() -constructor. The constructor can also be called with the optional parameters -model (a gtk.TreeModel - -default None) and column (a number -of a column in model - default 0). If no gtk.TreeModel is -specified it can be added later with the set_model() -method. The text column can be changed using the set_text_column() -method. A new combo box entry is created and packed with a gtk.CellRendererText -but no attribute mappings are set on the cell renderer. - - Alternatively, the gtk.combo_box_entry_new_text() -function creates a gtk.ComboBoxEntry -with an associated gtk.ListStore -model and the text column attribute mapping set to 0. In this combo box -entry each list item is a text string that can be selected. The convenience -methods gtk.ComboBox.append_text(), -gtk.ComboBox.prepend_text(), -gtk.ComboBox.insert_text() -and gtk.ComboBox.remove_text() -can be used to manage the contents of the gtk.ComboBoxEntry. Using -the gtk.combo_box_entry_new_text() -function is equivalent to: - - - liststore = gtk.ListStore(gobject.TYPE_STRING) - comboboxentry = gtk.ComboBoxEntry(liststore, 0) - - - - - - Constructor - - - gtk.ComboBoxEntry - modelNone - column-1 - - - - model : - The gtk.TreeModel - to associate with the combo box entry, or - None - - - column : - The number of the column to use for setting the - strings of the combo box entry. - - - Returns : - A new gtk.ComboBoxEntry. - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new gtk.ComboBoxEntry -that has a gtk.Entry as child -and associated with the gtk.TreeModel -specified by model and using the column of -model specified by column to -retrieve strings. If model was not specified it -defaults to None but you can change the model using the -gtk.ComboBox.set_model() -method. If column was not specified it defaults to -1 -meaning the text column is unset but you can change it using the set_text_column() -method. Once the text column is set either in the constructor or using the -set_text_column() -method it cannot be changed. A ValueError exception is thrown if -column is outside the range of column numbers for -model. - - - - - Methods - - - gtk.ComboBoxEntry.set_text_column - - - set_text_column - text_column - - - - text_column : - A column in the associated gtk.TreeModel - to use as the data source for the strings. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_text_column() method sets the -"text-column" property to the value of tree_column -only if the text column has not been set (that is, "text-column" is -1). The -value of tree_column is the number of the tree model -column used as the data source for the strings of the combo box -entry. - - - - - gtk.ComboBoxEntry.get_text_column - - - get_text_column - - - - Returns : - The number of the column in the associated - gtk.TreeModel - used as the data source for the combo box - entry. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_text_column() method returns -the number of the gtk.TreeModel -column that is used as the data source for the strings of the combo box -entry. - - - - - - - Functions - - - gtk.combo_box_entry_new_text - - - gtk.combo_box_entry_new_text - - - - - Returns : - A new gtk.ComboBoxEntry - widget. - - - - - This function is available in PyGTK 2.4 and above. - - - The gtk.combo_box_entry_new_text() function -is a convenience function which constructs a new gtk.ComboBoxEntry, -just displaying strings. If you use this function to create a combo box -entry, you should only manipulate its gtk.TreeModel -data source with the following gtk.ComboBox -convenience methods: gtk.ComboBox.append_text(), -gtk.ComboBox.insert_text(), -gtk.ComboBox.prepend_text() -and gtk.ComboBox.remove_text(). - - - - - -
diff --git a/docs/reference/pygtk-gtkcontainer.xml b/docs/reference/pygtk-gtkcontainer.xml deleted file mode 100644 index df92344f..00000000 --- a/docs/reference/pygtk-gtkcontainer.xml +++ /dev/null @@ -1,1830 +0,0 @@ - - - - - - gtk.Container - a base class for widgets that contain other -widgets - - - - Synopsis - - - gtk.Container - gtk.Widget - - set_border_width - border_width - - - get_border_width - - - add - widget - - - remove - widget - - - set_resize_mode - resize_mode - - - get_resize_mode - - - check_resize - - - forall - callback - callback_data - - - foreach - callback - callback_data - - - get_children - - - propagate_expose - child - event - - - set_focus_chain - focusable_widgets - - - get_focus_chain - - - - unset_focus_chain - - - set_reallocate_redraws - needs_redraws - - - set_focus_child - child - - - set_focus_vadjustment - adjustment - - - get_focus_vadjustment - - - set_focus_hadjustment - adjustment - - - get_focus_hadjustment - - - resize_children - - - child_type - - - add_with_properties - widget - first_prop_name - first_prop_value - ... - - - child_set - child - first_prop_name - first_prop_value - ... - - - child_get - child - first_prop_name - ... - - - child_set_property - child - property_name - value - - - child_get_property - child - property_name - - - gtk.container_class_install_child_property - property_id - pspec - - - gtk.container_class_list_child_properties - - - - - -Functions - - - gtk.container_class_install_child_property - klass - property_id - pspec - - gtk.container_class_list_child_properties - klass - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - - - - - - gtk.Container Properties - - gtk.Object Properties - gtk.Widget Properties - -
- - - - - - - - - - "border-width" - Read/Write - The width of the empty border outside the containers - children. - - - - "child" - Read - The child widget in the container - - - - "resize-mode" - Read/Write - Specify how resize events are handled. One of: - gtk.RESIZE_PARENT, - gtk.RESIZE_QUEUE or - gtk.RESIZE_IMMEDIATE - - - - - -
- -
- - - gtk.Container Style Properties - - gtk.Widget Style Properties - - - - - Attributes - -
- - - - - - - - - - "border_width" - Read - The width of the empty border outside the containers -children. - - - - "resize_mode" - Read - Specify how resize events are handled. One of: -gtk.RESIZE_PARENT, gtk.RESIZE_QUEUE or -gtk.RESIZE_IMMEDIATE - - - - "focus_child" - Read - The child widget that has the focus - - - - "need_resize" - Read - If True the container needs resizing - - - - "reallocate_redraws" - Read - if True redraw the container when a child gets -reallocated - - - - "has_focus_chain" - Read - If True the container had its focus chain explicitly -set - - - - - -
- -
- - - gtk.Container Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - - - - "add" - - callback - container - - widget - - user_param1 - - ... - - - - - - "check-resize" - - callback - container - - user_param1 - - ... - - - - - - "remove" - - callback - container - - widget - - user_param1 - - ... - - - - - - "set-focus-child" - - callback - container - - widget - - user_param1 - - ... - - - - - - - - - - Description - - The gtk.Container -class provides common attributes and methods for a large number of widget -subclasses that manage the layout of other widgets within the area of a -window. - - A PyGTK user interface is constructed by -nesting widgets inside widgets. Container widgets are the inner nodes in the -resulting tree of widgets: they contain other widgets. So, for example, you -might have a gtk.Window -containing a gtk.Frame containing -a gtk.Label. If -you wanted an image instead of a textual label inside the frame, you might -replace the gtk.Label widget with -a gtk.Image -widget. - - There are two major kinds of container widgets. Both are -subclasses of the abstract gtk.Container -base class. - - The first type of container widget has a single child widget and -derives from gtk.Bin. These -containers are decorators, that add some kind of functionality to the -child. For example, a gtk.Button makes its -child into a clickable button; a gtk.Frame draws a -frame around its child and a gtk.Window places -its child widget inside a top-level window. - - The second type of container can have more than one child; its -purpose is to manage layout. This means that these containers assign sizes -and positions to their children. For example, a gtk.HBox arranges its -children in a horizontal row, and a gtk.Table arranges -the widgets it contains in a two-dimensional grid. - - To fulfill its task, a layout container must negotiate the size -requirements with its parent and its children. This negotiation is carried -out in two phases, size requisition and size allocation. - - - Size Requisition - - The size requisition of a widget is it's desired width and -height. This is represented by a gtk.Requisition. - - How a widget determines its desired size depends on the -widget. A gtk.Label, for -example, requests enough space to display all its text. Container widgets -generally base their size request on the requisitions of their -children. - - The size requisition phase of the widget layout process operates -top-down. It starts at a top-level widget, typically a GtkWindow. The -top-level widget asks its child for its size requisition by calling -gtk_widget_size_request(). To determine its requisition, the child asks its -own children for their requisitions and so on. Finally, the top-level widget -will get a requisition back from its child. - - - - - Size Allocation - - When the top-level widget has determined how much space its -child would like to have, the second phase of the size negotiation, size -allocation, begins. Depending on its configuration (see the gtk.Window.set_resizable() -method), the top-level widget may be able to expand in order to satisfy the -size request or it may have to ignore the size request and keep its fixed -size. It then tells its child widget how much space it gets by calling the -size_allocate() -method. The child widget divides the space among its children and tells each -child how much space it got, and so on. Under normal circumstances, a gtk.Window will -always give its child the amount of space the child requested. - - A child's size allocation is represented by a gtk.gdk.Rectangle -that contains not only a width and height, but also a position (i.e. X and Y -coordinates), so that containers can tell their children not only how much -space is available, but also where they are positioned inside the space -available to the container. - - Widgets are required to honor the size allocation they receive; -a size request is only a request, and widgets must be able to cope with any -size. - - - - - Child Properties - - gtk.Container -introduces child properties - these are object properties that are not -specific to either the container or the contained widget, but rather to -their relation. Typical examples of child properties are the "position" or -"pack-type" of a widget which is contained in a gtk.Box. - - Use the install_child_property() -method to install child properties for a container class and the list_child_properties() -function to get information about existing child properties. - - To set the value of a child property, use the child_set_property(), -or child_set() -methods. To obtain the value of a child property, use the child_get_property(), -or child_get() -methods. To emit notification about child property changes, use the gtk.Widget.child_notify() -method. - - - - - - - Methods - - - gtk.Container.set_border_width - - - set_border_width - border_width - - - - border_width : - The amount of blank space to leave -outside the container. Valid values are in the range -0-65535 pixels. - - - - The set_border_width() method sets the -"border-width" property of the container. The border width of a container is -the amount of space to leave around the outside of the container. The only -exception to this is gtk.Window; because -toplevel windows can't leave space outside, they leave the space inside. The -border is added on all sides of the container. - - - - - gtk.Container.get_border_width - - - get_border_width - - - - Returns : - the current border width - - - - The get_border_width() method retrieves -the value of the "border-width" property of the container. See set_border_width(). - - - - - gtk.Container.add - - - add - widget - - - - widget : - a widget to be placed inside the -container - - - - The add() method adds -widget to the container. This method is typically -used for simple containers such as gtk.Window, gtk.Frame, or gtk.Button that hold -a single child widget. For layout containers that handle multiple children -such as gtk.Box -or gtk.Table, -this function will pick default packing parameters that may not be correct. -Containers that handle multiple children usually have additional methods -such as gtk.Box.pack_start() -and gtk.Table.attach() -as an alternative to add(). Adding a widget to a -container usually results in the resizing and redrawing of the container -contents. - - - - - gtk.Container.remove - - - remove - widget - - - - widget : - a current child of -container - - - - The remove() method removes -widget from the container. -widget must be inside the container. Note that the -container will own a reference to widget, and that -this may be the last reference held; so removing a widget from its container -can cause that widget to be destroyed. If you want to use -widget again, you should add a reference to -it. - - - - - gtk.Container.set_resize_mode - - - set_resize_mode - resize_mode - - - - resize_mode : - the new resize mode. - - - - The set-resize_mode() method sets the -"resize=mode" property of the container. The resize mode of a container -determines whether a resize request will be passed to the container's parent -(gtk.RESIZE_PARENT), queued for later execution -(gtk.RESIZE_QUEUE) or executed immediately -(gtk.RESIZE_IMMEDIATE). - - - - - gtk.Container.get_resize_mode - - - get_resize_mode - - - - Returns : - the current resize mode - - - - The get_resize_mode() method returns the value of the -"resize-mode" property for of the container. See set_resize_mode(). - - - - - gtk.Container.check_resize - - - check_resize - - - The check_resize() method emits the -"check-resize" signal on the container. - - - - - gtk.Container.forall - - - forall - callback - callback_dataNone - - - - callback : - a callback - - - callback_data : - the callback user data - - - - The forall() method arranges to invoke -callback on each child of the container including -children that are considered "internal" (implementation details of the -container). "Internal" children generally weren't added by the user of the -container, but were added by the container implementation itself. Most -applications should use the foreach() -method, rather than the forall() method. - - - - - gtk.Container.foreach - - - foreach - callback - callback_dataNone - - - - callback : - a callback - - - callback_data : - the callback user data - - - - The foreach() method arranges to invoke -callback on each non-internal child of the -container. - - - - - gtk.Container.get_children - - - get_children - - - - Returns : - a list of the container's non-internal -children. - - - - The get_children() method returns the -the container's non-internal children. - - - - - gtk.Container.propagate_expose - - - propagate_expose - child - event - - - - child : - a child of the container - - - event : - a expose event sent to the -container - - - - The propagate_expose() method sends -synthetic expose events to all children that don't have their own gtk.gdk.Windows when -the container receives an expose event. - - The propagate_expose() -takes care of deciding whether an expose event needs to be sent to the -child, intersecting the event's area with the child area, and sending the -event. - - In most cases, a container can simply either simply inherit the -expose implementation from gtk.Container, -or, do some drawing and then chain to the expose implementation from gtk.Container. - - - - - gtk.Container.set_focus_chain - - - set_focus_chain - focusable_widgets - - - - focusable_widgets : - a list or tuple containing a chain of focusable -widgets. - - - - The set_focus_chain() method sets a -focus chain, overriding the one computed automatically by GTK. In principle -each widget in the chain should be a descendant of the container, but this -is not enforced by this method, since it's allowed to set the focus chain -before you pack the widgets, or have a widget in the chain that isn't always -packed. The necessary checks are done when the focus chain is actually -traversed. - - - - - gtk.Container.get_focus_chain - - - get_focus_chain - - - - - Returns : - a list containing the widgets in the focus -chain if the focus chain of the container has been set explicitly or None if -no focus chain has been explicitly set. - - - - The get_focus_chain() method retrieves -the focus chain of the container, if one has been set explicitly. If no -focus chain has been explicitly set, GTK computes the focus chain based on -the positions of the children. In that case, the method returns None. - - - - - gtk.Container.unset_focus_chain - - - unset_focus_chain - - - The unset_focus_chain() method removes -a focus chain explicitly set with set_focus_chain(). - - - - - gtk.Container.set_reallocate_redraws - - - set_reallocate_redraws - needs_redraws - - - - needs_redraws : - the new value for the container's -reallocate_redraws attribute. - - - - The set_reallocate_redraws() method -sets the reallocate_redraws attribute of the container to the value of -needs_redraws. Containers requesting reallocation -redraws get automatically redrawn if any of their children change -allocation. - - - - - gtk.Container.set_focus_child - - - set_focus_child - child - - - - child : - the child widget that will get the -focus. - - - - The set_focus_child() method emits the -"set-focus-child" signal that arranges for the child widget referenced by -child to get the focus and recalculates the container -adjustments. - - - - - gtk.Container.set_focus_vadjustment - - - set_focus_vadjustment - adjustment - - - - adjustment : - The new vertical focus -adjustment - - - - The set_focus_vadjustment() method sets -the vertical focus adjustment to the value of -adjustment. - - - - - gtk.Container.get_focus_vadjustment - - - get_focus_vadjustment - - - - Returns : - the vertical focus adjustment, or -None if none has been set. - - - - The get_focus_vadjustment() method retrieves the vertical focus -adjustment for the container. See the set_focus_vadjustment() -method. - - - - - gtk.Container.set_focus_hadjustment - - - set_focus_hadjustment - adjustment - - - - adjustment : - The new horizontal focus -adjustment - - - - The set_focus_hadjustment() method sets -the horizontal focus adjustment to the value of -adjustment. - - - - - gtk.Container.get_focus_hadjustment - - - get_focus_hadjustment - - - - Returns : - the horizontal focus adjustment, or -None if none has been set. - - - - The get_focus_hadjustment() method -retrieves the horizontal focus adjustment for the container. See set_focus_hadjustment(). - - - - - gtk.Container.resize_children - - - resize_children - - - The resize_children() method causes the -container to recalculate its size and its children's sizes. - - - - - - gtk.Container.child_type - - - child_type - - - - Returns : - a type. - - - - The child_type() method returns the -type of the children that can be added to the container. Note that this may -return a void type to indicate that no more children can be added, e.g. for -a gtk.Paned -which already has two children or a gtk.Window that -already has a child. - - - - - gtk.Container.add_with_properties - - - add_with_properties - widget - first_prop_name - first_prop_value - ... - - - - widget : - a widget to be added - - - first_prop_name : - the first property name - - - first_prop_value : - a value for the first -property - - - ... : - additional property name and value -pairs - - - - The add_with_properties() method adds -the child widget specified by widget to the container -while allowing the setting of zero or more container child property values -at the same time. Containers supporting add with settable child properties -are: gtk.Box, -gtk.Fixed, -gtk.Notebook -and gtk.Table. - - For example the following adds a button to a gtk.Fixed layout -widget and sets the child properties "x" and "y" specifying the child -position in the layout: - - - fixed.add_with_properties(button, "x", 10, "y", 20") - - - - - - gtk.Container.child_set - - - child_set - child - first_prop_name - ... - - - - child : - the child widget - - - first_prop_name : - the first property name - - - first_prop_value : - the value of the first -property - - - ... : - additional property name and value -pairs - - - - The child_set() method sets the -properties for child using the given property name -and value pairs. - - - - - gtk.Container.child_get - - - child_get - child - first_prop_name - ... - - - - child : - the child widget to get the child properties -for - - - first_prop_name : - the first property name - - - ... : - additional property names - - - Returns : - a tuple containing the property values -requested - - - - The child_get() method retrieves the -requested container child properties for -child. - - - - - gtk.Container.child_set_property - - - child_set_property - child - property_name - value - - - - child : - the child widget - - - property_name : - the child property name - - - value : - a value to associate with the -property - - - - The child_set_property() method sets -the property name specified by property_name with the -value specified in value. - - - - - gtk.Container.child_get_property - - - child_get_property - child - property_name - - - - child : - the child widget - - - property_name : - the child property name - - - Returns : - the value of the child property for the -widget - - - - The child_get_property() method -retrieves the value of the child property specified by -property_name for the widget -child. - - - - - gtk.Container.install_child_property - - - install_child_property - property_id - pspec - - - - property_id : - an integer property ID - - - pspec : - a tuple containing a parameter -specifications - - - - - This method is available in PyGTK 2.10 and above. - - - The install_child_property() method - installs a child property for the container class using the integer ID - specified by - property_id. pspec is a - tuple containing at least 5 items. The first 4 items contain the - following parameter specification items: - - - - a string specifying the name of the property - - - an object specifying the property type - - - a string specifying the nickname for the property or -None - - - a string specifying the short description for the property -or None - - - - The last item must be a integer containing a combination of the - GObject Param Flag - Constants. Additional tuple items (if needed) are inserted - between the fourth item and the last item depending on the property - type: - - - - gobject.TYPE_CHAR - - minimum, maximum and default values - - - - gobject.TYPE_CHAR - - minimum, maximum and default values - - - - gobject.TYPE_BOOLEAN - - default value - - - - gobject.TYPE_INT - - minimum, maximum and default values - - - - gobject.TYPE_UINT - - minimum, maximum and default values - - - - gobject.TYPE_LONG - - minimum, maximum and default values - - - - gobject.TYPE_ULONG - - minimum, maximum and default values - - - - gobject.TYPE_INT64 - - minimum, maximum and default values - - - - gobject.TYPE_UINT64 - - minimum, maximum and default values - - - - gobject.TYPE_ENUM - - default value - - - - gobject.TYPE_FLAGS - - default value - - - - gobject.TYPE_FLOAT - - minimum, maximum and default values - - - - gobject.TYPE_DOUBLE - - minimum, maximum and default values - - - - gobject.TYPE_STRING - - default value - - - - gobject.TYPE_PARAM - - Not applicable - - - - gobject.TYPE_BOXED - - Not applicable - - - - gobject.TYPE_POINTER - - Not applicable - - - - gobject.TYPE_OBJECT - - Not applicable - - - - - - - - gtk.Container.list_child_properties - - - list_child_properties - - - - - Returns : - the list of child properties - - - - - This method is available in PyGTK 2.10 and above. - - - The list_child_properties() method - returns a list containing the child properties of the container - class. See the install_child_property() - method for more information. - - - - - - - Functions - - - gtk.container_class_install_child_property - - - gtk.container_class_install_child_property - klass - property_id - pspec - - - - klass : - a gtk.Container - class or instance. - - - property_id : - an integer property ID - - - pspec : - a tuple containing a parameter -specification - - - - - This function is available in PyGTK 2.4 and above. - - - - This function is deprecated in PyGTK 2.10 and above. - - - The - gtk.container_class_install_child_property() - function installs a child property for the container class specified - by klass using the integer ID specified by - property_id. pspec is a - tuple containing at least 5 items. The first 4 items contain the - following parameter specification items: - - - - a string specifying the name of the property - - - an object specifying the property type - - - a string specifying the nickname for the property or -None - - - a string specifying the short description for the property -or None - - - - The last item must be a integer containing a combination of the - GObject Param Flag - Constants. Additional tuple items (if needed) are inserted - between the fourth item and the last item depending on the property - type: - - - - gobject.TYPE_CHAR - - minimum, maximum and default values - - - - gobject.TYPE_CHAR - - minimum, maximum and default values - - - - gobject.TYPE_BOOLEAN - - default value - - - - gobject.TYPE_INT - - minimum, maximum and default values - - - - gobject.TYPE_UINT - - minimum, maximum and default values - - - - gobject.TYPE_LONG - - minimum, maximum and default values - - - - gobject.TYPE_ULONG - - minimum, maximum and default values - - - - gobject.TYPE_INT64 - - minimum, maximum and default values - - - - gobject.TYPE_UINT64 - - minimum, maximum and default values - - - - gobject.TYPE_ENUM - - default value - - - - gobject.TYPE_FLAGS - - default value - - - - gobject.TYPE_FLOAT - - minimum, maximum and default values - - - - gobject.TYPE_DOUBLE - - minimum, maximum and default values - - - - gobject.TYPE_STRING - - default value - - - - gobject.TYPE_PARAM - - Not applicable - - - - gobject.TYPE_BOXED - - Not applicable - - - - gobject.TYPE_POINTER - - Not applicable - - - - gobject.TYPE_OBJECT - - Not applicable - - - - - - - - gtk.container_class_list_child_properties - - - gtk.container_class_list_child_properties - klass - - - - klass : - a gtk.Container - class or instance. - - - Returns : - a tuple containing the list of child properties - - - - - This function is available in PyGTK 2.4 and above. - - - - This function is deprecated in PyGTK 2.10 and above. - - - The - gtk.container_class_list_child_properties() - function returns a tuple containing the child properties of the - container class specified by klass. - - - - - - - Signals - - - The "add" gtk.Container Signal - - - callback - container - widget - user_param1 - ... - - - - - container : - the container that received the -signal - - - widget : - the child widget - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "add" signal is emitted when widget -is added to the container. - - - - - The "check-resize" gtk.Container Signal - - - callback - container - user_param1 - ... - - - - - container : - the container that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "check-resize" signal is emitted when the -check_resize() method is called forcing the -recalculation of the container and its children. See the set_resize_mode() -method for details. - - - - - The "remove" gtk.Container Signal - - - callback - container - widget - user_param1 - ... - - - - - container : - the container that received the -signal - - - widget : - the child widget - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "remove" signal is emitted when -widget is removed from -container. - - - - - The "set-focus-child" gtk.Container Signal - - - callback - container - widget - user_param1 - ... - - - - - container : - the container that received the -signal - - - widget : - the child widget - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "set-focus-child" signal is emitted when the set_focus_child() -method is called. widget is set as the child in -container with the focus. - - - - - -
diff --git a/docs/reference/pygtk-gtkcurve.xml b/docs/reference/pygtk-gtkcurve.xml deleted file mode 100644 index a606c58a..00000000 --- a/docs/reference/pygtk-gtkcurve.xml +++ /dev/null @@ -1,423 +0,0 @@ - - - - - - gtk.Curve - allows direct editing of a curve. - - - - Synopsis - - - gtk.Curve - gtk.DrawingArea - - gtk.Curve - - - reset - - - set_gamma - gamma - - - set_range - min_x - max_x - min_y - max_y - - - get_vector - size-1 - - - set_vector - vector - - - set_curve_type - type - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.DrawingArea - +-- gtk.Curve - - - - - - gtk.Curve Properties - - gtk.Object Properties - gtk.Widget Properties - -
- - - - - - - - - - "curve-type" - Read/Write - The curve type. One of linear -(gtk.CURVE_TYPE_LINEAR), spline interpolated -(gtk.CURVE_TYPE_SPLINE), or free-form -(gtk.CURVE_TYPE_FREE). - - - - "max-x" - Read/Write - The maximum possible value for X - - - - "max-y" - Read/Write - The maximum possible value for Y - - - - "min-x" - Read/Write - The minimum possible value for X - - - - "min-y" - Read/Write - The minimum possible value for Y - - - - - -
- -
- - - - gtk.Curve Style Properties - - gtk.Widget Style Properties - - - - - gtk.Curve Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - - - - "curve-type-changed" - - callback - curve - - widget - - user_param1 - - ... - - - - - - - - - - Description - - - This widget is considered too specialized or little-used for -PyGTK, and will in the future be moved to some other package. If your -application needs this widget, feel free to use it, as the widget does work -and is useful in some applications; it's just not of general interest. -However, it will eventually move out of the PyGTK distribution. - - - The gtk.Curve 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 gtk.Curve 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. - - - - - Constructor - - - gtk.Curve - - - - Returns : - a new gtk.Curve object - - - - Creates a new gtk.Curve -object - - - - - Methods - - - gtk.Curve.reset - - - reset - - - The reset() method resets the curve to -a straight line from the minimum x and y values to the maximum x and y -values (i.e. from the bottom-left to the top-right corners). The curve type -is not changed. - - - - - gtk.Curve.set_gamma - - - set_gamma - gamma - - - - gamma : - the gamma value - - - - The set_gamma() method recomputes the -entire curve using the value in gamma. 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. - - - - - gtk.Curve.set_range - - - set_range - min_x - max_x - min_y - max_y - - - - min_x : - the new minimum x value - - - max_x : - the maximum x value. - - - min_y : - the new minimum y value - - - max_y : - the maximum y value. - - - - The set_range() method sets the -"min-x", "min-y", "max-x" and "max-y" properties from -min_x, min_y, -max_x, and max_y. The curve is also reset -with a call to reset(). - - - - - gtk.Curve.get_vector - - - set_vector - size-1 - - - - size : - the number of points to return or -1 to return -all the points in the curve. - - - Returns : - a tuple containing the -points - - - - The get_vector() method returns a tuple -of points representing the curve. The number of points to return is -specified by size; if size is --1 all the points in the curve are returned. - - - - - gtk.Curve.set_vector - - - get_vector - vector - - - - vector : - a list or tuple containing the points of the -curve - - - - The set_vector() method sets the curve -using the points in vector. The curve type is set to -gtk.CURVE_TYPE_FREE. - - - - - gtk.Curve.set_curve_type - - - set_curve_type - type - - - - type : - the new curve type: -gtk.CURVE_TYPE_LINEAR, -gtk.CURVE_TYPE_SPLINE or -gtk.CURVE_TYPE_FREE - - - - The set_curve_type() method sets the -"curve-type" property with the value of type. The -curve type must be one of gtk.CURVE_TYPE_LINEAR, -gtk.CURVE_TYPE_SPLINE or -gtk.CURVE_TYPE_FREE. 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. - - - - - - - Signals - - - The "curve-type-changed" gtk.Curve Signal - - - callback - curve - user_param1 - ... - - - - - curve : - the curve that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "curve-type-changed" signal is emitted when the curve type -has been changed. The curve type can be changed explicitly with a call to -set_curve_type(). -It is also changed as a side-effect of calling reset() or -set_gamma() - - - - - -
diff --git a/docs/reference/pygtk-gtkdialog.xml b/docs/reference/pygtk-gtkdialog.xml deleted file mode 100644 index 0dcf5a1a..00000000 --- a/docs/reference/pygtk-gtkdialog.xml +++ /dev/null @@ -1,914 +0,0 @@ - - - - - - gtk.Dialog - popup windows for user information and action - - - - Synopsis - - - gtk.Dialog - gtk.Window - - gtk.Dialog - titleNone - parentNone - flags0 - buttonsNone - - - add_action_widget - child - response_id - - - add_button - button_text - response_id - - - add_buttons - ... - - - set_response_sensitive - response_id - setting - - - set_default_response - response_id - - - set_has_separator - setting - - - get_has_separator - - - response - response_id - - - run - - - - set_alternative_button_order - new_order - - - get_response_for_widget - widget - - - - -Functions - - - gtk.alternative_dialog_button_order - screenNone - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Window - +-- gtk.Dialog - - - - - - gtk.Dialog Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Window Properties - -
- - - - - - - - - "has-separator" - Read/Write - If True, the dialog has a separator bar -above its buttons - - - - - -
- -
- - - gtk.Dialog Style Properties - - gtk.Widget Style Properties - -
- - - - - - - - - "action-area-border" - Read - The width of the vborder around the button area in -pixels. - - - - "button-spacing" - Read - The spacing between buttons in pixels. - - - - "content-area-border" - Read - The width of the border around the main dialog area in -pixels. - - - - - -
- -
- - - Attributes - -
- - - - - - - - - - "vbox" - Read - A gtk.VBox that is the -main container of the dialog - all the other widgets are packed in -it. - - - - "action_area" - Read - A gtk.HBox that contains -the buttons of the dialog. - - - - - -
- -
- - - gtk.Dialog Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Window Signal Prototypes - - - - "close" - - callback - dialog - - user_param1 - - ... - - - - - - "response" - - callback - dialog - - response_id - - user_param1 - - ... - - - - - - - - - - Description - - Dialog boxes are a convenient way to prompt the user for a small - amount of input, e.g. to display a message, ask a question, or anything - else that does not require extensive effort on the user's part. Dialogs - are organized as a window split vertically. The top section is a gtk.VBox, and is - where widgets such as a gtk.Label or a - gtk.Entry - should be packed. The bottom area is known as the action_area which 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 - gtk.HSeparator. - - The gtk.Dialog boxes - are created with a call to gtk.Dialog()() - that sets the dialog title, some convenient flags, and adds simple - buttons. In a newly created dialog, the two primary areas of the window - can be accessed as the vbox and action_area attributes, 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 passing the - gtk.DIALOG_MODAL flag to the gtk.Dialog() - constructor or by calling set_modal() - on the dialog. - - If you add buttons to gtk.Dialog using - gtk.Dialog(), - add_button(), - or add_action_widget(), - clicking the button will emit a signal called "response" with a response - ID that you specified. PyGTK will never assign a meaning to positive - response IDs; these are entirely user-defined. But for convenience, you - can use the pre-defined (these all have - values less than zero). - - If a dialog receives a delete event, the "response" signal will be - emitted with a response ID of - gtk.RESPONSE_DELETE_EVENT. - - If you want to block waiting for a dialog to return before - returning control flow to your code, you can call run(). This - function enters a recursive main loop and waits for the user to respond - to the dialog, returning the response ID corresponding to the button the - user clicked. - - - - - Constructor - - - gtk.Dialog - titleNone - parentNone - flags0 - buttonsNone - - - - title : - The title of the dialog, or -None - - - parent : - The transient parent of the dialog, or -None - - - flags : - flags that control the operation of the -dialog - - - buttons : - a tuple containing button text/response id pairs -or None - - - Returns : - a new gtk.Dialog - - - - Creates a new gtk.Dialog with the -title text specified by title (or -None for the default title; see gtk.Window.set_title()) -and transient parent window specified by parent (or -None for none; see gtk.Window.set_transient_for()). -The flags argument can be used to make the dialog -modal (gtk.DIALOG_MODAL) and/or to have it destroyed -along with its transient parent -(gtk.DIALOG_DESTROY_WITH_PARENT) and/or remove the -separator (gtk.DIALOG_NO_SEPARATOR) (see the for more -information). After flags, a tuple of button -text/response ID pairs should be listed, or None (the -default value) if no buttons are needed. The button text can be either a -stock ID such as gtk.STOCK_OK, or some arbitrary text. A -response ID can be any positive number, or one of the pre-defined . - - If the user clicks one of these dialog buttons, the gtk.Dialog will emit -the "response" signal with the corresponding response ID. If a gtk.Dialog receives -the "delete_event" signal, it will emit "response" with a response ID of -gtk.RESPONSE_DELETE_EVENT. However, destroying a dialog -does not emit the "response" signal; so be careful relying on "response" -when using the gtk.DIALOG_DESTROY_WITH_PARENT flag. -Buttons are added from left to right, so the first button in the list will -be the leftmost button in the dialog. - -Here's a simple example: - - dialog = gtk.Dialog("My dialog", - main_app_window, - gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, - (gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT, - gtk.STOCK_OK, gtk.RESPONSE_ACCEPT)) - - - - - - Methods - - - gtk.Dialog.add_action_widget - - - add_action_widget - child - response_id - - - - child : - an activatable widget - - - response_id : - a response ID - - - - The add_action_widget() method adds an -activatable widget to the action area of a gtk.Dialog, -connecting a signal handler that will emit the "response" signal on the -dialog when the widget is activated. The widget is appended to the end of -the dialog's action area. If you want to add a non-activatable widget, -simply pack it into the action_area. - - - - - gtk.Dialog.add_button - - - add_button - button_text - response_id - - - - button_text : - the text of the button, or a stock -ID - - - response_id : - the response ID for the -button - - - Returns : - the button widget that was -added - - - - The add_button() method adds a button -with the text specified by button_text (or a stock -button, if button_text is a stock ID) and sets things -up so that clicking the button will emit the "response" signal with the -specified response_id. The button is appended to the -end of the dialog's action area. The button widget is returned, but usually -you don't need it. - - - - - gtk.Dialog.add_buttons - - - add_buttons - ... - - - - ... : - one or more pairs of button -specifiers: button text (or stock ID) and a response id - - - - The add_buttons() method adds several -buttons to the gtk.Dialog using the -button data passed as arguments to the method. This method is the same as -calling the gtk.Dialog.add_button() -repeatedly. The button data pairs - button text (or stock ID) and a response -ID integer are passed individually. For example: - - - dialog.add_buttons(gtk.STOCK_OPEN, 42, "Close", gtk.RESPONSE_CLOSE) - - - will add "Open" and "Close" buttons to -dialog. - - - - - gtk.Dialog.set_response_sensitive - - - set_response_sensitive - response_id - setting - - - - response_id : - a response ID - - - setting : - the new value for -sensitive - - - - The set_response_sensitive() method -calls the gtk.Window.set_sensitive() -method with the specified response_id for each widget -in the dialog's action area. This method is a convenience function to -sensitize/desensitize all dialog buttons at once. - - - - - gtk.Dialog.set_default_response - - - set_default_response - response_id - - - - response_id : - a response ID - - - - The set_default_response() method sets -the last widget in the dialog's action area with the specified -response_id as the default widget for the dialog. -Pressing Enter normally activates the default -widget. - - - - - gtk.Dialog.set_has_separator - - - set_has_separator - setting - - - - setting : - If True use a -separator - - - - The set_has_separator() method sets the -"has-separator" property to the value of setting. If -setting is True (the default -value) the dialog has a separator above the buttons. - - - - - gtk.Dialog.get_has_separator - - - get_has_separator - - - - Returns : - the value of the "has-separator" -property - - - - The get_has_separator() method returns -the value of the "has-separator" property. - - - - - gtk.Dialog.response - - - response - response_id - - - - response_id : - response ID - - - - The response() method emits the -"response" signal with the value specified in -response_id. This method is used to indicate that the -user has responded to the dialog in some way; typically either you or gtk.Dialog.run() -will be monitoring the "response" signal and take appropriate action. - - - - - gtk.Dialog.run - - - run - - - - Returns : - a response ID - - - - The run() method blocks in a recursive -main loop until the dialog either emits the "response" signal, or is -destroyed. If the dialog is destroyed, the run() -method returns gtk.RESPONSE_NONE; otherwise, it returns -the response ID from the "response" signal emission. Before entering the -recursive main loop, the run() method calls the -gtk.Widget.show() -on the dialog for you. Note that you still need to show any children of the -dialog yourself. - - During the run() method, the default -behavior of "delete_event" is disabled; if the dialog receives a -"delete_event", it will not be destroyed as windows usually are, and the -run() method will return -gtk.RESPONSE_DELETE_EVENT. Also, during the -run() method the dialog will be modal. You can -force the run() method to return at any time by -calling response() -to emit the "response" signal. Destroying the dialog during the -run() method is a very bad idea, because your -post-run code won't know whether the dialog was destroyed or not. - - After the run() method returns, you are -responsible for hiding or destroying the dialog as needed. - - - - - gtk.Dialog.set_alternative_button_order - - - set_alternative_button_order - new_order - - - - new_order : - a sequence containing response id -integer values - - - - - This method is available in PyGTK 2.6 and above. - - - The set_alternative_button_order() -method sets an alternative button order for the dialog based on the sequence -of response ids specified by new_order. If the -"gtk-alternative-button-order" property of the gtk.Settings -object is set to True, the dialog buttons are reordered -according to the order of the response ids passed to this method. - - By default, GTK+ dialogs use the button order advocated by the -Gnome Human Interface Guidelines with the affirmative button at the far -right, and the cancel button left of it. But the builtin GTK+ dialogs and -gtk.MessageDialogs -do provide an alternative button order, which is more suitable on some -platforms, e.g. Windows. - - Use this method after adding all the buttons to your dialog, -as the following example shows: - - - settings = gtk.settings_get_default() - settings.set_property('gtk-alternative-button-order', True) - - dialog = gtk.Dialog() - cancel_button = dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL) - ok_button = dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK) - ok_button.grab_default() - help_button = dialog.add_button(gtk.STOCK_HELP, gtk.RESPONSE_HELP) - - dialog.set_alternative_button_order([gtk.RESPONSE_OK, gtk.RESPONSE_CANCEL, - gtk.RESPONSE_HELP]) - - - - - - gtk.Dialog.get_response_for_widget - - - get_response_for_widget - widget - - - - widget : - a widget in the action area of the -dialog - - - Returns : - the response id of widget, -or gtk.RESPONSE_NONE if the widget doesn't have a response id -set. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_response_for_widget() method -returns the response id of the widget specified by -widget in the action area of the dialog. - - - - - - - Functions - - - gtk.alternative_dialog_button_order - - - gtk.alternative_dialog_button_order - screenNone - - - - screen : - the gtk.gdk.Screen or -None to use the default screen - - - Returns : - True if the alternative button -order should be used - - - - - This function is available in PyGTK 2.10 and above. - - - The gtk.alternative_dialog_button_order() -returns True if the alternative button order should be -used for the gtk.gdk.Screen -specified by screen. If screen -is None the default gtk.gdk.Screen is -used. - - - - - - - Signals - - - The "close" gtk.Dialog Signal - - - callback - dialog - user_param1 - ... - - - - - dialog : - the dialog that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "close" signal is emitted when the dialog is closed. - - - - - The "response" gtk.Dialog Signal - - - callback - dialog - response_id - user_param1 - ... - - - - - dialog : - the dialog that received the -signal - - - response_id : - the response id received by the -dialog - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "response" signal is emitted when an action_area widget is -activated (button "clicked"), the dialog receives a delete_event or the -application calls the response() -method. When a delete_event triggers the "response" signal the -response_id will be -gtk.RESPONSE_NONE. - - - - - -
diff --git a/docs/reference/pygtk-gtkdrawingarea.xml b/docs/reference/pygtk-gtkdrawingarea.xml deleted file mode 100644 index 3c7d5536..00000000 --- a/docs/reference/pygtk-gtkdrawingarea.xml +++ /dev/null @@ -1,161 +0,0 @@ - - - - - - gtk.DrawingArea - a widget for custom user interface elements. - - - - Synopsis - - - gtk.DrawingArea - gtk.Widget - - gtk.DrawingArea - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.DrawingArea - - - - - - gtk.DrawingArea Properties - - gtk.Object Properties - gtk.Widget Properties - - - - - gtk.DrawingArea Style Properties - - gtk.Widget Style Properties - - - - - gtk.DrawingArea Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - - - - Description - - The gtk.DrawingArea -widget is used for creating custom user interface elements. It's essentially -a blank widget containing a gtk.gdk.Window that -you can draw on. The contained gtk.gdk.Window is -accessed using the gtk.Widget "window" -attribute as: - - - gdkwindow = drawingarea.window - - - Since a gtk.gdk.Window - is a subclass of gtk.gdk.Drawable, - all of the gtk.gdk.Drawable - methods are available for drawing on the gtk.DrawingArea's - gdkwindow. - - After creating a drawing area, the application may want to -connect to: - - - - Mouse and button press signals to respond to input from the -user. Use the gtk.Widget.add_events() -method to enable events you wish to receive. To receive keyboard events, you -will need to set the gtk.CAN_FOCUS flag on the drawing -area - - - - The "realize" signal to take any necessary actions when the -widget is instantiated on a particular display. - - - - The "configure_event" signal to take any necessary actions -when the widget changes size. - - - - The "expose_event" signal to handle redrawing the contents of -the widget when a drawing area first comes on screen, or when it's covered by -another window and then uncovered (exposed). You can also force an expose -event by adding to the "damage region" of the drawing area's window using -the gtk.Widget.queue_draw_area() -method. - - - - See the Drawing -Area chapter in the tutorial for more information on using a gtk.DrawingArea. - - Sometimes a gtk.Image is a useful -alternative to a drawing area. You can put a gtk.gdk.Pixmap in -the gtk.Image -and draw to the gtk.gdk.Pixmap, -calling the gtk.Widget.queue_draw() -method on the gtk.Image when you -want to refresh to the screen. - - - - - Constructor - - - gtk.DrawingArea - - - - Returns : - a new drawingarea widget - - - - Creates a new gtk.DrawingArea -widget. - - - - diff --git a/docs/reference/pygtk-gtkeditable.xml b/docs/reference/pygtk-gtkeditable.xml deleted file mode 100644 index fe763c79..00000000 --- a/docs/reference/pygtk-gtkeditable.xml +++ /dev/null @@ -1,617 +0,0 @@ - - - - - - gtk.Editable - an interface for text-editing widgets. - - - - Synopsis - - - gtk.Editable - gobject.GInterface - - select_region - start - end - - - get_selection_bounds - - - - insert_text - text - position0 - - - delete_text - start_pos - end_pos - - - get_chars - start_pos - end_pos - - - cut_clipboard - - - copy_clipboard - - - paste_clipboard - - - delete_selection - - - set_position - position - - - get_position - - - set_editable - is_editable - - - get_editable - - - - - - - gtk.Editable Signal Prototypes - - - - "changed" - - callback - editable - - user_param1 - - ... - - - - - - "delete-text" - - callback - editable - - start - - end - - user_param1 - - ... - - - - - - "insert-text" - - callback - editable - - new_text - - new_text_length - - position - - user_param1 - - ... - - - - - - - - - - Description - - gtk.Editable - is an interface for text editing widgets, such as gtk.Entry. The - editable class contains methods 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. - - - - - Methods - - - gtk.Editable.select_region - - - select_region - start - end - - - - start : - the new start position of the -selection - - - end : - the new end position of the -selection - - - - The select_region() method selects a -region of text from start up to, but not including -end. If end is negative, then -the selection will run from start to the end of the -text. - - - - - gtk.Editable.get_selection_bounds - - - get_selection_bounds - - - - - Returns : - a tuple containing the start and end positions -of the selection or an empty tuple if there is no -selection - - - - The get_selection_bounds() method -returns a tuple that contains the start and end positions of the selection -if any or an empty tuple if there is no selection. - - - - - gtk.Editable.insert_text - - - insert_text - text - position0 - - - - text : - the text to be inserted - - - position : - the position where the text should be -inserted - - - - The insert_text() method inserts the -string specified by text at the location specified by -position. - - - - - gtk.Editable.delete_text - - - delete_text - start_pos - end_pos - - - - start_pos : - the start position of the text to -delete - - - end_pos : - the end position of the text to -delete - - - - The delete_text() method deletes a -sequence of characters starting from start_pos up to, -but not including end_pos. If -end_pos is negative, then the characters deleted will -be those characters from start_pos to the end of the -text. - - - - - gtk.Editable.get_chars - - - get_chars - start_pos - end_pos - - - - start_pos : - the start position - - - end_pos : - the end position - - - Returns : - a string containing the characters from start -to end - - - - The get_chars() method retrieves a -string of characters starting from start_pos up to, -but not including end_pos. If -end_pos is negative, then all the characters from -start_pos to the end of the text are -retrieved. - - - - - gtk.Editable.cut_clipboard - - - cut_clipboard - - - The cut_clipboard() method copies the -characters in the current selection to the clipboard and then deletes them -from the widget. - - - - - gtk.Editable.copy_clipboard - - - copy_clipboard - - - The copy_clipboard() method copies the -characters in the current selection to the clipboard - - - - - gtk.Editable.paste_clipboard - - - paste_clipboard - - - The paste_clipboard() method copies the -contents of the clipboard to the widget at the cursor position. - - - - - gtk.Editable.delete_selection - - - delete_selection - - - The delete_selection() method deletes -the characters in the selection and releases the selection ownership - - - - - gtk.Editable.set_position - - - set_position - position - - - - position : - the new cursor position - - - - The set_position() method sets the -cursor position to be just before the character at the location specified by -position. If position is less -than 0 or greater than the number of characters in the widget the cursor is -positioned after the last character in the widget. Note -position is in characters not bytes. - - - - - gtk.Editable.get_position - - - get_position - - - - Returns : - the cursor position - - - - The get_position() method retrieves the -cursor position as a character index starting from 0. If the cursor is after -the last character the position will equal the number of characters in the -widget. Note position is in characters not -bytes. - - - - - gtk.Editable.set_editable - - - set_editable - is_editable - - - - is_editable : - if True the text can be -edited - - - - The set_editable() method sets the -widget "editable" attribute of the widget to the value specified by -is_editable. If is_editable is -True the text can be edited; if False, -the text cannot be edited. - - - - - gtk.Editable.get_editable - - - get_editable - - - - Returns : - True if the text is -editable. - - - - The get_editable() method retrieves the -value of the widget "editable" attribute that specifies whether the text is -editable. See set_editable(). - - - - - - - Signals - - - The "changed" gtk.Editable Signal - - - callback - editable - user_param1 - ... - - - - - editable : - the editable that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "changed" signal is emitted when the contents of the widget -have changed. - - - - - The "delete-text" gtk.Editable Signal - - - callback - editable - start - end - user_param1 - ... - - - - - editable : - the editable that received the -signal - - - start : - the start position - - - end : - the end position - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "delete-text" signal is emitted when text is deleted from -the widget by the user. The default handler for this signal will normally be -responsible for deleting the text, so by connecting to this signal and then -stopping the signal with the gobject.stop_emission() -method, it is possible to prevent it from being deleted. The -start and end parameters are -interpreted as for delete_text() - - - - - The "insert-text" gtk.Editable Signal - - - callback - editable - new_text - new_text_length - position - user_param1 - ... - - - - - editable : - the editable that received the -signal - - - new_text : - the string that is being -inserted - - - new_text_length : - the length of the new text - - - position : - a pointer to the location at which the new text -will be inserted - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "insert-text" 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 the gobject.stop_emission() -method, it is possible to prevent it from being inserted entirely. The -position parameter is a gobject.GPointer -object containing a pointer to the insertion position - there is no way to -access the position value from PyGTK. - - - - - - diff --git a/docs/reference/pygtk-gtkentry.xml b/docs/reference/pygtk-gtkentry.xml deleted file mode 100644 index 1d77b9a9..00000000 --- a/docs/reference/pygtk-gtkentry.xml +++ /dev/null @@ -1,1568 +0,0 @@ - - - - - - gtk.Entry - a single line text entry field. - - - - Synopsis - - - gtk.Entry - gtk.Widget - gtk.Editable - gtk.CellEditable - - gtk.Entry - max0 - - - set_visibility - visible - - - get_visibility - - - - set_invisible_char - ch - - - get_invisible_char - - - - set_has_frame - setting - - - get_has_frame - - - - set_max_length - max - - - get_max_length - - - - set_activates_default - setting - - - get_activates_default - - - - set_width_chars - n_chars - - - get_width_chars - - - - set_text - text - - - get_text - - - - get_layout - - - - get_layout_offsets - - - - set_alignment - xalign - - - get_alignment - - - - set_completion - width_chars - - - get_completion - - - - set_inner_border - border - - - get_inner_border - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Entry (implements gtk.Editable, gtk.CellEditable) - - - - - - gtk.Entry Properties - - gtk.Object Properties - gtk.Widget Properties - -
- - - - - - - - - - "activates-default" - Read/Write - If True activate the default widget - (such as the default button in a dialog) when Enter is - pressed. Default value: False. - - - - "cursor-position" - Read - The current position of the insertion cursor as a - character index. Allowed values: [0,65535]. Default value: - 0 - - - - - "editable" - Read/Write - If True the entry contents can be - edited. Default value: True. - - - - "has-frame" - Read/Write - If False removes outside bevel from - entry. Default value: True. - - - - "inner-border" - Read/Write - The text area's border between the text and the frame - as a gtkBorder. Available in GTK+ 2.10. - - - - "invisible-char" - Read/Write - The character to use when masking entry contents (when - "visibility" is False). Default value: - '*'. - - - - "max-length" - Read/Write - The maximum number of characters for this entry. Zero - if no maximum. Allowed values: [0,65535] Default value: - 0. - - - - "scroll-offset" - Read - The number of pixels of the entry scrolled off the - screen to the left. Allowed values: >= 0 Default value: - 0. - - - - "selection-bound" - Read - The position of the opposite end of the selection from - the cursor as a character index. Allowed values: [0,65535] - Default value: 0. - - - - "text" - Read/Write - The contents of the entry. Default value: "". - - - - "truncate-multiline" - Read/Write - If True, pasted multi-line text is - truncated to the first line. Default value: - False. Available in GTK+ 2.10 and - above. - - - - "visibility" - Read/Write - If False displays the "invisible - char" instead of the actual text (e.g. password mode). Default - value: True. - - - - "width-chars" - Read/Write - The number of characters to leave space for in the - entry. Allowed values: >= -1. Default value: -1. - - - - "xalign" - Read/Write - The horizontal alignment ranging from 0.0 to 1.0 - representing the fraction of freespace to the left (right for - RTL layouts) of the text. Available in GTK+ 2.4 and - above. - - - - - -
- -
- - - gtk.Entry Style Properties - - gtk.Widget Style Properties - -
- - - - - - - - - "inner-border" - Read - Sets the text area's border between the text and the frame - This property is available in GTK+ 2.10 and above. - - - - - -
- -
- - - gtk.Entry Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Editable Signal Prototypes - gtk.CellEditable Signal Prototypes - - - - "activate" - - callback - entry - - user_param1 - - ... - - - - - - "backspace - - callback - entry - user_param1 - ... - - - - - "copy-clipboard" - - callback - entry - - user_param1 - - ... - - - - - - "cut-clipboard" - - callback - entry - - user_param1 - - ... - - - - - - "delete-from-cursor" - - callback - entry - - delete_type - - count - - user_param1 - - ... - - - - - - "insert-at-cursor" - - callback - entry - - string - - user_param1 - - ... - - - - - - "move-cursor" - - callback - entry - - step_size - - count - - extend_selection - - user_param1 - - ... - - - - - - "paste-clipboard" - - callback - entry - - user_param1 - - ... - - - - - - "populate-popup" - - callback - entry - - menu - - user_param1 - - ... - - - - - - "toggle-overwrite" - - callback - entry - - user_param1 - - ... - - - - - - - - - - Description - - The gtk.Entry 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. - - - - - Constructor - - - gtk.Entry - max0 - - - - max : - the maximum length of the entry, or 0 for no -maximum. (other than the maximum length of entries.) The value passed in -will be limited to the range 0-65536. - - - Returns : - a new gtk.Entry. - - - - Creates a new gtk.Entry widget - with the maximum length specified by max. - - - - - Methods - - - gtk.Entry.set_visibility - - - set_visibility - visible - - - - visible : - If False the contents are obscured using the -"invisible-char" - - - - The set_visibility() method sets the - "visibility" property to the value of - visible. If visible is True - the contents of the entry are displayed as plain text. If visible is - False, the contents are obscured by replacing the - characters with the invisible character (specified by the - "invisible-char" property). The characters will also be obscured when - the text in the entry widget is copied elsewhere. The default - invisible char is the asterisk '*', but it can be changed with set_invisible_char(). - - - - - gtk.Entry.get_visibility - - - get_visibility - - - - Returns : - True if the text is -currently visible - - - - The get_visibility() method retrieves - the value of the "visibility" property that determines whether the - text in entry is visible. See set_visibility(). - - - - - gtk.Entry.set_invisible_char - - - set_invisible_char - ch - - - - ch : - a Unicode character - - - - The set_invisible_char() method sets - the "invisible-char" property with the value of - ch. The "invisible-char" is the character to - use in place of the actual text when set_visibility() - has been called to set text visibility to - False. i.e. this is the character used in - "password mode" to show the user how many characters have been - typed. The default invisible character is an asterisk ('*'). If you - set the invisible character to 0, then the user will get no feedback - at all; there will be no text on the screen as they type. - - - - - gtk.Entry.get_invisible_char - - - get_invisible_char - - - - Returns : - the current invisible char, or 0, if the entry -does not show invisible text at all. - - - - The get_invisible_char() method retrieves the value of the - "invisible-char" property. The "invisible-char" is the character - displayed in place of the real characters for entries with visibility - set to False. See set_invisible_char(). - - - - - gtk.Entry.set_has_frame - - - set_has_frame - setting - - - - setting : - If True the entry is displayed with a beveled -frame around it. - - - - The set_has_frame() method sets the - "has-frame" property to the value of setting. - If setting is True the entry - is displayed with a beveled frame around it. - - - - - gtk.Entry.get_has_frame - - - get_has_frame - - - - Returns : - whether the entry has a beveled -frame - - - - The get_has_frame() method gets the - value of the "has-frame" property. If "has-frame" is - True the entry will be displayed with a beveled - frame around it. - - - - - gtk.Entry.set_max_length - - - set_max_length - max - - - - max : - the maximum length of the entry, or 0 for no - maximum. (other than the maximum length of entries.) The value - passed in will be clamped to the range - 0-65536. - - - - The set_max_length() method sets the - "max-length" property to the value of max. The - "max-length" property 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. If max is 0 then there is - no maximum length (other than 65536). - - - - - gtk.Entry.get_max_length - - - get_max_length - - - - Returns : - the maximum allowed number of characters in -gtk.Entry, or 0 -if there is no maximum. - - - - The get_max_length() method retrieves - the value of the "max-length" property that specifies the maximum - allowed length of the text in the entry. See set_max_length(). - - - - - gtk.Entry.set_activates_default - - - set_activates_default - setting - - - - setting : - If True activate the -window's default widget on an Enter -key press - - - - The set_activates_default() method sets - the "activates-default" property to the value of - setting. If setting is - True, pressing the Enter key in - the entry will activate the default widget for the window containing - the entry. This usually means that the dialog box containing the - entry will be closed, since the default widget is usually one of the - dialog buttons. - - (For experts: if setting is - True, the entry calls gtk.Window.activate_default() - on the window containing the entry, in the default handler for the - "activate" signal.) - - - - - gtk.Entry.get_activates_default - - - get_activates_default - - - - Returns : - True if the entry will -activate the default widget - - - - The get_activates_default() method - retrieves the value of the "activates-default" property which is set - by set_activates_default(). - If "activates-default" is True pressing the - Enter key in the entry will activate the default - widget for the window containing the entry. - - - - - gtk.Entry.set_width_chars - - - set_width_chars - n_chars - - - - n_chars : - width in chars - - - - The set_width_chars() method sets the - "width-chars" property to the value of n_char. - Setting the "width-chars" property changes the size request of the - entry to be about the right size for n_chars - characters. Note that it only changes the size - request, the size can still be affected by how - you pack the widget into containers. If n_chars - is -1, the size reverts to the default entry size. - - - - - gtk.Entry.get_width_chars - - - get_width_chars - - - - Returns : - number of chars to request space for, or -negative if unset - - - - The get_width_chars() method gets the - value of the "width-chars" property which is set by the set_width_chars() - method. - - - - - gtk.Entry.set_text - - - set_text - text - - - - text : - a string to use as the new contents of the -entry - - - - The set_text() method sets the "text" - property to the value of text. The string in - text replaces the current contents of the - entry. - - - - - gtk.Entry.get_text - - - get_text - - - - Returns : - the contents of the entry as a -string - - - - The get_text() method returns the value - of the "text" property which is a string containing the contents of - the entry. - - - - - gtk.Entry.get_layout - - - get_layout - - - - Returns : - the pango.Layout for -this entry - - - - The get_layout() method gets the pango.Layout - used to display the entry. The layout is useful to e.g. convert text - positions to pixel positions, in combination with get_layout_offsets(). - - - - - gtk.Entry.get_layout_offsets - - - get_layout_offsets - - - - - Returns : - a tuple containing the X and Y offsets of the -pango layout - - - - The get_layout_offsets() method obtains - the position of the pango.Layout - used to render text in the entry, in widget coordinates and returns it - as a tuple. This method is used to line up the text in an entry with - some other text, e.g. when using the entry to implement editable cells - in a sheet widget. It is also useful to convert mouse events into - coordinates inside the pango.Layout, - e.g. to take some action if some part of the entry text is - clicked. - - Note that as the user scrolls around in the entry the offsets - will change; you'll need to connect to the "notify::scroll_offset" - signal to track this. - - - - - gtk.Entry.set_alignment - - - set_alignment - xalign - - - - xalign : - The horizontal alignment ranging from 0.0 to - 1.0 representing the freespace to the left (right for RTL layouts) - of the text. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_alignment() method sets the - "xalign" property to the value of xalign. The - alignment controls the horizontal positioning of the contents when the - displayed text is shorter than the width of the entry. The value of - xalign is the fraction of freespace to the left - (right in RTL layouts) of the text. - - - - - gtk.Entry.get_alignment - - - get_alignment - - - - Returns : - The horizontal alignment ranging from 0.0 to - 1.0 representing the freespace to the left (right for RTL layouts) - of the text. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_alignment() method returns the - value of the "xalign" property which is the fraction of freespace (if - any) to the left (right in RTL layouts) of the text. - - - - - gtk.Entry.set_completion - - - set_completion - completion - - - - completion : - a gtk.EntryCompletion - - - - - This method is available in PyGTK 2.4 and above. - - - The set_completion() method sets the - gtk.EntryCompletion - specified by completion to be the auxiliary - completion object to use with the entry. All further configuration of - the completion mechanism is done using - completion and the gtk.EntryCompletion - methods. - - - - - gtk.Entry.get_completion - - - get_completion - - - - Returns : - the auxiliary completion object - - - - - This method is available in PyGTK 2.4 and above. - - - The get_completion() method returns the - gtk.EntryCompletion - object currently in use by the entry. - - - - - gtk.Entry.set_inner_border - - - set_inner_border - border - - - - - border : - a gtk.Border, - or None - - - - - This method is available in PyGTK 2.10 and above. - - - The set_inner_border() method sets the - entry's "inner-border" property to the value specified by - border, or clears it if None - is passed. The "inner-border" is the area around the entry's text, but - inside its frame. - - If set, this property overrides the inner-border style property. - Overriding the style-provided border is useful when you want to do - in-place editing of some text in a canvas or list widget, where - pixel-exact positioning of the entry is important. - - - - - gtk.Entry.get_inner_border - - - get_inner_border - - - - - - Returns : - the entry's gtk.Border, - or None if none was set. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_inner_border() method returns - the value of the entry's "inner-border" property. See set_inner_border() - for more information. - - - - - - - Signals - - - The "activate" gtk.Entry Signal - - - callback - entry - user_param1 - ... - - - - - entry : - the entry that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "activate" signal is emitted when the entry is activated - either by user action (pressing the Enter key) or - programmatically with the gtk.Widget.activate() - method - - - - - The "backspace" gtk.Entry Signal - - callback - entry - user_param1 - ... - - - - - entry : - the object which received the signal. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - The "backspace" signal is emitted when the - Backspace key is entered from the keyboard. - - - - - The "copy-clipboard" gtk.Entry Signal - - - callback - entry - user_param1 - ... - - - - - entry : - the entry that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "copy-clipboard" signal is emitted when the selection text - in the entry is copied to the clipboard. - - - - - The "cut-clipboard" gtk.Entry Signal - - - callback - entry - user_param1 - ... - - - - - entry : - the entry that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "cut-clipboard" signal is emitted when the selection in the - entry is cut (removed from the entry) and placed in the - clipboard. - - - - - The "delete-from-cursor" gtk.Entry Signal - - - callback - entry - delete_type - count - user_param1 - ... - - - - - entry : - the entry that received the -signal - - - delete_type : - the type of deletion - - - count : - the number of deletions of the type to -perform - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "delete-from-cursor" signal is emitted when the a deletion - from the cursor i.e. removal o text at the cursor position, either - before it (negative count) or after it - (positive count). The value of - delete_type can be one of: - - - - gtk.DELETE_CHARS - - - gtk.DELETE_WORD_ENDS - - - gtk.DELETE_WORDS - - - gtk.DELETE_DISPLAY_LINES - - - gtk.DELETE_DISPLAY_LINE_ENDS - - - gtk.DELETE_PARAGRAPH_ENDS - - - gtk.DELETE_PARAGRAPHS - - - gtk.DELETE_WHITESPACE - - - - - - - The "insert-at-cursor" gtk.Entry Signal - - - callback - entry - string - user_param1 - ... - - - - - entry : - the entry that received the -signal - - - string : - the text being inserted in the -entry - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "insert-at-cursor" signal is emitted when text is being - inserted in the entry. - - - - - The "move-cursor" gtk.Entry Signal - - - callback - entry - step - count - extend_selection - user_param1 - ... - - - - - entry : - the entry that received the -signal - - - step : - the size of the step to move the -cursor - - - count : - the number of steps to move the -cursor - - - extend_selection : - if True extend the selection as well as moving -the cursor - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "move-cursor" signal is emitted when the cursor is being - moved by count steps of size - step. If - extend_selection is True the - selection is extended as the cursor is being moved. The value of - step can be one of: - - - - gtk.MOVEMENT_LOGICAL_POSITIONS - - - gtk.MOVEMENT_VISUAL_POSITIONS - - - gtk.MOVEMENT_WORDS - - - gtk.MOVEMENT_DISPLAY_LINES - - - gtk.MOVEMENT_DISPLAY_LINE_ENDS - - - gtk.MOVEMENT_PARAGRAPH_ENDS - - - gtk.MOVEMENT_PARAGRAPHS - - - gtk.MOVEMENT_PAGES - - - gtk.MOVEMENT_BUFFER_ENDS - - - - - - - The "paste-clipboard" gtk.Entry Signal - - - callback - entry - user_param1 - ... - - - - - entry : - the entry that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "paste-clipboard" signal is emitted when the contents of the - clipboard are pasted into the entry. - - - - - The "populate-popup" gtk.Entry Signal - - - callback - entry - menu - user_param1 - ... - - - - - entry : - the entry that received the -signal - - - menu : - the menu that needs -populating - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "populate-popup" signal is emitted when the - menu needs populating. - - - - - The "toggle-overwrite" gtk.Entry Signal - - - callback - entry - user_param1 - ... - - - - - entry : - the entry that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "toggle-overwrite" signal is emitted when the internal entry - attribute "overwrite_mode" is toggled by pressing the - Insert key. - - - - - -
diff --git a/docs/reference/pygtk-gtkentrycompletion.xml b/docs/reference/pygtk-gtkentrycompletion.xml deleted file mode 100644 index fad28156..00000000 --- a/docs/reference/pygtk-gtkentrycompletion.xml +++ /dev/null @@ -1,1148 +0,0 @@ - - - - - gtk.EntryCompletion completion - functionality for gtk.Entry (new in - PyGTK 2.4) - - - - Synopsis - - - gtk.EntryCompletion - gobject.GObject - gtk.CellLayout - - gtk.EntryCompletion - - - get_entry - - - - set_model - modelNone - - - get_model - - - - set_match_func - func - func_data - - - set_minimum_key_length - length - - - get_minimum_key_length - - - complete - - - insert_action_text - index - text - - - insert_action_markup - index - markup - - - delete_action - index - - - insert_prefix - - - - set_text_column - column - - - get_text_column - - - - set_inline_completion - inline_completion - - - get_inline_completion - - - - set_popup_completion - popup_completion - - - get_popup_completion - - - - set_popup_set_width - popup_set_width - - - get_popup_set_width - - - - set_popup_single_match - popup_single_match - - - get_popup_single_match - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.EntryCompletion (implements gtk.CellLayout) - - - - - - gtk.EntryCompletion Properties - -
- - - - - - - - - "inline-completion" - Read-Write - If True the common prefix should be - inserted automatically. Default value: - False. Available in GTK+ 2.6 and - above. - - - - "minimum-key-length" - Read-Write - Minimum length of the search key in order to look up - matches. Allowed values >= 0. Default value: 1 - - - - "model" - Read-Write - The gtk.TreeModel - to find matches in. - - - - "popup-completion" - Read-Write - If True the completions should be - shown in a popup window. Default value: - True. Available in GTK+ 2.6 and - above. - - - - "popup-set-width" - Read-Write - If True the completions popup window - will be resized to the width of the entry. Default value: - True. Available in GTK+ 2.8 and - above. - - - - "popup-single-match" - Read-Write - If True the completions popup window - will be for a single possible completion. Default value: - True. Available in GTK+ 2.8 and - above. - - - - "text-column" - Read-Write - The column of the model containing the strings. Allowed - values: >= -1. Default value: -1. Available in GTK+ 2.6 and - above. - - - - - -
- -
- - - gtk.EntryCompletion Signal Prototypes - - gobject.GObject Signal Prototypes - - - - "action-activated" - - callback - completion - index - user_param1 - ... - - - - - "insert-prefix" - - callback - completion - prefix - user_param1 - ... - - - - - "match-selected" - - callback - completion - model - iter - user_param1 - ... - - - - - - - - - Description - - - This widget is available in PyGTK 2.4 and above. - - - gtk.EntryCompletion - is an auxiliary object to be used in conjunction with gtk.Entry to - provide completion functionality. It implements the gtk.CellLayout - interface, to allow the user to add extra cells to the popup display of - completions. - - To add completion functionality to an entry, use the gtk.Entry.set_completion() - method. In addition to regular completion matches, that will be - inserted into the entry when they are selected, gtk.EntryCompletion - also allows "actions" to be displayed in the popup window below any - completions. Their appearance is similar to menuitems, to differentiate - them clearly from completion strings. When an action is selected, the - "action-activated" signal is emitted. - - A gtk.TreeModel - (e.g. a gtk.ListStore) - containing the completion strings is associated with the gtk.EntryCompletion - using the set_model() - method. The tree model column containing the completion strings can be - set using the convenience method set_text_column() - that also creates a gtk.CellRendererText - and packs it into the entry completion. - - Otherwise, you can create gtk.CellRenderer - objects and pack them into the gtk.EntryCompletion - using the gtk.CellLayout - methods gtk.CellLayout.pack_start() - or gtk.CellLayout.pack_start(). However, - you will also have to define a match function and set it with the set_match_func() - method. - - If you wanted to create a completion list with the strings to - insert and some additional info e.g. an icon or description you could do - something like: - - - entry = gtk.Entry() - completion = gtk.EntryCompletion() - entry.set_completion(completion) - liststore = gtk.ListStore(gobject.TYPE_STRING, gtk.gdk.Pixbuf) - completion.set_model(liststore) - pixbufcell = gtk.CellRendererPixbuf() - completion.pack_start(pixbufcell) - completion.add_attribute(pixbufcell, 'pixbuf', 1) - # create a gtk.CellRendererText and pack it in the completion. Also set the - # 'text' attribute - completion.set_text_column(0) - # load up the liststore with string - pixbuf data - assuming pixbuf created - liststore.append(['string text', pixbuf]) - - - This will create an entry that will display a pixbuf and the text - string during completion. - - Actions are easily managed using the insert_action_text(), - insert_action_markup() - and delete_action() - methods. - - - - - Constructor - - - gtk.EntryCompletion - - - - Returns : - A newly created gtk.EntryCompletion object. - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new gtk.EntryCompletion -object. - - - - - Methods - - - gtk.EntryCompletion.get_entry - - - get_entry - - - - Returns : - The gtk.Entry - that the completion is attached to. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_entry() method retrieves the -gtk.Entry that -the entry completion is attached to. - - - - - gtk.EntryCompletion.set_model - - - set_model - modelNone - - - - model : - The gtk.TreeModel - to use with the entry completion. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_model() method sets the gtk.TreeModel -specified by model to be used with the entry -completion. A previously set model will be removed before the new model -is set. If model is None or not -specified, the old model will be unset. - - - In PyGTK 2.4.0 the model could not be None -and did not default to None. - - - - - - gtk.EntryCompletion.get_model - - - get_model - - - - Returns : - The current gtk.TreeModel, - or None if not set. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_model() method returns the -gtk.TreeModel -that the entry completion is using as data source. Returns -None if the model is unset. - - - - - gtk.EntryCompletion.set_match_func - - - set_match_func - func - func_data - - - - func : - A function to be used. - - - func_data : - The user data for func. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_match_func() method sets the -match function specified by func. The match function -is used by the entry completion to determine if a row of the associated tree -model should be in the completion list. - - The signature of the match function is: - - - def match_func(completion, key_string, iter, func_data): - - - where completion is the gtk.EntryCompletion -that the match function is invoked on, key_string is -the current contents of the gtk.Entry to be -matched, iter is a gtk.TreeIter -pointing at a row in the gtk.TreeModel -associated with completion and func_data is the data -specified when the set_match_func() -method was called. The match function should return True -if the completion string should be displayed; otherwise, -False. - - A simple example match function is: - - - # Assumes that the func_data is set to the number of the text column in the - # model. - def match_func(completion, key, iter, column): - model = completion.get_model() - text = model.get_value(iter, column) - if text.startswith(key): - return True - return False - - - You must use the set_match_func() -method to display completions if you don't use the set_text_column() -method. - - - - - gtk.EntryCompletion.set_minimum_key_length - - - set_minimum_key_length - length - - - - length : - The minimum length of the key string in order - to start completing. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_minimum_key_length() method -sets the minimum length of the search key to the value specified by -length. This means that the key string (contents of -the gtk.Entry) -must be at least length characters before a -completion list will be displayed. This is useful for long lists, where -completing using a small key will take too much time and will likely return -too large a dataset. - - - - - gtk.EntryCompletion.get_minimum_key_length - - - get_minimum_key_length - - - - Returns : - The currently used minimum key - length. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_minimum_key_length() method -returns the minimum key length set for the entry completion. See the -set_minimum_key_length() -method for more information. - - - - - gtk.EntryCompletion.complete - - - complete - - - - This method is available in PyGTK 2.4 and above. - - - The complete() method requests a -completion operation, i.e. a refiltering of the current list -with completions, using the current key. The completion list view will be -updated accordingly. - - - - - gtk.EntryCompletion.insert_action_text - - - insert_action_text - index - text - - - - index : - The index in the action list where the item - should be inserted. - - - text : - The text of the item to - insert. - - - - - This method is available in PyGTK 2.4 and above. - - - The insert_action_text() method inserts -an action in the action item list of the entry completion at the position -specified by index with the text specified by -text. If you want the action item to have markup, use -the gtk.EntryCompletion.insert_action_markup() -method. - - - - - gtk.EntryCompletion.insert_action_markup - - - insert_action_markup - index - markup - - - - index : - The index in the action list where the item - should be inserted. - - - markup : - The Pango markup of the item to - insert. - - - - - This method is available in PyGTK 2.4 and above. - - - The insert_action_markup() method -inserts an action item in the action item list of the entry completion at -the position specified by index with the Pango markup -specified by markup. - - - - - gtk.EntryCompletion.delete_action - - - delete_action - index - - - - index : - The index of the item to - delete. - - - - - This method is available in PyGTK 2.4 and above. - - - The delete_action() method deletes the -action item at the position in the action item list specified by -index. - - - - - gtk.EntryCompletion.insert_prefix - - - insert_prefix - - - - This method is available in PyGTK 2.6 and above. - - - The insert_prefix() method requests a -prefix insertion. - - - - - gtk.EntryCompletion.set_text_column - - - set_text_column - column - - - - column : - The column in the model to get strings - from. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_text_column() method is a -convenience method for setting up the most common completion scenario: a -completion list with just strings. This method creates and adds a gtk.CellRendererText -using the column specified by column as the source -for completion strings. If you don't use this method you will have to -install a gtk.CellRendererText -in the entry completion and set a match function using the set_match_func() -method to display the completion strings. In GTK+ 2.6 the "text-column" -property is set to the value of column. - - - - - gtk.EntryCompletion.get_text_column - - - get_text_column - - - - - Returns : - The column containing the text -strings. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_text_column() method returns -the value of the "text-column" property. The "text-column" property contains -the index of the column in the completion model to get strings from. See the -set_text_column() -method for more information. - - - - - gtk.EntryCompletion.set_inline_completion - - - set_inline_completion - inline_completion - - - - inline_completion : - if True do inline -completion - - - - - This method is available in PyGTK 2.6 and above. - - - The set_inline_completion() method sets -the "inline-completion" property to the value of -inline_completion. If -inline_completion is True, the -common prefix of the possible completions should be automatically inserted -in the entry. - - - - - gtk.EntryCompletion.get_inline_completion - - - get_inline_completion - - - - - Returns : - True if automatic inline -completion is enabled. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_inline_completion() method -returns the value of the "inline-completion" property. If the value of the -"inline-completion" property is True the common prefix of -possible completions is automatically inserted in the entry. - - - - - gtk.EntryCompletion.set_popup_completion - - - set_popup_completion - popup_completion - - - - popup_completion : - If True do popup -completion. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_popup_completion() method sets -the "popup-completion" property to the value of -popup_completion. If -popup_completion is True the -completions should be presented in a popup window. - - - - - gtk.EntryCompletion.get_popup_completion - - - get_popup_completion - - - - - Returns : - True if completions should -be displayed in a popup. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_popup_completion() method -returns the value of the "popup-completion" property. If the value of -"popup-completion" property is True the completions -should be presented in a popup window. - - - - - gtk.EntryCompletion.set_popup_set_width - - - set_popup_set_width - popup_set_width - - - - popup_set_width : - If True the completions -popup window will be resized to the width of the -completion. - - - - - This method is available in PyGTK 2.8 and above. - - - The set_popup_set_width() method sets -the "popup-set-width" property to the value of -popup_set_width. If -popup_set_width is True the -completions popup window will be resized to the width of the completion. - - - - - gtk.EntryCompletion.get_popup_set_width - - - get_popup_set_width - - - - - Returns : - True if the completions popup -window will be resized to the width of the completion. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_popup_set_width() method -returns the value of the "popup-set-width" property. If the value of -"popup-set-width" property is True the completions popup -window will be resized to the width of the completion. - - - - - gtk.EntryCompletion.set_popup_single_match - - - set_popup_single_match - popup_single_match - - - - popup_single_match : - If True the completions popup -window will appear even for a single match. - - - - - This method is available in PyGTK 2.8 and above. - - - The set_popup_single_match() method -sets the "popup-single-match" property to the value of -popup_single_match. If -popup_single_match is True the -completions popup window will appear even for a single match. - - - - - gtk.EntryCompletion.get_popup_completion - - - get_popup_single_match - - - - - Returns : - True if the completions popup -window should appear even for a single match. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_popup_single_match() method -returns the value of the "popup-single-match" property. If the value of -"popup-single-match" property is True the completions -popup window should appear even for a single match. - - - - - - - Signals - - - The "action-activated" gtk.EntryCompletion Signal - - - callback - completion - index - user_param1 - ... - - - - - completion : - the entry completion that received the -signal - - - index : - the index of the action item that was - activated. - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.4 and above. - - - The "action-activated" signal is emitted when an action item is -selected from the popup action list. - - - - - The "insert-prefix" gtk.EntryCompletion Signal - - - callback - completion - prefix - user_param1 - ... - - - - - completion : - the entry completion that received the -signal - - - prefix : - the common prefix of all possible -completions - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.6 and above. - - - The "insert-prefix" signal is emitted when the inline -auto-completion is triggered. The default behavior is to make the entry -display the whole prefix and select the newly inserted part. - - Applications may connect to this signal in order to insert only -a smaller part of the prefix into the entry - e.g. the entry used in the -gtk.FileChooser -inserts only the part of the prefix up to the next '/'. - - - - - The "match-selected" gtk.EntryCompletion Signal - - - callback - completion - model - iter - user_param1 - ... - - - - - completion : - the entry completion that received the -signal - - - model : - the gtk.TreeModel - that iter points into. - - - iter : - a gtk.TreeIter - pointing at the selection completion string row in - model. - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.4 and above. - - - The "match-selected" signal is emitted when a completion string -was selected from the completion list. iter points at -the row in model that contains the completion -string. - - - - - -
diff --git a/docs/reference/pygtk-gtkeventbox.xml b/docs/reference/pygtk-gtkeventbox.xml deleted file mode 100644 index 83a34a3d..00000000 --- a/docs/reference/pygtk-gtkeventbox.xml +++ /dev/null @@ -1,283 +0,0 @@ - - - - - - gtk.EventBox - a widget used to catch events for widgets which do not have -their own window. - - - - Synopsis - - - gtk.EventBox - gtk.Bin - - gtk.EventBox - - - get_visible_window - - - set_visible_window - visible_window - - - get_above_child - - - set_above_child - above_child - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.EventBox - - - - - - gtk.EventBox Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - -
- - - - - - - - - "above-child" - Read-Write - If True, the event-trapping window - of the eventbox is above the window of the child widget as - opposed to below it. Available in GTK+ 2.4 and above. - - - - "visible-window" - Read-Write - If True, the event box is visible, - as opposed to invisible and only used to trap - events. Available in GTK+ 2.4 and above. - - - - - -
- -
- - - gtk.EventBox Style Properties - - gtk.Widget Style Properties - - - - - gtk.EventBox Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - Description - - The gtk.EventBox -widget is an invisible container widget that provides a window for widgets -that do not have their own window. In GTK, widgets must have a window to be -able to receive event signals. Those widgets that are "windowless" can use a -gtk.EventBox -to receive event signals. - - - - - Constructor - - - gtk.EventBox - - - - Returns : - an eventbox widget - - - - Creates a new gtk.EventBox -widget. - - - - - Methods - - - gtk.EventBox.get_visible_window - - - get_visible_window - - - - Returns : - True if the event box window is -visible. - - - - - This method is available in PyGTK 2.4 and above. - - - The gtk_visible_window() method returns -True if the event box has a visible window. See the set_visible_window() method -for details. - - - - - gtk.EventBox.set_visible_window - - - set_visible_window - visible_window - - - - visible_window : - if True the event box window is -visible. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_visible_window() method sets -whether the event box uses a visible or invisible child window according to -the value specified by visible_window. If -visible_window is True the event -box uses a visible child window; otherwise, an invisible child window. The -default is to use visible windows. - - In an invisible window event box, the window that that the event -box creates is a gtk.gdk.INPUT_ONLY window, that is -invisible and only serves to receive events. A visible window event box -creates a visible (gtk.gdk.INPUT_OUTPUT) window that acts -as the parent window for all the widgets contained in the event box. - - You should generally make your event box invisible if you just -want to trap events. Creating a visible window may cause artifacts that are -visible to the user, especially if the user is using a theme with gradients -or pixmaps. The main reason to create a non input-only event box is if you -want to set the background to a different color or draw on it. - - - There is one unexpected issue for an invisible event box that -has its window below the child. (See the set_above_child() -method.) Since the input-only window is not an ancestor window of any -windows that descendant widgets of the event box create, events on these -windows aren't propagated up by the windowing system, but only by GTK+. The -practical effect of this is if an event isn't in the event mask for the -descendant window (see the gtk.Widget.add_events() -method), it won't be received by the event box. - - This problem doesn't occur for visible event boxes, because -the event box window is actually the ancestor of the descendant windows, not -just at the same place on the screen. - - - - - - gtk.EventBox.get_above_child - - - get_above_child - - - - Returns : - True if the event box window is -above the window of its child. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_above_child() method returns -the value of the "above-child" property that indicates whether the event box -window is above or below the windows of its child. See the set_above_child() -method for details. - - - - - gtk.EventBox.set_above_child - - - set_above_child - above_child - - - - above_child : - if True the event box window is -above the windows of its child - - - - - This method is available in PyGTK 2.4 and above. - - - The set_above_child() method sets the -"above-child" property to the value of -above_child. If above_child is -True, the event box window is positioned above the -windows of its child; otherwise, below it. If the window is above, all -events inside the event box will go to the event box. If the window is -below, events in windows of child widgets will first got to that widget, and -then to its parents. The default is to keep the window below the child. - - - - - -
diff --git a/docs/reference/pygtk-gtkexpander.xml b/docs/reference/pygtk-gtkexpander.xml deleted file mode 100644 index 22ddc690..00000000 --- a/docs/reference/pygtk-gtkexpander.xml +++ /dev/null @@ -1,713 +0,0 @@ - - - - - gtk.Expander a container that can hide - its child (new in PyGTK 2.4) - - - - Synopsis - - - gtk.Expander - gtk.Bin - - gtk.Expander - labelNone - - - set_expanded - expanded - - - get_expanded - - - - set_spacing - spacing - - - get_spacing - - - - set_label - label - - - get_label - - - - set_use_underline - use_underline - - - get_use_underline - - - - set_use_markup - use_markup - - - get_use_markup - - - - set_label_widget - label_widget - - - get_label_widget - - - - - -Functions - - - gtk.expander_new_with_mnemonic - labelNone - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Expander - - - - gtk.Expander Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - -
- - - - - - - - - "expanded" - Read-Write - If True, the expander has been -opened to reveal the child widget. - - - - "label" - Read-Write - The text of the expander's label. - - - - "label-widget" - Read-Write - A widget to display in place of the usual expander -label. - - - - "spacing" - Read-Write - The space to put between the label and the child. - - - - "use-markup" - Read-Write - If True, the text of the label -includes Pango markup. See the pango.parse_markup() -function. - - - - "use-underline" - Read-Write - If True, n underline in the text -indicates the next character should be used for the mnemonic accelerator -key. - - - - - -
- -
- - - gtk.Expander Style Properties - - gtk.Widget Style Properties - -
- - - - - - - - - "expander-size" - Read - The size of the expander arrow. - - - - "expander-spacing" - Read - The spacing around expander arrow. - - - - - -
- -
- -
- - - gtk.Expander Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - "activate" - - callback - expander - user_param1 - ... - - - - - - - - - Description - - - This widget is available in PyGTK 2.4 and above. - - - A gtk.Expander - allows the user to hide or show its child by clicking on an expander - triangle similar to the triangles used in a gtk.TreeView. - - Normally you use an expander as you would use any other descendant - of gtk.Bin; - you create the child widget and use gtk.Container.add() - to add it to the expander. When the expander is toggled, it will take - care of showing and hiding the child automatically. - - - Special Usage - - There there are situations in which you may prefer to show and - hide the expanded widget yourself, such as when you want to actually - create the widget at expansion time. In this case, create a gtk.Expander - but do not add a child to it. The expander widget has the "expanded" - property that can be used to monitor its expansion state. You should - watch this property with a signal connection as follows: - - - expander = gtk.expander_new_with_mnemonic("_More Options") - expander.connect("notify::expanded", expander_callback) - - ... - - def expander_callback(expander, param_spec, user_data): - if expander.get_expanded(): - # Show or create widgets - else: - # Hide or destroy widgets - - - The "activate" signal can also be used to track the expansion - though it occurs before the "expanded" property is changed so the - logic of the expander_callback() function would - have to be reversed. - - - - - - - Constructor - - - gtk.Expander - labelNone - - - - label : - the text of the label or -None - - - Returns : - a new gtk.Expander widget. - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new expander using label as the -text of the label. If label is -None or not specified, no label will be created. - - - - - Methods - - - gtk.Expander.set_expanded - - - set_expanded - expanded - - - - expanded : - if True, the child widget is -revealed - - - - - This method is available in PyGTK 2.4 and above. - - - The set_expanded() method sets the -"expanded" property to the value of expanded. If -expanded is True, the child widget -is revealed; if False, the child widget is hidden. - - - - - gtk.Expander.get_expanded - - - get_expanded - - - - - Returns : - True if the child is -revealed. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_expanded() method returns the -value of the "expanded" property. If "expanded" is True -the child widget is revealed. - - - - - gtk.Expander.set_spacing - - - set_spacing - spacing - - - - spacing : - the distance between the expander and child -in pixels. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_spacing() method sets the -"spacing" property to the value of spacing that sets -is the number of pixels to place between expander and the child. - - - - - gtk.Expander.get_spacing - - - get_spacing - - - - - Returns : - the spacing between the expander and -child. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_spacing() method returns the -value of the "spacing" property set by the set_spacing() -method. - - - - - gtk.Expander.set_label - - - set_label - label - - - - label : - a string to use as the label or -None - - - - - This method is available in PyGTK 2.4 and above. - - - The set_label() method sets the "label" -property to the value of label and sets the text of -the label of the expander. Any previously set label will be cleared. If -label is None the expander will -have no label. - - - - - gtk.Expander.get_label - - - get_label - - - - - Returns : - the text of the label widget. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_label() method returns the -value of the "label" property that contains the text of the expander label, -as set by the set_label() -method. If the label text has not been set the return value will be -None. - - - - - gtk.Expander.set_use_underline - - - set_use_underline - use_underline - - - - use_underline : - True if underlines in the -text indicate mnemonics - - - - - This method is available in PyGTK 2.4 and above. - - - The set_use_underline() method sets the -"use_underline" property to the value of -use_underline. If -use_underline is True, an -underline in the text of the expander label indicates the next character -should be used for the mnemonic accelerator key. - - - - - gtk.Expander.get_use_underline - - - get_use_underline - - - - Returns : - True if an embedded -underline in the expander label indicates the mnemonic accelerator -keys. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_use_underline() method returns -the value of the "use-underline" property. If "use-underline" is -True an embedded underline in the expander label -indicates a mnemonic. See the set_use_underline() -method. - - - - - gtk.Expander.set_use_markup - - - set_use_markup - use_markup - - - - use_markup : - if True, the label's text -should be parsed for markup - - - - - This method is available in PyGTK 2.4 and above. - - - The set_use_markup() method sets the -"use-markup" property to the value of use_markup. If -use_markup is True the text of the -label contains markup in the Pango -text markup language. See the gtk.Label.set_markup() method for more information. - - - - - gtk.Expander.get_use_markup - - - get_use_markup - - - - Returns : - True if the label's text -will be parsed for markup - - - - - This method is available in PyGTK 2.4 and above. - - - The get_use_markup() method returns the -value of the "use-markup" property. If "use-markup" is -True, the label's text is interpreted as marked up with -the Pango text markup -language. See the set_use_markup() -method. - - - - - gtk.Expander.set_label_widget - - - set_label_widget - label_widget - - - - label_widget : - the new label widget or -None - - - - - This method is available in PyGTK 2.4 and above. - - - The set_label_widget() method sets the -expander to use the widget specified by label_widget -as the label instead of a gtk.Label. This -widget appears embedded alongside the expander arrow. If -label_widget is None, the expander -will have no label. - - - - - gtk.Expander.get_label_widget - - - get_label_widget - - - - Returns : - the label widget, or None -if there is none. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_label_widget() method retrieves -the expander's label widget. See the set_label_widget() -method. - - - - - - - Functions - - - gtk.expander_new_with_mnemonic - - - gtk.expander_new_with_mnemonic - labelNone - - - - label : - the text of the label with an underscore in -front of the mnemonic character or None - - - Returns : - a new gtk.Expander widget. - - - - - This function is available in PyGTK 2.4 and above. - - - The gtk.expander_new_with_mnemonic() -function creates a new gtk.Expander using -label as the text of the label. If characters in -label are preceded by an underscore, they are -underlined. If you need a literal underscore character in a label, use '__' -(two underscores). The first underlined character represents a keyboard -accelerator called a mnemonic. Pressing Alt with that key -activates the button. If label is -None the expander will have no label. - - - - - - - Signals - - - The "activate" gtk.Expander Signal - - - callback - expander - user_param1 - ... - - - - - expander : - the expander that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in PyGTK 2.4 and above. - - - The "activate" signal is emitted when the expander is activated - by the user clicking on the expander toggle. Using the - "notify:expanded" signal may be more appropriate in some cases as - noted in the Special Usage - description. - - - - - -
diff --git a/docs/reference/pygtk-gtkfilechooser.xml b/docs/reference/pygtk-gtkfilechooser.xml deleted file mode 100644 index 68aca1c3..00000000 --- a/docs/reference/pygtk-gtkfilechooser.xml +++ /dev/null @@ -1,2415 +0,0 @@ - - - - - gtk.FileChooser - an interface for choosing files used by gtk.FileChooserWidget - and gtk.FileChooserDialog - (new in PyGTK 2.4) - - - - Synopsis - - - gtk.FileChooser - gobject.GInterface - - set_action - action - - - get_action - - - - set_local_only - local_only - - - get_local_only - - - - set_select_multiple - select_multiple - - - get_select_multiple - - - - set_current_name - name - - - get_filename - - - - set_filename - filename - - - select_filename - filename - - - unselect_filename - filename - - - select_all - - - - unselect_all - - - - get_filenames - - - - set_current_folder - filename - - - get_current_folder - - - - get_uri - - - - set_uri - uri - - - select_uri - uri - - - unselect_uri - uri - - - get_uris - - - set_current_folder_uri - uri - - - get_current_folder_uri - - - - set_preview_widget - preview_widget - - - get_preview_widget - - - - set_preview_widget_active - active - - - get_preview_widget_active - - - - set_use_preview_label - use_label - - - get_use_preview_label - - - - get_preview_filename - - - - get_preview_uri - - - - set_extra_widget - extra_widget - - - get_extra_widget - - - - add_filter - filter - - - remove_filter - filter - - - list_filters - - - set_filter - filter - - - get_filter - - - - add_shortcut_folder - folder - - - remove_shortcut_folder - folder - - - list_shortcut_folders - - - add_shortcut_folder_uri - uri - - - remove_shortcut_folder_uri - uri - - - list_shortcut_folder_uris - - - - set_show_hidden - show_hidden - - - get_show_hidden - - - - set_do_overwrite_confirmation - do_overwrite_confirmation - - - get_do_overwrite_confirmation - - - - - - - - gtk.FileChooser Properties - -
- - - - - - - - - "action" - Read-Write - The type of operation that the file selector is - performing - one of the . Default - value: gtk.FILE_CHOOSER_ACTION_OPEN - - - - "do-overwrite-confirmation" - Read-Write - If True a file chooser in - gtk.FILE_CHOOSER_ACTION_SAVE will present - an overwrite confirmation dialog if the user selects a file - name that already exists. Default value: - False. This property is available in GTK+ - 2.8 and above - - - - "extra-widget" - Read-Write - An application supplied widget for extra options. - - - - "file-system-backend" - Write-Construct - The name of the file system backend to use. -Default value: None - - - - "filter" - Read-Write - The current gtk.FileFilter -for selecting which files are displayed. - - - - "local-only" - Read-Write - - If True, the selected file(s) should -be limited to local file: URLs. Default value: True - - - - "preview-widget" - Read-Write - An application supplied widget for custom -previews. - - - - "preview-widget-active" - Read-Write - If True, the application supplied -widget for custom previews should be shown. Default value: -True - - - - "select-multiple" - Read-Write - If True, allow multiple files to be - selected except if - gtk.FILE_CHOOSER_ACTION_SAVE is set as the - "action" property. Default value: -False - - - - "show-hidden" - Read-Write - If True, hidden files and folders -should be displayed. Default value: False - - - - "use-preview-label" - Read-Write - If True, display a stock label with -the name of the previewed file. Default value: True - - - - - -
- -
- - - gtk.FileChooser Signal Prototypes - - - - "confirm-overwrite" - - callback - filechooser - user_param1 - ... - - - - - "current-folder-changed" - - callback - filechooser - user_param1 - ... - - - - - "file-activated" - - callback - filechooser - user_param1 - ... - - - - - "selection-changed" - - callback - filechooser - user_param1 - ... - - - - - "update-preview" - - callback - filechooser - user_param1 - ... - - - - - - - - - Description - - - This interface is available in PyGTK 2.4 and above. - - - gtk.FileChooser -is an interface that can be implemented by file selection widgets. In PyGTK, -the main objects that implement this interface are gtk.FileChooserWidget -and gtk.FileChooserDialog. You -do not need to write an object that implements the gtk.FileChooser -interface unless you are trying to adapt an existing file selector to expose -a standard programming interface. - - gtk.FileChooser - has several elements to its display: - - - - a list of shortcut folders on the left that is divided into -two lists by a horizontal line: - - - a default list of folders usually including "Home" and -"Filesystem" with folders added using the add_shortcut_folder() -or add_shortcut_folder_uri() -methods. - - - a list of user specified shortcut folders managed using -the "Add" and "Remove" buttons at the bottom of the file chooser. - - - - - the "Add" and "Remove" buttons that allow a user to add or -remove a folder to or from the user's shortcut folder list. - - - the current folder path as a series of buttons above the -file selection window. The buttons can be clicked to jump to the associated -ancestor folder. - - - the file selection window that displays the contents of the -current folder in alphabetical order with last modified time. - - - - - File Names and Encodings - - When the user is finished selecting files in a gtk.FileChooser, - your program can get the selected names either as filenames or as - URIs. For URIs, the normal escaping rules are applied if the URI - contains non-ASCII characters. However, filenames are always returned - in the character set specified by the result of calling the Python - sys.getfilesystemencoding() function. On POSIX this is the actual - on-disk encoding which might correspond to the locale settings of the - process, or not. On Windows the file name encoding is UTF-8. Note that - the Microsoft C library does not use UTF-8, but has separate APIs for - current system code page and wide characters (UTF-16). - - - This means that while you can pass the result of get_filename() - to open() or os.open(), you may not be able to directly set it as - the text of a gtk.Label - widget unless you convert it first to UTF-8, which all PyGTK widgets - expect. If necessary you should use the Python codecs to convert - filenames into strings that can be passed to PyGTK widgets. - - - - - - Adding A Preview Widget - - You can add a custom preview widget to a file chooser and get -notification when the preview needs to be updated. To install a preview -widget, use the set_preview_widget() -method. Then, connect to the "update-preview" signal to be notified when -you need to update the contents of the preview. - - Your callback should use the get_preview_filename() -method to see what needs previewing. Once you have generated the preview for -the corresponding file, you must call the set_preview_widget_active() -method with a boolean flag that indicates whether your callback could -successfully generate a preview. An example use of a custom preview -is: - - - ... - preview = gtk.Image() - - my_file_chooser.set_preview_widget(preview) - my_file_chooser.connect("update-preview", update_preview_cb, preview) - ... - - def update_preview_cb(file_chooser, preview): - filename = file_chooser.get_preview_filename() - try: - pixbuf = gtk.gdk.pixbuf_new_from_file_at_size(filename, 128, 128) - preview.set_from_pixbuf(pixbuf) - have_preview = True - except: - have_preview = False - file_chooser.set_preview_widget_active(have_preview) - return - ... - - - - - Adding Extra Widgets - - You can add extra widgets to a file chooser to provide options -that are not present in the default design. For example, you can add a gtk.ToggleButton -to give the user the option to open a file in read-only mode. You can use -the set_extra_widget() -method to insert additional widgets in a file chooser. For example: - - - toggle = gtk.CheckButton("Open file read-only") - toggle.show () - my_file_chooser.set_extra_widget(toggle) - - - If you want to set more than one extra widget in the file -chooser, you can use a container such as a gtk.VBox or a gtk.Table to hold -your widgets; then set the container as the whole extra widget. - - - - - Key Bindings - - The gtk.FileChooserDialog -uses the private GtkFileChooserDefaultClass that has -several key bindings and their associated signals. This section describes -the available key binding signals. - - The default keys that activate the key-binding signals in GtkFileChooserDefaultClass are as follows: - - - - - - - - Signal name - Key - - - - - location-popup - Control-L - - - up-folder - Alt-Up - - - down-folder - Alt-Down - - - home-folder - Alt-Home - - - - - - To change these defaults to something else, you could include -the following fragment in your .gtkrc-2.0 file: - - - binding "my-own-gtkfilechooser-bindings" { - bind "<Alt><Shift>l" { - "location-popup" () - } - bind "<Alt><Shift>Up" { - "up-folder" () - } - bind "<Alt><Shift>Down" { - "down-folder" () - } - bind "<Alt><Shift>Home" { - "home-folder-folder" () - } - } - - class "GtkFileChooserDefault" binding "my-own-gtkfilechooser-bindings" - - - The "GtkFileChooserDefault::location-popup" signal is used to -make the file chooser show a "Location" dialog which the user can use to -manually type the name of the file he wishes to select. By default this is -bound to -ControlL. - - - def location_popup_cb(filechooser, user_data): - - - where filechooser is the gtk.FileChooser -that received the signal, user_data is user data set -when the signal handler was connected. - - The "GtkFileChooserDefault::up-folder" signal is used to make -the file chooser go to the parent of the current folder in the file -hierarchy. By default this is bound to -AltUp. - - - def up_folder_cb(filechooser, user_data): - - - where filechooser is the object that -received the signal and user_data is the user data -set when the signal handler was connected. - - The "GtkFileChooserDefault::down-folder" signal is used to make -the file chooser go to a child of the current folder in the file -hierarchy. The subfolder that will be used is displayed in the path bar -widget of the file chooser. For example, if the path bar is showing -"/foo/bar/baz", then this will cause the file chooser to switch to the "baz" -subfolder. By default this is bound to -AltDown . - - - def down_folder_cb(filechooser, user_data): - - - where filechooser is the object that -received the signal and user_data is the user data -set when the signal handler was connected. - - The "GtkFileChooserDefault::home-folder" signal is used to make -the file chooser show the user's home folder in the file list. By default -this is bound to AltHome -. - - - def home_folder_cb(filechooser, user_data): - - - where filechooser is the object that -received the signal and user_data is the user data -set when the signal handler was connected. - - - - - - - Methods - - - gtk.FileChooser.set_action - - - set_action - action - - - - action : - - the file selection action - one of: -gtk.FILE_CHOOSER_ACTION_OPEN, -gtk.FILE_CHOOSER_ACTION_SAVE, -gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER or -gtk.FILE_CHOOSER_ACTION_CREATE_FOLDER. - - - - - - This method is available in PyGTK 2.4 and above. - - - The set_action() method sets the -"action" property to the value of action. The type of -operation that that the chooser is performing is set by -action causing the user interface to be changed to -suit the selected action. The value of action must be -one of: - - - - gtk.FILE_CHOOSER_ACTION_OPEN - - Indicates open mode. The file chooser will only let the -user pick an existing file. - - - - gtk.FILE_CHOOSER_ACTION_SAVE - - Indicates save mode. The file chooser will let the user -pick an existing file, or type in a new filename. - - - - gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER - - Indicates an open mode for selecting folders. The file -chooser will let the user pick an existing folder. - - - - gtk.FILE_CHOOSER_ACTION_CREATE_FOLDER - - Indicates a mode for creating a new folder. The file -chooser will let the user name an existing or new folder - - - - - For example, an option to create a new folder might be shown if -the action is gtk.FILE_CHOOSER_ACTION_SAVE but not if the -action is gtk.FILE_CHOOSER_ACTION_OPEN. - - - - - gtk.FileChooser.get_action - - - get_action - - - - Returns : - - the action that is set for the file -selector - - - - - This method is available in PyGTK 2.4 and above. - - - The get_action() method returns the -value of the "action" property that indicates the type of operation that the -file chooser is set to perform. See the set_action() -method for more information. - - - - - gtk.FileChooser.set_local_only - - - set_local_only - local_only - - - - local_only : - if True, only local files can -be selected - - - - - This method is available in PyGTK 2.4 and above. - - - The set_local_only() method sets the -"local-only" property to the value of local_only. If -local_only is True (the default), -only local files can be selected in the file selector and the selected files -are guaranteed to be accessible through the operating system's native file -system. Therefore, the application only needs to use the filename methods in -gtk.FileChooser. -For example, the application can use the get_filename() -method instead of the URI method get_uri(). - - - - - gtk.FileChooser.get_local_only - - - get_local_only - - - - Returns : - True if only local files can be -selected. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_local_only() method returns the -value of the "local-only" property that indicates whether only local files -can be selected in the file selector. See the set_local_only() -method for more information. - - - - - gtk.FileChooser.set_select_multiple - - - set_select_multiple - select_multiple - - - - select_multiple : - if True multiple files can be -selected. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_select_multiple() method sets -the "select_multiple" property to the value of -select_multiple. If -select_multiple is True, multiple -files can be selected in the file selector. - - - The "select-multiple" property cannot be set -True when the file chooser action is -gtk.FILE_CHOOSER_ACTION_SAVE or -gtk.FILE_CHOOSER_ACTION_CREATE_FOLDER. - - - - - - gtk.FileChooser.get_select_multiple - - - get_select_multiple - - - - Returns : - True if multiple files can be -selected. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_select_multiple() method -returns the value of the "select_multiple" property that indicates whether -multiple files can be selected in the file selector. See the set_select_multiple() -method for more information. - - - - - gtk.FileChooser.set_current_name - - - set_current_name - name - - - - name : - the filename to use, as a UTF-8 -string - - - - - This method is available in PyGTK 2.4 and above. - - - The set_current_name() method sets the -current name in the file selector to the value of -name, as if entered by the user. Note that the name -passed in here is a UTF-8 string rather than a filename. This method is -meant for such uses as a suggested name in a "Save As..." dialog. - - If you want to preselect a particular existing file, you should -use the set_filename() -method instead. - - - - - gtk.FileChooser.get_filename - - - get_filename - - - - Returns : - The currently selected filename, or -None if no file is selected, or the selected file can't -be represented with a local filename. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_filename() method returns the -filename of the currently selected file in the file selector. If multiple -files are selected, one of the filenames will be returned at random. If the -file chooser is in folder mode, this function returns the selected -folder. - - - - - gtk.FileChooser.set_filename - - - set_filename - filename - - - - filename : - the filename to set as current - - - Returns : - True if both the folder could -be changed and the file was selected successfully, False -otherwise. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_filename() method sets -filename as the current filename for the the file -chooser. If the file name isn't in the current folder of the chooser, then -the current folder of the chooser will be changed to the folder containing -filename. This is equivalent to a sequence of unselect_all() -followed by select_filename(). - - Note that the file must exist, or nothing will be done except -for the directory change. To pre-enter a filename for the user, as in a -"Save as ..." dialog, use the set_current_name() -method. - - - - - gtk.FileChooser.select_filename - - - select_filename - filename - - - - filename : - the filename to select - - - Returns : - True if both the folder could -be changed and the file was selected successfully, False -otherwise. - - - - - This method is available in PyGTK 2.4 and above. - - - The select_filename() method selects -the filename specified by filename. If -filename isn't in the current folder of the chooser, -then the current folder of the chooser will be changed to the folder -containing filename. - - - - - gtk.FileChooser.unselect_filename - - - unselect_filename - filename - - - - filename : - the filename to unselect - - - - - This method is available in PyGTK 2.4 and above. - - - The unselect_filename() method -unselects the currently selected filename specified by -filename. If filename is not -in the current directory, does not exist, or is otherwise not currently -selected, this method does nothing. - - - - - gtk.FileChooser.select_all - - - select_all - - - - This method is available in PyGTK 2.4 and above. - - - The select_all() method selects all the -files in the current folder of a file chooser. - - - - - gtk.FileChooser.unselect_all - - - unselect_all - - - - - This method is available in PyGTK 2.4 and above. - - - The unselect_all() method unselects all - the files in the current folder of a file chooser. - - - - - gtk.FileChooser.get_filenames - - - get_filenames - - - - Returns : - a list containing the filenames of all selected -files and subfolders in the current folder. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_filenames() method returns a -list containing all the selected files and subfolders in the current folder -of the chooser. The returned names are full absolute paths. If files in the -current folder cannot be represented as local filenames they will be -ignored. (See the get_uris() -method for more information) - - - - - gtk.FileChooser.set_current_folder - - - set_current_folder - filename - - - - filename : - the full path of the new current -folder - - - Returns : - True if the folder could be -changed successfully, False otherwise. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_current_folder() method sets -the current folder for the chooser to the local filename specified by -filename. The user will be shown the full contents -of the current folder, plus user interface elements for navigating to other -folders. - - - - - gtk.FileChooser.get_current_folder - - - get_current_folder - - - - Returns : - the full path of the current folder, or -None if the current path cannot be represented as a local -filename. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_current_folder() method returns -the current folder of the chooser as a local filename. See the set_current_folder() -method for more information. - - - - - gtk.FileChooser.get_uri - - - get_uri - - - - Returns : - The currently selected URI, or -None if no file is selected. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_uri() method returns the URI -for the currently selected file in the file selector. If multiple files are -selected, one of the filenames will be returned at random. If the file -chooser is in folder mode, this function returns the selected folder. - - - - - gtk.FileChooser.set_uri - - - set_uri - uri - - - - uri : - the URI to set as the current -file - - - Returns : - True if both the folder could -be changed and the URI was successfully selected. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_uri() method sets the file -referred to by uri as the current file for the file -chooser; If the file name isn't in the current folder of the chooser, then -the current folder of the chooser will be changed to the folder containing -uri. This is equivalent to the sequence of unselect_all() -followed by select_uri(). -Note that the file must exist, or nothing will be done except for the -directory change. To pre-enter a filename for the user, as in a "Save As -..." dialog, use the set_current_name() -method. - - - - - gtk.FileChooser.select_uri - - - select_uri - uri - - - - uri : - the URI of the file to select - - - Returns : - True if both the folder could -be changed and the URI was successfully selected. - - - - - This method is available in PyGTK 2.4 and above. - - - The select_uri() method selects the -file referred to by uri. If the URI doesn't refer to -a file in the current folder of the chooser, then the current folder of the -chooser will be changed to the folder containing the file referenced by -uri. - - - - - gtk.FileChooser.unselect_uri - - - unselect_uri - uri - - - - uri : - the URI of the file to -unselect - - - - - This method is available in PyGTK 2.4 and above. - - - The unselect_uri() method unselects the -file referred to by uri. If the file is not in the -current directory, does not exist, or is otherwise not currently selected, -this method does nothing. - - - - - gtk.FileChooser.get_uris - - - get_uris - - - - Returns : - a list containing the URIs of all selected -files and subfolders in the current folder. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_uris() method returns a list -containing all the selected files and subfolders in the current folder of -the chooser. The returned names are full absolute URIs. - - - - - gtk.FileChooser.set_current_folder_uri - - - set_current_folder_uri - uri - - - - uri : - the URI for the new current -folder - - - Returns : - True if the folder could be -changed successfully, False otherwise. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_current_folder_uri() method -sets the current folder for the chooser to the folder referenced by -uri. The user will be shown the full contents of the -current folder, plus user interface elements for navigating to other -folders. - - - - - gtk.FileChooser.get_current_folder_uri - - - get_current_folder_uri - - - - Returns : - the URI for the current -folder. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_current_folder_uri() method -returns the URI reference of the current folder of the chooser. See the -set_current_folder_uri() -method for more information. - - - - - gtk.FileChooser.set_preview_widget - - - set_preview_widget - preview_widget - - - - preview_widget : - a widget for displaying a -preview. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_preview_widget() method sets -the "preview-widget" property to the value of -preview_widget. The -preview_widget is used to preview the currently -selected file. To implement a custom preview: - - - - set the preview widget - - - connect a callback to the "selection-changed" signal of the -file chooser - - - in the callback, call the get_preview_filename() -method or the get_preview_uri() -method to retrieve the selected file name or URI - - - if you can, display a preview of the selected file and set -the preview active using the set_preview_widget_active() -method - - - otherwise, set the preview inactive - - - - When there is no application-supplied preview widget, or the -application-supplied preview widget is not active, the file chooser -may display an internally generated preview of the current file or -it may display no preview at all. - - - - - gtk.FileChooser.get_preview_widget - - - get_preview_widget - - - - Returns : - the current preview widget, or -None - - - - - This method is available in PyGTK 2.4 and above. - - - The get_preview_widget() method returns -the value of the "preview_widget" property i.e. the current preview -widget. See the set_preview_widget() -method for more information. - - - - - gtk.FileChooser.set_preview_widget_active - - - set_preview_widget_active - active - - - - active : - if True, display the -user-specified preview widget - - - - - This method is available in PyGTK 2.4 and above. - - - The set_preview_widget_active() method -sets the "preview_widget_active" property to the value of -active. If active is -True, the preview widget set by the set_preview_widget() -method should be shown for the current filename. When -active is False, the file chooser -may display an internally generated preview of the current file or it may -display no preview at all. See the set_preview_widget() -for more details. - - - - - gtk.FileChooser.get_preview_widget_active - - - get_preview_widget_active - - - - Returns : - True if the preview widget is -active for the current filename. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_preview_widget_active() method -returns the value of the "preview-widget-active" property that indicates -whether the preview widget set by the set_preview_widget() -method should be shown for the current filename. See the set_preview_widget_active() -method for more details. - - - - - gtk.FileChooser.set_use_preview_label - - - set_use_preview_label - use_label - - - - use_label : - if True, display a stock label -with the name of the previewed file - - - - - This method is available in PyGTK 2.4 and above. - - - The set_use_preview_label() method sets -the "use-preview-label" property to the value of -use_label. If use_label is -True (the default), the file chooser should display a -stock label with the name of the file that is being previewed. Applications -that want to draw the whole preview area themselves should set this to -False and display the name themselves in their preview -widget. See the set_preview_widget() -method for more information. - - - - - gtk.FileChooser.get_use_preview_label - - - get_use_preview_label - - - - Returns : - True if the file chooser is -set to display a label with the name of the previewed file; -False otherwise. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_use_preview_label() method -returns the value of the "use-preview-label" property that indicates whether -a stock label should be drawn with the name of the previewed file. See the -set_use_preview_label() -for more information. - - - - - gtk.FileChooser.get_preview_filename - - - get_preview_filename - - - - Returns : - the filename to preview, or - None. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_preview_filename() method -returns the filename that should be previewed in a custom preview widget or -None if no file is selected, or if the selected file -cannot be represented as a local filename. See the set_preview_widget() -method for more details. - - - - - gtk.FileChooser.get_preview_uri - - - get_preview_uri - - - - Returns : - the URI for the file to preview, or -None. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_preview_uri() method returns -the URI of the file that should be previewed in a custom preview widget or -None if no file is selected. See the set_preview_widget() -method fr more details. - - - - - gtk.FileChooser.set_extra_widget - - - set_extra_widget - extra_widget - - - - extra_widget : - the widget to display extra -options - - - - - This method is available in PyGTK 2.4 and above. - - - The set_extra_widget() method sets the -"extra-widget" property to the value of -extra_widget. extra_widget is -an application-supplied widget used to display extra options to the -user. - - - - - gtk.FileChooser.get_extra_widget - - - get_extra_widget - - - - Returns : - the current extra widget, or -None. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_extra_widget() method returns -the value of the "extra-widget" property that contains either a widget used -to display extra options to the user or None if no extra -widget is in use. See the set_extra_widget() -for more information. - - - - - gtk.FileChooser.add_filter - - - add_filter - filter - - - - filter : - a -gtk.FileFilter - - - - - This method is available in PyGTK 2.4 and above. - - - The add_filter() method adds the gtk.FileFilter -specified by filter to the list of filters that the -user can select from. When a filter is selected, only files that are -passed by that filter are displayed. - - - - - gtk.FileChooser.remove_filter - - - remove_filter - filter - - - - filter : - a -gtk.FileFilter - - - - - This method is available in PyGTK 2.4 and above. - - - The remove_filter() method removes the -gtk.FileFilter -specified by filter from the list of filters that the -user can select from. - - - - - gtk.FileChooser.list_filters - - - list_filters - - - - Returns : - a list containing the current set of -user selectable filters. - - - - - This method is available in PyGTK 2.4 and above. - - - The list_filters() method returns the -current set of user-selectable filters. See the add_filter() -and remove_filter() -method for more details. - - - - - gtk.FileChooser.set_filter - - - set_filter - filter - - - - filter : - a -gtk.FileFilter - - - - - This method is available in PyGTK 2.4 and above. - - - The set_filter() method sets the -"filter" property to the value of filter and also -sets the current filter to filter. Only the files -that pass filter will be displayed. If the -user-selectable list of filters is non-empty, then -filter should be one of the filters in that -list. Setting the current filter when the list of filters is empty is useful -if you want to restrict the displayed set of files without letting the user -change it. - - - - - gtk.FileChooser.get_filter - - - get_filter - - - - Returns : - the current filter, or -None. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_filter() method returns the -value of the "filter" property which is the current filter. See the set_filter() -method for more information. - - - - - gtk.FileChooser.add_shortcut_folder - - - add_shortcut_folder - folder - - - - folder : - the filename of the folder to -add - - - Returns : - True if the folder could be -added successfully. - - - - - This method is available in PyGTK 2.4 and above. - - - The add_shortcut_folder() adds the -folder specified by folder the list of shortcut -folders in a file chooser. Shortcut folders are displayed at the upper left -in the gtk.FileChooser. By -double-clicking on a shortcut the user can open that folder directly. Note -that shortcut folders do not get saved, as they are provided by the -application. For example, you can use this to add a -"/usr/share/mydrawprogram/Clipart" folder to the volume list. - - The GError exception is raised if an error occurred while adding -the folder. - - - - - gtk.FileChooser.remove_shortcut_folder - - - remove_shortcut_folder - folder - - - - folder : - the filename of the folder to -remove - - - Returns : - True if - folder was removed from the list of - shortcut folders. - - - - - This method is available in PyGTK 2.4 and above. - - - The remove_shortcut_folder() method -removes the folder specified by folder from a file -chooser's list of shortcut -folders. remove_shortcut_folder() returns True if -successful. See the add_shortcut_folder() -method for more information. - - The GError exception is raised if an error occurred while -removing the folder. - - - - - gtk.FileChooser.list_shortcut_folders - - - list_shortcut_folders - - - - Returns : - A list of shortcut folder filenames, or -None if there are no shortcut folders. - - - - - This method is available in PyGTK 2.4 and above. - - - The list_shortcut_folders() method -returns the list of shortcut folders in the file chooser, as set by the -add_shortcut_folder() -method or None if there are no shortcut folders. It is -not possible to get a list of the user-specified shortcut folders. - - - - - gtk.FileChooser.add_shortcut_folder_uri - - - add_shortcut_folder_uri - uri - - - - uri : - the URI of the folder to add - - - Returns : - True if the folder was -added - - - - - This method is available in PyGTK 2.4 and above. - - - The add_shortcut_folder_uri() method -adds a folder with the URI specified by uri to the -list of shortcut folders in a file chooser. Note that shortcut folders do -not get saved, as they are provided by the application. For example, you -can use this to add a "file:///usr/share/mydrawprogram/Clipart" folder to -the volume list. See the add_shortcut_folder() -method for more details. - - The GError exception is raised if an error occurred while adding -the folder. - - - - - gtk.FileChooser.remove_shortcut_folder_uri - - - remove_shortcut_folder_uri - uri - - - - uri : - URI of the folder to remove - - - Returns : - True if the folder was -removed. - - - - - This method is available in PyGTK 2.4 and above. - - - The remove_shortcut_folder_uri() method -removes the folder with the URI specified by uri from -the file chooser's list of shortcut folders. - - The GError exception is raised if an error occurred while -removing the folder. - - - - - gtk.FileChooser.list_shortcut_folder_uris - - - list_shortcut_folder_uris - - - - Returns : - a list of shortcut folder URIs, or -None - - - - - This method is available in PyGTK 2.4 and above. - - - The list_shortcut_folder_uris() method -returns a list of the shortcut folders in the file chooser, as set by the -add_shortcut_folder_uri() -method. It is not possible to get a list of the user-specified folder -URIs. - - - - - gtk.FileChooser.set_show_hidden - - - set_show_hidden - show_hidden - - - - show_hidden : - if True hidden files and -folders should be displayed. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_show_hidden() method sets the -"show-hidden" property to the value of -show_hidden. If show_hidden is -True, hidden files and folders should be displayed in the -file selector. - - - - - gtk.FileChooser.get_show_hidden - - - get_show_hidden - - - - Returns : - True if hidden files and -folders are displayed. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_show_hidden() method returns -the value of the "show-hidden" property that indicates whether hidden files -and folders should be displayed in the file selector. See the set_show_hidden() -method for more information. - - - - - gtk.FileChooser.set_do_overwrite_confirmation - - - set_do_overwrite_confirmation - do_overwrite_confirmation - - - - do_overwrite_confirmation : - if True ask the user for -confirmation before overwriting a file in save mode. - - - - - This method is available in PyGTK 2.8 and above. - - - The set_do_overwrite_confirmation() -method sets the "do-overwrite-confirmation" property to the value of -do_overwrite_confirmation. If -do_overwrite_confirmation is True -and the "action" property is set to -gtk.FILE_CHOOSER_ACTION_SAVE, the file chooser will -present a confirmation dialog if the user attempts to overwrite an existing -file. The default value is False. - - If all you need is the stock confirmation dialog, set the -"do-overwrite-confirmation" property to True. You can -override the way confirmation is done by actually handling the -"confirm-overwrite" signal; please refer to its documentation for -details. - - - - - gtk.FileChooser.get_do_overwrite_confirmation - - - get_do_overwrite_confirmation - - - - Returns : - True if hidden files and -folders are displayed. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_do_overwrite_confirmation() -method returns the value of the "do-overwrite-confirmation" property that -indicates whether a user is asked for confirmation before overwriting an -existing file. See the set_do_overwrite_confirmation() -method for more information. - - - - - - - Signals - - - The "confirm-overwrite" gtk.FileChooser Signal - - - callback - filechooser - user_param1 - ... - - - - - filechooser : - the filechooser widget that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - one of the -indicating what action GTK+ should take. - - - - - This signal is available in PyGTK 2.8 and above. - - - The "confirm-overwrite" signal is emitted when it is appropriate -to present a confirmation dialog when the user has selected a file name that -already exists. The signal is only emitted when the file chooser "action" property is set to gtk.FILE_CHOOSER_ACTION_SAVE. - - Most applications just need to turn on the -"do-overwrite-confirmation" property (or call the set_do_overwrite_confirmation() -method), to automatically get a stock confirmation dialog. Applications -that need to customize this behavior should do that, and also connect to -the "confirm-overwrite" signal. - - A signal handler for this signal must return one of the that -indicates the action to take. If the handler determines that the user wants -to select a different filename, it should return -gtk.FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN. If it -determines that the user is satisfied with his choice of file name, it -should return -gtk.FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME. On the -other hand, if it determines that the stock confirmation dialog should be -used, it should return -gtkfile_CHOOSER_CONFIRMATION_CONFIRM. The following -psuedo-code example illustrates this. - - -def confirm_overwrite_callback(chooser): - uri = chooser.get_uri() - - if is_uri_read_only(uri): - if user_wants_to_replace_read_only_file (uri): - return gtk.FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME - else - return gtk.FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN - else - # fall back to the default dialog - return gtk.FILE_CHOOSER_CONFIRMATION_CONFIRM - -... - -chooser = gtk.FileChooserDialog(...) - -chooser.set_do_overwrite_confirmation(True) -chooser.connect("confirm-overwrite", confirm_overwrite_callback) - -if chooser.run() == gtk.RESPONSE_ACCEPT: - save_to_file(chooser.get_filename() - -chooser.destroy() - - - - - - The "current-folder-changed" gtk.FileChooser Signal - - - callback - filechooser - user_param1 - ... - - - - - filechooser : - the filechooser widget that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in PyGTK 2.4 and above. - - - The "current-folder-changed" signal is emitted when the current -folder displayed in filechooser is changed. Normally -you do not need to connect to this signal, unless you need to keep track of -which folder a file chooser is showing. - - - - - The "file-activated" gtk.FileChooser Signal - - - callback - filechooser - user_param1 - ... - - - - - filechooser : - the filechooser widget that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in PyGTK 2.4 and above. - - - The "file-activated" signal is emitted when the user -double-clicks on a file (not a folder) or presses -Enter. Normally you do not need to connect to this -signal. It is used internally by gtk.FileChooserDialog -to know when to activate the default button in the dialog. - - - - - The "selection-changed" gtk.FileChooser Signal - - - callback - filechooser - user_param1 - ... - - - - - filechooser : - the filechooser widget that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in PyGTK 2.4 and above. - - - The "selection-changed" signal is emitted when the file -selection in filechooser is changed either by -clicking on a filename or by changing the current folder. Normally you do -not need to connect to this signal, as it is easier to wait for the file -chooser to finish running, and then to get the list of selected files using -the functions mentioned below. - - - - - The "update-preview" gtk.FileChooser Signal - - - callback - filechooser - user_param1 - ... - - - - - filechooser : - the filechooser widget that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in PyGTK 2.4 and above. - - - The "update-preview" signal is emitted when the preview when a -file chooser should be regenerated. For example, this can happen when the -currently selected file changes. You should use this signal if you want your -file chooser to have a preview widget. - - Once you have installed a preview widget with the set_preview_widget() -method, you should update it when this signal is emitted. You can use the -methods get_preview_filename() -or get_preview_uri() -to get the name of the file to preview. Your widget may not be able to -preview all kinds of files so your callback must call the set_preview_widget_active() -to inform the file chooser if the preview was generated successfully or -not. - - Please see the example code in the section called Adding a Preview Widget. - - Also see the set_preview_widget(), -set_preview_widget_active(), -set_use_preview_label(), -get_preview_filename() -and get_preview_uri() -methods for more information - - - - - -
diff --git a/docs/reference/pygtk-gtkfilechooserbutton.xml b/docs/reference/pygtk-gtkfilechooserbutton.xml deleted file mode 100644 index adf8a84e..00000000 --- a/docs/reference/pygtk-gtkfilechooserbutton.xml +++ /dev/null @@ -1,448 +0,0 @@ - - - - - - gtk.FileChooserButton - a button to launch a gtk.FileChooserDialog -(new in PyGTK 2.6) - - - - Synopsis - - - gtk.FileChooserButton - gtk.HBox - - gtk.FileChooserButton - title - backendNone - - - gtk.FileChooserButton - dialog - - - get_title - - - - set_title - title - - - get_width_chars - - - - set_width_chars - n_chars - - - get_focus_on_click - - - - set_focus_on_click - focus_on_click - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Box - +-- gtk.HBox - +-- gtk.FileChooserButton (implements gtk.FileChooser) - - - - - gtk.FileChooserButton Properties - - gtk.FileChooser Properties - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Box Properties - -
- - - - - - - - - "dialog" - Write-Construct Only - - The gtk.FileChooserDialog - associated with the button. Available in GTK+ 2.6. - - - - "focus-on-click" - Read-Write - - If True the gtk.FileChooserButton - button grabs focus when it is clicked with the mouse. Default - value: True. Available in GTK+ - 2.10. - - - - "title" - Read-Write - - The string to use as the title on the gtk.FileChooserDialog - associated with the button. Default value: "Select A - File". Available in GTK+ 2.6. - - - - "width-chars" - Read-Write - - The width of the entry and label inside the button, in - characters. Allowed values: >= -1. Default value: - -1. Available in GTK+ 2.6. - - - - - -
- -
- - - gtk.FileChooserButton Style Properties - - gtk.Widget Style Properties - - - - - gtk.FileChooserButton Child Properties - - gtk.Box Child Properties - - - - - gtk.FileChooserButton Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.FileChooser Signal Prototypes - - - - Description - - - This widget is available in PyGTK 2.6 and above. - - - The gtk.FileChooserButton - is a widget that lets the user select a file. It implements the gtk.FileChooser - interface. Visually, it is a file name with a button to bring up a gtk.FileChooserDialog. The - user can then use that dialog to change the file associated with that - button. This widget does not support setting the "select-multiple" - property to True. For example to create a gtk.FileChooserButton - and set the current folder to '/etc' use: - - - filechooserbutton = gtk.FileChooserButton('Select a File') - filechooserbutton.set_current_folder('/etc') - - - The gtk.FileChooserButton - supports the gtk.FILE_CHOOSER_ACTION_OPEN and - gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER actions of the - . - - - The gtk.FileChooserButton - will ellipsize the label, and thus will thus request little horizontal - space. To give the button more space, you should call the gtk.Widget.size_request() - method, the set_width_chars() - method, or pack the button in such a way that other interface elements - give space to the widget. - - - - - - Constructor - - - gtk.FileChooserButton - - - gtk.FileChooserButton - title - backendNone - - - - title : - the title of the browse dialog - - - backend : - the name of a file system backend or -None - - - Returns : - a new gtk.FileChooserButton - - - - - This constructor is available in PyGTK 2.6 and above. - - - Creates a new button widget that opens a gtk.FileChooserDialog -when clicked. The title of the gtk.FileChooserDialog -is specified by title. If -backend is specified it is the name of a file system -backend. - - - - - gtk.FileChooserButton - - - gtk.FileChooserButton - dialog - - - - dialog : - a gtk.FileChooserDialog - - - Returns : - a new gtk.FileChooserButton - - - - - This constructor is available in PyGTK 2.6 and above. - - - Creates a new button widget that opens a gtk.FileChooserDialog -specified by dialog when clicked. - - - - - - - Methods - - - gtk.FileChooserButton.get_title - - - get_title - - - - Returns : - the title of the gtk.FileChooserDialog - - - - - This method is available in PyGTK 2.6 and above. - - - The get_title() method returns the -value of the "title" property which contains the title of the associated -gtk.FileChooserDialog. - - - - - gtk.FileChooserButton.set_title - - - set_title - title - - - - title : - a string to use as the title of the associated -gtk.FileChooserDialog. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_title() method sets the "title" -property to the value of title. The "title" property -contains the title string of the associated gtk.FileChooserDialog. - - - - - gtk.FileChooserButton.get_width_chars - - - get_width_chars - - - - Returns : -  : - the width in characters of the -button - - - - - This method is available in PyGTK 2.6 and above. - - - The get_width_chars() method returns -the value of the "width-characters" property which contains the number of -characters the button width should be set to. - - - - - gtk.FileChooserButton.set_width_chars - - - set_width_chars - n_chars - - - - n_chars : - the width in characters for the -button - - - - - This method is available in PyGTK 2.6 and above. - - - The set_width_chars() method sets the -"width-chars" property to the value of n_chars. The -"width-chars" property contains the width in characters that the button -should be set to. - - - - - gtk.FileChooserButton.get_focus_on_click - - - get_focus_on_click - - - - - - Returns : - True if the button grabs - focus when it is clicked with the mouse. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_focus_on_click() method returns - the value of the "focus-on-click" property. If the return value is - True if the button grabs focus when it is clicked - with the mouse. See the set_focus_on_click() - method. - - - - - gtk.FileChooserButton.set_focus_on_click - - - set_focus_on_click - focus_on_click - - - - - focus_on_click : - If True, the button grabs - focus when clicked with the mouse - - - - - This method is available in PyGTK 2.10 and above. - - - The set_focus_on_click() method sets - the "focus-on-click" property to the value of - focus_on_click. If - focus_on_click is True, the - button will grab focus when it is clicked with the mouse. Making - mouse clicks not grab focus is useful in places like toolbars where - you don't want the keyboard focus removed from the main area of the - application. - - - - - -
diff --git a/docs/reference/pygtk-gtkfilechooserdialog.xml b/docs/reference/pygtk-gtkfilechooserdialog.xml deleted file mode 100644 index 5602722e..00000000 --- a/docs/reference/pygtk-gtkfilechooserdialog.xml +++ /dev/null @@ -1,167 +0,0 @@ - - - - - gtk.FileChooserDialog a file chooser - dialog, suitable for "File/Open" or "File/Save" commands(new in PyGTK - 2.4) - - - - Synopsis - - - gtk.FileChooserDialog - gtk.Dialog - gtk.FileChooser - - gtk.FileChooserDialog - titleNone - parentNone - actiongtk.FILE_CHOOSER_ACTION_OPEN - buttonsNone - backendNone - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Window - +-- gtk.Dialog - +-- gtk.FileChooserDialog (implements gtk.FileChooser) - - - - - - gtk.FileChooserDialog Properties - - gtk.FileChooser Properties - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Window Properties - gtk.Dialog Properties - - - - - gtk.FileChooserDialog Style Properties - - gtk.Widget Style Properties - gtk.Dialog Style Properties - - - - - gtk.FileChooserDialog Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Window Signal Prototypes - gtk.Dialog Signal Prototypes - gtk.FileChooser Signal Prototypes - - - - Description - - - This widget is available in PyGTK 2.4 and above. - - - gtk.FileChooserDialog - is a dialog box suitable for use with "File/Open" or "File/Save as" - commands. This widget works by putting a gtk.FileChooserWidget - inside a gtk.Dialog. It - implements the gtk.FileChooser - interface, so you can use all of the gtk.FileChooser - methods, signals and properties on the file chooser dialog as well as - those for gtk.Dialog. - - Note that gtk.FileChooserDialog - does not have any methods of its own. Instead, you should use the - methods and signals that work on a gtk.FileChooser. - - - - - Constructor - - - gtk.FileChooserDialog - titleNone - parentNone - actiongtk.FILE_CHOOSER_ACTION_OPEN - buttonsNone - backendNone - - - - title : - The title of the dialog - - - parent : - The transient parent of the dialog, or None - - - action : - - The open or save mode for the dialog - one of: -gtk.FILE_CHOOSER_ACTION_OPEN, -gtk.FILE_CHOOSER_ACTION_SAVE, -gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER or -gtk.FILE_CHOOSER_ACTION_CREATE_FOLDER. - - - - buttons : - a tuple containing button label-response id pairs - or None - - - backend : - The name of the specific filesystem backend to -use. - - - Returns : - a new gtk.FileChooserDialog - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new gtk.FileChooserDialog. The -constructor can be invoked with the optional parameters: -title, parent, -action, buttons and -backend. This constructor is analogous to the -gtk.Dialog() constructor. - - - - diff --git a/docs/reference/pygtk-gtkfilechooserwidget.xml b/docs/reference/pygtk-gtkfilechooserwidget.xml deleted file mode 100644 index 68bd0734..00000000 --- a/docs/reference/pygtk-gtkfilechooserwidget.xml +++ /dev/null @@ -1,137 +0,0 @@ - - - - - gtk.FileChooserWidget a file chooser - widget that can be embedded in other widgets(new in PyGTK - 2.4) - - - - Synopsis - - - gtk.FileChooserWidget - gtk.VBox - gtk.FileChooser - - gtk.FileChooserWidget - actiongtk.FILE_CHOOSER_ACTION_OPEN - backendNone - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Box - +-- gtk.VBox - +-- gtk.FileChooserWidget (implements gtk.FileChooser) - - - - - - gtk.FileChooserWidget Properties - - gtk.FileChooser Properties - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Box Properties - - - - - gtk.FileChooserWidget Style Properties - - gtk.Widget Style Properties - - - - - gtk.FileChooserWidget Child Properties - - gtk.Box Child Properties - - - - - gtk.FileChooserWidget Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.FileChooser Signal Prototypes - - - - Description - - - This widget is available in PyGTK 2.4 and above. - - - The gtk.FileChooserWidget - is a widget suitable for selecting files. It is the main building block - of a gtk.FileChooserDialog. Most - applications will only need to use the latter; you can use gtk.FileChooserWidget - as part of a larger window if you have special needs. - - Note that gtk.FileChooserWidget - does not have any methods, signals or properties of its own. Instead, - you should use the methods, signals and properties of the gtk.FileChooser. - - - - - Constructor - - - gtk.FileChooserWidget - actiongtk.FILE_CHOOSER_ACTION_OPEN - backendNone - - - - action : - The open or save mode for the -widget or None. - - - backend : - The name of the specific filesystem backend to -use or None. - - - Returns : - a new gtk.FileChooserWidget - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new gtk.FileChooserWidget. -This is a file chooser widget that can be embedded in custom windows, and it -is the same widget that is used by gtk.FileChooserDialog. - - - - diff --git a/docs/reference/pygtk-gtkfilefilter.xml b/docs/reference/pygtk-gtkfilefilter.xml deleted file mode 100644 index a293d713..00000000 --- a/docs/reference/pygtk-gtkfilefilter.xml +++ /dev/null @@ -1,530 +0,0 @@ - - - - - gtk.FileFilter - a filter for selecting a file subset (new in PyGTK - 2.4) - - - - Synopsis - - - gtk.FileFilter - gtk.Object - - gtk.FileFilter - - - - set_name - name - - - get_name - - - - add_mime_type - mime_type - - - add_pattern - pattern - - - add_custom - needed - func - data - - - get_needed - - - - filter - filter_info - - - add_pixbuf_formats - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.FileFilter - - - - - - gtk.FileFilter Properties - - gtk.Object Properties - - - - - gtk.FileFilter Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - - - - Description - - - This widget is available in PyGTK 2.4 and above. - - - A gtk.FileFilter - is an object that filters files based on a set of rules that it - contains. The categories of information that gtk.FileFilter - uses to accept or reject the file are given by the : - - - - gtk.FILE_FILTER_FILENAME - - The full path name of the file. - - - - gtk.FILE_FILTER_URI - - The URI of the file. - - - - gtk.FILE_FILTER_DISPLAY_NAME - - The simple name of the file as displayed in a file -chooser. - - - - gtk.FILE_FILTER_MIME_TYPE - - The MIME type of the file. - - - - - The add_pattern() - method adds a rule that only uses the display name - (gtk.FILE_FILTER_DISPLAY_NAME) for filtering. The - add_mime_type() - method adds a rule that only uses the mime type - (gtk.FILE_FILTER_MIME_TYPE) for filtering. To use the - file URI (gtk.FILE_FILTER_URI) or filename - (gtk.FILE_FILTER_FILENAME) you have to create a - custom filter rule using a callback function that is registered with the - add_custom() - method. - - The pattern rule uses file globbing to match the file display - name: - - - - '*' matches any combination of characters e.g.. "a*c" matches - "abc", "a bridge tic", "aaabbbc" and so on. - - - '?' matches any single character e.g. "a?c" matches "abc", - aZc" and so on but not "abbc". - - - '[' and ']' enclose a set of characters that can be matched; ranges -of characters can be included by separating the start and end with a dash -(e.g. "a-z" include all the lowercase letters). e.g. "a[0-9]c" matches "a3c" -and "a9c" but not "a28c" or "abc". - - - '\' escapes the next character to allow "*", "?", "[" and "]" - to be matched literally. - - - - The MIME type requires an exact match (no pattern matching). - - - - - Constructor - - - gtk.FileFilter - - - - Returns : - a new -gtk.FileFilter - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new gtk.FileFilter -with no rules added to it. Such a filter doesn't pass any files, so it's not -particularly useful until you add rules with the add_mime_type(), -add_pattern() -or add_custom() -methods. To create a filter that accepts any file, use: - - - filter = gtk.FileFilter() - filter.add_pattern("*") - - - - - - - - Methods - - - gtk.FileFilter.set_name - - - set_name - name - - - - name : - the human-readable-name for the -filter. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_name() method sets the -human-readable name of the filter to the string in -name. The string in name will -be displayed in the file chooser user interface if there is a selectable -list of filters. - - - - - gtk.FileFilter.get_name - - - get_name - - - - Returns : - The human-readable name of the filter, -or None. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_name() method returns the -human-readable name for the filter or None if the name -has not been set. See the set_name() -method. - - - - - gtk.FileFilter.add_mime_type - - - add_mime_type - mime_type - - - - mime_type : - the name of a MIME type - - - - - This method is available in PyGTK 2.4 and above. - - - The add_mime_type() method adds a rule -allowing the mime type specified by mime_type to be -matched. Sets the needs value to -gtk.FILE_FILTER_MIME_TYPE (see the get_needed() -method for more information). - - - - - gtk.FileFilter.add_pattern - - - add_pattern - pattern - - - - pattern : - a shell style glob pattern - - - - - This method is available in PyGTK 2.4 and above. - - - The add_pattern() method adds a rule -allowing the shell style glob pattern specified by -pattern to filter file names. Sets the needs value to -gtk.FILE_FILTER_DISPLAY_NAME (see the get_needed() -method for more information). - - The pattern rule uses file globbing to match the file display -name: - - - - '*' matches any combination of characters e.g.. "a*c" matches - "abc", "a bridge tic", "aaabbbc" and so on. - - - '?' matches any single character e.g. "a?c" matches "abc", - aZc" and so on but not "abbc". - - - '[' and ']' enclose a set of characters that can be matched; ranges -of characters can be included by separating the start and end with a dash -(e.g. "a-z" include all the lowercase letters). e.g. "a[0-9]c" matches "a3c" -and "a9c" but not "a28c" or "abc". - - - '\' escapes the next character to allow "*", "?", "[" and "]" - to be matched literally. - - - - - - - gtk.FileFilter.add_custom - - - add_custom - needed - func - data - - - - needed : - a bitfield of flags indicating the information -that the custom filter function needs. - - - func : - a callback function; if the function returns -True, then the file will be displayed. - - - data : - the data to pass to -func - - - - - This method is available in PyGTK 2.4 and above. - - - The add_custom() method adds a rule to -a filter that allows files to be filtered based on a custom callback -function specified by func. The bitfield -needed provides information about what sorts of -information that the filter function needs; this allows GTK+ to avoid -retrieving expensive information when it isn't needed by the -filter. needed is a combination of: - - - - gtk.FILE_FILTER_FILENAME - - The full path name of the file. - - - - gtk.FILE_FILTER_URI - - The URI of the file. - - - - gtk.FILE_FILTER_DISPLAY_NAME - - The simple name of the file as displayed in a file -chooser. - - - - gtk.FILE_FILTER_MIME_TYPE - - The MIME type of the file. - - - - - The signature of func is: - - - def filefilterfunction(filter_info, data): - - - where filter_info is a 4-tuple where each -item is either a string or None. The strings correspond -to: the full pathname of the file, the URI of the file, the display name of -the file and the MIME type of the file. data is the -value passed in as the data parameter in the -add_custom() method. Using a custom filter function -is the only way to filter files based on file URIs or full file -pathnames. - - - - - gtk.FileFilter.get_needed - - - get_needed - - - - Returns : - a bitfield of flags indicating the needed fields -when calling filter() - - - - - This method is available in PyGTK 2.4 and above. - - - The get_needed() method returns the -information that is needed by the gtk.FileFilter -to filter the file info using the filter() - - This method is not typically used by applications; it is -intended principally for use in the implementation of gtk.FileChooser. - - - - - gtk.FileFilter.filter - - - filter - filter_info - - - - filter_info : - a 4-tuple containing the information -about a file. - - - Returns : - True if the file should be -displayed - - - - - This method is available in PyGTK 2.4 and above. - - - The filter() method tests whether a file should be displayed according to the file filter rules. -The 4-tuple filter_info should include -the fields returned from the get_needed() method: - - - - the full pathname of the file if needs includes - gtk.FILE_FILTER_FILENAME - - - the URI of the file is needs includes - gtk.FILE_FILTER_URI - - - the display name (without the path) if the file if needs - includes gtk.FILE_FILTER_DISPLAY_NAME - - - the MIME type of the file if needs includes - gtk.FILE_FILTER_MIME_TYPE - - - - This method will not typically be used by applications; it is -intended principally for use in the implementation of gtk.FileChooser. - - - - - gtk.FileFilter.add_pixbuf_formats - - - add_pixbuf_formats - - - - - This method is available in PyGTK 2.6 and above. - - - The add_pixbuf_formats() method adds a - rule allowing image files in the formats supported by gtk.gdk.Pixbuf. - - - - - - diff --git a/docs/reference/pygtk-gtkfileselection.xml b/docs/reference/pygtk-gtkfileselection.xml deleted file mode 100644 index 9f0ffe84..00000000 --- a/docs/reference/pygtk-gtkfileselection.xml +++ /dev/null @@ -1,538 +0,0 @@ - - - - - - gtk.FileSelection - a dialog used to prompt the user for a file or directory - name - - - - Synopsis - - - gtk.FileSelection - gtk.Dialog - - gtk.FileSelection - titleNone - - - set_filename - filename - - - get_filename - - - complete - pattern - - - show_fileop_buttons - - - hide_fileop_buttons - - - get_selections - - - set_select_multiple - select_multiple - - - get_select_multiple - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Window - +-- gtk.Dialog - +-- gtk.FileSelection - - - - - - gtk.FileSelection Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Window Properties - gtk.Dialog Properties - -
- - - - - - - - - - "filename" - Read/Write - The currently selected filename. - - - - "select-multiple" - Read/Write - If True allow multiple files to be - selected. - - - - "show-fileops" - Read/Write - If True display the buttons for creating - and manipulating files. - - - - - -
- -
- - - gtk.FileSelection Style Properties - - gtk.Widget Style Properties - gtk.Dialog Style Properties - - - - - Attributes - -
- - - - - - - - - - "dir_list" - Read - The gtk.TreeView -widget used to display the directories - - - - "file_list" - Read - The gtk.TreeView -widget used to display the files. - - - - "selection_entry" - Read - The gtk.Entry widget used -to display the current file selection - - - - "selection_text" - Read - The gtk.Label associated -with the selection entry. - - - - "main_vbox" - Read - The gtk.VBox widget that -holds all the widgets of the gtk.FileSelection -dialog. - - - - "ok_button" - Read - The "OK" button. - - - - "cancel_button" - Read - The "Cancel" button. - - - - "history_pulldown" - Read - The gtk.OptionMenu -widget that provides the pulldown list of directory paths. - - - - "history_menu" - Read - The gtk.Menu part of the -history_pulldown - - - - "fileop_dialog" - Read - The dialog box used to display the gtk.FileSelection. -It can be customized by adding or removing widgets from it using the -standard gtk.Dialog -methods. - - - - "fileop_entry" - Read - The gtk.Entry in the -fileops dialog that is created when one of the fileops buttons is -clicked. - - - - "fileop_file" - Read - The name of the file to be operated on by the -fileops - - - - "fileop_c_dir" - Read - The "New Folder" fileops button. - - - - "fileop_del_file" - Read - The "Delete File" fileops button - - - - "fileop_ren_file" - Read - The "Rename File" fileops button - - - - "button_area" - Read - The fileops gtk.ButtonBox. - - - - "action_area" - Read - A gtk.HBox that can be -used by the application to add buttons, etc. - - - - - -
- -
- - - gtk.FileSelection Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Window Signal Prototypes - gtk.Dialog Signal Prototypes - - - - Description - - The gtk.FileSelection -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 the gtk.FileSelection() -constructor. - - The default filename can be set using the set_filename() -method and the selected filename retrieved using the get_filename() -method. - - Use the complete() -method to display files and directories 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 the hide_fileop_buttons() -method and shown again using the show_fileop_buttons() -method. - - - - - Constructor - - - gtk.FileSelection - titleNone - - - - title : - the text to be used as the title of the -fileselection dialog. - - - Returns : - a new fileselection dialog - - - - Creates a new file selection dialog. By default it will contain -gtk.TreeViews -displaying the application's current working directory, and its file -listing. File operation buttons that allow the user to create a directory, -delete files and rename files, are also present. - - - - - Methods - - - gtk.FileSelection.set_filename - - - set_filename - filename - - - - filename : - a string to set as the default file -name. - - - - The set_filename() method sets a -default path for the file requester. If filename -includes a directory path, then the fileselection will open with that path -as its current working directory. - - Note the encoding of filename is the -on-disk encoding, which may not be UTF-8. - - - - - gtk.FileSelection.get_filename - - - get_filename - - - - Returns : - currently-selected filename in the on-disk -encoding - - - - The get_filename() method returns the -selected filename in the on-disk encoding, which may or may not be the same -as that used by GTK (UTF-8). If no file is selected then the selected -directory path is returned. - - - - - gtk.FileSelection.complete - - - complete - pattern - - - - pattern : - a string containing a pattern which may or may -not match any filenames in the current directory. - - - - The complete() method will attempt to -match pattern to valid filenames or subdirectories 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, and the "Directories" list those directories which -have been partially matched. - - - - - gtk.FileSelection.show_fileop_buttons - - - show_fileop_buttons - - - The show_fileop_buttons() method shows -the fileops buttons: "New Folder", "Delete File" and "Rename File". - - - - - gtk.FileSelection.hide_fileop_buttons - - - hide_fileop_buttons - - - The hide_fileop_buttons() method hides -the fileops buttons: "New Folder", "Delete File" and "Rename File". - - - - - gtk.FileSelection.get_selections - - - get_selections - - - - Returns : - a tuple containing the selected -files. - - - - The get_selections() method retrieves a -tuple containing the file selections the user has made in the file selection -dialog. The first file in the list is equivalent to what the get_filename() -method would return. - - - - - gtk.FileSelection.set_select_multiple - - - set_select_multiple - select_multiple - - - - select_multiple : - If True the user is allowed -to select multiple files in the file list. - - - - The set_select_multiple() method sets -the file list selection mode according to the value of -select_multiple. If -select_multiple is True the user -is allowed to select multiple files in the file list. Use the get_selections() -method to retrieve the list of selected files. - - - - - gtk.FileSelection.get_select_multiple - - - get_select_multiple - - - - Returns : - True if the user is allowed -to select multiple files in the file list - - - - The get_select_multiple() method -determines whether the user is allowed to make multiple file selection in -the file list. If the get_select_multiple() method -returns True the user is allowed to select multiple files -in the file list. See the set_select_multiple() -method. - - - - - -
diff --git a/docs/reference/pygtk-gtkfixed.xml b/docs/reference/pygtk-gtkfixed.xml deleted file mode 100644 index 731d4ca6..00000000 --- a/docs/reference/pygtk-gtkfixed.xml +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - gtk.Fixed - a container which allows you to position widgets at fixed -coordinates - - - - Synopsis - - - gtk.Fixed - gtk.Container - - gtk.Fixed - - - put - widget - x - y - - - move - widget - x - y - - - set_has_window - has_window - - - get_has_window - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Fixed - - - - - - gtk.Fixed Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - - - - - gtk.Fixed Style Properties - - gtk.Widget Style Properties - - - - - gtk.Fixed Child Properties - -
- - - - - - - - - - "x" - Read/Write - The x position of the child widget. - - - - "y" - Read/Write - The y position of the child widget. - - - - - -
- -
- - - gtk.Fixed Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - Description - - The gtk.Fixed widget is a -container that can place child widgets at fixed positions and with fixed -sizes, given in pixels. gtk.Fixed performs no -automatic layout management. For most applications, you should not use this -container! It keeps you from having to learn about the other PyGTK -containers, but it results in broken applications. With gtk.Fixed, the -following things will result in truncated text, overlapping widgets, and -other display bugs: - - - - Themes, which may change widget sizes. - - - Fonts other than the one you used to write the app will of -course change the size of widgets containing text; keep in mind that users -may use a larger font because of difficulty reading the default, or they may -be using Windows or the framebuffer port of PyGTK, where different fonts are -available. - - - Translation of text into other languages changes its size. -Also, display of non-English text will use a different font in many -cases. - - - - In addition, the fixed widget can't properly be mirrored in -right-to-left languages such as Hebrew and Arabic. i.e. normally PyGTK will -flip the interface to put labels to the right of the thing they label, but -it can't do that with gtk.Fixed. So your -application will not be usable in right-to-left languages. Finally, fixed -positioning makes it kind of annoying to add and remove GUI elements, since -you have to reposition all the other elements. This is a long-term -maintenance problem for your application. If you know none of these things -are an issue for your application, and prefer the simplicity of gtk.Fixed, by all -means use the widget. But you should be aware of the tradeoffs. - - - - - Constructor - - - gtk.Fixed - - - - Returns : - a new fixed widget - - - - Creates a new gtk.Fixed -widget - - - - - Methods - - - gtk.Fixed.put - - - put - widget - x - y - - - - widget : - the child widget being -added* - - - x : - the x position of the widget -location - - - y : - the y position of the widget -location - - - - The put() method adds the child widget -specified by widget to the gtk.Fixed widget at the -location specified by x and -y. - - - - - gtk.Fixed.move - - - move - widget - x - y - - - - widget : - the child widget - - - x : - the new x position - - - y : - the new y position - - - - The move() method moves the child -widget specified by widget to the location specified -specified by x and y. - - - - - gtk.Fixed.set_has_window - - - set_has_window - has_window - - - - has_window : - if True a separate window -should be created - - - - The set_has_window() method specifies -whether a gtk.Fixed widget is -created with a separate gtk.gdk.Window -according to the value of has_window. If -has_window is True the fixed -widget will be created with its own separate window. By default, the setting -is False and the fixed will be created with no separate -gtk.gdk.Window. This -method must be called while the gtk.Fixed is not -realized, for instance, immediately after the window is created. - - - - - gtk.Fixed.get_has_window - - - get_has_window - - - - Returns : - True if the fixed widget has -its own window. - - - - The get_has_window() method returns -True if the gtk.Fixed widget has -it's own gtk.gdk.Window. See -the set_has_window() -method. - - - - - -
diff --git a/docs/reference/pygtk-gtkfontbutton.xml b/docs/reference/pygtk-gtkfontbutton.xml deleted file mode 100644 index 6a702ac4..00000000 --- a/docs/reference/pygtk-gtkfontbutton.xml +++ /dev/null @@ -1,598 +0,0 @@ - - - - - gtk.FontButton a button to launch a font - selection dialog (new in PyGTK 2.4) - - - - Synopsis - - - gtk.FontButton - gtk.Button - - gtk.FontButton - fontnameNone - - - get_title - - - - set_title - title - - - get_use_font - - - - set_use_font - use_font - - - get_use_size - - - - set_use_size - use_size - - - get_font_name - - - - set_font_name - fontname - - - get_show_style - - - - set_show_style - show_style - - - get_show_size - - - - set_show_size - show_size - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Button - +-- gtk.FontButton - - - - - - gtk.FontButton Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Button Properties - -
- - - - - - - - - "font-name" - Read-Write - The name of the currently selected font. - - - - "show-size" - Read-Write - If True, the selected font size will - be shown in the label. For a more WYSIWIG way to show the - selected size, see the "use-size" property. - - - - "show-style" - Read-Write - If True, the name of the selected - font style will be shown in the label. For a more WYSIWIG way - to show the selected style, see the "use-font" - property. - - - - "title" - Read-Write - The title of the font selection dialog. - - - - "use-font" - Read-Write - If True, the label will be drawn in - the selected font - - - - "use-size" - Read-Write - If True, the label will be drawn - with the selected font size. - - - - - -
- -
- - - gtk.FontButton Style Properties - - gtk.Widget Style Properties - gtk.Button Style Properties - - - - - gtk.FontButton Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Button Signal Prototypes - - - - "font-set" - - callback - fontbutton - user_param1 - ... - - - - - - - - - Description - - - This widget is available in PyGTK 2.4 and above. - - - The gtk.FontButton -is a button that displays the currently selected font and, when clicked, -opens a gtk.FontSelectionDialog -to change the font. A gtk.FontButton -can be used in a preference dialog for selecting a font. - - - - - Constructor - - - gtk.FontButton - fontnameNone - - - - fontname : - the name of the font to display in the font -selection dialog - - - Returns : - a new font button widget - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new gtk.FontButton -that displays the font specified by fontname or the -currently selected font if fontname is -None or not specified. - - - - - Methods - - - gtk.FontButton.get_title - - - get_title - - - - - Returns : - the title string - - - - - This method is available in PyGTK 2.4 and above. - - - The get_title() method returns the -value of the "title" property that contains the title of the font selection -dialog. - - - - - gtk.FontButton.set_title - - - set_title - title - - - - title : - a string containing the font selection dialog -title - - - - - This method is available in PyGTK 2.4 and above. - - - The set_title() method sets the "title" -property to the string specified by title and sets -the title of the gtk.FontSelectionDialog -if it exists. The "title" property contains the title of the font -selection dialog. - - - - - gtk.FontButton.get_use_font - - - get_use_font - - - - - Returns : - True, if the font button -label is written using the selected font. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_use_font() method returns the -value of the "use-font" property. If "use-font" is True -the selected font is used in the label. - - - - - gtk.FontButton.set_use_font - - - set_use_font - use_font - - - - use_font : - If True, the font button label -will be written using the font selected. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_use_font() method sets the -"use-font" property to the value specified by -use_font. If use_font is -True, the font button label will be written using the -selected font. - - - - - gtk.FontButton.get_use_size - - - get_use_size - - - - - Returns : - True if the font button label -is written using the selected size. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_use_size() method returns the -value of the "use-size" property. If the value of "use-size" is -True, the font button label is written using the selected -font size. - - - - - gtk.FontButton.set_use_size - - - set_use_size - use_size - - - - use_size : - If True, the font button label -will be written using the selected size. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_use_size() method sets the -"use-size" property to the value of use_size. If -use_size is True, the font button -label will be written using the selected size. - - - - - gtk.FontButton.get_font_name - - - get_font_name - - - - - Returns : - the font name. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_font_name() method returns the -value of the "font-name" property that contains the name of the currently -selected font. - - - - - gtk.FontButton.set_font_name - - - set_font_name - fontname - - - - fontname : - the name of the font to display in the font -selection dialog - - - Returns : - True if the font selection -dialog exists and the font name could be set - - - - - This method is available in PyGTK 2.4 and above. - - - The set_font_name() method sets the -"font-name" property to the value of fontname and -updates the currently-displayed font in the font selection dialog. Returns -True if the font selection dialog exists and -fontname could be set as its font. - - - - - gtk.FontButton.get_show_style - - - get_show_style - - - - - Returns : - True if the font style will -be shown in the label. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_show_style() method returns the -value of the "show-style" property. If "show-style" is -True, the name of the font style will be shown in the -font button label. - - - - - gtk.FontButton.set_show_style - - - set_show_style - show_style - - - - show_style : - if True, the font style -should be displayed in the font button label. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_show_style() method sets the -"show-style" property tot he value of show_style. If -show_style is True, the font style -will be displayed along with name of the selected font in the font button -label. - - - - - gtk.FontButton.get_show_size - - - get_show_size - - - - - Returns : - True if the font size will -be shown in the font button label. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_show_size() method returns the -value of the "show-size" property. If "show-size" is -True, the font size will be shown in the font button -label. - - - - - gtk.FontButton.set_show_size - - - set_show_size - show_size - - - - show_size : - if True, the font size should -be displayed in the font button label. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_show_size() method sets the -"show-size" property to to the value of show_size. If -show_size is True, the font size -will be displayed along with the name of the selected font in the font -button label. - - - - - - - Signals - - - The "font-set" gtk.FontButton Signal - - - callback - fontbutton - user_param1 - ... - - - - - fontbutton : - the fontbutton that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "font-set" signal is emitted when the user selects a -font. When handling this signal, use the get_font_name() -method to find out what font was just selected. - - - - - -
diff --git a/docs/reference/pygtk-gtkfontselection.xml b/docs/reference/pygtk-gtkfontselection.xml deleted file mode 100644 index 8bf53365..00000000 --- a/docs/reference/pygtk-gtkfontselection.xml +++ /dev/null @@ -1,277 +0,0 @@ - - - - - - gtk.FontSelection - a widget for selecting fonts. - - - - Synopsis - - - gtk.FontSelection - gtk.VBox - - gtk.FontSelection - - - get_font_name - - - set_font_name - fontname - - - get_preview_text - - - set_preview_text - text - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Box - +-- gtk.VBox - +-- gtk.FontSelection - - - - - - gtk.FontSelection Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Box Properties - -
- - - - - - - - - - "font" - Read - The gtk.gdk.Font that is - currently selected. This property is deprecated. - - - - "font-name" - Read/Write - The string that names the font - - - - "preview-text" - Read/Write - The text to display in order to demonstrate the selected - font. - - - - - - -
- -
- - - gtk.FontSelection Style Properties - - gtk.Widget Style Properties - - - - - gtk.FontSelection Child Properties - - gtk.Box Child Properties - - - - - gtk.FontSelection Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - Description - - The gtk.FontSelection -widget lists the available fonts, styles and sizes, allowing the user to -select a font. It is used in the gtk.FontSelectionDialog -widget to provide a dialog box for selecting fonts. The set_font_name() -method sets the initial font selection. The current font selection is -retrieved using the get_font_name() -method. - - The fontselection has a preview area that contains a gtk.Entry that -displays text using the currently selected font. The preview text can be -retrieved with the get_preview_text() -method and set with the set_preview_text() -method. - - Filters can be used to limit the font selections. There are 2 -filters in the gtk.FontSelection -- a base filter and a user filter. The base filter cannot 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. - - - - - Constructor - - - gtk.FontSelection - - - - Returns : - a new fontselection widget - - - - Creates a new gtk.FontSelection -widget. - - - - - Methods - - - gtk.FontSelection.get_font_name - - - get_font_name - - - - Returns : - a string containing the selected font -name - - - - The get_font_name() method returns the -name of the currently selected font. - - - - - gtk.FontSelection.set_font_name - - - set_font_name - fontname - - - - fontname : - a string containing the name of a -font - - - Returns : - True if the font could be -set - - - - The set_font_name() method sets the -currently selected font in the fontselection using the value of -fontname. The method returns True -if the font is found and can be selected in the fontselection. - - - - - gtk.FontSelection.get_preview_text - - - get_preview_text - - - - Returns : - a string containing the preview -text - - - - The get_preview_text() method returns a -string that contains the text displayed in the preview area entry. - - - - - gtk.FontSelection.set_preview_text - - - set_preview_text - text - - - - text : - the new preview text -string - - - - The set_preview_text() method sets the -text to be displayed in the preview area entry using the string in -text. - - - - - -
diff --git a/docs/reference/pygtk-gtkfontselectiondialog.xml b/docs/reference/pygtk-gtkfontselectiondialog.xml deleted file mode 100644 index a018e0f4..00000000 --- a/docs/reference/pygtk-gtkfontselectiondialog.xml +++ /dev/null @@ -1,318 +0,0 @@ - - - - - - gtk.FontSelectionDialog - a dialog for selecting fonts. - - - - Synopsis - - - gtk.FontSelectionDialog - gtk.Dialog - - gtk.FontSelectionDialog - title - - - get_font_name - - - set_font_name - fontname - - - get_preview_text - - - set_preview_text - text - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Window - +-- gtk.Dialog - +-- gtk.FontSelectionDialog - - - - - - gtk.FontSelectionDialog Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Window Properties - gtk.Dialog Properties - - - - - gtk.FontSelectionDialog Style Properties - - gtk.Widget Style Properties - gtk.Dialog Style Properties - - - - - Attributes - -
- - - - - - - - - - "fontsel" - Read - The gtk.FontSelection -widget in the dialog. - - - - "main_vbox" - Read - The gtk.VBox that contains -all the dialog widgets - - - - "action_area" - Read - The gtk.HBox containing -the action buttons - - - - "ok_button" - Read - The OK button - - - - "apply_button" - Read - The Apply button - - - - "cancel_button" - Read - The Cancel button - - - - - -
- -
- - - gtk.FontSelectionDialog Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Window Signal Prototypes - gtk.Dialog Signal Prototypes - - - - Description - - The gtk.FontSelectionDialog -is a dialog box containing a gtk.FontSelection -widget that the user can use to select a font according to the desired -family, style and size. - - The set_font_name() -method sets the initial font selection. The current font selection is -retrieved using the get_font_name() -method. The font selection dialog has a preview area that contains a gtk.Entry that -displays text using the currently selected font. The preview text can be -retrieved with the get_preview_text() -method and set with the set_preview_text() -method. - - Filters can be used to limit the font selections. There are 2 -filters in the gtk.FontSelectionDialog -- a base filter and a user filter. The base filter cannot 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. - - - In GTK+ 2.2 and above the gtk.FontSelectionDialog -does not have filters, a Reset Filter button or a -Filter page. - - - - - - Constructor - - - gtk.FontSelectionDialog - title - - - - title : - a string to be used as the dialog -title - - - Returns : - a new font selection dialog - - - - Creates a new gtk.FontSelectionDialog -with the title specified by title. - - - - - Methods - - - gtk.FontSelectionDialog.get_font_name - - - get_font_name - - - - Returns : - the currently selected font name or None if no -font is selected. - - - - The get_font_name() method returns a -string containing the currently selected font name or None if no font name -is selected. - - - - - gtk.FontSelectionDialog.set_font_name - - - set_font_name - fontname - - - - fontname : - a string containing the font name to be -set - - - Returns : - True if the font is found -and can be selected - - - - The set_font_name() method sets the -current font using the value of fontname. The method -returns True if the font exists and could be -selected. - - - - - gtk.FontSelectionDialog.get_preview_text - - - get_preview_text - - - - Returns : - a string containing the text in the preview -area entry - - - - The get_preview_text() method returns a -string containing the text in the preview area entry. - - - - - gtk.FontSelectionDialog.set_preview_text - - - set_preview_text - text - - - - text : - a string used to set the text in the preview -area entry - - - - The set_preview_text() method sets the -text in the preview area entry using the string specified by -text. - - - - - -
diff --git a/docs/reference/pygtk-gtkframe.xml b/docs/reference/pygtk-gtkframe.xml deleted file mode 100644 index b71176c0..00000000 --- a/docs/reference/pygtk-gtkframe.xml +++ /dev/null @@ -1,402 +0,0 @@ - - - - - - gtk.Frame - a bin with a decorative frame and optional -label. - - - - Synopsis - - - gtk.Frame - gtk.Bin - - gtk.Frame - labelNone - - - set_label - label - - - get_label - - - set_label_widget - label_widget - - - get_label_widget - - - set_label_align - xalign - yalign - - - get_label_align - - - - set_shadow_type - type - - - get_shadow_type - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Frame - - - - - - gtk.Frame Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - -
- - - - - - - - - "label" - Read-Write - The text of the frame's label - - - - "label-widget" - Read-Write - The widget to display in place of the usual frame -label. - - - - "label-xalign" - Read-Write - The horizontal alignment of the label widget in the -range of 0.0 to 1.0 - - - - "label-yalign" - Read-Write - The vertical alignment of the decoration within the -label widget height in the range of 0.0 to 1.0 - - - - "shadow-type" - Read-Write - The style of the frame's border; one of: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT - - - - - -
- -
- - - gtk.Frame Style Properties - - gtk.Widget Style Properties - - - - - gtk.Frame Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - Description - - The gtk.Frame widget is a -gtk.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 set_label_align(). - - - - - Constructor - - - gtk.Frame - labelNone - - - - label : - a string to use as the label text or None if no -label is required. - - - Returns : - a new frame widget - - - - Creates a new gtk.Frame widget with -the label text specified by label. If -label is None no label is -created. - - - - - Methods - - - gtk.Frame.set_label - - - set_label - label - - - - label : - a string to be used as the label -text - - - - The set_label() method sets the text of -the label as specified by label. If -label is None the current label is -removed. - - - - - gtk.Frame.get_label - - - get_label - - - - Returns : - the text in the label, or -None if there is no label widget or the label widget is -not a gtk.Label. - - - - The get_label() method returns the text -in the label widget. If there is no label widget or the label widget is not -a gtk.Label the -method returns None. - - - - - gtk.Frame.set_label_widget - - - set_label_widget - label_widget - - - - label_widget : - the new label widget - - - - The set_label_widget() method set the -label widget (usually to something other than a gtk.Label widget) for -the frame. This widget will appear embedded in the top edge of the frame as -a title. - - - - - gtk.Frame.get_label_widget - - - get_label_widget - - - - Returns : - the label widget, or None if -there is no label widget. - - - - The get_label_widget() method retrieves -the label widget for the frame. See set_label_widget(). - - - - - gtk.Frame.set_label_align - - - set_label_align - xalign - yalign - - - - xalign : - the horizontal alignment of the label widget -along the top edge of the frame (in the range of 0.0 to -1.0) - - - yalign : - the vertical alignment of the decoration with -respect to the label widget (in the range 0.0 to 1.0) - - - - The set_label_align() method sets the -alignment of the frame's label widget and decoration (defaults are 0.0 and -0.5) as specified by xalign and -yalign. The xalign value -specifies the fraction of free horizontal space that is allocated to the -left of the label widget. The yalign value specifies -the fraction of label widget height above the decoration. - - - - - gtk.Frame.get_label_align - - - get_label_align - - - - - Returns : - a tuple containing the x and y alignments of -the frame's label widget - - - - The get_label_align() method returns a -tuple containing the X and Y alignment of the frame's label widget and -decoration. See the set_label_align() -method. - - - - - gtk.Frame.set_shadow_type - - - set_shadow_type - type - - - - type : - a shadow type: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT - - - - The set_shadow_type() method sets the -frame's shadow type to the value of type. The type -must be one of: gtk.SHADOW_NONE, -gtk.SHADOW_IN, gtk.SHADOW_OUT, -gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT - - - - - gtk.Frame.get_shadow_type - - - get_shadow_type - - - - Returns : - the current shadow type of the -frame. - - - - The get_shadow_type() method retrieves the shadow type of the -frame; one of: gtk.SHADOW_NONE, -gtk.SHADOW_IN, gtk.SHADOW_OUT, -gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT. See set_shadow_type(). - - - - - -
diff --git a/docs/reference/pygtk-gtkgammacurve.xml b/docs/reference/pygtk-gtkgammacurve.xml deleted file mode 100644 index 5d5c96ef..00000000 --- a/docs/reference/pygtk-gtkgammacurve.xml +++ /dev/null @@ -1,180 +0,0 @@ - - - - - - gtk.GammaCurve - subclass of gtk.Curve for editing -gamma curves. - - - - Synopsis - - - gtk.GammaCurve - gtk.VBox - - gtk.GammaCurve - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Box - +-- gtk.VBox - +-- gtk.GammaCurve - - - - - - gtk.GammaCurve Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Box Properties - - - - - gtk.GammaCurve Style Properties - - gtk.Widget Style Properties - - - - - gtk.GammaCurve Child Properties - - gtk.Box Child Properties - - - - - Attributes - -
- - - - - - - - - - "table" - Read - The gtk.Table -containing the gtk.GammaCurve -widgets. - - - - "curve" - Read - The gtk.Curve -widget. - - - - "gamma" - Read - The gamma value (float) - - - - "gamma_dialog" - Read - The gtk.Dialog -that prompts for the gamma value. - - - - "gamma_text" - Read - The gtk.Entry -containing the gamma value in the gamma dialog - - - - - -
- -
- - - gtk.GammaCurve Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - Description - - - This widget is considered too specialized or little-used for -PyGTK, and will in the future be moved to some other package. If your -application needs this widget, feel free to use it, as the widget does work -and is useful in some applications; it's just not of general interest. -However, it will eventually move out of the PyGTK distribution. - - - The gtk.GammaCurve -widget is a variant of gtk.Curve -specifically for editing gamma curves, which are used in graphics -applications such as the Gimp. The gtk.GammaCurve -widget shows a curve which the user can edit with the mouse just like a -gtk.Curve -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. - - - - - Constructor - - - gtk.GammaCurve - - - - Returns : - a new gammacurve widget - - - - Creates a new gtk.GammaCurve -widget. - - - -
diff --git a/docs/reference/pygtk-gtkhandlebox.xml b/docs/reference/pygtk-gtkhandlebox.xml deleted file mode 100644 index fde851fc..00000000 --- a/docs/reference/pygtk-gtkhandlebox.xml +++ /dev/null @@ -1,474 +0,0 @@ - - - - - - gtk.HandleBox - a widget for detachable window portions. - - - - Synopsis - - - gtk.HandleBox - gtk.Bin - - gtk.HandleBox - - - set_shadow_type - type - - - get_shadow_type - - - set_handle_position - position - - - get_handle_position - - - set_snap_edge - edge - - - get_snap_edge - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.HandleBox - - - - - - gtk.HandleBox Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - -
- - - - - - - - - "handle-position" - Read-Write - The position of the handle relative to the child - widget; one of the . - - - - "shadow-type" - Read-Write - The type of shadow; one of the . - - - - "snap-edge" - Read-Write - The side of the handlebox that's lined up with the - docking point to dock the handlebox; one of the . - - - - "snap-edge-set" - Read-Write - If True, use the value from - "snap-edge"; otherwise, use a value derived from - "handle-position". Available in GTK+ 2.2 and above. - - - - - -
- -
- - - gtk.HandleBox Style Properties - - gtk.Widget Style Properties - - - - - gtk.HandleBox Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - "child-attached" - - callback - handlebox - - widget - - user_param1 - - ... - - - - - - "child-detached" - - callback - handlebox - - widget - - user_param1 - - ... - - - - - - - - - - Description - - The gtk.HandleBox -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 -into a separate floating window containing the child widget. A thin ghost is -drawn in the original location of the handlebox. The separate window can be -dragged back to its original location to be reattached. When reattaching, -the ghost and float window, must be aligned along one of the edges called -the snap edge that can be specified by the application, or specified -automatically using a reasonable default based on the handle position. The -snap edge is automatically set as gtk.POS_TOP if the -handle position is gtk.POS_RIGHT or -gtk.POS_LEFT; otherwise, the snap edge will be set as -gtk.POS_LEFT. - - 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 detached. For -example, if the handlebox is packed at the bottom of a gtk.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. - - - - - Constructor - - - gtk.HandleBox - - - - Returns : - a new handlebox widget - - - - Creates a new gtk.HandleBox -widget. - - - - - Methods - - - gtk.HandleBox.set_shadow_type - - - set_shadow_type - type - - - - type : - the shadow type: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT - - - - The set_shadow_type() method sets the -type of shadow to be drawn around the border of the handle box as specified -by type. The value of type -must be one of: gtk.SHADOW_NONE, -gtk.SHADOW_IN, gtk.SHADOW_OUT, -gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT. - - - - - gtk.HandleBox.get_shadow_type - - - get_shadow_type - - - - Returns : - the type of shadow currently drawn around the -handle box. - - - - The get_shadow_type() method gets the -type of shadow drawn around the handle box. The shadow type is one of: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT. See set_shadow_type(). - - - - - gtk.HandleBox.set_handle_position - - - set_handle_position - position - - - - position : - the side of the handlebox where the handle -should be drawn. - - - - The set_handle_position() method sets -the side of the handlebox where the handle is drawn using the value of -position. The value of -position must be one of: -gtk.POS_LEFT, gtk.POS_RIGHT, -gtk.POS_TOP, gtk.POS_BOTTOM - - - - - gtk.HandleBox.get_handle_position - - - get_handle_position - - - - Returns : - the current handle -position. - - - - The get_handle_position() method gets -the handle position of the handle box; one of: -gtk.POS_LEFT, gtk.POS_RIGHT, -gtk.POS_TOP, gtk.POS_BOTTOM. See set_handle_position(). - - - - - gtk.HandleBox.set_snap_edge - - - set_snap_edge - edge - - - - edge : - the edge to use as the snap edge or -1 to have -PyGTK automatically pick the snap edge - - - - The set_snap_edge() method sets the -snap edge of the handlebox to the value specified by -edge. The value of edge can be -one of: gtk.POS_LEFT, gtk.POS_RIGHT, -gtk.POS_TOP, gtk.POS_BOTTOM or -1 to -have the snap edge automatically specified. - - 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. - - - - - gtk.HandleBox.get_snap_edge - - - get_snap_edge - - - - Returns : - the edge used for determining reattachment, or --1 if the snap edge is determined (as per default) from the handle -position. - - - - The get_snap_edge() method gets the -edge used for determining reattachment of the handle box. The return value -will be one of: gtk.POS_LEFT, -gtk.POS_RIGHT, gtk.POS_TOP, -gtk.POS_BOTTOM or -1 to indicate the snap edge is -automatically selected. See set_snap_edge(). - - - - - - - Signals - - - The "child-attached" gtk.HandleBox Signal - - - callback - handlebox - widget - user_param1 - ... - - - - - handlebox : - the widget that received the -signal - - - widget : - the child widget - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "child-attached" signal is emitted when the contents of the -handlebox are reattached to the main window. - - - - - The "child-detached" gtk.HandleBox Signal - - - callback - handlebox - widget - user_param1 - ... - - - - - handlebox : - the widget that received the -signal - - - widget : - the child widget - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "child-detached" signal is emitted when the contents of the -handlebox are detached from the main window. - - - - - -
diff --git a/docs/reference/pygtk-gtkhbox.xml b/docs/reference/pygtk-gtkhbox.xml deleted file mode 100644 index ec60ad6e..00000000 --- a/docs/reference/pygtk-gtkhbox.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - gtk.HBox - a horizontal container box - - - - Synopsis - - - gtk.HBox - gtk.Box - - gtk.HBox - homogeneousFalse - spacing0 - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Box - +-- gtk.HBox - - - - - - gtk.HBox Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Box Properties - - - - - gtk.HBox Style Properties - - gtk.Widget Style Properties - - - - - gtk.HBox Child Properties - - gtk.Box Child Properties - - - - - gtk.HBox Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - Description - - The gtk.HBox is a -container subclassed from gtk.Box that organizes -its child widgets into a single horizontal row. The gtk.Box methods are -used to manage the order, spacing, width and alignment of the child widgets -though all widgets are allocated the same height. - - - - - Constructor - - - gtk.HBox - homogeneousFalse - spacing0 - - - - homogeneous : - If True all children are given -equal space allocations. - - - spacing : - The additional horizontal space between children -in pixels - - - Returns : - a new hbox widget - - - - Creates a new gtk.HBox -widget. - - - - diff --git a/docs/reference/pygtk-gtkhbuttonbox.xml b/docs/reference/pygtk-gtkhbuttonbox.xml deleted file mode 100644 index 3a0ead39..00000000 --- a/docs/reference/pygtk-gtkhbuttonbox.xml +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - gtk.HButtonBox - a container for arranging buttons horizontally. - - - - Synopsis - - - gtk.HButtonBox - gtk.ButtonBox - - gtk.HButtonBox - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Box - +-- gtk.ButtonBox - +-- gtk.HButtonBox - - - - - - gtk.HButtonBox Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Box Properties - gtk.ButtonBox Properties - - - - - gtk.HButtonBox Style Properties - - gtk.Widget Style Properties - gtk.ButtonBox Style Properties - - - - - gtk.HButtonBox Child Properties - - gtk.Box Child Properties - gtk.ButtonBox Child Properties - - - - - gtk.HButtonBox Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - Description - - The gtk.HButtonBox -is a container subclassed from gtk.ButtonBox -that is optimized for the horizontal layout of buttons. The gtk.HButtonBox -helps provide a consistent layout of buttons in an application by providing -default values of spacing, padding and layout style as described in the -gtk.ButtonBox -reference. Buttons are packed into a gtk.HButtonBox -using the gtk.Container.add() -method or the gtk.Box.pack_start() -and gtk.Box.pack_end() -methods. The spacing between buttons can be set with the gtk.Box.set_spacing() -method. - - - - - Constructor - - - gtk.HButtonBox - - - - Returns : - a new hbuttonbox widget - - - - Creates a new gtk.HButtonBox -widget. - - - - diff --git a/docs/reference/pygtk-gtkhpaned.xml b/docs/reference/pygtk-gtkhpaned.xml deleted file mode 100644 index c82e4546..00000000 --- a/docs/reference/pygtk-gtkhpaned.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - gtk.HPaned - a container with two panes arranged -horizontally. - - - - Synopsis - - - gtk.HPaned - gtk.Paned - - gtk.HPaned - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Paned - +-- gtk.HPaned - - - - - - gtk.HPaned Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Paned Properties - - - - - gtk.HPaned Style Properties - - gtk.Widget Style Properties - gtk.Paned Style Properties - - - - - gtk.HPaned Child Properties - - gtk.Paned Child Properties - - - - - gtk.HPaned Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Paned Signal Prototypes - - - - Description - - The gtk.HPaned is a -container widget subclassed from gtk.Paned with two -children arranged horizontally. The division between the children can be -adjusted by the user by dragging a handle. See the gtk.Paned description -for more information. - - - - - Constructor - - - gtk.HPaned - - - - Returns : - a new hpaned widget - - - - Creates a new gtk.HPaned -widget. - - - - diff --git a/docs/reference/pygtk-gtkhruler.xml b/docs/reference/pygtk-gtkhruler.xml deleted file mode 100644 index 2e4adadc..00000000 --- a/docs/reference/pygtk-gtkhruler.xml +++ /dev/null @@ -1,106 +0,0 @@ - - - - - - gtk.HRuler - a horizontal ruler. - - - - Synopsis - - - gtk.HRuler - gtk.Ruler - - gtk.HRuler - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Ruler - +-- gtk.HRuler - - - - - - gtk.HRuler Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Ruler Properties - - - - - gtk.HRuler Style Properties - - gtk.Widget Style Properties - - - - - gtk.HRuler Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - - - - Description - - - This widget is considered too specialized or little-used for -PyGTK, and will in the future be moved to some other package. If your -application needs this widget, feel free to use it, as the widget does work -and is useful in some applications; it's just not of general interest. -However, it will eventually move out of the PyGTK distribution. - - - The gtk.HRuler widget is -arranged horizontally creating a ruler that is used in conjunction with -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 -(the default), gtk.INCHES and -gtk.CENTIMETERS. See the gtk.Ruler description -for more information on the methods that are used to manage a gtk.HRuler. - - - - - Constructor - - - gtk.HRuler - - - - Returns : - a new hruler widget - - - - Creates a new gtk.HRuler -widget. - - - - diff --git a/docs/reference/pygtk-gtkhscale.xml b/docs/reference/pygtk-gtkhscale.xml deleted file mode 100644 index aa39dea0..00000000 --- a/docs/reference/pygtk-gtkhscale.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - gtk.HScale - a horizontal slider widget for selecting a value from a -range. - - - - Synopsis - - - gtk.HScale - gtk.Scale - - gtk.HScale - adjustmentNone - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Range - +-- gtk.Scale - +-- gtk.HScale - - - - - - gtk.HScale Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Range Properties - gtk.Scale Properties - - - - - gtk.HScale Style Properties - - gtk.Widget Style Properties - gtk.Range Style Properties - gtk.Scale Style Properties - - - - - gtk.HScale Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Range Signal Prototypes - gtk.Scale Signal Prototypes - - - - Description - - The gtk.HScale is -subclassed from gtk.Scale to provide -a widget that allows a user to select a value using a horizontal slider. See -the gtk.Scale -description for more information on the methods available to manage a gtk.HScale. - - - - - Constructor - - - gtk.HScale - adjustmentNone - - - - adjustment : - a gtk.Adjustment -object - - - Returns : - a new hscale widget - - - - Creates a new gtk.HScale widget -and associates a gtk.Adjustment -specified by adjustment. The default value of -adjustment is None which creates -the hscale with no gtk.Adjustment. - - - - diff --git a/docs/reference/pygtk-gtkhscrollbar.xml b/docs/reference/pygtk-gtkhscrollbar.xml deleted file mode 100644 index 91db6630..00000000 --- a/docs/reference/pygtk-gtkhscrollbar.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - gtk.HScrollbar - a horizontal scrollbar widget - - - - Synopsis - - - gtk.HScrollbar - gtk.Scrollbar - - gtk.HScrollbar - adjustmentNone - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Range - +-- gtk.Scrollbar - +-- gtk.HScrollbar - - - - - - gtk.HScrollbar Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Range Properties - - - - - gtk.HScrollbar Style Properties - - gtk.Widget Style Properties - gtk.Range Style Properties - gtk.Scrollbar Style Properties - - - - - gtk.HScrollbar Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Range Signal Prototypes - - - - Description - - The gtk.HScrollbar -widget is subclassed from gtk.Scrollbar to -provide a horizontal scrollbar. See gtk.Scrollbar for -details on the methods available for managing scrollbars. A gtk.Adjustment -may be specified with the scrollbar at creation (or is created automatically -if none is specified) to handle the adjustment of the scrollbar. See gtk.Adjustment -for details. - - - - - Constructor - - - gtk.HScrollbar - adjustmentNone - - - - adjustment : - a gtk.Adjustment -or None to automatically create an -adjustment - - - Returns : - a new hscrollbar widget - - - - Creates a new gtk.HScrollbar -with an associated gtk.Adjustment -specified by adjustment. If -adjustment is None or missing a new gtk.Adjustment -will be created and associated with the scrollbar. - - - - diff --git a/docs/reference/pygtk-gtkhseparator.xml b/docs/reference/pygtk-gtkhseparator.xml deleted file mode 100644 index 9fe7e6fb..00000000 --- a/docs/reference/pygtk-gtkhseparator.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - gtk.HSeparator - a horizontal separator. - - - - Synopsis - - - gtk.HSeparator - gtk.Separator - - gtk.HSeparator - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Separator - +-- gtk.HSeparator - - - - gtk.HSeparator Properties - - gtk.Object Properties - gtk.Widget Properties - - - - - gtk.HSeparator Style Properties - - gtk.Widget Style Properties - - - - - gtk.HSeparator Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - - - - - - Description - - The gtk.HSeparator -widget is a horizontal separator, used to visibly separate the widgets -within a window. It displays a horizontal line with a shadow to make it -appear sunken into the interface. - - - The gtk.HSeparator -widget is not used as a separator within menus. To create a separator in a -menu create an empty gtk.SeparatorMenuItem -widget and add it to the menu with gtk.MenuShell.append(). - - - - - - Constructor - - - gtk.HSeparator - - - - Returns : - a new horizontal separator -widget - - - - Creates a new gtk.HSeparator -widget. - - - - diff --git a/docs/reference/pygtk-gtkiconfactory.xml b/docs/reference/pygtk-gtkiconfactory.xml deleted file mode 100644 index d3a93a60..00000000 --- a/docs/reference/pygtk-gtkiconfactory.xml +++ /dev/null @@ -1,269 +0,0 @@ - - - - - - gtk.IconFactory - an object that manages a group of icon sets. - - - - Synopsis - - - gtk.IconFactory - gobject.GObject - - gtk.IconFactory - - - add - stock_id - icon_set - - - lookup - stock_id - - - add_default - - - remove_default - - - - -Functions - - - gtk.icon_factory_lookup_default - stock_id - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.IconFactory - - - - - - gtk.IconFactory Signal Prototypes - - gobject.GObject Signal Prototypes - - - - Description - - A gtk.IconFactory -manages a group of gtk.IconSets that -manage a set of variants (for different sizes and states) of a specific -icon. Icons in an icon factory are named by a stock ID, which is a simple -string identifying the icon e.g "gtk-ok". Each gtk.Style has a list -of gtk.IconFactorys -derived from the current theme; those icon factories are consulted first -when searching for an icon. If the theme doesn't set a particular icon, the -search continues for the icon in a list of default icon factories, -maintained by the add_default()() -and remove_default()() -methods. Applications with icons should add a default icon factory with -their icons, which will allow themes to override the icons for the -application. - - To display an icon, always use gtk.Style.lookup_icon_set() -on the widget that will display the icon, or the convenience function gtk.Widget.render_icon(). -These functions take the theme into account when looking up the icon to use -for a given stock ID. - - - - - Constructor - - - gtk.IconFactory - - - - Returns : - a new gtk.IconFactory -object - - - - Creates a new gtk.IconFactory. - - - - - Methods - - - gtk.IconFactory.add - - - add - stock_id - icon_set - - - - stock_id : - an icon name - - - icon_set : - an icon set - - - - The add() method adds the specified -icon_set to the icon factory, under the name -stock_id. the stock_id string -should include the name of your application, e.g. "myapp-whatever-icon". -Normally applications create a gtk.IconFactory, -then add it to the list of default factories with the add_default(). -Then they pass the stock_id to widgets such as gtk.Image to display -the icon. Themes can provide an icon with the same name (such as -"myapp-whatever-icon") to override your application's default icons. If an -icon already existed in the icon factory for -stock_id, it is unreferenced and replaced with the -new icon_set. - - - - - gtk.IconFactory.lookup - - - lookup - stock_id - - - - stock_id : - an icon name - - - Returns : - the icon set named -stock_id. - - - - The lookup() method looks up -stock_id in the icon factory, returning an icon set -if found, otherwise None. For display to the user, you -should use gtk.Style.lookup_icon_set() -on the gtk.Style for the -widget that will display the icon, instead of using this function directly, -so that themes are taken into account. - - - - - gtk.IconFactory.add_default - - - add_default - - - The add_default() method adds the icon -factory to the list of icon factories searched by gtk.Style.lookup_icon_set(). -This means that, for example, gtk.Image.set_from_stock() -will be able to find icons in the icon factory. There will normally be an -icon factory added for each library or application that comes with icons. -The default icon factories can be overridden by themes. - - - - - gtk.IconFactory.remove_default - - - remove_default - - - The remove_default() method removes an -icon factory from the list of default icon factories. Not normally used -though you might use it for a library that can be unloaded or shut -down. - - - - - - - Functions - - - gtk.icon_factory_lookup_default - - - gtk.icon_factory_lookup_default - stock_id - - - - - - stock_id : - the stock ID to lookup - - - Returns : - the icon set matching -stock_id or None if no icon set -matches - - - - The gtk.icon_factory_lookup_default() -function returns the gtk.IconSet that -has the name specified by stock_id. If the icon set -cannot be found the function returns None. - - - - - - diff --git a/docs/reference/pygtk-gtkiconinfo.xml b/docs/reference/pygtk-gtkiconinfo.xml deleted file mode 100644 index d1b86653..00000000 --- a/docs/reference/pygtk-gtkiconinfo.xml +++ /dev/null @@ -1,391 +0,0 @@ - - - - - gtk.IconInfo object containing - information about and icon in an icon theme (new in PyGTK 2.4) - - - - Synopsis - - - gtk.IconInfo - gobject.GBoxed - - copy - - - - free - - - - get_base_size - - - - get_filename - - - - get_builtin_pixbuf - - - - load_icon - - - set_raw_coordinates - raw_coordinates - - - get_embedded_rect - - - get_attach_points - - - get_display_name - - - - - - - - Description - - - This object is available in PyGTK 2.4 and above. - - - A gtk.IconInfo -object contains information about an icon in a gtk.IconTheme. A -gtk.IconInfo -object is created using the gtk.IconTheme.lookup_icon() -method. - - A gtk.gdk.Pixbuf can -be rendered with the icon using the load_icon() -method. If you just want to load the pixbuf of an icon you can use the gtk.IconTheme.load_icon() -method that combines the gtk.IconTheme.lookup_icon() -method and the load_icon() -method. - - - - - Methods - - - gtk.IconInfo.copy - - - copy - - - - - Returns : - the new gtk.IconInfo - - - - - This method is available in PyGTK 2.4 and above. - - - The copy() method returns a copy of the -icon info object. - - - - - gtk.IconInfo.free - - - free - - - - - This method is available in PyGTK 2.4 and above. - - - - This method is deprecated and should not be used since it can - crash your application. - - - The free() method frees the icon info -and its associated information - - - - - gtk.IconInfo.get_base_size - - - get_base_size - - - - - Returns : - the base size, or 0, if no base -size is known for the icon. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_base_size() method returns the -base size for the icon. The base size is a size for the icon that was -specified by the icon theme creator. This may be different than the actual -size of image; an example of this is small emblem icons that can be attached -to a larger icon. These icons will be given the same base size as the larger -icons to which they are attached. - - - - - gtk.IconInfo.get_filename - - - get_filename - - - - - Returns : - the filename for the icon, or - None if the get_builtin_pixbuf() - should be used instead. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_filename() method returns the filename for the icon. If -the gtk.ICON_LOOKUP_USE_BUILTIN flag was passed to the -gtk.IconTheme.lookup_icon() -method, there may be no filename if a builtin icon is returned. In this -case, you should use the get_builtin_pixbuf() -method. - - - - - gtk.IconInfo.get_builtin_pixbuf - - - get_builtin_pixbuf - - - - - Returns : - the built-in image pixbuf, or - None. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_builtin_pixbuf() method returns -the built-in image for this icon, if any. To allow GTK+ -to use built in icon images, you must pass the -gtk.ICON_LOOKUP_USE_BUILTIN to the gtk.IconTheme.lookup_icon() -method. - - - - - gtk.IconInfo.load_icon - - - load_icon - - - - Returns : - the icon rendered into a gtk.gdk.Pixbuf. - This may be a newly created icon or a new reference to an internal - icon, so you must not modify the icon. - - - - - This method is available in PyGTK 2.4 and above. - - - The load_icon() method renders the icon -previously looked up in an icon theme using the gtk.IconTheme.lookup_icon() -method. The icon size will be based on the size passed to the gtk.IconTheme.lookup_icon() -method. Note that the resulting gtk.gdk.Pixbuf may -not be exactly this size. An icon theme may have icons that differ slightly -from their nominal sizes, and in addition GTK+ will avoid -scaling icons that it considers sufficiently close to the requested size to -maintain sharpness. - - This method raise the GError exception if an error occurs during -rendering of the icon. - - - - - gtk.IconInfo.set_raw_coordinates - - - set_raw_coordinates - raw_coordinates - - - - raw_coordinates : - if True, the coordinates of - embedded rectangles and attached points should be returned in - their original (unscaled) form. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_raw_coordinates() method sets -the internal raw_coordinates flag to the value of -raw_coordinates. If -raw_coordinates is True, the -coordinates returned by the get_embedded_rect() -and get_attach_points() -methods will be returned in their original form as specified in the icon -theme, instead of scaled appropriately for the pixbuf returned by the load_icon() -method. - - Raw coordinates are somewhat strange; they are specified to be -with respect to the unscaled pixmap for PNG and -XPM icons, but for SVG icons, they are -in a 1000x1000 coordinate space that is scaled to the final size of the -icon. You can determine if the icon is an SVG icon by -using the get_filename() -method, and seeing if it is not None and ends in '.svg'. - - This method is provided primarily to allow compatibility -wrappers for older API's, and is not expected to be useful for -applications. - - - - - gtk.IconInfo.get_embedded_rect - - - get_embedded_rect - - - - Returns : - a gtk.gdk.Rectangle - or None - - - - - This method is available in PyGTK 2.4 and above. - - - The get_embedded_rect() method returns -a gtk.gdk.Rectangle -containing the coordinates of a rectangle within the icon that can be used -for display of information such as a preview of the contents of a text file. -See the set_raw_coordinates() -method for further information about the coordinate system. - - - - - gtk.IconInfo.get_attach_points - - - get_attach_points - - - - Returns : - a tuple containing a set of 2-tuples for the - attach points - - - - - This method is available in PyGTK 2.4 and above. - - - The get_attach_points() method returns -a tuple containing the attach points for an icon as a set of 2-tuples. An -attach point is a location in the icon that can be used as anchor points for -attaching emblems or overlays to the icon. - - - - - gtk.IconInfo.get_display_name - - - get_display_name - - - - - Returns : - the display name for the icon or None, if -the icon doesn't have a specified display name. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_display_name() method returns the display name for an icon. A display name is a -string to be used in place of the icon name in a user -visible context like a list of icons. - - - - - - diff --git a/docs/reference/pygtk-gtkiconset.xml b/docs/reference/pygtk-gtkiconset.xml deleted file mode 100644 index 69261c70..00000000 --- a/docs/reference/pygtk-gtkiconset.xml +++ /dev/null @@ -1,282 +0,0 @@ - - - - - - gtk.IconSet - contains a set of variants for an icon - - - - Synopsis - - - gtk.IconSet - gobject.GBoxed - - gtk.IconSet - pixbufNone - - - copy - - - render_icon - style - direction - state - size - widget - detail - - - add_source - source - - - get_sizes - - - - - - - - Description - - A gtk.IconSet -contains a set of variants for a single icon. The variants provide icons of -different sizes and for different widget states. The variants can be added -with the add_source() -method. - - - - - Constructor - - - gtk.IconSet - pixbufNone - - - - pixbuf : - a gtk.gdk.Pixbuf - - - Returns : - a new gtk.IconSet - - - - Creates a new gtk.IconSet with -pixbuf as the default fallback source image. If -pixbuf is None there is no default -fallback source image. If you don't add any additional gtk.IconSources -to the icon set, all variants of the icon will be created from -pixbuf, using scaling, pixelation, etc. as required -to adjust the icon size or make the icon look insensitive/prelighted. - - - - - Methods - - - gtk.IconSet.copy - - - copy - - - - Returns : - a new gtk.IconSet -identical to the first. - - - - The copy() method returns a copy of the -icon set. - - - - - gtk.IconSet.render_icon - - - render_icon - style - direction - state - size - widget - detail - - - - style : - a gtk.Style associated -with widget, or -None - - - direction : - the text direction; one of: -gtk.TEXT_DIR_NONE, gtk.TEXT_DIR_LTR, -gtk.TEXT_DIR_RTL - - - state : - the widget state; one of: -gtk.STATE_NORMAL, gtk.STATE_ACTIVE, -gtk.STATE_PRELIGHT, -gtk.STATE_SELECTED, -gtk.STATE_INSENSITIVE - - - size : - the icon size; one of: -gtk.ICON_SIZE_INVALID, -gtk.ICON_SIZE_MENU, -gtk.ICON_SIZE_SMALL_TOOLBAR, -gtk.ICON_SIZE_LARGE_TOOLBAR, -gtk.ICON_SIZE_BUTTON, -gtk.ICON_SIZE_DND, -gtk.ICON_SIZE_DIALOG - - - widget : - the widget that will display the icon, or -None - - - detail : - the detail to pass to the theme engine, or -None - - - Returns : - a gtk.gdk.Pixbuf to be -displayed - - - - The render_icon() method renders an -icon using gtk.Style.render_icon(). -In most cases, gtk.Widget.render_icon() -is better, since it automatically provides most of the arguments from the -current widget settings. This method never returns None; -if the icon can't be rendered (perhaps because an image file fails to load), -a default "missing image" icon will be returned instead. - - - - - gtk.IconSet.add_source - - - add_source - source - - - - source : - a gtk.IconSource - - - - The add_source() method adds the gtk.IconSource -specified by source to the icon set. Icon sets have -a list of gtk.IconSource, -which they use as base icons for rendering icons in different states and -sizes. Icons are scaled, made to look insensitive, etc. in the render_icon() -method, but gtk.IconSet needs -base images to work with. The base images and when to use them are described -by a gtk.IconSource. - - An example of when you'd use this method: a web browser's -"Back to Previous Page" icon might point in a -different direction in Hebrew and in English; it might look different when -insensitive; and it might change size depending on toolbar mode (small -or large icons). So a single icon set would contain all those variants of the -icon, and you might add a separate source for each one. - - You should nearly always add a "default" icon source with all -fields wildcarded, which will be used as a fallback if no more specific -source matches. gtk.IconSet always -prefers more specific icon sources to more generic icon sources. The order -in which you add the sources to the icon set does not matter. - - The gtk.IconSet() -constructor creates a new icon set with a default icon source based on the -given pixbuf. - - - - - gtk.IconSet.get_sizes - - - get_sizes - - - - - Returns : - a tuple containing all the icon sizes supported -by the icon set - - - - The get_sizes() method returns a tuple -containing all the icon sizes this icon set can render. - - - - - - diff --git a/docs/reference/pygtk-gtkiconsource.xml b/docs/reference/pygtk-gtkiconsource.xml deleted file mode 100644 index 9b967cb8..00000000 --- a/docs/reference/pygtk-gtkiconsource.xml +++ /dev/null @@ -1,976 +0,0 @@ - - - - - - gtk.IconSource - a source for icon variants - - - - Synopsis - - - gtk.IconSource - gobject.GBoxed - - gtk.IconSource - - - copy - - - - free - - - - set_filename - filename - - - set_pixbuf - pixbuf - - - get_filename - - - - get_pixbuf - - - - set_direction_wildcarded - setting - - - set_state_wildcarded - setting - - - set_size_wildcarded - setting - - - get_size_wildcarded - - - - get_state_wildcarded - - - - get_direction_wildcarded - - - - set_direction - direction - - - set_state - state - - - set_size - size - - - get_direction - - - - get_state - - - - get_size - - - - set_icon_name - icon_name - - - get_icon_name - - - - - -Functions - - - gtk.icon_size_lookup - icon_size - - gtk.icon_size_lookup_for_settings - settings - icon_size - - gtk.icon_size_register - name - width - height - - gtk.icon_size_register_alias - alias - target - - gtk.icon_size_from_name - name - - gtk.icon_size_get_name - size - - - - - - Description - - A gtk.IconSource -contains a gtk.gdk.Pixbuf (or -an image filename) that serves as the base image for one or more of the -icons in a gtk.IconSet, along -with a specification for which icons in the icon set will be based on that -pixbuf or image file. By default, the icon source has all parameters -wildcarded. That is, the icon source can be used as the base icon for any -desired text direction, widget state, or icon size. - - - - - Constructor - - - gtk.IconSource - - - - Returns : - a new gtk.IconSource - - - - Creates a new gtk.IconSource. -A gtk.IconSource -contains a gtk.gdk.Pixbuf (or -image filename) that serves as the base image for one or more of the icons -in a gtk.IconSet, along -with a specification for which icons in the icon set will be based on that -pixbuf or image file. By default, the icon source has all parameters -wildcarded. That is, the icon source will be used as the base icon for any -desired text direction, widget state, or icon size. - - - - - Methods - - - gtk.IconSource.copy - - - copy - - - - Returns : - a new gtk.IconSource - - - - The copy() method creates a copy of the -icon source. - - - - - gtk.IconSource.free - - - free - - - - This method is deprecated and should not be used. Use of this -method may cause your application to crash. - - - The free() method frees a -dynamically-allocated icon source, along with its filename, size, and pixbuf -fields if those are not None. - - - - - gtk.IconSource.set_filename - - - set_filename - filename - - - - filename : - the image file to use - - - - The set_filename() method sets the name -of the image file (specified by filename) to use as -the base image when creating icon variants for a gtk.IconSet. The -filename must be absolute. - - - - - gtk.IconSource.set_pixbuf - - - set_pixbuf - pixbuf - - - - pixbuf : - the pixbuf to use as a -source - - - - The set_pixbuf() method sets a pixbuf -(specified by pixbuf) to use as a base image when -creating icon variants for a gtk.IconSet. If an -icon source has both a filename and a pixbuf set, the pixbuf will take -priority. - - - - - gtk.IconSource.get_filename - - - get_filename - - - - Returns : - the image filename - - - - The get_filename() method retrieves the -source filename, or None if none is set. - - - - - gtk.IconSource.get_pixbuf - - - get_pixbuf - - - - Returns : - the source pixbuf - - - - The get_pixbuf() method retrieves the -source pixbuf, or None if none is set. - - - - - gtk.IconSource.set_direction_wildcarded - - - set_direction_wildcarded - setting - - - - setting : - if True wildcard the text -direction - - - - The set_direction_wildcarded() method -determines whether the icon source direction is wildcarded according to the -value specified by setting. If -setting is True the text direction -is wildcarded and the icon source can be used as the base image for an icon -in any text direction (gtk.TEXT_DIR_NONE, -gtk.TEXT_DIR_LTR or gtk.TEXT_DIR_RTL). -If the text direction is not wildcarded, then the text direction the icon -source applies to should be set with the set_direction() -method and the icon source will only be used with that text direction. -Non-wildcarded icon sources (exact matches) are preferred over wildcarded -icon sources. An exact match will be used when possible. - - - - - gtk.IconSource.set_state_wildcarded - - - set_state_wildcarded - setting - - - - setting : - if True wildcard the widget -state - - - - The set_state_wildcarded() method -determines whether the icon source state is wildcarded according to the -value of setting. If setting -is True the widget state is wildcarded and the icon -source can be used as the base image for an icon in any widget state -(gtk.STATE_NORMAL, gtk.STATE_ACTIVE, -gtk.STATE_PRELIGHT, gtk.STATE_SELECTED -or gtk.STATE_INSENSITIVE). If the widget state is not -wildcarded, then the widget state the icon source applies to should be set -with the set_state() -method and the icon source will only be used with that specific state. -Non-wildcarded icon sources (exact matches) are preferred over wildcarded -icon sources. An exact match will be used when possible. - - A gtk.IconSet will -normally transform wildcarded icon source images to produce an appropriate -icon for a given state, for example lightening an image on prelight, but -will not modify source images that match exactly. - - - - - gtk.IconSource.set_size_wildcarded - - - set_size_wildcarded - setting - - - - setting : - if True wildcard the widget -state - - - - The set_size_wildcarded() determines -whether the icon source can be used as the basis for an icon of any size -according to the value of setting. If -setting is True the icon size is -wildcarded and the icon source can be used as the base image for an icon of -any size. If the size is not wildcarded, then the size the icon source -applies to should be set with gtk.IconSource.set_size() -and the icon source will only be used with that specific size. -Non-wildcarded icon sources (exact matches) are preferred over wildcarded -icon sources. An exact match will be used when possible. - - gtk.IconSet will -normally scale wildcarded source images to produce an appropriate icon at a -given size, but will not change the size of source images that match -exactly. - - - - - gtk.IconSource.get_size_wildcarded - - - get_size_wildcarded - - - - Returns : - True if this icon source is -a base for any icon size variant - - - - The get_size_wildcarded() method gets -the value set by the set_size_wildcarded() -method. - - - - - gtk.IconSource.get_state_wildcarded - - - get_state_wildcarded - - - - Returns : - True if this icon source is -a base for any widget state variant - - - - The get_state_wildcarded() method gets -the value set by the set_state_wildcarded() -method. - - - - - gtk.IconSource.get_direction_wildcarded - - - get_direction_wildcarded - - - - Returns : - True if this icon source is -a base for any text direction variant - - - - The get_direction_wildcarded() method -gets the value set by the set_direction_wildcarded() -method. - - - - - gtk.IconSource.set_direction - - - set_direction - direction - - - - direction : - the text direction this icon source applies -to - - - - The set_direction() method sets the -text direction according to the value of direction -that the icon source is intended to be used with. The value of direction -must be one of: gtk.TEXT_DIR_NONE, -gtk.TEXT_DIR_LTR or -gtk.TEXT_DIR_RTL. - - Setting the text direction on an icon source makes no difference -if the text direction is wildcarded. Therefore, you should usually call the -set_direction_wildcarded() -method with a setting of False to un-wildcard it in -addition to calling this function. - - - - - gtk.IconSource.set_state - - - set_state - state - - - - state : - the widget state this source applies -to - - - - The set_state() method sets the widget -state specified by state that the icon source is -intended to be used with. The value of state must be -one of: gtk.STATE_NORMAL, -gtk.STATE_ACTIVE, gtk.STATE_PRELIGHT, -gtk.STATE_SELECTED or -gtk.STATE_INSENSITIVE. Setting the widget state on an -icon source makes no difference if the state is wildcarded. Therefore, you -should usually call the set_state_wildcarded() -method with a setting of False to un-wildcard it in -addition to calling this function. - - - - - gtk.IconSource.set_size - - - set_size - size - - - - size : - the icon size this source applies -to - - - - The set_size() method sets the icon -size specified by size that the icon source is -intended to be used with. Setting the icon size for an icon source makes no -difference if the size is wildcarded. Therefore, you should usually call the -gtk.IconSource.set_size_wildcarded() -method with a setting of False to un-wildcard it in -addition to calling this function. - - - - - gtk.IconSource.get_direction - - - get_direction - - - - Returns : - the text direction the icon source -matches - - - - The get_direction() method obtains the -text direction this icon source applies to. The return value is only useful -and meaningful if the text direction is not -wildcarded. - - - - - gtk.IconSource.get_state - - - get_state - - - - Returns : - the widget state the icon source -matches - - - - The get_state() method obtains the -widget state this icon source applies to. The return value is only useful -and meaningful if the widget state is not -wildcarded. - - - - - gtk.IconSource.get_size - - - get_size - - - - Returns : - the icon size this source -matches. - - - - The get_size() method obtains the icon -size this source applies to. The return value is only useful and meaningful -if the icon size is not wildcarded. - - - - - gtk.IconSource.set_icon_name - - - set_icon_name - icon_name - - - - icon_name : - an icon name -to - - - - - This method is available in PyGTK 2.4 and above. - - - The set_icon_name() method uses the -name specified by icon_name to look up an icon in the -current icon theme to use as a base image when creating icon variants for -gtk.IconSet. - - In PyGTK 2.10 and above, icon_name may be -None to unset the icon name. - - - - - gtk.IconSource.get_icon_name - - - get_icon_name - - - - Returns : - the icon name or None if no -name is set. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_icon() method returns the - source icon name, or None if no name is set. - - - - - - - Functions - - - gtk.icon_size_lookup - - - gtk.icon_size_lookup - icon_size - - - - icon_size : - an icon size - - - Returns : - a 2-tuple containing the width and height of -the specified icon_size - - - - The gtk.icon_size_lookup() function returns -a 2-tuple containing the width and height of the icon size specified by -icon_size. The value of -icon_size must be one of: - - - - gtk.ICON_SIZE_MENU - - - gtk.ICON_SIZE_SMALL_TOOLBAR - - - gtk.ICON_SIZE_LARGE_TOOLBAR - - - gtk.ICON_SIZE_BUTTON - - - gtk.ICON_SIZE_DND - - - gtk.ICON_SIZE_DIALOG - - - - or an integer value returned from the gtk.icon_size_register() -function. - - - - - gtk.icon_size_lookup_for_settings - - - gtk.icon_size_lookup_for_settings - settings - icon_size - - - - settings : - a gtk.Settings -object used to determine which user preferences to use. - - - icon_size : - an icon size - - - Returns : - a 2-tuple containing the width and height of -the specified icon_size or None -if icon_size was invalid. - - - - - This function is available in PyGTK 2.4 and above. - - - The gtk.icon_size_lookup_for_settings() -function returns a 2-tuple containing the width and height of the icon size -specified by icon_size of None if -icon_size was not valid. The value of -icon_size must be one of: - - - - gtk.ICON_SIZE_MENU - - - gtk.ICON_SIZE_SMALL_TOOLBAR - - - gtk.ICON_SIZE_LARGE_TOOLBAR - - - gtk.ICON_SIZE_BUTTON - - - gtk.ICON_SIZE_DND - - - gtk.ICON_SIZE_DIALOG - - - - or an integer value returned from the gtk.icon_size_register() -function. - - - - - gtk.icon_size_register - - - gtk.icon_size_register - name - width - height - - - - name : - the name of the icon size - - - width : - the width of the icon size - - - height : - the height of the icon -size - - - Returns : - an integer representing the icon -size - - - - The gtk.icon_size_register() function -registers a new icon size for the specified width and -height with the specified name -and returns the integer used to represent the icon size. - - - - - gtk.icon_size_register_alias - - - gtk.icon_size_register_alias - alias - target - - - - alias : - an alias for -target - - - target : - an integer representing an existing icon -size - - - - The gtk.icon_size_register_alias() function -registers the specified alias as another name for the -icon size specified by target. - - - - - gtk.icon_size_from_name - - - gtk.icon_size_from_name - name - - - - name : - a name of an existing icon -size - - - Returns : - the icon size associated with -name - - - - The gtk.icon_size_from_name() function -returns the integer representing the icon size associated with the specified -name. - - - - - gtk.icon_size_get_name - - - gtk.icon_size_get_name - size - - - - size : - an integer representing an existing icon -size - - - Returns : - the name associated with the icon size -represented by size - - - - The gtk.icon_size_get_name() function -returns the name of the icon size represented by -size. - - - - - - diff --git a/docs/reference/pygtk-gtkicontheme.xml b/docs/reference/pygtk-gtkicontheme.xml deleted file mode 100644 index 50978f00..00000000 --- a/docs/reference/pygtk-gtkicontheme.xml +++ /dev/null @@ -1,892 +0,0 @@ - - - - - gtk.IconTheme - look up icons by name and size (new in PyGTK 2.4) - - - - Synopsis - - - gtk.IconTheme - gobject.GObject - - gtk.IconTheme - - - set_screen - screen - - - set_search_path - path - - - get_search_path - - - append_search_path - path - - - prepend_search_path - path - - - set_custom_theme - theme_name - - - has_icon - icon_name - - - lookup_icon - icon_name - size - flags - - - load_icon - icon_name - size - flags - - - list_icons - contextNone - - - get_example_icon_name - - - - rescan_if_needed - - - - get_icon_sizes - icon_name - - - - -Functions - - - gtk.icon_theme_get_default - - gtk.icon_theme_get_for_screen - screen - - gtk.icon_theme_add_builtin_icon - icon_name - size - pixbuf - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.IconTheme - - - - - - gtk.IconTheme Signal Prototypes - - gobject.GObject Signal Prototypes - - - - "changed" - - callback - icontheme - user_param1 - ... - - - - - - - - - Description - - - This object is available in PyGTK 2.4 and above. - - - gtk.IconTheme -provides a facility for looking up icons by name and size. The main reason -for using a name rather than simply providing a filename is to allow -different icons to be used depending on what icon theme is selected by the -user. The operation of icon themes on Linux and Unix follows the Icon Theme -Specification). There is a default icon theme, named "hicolor" where -applications should install their icons, but more additional application -themes can be installed as operating system vendors and users choose. - - Named icons are similar to the Themeable Stock Images facility -(see gtk.IconFactory, -gtk.IconSet -and gtk.IconSource -for more detail), and the distinction between the two may be a bit -confusing. A few things to keep in mind: - - - - Stock images usually are used in conjunction with Stock Items, such as -gtk.STOCK_OK or gtk.STOCK_OPEN. Named -icons are easier to set up and therefore are more useful for new icons that -an application wants to add, such as application icons or window -icons. - - - Stock images can only be loaded at the symbolic sizes defined -by the standard icon sizes (see the gtk.icon_size_lookup() -function), or by custom sizes defined by the gtk.icon_size_register() -function, while named icons are more flexible and any pixel size can be -specified. - - - Because stock images are closely tied to stock items, and thus -to actions in the user interface, stock images may come in multiple variants -for different widget states or writing directions. - - - - A good rule of thumb is that if there is a stock image for what -you want to use, use it, otherwise use a named icon. It turns out that -internally stock images are generally defined in terms of one or more named -icons. (An example is icons that depend on writing direction; -gtk.STOCK_GO_FORWARD uses the two themed icons -"gtk-stock-go-forward-ltr" and "gtk-stock-go-forward-rtl".) - - In many cases, named themes are used indirectly, via gtk.Image or stock -items, rather than directly, but looking up icons directly is also -simple. The gtk.IconTheme -object acts as a database of all the icons in the current theme. You can -create new gtk.IconTheme -objects, but its much more efficient to use the standard icon theme for the -gtk.gdk.Screen -so that the icon information is shared with other people looking up -icons. In the case where the default screen is being used, looking up an -icon can be as simple as: - - - icon_theme = gtk.icon_theme_get_default() - try: - pixbuf = icon_theme.load_icon("my-icon-name", 48, 0) - except gobject.GError, exc: - print "can't load icon", exc - - - - - - - - Constructor - - - gtk.IconTheme - - - - Returns : - the newly created gtk.IconTheme -object. - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new icon theme object. Icon theme objects are used to -lookup up an icon by name in a particular icon theme. Usually, you'll want -to use the gtk.icon_theme_get_default() -or gtk.icon_theme_get_for_screen() -functions rather than creating a new icon theme object from scratch. - - - - - Methods - - - gtk.IconTheme.set_screen - - - set_screen - screen - - - - screen : - a gtk.gdk.Screen - - - - - This method is available in PyGTK 2.4 and above. - - - The set_screen() method sets the gtk.gdk.Screen for -an icon theme to screen. The screen is used to track -the user's currently configured icon theme, which might be different for -different screens. - - - - - gtk.IconTheme.set_search_path - - - set_search_path - path - - - - path : - a list or tuple of directories that are - searched for icon themes - - - - - This method is available in PyGTK 2.4 and above. - - - The set_search_path() method sets the -search path for the icon theme object to the list of directory names -contained in path. When looking for an icon theme, -GTK+ will search for a subdirectory of one or more of the -directories in path with the same name as the icon -theme. (Themes from multiple of the path elements are combined to allow -themes to be extended by adding icons in the user's home directory.) - - In addition if an icon found isn't found either in the current -icon theme or the default icon theme, and an image file with the right name -is found directly in one of the elements of path, -then that image will be used for the icon name. (This is a legacy feature, -and new icons should be put into the default icon theme, which is called -"hicolor", rather than directly on the icon path.) - - - - - gtk.IconTheme.get_search_path - - - get_search_path - - - - Returns : - a tuple containing the list of directory names - that are searched for icon themes - - - - - This method is available in PyGTK 2.4 and above. - - - The get_search_path() method returns a -tuple containing the current search path. See the set_search_path() -method for more details. - - - - - gtk.IconTheme.append_search_path - - - append_search_path - path - - - - path : - a directory name to append to the icon -path - - - - - This method is available in PyGTK 2.4 and above. - - - The append_search_path() method appends -the directory name specified by path to the search -path. See the set_search_path() -method for more information. - - - - - gtk.IconTheme.prepend_search_path - - - prepend_search_path - path - - - - path : - a directory name to prepend to the icon -path - - - - - This method is available in PyGTK 2.4 and above. - - - The prepend_search_path() method -prepends the directory name specified by path to the -search path. See the set_search_path() -method for more information. - - - - - gtk.IconTheme.set_custom_theme - - - set_custom_theme - theme_name - - - - theme_name : - the name of icon theme to use instead of -the configured theme - - - - - This method is available in PyGTK 2.4 and above. - - - The set_custom_theme() method sets the -theme used by the icon theme object to the theme named by -theme_name usually replacing system configured -theme. This method cannot be called on the icon theme objects returned from -the gtk.icon_theme_get_default() -and gtk.icon_theme_get_default() -functions. - - - - - gtk.IconTheme.has_icon - - - has_icon - icon_name - - - - icon_name : - the name of an icon - - - Returns : - True if the icon theme - includes an icon for - icon_name. - - - - - This method is available in PyGTK 2.4 and above. - - - The has_icon() method checks whether -the icon theme includes an icon for the icon name specified by -icon_name. - - - - - gtk.IconTheme.lookup_icon - - - lookup_icon - icon_name - size - flags - - - - icon_name : - the name of the icon to lookup - - - size : - the desired icon size - - - flags : - the flags modifying the behavior of the icon - lookup - - - Returns : - a gtk.IconInfo - object containing information about the icon, or - None if the icon wasn't found. Free with the - gtk.IconInfo.free() - method - - - - - This method is available in PyGTK 2.4 and above. - - - The lookup_icon() method looks up the -icon specified by icon_name, -size and flags and returns a -gtk.IconInfo -object containing information such as the filename of the icon. The icon can -then be rendered into a pixbuf using the gtk.IconInfo.load_icon() -method. (the load_icon() -method combines these two steps if all you need is the pixbuf.) - - The value of flags must be a combination of: - - - - gtk.ICON_LOOKUP_NO_SVG - - Never return Scalable Vector Graphics (SVG) icons, even - if gdk-pixbuf supports them. Cannot be used together with - gtk.ICON_LOOKUP_FORCE_SVG. - - - - gtk.ICON_LOOKUP_FORCE_SVG - - Return SVG icons, even if gdk-pixbuf doesn't support - them. Cannot be used together with - gtk.ICON_LOOKUP_NO_SVG. - - - - gtk.ICON_LOOKUP_USE_BUILTIN - - When passed to the lookup_icon() - method includes builtin icons as well as files. For a builtin - icon, the gtk.IconInfo.get_filename() - method returns None and you need to call the - get_builtin_pixbuf() - method. - - - - - - - - - - gtk.IconTheme.load_icon - - - load_icon - icon_name - size - flags - - - - icon_name : - the name of the icon to lookup - - - size : - the desired icon size. The resulting icon may - not be exactly this size; see the gtk.IconInfo.load_icon() - method. - - - flags : - the flags modifying the behavior of the icon - lookup - - - Returns : - a gtk.gdk.Pixbuf - containing the rendered icon; this may be a newly created icon or - a new reference to an internal icon, so you must not modify the - icon. - - - - - This method is available in PyGTK 2.4 and above. - - - The load_icon() method looks up the -icon specified by icon_name in an icon theme, scales -it to the size specified by size and renders it into -a gtk.gdk.Pixbuf. flags -is a combination of: gtk.ICON_LOOKUP_FORCE_SVG, -gtk.ICON_LOOKUP_NO_SVG and -gtk.ICON_LOOKUP_USE_BUILTIN (see the lookup_icon() -method for more details). Since this is a convenience function, if more -details about the icon are needed, use the lookup_icon() -method followed by the GtkIconInfo.load_icon() -method. - - This method raise the GError exception if an error occurs during -rendering of the icon. - - - - - gtk.IconTheme.list_icons - - - list_icons - contextNone - - - - context : - a string identifying a particular type of icon, - or None to list all icons. - - - Returns : - a tuple containing the names of all the -icons in the theme. - - - - - This method is available in PyGTK 2.4 and above. - - - The list_icons() method lists the icons -in the current icon theme. Only a subset of the icons can be listed by -providing a string specified by context. The set of -values for the context string is system dependent, but will typically -include such values as 'apps' and 'mimetypes'. - - - - - gtk.IconTheme.get_example_icon_name - - - get_example_icon_name - - - - - Returns : - the name of an example icon or - None. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_example_icon_name() method -returns the name of an icon that is representative of the current theme (for -instance, to use when presenting a list of themes to the user.) - - - - - gtk.IconTheme.rescan_if_needed - - - rescan_if_needed - - - - - Returns : - True if the icon theme has - changed and needed to be reloaded. - - - - - This method is available in PyGTK 2.4 and above. - - - The rescan_if_needed() method checks to -see if the icon theme has changed; if it has, any currently cached -information is discarded and will be reloaded next time the icon theme is -accessed. - - - - - gtk.IconTheme.get_icon_sizes - - - get_icon_sizes - icon_name - - - - icon_name : - the name of an icon - - - Returns : - a tuple containing the sizes that the icon is -available in. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_icon_sizes() method returns a -tuple containing the sizes available for the icon named by -icon_name. A size of -1 means the icon is -scalable. If the icon is not found an empty tuple is returned. - - - - - - - Functions - - - gtk.icon_theme_get_default - - - gtk.icon_theme_get_default - - - - Returns : - A unique gtk.IconTheme - associated with the default gtk.gdk.Screen. This - icon theme is associated with the screen and can be used as long - as the screen is open. - - - - - This function is available in PyGTK 2.4 and above. - - - The gtk.icon_them_get_default() function -returns the icon theme for the default screen. See the gtk.icon_theme_get_for_screen() -function. - - - - - gtk.icon_theme_get_for_screen - - - gtk.icon_theme_get_for_screen - screen - - - - screen : - a gtk.gdk.Screen - object - - - Returns : - A unique gtk.IconTheme - associated with the default gtk.gdk.Screen. This - icon theme is associated with the screen and can be used as long - as the screen is open. - - - - - This function is available in PyGTK 2.4 and above. - - - The gtk.icon_theme_get_for_screen() -function returns the icon theme object associated with the gtk.gdk.Screen -specified by screen. If this function has not -previously been called for the given screen, a new icon theme object will be -created and associated with the screen. Icon theme objects are fairly -expensive to create, so using this function is usually a better choice than -calling the gtk.IconTheme() -constructor and setting the screen yourself; by using this function a single -icon theme object will be shared between users. - - - - - gtk.icon_theme_add_builtin_icon - - - gtk.icon_theme_add_builtin_icon - icon_name - size - pixbuf - - - - icon_name : - the name of the icon to - register - - - size : - the size at which to register the icon - (different images can be registered for the same icon name at - different sizes.) - - - pixbuf : - a gtk.gdk.Pixbuf - that contains the image to use for - icon_name. - - - Returns : - - - - - - This function is available in PyGTK 2.4 and above. - - - The gtk.icon_theme_add_builtin_icon() -function registers a built-in icon for icon theme lookups using -icon_name as the icon name, -size as the icon size and -pixbuf as the icon image. The idea of built-in icons -is to allow an application or library that uses themed icons to function -without requiring specific icon files to be present in the file system. For -instance, the default images for all of GTK+'s stock -icons are registered as built-icons. - - In general, if you use -gtk.icon_theme_add_builtin_icon() you should also -install the icon in the icon theme, so that the icon is generally -available. This function will generally be used with pixbufs loaded via the -gtk.gdk.pixbuf_new_from_inline() -function. - - - - - - - Signals - - - The "changed" gtk.IconTheme Signal - - - callback - icontheme - user_param1 - ... - - - - - icontheme : - the icontheme that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in PyGTK 2.4 and above. - - - The "changed" signal is emitted when the current icon theme is -switched or GTK+ detects that a change has occurred in -the contents of the current icon theme. - - - - - - diff --git a/docs/reference/pygtk-gtkiconview.xml b/docs/reference/pygtk-gtkiconview.xml deleted file mode 100644 index 63e9d8be..00000000 --- a/docs/reference/pygtk-gtkiconview.xml +++ /dev/null @@ -1,2408 +0,0 @@ - - - - - - gtk.IconView - a widget which displays a list of icons in a grid (new in -PyGTK 2.6) - - - - Synopsis - - - gtk.IconView - gtk.Container - gtk.CellLayout - - gtk.IconView - modelNone - - - set_model - modelNone - - - get_model - - - - set_text_column - column - - - get_text_column - - - - set_markup_column - column - - - get_markup_column - - - - set_pixbuf_column - column - - - get_pixbuf_column - - - - get_path_at_pos - x - y - - - get_item_at_pos - x - y - - - set_cursor - path - cellNone - start_editingFalse - - - get_cursor - - - selected_foreach - func - data - - - set_selection_mode - mode - - - get_selection_mode - - - - set_orientation - orientation - - - get_orientation - - - - set_columns - columns - - - get_columns - - - - set_item_width - item_width - - - get_item_width - - - - set_spacing - spacing - - - get_spacing - - - - set_row_spacing - row_spacing - - - get_row_spacing - - - - set_column_spacing - column_spacing - - - get_column_spacing - - - - set_margin - margin - - - get_margin - - - - select_path - path - - - unselect_path - path - - - path_is_selected - path - - - get_selected_items - - - - select_all - - - - unselect_all - - - - item_activated - path - - - scroll_to_path - path - use_align - row_align - col_align - - - get_visible_range - - - enable_model_drag_source - start_button_mask - targets - actons - - - enable_model_drag_dest - targets - actions - - - unset_model_drag_source - - - - unset_model_drag_dest - - - - set_reorderable - reorderable - - - get_reorderable - - - - set_drag_dest_item - path - pos - - - get_drag_dest_item - - - - get_dest_item_at_pos - drag_x - drag_y - - - create_drag_icon - path - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.IconView (implements gtk.CellLayout) - - - - - gtk.IconView Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - -
- - - - - - - - - "column-spacing" - Read-Write - - The space (in pixels) inserted between grid -columns. Allowed values: >= 0. Default value: 6. -Available in GTK+ 2.6 and above. - - - - "columns" - Read-Write - - The number of columns in a row. If it is -1, the number -of columns will be chosen automatically to fill the available width. -Allowed values: >= -1. Default value: -1. -Available in GTK+ 2.6 and above. - - - - "item-width" - Read-Write - - The width used for each item. If it is -1 the width the -largest item is used. Allowed values: >= -1. Default value: -1. -Available in GTK+ 2.6 and above. - - - - "margin" - Read-Write - - The space (in pixels) inserted at the edges of the -icon view. Allowed values: >= 0. Default value: 6. -Available in GTK+ 2.6 and above. - - - - "markup-column" - Read-Write - - The number of the model column containing markup -information to be displayed. If this property and the "text-column" property -are both set to column numbers, this overrides the text column. If both are -set to -1, no text is displayed. Allowed values: >= -1. Default value: -1. -Available in GTK+ 2.6 and above. - - - - "model" - Read-Write - The gtk.TreeModel -for the icon view. Available in GTK+ 2.6 and above. - - - - "orientation" - Read-Write - How the text and icon of each item are positioned -relative to each other. Default value: -gtk.ORIENTATION_VERTICAL. Available in GTK+ 2.6 and -above. - - - - "pixbuf-column" - Read-Write - - The number of the model column containing the pixbufs -that are displayed. Setting this property to -1 turns off the display of -pixbufs. Allowed values: >= -1. Default value: -1. Available in GTK+ 2.6 and -above. - - - - "reorderable" - Read-Write - - If True the icon view is reorderable. -Default value: False. -Available in GTK+ 2.8 and above. - - - - "row-spacing" - Read-Write - - The space (in pixels) inserted between grid rows. -Allowed values: >= 0. Default value: 6. -Available in GTK+ 2.6 and above. - - - - "selection-mode" - Read-Write - - The selection mode of the icon view. If the mode is -gtk.SELECTION_MULTIPLE, rubberband selection is enabled, -for the other modes, only keyboard selection is possible. Default value: -gtk.SELECTION_SINGLE. Available in GTK+ 2.6 and -above. - - - - "spacing" - Read-Write - - The space (in pixels) inserted between cells of an item. -Allowed values: >= 0. Default value: 0. -Available in GTK+ 2.6 and above. - - - - "text-column" - Read-Write - - The number of the model column containing the text that -is displayed. If this property and the "markup-column" property are both set -to -1, no text is displayed. Allowed values: >= -1. Default value: --1. Available in GTK+ 2.6 and above. - - - - - -
- -
- - - gtk.IconView Style Properties - - gtk.Widget Style Properties - -
- - - - - - - - - "selection-box-alpha" - Read - - The opacity of the selection box. Default value: -64. Available in GTK+ 2.6 and above. - - - - "selection-box-color" - Read - - The color of the selection box. Available in GTK+ 2.6 -and above. - - - - - -
- -
- - - gtk.IconView Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - "activate-cursor-item" - - callback - iconview - user_param1 - ... - - - - - "item-activated" - - callback - iconview - path - user_param1 - ... - - - - - "move-cursor" - - callback - iconview - step - number - user_param1 - ... - - - - - "select-all" - - callback - iconview - user_param1 - ... - - - - - "select-cursor-item" - - callback - iconview - user_param1 - ... - - - - - "selection-changed" - - callback - iconview - user_param1 - ... - - - - - "set-scroll-adjustments" - - callback - iconview - hadj - vadj - user_param1 - ... - - - - - "toggle-cursor-item" - - callback - iconview - user_param1 - ... - - - - - "unselect-all" - - callback - iconview - user_param1 - ... - - - - - - - - - Description - - - This widget is available in PyGTK 2.6 and above. - - - The gtk.IconView -widget provides an alternative view of a gtk.ListStore -model. It displays the model as a grid of icons with labels. Like gtk.TreeView, you -can select one or multiple items (depending on the selection mode, see the -set_selection_mode() -method for more information). In addition to selection with the arrow keys, -gtk.IconView -supports rubberband selection, which is controlled by dragging the -pointer. - - - - - Constructor - - - gtk.IconView - modelNone - - - - model : - A gtk.TreeModel, or -None - - - Returns : - a new gtk.IconView -widget. - - - - - This constructor is available in PyGTK 2.6 and above. - - - Creates a new gtk.IconView -widget. If model is specified and not -None it should specify a gtk.TreeModel to -be used as the model. - - - - - Methods - - - gtk.IconView.set_model - - - set_model - modelNone - - - - model : - a gtk.TreeModel -or None - - - - - This method is available in PyGTK 2.6 and above. - - - The set_model() method sets the "model" -property to the gtk.TreeModel -specified by model. If model -is None the old model will be unset. - - - - - gtk.IconView.get_model - - - get_model - - - - Returns : - The gtk.TreeModel -used by the cell view or None. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_model() method returns the -value of the "model" property which contains the gtk.TreeModel -used by the cell view. If no model is being used this method returns -None. - - - - - gtk.IconView.set_text_column - - - set_text_column - column - - - - column : - The index of a column in the -model or -1 to unset the column - - - - - This method is available in PyGTK 2.6 and above. - - - The set_text_column() method sets the -"text-column" property to the value of column which -should be the index of a column in the model containing strings to be used -for text. If column is -1 the text column is -unset. - - - - - gtk.IconView.get_text_column - - - get_text_column - - - - Returns : - The index of a model's column or -1 if -unset. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_text_column() method returns -the value of the "text-column" property which contains the index of the -column in the model that provides strings to be used for text. If the -"text-column" property contains -1 then no column is used for text. - - - - - gtk.IconView.set_markup_column - - - set_markup_column - column - - - - column : - The index of a column in the model or -1. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_markup_column() method sets the -"markup-column" property to the value specified by -column. The "markup-column" property indicates the -index of a column in the model to be used for markup information. If -column is -1 the markup column will be unset. If the -markup column is set, it overrides the text column set by the set_text_column() -method. - - - - - gtk.IconView.get_markup_column - - - get_markup_column - - - - Returns : - the index of the model column containing markup -or -1. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_markup_column method returns -the value of the "markup-column" property which contains the index of the -column in the model that contains the Pango markup for text. if the -"markup-column" property is -1, the markup column is unset. - - - - - gtk.IconView.set_pixbuf_column - - - set_pixbuf_column - column - - - - column : - the index of a model column or --1 - - - - - This method is available in PyGTK 2.6 and above. - - - The set_pixbuf_column() method sets the -"pixbuf-column" property to the value of column. If -column >= 0 the icon view gtk.gdk.Pixbuf -objects will be retrieved from the specified column. If -column is -1 then no pixbufs will be used, - - - - - gtk.IconView.get_pixbuf_column - - - get_pixbuf_column - - - - Returns : - The index of a column in the model or --1 - - - - - This method is available in PyGTK 2.6 and above. - - - The get_pixbuf_column() returns the -value of the "pixbuf-column" property which contains the index of the model -column use to to retrieve gtk.gdk.Pixbuf -objects to display. If the "pixbuf-column" property is -1 no pixbufs will be -retrieved. - - - - - gtk.IconView.get_path_at_pos - - - get_path_at_pos - x - y - - - - x : - the x coordinate - - - y : - the y coordinate - - - Returns : - the path at the specified point or -None. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_path_at_pos() method returns -the model path of the icon located at the coordinates specified by -(x, y). This method returns -None if there is no icon at the specified -location. - - - - - gtk.IconView.get_item_at_pos - - - get_item_at_pos - x - y - - - - x : - the x coordinate - - - y : - the y coordinate - - - Returns : - a 2-tuple comtaining the path and the cell -renderer at the specified point or None if the is no item -at the position. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_item_at_pos() method returns a -2-tuple containing the model path and cell renderer of the icon located at -the coordinates specified by (x, -y). This method returns None if -there is no item at the specified location. - - - - - gtk.IconView.set_cursor - - - set_cursor - path - cellNone - start_editingFalse - - - - path : - a tree path - - - cell : - a gtk.CellRenderer -or None - - - start_editing : - if True the specified cell -should start being edited - - - - - This method is available in PyGTK 2.8 and above. - - - The set_cursor() method sets the -current keyboard focus to be at the location specified by -path, and selects it. This is useful when you want to -focus the user's attention on a particular item. If -cell is not None, then focus is -given to the specified cell. Additionally, if -start_editing is True, then -editing should be started in the specified cell. - - This method is often followed by gtk.Widget.grab_focus() - in order to give keyboard focus to the icon view. Please note that editing - can only happen when the icon view is realized. - - - In PyGTK 2.8 cell and - start_editing must be specified. Also - cell cannot be None. - - - - - - gtk.IconView.get_cursor - - - get_cursor - - - - Returns : - a 2-tuple containing the current cursor path -and cell renderer or None if the cursor isn't -set. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_cursor() method returns a -2-tuple containing the model path and gtk.CellRenderer -at the current cursor location. This method returns None -if the cursor is not set. If no cell renderer has focus then -None will be returned for the cell renderer value. - - - - - gtk.IconView.selected_foreach - - - selected_foreach - func - data - - - - func : - a callback function or -method. - - - data : - User data to pass to -func. - - - - - This method is available in PyGTK 2.6 and above. - - - The selected_foreach() method calls the -callback function or method specified by func for -each selected icon. The signature of func is: - - - def func(iconview, path, user_data): - - - where iconview is the gtk.IconView, -path is the tree path of the icon row and -user_data is data. - - - - - gtk.IconView.set_selection_mode - - - set_selection_mode - mode - - - - mode : - The selection mode. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_selection_mode() method sets -the "selection-mode" property to the value of -mode. mode should be one of -the . - - - - - gtk.IconView.get_selection_mode - - - get_selection_mode - - - - Returns : - the selection mode. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_selection_mode() method returns -the value of the "selection-mode" property which contains one of the . - - - - - gtk.IconView.set_orientation - - - set_orientation - orientation - - - - orientation : - the relative position of the icon and -text. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_orientation() method sets the -"orientation" property to the value of -orientation. orientation -should contain one of the . The "orientation" -property indicates the relative positioning of the icon and text. - - - - - gtk.IconView.get_orientation - - - get_orientation - - - - - - Returns : - the relative position of the icon and -text. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_orientation() method returns -the value of the "orientation" property that indicates the relative position -between the icon and text. See the set_orientation() -method for more information. - - - - - gtk.IconView.set_columns - - - set_columns - columns - - - - columns : - the number of columns in a row. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_columns() method sets the -"columns" property to the value of -columns. columns should -contain the number of columns to be displayed in each row or -1 to fit as -many columns as possible per row. - - - - - gtk.IconView.get_columns - - - get_columns - - - - Returns : - the number of columns per row or --1. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_columns() method returns the -value of the "columns" property that indicates the number of columns per -row. See the set_columns() -method for more information. - - - - - gtk.IconView.set_item_width - - - set_item_width - item_width - - - - item_width : - The space used to display an item or -1 to use -the width of the largest item. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_item_width() method sets the -"item-width" property to the value of -item_width. item_width should -contain the maximum space (in pixels) to use to display an item in the icon -view or -1 to use the width of the largest item. - - - - - gtk.IconView.get_item_width - - - get_item_width - - - - Returns : - the space available for displaying an -item or -1. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_item_width() method returns the -value of the "item-width" property that contains the space available for -displaying an item. See the set_item_width() -method for more information. - - - - - gtk.IconView.set_spacing - - - set_spacing - spacing - - - - spacing : - The space between the cells of an item in the -icon view - - - - - This method is available in PyGTK 2.6 and above. - - - The set_spacing() method sets the -"spacing" property to the value of -spacing. spacing should -contain the space in pixels that is inserted between the cells of an item in -the icon view. - - - - - gtk.IconView.get_spacing - - - get_spacing - - - - Returns : - the space in pixels that is inserted between -cells in the icon view. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_spacing() method returns the -value of the "spacing" property that contains the space in pixels that is -inserted between the cells of an item in the icon view. See the set_spacing() -method for more information. - - - - - gtk.IconView.set_row_spacing - - - set_row_spacing - row_spacing - - - - row_spacing : - the space between rows in the icon -view. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_row_spacing() method sets the -"row-spacing" property to the value of -row_spacing. row_spacing -should contain the space in pixels to be inserted between rows in the icon -view.. - - - - - gtk.IconView.get_row_spacing - - - get_row_spacing - - - - Returns : - the space between rows in the icon -view. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_row_spacing() method returns -the value of the "row-spacing" property that contains the space in pixels -inserted between the rows in the icon view. See the set_row_spacing() -method for more information. - - - - - gtk.IconView.set_column_spacing - - - set_column_spacing - column_spacing - - - - column_spacing : - The space inserted between columns in the icon -view - - - - - This method is available in PyGTK 2.6 and above. - - - The set_column_spacing() method sets -the "column-spacing" property to the value of -column_spacing. column_spacing -should contain the space in pixels to be inserted between columns in the -icon view. - - - - - gtk.IconView.get_column_spacing - - - get_column_spacing - - - - Returns : - the space between columns in the icon -view. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_column_spacing() method returns -the value of the "column-spacing" property that contains the space in pixels -between the columns in the icon view. See the set_column_spacing() -method for more information. - - - - - gtk.IconView.set_margin - - - set_margin - margin - - - - margin : - the space inserted at the edges of the icon -view. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_margin() method sets the -"margin" property to the value of -margin. margin should contain -the space in pixels to be inserted at the edges of the icon view. - - - - - gtk.IconView.get_margin - - - get_margin - - - - Returns : - the space inserted at the edges of the icon -view. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_margin() method returns the -value of the "margin" property that continas the space in pixels inserted at -the edges of the icon view. See the set_margin() -method for more information. - - - - - gtk.IconView.select_path - - - select_path - path - - - - path : - a path indicating the icon to be -selected - - - - - This method is available in PyGTK 2.6 and above. - - - The select_path method selects the icon -with the tree path specified by path. - - - - - gtk.IconView.unselect_path - - - unselect_path - path - - - - path : - a path indicating the icon to be -unselected - - - - - This method is available in PyGTK 2.6 and above. - - - The unselect_path method unselects the -icon with the tree path specified by path. - - - - - gtk.IconView.path_is_selected - - - path_is_selected - path - - - - path : - a path of an icon. - - - Returns : - True if -path is selected. - - - - - This method is available in PyGTK 2.6 and above. - - - The path_is_selected() method returns -True if the icon with the tree path specified by -path is selected. - - - - - gtk.IconView.get_selected_items - - - get_selected_items - - - - Returns : - a list of the paths of the selected -icons. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_selected_items() method returns -a list of the paths of the selected icons. - - - - - gtk.IconView.select_all - - - select_all - - - - This method is available in PyGTK 2.6 and above. - - - The select_all() method selects all the -icons if the selection mode is set to -gtk.SELECTION_MULTIPLE. - - - - - gtk.IconView.unselect_all - - - unselect_all - - - - This method is available in PyGTK 2.6 and above. - - - The unselect_all() method unselects all -the icons. - - - - - gtk.IconView.item_activated - - - item_activated - path - - - - path : - a tree path pointing to an icon -row. - - - - - This method is available in PyGTK 2.6 and above. - - - The item_activated() method activates -the icon pointed to by the path specified by -path. - - - - - gtk.IconView.scroll_to_path - - - scroll_to_path - path - use_align - row_align - col_align - - - - path : - the path of the item to move -to. - - - use_align : - if True use the alignment -arguments - - - row_align : - the vertical alignment of the item specified by -path. - - - col_align : - The horizontal alignment of the item specified -by path. - - - - - This method is available in PyGTK 2.8 and above. - - - The scroll_to_path() method moves the - alignments of the icon view to the position specified by - path. row_align determines - where the row is placed, and col_align determines - where column is placed. Both are expected to be between 0.0 and 1.0. 0.0 - means left/top alignment, 1.0 means right/bottom alignment, 0.5 means - center. - - If use_align is False, - then the alignment arguments are ignored, and the icon view does the - minimum amount of work to scroll the item onto the screen. This means that - the item will be scrolled to the edge closest to its current position. If - the item is currently visible on the screen, nothing is done. - - This method only works if the model is set, and - path is a valid row on the model. If the model - changes before the icon view is realized, the centered path will be - modified to reflect this change. - - - - - gtk.IconView.get_visible_range - - - get_visible_range - - - - - Returns : - a 2-tuple containing the start and end paths of -the visible region or None. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_visible_range() method returns -a 2-tuple containing the start and end paths for the visible region in the -iconview. If no valid paths are available this method returns -None. - - - - - gtk.IconView.enable_model_drag_source - - - enable_model_drag_source - start_button_mask - targets - actions - - - - start_button_mask : - the mask of buttons allowed to start drag - - - targets : - a sequence of 3-tuples containing target -information that the drag will support - - - actions : - the combination of possible for a drag - from the iconview - - - - - This method is available in PyGTK 2.8 and above. - - - The enable_model_drag_source() method - enables the iconview to be used as a drag source for automatic - DND. start_button_mask specifies a combination of - the that can start the - drag. targets is a sequence (tuple or list) of - 3-tuples each containing target information: a string representing the drag - type, target flags (a combination of gtk.TARGET_SAME_APP - and gtk.TARGET_SAME_WIDGET or neither) and an - application assigned integer ID used for identification - purposes. actions is a combination of the supported by the - iconview. - - - - - gtk.IconView.enable_model_drag_dest - - - enable_model_drag_dest - targets - actions - - - - targets : - a sequence of 3-tuples containing target -information that the iconview will support for a drag drop - - - actions : - the combination of possible for a drag - drop onto to the iconview - - - - - This method is available in PyGTK 2.8 and above. - - - The enable_model_drag_dest() method -enables the iconview to be a destination for a drag -drop. targets is a sequence (tuple or list) of -3-tuples each containing target information: a string representing the drag -type, target flags (a combination of gtk.TARGET_SAME_APP -and gtk.TARGET_SAME_WIDGET or neither) and an application -assigned integer ID used for identification -purposes. actions is a combination of the supported by the -iconview. - - - - - gtk.IconView.unset_model_drag_source - - - unset_model_drag_source - - - - - This method is available in PyGTK 2.8 and above. - - - The unset_model_drag_source() method - undoes the effect of the enable_model_drag_source() - method. - - - - - gtk.IconView.unset_model_drag_dest - - - unset_model_drag_dest - - - - - This method is available in PyGTK 2.8 and above. - - - The unset_model_drag_dest() method - undoes the effect of the enable_model_drag_dest() - method. - - - - - gtk.IconView.set_reorderable - - - set_reorderable - reorderable - - - - reorderable : - if True the items are -reorderable. - - - - - This method is available in PyGTK 2.8 and above. - - - The set_reorderable() method sets the -"reorderable" property to the value of -reorderable. If reorderable is -True the user can reorder the model by dragging and -dropping rows. The developer can listen to these changes by connecting to -the model's "row_inserted" and "row_deleted" signals. - - This method does not give you any degree of control over the - order -- any reordering is allowed. If more control is needed, you should - probably handle drag and drop manually. - - - - - gtk.IconView.get_reorderable - - - get_reorderable - - - - - Returns : - True if the iconview list -can be reordered. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_reorderable() method returns -the value of the "reorderable" property. If "reorderable" is -True the user can reorder iconview using -drag-and-drop. - - - - - gtk.IconView.set_drag_dest_item - - - set_drag_dest_item - path - pos - - - - path : - the path of the item to highlight, or -None . - - - pos : - specifies where to drop, relative to the -item - - - - - This method is available in PyGTK 2.8 and above. - - - The set_drag_dest_item() method -highlights for feedback the item specified by -path. pos is one of the that specifies -where the drop is to take place relative to the receiving item. - -In PyGTK 2.10 and above, path may be -None. - - - - - gtk.IconView.get_drag_dest_item - - - get_drag_dest_item - - - - - Returns : - a 2-tuple containing the path of the highlighted -item and one of the specifying the -relative drop location or None. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_drag_dest_item() method returns -a 2-tuple containing the path of the highlighted item and one of the specifying the -drop location relative to the receiving item. If there is no highlighted -item, this method returns None. - - - - - gtk.IconView.get_dest_item_at_pos - - - get_dest_item_at_pos - drag_x - drag_y - - - - drag_x : - the X position - - - drag_y : - the Y position - - - Returns : - a 2-tuple containing the path of the highlighted -item and a relative drop location. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_dest_item_at_pos() method -returns a 2-tuple containing the path of the highlighted item at the -location specified by drag_x and -drag_y and the drop location relative to the -receiving item. If there is no highlighted item, this method returns -None. - - - - - gtk.IconView.create_drag_icon - - - create_drag_icon - path - - - - path : - a path - - - Returns : - a gtk.gdk.Pixmap of the -drag icon. - - - - - This method is available in PyGTK 2.8 and above. - - - The create_drag_icon() method returns a -gtk.gdk.Pixmap -representation of the item at the location specified by -path. The return image can be used for a drag -icon. - - - - - - - Signals - - - The "activate-cursor-item" gtk.IconView Signal - - - callback - iconview - user_param1 - ... - - - - - iconview : - the widget that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal -was handled. - - - - The "activate-cursor-item" signal is emitted when an icon is -selected and the Enter key is pressed. - - - - - The "item-activated" gtk.IconView Signal - - - callback - iconview - path - user_param1 - ... - - - - - iconview : - the widget that received the -signal - - - path : - the path to the activated icon -item. - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "item-activated" signal is emitted when an icon item is -activated by the user double clicking an icon item, pressing the -Enter key when an icon item is selected or via a call to -the item_activated() -method. - - - - - The "move-cursor" gtk.IconView Signal - - - callback - iconview - step - number - user_param1 - ... - - - - - iconview : - the widget that received the -signal - - - step : - the step size to move the cursor - - - number : - the number of steps to move - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal -was handled. - - - - The "move-cursor" signal is emitted when the cursor is moved -using the keyboard keys: Up, Down, -Controlp , -Controln , -Home, End, Page_Up, -Page_Down, Right, Left -with various Shift and Control -combinations. step will be one of the . - - - - - The "select-all" gtk.IconView Signal - - - callback - iconview - user_param1 - ... - - - - - iconview : - the widget that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "select-all" signal is emitted when all icon items are -selected by pressing Controla -. - - - - - The "select-cursor-item" gtk.IconView Signal - - - callback - iconview - user_param1 - ... - - - - - iconview : - the widget that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "select-cursor-item" signal is emitted when the icon item -at the cursor is selected by the user pressing the Space -key. - - - - - The "selection-changed" gtk.IconView Signal - - - callback - iconview - user_param1 - ... - - - - - iconview : - the widget that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "selection-changed" signal is emitted when the selection is -changed either by user action or program method calls. - - - - - The "set-scroll-adjustments" gtk.IconView Signal - - - callback - iconview - hadj - vadj - user_param1 - ... - - - - - iconview : - the widget that received the -signal - - - hadj : - the new horizontal gtk.Adjustment - - - vadj : - the new vertical gtk.Adjustment - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "set-scroll-adjustments" signal is emitted when the new -horizontal and veritcal scroll gtk.Adjustment -objects are set. - - - - - The "toggle-cursor-item" gtk.IconView Signal - - - callback - iconview - user_param1 - ... - - - - - iconview : - the widget that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "toggle-cursor-item" signal is emitted when the user presses -ControlSpace . - - - - - The "unselect-all" gtk.IconView Signal - - - callback - iconview - user_param1 - ... - - - - - iconview : - the widget that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "unselect-all" signal is emitted when the user presses -ControlShifta -. - - - - - -
diff --git a/docs/reference/pygtk-gtkimage.xml b/docs/reference/pygtk-gtkimage.xml deleted file mode 100644 index bbf2f5b0..00000000 --- a/docs/reference/pygtk-gtkimage.xml +++ /dev/null @@ -1,1163 +0,0 @@ - - - - - - gtk.Image - A widget displaying an image - - - - - Synopsis - - - gtk.Image - gtk.Misc - - gtk.Image - - - set_from_pixmap - pixmap - mask - - - set_from_image - gdk_image - mask - - - set_from_file - filename - - - set_from_pixbuf - pixbuf - - - set_from_stock - stock_id - size - - - set_from_icon_set - icon_set - size - - - set_from_animation - animation - - - get_storage_type - - - get_pixmap - - - get_image - - - get_pixbuf - - - get_stock - - - get_icon_set - - - get_animation - - - - get_icon_name - - - - set_from_icon_name - icon_name - size - - - set_pixel_size - pixel_size - - - get_pixel_size - - - - clear - - - - - -Functions - - - gtk.image_new_from_stock - stock_id - size - - gtk.image_new_from_icon_set - icon_set - size - - gtk.image_new_from_animation - animation - - gtk.image_new_from_icon_name - icon_name - size - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Misc - +-- gtk.Image - - - - - - gtk.Image Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Misc Properties - -
- - - - - - - - - "file" - Write - - A filename containing the image data. Default value: -None - - - - "icon-name" - Read-Write - - The name of the icon in the icon theme. If the icon -theme is changed, the image will be updated automatically. Default value: -None. Available in GTK 2.6 and above. - - - - "icon-set" - Read-Write - the gtk.IconSet to -display - - - - "icon-size" - Read-Write - - the size to use for a stock icon, named icon or icon -set. Allowed values: >= 0. Default value: 4 - - - - "image" - Read-Write - a gtk.gdk.Image to -display - - - - "mask" - Read-Write - a bitmap gtk.gdk.Pixmap to -use with a gtk.gdk.Image or a -gtk.gdk.Pixmap - - - - "pixbuf" - Read-Write - the gtk.gdk.Pixbuf -to display - - - - "pixbuf-animation" - Read-Write - the gtk.gdk.PixbufAnimation -to display - - - - "pixel-size" - Read-Write - - a fixed size overriding the "icon-size" property for -images of type gtk.IMAGE_ICON_NAME. Allowed values: >= --1. Default value: -1. Available in GTK+ 2.6 and above. - - - - "pixmap" - Read-Write - a gtk.gdk.Pixmap to -display - - - - "stock" - Read-Write - the stock ID for a stock image to display. Default -value: None - - - - "storage-type" - Read - - the type of the image data; one of the : -gtk.IMAGE_EMPTY, gtk.IMAGE_PIXMAP, -gtk.IMAGE_IMAGE, gtk.IMAGE_PIXBUF, -gtk.IMAGE_STOCK, gtk.IMAGE_ICON_SET or -gtk.IMAGE_ANIMATION - - - - - -
- -
- - - gtk.Image Style Properties - - gtk.Widget Style Properties - - - - - gtk.Image Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - - - - Description - - The gtk.Image widget -displays an image. Various kinds of objects can be displayed as an image; -usually, you would load a gtk.gdk.Pixbuf -("pixel buffer") from a file, and then display it. The convenience method -set_from_file() -will read the file and automatically create a pixbuf that is added to the -gtk.Image -widget. If the file isn't loaded successfully, the image will contain a -"broken image" icon similar to that used in many web browsers. If you want -to handle errors in loading the file yourself, for example by displaying an -error message, then load the image with gtk.gdk.pixbuf_new_from_file(), -then add it to the gtk.Image with the -set_from_pixbuf() -method. The image file may contain an animation; if so, the gtk.Image will -display an animation (gtk.gdk.PixbufAnimation) -instead of a static image. - - gtk.Image is a -subclass of gtk.Misc, which -implies that you can align it (center, left, right) and add padding to it, -using the gtk.Misc methods. -gtk.Image is a -"no window" widget (has no gtk.gdk.Window of -its own), so by default does not receive events. If you want to receive -events on the image, such as button clicks, place the image inside a gtk.EventBox, then -connect to the event signals on the event box. - - When handling events on the event box, keep in mind that -coordinates in the image may be different from event box coordinates due to -the alignment and padding settings on the image (see gtk.Misc). The -simplest way to solve this is to set the alignment to 0.0 (left/top), and -set the padding to zero. Then the origin of the image will be the same as -the origin of the event box. - - Sometimes an application will want to avoid depending on external -data files, such as image files. GTK+ comes with a program to avoid this, -called gdk-pixbuf-csource. This program allows you to -convert an image into a C variable declaration, which can then be loaded -into a gtk.gdk.Pixbuf using -the gtk.gdk.pixbuf_new_from_inline() -function. This can also be used in PyGTK by modifying the -output using an editor or the sed command as -follows: - - - gdk-pixbuf-csource imagefile | \ - sed -n -e 's/{/[/' -e 's/};/]/' -e '/".*"/p' >outfile - - - You can edit outfile into a Python file where -it will be evaluated to a list containing a string. The string can be used -directly with the gtk.gdk.pixbuf_new_from_inline() -function to create a pixbuf that can be used in a gtk.Image. - - - - - Constructor - - - gtk.Image - - - - Returns : - a newly created gtk.Image -widget. - - - - Creates a new empty gtk.Image -widget. - - - - - Methods - - - gtk.Image.set_from_pixmap - - - set_from_pixmap - pixmap - mask - - - - pixmap : - a gtk.gdk.Pixmap - - - mask : - a bitmap gtk.gdk.Pixmap or -None - - - - The set_from_pixmap() method sets the -image data from pixmap using -mask. - - - - - gtk.Image.set_from_image - - - set_from_image - gdk_image - mask - - - - gdk_image : - a gtk.gdk.Image or -None - - - mask : - a bitmap gtk.gdk.Pixmap or -None - - - - The set_from_image() method sets the -image data from image using -mask. A gtk.gdk.Image is a -client-side image buffer in the pixel format of the current display. If -image is None the current image -data will be removed. - - - - - gtk.Image.set_from_file - - - set_from_file - filename - - - - filename : - a filename or -None - - - - The set_from_file() method sets the -image data from the contents of the file named -filename. If the file isn't found or can't be loaded, -the resulting gtk.Image will -display a "broken image" icon. This function never returns None, it always -returns a valid gtk.Image widget. If -the file contains an animation, the image will contain an animation. If -filename is None the current image -data will be removed. - - If you need to detect failures to load the file, use gtk.gdk.pixbuf_new_from_file() -to load the file yourself, then create the gtk.Image from the -pixbuf. (Or for animations, use the gtk.gdk.PixbufAnimation() -constructor. - - - - - gtk.Image.set_from_pixbuf - - - set_from_pixbuf - pixbuf - - - - pixbuf : - a gtk.gdk.Pixbuf or -None - - - - The set_from_pixbuf() method sets the -image data using pixbuf. Note that this function just -creates an gtk.Image from -pixbuf. The gtk.Image created -will not react to state changes. Should you want that, you should use the -set_from_icon_set() -method If pixbuf is None the -current image data will be removed. - - - - - gtk.Image.set_from_stock - - - set_from_stock - stock_id - size - - - - stock_id : - a stock icon name - - - size : - a stock icon size - - - - The set_from_stock() method sets the -image data from the stock item identified by -stock_id. Sample stock icon names are -gtk.STOCK_OPEN and gtk.STOCK_OK. -Stock icon sizes are gtk.ICON_SIZE_MENU, -gtk.ICON_SIZE_SMALL_TOOLBAR, -gtk.ICON_SIZE_LARGE_TOOLBAR, -gtk.ICON_SIZE_BUTTON, -gtk.ICON_SIZE_DND and -gtk.ICON_SIZE_DIALOG. If the stock icon name isn't known, -a "broken image" icon will be displayed instead. You can register your own -stock icon names, see the gtk.IconFactory.add_default() -and gtk.IconFactory.add() -methods. - - The stock icons are described in the Stock Items reference. - - - - - gtk.Image.set_from_icon_set - - - set_from_icon_set - icon_set - size - - - - icon_set : - a gtk.IconSet - - - size : - a stock icon size - - - - The set_from_icon_set() method sets the -image data from icon_set with the size specified by -size. Stock icon sizes are -gtk.ICON_SIZE_MENU, -gtk.ICON_SIZE_SMALL_TOOLBAR, -gtk.ICON_SIZE_LARGE_TOOLBAR, -gtk.ICON_SIZE_BUTTON, -gtk.ICON_SIZE_DND and -gtk.ICON_SIZE_DIALOG. - - - - - gtk.Image.set_from_animation - - - set_from_animation - animation - - - - animation : - the gtk.gdk.PixbufAnimation - - - - The set_from_animation() method sets -the image data from animation. - - - - - gtk.Image.get_storage_type - - - get_storage_type - - - - Returns : - the type of the image representation being -used - - - - The get_storage_type() method gets the -type of representation being used by the gtk.Image to store -image data. If the gtk.Image has no -image data, the return value will be gtk.IMAGE_EMPTY. The -image type is one of: gtk.IMAGE_EMPTY, -gtk.IMAGE_PIXMAP, gtk.IMAGE_IMAGE, -gtk.IMAGE_PIXBUF, gtk.IMAGE_STOCK, -gtk.IMAGE_ICON_SET or -gtk.IMAGE_ANIMATION. - - - - - gtk.Image.get_pixmap - - - get_pixmap - - - - - Returns : - a tuple containing the pixmap (or -None) and the mask (or -None) - - - - The get_pixmap() method returns a tuple -containing the pixmap and mask being displayed by the gtk.Image. Either or -both the pixmap and mask may be None. If the storage type -of the image is not either gtk.IMAGE_EMPTY or -gtk.IMAGE_PIXMAP the ValueError exception will be -raised. - - - - - gtk.Image.get_image - - - get_image - - - - - Returns : - a tuple containing a gtk.gdk.Image and a -mask bitmap - - - - The get_image() method returns a tuple -containing the gtk.gdk.Image and -mask being displayed by the gtk.Image. One or -both of the gtk.gdk.Image and -mask may be None. If the storage type of the image is not -either of gtk.IMAGE_EMPTY or -gtk.IMAGE_IMAGE the ValueError exception will be -raised. - - - - - gtk.Image.get_pixbuf - - - get_pixbuf - - - - Returns : - the displayed pixbuf, or -None if the image is empty - - - - The get_pixbuf() method gets the gtk.gdk.Pixbuf being -displayed by the gtk.Image. The return -value may be None if no image data is set. If the storage type of the image -is not either gtk.IMAGE_EMPTY or -gtk.IMAGE_PIXBUF the ValueError exception will be -raised. - - - - - gtk.Image.get_stock - - - get_stock - - - - - Returns : - a tuple containing the stock icon name and the -stock icon size of the image data - - - - The get_stock() method returns a tuple -containing the stock icon identifier (may be None) and -size being displayed by the gtk.Image. The size -will be one of: gtk.ICON_SIZE_MENU, -gtk.ICON_SIZE_SMALL_TOOLBAR, -gtk.ICON_SIZE_LARGE_TOOLBAR, -gtk.ICON_SIZE_BUTTON, -gtk.ICON_SIZE_DND or -gtk.ICON_SIZE_DIALOG. If the storage type of the image is -not either gtk.IMAGE_EMPTY or -gtk.IMAGE_STOCK the ValueError exception will be -raised. - - - - - gtk.Image.get_icon_set - - - get_icon_set - - - - - Returns : - a tuple containing a gtk.IconSet and a -stock icon size - - - - The get_icon_set() method returns a -tuple containing the icon set (may be None) and size -being displayed by the gtk.Image. The size -will be one of: gtk.ICON_SIZE_MENU, -gtk.ICON_SIZE_SMALL_TOOLBAR, -gtk.ICON_SIZE_LARGE_TOOLBAR, -gtk.ICON_SIZE_BUTTON, -gtk.ICON_SIZE_DND or -gtk.ICON_SIZE_DIALOG. If the storage type of the image is -not either gtk.IMAGE_EMPTY or -gtk.IMAGE_ICON_SET the ValueError exception will be -raised. - - - - - gtk.Image.get_animation - - - get_animation - - - - Returns : - the displayed animation, or -None if the image is empty - - - - The get_animation() method gets the -gtk.gdk.PixbufAnimation -(may be None if there is no image data) being displayed by the gtk.Image. If the -storage type of the image is not either gtk.IMAGE_EMPTY -or gtk.IMAGE_ANIMATION the ValueError exception will be -raised. - - - - - gtk.Image.get_icon_name - - - get_icon_name - - - - Returns : - a 2-tuple containing the name and size of the -displayed icon. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_icon_name() method returns a -2-tuple containing the values of the "icon-name" and "icon-size" properties -respectively if the "icon-name" property is not None. If -the "icon-name" property is None the 2-tuple returned -will be: - - - (None, <enum GTK_ICON_SIZE_INVALID of type GtkIconSize>) - - - - - - gtk.Image.set_from_icon_name - - - set_from_icon_name - icon_name - size - - - - icon_name : - an icon name - - - size : - a stock icon size - - - - - This method is available in PyGTK 2.6 and above. - - - The set_from_icon_name() method sets -the "icon-name" and "icon-size" properties to the values of -icon_name and size -respectively. icon_name should be the name of an icon -in the current icon theme. If icon_name isn't known, -a "broken image" icon will be displayed instead. If the current icon theme -is changed, the icon will be updated appropriately. - - - - - gtk.Image.set_pixel_size - - - set_pixel_size - pixel_size - - - - pixel_size : - the new pixel size to be used for named -icons - - - - - This method is available in PyGTK 2.6 and above. - - - The set_pixel_size() method sets the -"pixel-size" property to the value specified by -pixel_size. If the pixel size is set to a value != -1 -the "pixel-size" property is used instead of the icon size set by the set_from_icon_name() -method. - - - - - gtk.Image.get_pixel_size - - - get_pixel_size - - - - Returns : - the pixel size used for named -icons. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_pixel_size() method returns the -value of the "pixel-size" property which specifies the pixel size to be used -for named icons. - - - - - gtk.Image.clear - - - clear - - - - This method is available in PyGTK 2.8 and above. - - - The clear() method removes the current -image, if any, and resets the "storage-type", "mask" and "icon-size" -properties. One of the "file", "icon-name", "icon-set", "image", "pixbuf", -"pixbuf-animation", "pixmap" or "stock" will be reset if there was an -existing image. - - - - - - - Functions - - - gtk.image_new_from_stock - - - gtk.image_new_from_stock - stock_id - size - - - - stock_id : - a stock icon name - - - size : - an integer representing an icon -size - - - Returns : - a new gtk.Image - displaying the stock icon - - - - The gtk.image_new_from_stock() function -returns a new gtk.Image displaying -the stock icon specified by stock_id with the -specified size. Sample stock icon names are -gtk.STOCK_OPEN, gtk.STOCK_OK - see the -set_from_stock() -method for detailed information on the PyGTK stock icons. -. Sample stock sizes are gtk.ICON_SIZE_MENU, -gtk.ICON_SIZE_SMALL_TOOLBAR - see the gtk.icon_size_lookup() function for more detail. If the stock icon name isn't -known, a "broken image" icon will be displayed instead. You can register -your own stock icon names, see the gtk.IconFactory.add_default() -and gtk.IconFactory.add() -methods. - - - - - gtk.image_new_from_icon_set - - - gtk.image_new_from_icon_set - icon_set - size - - - - icon_set : - a gtk.IconSet -object - - - size : - an integer representing an icon -size - - - Returns : - a new gtk.Image -object - - - - The gtk.image_new_from_icon_set() function -returns a new gtk.Image created -from the gtk.IconSet -specified by icon_set with the specified -size. Sample stock sizes are -gtk.ICON_SIZE_MENU, -gtk.ICON_SIZE_SMALL_TOOLBAR - see the gtk.icon_size_lookup() -function for more detail. Instead of using this function, usually it's -better to create a gtk.IconFactory, -put your icon sets in the icon factory, add the icon factory to the list of -default factories with the add_default() -method, and then use the gtk.image_new_from_stock() -function. This will allow themes to override the icon you ship with your -application. - - - - - gtk.image_new_from_animation - - - gtk.image_new_from_animation - animation - - - - animation : - a gtk.gdk.PixbufAnimation -object - - - Returns : - a new gtk.Image -object - - - - The gtk.image_new_from_animation() function -returns a new gtk.Image object -containing the gtk.gdk.PixbufAnimation -specified by animation. - - - - - gtk.image_new_from_icon_name - - - gtk.image_new_from_icon_name - icon_name - size - - - - icon_name : - an icon name - - - size : - a stock icon size - - - Returns : - a new gtk.Image -widget. - - - - - This function is available in PyGTK 2.6 and above. - - - The gtk.image_new_from_icon_name() function -returns a new gtk.Image object -displaying the named theme icon specified by -icon_name with the icon size specified by -size. If the icon name isn't known, a "broken image" -icon will be displayed instead. If the current icon theme is changed, the -icon will be updated appropriately. The "icon-name" and "icon-size" -properties are also set by this function. - - - - - -
diff --git a/docs/reference/pygtk-gtkimagemenuitem.xml b/docs/reference/pygtk-gtkimagemenuitem.xml deleted file mode 100644 index a82ea5e8..00000000 --- a/docs/reference/pygtk-gtkimagemenuitem.xml +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - gtk.ImageMenuItem - a menuitem that displays an image with an accel -label - - - - Synopsis - - - gtk.ImageMenuItem - gtk.MenuItem - - gtk.ImageMenuItem - stock_idNone - accel_groupNone - - - set_image - image - - - get_image - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Item - +-- gtk.MenuItem - +-- gtk.ImageMenuItem - - - - - - gtk.ImageMenuItem Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - -
- - - - - - - - - "image" - Read-Write - the child widget that is next to the text in the menu -item - - - - - -
- -
- - - gtk.ImageMenuItem Style Properties - - gtk.Widget Style Properties - gtk.MenuItem Style Properties - - - - - gtk.ImageMenuItem Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Item Signal Prototypes - gtk.MenuItem Signal Prototypes - - - - Description - - The gtk.ImageMenuItem -widget is a subclass of gtk.MenuItem that -contains an image widget and a gtk.AccelLabel -though a gtk.ImageMenuItem -can be created that has no image and an empty label. - - - - - Constructor - - - gtk.ImageMenuItem - stock_idNone - accel_groupNone - - - - stock_id : - the stock icon ID or None if -no image is needed - - - accel_group : - the accel group to add the accel label mnemonic -to - - - Returns : - a new gtk.ImageMenuItem -widget - - - - Creates a new gtk.ImageMenuItem -with a stock label and image specified by stock_id. -If stock_id is not a stock item then the image will -be the "broken image" and the label text will be the string in -stock_id. The label text will be parsed for -underscore characters to indicate the mnemonic character for the -accelerator. - - If stock_id specifies a stock item and -accel_group specifies a gtk.AccelGroup -the accelerator is added to accel_group. - - - - - Methods - - - gtk.ImageMenuItem.set_image - - - set_image - image - - - - image : - a widget to set as the image for the menu -item. - - - - The set_image() method sets the image -of the image menu item to the widget specified in -image. - - - - - gtk.ImageMenuItem.get_image - - - get_image - - - - Returns : - the image in the image menu -item - - - - The get_image() method gets the widget -that is currently set as the image of image menu item. See set_image(). - - - - - -
diff --git a/docs/reference/pygtk-gtkimcontext.xml b/docs/reference/pygtk-gtkimcontext.xml deleted file mode 100644 index be20a3cb..00000000 --- a/docs/reference/pygtk-gtkimcontext.xml +++ /dev/null @@ -1,771 +0,0 @@ - - - - - gtk.IMContext - 3 - PyGTK Docs - - - - gtk.IMContext - an abstract base class defining a generic input method -interface - - - - Synopsis - - - gtk.IMContext - gtk.Object - - set_client_window - window - - - get_preedit_string - - - - filter_keypress - key - - - focus_in - - - focus_out - - - reset - - - set_cursor_location - area - - - set_use_preedit - use_preedit - - - set_surrounding - text - len - cursor_index - - - get_surrounding - - - - delete_surrounding - offset - n_chars - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.IMContext - - - - - - gtk.IMContext Signal Prototypes - - - - "commit" - - callback - imcontext - - string - - user_param1 - - ... - - - - - - "delete-surrounding" - - callback - imcontext - - offset - - n_chars - - user_param1 - - ... - - - - - - "preedit-changed" - - callback - imcontext - - user_param1 - - ... - - - - - - "preedit-end" - - callback - imcontext - - user_param1 - - ... - - - - - - "preedit-start" - - callback - imcontext - - user_param1 - - ... - - - - - - "retrieve-surrounding" - - callback - imcontext - - user_param1 - - ... - - - - - - - - - - Description - - The gtk.IMContext is -an abstract base class used to provide objects to manage the context for -input methods used to support text input in various natural languages. The -character input for some languages (e.g. Chinese, Japanese and Korean) -cannot be easily input using standard keyboards so multiple keystrokes are -used to input a single character. Input methods are used to help this -process by providing feedback of the characters input and managing the -context and valid combinations. Thegtk.IMContext -subclasses manage the required context information for applications and -widgets such as the gtk.Entry and gtk.TextView -widgets. - - The gtk.IMContext -manages the context of the text surrounding the cursor and the preedit text -that provides feedback about the in-process multiple character -composition. - - - - - Methods - - - gtk.IMContext.set_client_window - - - set_client_window - window - - - - window : - the client window. This may be -None to indicate that the previous client window no -longer exists. - - - - The set_client_window() method set the -client window for the input context; this is the gtk.gdk.Window in -which the input appears. This window is used in order to correctly position -status windows, and may also be used for purposes internal to the input -method. - - - - - gtk.IMContext.get_preedit_string - - - get_preedit_string - - - - - Returns : - a tuple containing the preedit string, the -attribute list and the position of cursor (in bytes) within the preedit -string. - - - - The get_preedit_string() method returns -a tuple containing: the current preedit string for the input context, a list -of attributes to apply to the string and the cursor position within the -string. This string should be displayed inserted at the insertion -point. - - - - - gtk.IMContext.filter_keypress - - - filter_keypress - event - - - - key : - the key event - - - Returns : - True if the input method -handled the keystroke. - - - - The filter_keypress() method allows an -input method to internally handle a key press event. If this function -returns True, then no further processing should be done -for this keystroke. - - - - - gtk.IMContext.focus_in - - - focus_in - - - The focus_in() method notifies the -input method that the widget to which this input context corresponds has -gained focus. The input method may, for example, change the displayed -feedback to reflect this change. - - - - - gtk.IMContext.focus_out - - - focus_out - - - The focus_out() method notifies the -input method that the widget to which this input context corresponds has -lost focus. The input method may, for example, change the displayed feedback -or reset the context state to reflect this change. - - - - - gtk.IMContext.reset - - - reset - - - The reset() method notifies the input -method that a significant change in context (such as a change in cursor -position) has been made. This will typically cause the input method to clear -the preedit state. - - - - - gtk.IMContext.set_cursor_location - - - set_cursor_location - area - - - - area : - new location - - - - The set_cursor_location() method -notifies the input method that a change in cursor position has been -made. - - - - - gtk.IMContext.set_use_preedit - - - set_use_preedit - use_preedit - - - - use_preedit : - if True the IM context -should use the preedit string. - - - - The set_use_preedit() method sets the -use preedit setting to the value of use_preedit. If -use_preedit is True (the default) -the IM context should use the preedit string to display feedback. If -use_preedit is False the IM -context may use some other method to display feedback, such as displaying it -in a child of the root window. - - - - - gtk.IMContext.set_surrounding - - - set_surrounding - text - len - cursor_index - - - - text : - the text surrounding the insertion point, as -UTF-8. the preedit string should not be included within -it. - - - len : - the length of text, or --1 to calculate the length of -text. - - - cursor_index : - the byte index of the insertion cursor within -text. - - - - The set_surrounding() method sets -surrounding context around the insertion point and preedit string. This -function is expected to be called in response to the "retrieve_surrounding" -signal, and will likely have no effect if called at other times. - - - - - gtk.IMContext.get_surrounding - - - get_surrounding - - - - - Returns : - a tuple containing the UTF-8 encoded string of -text holding context around the insertion point and the byte index of the -insertion cursor within the string, or None if no surrounding context was -retrieved. - - - - The get_surrounding() method returns a -tuple containing the text surrounding the cursor and the byte index of the -cursor within the text. Input methods typically want context in order to -constrain input text based on existing text; this is important for languages -such as Thai where only some sequences of characters are allowed. - - This function is implemented by emitting the -"retrieve_surrounding" signal on the input method; in response to this -signal, a widget should provide as much context as is available, up to an -entire paragraph, by calling set_surrounding(). -Note that there is no obligation for a widget to respond to the -"retrieve_surrounding" signal, so input methods must be prepared to function -without context. - - - - - gtk.IMContext.delete_surrounding - - - delete_surrounding - offset - n_chars - - - - offset : - the offset from cursor position in chars; a -negative value means start before the cursor. - - - n_chars : - the number of characters to -delete. - - - Returns : - True if the signal was -handled. - - - - The delete_surrounding() method asks the widget that the input -context is attached to to delete characters around the cursor position by -emitting the "delete_surrounding" signal. Note that -offset and n_chars are in -characters not in bytes, which differs from the usage other places in the -gtk.IMContext -class. - - In order to use this function, you should first call get_surrounding() -to get the current context, and call this function immediately afterward to -make sure that you know what you are deleting. You should also account for -the fact that even if the signal was handled, the input context might not -have deleted all the characters that were requested to be deleted. - - This function is used by an input method that wants to make -substitutions in the existing text in response to new input. It is not useful -for applications. - - - - - - - Signals - - - The "commit" gtk.IMContext Signal - - - callback - imcontext - string - user_param1 - ... - - - - - imcontext : - the imcontext that received the -signal - - - string : - the text to be committed - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "commit" signal is emitted when the text is ready to be -displayed. - - - - - The "delete-surrounding" gtk.IMContext Signal - - - callback - imcontext - user_param1 - ... - - - - - imcontext : - the imcontext that received the -signal - - - offset : - the offset from the cursor position of the text -to be deleted - - - n_chars : - the number of characters to be -deleted - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was -handled. - - - - The "delete-surrounding" signal is emitted when the input method -needs to delete the context text. - - - - - The "preedit-changed" gtk.IMContext Signal - - - callback - imcontext - user_param1 - ... - - - - - imcontext : - the imcontext that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "preedit-changed" signal is emitted when the preedit text -has changed. - - - - - The "preedit-end" gtk.IMContext Signal - - - callback - imcontext - user_param1 - ... - - - - - imcontext : - the imcontext that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "preedit-end" signal is emitted when preediting is -completed. - - - - - The "preedit-start" gtk.IMContext Signal - - - callback - imcontext - user_param1 - ... - - - - - imcontext : - the imcontext that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "preedit-start" signal is emitted when preediting is -started. - - - - - The "retrieve-surrounding" gtk.IMContext Signal - - - callback - imcontext - user_param1 - ... - - - - - imcontext : - the imcontext that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was -handled. - - - - The "retrieve-surrounding" signal is emitted when the input -method requires the context surrounding the cursor. The callback should set -the input method surrounding context by calling the set_surrounding() -method. The method returns True if the signal was handled -by the callback. - - - - - - diff --git a/docs/reference/pygtk-gtkimcontextsimple.xml b/docs/reference/pygtk-gtkimcontextsimple.xml deleted file mode 100644 index b39671b6..00000000 --- a/docs/reference/pygtk-gtkimcontextsimple.xml +++ /dev/null @@ -1,133 +0,0 @@ - - - - - - gtk.IMContextSimple - an input method context object that supports "simple" input -methods - - - - Synopsis - - - gtk.IMContextSimple - gtk.IMContext - - gtk.IMContextSimple - - - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.IMContext - +-- gtk.IMContextSimple - - - - - - gtk.IMContextSimple Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.IMContext Signal Prototypes - - - - Description - - The gtk.IMContextSimple -class is a subclass of gtk.IMContext -that provides context support for "simple" input methods. gtk.IMContextSimple -does direct keysym to unicode translation and table-driven -composition. - - - - - Constructor - - - gtk.IMContextSimple - - - - Returns : - a new gtk.IMContextSimple. - - - - Creates a new gtk.IMContextSimple -object. - - - - - Methods - - - - - - diff --git a/docs/reference/pygtk-gtkimmulticontext.xml b/docs/reference/pygtk-gtkimmulticontext.xml deleted file mode 100644 index 35a1b612..00000000 --- a/docs/reference/pygtk-gtkimmulticontext.xml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - gtk.IMMulticontext - an input method context object that manages the use of -multiple input method contexts for a widget - - - - Synopsis - - - gtk.IMMulticontext - gtk.IMContext - - gtk.IMMulticontext - - - append_menuitems - menushell - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.IMContext - +-- gtk.IMMulticontext - - - - - - gtk.IMMulticontext Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.IMContext Signal Prototypes - - - - Description - - The gtk.IMMulticontext -class is a subclass of gtk.IMContext -that manages the use of multiple input method contexts for a widget -including the ability to switch between contexts on the fly. A gtk.IMMulticontext -object will proxy the method calls and signals to and from the object -implementing the input method. - - - - - Constructor - - - gtk.IMMulticontext - - - - Returns : - a new gtk.IMMulticontext -object. - - - - Creates a new gtk.IMMulticontext -object. - - - - - Methods - - - gtk.IMMulticontext.append_menuitems - - - append_menuitems - menushell - - - - menushell : - a gtk.MenuShell -widget - - - - The append_menuitems() method adds -menuitems for various available input methods to a menu; the menuitems, when -selected, will switch the input method for the context and the global -default input method. - - - - - - diff --git a/docs/reference/pygtk-gtkinputdialog.xml b/docs/reference/pygtk-gtkinputdialog.xml deleted file mode 100644 index 2dd72fe3..00000000 --- a/docs/reference/pygtk-gtkinputdialog.xml +++ /dev/null @@ -1,245 +0,0 @@ - - - - - - gtk.InputDialog - a dialog for configuring devices for the XInput -extension. - - - - Synopsis - - - gtk.InputDialog - gtk.Dialog - - gtk.InputDialog - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Window - +-- gtk.Dialog - +-- gtk.InputDialog - - - - - - gtk.InputDialog Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Window Properties - gtk.Dialog Properties - - - - - gtk.InputDialog Style Properties - - gtk.Widget Style Properties - gtk.Dialog Style Properties - - - - - gtk.InputDialog Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Window Signal Prototypes - gtk.Dialog Signal Prototypes - - - - "disable-device" - - callback - inputdialog - - deviceid - - user_param1 - - ... - - - - - - "enable-device" - - callback - inputdialog - - deviceid - - user_param1 - - ... - - - - - - - - - - Description - - - This widget is considered too specialized or little-used for -PyGTK, and will in the future be moved to some other package. If your -application needs this widget, feel free to use it, as the widget does work -and is useful in some applications; it's just not of general interest. -However, it will eventually move out of the PyGTK distribution. - - - gtk.InputDialog -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. gtk.InputDialog -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. - - - - - Constructor - - - gtk.InputDialog - - - - Returns : - a new gtk.InputDialog -widget - - - - Creates a new gtk.InputDialog. - - - - - Signals - - - The "disable-device" gtk.InputDialog Signal - - - callback - inputdialog - deviceid - user_param1 - ... - - - - - inputdialog : - the inputdialog that received the -signal - - - deviceid : - the ID of the newly disabled -device. - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "disable-device" signal is emitted when the user changes the -mode of a device from a gtk.gdk.MODE_SCREEN or -gtk.gdk.MODE_WINDOW to -gtk.gdk.MODE_ENABLED. - - - - - The "enable-device" gtk.InputDialog Signal - - - callback - inputdialog - deviceid - user_param1 - ... - - - - - inputdialog : - the inputdialog that received the -signal - - - deviceid : - the ID of the newly disabled -device. - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "enable-device" signal is emitted when the user changes the -mode of a device from gtk.gdk.MODE_DISABLED to a -gtk.gdk.MODE_SCREEN or -gtk.gdk.MODE_WINDOW. - - - - - - diff --git a/docs/reference/pygtk-gtkinvisible.xml b/docs/reference/pygtk-gtkinvisible.xml deleted file mode 100644 index a4cdb8de..00000000 --- a/docs/reference/pygtk-gtkinvisible.xml +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - gtk.Invisible - internally-used widget which is not displayed. - - - - Synopsis - - - gtk.Invisible - gtk.Widget - - gtk.Invisible - - - set_screen - screen - - - get_screen - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Invisible - - - - - - gtk.Invisible Properties - - gtk.Object Properties - gtk.Widget Properties - -
- - - - - - - - - "screen" - Read-Write - The screen where this window will be displayed. - - - - - -
- -
- - - gtk.Invisible Style Properties - - gtk.Widget Style Properties - - - - - gtk.Invisible Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - - - - Description - - The gtk.Invisible -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. - - - - - Constructor - - - gtk.Invisible - - - - Returns : - a new gtk.Invisible -widget - - - - Creates a new gtk.Invisible -widget. - - - - - Methods - - - gtk.Invisible.set_screen - - - set_screen - screen - - - - screen : - a gtk.gdk.Screen - object - - - - - This method is available in PyGTK 2.2 and above. - - - The set_screen() method sets the gtk.gdk.Screen -(specified by screen) where the gtk.Invisible -object will be displayed. - - - - - gtk.Invisible.get_screen - - - get_screen - - - - Returns :  : the - associated gtk.gdk.Screen - - - - - This method is available in PyGTK 2.2 and above. - - - The get_screen() method returns the -associated gtk.gdk.Screen -object. - - - - - -
diff --git a/docs/reference/pygtk-gtkitem.xml b/docs/reference/pygtk-gtkitem.xml deleted file mode 100644 index 290d99a5..00000000 --- a/docs/reference/pygtk-gtkitem.xml +++ /dev/null @@ -1,280 +0,0 @@ - - - - - - gtk.Item - abstract base class for gtk.MenuItem - - - - Synopsis - - - gtk.Item - gtk.Bin - - select - - - deselect - - - toggle - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Item - - - - - - gtk.Item Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - - - - - gtk.Item Style Properties - - gtk.Widget Style Properties - - - - - gtk.Item Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - "deselect" - - callback - item - - user_param1 - - ... - - - - - - "select" - - callback - item - - user_param1 - - ... - - - - - - "toggle" - - callback - item - - user_param1 - - ... - - - - - - - - - - Description - - The gtk.Item widget is an -abstract base class for gtk.MenuItem. - - - - - Methods - - - gtk.Item.select - - - select - - - The select() method emits the "select" -signal on the item. - - - - - gtk.Item.deselect - - - deselect - - - The deselect() method emits the -"deselect" signal on the item. - - - - - gtk.Item.toggle - - - toggle - - - The toggle() method emits the "toggle" -signal on the item. - - - - - - - Signals - - - The "deselect" gtk.Item Signal - - - callback - item - user_param1 - ... - - - - - item : - the item that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "deselect" signal is emitted when the item is -deselected. - - - - - The "select" gtk.Item Signal - - - callback - item - user_param1 - ... - - - - - item : - the item that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "select" signal is emitted when the item is selected. - - - - - - The "toggle" gtk.Item Signal - - - callback - item - user_param1 - ... - - - - - item : - the item that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "toggle" signal is emitted when the item is toggled. - - - - - - diff --git a/docs/reference/pygtk-gtkitemfactory.xml b/docs/reference/pygtk-gtkitemfactory.xml deleted file mode 100644 index 8f1e984b..00000000 --- a/docs/reference/pygtk-gtkitemfactory.xml +++ /dev/null @@ -1,676 +0,0 @@ - - - - - - gtk.ItemFactory - creates menus, menubars and option menus from a data -description. - - - - Synopsis - - - gtk.ItemFactory - gtk.Object - - gtk.ItemFactory - container_type - path - accel_groupNone - - - construct - container_type - path - accel_group - - - get_item - path - - - get_widget - path - - - get_widget_by_action - action - - - get_item_by_action - action - - - create_items - entries - callback_dataNone - - - delete_item - path - - - popup - x - y - mouse_button - timeGDK_CURRENT_TIME - - - - -Functions - - - gtk.item_factory_from_widget - widget - - gtk.item_factory_path_from_widget - widget - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.ItemFactory - - - - - - gtk.ItemFactory Properties - - gtk.Object Properties - - - - - gtk.ItemFactory Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - - - - Description - - - gtk.ItemFactory -is deprecated in PyGTK 2.4 and above. The gtk.UIManager -should be used instead. - - - The gtk.ItemFactory -provides a convenient way to create and manage menus, menubars and option -menus from a data description. The data description is a tuple or list -containing a list of entry tuples that each describe an individual menu, -menuitem, etc. Each entry tuple may contain the following entry fields -though only the path must be specified; the other fields are -optional: - - - - A path that defines the logical position of the menu or -menuitem in the menu hierarchy. a path is similar to a file path in that it -starts with a slash (/) character and all components are joined by a slash -(/) character. The last component may have an underscore that indicates that -the following character is to be used as the accelerator mnemonic. - - - An accelerator that defines a key sequence that will -activate the menuitem. The key sequence is a set of zero or more modifiers -followed by a single key. The modifier keys are: - - - - "<alt>" - - Alt-Lor -Alt-R - - - - "<ctl>" - "<ctrl>" - "<control>" - - Ctrl-Lor -Ctrl-R - - - - "<shift>" - "<shft>" - - Shift-Lor -Shift-R - - - - - - - A callback function or method that will be invoked when the -menu item is activated or the accelerator key sequence is pressed. The -callback function is defined as either: - - - def callback(callback_data, callback_action, widget) - def callback(callback_action, widget) - - - where callback_action is the -callback action defined below, callback_data is the -data passed with the create_items() -method and widget is the menuitem widget. The second -definition must be used if no callback_data argument -is specified by the call to create_items(). - - - A callback action that is an arbitrary integer -value. - - - An item type is a string describing the type of the -item: - - - - "None" - "" - "Item" - - a simple menu item - - - - "<Title>" - - a title item - - - - "<ImageItem>" - - an image item - - - - "<StockItem>" - - an item holding a stock image - - - - "<CheckItem>" - - a check item - - - - "<ToggleItem>" - - a toggle item - - - - "<RadioItem>" - - a radio item - - - - <path> - - the path of a radio item group to add item -to - - - - "<Separator>" - - a separator - - - - "<Tearoff>" - - a tearoff separator - - - - "<Branch>" - - an item to hold sub items - - - - "<LastBranch>" - - a right justified item to hold sub items - - - - - - - extra data that is either a gtk.gdk.Pixbuf or a -stock ID - - - - - - - Constructor - - - gtk.ItemFactory - container_type - path - accel_groupNone - - - - container_type : - the kind of menu to create; one of: gtk.MenuBar, gtk.Menu or gtk.OptionMenu. - - - path : - the path of the new item factory, a string of the -form "<name>" - - - accel_group : - a gtk.AccelGroup -to which the accelerators for the menu items will be added, or -None to create a new one - - - Returns : - a new gtk.ItemFactory - - - - Creates a new gtk.ItemFactory -object. - - - - - Methods - - - gtk.ItemFactory.construct - - - construct - container_type - path - accel_group - - - - container_type : - the kind of menu to create; one of: gtk.MenuBar, gtk.Menu or gtk.OptionMenu. - - - path : - the path of the item factory, a string of the -form "<name>" - - - accel_group : - a gtk.AccelGroup -to which the accelerators for the menu items will be added, or -None to create a new one - - - - The construct() method initializes an -item factory. - - - - - gtk.ItemFactory.get_item - - - get_item - path - - - - path : - the path to the menu item - - - Returns : - the menu item with the specified -path, or None if -path doesn't lead to a menu item - - - - The get_item() method returns the menu -item that corresponds to path. If the widget -corresponding to path is a menu item that opens a -submenu, then the item is returned. If you are interested in the submenu, -use the get_widget() -method instead. - - - - - gtk.ItemFactory.get_widget - - - get_widget - path - - - - path : - the path to the widget - - - Returns : - the widget associated with the specified -path, or None if -path doesn't lead to a widget - - - - The get_widget() method returns the -widget that corresponds to path. If the widget -corresponding to path is a menu item that opens a -submenu, then the submenu is returned. If you are interested in the menu -item, use get_item() -instead. - - - - - gtk.ItemFactory.get_widget_by_action - - - get_widget_by_action - action - - - - action : - a callback action value - - - Returns : - the widget that corresponds to the given -action, or None if no widget was -found - - - - The get_widget_by_action() method -returns the widget that is associated with the specified -action. If there are multiple items with the same -action, the result is undefined. - - - - - gtk.ItemFactory.get_item_by_action - - - get_item_by_action - action - - - - action : - a callback action value - - - Returns : - the menu item that corresponds to the specified -action, or None if no menu item -was found - - - - The get_item_by_action() returns the -menu item that is associated with the specified -action. - - - - - gtk.ItemFactory.create_items - - - create_items - entries - callback_dataNone - - - - entries : - a tuple or list of item factory -entries - - - callback_data : - optional data passed to the callback functions -of all entries - - - - The create_items() method creates the -menu items from the specified item factory entries. -If no callback_data is specified it will not be -passed to the callback functions i.e the callback functions will be passed -one less argument. - - - - - gtk.ItemFactory.delete_item - - - delete_item - path - - - - path : - a path - - - - The delete_item() method deletes the -menu item that was created with the specified -path. - - - - - gtk.ItemFactory.popup - - - popup - x - y - mouse_button - time0L - - - - x : - the x position - - - y : - the y position - - - mouse_button : - the mouse button that was pressed to initiate -this action - - - time : - an optional timestamp for this action; default -is 0L which means use the current time - - - - The popup() method pops up the menu -constructed from the item factory at the specified location -(x, y). This method is -generally invoked in response to a "button_press_event" so the arguments are -retrieved from the event information. - - - - - - - Functions - - - gtk.item_factory_from_widget - - - gtk.item_factory_from_widget - widget - - - - widget : - a gtk.Widget -object - - - Returns : - the gtk.ItemFactory - that created widget - - - - The gtk.item_factory_from_widget() function -returns the gtk.ItemFactory -object that created the gtk.Widget specified -by widget. - - - - - gtk.item_factory_path_from_widget - - - gtk.item_factory_path_from_widget - widget - - - - widget : - a gtk.Widget -object - - - Returns : - the full path to the gtk.ItemFactory -that created widget - - - - The gtk.item_factory_path_from_widget() -function returns the full path to the gtk.ItemFactory -that created the gtk.Widget specified -by widget. - - - - - - diff --git a/docs/reference/pygtk-gtklabel.xml b/docs/reference/pygtk-gtklabel.xml deleted file mode 100644 index 72272ee0..00000000 --- a/docs/reference/pygtk-gtklabel.xml +++ /dev/null @@ -1,1745 +0,0 @@ - - - - - - gtk.Label - a widget that displays a limited amount of read-only -text - - - - Synopsis - - - gtk.Label - gtk.Misc - - gtk.Label - strNone - - - set_text - str - - - get_text - - - set_attributes - attrs - - - get_attributes - - - set_label - str - - - get_label - - - set_markup - str - - - set_use_markup - setting - - - get_use_markup - - - set_use_underline - setting - - - get_use_underline - - - set_markup_with_mnemonic - str - - - get_mnemonic_keyval - - - set_mnemonic_widget - widget - - - get_mnemonic_widget - - - set_text_with_mnemonic - str - - - set_justify - jtype - - - get_justify - - - set_pattern - pattern - - - set_line_wrap - wrap - - - get_line_wrap - - - set_selectable - setting - - - get_selectable - - - select_region - start_offset - end_offset - - - get_selection_bounds - - - - get_layout - - - get_layout_offsets - - - - set_ellipsize - mode - - - get_ellipsize - - - - set_width_chars - n_chars - - - get_width_chars - - - - set_single_line_mode - single_line_mode - - - get_single_line_mode - - - - get_max_width_chars - - - - set_max_width_chars - n_chars - - - get_angle - - - - set_angle - angle - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Misc - +-- gtk.Label - - - - - - gtk.Label Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Misc Properties - -
- - - - - - - - - "angle" - Read-Write - The angle that the baseline of the label makes with the -horizontal, in degrees, measured counterclockwise. An angle of 90 reads from -from bottom to top, an angle of 270, from top to bottom. Ignored if the label -is selectable, wrapped, or ellipsized. Allowed values: [0,360] -Default value: 0. Available in GTK+ 2.6 and above. - - - - "attributes" - Read-Write - A list of Pango style attributes to apply to the text -of the label. - - - - "cursor-position" - Read - The current position of the insertion cursor in -chars. Allowed values: >= 0. Default value: 0 - - - - "ellipsize" - Read-Write - - The preferred place to ellipsize the string, if the -label does not have enough room to display the entire string, specified as -one of the . Note that setting -this property to a value other than pango.ELLIPSIZE_NONE -has the side-effect that the label requests only enough space to display the -ellipsis "...". In particular, this means that ellipsizing labels don't work -well in notebook tabs, unless the tab's "tab-expand" property is set to -True. Other means to set a label's width are with the -gtk.Widget.set_size_request() -and set_width_chars() -methods. Default value: pango.ELLIPSIZE_NONE. Available -in GTK+ 2.6 and above. - - - - "justify" - Read-Write - The alignment of the lines in the text of the label -relative to each other. The possible values are: -gtk.JUSTIFY_LEFT, gtk.JUSTIFY_RIGHT, -gtk.JUSTIFY_CENTER, gtk.JUSTIFY_FILL. -This does NOT affect the alignment of the label within its -allocation. Default value: gtk.JUSTIFY_LEFT - - - - "label" - Read-Write - The text of the label. Default value: -None - - - - "max-width-chars" - Read-Write - The desired maximum width of the label, in characters. -If this property is set to -1, the width will be calculated automatically, -otherwise the label will request space for no more than the requested number -of characters. If the "width-chars" property is set to a positive value, then -the "max-width-chars" property is ignored. Allowed values: >= -1. -Default value: -1. Available in GTK+ 2.6 and above. - - - - "mnemonic-keyval" - Read - The mnemonic accelerator key for this label. Default -value: 16777215 - - - - "mnemonic-widget" - Read-Write - The widget to be activated when the label's mnemonic -key is pressed. - - - - "pattern" - Write - A string with _ characters in positions used to -identify to characters in the text to underline. Default value: -None - - - - "selectable" - Read-Write - If True, the label text can be -selected with the mouse. Default value: False - - - - "selection-bound" - Read - The position of the opposite end of the selection from -the cursor in chars. Allowed values: >= 0. Default value: 0. - - - - "single-line-mode" - Read-Write - - If True the label is in single line -mode. In single line mode, the height of the label does not depend on the -actual text, it is always set to ascent + descent of the font. This can be -an advantage in situations where resizing the label because of text changes -would be distracting, e.g. in a statusbar. Default value: -False. Available in GTK+ 2.6 and above. - - - - "use-markup" - Read-Write - If True, the text of the label -includes XML markup. Default value: False - - - - "use-underline" - Read-Write - If True, an underscore in the text -indicates the next character should be used for the mnemonic accelerator -key. Default value: False - - - - "width-chars" - Read-Write - - The desired width of the label, in characters. If this -property is set to -1, the width will be calculated automatically, otherwise -the label will request either 3 characters or the property value, whichever -is greater. Allowed values: >= -1. Default value: -1. Available in GTK+ -2.6 and above. - - - - "wrap" - Read-Write - If True, wrap lines if the text -becomes too wide. Default value: False - - - - - -
- -
- - - gtk.Label Style Properties - - gtk.Widget Style Properties - - - - - gtk.Label Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - - - - "copy-clipboard" - - callback - label - - user_param1 - - ... - - - - - - "move-cursor" - - callback - label - - step - - count - - extend_selection - - user_param1 - - ... - - - - - - "populate-popup" - - callback - label - - menu - - user_param1 - - ... - - - - - - - - - - Description - - The gtk.Label is a widget -class that displays a limited amount of read-only text. Labels are used by -several widgets (e.g. gtk.Button, and its -subclasses, gtk.MenuItem, -etc.) to provide text display as well as by applications to display -messages, etc, to the user. Most of the functionality of a gtk.Label is directed -at modifying the style and layout of the text within the widget allocation. -A gtk.Label is -a "windowless" object which means that it cannot receive events directly. A -gtk.EventBox -can be used to provide event handling capabilities to a gtk.Label widget if -needed. - - - Mnemonics - - Label text may be specified with embedded underscore characters -that are used to indicate that the following character should be underlined -and used as the mnemonic accelerator (if it's the first underlined -character). The set_text_with_mnemonic() -method is used to parse the label text for a mnemonic characters. Mnemonics -automatically activate any activatable widget the label is inside, such as a -gtk.Button; if -the label is not inside an activatable widget, you have to tell the label -about the target using the set_mnemonic_widget() -method. Here's a simple example where the label is inside a button: - - - # Pressing Alt+H will activate this button - button = gtk.Button() - label = gtk.Label("_Hello") - label.set_use_underline(True) - button.add(label) - - - As a convenience you can create a button with a mnemonic label -as follows: - - - # Pressing Alt+H will activate this button - button = gtk.Button(label="_Hello", use_underline=True) - - - To create a mnemonic for a widget alongside the label, such as a -gtk.Entry, you -have to point the label at the entry with the set_mnemonic_widget() -method: - - - # Pressing Alt+H will focus the entry - entry = gtk.Entry() - label = gtk.Label("_Hello") - label.set_use_underline(True) - label.set_mnemonic_widget(entry) - - - - - - Markup (styled text) - - To make it easy to format text in a label (changing colors, fonts, -etc.), the label text can be provided in the Pango markup format which is a simple -XML markup format. The gtk.Label.set_markup() -method sets the label using text in valid markup format (e.g. '<', '>' -and '&' characters must be replaced by &lt;, &gt; and &amp; -respectively. For example: - - - label = gtk.Label() - label.set_markup("<small>Small text</small>"); - - - The markup passed to the set_markup() -method must be valid. For example, the literal <>& characters must -be escaped as &lt;, &gt;, and &amp;. If you pass text obtained -from the user, file, or a network to the set_markup() -method, you'll want to escape it with the Python Library -xml.sax.saxutils.escape() function. - - Markup strings are just a convenient way to set the pango.AttrList -on a label. Using the set_attributes() -method may be a simpler way to set attributes in some cases. Be careful -though; pango.AttrList -tends to cause internationalization problems, unless you're applying -attributes to the entire string because specifying the start_index and -end_index for a pango.Attribute -requires knowledge of the exact string being displayed, so translations will -cause problems. - - - - - Selectable labels - - Labels can be made selectable with the set_selectable() -method. Selectable labels allow the user to copy the label contents to the -clipboard. Only labels that contain useful-to-copy information such as error -messages should be made selectable. - - - - - Text layout - - A label can contain any number of paragraphs, but will have -performance problems if it contains more than a small number. Paragraphs are -separated by newlines or other paragraph separators understood by -Pango. - - Labels can automatically wrap text if you call the set_line_wrap() -method. - - The set_justify() -method sets how the lines in a label align with one another. If you want to -set how the label as a whole aligns in its available space, see the gtk.Misc.set_alignment() -method. - - - - - - - Constructor - - - gtk.Label - strNone - - - - str : - The text of the label or None -for a blank label - - - Returns : - the new gtk.Label -widget - - - - Creates a new gtk.Label with the -text specified by str inside it. You can pass -None to get a blank label. - - - - - Methods - - - gtk.Label.set_text - - - set_text - str - - - - str : - The new text for the -label. - - - - The set_text() method sets the text -within the gtk.Label widget. It -replaces any text that was there before and will clear any previously set -mnemonic accelerators. - - - - - gtk.Label.get_text - - - get_text - - - - Returns : - the text in the label -widget. - - - - The get_text() method fetches the text -from a label widget, as displayed on the screen. This does not include any -Pango markup or embedded underscore characters indicating mnemonics. (See -get_label()). - - - - - gtk.Label.set_attributes - - - set_attributes - attrs - - - - attrs : - a pango.AttrList - - - - The set_attributes() method applies a -pango.AttrList -list of attributes to the label text. The attributes set with this function -will be ignored if either the "use-underline" or "use-markup" attributes is -True. - - - - - gtk.Label.get_attributes - - - get_attributes - - - - Returns : - the attribute list, or None -if no attributes were set. - - - - The get_attributes() method returns the -attribute list that was set on the label using set_attributes(), -if any. This function does not reflect attributes that come from the labels -markup (see set_markup()). - - - - - gtk.Label.set_label - - - set_label - str - - - - str : - the new text (including mnemonics or markup) to -set for the label - - - - The set_label() method sets the text of -the label. The label is parsed for embedded underscores and Pango markup -depending on the values of the "use-underline" and "use-markup" -properties. - - - - - gtk.Label.get_label - - - get_label - - - - Returns : - the text of the label -widget. - - - - The get_label() method returns the text -from a label widget including any Pango markup and embedded underscores -indicating mnemonics. (See get_text() -that just returns the text). - - - - - gtk.Label.set_markup - - - set_markup - str - - - - str : - a markup string - - - - The set_markup() method parses -str, which is marked up with the Pango text markup -language, and sets the label's text and attribute list. - - - - - gtk.Label.set_use_markup - - - set_use_markup - setting - - - - setting : - if True the label's text -should be parsed for markup. - - - - The set_use_markup() method sets the -"use-markup" property to the value of setting. If -True the text of the label should be parsed as -markup. - - - - - gtk.Label.get_use_markup - - - get_use_markup - - - - Returns : - True if the label's text -will be parsed for markup. - - - - The get_user_markup() method returns -the value of the "use-markup" property. If True the -label's text is parsed as markup. See set_use_markup(). - - - - - gtk.Label.set_use_underline - - - set_use_underline - setting - - - - setting : - if True underscores in the -text indicate mnemonics - - - - The set_use_underline() method sets the -"use-underline" property to the value of setting. If -setting is True, an underscore in -the text indicates the next character should be used for the mnemonic -accelerator key. - - - - - gtk.Label.get_use_underline - - - get_use_underline - - - - Returns : - True if an embedded -underscore in the label indicates the mnemonic -accelerator. - - - - The get_use_underline() method returns -the value of the "use-underline" property. If True an -embedded underscore in the label indicates the next character is a mnemonic. -See set_use_underline(). - - - - - gtk.Label.set_markup_with_mnemonic - - - set_markup_with_mnemonic - str - - - - str : - a markup string including embedded -underscores - - - - The set_markup_with_mnemonic() method -parses str as markup, setting the label's text and -attribute list based on the parse results. If characters in -str are preceded by an underscore, they are -underlined indicating that they represent a mnemonic accelerator. The -mnemonic key can be used to activate another widget, chosen automatically, -or explicitly using the set_mnemonic_widget() -method. - - - - - gtk.Label.get_mnemonic_keyval - - - get_mnemonic_keyval - - - - Returns : - a keyval, or the void symbol -keyval - - - - The get_mnemonic_keyval() method -returns the value of the "mnemonic-keyval" property that contains the keyval -used for the mnemonic accelerator if one has been set on the label. If there -is no mnemonic set up it returns the void symbol keyval. - - - - - gtk.Label.set_mnemonic_widget - - - set_mnemonic_widget - widget - - - - widget : - the widget to be activated when the mnemonic is -pressed - - - - The set_mnemonic_widget() method sets -the "mnemonic-widget" property using the value of -widget. This method associates the label mnemonic -with a widget that will be activated when the mnemonic accelerator is -pressed. When the label is inside a widget (like a gtk.Button or a -gtk.Notebook -tab) it is automatically associated with the correct widget, but sometimes -(i.e. when the target is a gtk.Entry next to the -label) you need to set it explicitly using this function. The target widget -will be activated by emitting "mnemonic_activate" on it. - - - - - gtk.Label.get_mnemonic_widget - - - get_mnemonic_widget - - - - Returns : - the target of the label's mnemonic, or -None if none has been set and the default algorithm will -be used. - - - - The get_mnemonic_widget() method -retrieves the value of the "mnemonic-widget" property which is the target of -the mnemonic accelerator of this label. See set_mnemonic_widget(). - - - - - gtk.Label.set_text_with_mnemonic - - - set_text_with_mnemonic - str - - - - str : - the label text with embedded underscore -characters indicating the mnemonic characters - - - - The set_text_with_mnemonic() method -sets the label's text from the string str. If -characters in str are preceded by an underscore, they -are underlined indicating that they represent a mnemonic accelerator. The -mnemonic key can be used to activate another widget, chosen automatically, -or explicitly using the set_mnemonic_widget() -method. - - - - - gtk.Label.set_justify - - - set_justify - jtype - - - - jtype : - justification type - - - - The set_justify() method sets the -alignment of the lines in the text of the label relative to each other using -the value of jtype. The possible values of -jtype are: gtk.JUSTIFY_LEFT, -gtk.JUSTIFY_RIGHT, gtk.JUSTIFY_CENTER -and gtk.JUSTIFY_FILL. gtk.JUSTIFY_LEFT -is the default value when the widget is first created. If you want to set -the alignment of the label as a whole, use the gtk.Misc.set_alignment() -method instead. The set_justify() -has no effect on labels containing only a single line. - - - - - gtk.Label.get_justify - - - get_justify - - - - Returns : - the label justification - - - - The get_justify() method returns the -justification of the label; one of: gtk.JUSTIFY_LEFT, -gtk.JUSTIFY_RIGHT, gtk.JUSTIFY_CENTER -or gtk.JUSTIFY_FILL. See set_justify(). - - - - - gtk.Label.set_pattern - - - set_pattern - pattern - - - - pattern : - the pattern of underlines - - - - The set_pattern() method sets the -"pattern" property with the value of pattern. The -pattern contains an underscore or space for each character in the label -text. Any characters omitted are assumed to be spaces. For example, if the -label text is "XXX Label" and the pattern is "___" then only the "XXX" will -be underlined. - - - - - gtk.Label.set_line_wrap - - - set_line_wrap - wrap - - - - wrap : - if True the label lines will wrap if too big -for the widget size. - - - - The set_wrap() method sets the "wrap" -property tot he value of wrap. If -wrap is True the label text will -wrap if it is wider than the widget size; otherwise, the text gets cut off -at the edge of the widget. - - - - - gtk.Label.get_line_wrap - - - get_line_wrap - - - - Returns : - True if the lines of the -label are automatically wrapped. - - - - The get_line_wrap() method returns the -value of the "wrap" property. If "wrap" is True the lines -in the label are automatically wrapped. See set_line_wrap(). - - - - - gtk.Label.set_selectable - - - set_selectable - setting - - - - setting : - if True allow the text in -the label to be selected - - - - The set_selectable() method sets the -"selectable" property with the value of setting. If -setting is True the user is -allowed to select text from the label, for copy-and-paste. - - - - - gtk.Label.get_selectable - - - get_selectable - - - - Returns : - True if the user can select -the label text - - - - The get_selectable() method gets the -value of the "selectable" property set by the set_selectable() -method. - - - - - gtk.Label.select_region - - - select_region - start_offset - end_offset - - - - start_offset : - start offset in characters - - - end_offset : - end offset in characters - - - - The select_region() method selects a -range of characters in the label, if the label is selectable. The selected -region is the range of characters between -start_offset and end_offset. -See set_selectable(). -If the label is not selectable, this method has no effect. If -start_offset or end_offset are --1, then the end of the label will be substituted. - - - - - gtk.Label.get_selection_bounds - - - get_selection_bounds - - - - - Returns : - a tuple containing the start and end character -offsets of the selection - - - - The get_selection_bounds() method -returns a tuple that contains the start and end character offsets of the -selected text in the label if the selection exists. If there is no selection -or the label is not selectable, an empty tuple is returned. - - - - - gtk.Label.get_layout - - - get_layout - - - - Returns : - the pango.Layout for -this label - - - - The get_layout() method returns the -pango.Layout -used to display the label. The layout is useful to e.g. convert text -positions to pixel positions, in combination with get_layout_offsets(). - - - - - gtk.Label.get_layout_offsets - - - get_layout_offsets - - - - - Returns : - a tuple containing the X offset of the layout, -or None and the Y offset of layout, or -None - - - - The get_layout_offsets() method returns -a tuple containing the coordinates where the label will draw the pango.Layout -representing the text in the label. This method is useful for converting -mouse events into coordinates inside the pango.Layout, e.g. -to take some action if some part of the label is clicked. Of course you will -need to create a gtk.EventBox to -receive the events, and pack the label inside it, since labels are a -"windowless" (gtk.NO_WINDOW) widget. Remember when using -the pango.Layout -functions you need to convert to and from pixels using -pango.PIXELS() or -pango.SCALE. - - - - - gtk.Label.set_ellipsize - - - set_ellipsize - mode - - - - mode : - one of the to - use - - - - - This method is available in PyGTK 2.6 and above. - - - The set_ellipsize() method sets the -"ellipsize" property to the value of -mode. mode should be one of -the . The "ellipsize" -property specifies if and where an ellipse should be used if there is not -enough room for the label text. - - - - - gtk.Label.get_ellipsize - - - get_ellipsize - - - - - Returns : - the current ellipsize mode - - - - - This method is available in PyGTK 2.6 and above. - - - The get_ellipsize() method returns the -value of the "ellipsize" property which contains one of the . The "ellipsize" -property specifies if and where an ellipse should be used if there is not -enough room for the label text. - - - - - gtk.Label.set_width_chars - - - set_width_chars - n_chars - - - - n_chars : - the new desired width, in -characters. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_width_chars() method sets the -"width-chars" property to the value of n_chars. The -"width-chars" property specifies the desired width of the label in -characters. - - - - - gtk.Label.get_width_chars - - - get_width_chars - - - - - Returns : - the desired width of the label in -characters. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_width_chars() method returns -the value of the "width-chars" property that specifies the desired width of -the label in characters. - - - - - gtk.Label.set_single_line_mode - - - set_single_line_mode - single_line_mode - - - - single_line_mode : - if True the label is in -single line mode. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_single_line_mode() method sets -the "single-line-mode" property to the value of -single_line_mode. If -single_line_mode is True the label -is in single line mode where the height of the label does not depend on the -actual text, it is always set to ascent + descent of the font. - - - - - gtk.Label.get_single_line_mode - - - get_single_line_mode - - - - - Returns : - - - - - - This method is available in PyGTK 2.6 and above. - - - The get_single_line_mode() method -returns the value of the "single-line-mode" property. See the set_single_line_mode() -method for more information. - - - - - gtk.Label.set_max_width_chars - - - set_max_width_chars - n_chars - - - - n_chars : - the new desired maximum width, in -characters. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_max_width_chars() method sets -the "max-width-chars" property to the value of -n_chars. - - - - - gtk.Label.get_max_width_chars - - - get_max_width_chars - - - - - Returns : - - - - - - This method is available in PyGTK 2.6 and above. - - - The get_max_width_chars() method -returns the value of the "max-width-chars" property which is the desired -maximum width of the label in characters. - - - - - gtk.Label.set_angle - - - set_angle - angle - - - - angle : - the angle that the baseline of the label makes -with the horizontal, in degrees, measured counterclockwise - - - - - This method is available in PyGTK 2.6 and above. - - - The set_angle() method sets the "angle" -property to the value of -angle. angle is the angle of -rotation for the label. An angle of 90 reads from from bottom to top, an -angle of 270, from top to bottom. The angle setting for the label is ignored -if the label is selectable, wrapped, or ellipsized. - - - - - gtk.Label.get_angle - - - get_angle - - - - - Returns : - - - - - - This method is available in PyGTK 2.6 and above. - - - The get_angle() method returns the -value of the "angle" property. See the set_angle() -method for more information. - - - - - - - Signals - - - The "copy-clipboard" gtk.Label Signal - - - callback - label - user_param1 - ... - - - - - label : - the label that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "copy-clipboard" signal is emitted when text is copied from -the label to the clipboard. - - - - - The "move-cursor" gtk.Label Signal - - - callback - label - step - count - extend_selection - user_param1 - ... - - - - - label : - the label that received the -signal - - - step : - the step size of the move: -gtk.MOVEMENT_LOGICAL_POSITIONS, -gtk.MOVEMENT_VISUAL_POSITIONS, -gtk.MOVEMENT_WORDS, -gtk.MOVEMENT_DISPLAY_LINES, -gtk.MOVEMENT_DISPLAY_LINE_ENDS, -gtk.MOVEMENT_PARAGRAPHS, -gtk.MOVEMENT_PARAGRAPH_ENDS, -gtk.MOVEMENT_PAGES and -gtk.MOVEMENT_BUFFER_ENDS - - - count : - the number of steps to -take - - - extend_selection : - if True extend the range of - the selection - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "move-cursor" signal is emitted when the cursor is being -moved count steps or size step. -The step size is one of: - - - gtk.MOVEMENT_LOGICAL_POSITIONS, move by graphemes - gtk.MOVEMENT_VISUAL_POSITIONS, move by graphemes - gtk.MOVEMENT_WORDS, move by words - gtk.MOVEMENT_DISPLAY_LINES, move by lines(wrapped lines) - gtk.MOVEMENT_DISPLAY_LINE_ENDS, move to line ends(wrapped lines) - gtk.MOVEMENT_PARAGRAPHS, move by paragraphs(newline-ended lines) - gtk.MOVEMENT_PARAGRAPH_ENDS, move to ends of a paragraph - gtk.MOVEMENT_PAGES, move by pages - gtk.MOVEMENT_BUFFER_ENDS move to ends of the buffer - - - If extend_selection is -True the selection will be extended to include the text -moved over. - - - - - The "populate-popup" gtk.Label Signal - - - callback - label - menu - user_param1 - ... - - - - - label : - the label that received the -signal - - - menu : - the menu to be populated - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "populate-popup" signal is emitted when a menu needs to be -populated on the fly. - - - - - -
diff --git a/docs/reference/pygtk-gtklayout.xml b/docs/reference/pygtk-gtklayout.xml deleted file mode 100644 index c5ceee4f..00000000 --- a/docs/reference/pygtk-gtklayout.xml +++ /dev/null @@ -1,603 +0,0 @@ - - - - - - gtk.Layout - infinite scrollable area containing child widgets and custom -drawing - - - - Synopsis - - - gtk.Layout - gtk.Container - - gtk.Layout - hadjustmentNone - vadjustmentNone - - - put - child_widget - x - y - - - move - child_widget - x - y - - - set_size - width - height - - - get_size - - - - get_hadjustment - - - get_vadjustment - - - set_hadjustment - adjustment - - - set_vadjustment - adjustment - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Layout - - - - - - gtk.Layout Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - -
- - - - - - - - - "hadjustment" - Read-Write - The gtk.Adjustment -for the horizontal position. - - - - "height" - Read-Write - the layout height - - - - "vadjustment" - Read-Write - The gtk.Adjustment -for the vertical position. - - - - "width" - Read-Write - the layout width - - - - - -
- -
- - - gtk.Layout Style Properties - - gtk.Widget Style Properties - - - - - gtk.Layout Child Properties - -
- - - - - - - - - "x" - Read-Write - the X position of the child - - - - "y" - Read-Write - the Y position of the child - - - - - -
- -
- - - Attributes - -
- - - - - - - - - "bin_window" - Read - the window of a layout to draw into - - - - - -
- -
- - - gtk.Layout Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - "set-scroll-adjustments" - - callback - layout - - hadjustment - - vadjustment - - user_param1 - - ... - - - - - - - - - - Description - - The gtk.Layout is a -simple container widget similar to the gtk.Fixed container -widget. Like the gtk.Fixed the gtk.Layout places a -child widget at a specific position within the container. The gtk.Layout offers -two features beyond the gtk.Fixed -widget: - - - - a very large width and height for the container - limited -by the size of an unsigned integer. - - - horizontal and vertical adjustments can be specified for -use with scrollbars, etc. - - - - The gtk.Layout can also -be drawn on similar to drawing on a gtk.DrawingArea. -When handling expose events on a gtk.Layout, you must -draw to the window specified by the bin_window attribute -rather than the widget window attribute. - - - - - Constructor - - - gtk.Layout - hadjustmentNone - vadjustmentNone - - - - hadjustment : - horizontal adjustment, or -None - - - vadjustment : - vertical adjustment, or -None - - - Returns : - a new gtk.Layout - - - - Creates a new gtk.Layout. Usually -the hadjustment and -vadjustment arguments are not specified or are -specified as None, so that new adjustments are -created. - - - - - Methods - - - gtk.Layout.put - - - put - child_widget - x - y - - - - child_widget : - the child widget - - - x : - the X position of child -widget - - - y : - the Y position of child -widget - - - - The put() method adds -child_widget to the layout and places its upper, left -corner at the position specified by x and -y. - - - - - gtk.Layout.move - - - move - child_widget - x - y - - - - child_widget : - a current child of the -layout - - - x : - the X position to move -child_widget to - - - y : - the Y position to move -child_widget to - - - - The move() method moves a current child -of the layout (specified by child_widget) to the new -position specified by x and y. -The upper, left corner of child_widget will be placed -at (x, y). - - - - - gtk.Layout.set_size - - - set_size - width - height - - - - width : - width of the layout area - - - height : - height of the layout area - - - - The set_size() method sets the size of -the virtual area of the layout to the values specified by -width and height. The "width" -and "height" properties are also set by this method. - - - - - gtk.Layout.get_size - - - get_size - - - - - Returns : - a tuple containing the width and height set on -layout - - - - The get_size() method returns a tuple -that contains the width and height of the virtual size that has been set on -the layout. See set_size(). - - - - - gtk.Layout.get_hadjustment - - - get_hadjustment - - - - Returns : - a horizontal adjustment - - - - The get_hadjustment() method returns -the value of the "hadjustment" property that contains the horizontal -adjustment object associated with the layout. This function should only be -called after the layout has been placed in a gtk.ScrolledWindow -or has otherwise been configured for scrolling. See gtk.ScrolledWindow, -gtk.Scrollbar, -gtk.Adjustment -for details. - - - - - gtk.Layout.get_vadjustment - - - get_vadjustment - - - - Returns : - a vertical adjustment - - - - The get_vadjustment() method returns -the "vadjustment" property that contains the vertical adjustment object -associated with the layout. This function should only be called after the -layout has been placed in a gtk.ScrolledWindow -or has otherwise been configured for scrolling. See gtk.ScrolledWindow, -gtk.Scrollbar, -gtk.Adjustment -for details. - - - - - gtk.Layout.set_hadjustment - - - set_hadjustment - adjustment - - - - adjustment : - a horizontal adjustment - - - - The set_hadjustment() method sets the -horizontal adjustment for the layout (and the "hadjustment" property) to the -value of adjustment. See gtk.ScrolledWindow, -gtk.Scrollbar, -gtk.Adjustment -for details. - - - - - gtk.Layout.set_vadjustment - - - set_vadjustment - adjustment - - - - adjustment : - a vertical adjustment - - - - The set_vadjustment() method sets the -vertical adjustment for the layout (and the "vadjustment" property) to the -value of adjustment. See gtk.ScrolledWindow, -gtk.Scrollbar, -gtk.Adjustment -for details. - - - - - - - Signals - - - The "set-scroll-adjustments" gtk.Layout Signal - - - callback - layout - hadjustment - vadjustment - user_param1 - ... - - - - - layout : - the layout that received the -signal - - - hadjustment : - the horizontal adjustment associated with the -layout. - - - vadjustment : - the horizontal adjustment associated with the -layout. - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "set-scroll-adjustments" signal is emitted when one of the -adjustments associated with a layout is changed. - - - - - -
diff --git a/docs/reference/pygtk-gtklinkbutton.xml b/docs/reference/pygtk-gtklinkbutton.xml deleted file mode 100644 index 690021e5..00000000 --- a/docs/reference/pygtk-gtklinkbutton.xml +++ /dev/null @@ -1,292 +0,0 @@ - - - - - - - gtk.LinkButton - a button bound to a URL (new in PyGTK 2.10) - - - - Synopsis - - - gtk.LinkButton - gtk.Button - - gtk.LinkButton - uri - labelNone - - - get_uri - - - - set_uri - uri - - - - - -Functions - - - gtk.link_button_set_uri_hook - func - dataNone - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Button - +-- gtk.LinkButton - - - - - - gtk.LinkButton Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Button Properties - -
- - - - - - - - - "uri" - Read-Write - The URI bound to this button. Available in GTK+ - 2.10. - - - - - -
- -
- - - gtk.LinkButton Style Properties - - gtk.Widget Style Properties - gtk.Button Style Properties - - - - - gtk.LinkButton Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Button Signal Prototypes - - - - Description - - - The gtk.LinkButton - is available in PyGTK 2.10 and above. - - - A gtk.LinkButton - is a gtk.Button with - a hyperlink, similar to the one used by web browsers, that triggers an - action when clicked. It is useful to show quick links to - resources. - - A link button is created by calling the gtk.LinkButton - constructor. The URI you pass to the constructor is used as a label for - the widget. - - The URI bound to a gtk.LinkButton - can be set specifically using the set_uri()) - method, and retrieved using the get_uri() - method. - - gtk.LinkButton - offers a global hook, which is called when the used clicks on it: see - the gtk.link_button_set_uri_hook() - function. - - - - - Constructor - - - gtk.LinkButton - - - gtk.LinkButton - uri - labelNone - - - - - uri : - a valid URI - - - label : - the text of the button or - None - - - Returns : - a new link button widget. - - - - - This constructor is available in PyGTK 2.10 and above. - - - Creates a new gtk.LinkButton - with the URI specified by uri as its text if - label is None. If - label is not None, it is - used as the text of the button. - - - - - - - Methods - - - gtk.LinkButton.get_uri - - - get_uri - - - - - - Returns : - the associated URI. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_uri() method returns the URI - set using the gtk.LinkButton.set_uri() - method or the gtk.LinkButton() - constructor. - - - - - gtk.LinkButton.set_uri - - - set_uri - uri - - - - - uri : - a valid URI - - - - - This method is available in PyGTK 2.10 and above. - - - The set_uri() method sets the string - specified by uri as the URI the gtk.LinkButton - points to. - - - - - - - Functions - - - gtk.link_button_set_uri_hook - - - gtk.link_button_set_uri_hook - func - dataNone - - - - func : - a function called each time a gtk.LinkButton - is clicked, or None - - - data : - user data to be passed to - func - - - - - This function is available in PyGTK 2.10 and above. - - - The gtk.link_button_set_uri_hook() function - sets func as the function that should be - invoked every time a user clicks a gtk.LinkButton. - This function is called before every callback registered for the - "clicked" signal. If func is - None the current callback function will be - removed. - - - - - -
diff --git a/docs/reference/pygtk-gtkliststore.xml b/docs/reference/pygtk-gtkliststore.xml deleted file mode 100644 index 238be882..00000000 --- a/docs/reference/pygtk-gtkliststore.xml +++ /dev/null @@ -1,860 +0,0 @@ - - - - - - gtk.ListStore - a list model to use with a gtk.TreeView - - - - Synopsis - - - gtk.ListStore - gobject.GObject - gtk.TreeModel - gtk.TreeDragSource - gtk.TreeDragDest - gtk.TreeSortable - - gtk.ListStore - column_type - ... - - - - set_column_types - type - ... - - - - set_value - iter - column - value - - - set - iter - column_num - value - ... - - - remove - iter - - - insert - position - rowNone - - - insert_before - sibling - rowNone - - - insert_after - sibling - rowNone - - - prepend - rowNone - - - append - rowNone - - - clear - - - - - iter_is_valid - iter - - - reorder - new_order - - - swap - a - b - - - move_after - iter - position - - - move_before - iter - position - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.ListStore (implements gtk.TreeModel, gtk.TreeDragSource, gtk.TreeDragDest, gtk.TreeSortable) - - - - - - gtk.ListStore Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.TreeModel Signal Prototypes - gtk.TreeSortable Signal Prototypes - - - - Description - - The gtk.ListStore -object is a list model for use with a gtk.TreeView -widget. It implements the gtk.TreeModel -interface, the gtk.TreeSortable -and the tree drag and drop interfaces. - - The gtk.ListStore -objects support the Python mapping and iterator protocols. See the gtk.TreeModel -Description and the PyGTK -tutorial for more information. - - - - - Constructor - - - gtk.ListStore - column_type - ... - - - - column_type : - the column type of the first -column - - - ... : - optional types for succeeding -columns - - - Returns : - a new gtk.ListStore - - - - Creates a new list store as with one or more columns with the type -specified by the arguments passed to the constructor. For example, -gtk.ListStore(gobject.TYPE_INT, gobject.TYPE_STRING, -gtk.gdk.Pixbuf); will create a new gtk.ListStore -with three columns, of type int, string and gtk.gdk.Pixbuf -respectively. The built-in GObject types -are: - - - - gobject.TYPE_BOOLEAN - - - gobject.TYPE_BOXED - - - gobject.TYPE_CHAR - - - gobject.TYPE_DOUBLE - - - gobject.TYPE_ENUM - - - gobject.TYPE_FLAGS - - - gobject.TYPE_FLOAT - - - gobject.TYPE_INT - - - gobject.TYPE_INT64 - - - gobject.TYPE_INTERFACE - - - gobject.TYPE_INVALID - - - gobject.TYPE_LONG - - - gobject.TYPE_NONE - - - gobject.TYPE_OBJECT - - - gobject.TYPE_PARAM - - - gobject.TYPE_POINTER - - - gobject.TYPE_PYOBJECT - - - gobject.TYPE_STRING - - - gobject.TYPE_UCHAR - - - gobject.TYPE_UINT - - - gobject.TYPE_UINT64 - - - gobject.TYPE_ULONG - - - - The column types can be any GObject type including -those that are PyGTK objects or application defined objects that are -subclassed from the GObject class. - - - - - Methods - - - gtk.ListStore.set_column_types - - - set_column_types - type - ... - - - - type : - the type of the first column - - - ... : - zero or more type specifications - - - - - This method is available in PyGTK 2.2 and above. - - - The set_column_types() method sets the -liststore columns to the types specified by type and -any additional type parameters. This method is meant primarily for classes -that inherit from gtk.ListStore, -and should only be used when constructing a new gtk.ListStore. -It will not function after a row has been added, or a method on the gtk.TreeModel -interface is called. - - - - - gtk.ListStore.set_value - - - set_value - iter - column - value - - - - iter : - a valid gtk.TreeIter for -the row being modified - - - column : - the column number to -modify - - - value : - the new value for the cell - - - - The set_value() method sets the data in -the cell specified by iter and -column. The type of value must -be convertible to the type of the column. - - - - - gtk.ListStore.set - - - set - iter - column_num - value - ... - - - - iter : - A valid gtk.TreeIter for -the row being modified - - - column_num : - the number of the column to -modify - - - value : - the new cell value - - - ... : - additional optional sets of column number - -value pairs - - - - The set() method sets the value of one -or more cells in the row referenced by iter. The -argument list should contain integer column numbers, each followed by the -value to be set (the value must be convertible to the type of the cell -column). For example, to set column 0 with type -gobject.TYPE_STRING to "Foo", you would write: - - liststore.set(iter, 0, "Foo") - - - - - - gtk.ListStore.remove - - - remove - iter - - - - iter : - A valid gtk.TreeIter for -the row - - - Returns : - True if -iter is still valid. - - - - The remove() method removes the row -specified by iter from the list store and returns -True if iter is still valid. After being removed, -iter is set to be the next valid row, or is -invalidated if it pointed to the last row. - - - Prior to PyGTK 2.4 this method returned a new gtk.TreeIter that -is a copy of iter. - - - - - - gtk.ListStore.insert - - - insert - position - rowNone - - - - position : - the integer position to insert the new -row - - - row : - an optional list or tuple containing ordered -column values to set on the row or -None - - - Returns : - A gtk.TreeIter -pointing at the new row - - - - The insert() method creates a new row -at the location specified by position. If -position is larger than the number of rows on the -list, then the new row will be appended to the list. The row will be empty -if row is not specified or is -None. If row is specified it must -contain a list or tuple of ordered column values (e.g. -[gobject.TYPE_STRING, -gobject.TYPE_INT]) that are used to set the values in the -cells of the new row. Alternatively, the application can fill in row cell -values using the set() or -set_value() -methods. - - - - - gtk.ListStore.insert_before - - - insert_before - sibling - rowNone - - - - sibling : - A valid gtk.TreeIter -or None - - - row : - an optional list or tuple containing ordered -column values to set on the row or -None - - - Returns : - A gtk.TreeIter -pointing at the new row - - - - The insert_before() method inserts a -new row before the row specified by the gtk.TreeIter -sibling. The row will be empty if -row is not specified or is None. -If row is specified it must contain a list or tuple -of ordered column values (e.g. [gobject.TYPE_STRING, -gobject.TYPE_INT]) that are used to set the values in the -cells of the new row. Alternatively, the application can fill in row cell -values using the set() or -set_value() -methods. - - In PyGTK 2.4, if sibling is -None the row will be appended to the liststore. - - - - - gtk.ListStore.insert_after - - - insert_after - sibling - rowNone - - - - sibling : - A valid gtk.TreeIter -or None - - - row : - an optional list or tuple containing ordered -column values to set on the row or -None - - - Returns : - A gtk.TreeIter -pointing at the new row - - - - The insert_after() method inserts a new -row after the row specified by the gtk.TreeIter -sibling. The row will be empty if -row is not specified or is None. -If row is specified it must contain a list or tuple -of ordered column values (e.g. [gobject.TYPE_STRING, -gobject.TYPE_INT]) that are used to set the values in the -cells of the new row. Alternatively, the application can fill in row cell -values using the set() or -set_value() -methods. - - In PyGTK 2.4, if sibling is -None the row will be prepended to the liststore. - - - - - gtk.ListStore.prepend - - - prepend - rowNone - - - - row : - an optional list or tuple containing ordered -column values to set on the row or -None - - - Returns : - A gtk.TreeIter -pointing at the new row - - - - The prepend() method prepends a new row -to the liststore. The row will be empty if row is not -specified or is None. If row is -specified it must contain a list or tuple of ordered column values (e.g. -[gobject.TYPE_STRING, -gobject.TYPE_INT]) that are used to set the values in the -cells of the new row. Alternatively, the application can fill in row cell -values using the set() or -set_value() -methods. - - - - - gtk.ListStore.append - - - append - rowNone - - - - row : - an optional list or tuple containing ordered -column values to set on the row or -None - - - Returns : - A gtk.TreeIter -pointing at the new row - - - - The append() method appends a new row -to the liststore. The row will be empty if row is not -specified or is None. If row is -specified it must contain a list or tuple of ordered column values (e.g. -[gobject.TYPE_STRING, -gobject.TYPE_INT]) that are used to set the values in the -cells of the new row. Alternatively, the application can fill in row cell -values using the set() or -set_value() -methods. - - - - - gtk.ListStore.clear - - - clear - - - The clear() method removes all rows -from the liststore. - - - - - gtk.ListStore.iter_is_valid - - - iter_is_valid - iter - - - - iter : - A gtk.TreeIter. - - - Returns : - True if the iter is valid, - False if the iter is invalid. - - - - - This method is available in PyGTK 2.2 and above. - - - - This method is slow. Only use it for debugging and/or testing -purposes. - - - The iter_is_valid() method checks if -the gtk.TreeIter -specified by iter is a valid iter for this gtk.ListStore. - - - - - gtk.ListStore.reorder - - - reorder - new_order - - - - new_order : - a list of integers mapping the new position of - each child to its old position before the re-ordering, - i.e. new_order[newpos] = - oldpos. - - - - - This method is available in PyGTK 2.2 and above. - - - The reorder() method reorders the gtk.ListStore -items to follow the order indicated by -new_order. Note that this method only works with -unsorted stores. - - - - - gtk.ListStore.swap - - - swap - a - b - - - - a : A - gtk.TreeIter. - - - b : - Another gtk.TreeIter. - - - - - This method is available in PyGTK 2.2 and above. - - - The swap() method swaps the liststore -rows specified by the gtk.TreeIters -a and b. Note that this method -only works with unsorted stores. - - - - - gtk.ListStore.move_after - - - move_after - iter - position - - - - iter : - A gtk.TreeIter. - - - position : - A gtk.TreeIter - or None. - - - - - This method is available in PyGTK 2.2 and above. - - - The move_after() method moves the -liststore row referenced by iter to the position -after the row referenced by position. Note that this -method only works with unsorted stores. If position -is None, the row referenced by -iter will be moved to the start of the list. - - - - - gtk.ListStore.move_before - - - move_before - iter - position - - - - iter : - A gtk.TreeIter. - - - position : - A gtk.TreeIter, - or None. - - - - - This method is available in PyGTK 2.2 and above. - - - The move_before() method moves the -liststore row referenced by iter to the position -before the row referenced by position. Note that this -method only works with unsorted stores. If position -is None, the row referenced by -iter will be moved to the end of the list. - - - - - - diff --git a/docs/reference/pygtk-gtkmenu.xml b/docs/reference/pygtk-gtkmenu.xml deleted file mode 100644 index afd7bb40..00000000 --- a/docs/reference/pygtk-gtkmenu.xml +++ /dev/null @@ -1,1007 +0,0 @@ - - - - - - gtk.Menu - a drop down menu widget. - - - - Synopsis - - - gtk.Menu - gtk.MenuShell - - gtk.Menu - - - popup - parent_menu_shell - parent_menu_item - func - button - activate_time - dataNone - - - reposition - - - popdown - - - get_active - - - set_active - index - - - set_accel_group - accel_group - - - get_accel_group - - - set_accel_path - accel_path - - - attach_to_widget - attach_widget - detach_func - - - detach - - - get_attach_widget - - - set_tearoff_state - torn_off - - - get_tearoff_state - - - set_title - title - - - get_title - - - - reorder_child - child - position - - - set_screen - screen - - - attach - child - left_attach - right_attach - top_attach - bottom_attach - - - set_monitor - monitor_num - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.MenuShell - +-- gtk.Menu - - - - - - gtk.Menu Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.MenuShell Properties - -
- - - - - - - - - "tearoff-state" - Read-Write - If True the menu is torn-off. Default -value: False. Available in GTK+ 2.6 and above. - - - - "tearoff-title" - Read-Write - A title that may be displayed by the window manager -when this menu is torn-off. Default value: "". - - - - - -
- -
- - - gtk.Menu Style Properties - - gtk.Widget Style Properties - - - These properties are available in GTK+ 2.4 and above. - - -
- - - - - - - - - "horizontal-offset" - Read - When the menu is a submenu, position it this number of pixels offset horizontally. Default value: -2. - - - - "horizontal-padding" - Read - Extra space at the left and right edges of the menu - - - - "vertical-offset" - Read - When the menu is a submenu, position it this number of pixels offset vertically. Default value: 0. - - - - "vertical-padding" - Read - Extra space at the top and bottom of the menu. Allowed -values: >= 0. Default value: 1. - - - - - -
- -
- - - gtk.Menu Child Properties - - - These properties are available in GTK+ 2.4 and above. - - -
- - - - - - - - - "bottom-attach" - Read-Write - The row number to attach the bottom of the child - to. Allowed values: >= -1. Default value: -1. - - - - "left-attach" - Read-Write - The column number to attach the left side of the child -to. Allowed values: >= -1. Default value: -1. - - - - "right-attach" - Read-Write - The column number to attach the right side of the child -to. Allowed values: >= -1. Default value: -1. - - - - "top-attach" - Read-Write - The row number to attach the top of the child to. Allowed -values: >= -1. Default value: -1. - - - - - -
- -
- - - gtk.Menu Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.MenuShell Signal Prototypes - - - - "move-scroll" - - callback - menu - type - user_param1 - ... - - - - - - - - - Description - - A gtk.Menu is a gtk.MenuShell -that implements a drop down menu consisting of a list of gtk.MenuItem -objects which can be navigated and activated by the user to perform -application functions. A gtk.Menu is most -commonly dropped down by activating a gtk.MenuItem in a -gtk.MenuBar -or popped up by activating a gtk.MenuItem in -another gtk.Menu. A gtk.Menu can also be -popped up by activating a gtk.OptionMenu. -Other composite widgets such as the gtk.Notebook can -pop up a gtk.Menu as well. -Applications can display a gtk.Menu as a popup -menu by calling the popup() -method. - - - - - Constructor - - - gtk.Menu - - - - Returns : - a gtk.Menu -widget - - - - Creates a new gtk.Menu -widget. - - - - - Methods - - - gtk.Menu.popup - - - popup - parent_menu_shell - parent_menu_item - func - button - activate_time - dataNone - - - - parent_menu_shell : - the menu shell containing the triggering menu -item or None. - - - parent_menu_item : - the menu item whose activation triggered the -popup or None. - - - func : - a user supplied function used to position the -menu or None. - - - button : - the mouse button which was pressed to initiate -the event. - - - activate_time : - the time at which the activation event -occurred. - - - data : - optional data to be passed to - func - - - - The popup() method displays a menu and - makes it available for selection. Applications can use this function - to display context-sensitive menus, and will typically supply - None for the - parent_menu_shell, - parent_menu_item and - func parameters. The default menu positioning - function will position the menu at the current pointer position. The - button and activate_time - values should be the mouse button that was pressed to trigger the menu - popup and the time the button was pressed. These values can usually - be retrieved from the "button_press_event". - - The signature of func is: - - - def func(menu, user_data): - - - where user_data is - data if not - None. func should return a - 3-tuple containing the x and y coordinates of the position to draw the - menu and a boolean that, if True, indicates that - the menu should be pushed in to be completely inside the screen - instead of just clamped to the size of the screen. - - - Prior to PyGTK 2.10 this method did not accept the - data parameter and the signature of - func was: - - - def func(menu, user_data): - - - - - - - gtk.Menu.reposition - - - reposition - - - The reposition() method repositions the -menu on the screen according to the internal position function. - - - - - gtk.Menu.popdown - - - popdown - - - The popdown() method removes the menu -from the screen. - - - - - gtk.Menu.get_active - - - get_active - - - - Returns : - the gtk.MenuItem that -was last selected in the menu. If a selection has not yet been made, the -first menu item is selected. - - - - The get_active() method returns the -selected menu item from the menu. This is used by the gtk.OptionMenu. - - - - - gtk.Menu.set_active - - - set_active - index - - - - index : - the index of the menu item to select. Index -values start from 0. - - - - The set_active() method selects the -menu item within the menu at the location specified by -index. This is used by the gtk.OptionMenu -and is not useful for applications. - - - - - gtk.Menu.set_accel_group - - - set_accel_group - accel_group - - - - accel_group : - a gtk.AccelGroup - - - - The set_accel_group() method associates -the gtk.AccelGroup -specified by accel_group with the menu. The -accelerator group should also be added to all windows using this menu by -calling the gtk.Window.add_accel_group() -method. - - - - - gtk.Menu.get_accel_group - - - get_accel_group - - - - Returns : - the gtk.AccelGroup -associated with the menu. - - - - The get_accel_group() method returns -the gtk.AccelGroup -that holds the global accelerators for the menu. - - - - - gtk.Menu.set_accel_path - - - set_accel_path - accel_path - - - - accel_path : - a valid accelerator path - - - - The set_accel_path() method sets an -accelerator path (specified by accel_path) for this -menu to be used to construct accelerator paths for its menu items. This is a -convenience method used to avoid calling the gtk.MenuItem.set_accel_path() -method on each menu item that should support runtime user changeable -accelerators. Instead, by just calling set_accel_path() -on their parent, each menu item of this menu, that contains a label -describing its purpose, automatically gets an accel path assigned. For -example, calling: - - - menu.set_accel_path("<main>/File") - - - for a menu containing menu items "New" and "Exit", will assign -its items the accel paths: "<main>/File/New" and -"<main>/File/Exit". Assigning accel paths to menu -items enables the user to change their accelerators at runtime. - - - - - gtk.Menu.attach_to_widget - - - attach_to_widget - attach_widget - detach_func - - - - attach_widget : - the widget that the menu will be attached -to. - - - detach_func : - the user supplied callback function that will -be called when the menu calls the detach() -method. - - - - The attach_to_widget() method attaches -the menu to the widget specified by attach_widget and -provides a callback function specified by detach_func -that will be invoked when the menu calls the detach() -method during its destruction. Attaching a menu to a widget associates the -menu with a widget similar to setting a parent. This is mainly used for -associating popup menus with a widget and a submenu with a menuitem. - - The signature of detach is: - - -def detach_cb(widget, menu): - - - where widget is the -attach_widget and menu is the -menu being detached. - - - - - gtk.Menu.detach - - - detach - - - The detach() method detaches the menu -from the widget to which it had been attached. See attach_to_widget(). - - - - - - gtk.Menu.get_attach_widget - - - get_attach_widget - - - - Returns : - the widget that the menu is attached -to. - - - - The get_attach_widget() method returns -the gtk.Widget -that the menu is attached to. - - - - - gtk.Menu.set_tearoff_state - - - set_tearoff_state - torn_off - - - - torn_off : - If True, the menu is -displayed as a tearoff menu. - - - - The set_tearoff_state() method sets the -tearoff state of the menu to the value of torn_off. -If torn_off is True the menu is -displayed as a tearoff menu; if torn_off is -False the menu is displayed as a drop down menu which -persists as long as the menu is active. - - - - - gtk.Menu.get_tearoff_state - - - get_tearoff_state - - - - Returns : - True if the menu is -currently torn off. - - - - The get_tearoff_state() method returns -whether the menu is torn off. See set_tearoff_state(). - - - - - gtk.Menu.set_title - - - set_title - title - - - - title : - a string containing the title for the -menu. - - - - The set_title() method sets the title -text (from the value of title) to be used for the -menu when it is shown as a tearoff menu. - - - - - gtk.Menu.get_title - - - get_title - - - - Returns : - the title of the menu, or -None if the menu has no title set on -it. - - - - The get_title() method returns the -title of the menu or None of no title is set. See set_title(). - - - - - gtk.Menu.reorder_child - - - reorder_child - child - position - - - - child : - the gtk.MenuItem to -move. - - - position : - the new position to place child. Positions are -numbered starting from 0 - - - - The reorder_child() method moves the -menuitem specified by child to a new position within -the menu specified by position. - - - - - gtk.Menu.set_screen - - - set_screen - screen - - - - screen : - a gtk.gdk.Screen, - or None if the screen should be determined by - the widget the menu is attached to. - - - - - This method is available in PyGTK 2.2 and above. - - - The set_screen() method sets the gtk.gdk.Screen -specified by screen on which the menu will be -displayed. If screen is None the -screen is determined by the widget that the menu is attached to. - - - - - gtk.Menu.attach - - - attach - child - left_attach - right_attach - top_attach - bottom_attach - - - - child : - a gtk.MenuItem. - - - left_attach : - The column number to attach the left side of - the item to. - - - right_attach : - The column number to attach the right side of - the item to. - - - top_attach : - The row number to attach the top of the item - to. - - - bottom_attach : - The row number to attach the bottom of the item - to. - - - - - This method is available in PyGTK 2.4 and above. - - - The attach() method adds a new gtk.MenuItem -specified by child to a (table) menu. The number of -'cells' that an item will occupy is specified by -left_attach, right_attach, -top_attach and -bottom_attach. These each represent the leftmost, -rightmost, uppermost and lower column and row numbers of the table. -(Columns and rows are indexed from zero). - - Note that this function is not related to the detach() -method. - - - - - gtk.Menu.set_monitor - - - set_monitor - monitor_num - - - - monitor_num : - the number of the monitor on which the menu - should be popped up - - - - - This method is available in PyGTK 2.4 and above. - - - The set_monitor() method informs -GTK+ on which monitor a menu should be popped up. See -the gtk.gdk.Screen.get_monitor_geometry() -method for more information. - - This method should be called from a menu positioning function if -the menu should not appear on the same monitor as the pointer. This -information can't be reliably inferred from the coordinates returned by a -menu positioning function, since, for very long menus, these coordinates may -extend beyond the monitor boundaries or even the screen boundaries. - - - - - - - Signals - - - The "move_scroll" gtk.Menu Signal - - - callback - menu - type - user_param1 - ... - - - - - menu : - the menu that received the -signal - - - type : - the type of scroll that is requested - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.2 and above. - - - The "move_scroll" signal is emitted when the user attempts to -scroll the menu. type should be one of the . - - - - - -
diff --git a/docs/reference/pygtk-gtkmenubar.xml b/docs/reference/pygtk-gtkmenubar.xml deleted file mode 100644 index 7c112470..00000000 --- a/docs/reference/pygtk-gtkmenubar.xml +++ /dev/null @@ -1,301 +0,0 @@ - - - - - - gtk.MenuBar - a widget that displays gtk.MenuItem -widgets horizontally - - - - Synopsis - - - gtk.MenuBar - gtk.MenuShell - - gtk.MenuBar - - - set_pack_direction - pack_dir - - - get_pack_direction - - - set_child_pack_direction - child_pack_dir - - - get_child_pack_direction - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.MenuShell - +-- gtk.MenuBar - - - - - - gtk.MenuBar Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.MenuShell Properties - -
- - - - - - - - - "child-pack-direction" - Read-Write - The pack direction of the menubar. It determines how -the widgets contained in child menuitems are arranged. -Default value: gtk.PACK_DIRECTION_LTR. -Available in GTK+ 2.8 and above. - - - - "pack-direction" - Read-Write - The pack direction of the menubar. It determines how -menuitems are arranged in the menubar. -Default value: gtk.PACK_DIRECTION_LTR. -Available in GTK+ 2.8 and above. - - - - - -
- -
- - - gtk.MenuBar Style Properties - - gtk.Widget Style Properties - -
- - - - - - - - - "internal-padding" - Read - Amount of border space between the menubar shadow and -the menu items - - - - "shadow-type" - Read - The style of bevel around the menubar - - - - - -
- -
- - - gtk.MenuBar Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.MenuShell Signal Prototypes - - - - Description - - The gtk.MenuBar is a -subclass of gtk.MenuShell -which contains one or more gtk.MenuItem -widgets. A gtk.MenuBar -displays the menu items horizontally in an application window or -dialog. - - - - - Constructor - - - gtk.MenuBar - - - - Returns : - a new gtk.MenuBar -widget - - - - Creates a new gtk.MenuBar -widget. - - - - - Methods - - - gtk.MenuBar.set_pack_direction - - - set_pack_direction - pack_dir - - - - pack_dir : - one of the . - - - - - This method is available in PyGTK 2.8 and above. - - - The set_pack_direction() sets the -"pack-direction" property to the value of -pack_dir. pack_dir must be one -of the that specify how -menuitems are arranged in the menubar. - - - - - gtk.MenuBar.get_pack_direction - - - get_pack_direction - - - - Returns : - the current pack direction of the -menubar. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_pack_direction() method returns -the value of the "pack-direction" property that specifies the arrangement -of menuitems in the menubar. See the for more -information. - - - - - gtk.MenuBar.set_child_pack_direction - - - set_child_pack_direction - child_pack_dir - - - - child_pack_dir : - one of the . - - - - - This method is available in PyGTK 2.8 and above. - - - The set_child_pack_direction() method -sets the "child-pack-direction" property to the value of -child_pack_dir. child_pack_dir -must be one of the that specify how -menuitems are arranged in the child menuitems of the menubar. - - - - - gtk.MenuBar.get_child_pack_direction - - - get_child_pack_direction - - - - Returns : - the current child pack -direction - - - - - This method is available in PyGTK 2.8 and above. - - - The get_child_pack_direction() method -returns the value of the "child-pack-direction" property that specifies the -arrangement of menuitems in thechild menuitems of the menubar. See the for more -information. - - - - - -
diff --git a/docs/reference/pygtk-gtkmenuitem.xml b/docs/reference/pygtk-gtkmenuitem.xml deleted file mode 100644 index 725e7550..00000000 --- a/docs/reference/pygtk-gtkmenuitem.xml +++ /dev/null @@ -1,698 +0,0 @@ - - - - - - gtk.MenuItem - the widget used for an item in menus - - - - Synopsis - - - gtk.MenuItem - gtk.Item - - gtk.MenuItem - labelNone - use_underline - True - - - set_submenu - submenu - - - get_submenu - - - - remove_submenu - - - - select - - - - deselect - - - - activate - - - - toggle_size_request - - - - toggle_size_allocate - allocation - - - set_right_justified - right_justified - - - get_right_justified - - - - set_accel_path - accel_path - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Item - +-- gtk.MenuItem - - - - - - gtk.MenuItem Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - - - - - gtk.MenuItem Style Properties - - gtk.Widget Style Properties - -
- - - - - - - - - "arrow-spacing" - Read - Space between label and arrow. Allowed values: >= 0. - Default value: 10 - - - - "horizontal-padding" - Read - Padding to left and right of the menu item. Allowed - values: >= 0. Default value: 3 - - - - "selected-shadow-type" - Read - The shadow type when the item is selected. Default - value: gtk.SHADOW_NONE - - - - "toggle-spacing" - Read - Space between icon and label. Allowed values: >= 0. - Default value: 5 - - - - - -
- -
- - - gtk.MenuItem Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Item Signal Prototypes - - - - "activate" - - callback - menuitem - - user_param1 - - ... - - - - - - "activate-item" - - callback - menuitem - - user_param1 - - ... - - - - - - "toggle-size-allocate" - - callback - menuitem - - allocation - - user_param1 - - ... - - - - - - "toggle-size-request" - - callback - menuitem - - requisition - - user_param1 - - ... - - - - - - - - - - Description - - The gtk.MenuItem -widget implements the appearance and behavior of menu items. The gtk.MenuItem and -its derived widget subclasses are the only valid children of menus. - - When menu items are selected and activated by a user they -can: - - - - display a popup menu if they have an associated -submenu - - - invoke an associated function or method - - - - As a gtk.MenuItem is a -subclass of gtk.Bin it can hold any -valid child widget. - - - - - Constructor - - - gtk.MenuItem - labelNone - use_underline - True - - - - label : - a string to be used as the text of the menu item -or None - - - use_underline : - if True, an underscore in the -label text indicates the next character should be underlined and used for the -mnemonic accelerator key if it is the first character so -marked. Available in PyGTK 2.4 and above. - - - Returns : - a new gtk.MenuItem -widget - - - - Creates a new gtk.MenuItem -widget and sets the text of the menu item label to the value of -label. If label is -None no label is created for the menu item. The text of -label is parsed for underscore characters that indicate that the next -character is a mnemonic accelerator. - - In PyGTK 2.4 and above the use_underline -parameter is available and defaults to True. If -use_underline is set to False the -label text will not be parsed for mnemonic characters. - - - - - Methods - - - gtk.MenuItem.set_submenu - - - set_submenu - submenu - - - - submenu : - the menu to use as the -submenu - - - - The set_submenu() method sets the menu -specified by submenu as the submenu for the menu -item. - - - - - gtk.MenuItem.get_submenu - - - get_submenu - - - - - Returns : - the submenu for this menu item, or -None if there is no submenu. - - - - The get_submenu() method returns the -submenu widget associated with this menu item. If there is no submenu this -method returns None. See set_submenu(). - - - - - gtk.MenuItem.remove_submenu - - - remove_submenu - - - - The remove_submenu() method removes the -submenu associated with the menu item. - - - - - - gtk.MenuItem.select - - - select - - - - The select() method emits the "select" -signal on the menu item. - - - - - - gtk.MenuItem.deselect - - - deselect - - - - The deselect() method emits the -"deselect" signal on the menu item. - - - - - gtk.MenuItem.activate - - - activate - - - - The activate() method emits the -"activate" signal on the menu item. - - - - - gtk.MenuItem.toggle_size_request - - - toggle_size_request - - - - - Returns : - the size requisition - - - - - This method is available in PyGTK 2.4 and above. - - - The toggle_size_request() method emits -the "toggle-size-request" signal on the menuitem and returns the size -requested for the menuitem. - - - - - gtk.MenuItem.toggle_size_allocate - - - toggle_size_allocate - allocation - - - - allocation : - the allocation size for the menu -item - - - - The toggle_size_allocate() method emits -the "toggle-size-allocate" signal on the menu item. - - - - - gtk.MenuItem.set_right_justified - - - set_right_justified - right_justified - - - - right_justified : - if True the menu item will -appear at the far right if added to a menu bar. - - - - The set_right_justified() method sets -the justification of the menu item according to the value of -right_justified. If -right_justified is True the menu -item will appear at the right side of a menu bar. If the widget layout is -reversed for a right-to-left language like Hebrew or Arabic, -right-justified-menu-items appear on the left. - - - - - gtk.MenuItem.get_right_justified - - - get_right_justified - - - - - Returns : - True if the menu item will -appear at the far right if added to a menu bar. - - - - The get_right_justified() method gets -the justification of the menu item. If True the menu item -appears justified at the right side of the menu bar. - - - - - gtk.MenuItem.set_accel_path - - - set_accel_path - accel_path - - - - accel_path : - the accelerator path, corresponding to this -menu item - - - - The set_accel_path() method sets the -accelerator path on the menu item. The accelerator path provides access to -the menu item's accelerator allowing user changes to be identified and saved -to persistent storage. See also the gtk.Menu.set_accel_path() -method for a more convenient variant of this function. This method is a -convenience wrapper that handles calling gtk.Widget.set_accel_path() -with the appropriate accelerator group for the menu item. - - - - - - - Signals - - - The "activate" gtk.MenuItem Signal - - - callback - menuitem - user_param1 - ... - - - - - menuitem : - the menuitem that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "activate" signal is emitted when the menu item is -activated. - - - - - The "activate-item" gtk.MenuItem Signal - - - callback - menuitem - user_param1 - ... - - - - - menuitem : - the menuitem that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "activate-item" signal is emitted when the menu item is -activated, but also if the menu item has a submenu. For normal applications, -the relevant signal is "activate". - - - - - The "toggle-size-allocate" gtk.MenuItem Signal - - - callback - menuitem - allocation - user_param1 - ... - - - - - menuitem : - the menuitem that received the -signal - - - allocation : - the size allocation for the -menuitem - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "toggle-size-allocate" signal is emitted when the size -allocation is changed. - - - - - The "toggle-size-request" gtk.MenuItem Signal - - - callback - menuitem - requisition - user_param1 - ... - - - - - menuitem : - the menuitem that received the -signal - - - requisition : - the pointer to the location to put the size -request - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "toggle-size-request" signal is emitted when a new size -request is needed. - - - - - -
diff --git a/docs/reference/pygtk-gtkmenushell.xml b/docs/reference/pygtk-gtkmenushell.xml deleted file mode 100644 index 63fbaf1d..00000000 --- a/docs/reference/pygtk-gtkmenushell.xml +++ /dev/null @@ -1,829 +0,0 @@ - - - - - - gtk.MenuShell - a base class for menu objects. - - - - Synopsis - - - gtk.MenuShell - gtk.Container - - append - child - - - prepend - child - - - insert - child - position - - - deactivate - - - select_item - menu_item - - - deselect - - - activate_item - menu_item - force_deactivate - - - select_first - search_sensitive - - - cancel - - - set_take_focus - take_focus - - - get_take_focus - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.MenuShell - - - - - - gtk.MenuShell Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - -
- - - - - - - - - "take-focus" - Read-Write - If True the menu and its submenus grab -the keyboard focus on popup. Default value: True. -Available in GTK+ 2.8 and above. - - - - - -
- -
- - - gtk.MenuShell Style Properties - - gtk.Widget Style Properties - - - - - gtk.MenuShell Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - "activate-current" - - callback - menushell - - force_hide - - user_param1 - - ... - - - - - - "cancel" - - callback - menushell - - user_param1 - - ... - - - - - - "cycle-focus" - - callback - menushell - - direction - - user_param1 - - ... - - - - - - "deactivate" - - callback - menushell - - user_param1 - - ... - - - - - - "move-current" - - callback - menushell - - direction - - user_param1 - - ... - - - - - - "selection-done" - - callback - menushell - - user_param1 - - ... - - - - - - - - - - Description - - A gtk.MenuShell is -the abstract base class used to derive the gtk.Menu and gtk.MenuBar -subclasses. A gtk.MenuShell is -a container of gtk.MenuItem -objects arranged in a list which can be navigated, selected, and activated -by the user to perform application functions. A gtk.MenuItem can -have a submenu associated with it, allowing for nested hierarchical -menus. - - - - - Methods - - - gtk.MenuShell.append - - - append - child - - - - child : - The gtk.MenuItem to -add. - - - - The append() method adds a new gtk.MenuItem -specified by child to the end of the menu shell's -item list. - - - - - gtk.MenuShell.prepend - - - prepend - child - - - - child : - The gtk.MenuItem to -add. - - - - The prepend() method adds a new gtk.MenuItem -specified by child to the beginning of the menu -shell's item list. - - - - - gtk.MenuShell.insert - - - insert - child - position - - - - child : - The gtk.MenuItem to -add. - - - position : - The position in the item list where child -should be added. Positions are numbered starting from -0. - - - - The insert() method adds a new gtk.MenuItem -specified by child to the menu shell's item list at -the position specified by position. - - - - - gtk.MenuShell.deactivate - - - deactivate - - - The deactivate() method deactivates the -menu shell. Typically this results in the menu shell being removed from the -screen. - - - - - gtk.MenuShell.select_item - - - select_item - menu_item - - - - menu_item : - The gtk.MenuItem to -select. - - - - The select_item() method selects the -menu item specified by menu_item from the menu -shell. - - - - - gtk.MenuShell.deselect - - - deselect - - - The deselect() method deselects the -currently selected item from the menu shell, if any. - - - - - gtk.MenuShell.activate_item - - - activate_item - menu_item - force_deactivate - - - - menu_item : - The gtk.MenuItem to -activate. - - - force_deactivate : - If True, force the -deactivation of the menu shell after the menu item is -activated. - - - - The activate_item() method activates -the menu item specified by menu_item. If -force_deactivate is True the -menushell is forcibly deactivated after menu_item is -activated. - - - - - gtk.MenuShell.select_first - - - select_first - search_sensitive - - - - search_sensitive : - if True, search for the - first selectable menu item, otherwise select nothing if the first - item isn't sensitive. - - - - - This method is available in PyGTK 2.2 and above. - - - The select_first() method selects the -first visible or selectable child of the menu shell if -search_sensitive is True. Don't -select tearoff items unless the only item is a tearoff item. If -search_sensitive is False select -nothing if the first item isn't sensitive. -search_sensitive should be False -if the menu is being popped up initially. - - - - - gtk.MenuShell.cancel - - - cancel - - - - - This method is available in PyGTK 2.4 and above. - - - The cancel() method cancels the -selection within the menu shell. - - - - - gtk.MenuShell.set_take_focus - - - set_take_focus - take_focus - - - - take_focus : - if True, the menu shell should -take the keyboard focus on popup. - - - - - This method is available in PyGTK 2.8 and above. - - - The set_take_focus() method sets the -"take-focus" property to the value of take_focus. If -take_focus is True the menu shell -will take the keyboard focus so that it will receive all keyboard events to -enable keyboard navigation in menus. - - Setting the "take-focus" property to False is -useful only for special applications like virtual keyboard implementations -which should not take keyboard focus. - - The "take-focus" state of a menu or menu bar is automatically -propagated to submenus whenever a submenu is popped up, so you don't have to -worry about recursively setting it for your entire menu hierarchy. Only when -programmatically picking a submenu and popping it up manually, should the -"take-focus" property of the submenu be set explicitly. - - Note that setting it to False has side-effects: - - - - If the focus is in some other app, it keeps the focus and -keyboard navigation in the menu doesn't work. Consequently, keyboard -navigation on the menu will only work if the focus is on some toplevel owned -by the onscreen keyboard. - - - - To avoid confusing the user, menus with the "take-focus" -property set to False should not display mnemonics or -accelerators, since they may not work. - - - - Also see the gtk.gdk.keyboard_grab() -function for more information. - - - - - gtk.MenuShell.get_take_focus - - - get_take_focus - - - - Returns : - True if the men shell will -take keyboard foucs on popup. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_take_focus() method returns the -value of the "take-focus" property. See the set_take_focus() -method for more information. - - - - - - - Signals - - - The "activate-current" gtk.MenuShell Signal - - - callback - menushell - force_hide - user_param1 - ... - - - - - menushell : - the menushell that received the -signal - - - force_hide : - if True, hide the menu after activating the -menu item. - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "activate-current" signal is emitted to activate the current -menu item in the menushell. - - - - - The "cancel" gtk.MenuShell Signal - - - callback - menushell - user_param1 - ... - - - - - menushell : - the menushell that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "cancel" signal is emitted to cancel the selection in the -menushell. Also causes the "selection-done" signal -to be emitted. - - - - - The "cycle-focus" gtk.MenuShell Signal - - - callback - menushell - user_param1 - ... - - - - - menushell : - the menushell that received the -signal - - - direction : - the direction to cycle the focus; one of: -gtk.DIR_TAB_FORWARD, -gtk.DIR_TAB_BACKWARD, gtk.DIR_UP, -gtk.DIR_DOWN, gtk.DIR_LEFT or -gtk.DIR_RIGHT - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "cycle-focus" signal is emitted when an action occurs requesting the focus move to the next menubar. - - - - - The "deactivate" gtk.MenuShell Signal - - - callback - menushell - user_param1 - ... - - - - - menushell : - the menushell that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "deactivate" signal is emitted when the menushell is -deactivated. - - - - - The "move-current" gtk.MenuShell Signal - - - callback - menushell - direction - user_param1 - ... - - - - - menushell : - the menushell that received the -signal - - - direction : - the direction to move; one of: -gtk.MENU_DIR_PARENT, -gtk.MENU_DIR_CHILD, gtk.MENU_DIR_NEXT -or gtk.MENU_DIR_PREV - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "move-current" signal is emitted when the current menu item -is to be moved in the direction specified by -direction which is one of: - - - - 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. - - - - - - - - The "selection-done" gtk.MenuShell Signal - - - callback - menushell - user_param1 - ... - - - - - menushell : - the menushell that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "selection-done" signal is emitted when a selection has been -completed within a menu shell. - - - - - -
diff --git a/docs/reference/pygtk-gtkmenutoolbutton.xml b/docs/reference/pygtk-gtkmenutoolbutton.xml deleted file mode 100644 index baef3581..00000000 --- a/docs/reference/pygtk-gtkmenutoolbutton.xml +++ /dev/null @@ -1,363 +0,0 @@ - - - - - - gtk.MenuToolButton - A gtk.ToolItem -containing a button with an additional dropdown menu (new in PyGTK -2.6) - - - - Synopsis - - - gtk.MenuToolButton - gtk.ToolButton - - gtk.MenuToolButton - stock_id - - - gtk.MenuToolButton - icon_widget - label - - - set_menu - menu - - - get_menu - - - - set_arrow_tooltip - tooltips - tip_text - tip_privateNone - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.ToolItem - +-- gtk.ToolButton - +-- gtk.MenuToolButton - - - - - - gtk.MenuToolButton Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.ToolItem Properties - gtk.ToolButton Properties - -
- - - - - - - - - "menu" - Read-Write - The dropdown gtk.Menu. - - - - - -
- -
- - - gtk.MenuToolButton Style Properties - - gtk.Widget Style Properties - gtk.ToolButton Style Properties - - - - - gtk.MenuToolButton Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.ToolItem Signal Prototypes - gtk.ToolButton Signal Prototypes - - - - "show-menu" - - callback - menutoolbutton - user_param1 - ... - - - - - - - - - Description - - - This widget is available in PyGTK 2.6 and above. - - - A gtk.MenuToolButton -is a gtk.ToolItem that -contains a button and a small additional button with an arrow. When clicked, -the arrow button pops up a dropdown menu. - - - - - Constructor - - - gtk.MenuToolButton - - - gtk.MenuToolButton - stock_id - - - - stock_id : - - - - Returns : - a new gtk.MenuToolButton - - - - - This constructor is available in PyGTK 2.6 and above. - - - Creates a new gtk.MenuToolButton -using from the stock item specified by stock_id. The -new gtk.MenuToolButton -will contain the icon and label associated with -stock_id. - - - - - gtk.MenuToolButton - - - gtk.MenuToolButton - icon_widget - label - - - - icon_widget : - a widget that will be used as icon widget, -or None - - - label : - a string that will be used as label, or -None - - - Returns : - a new gtk.MenuToolButton - - - - - This constructor is available in PyGTK 2.6 and above. - - - Creates a new gtk.MenuToolButton -using the icon specified by icon_widget and the label -specified by label. - - - - - - - Methods - - - gtk.MenuToolButton.set_menu - - - set_menu - menu - - - - menu : - a gtk.Menu - - - - - This method is available in PyGTK 2.6 and above. - - - The set_menu() method sets the "menu" -property to the gtk.Menu specified by -menu. - - - - - gtk.MenuToolButton.get_menu - - - get_menu - - - - Returns : - the associated gtk.Menu - - - - - This method is available in PyGTK 2.6 and above. - - - The get_menu() method returns the value -of the "menu" property that contains the associated gtk.Menu. - - - - - gtk.MenuToolButton.set_arrow_tooltip - - - set_arrow_tooltip - tooltips - tip_text - tip_privateNone - - - - tooltips : - A gtk.Tooltips -object. - - - tip_text : - The text to use as the tooltip or -None - - - tip_private : - Opitonal private tooltip text or -None. Defaults to -None. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_arrow_tooltip() method sets the -tooltip data specified by tip_text for the arrow -button using the gtk.Tooltips -object specified by tooltips. - - - - - - - Signals - - - The "show-menu" gtk.MenuToolButton Signal - - - callback - menutoolbutton - user_param1 - ... - - - - - menutoolbutton : - the menutoolbutton that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.6 and above. - - - The "show-menu" signal is emitted before the dropdown menu is -displayed. - - - - - -
diff --git a/docs/reference/pygtk-gtkmessagedialog.xml b/docs/reference/pygtk-gtkmessagedialog.xml deleted file mode 100644 index 8528393c..00000000 --- a/docs/reference/pygtk-gtkmessagedialog.xml +++ /dev/null @@ -1,469 +0,0 @@ - - - - - - gtk.MessageDialog - a convenient message window - - - - Synopsis - - - gtk.MessageDialog - gtk.Dialog - - gtk.MessageDialog - parentNone - flags0 - typegtk.MESSAGE_INFO - buttonsgtk.BUTTONS_NONE - message_formatNone - - - set_markup - str - - - format_secondary_text - message_format - - - format_secondary_markup - message_format - - - set_image - image - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Window - +-- gtk.Dialog - +-- gtk.MessageDialog - - - - - - gtk.MessageDialog Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Window Properties - gtk.Dialog Properties - -
- - - - - - - - - "buttons" - Write-Construct - The buttons shown in the message dialog. One of the -: -gtk.BUTTONS_NONE, -gtk.BUTTONS_OK, -gtk.BUTTONS_CLOSE, -gtk.BUTTONS_CANCEL, -gtk.BUTTONS_YES_NO, -gtk.BUTTONS_OK_CANCEL. Default value: -gtk.BUTTONS_NONE - - - - "image" - Read-Write - The image for this dialog. Available in GTK+ - 2.10. - - - - "message-type" - Read-Write-Construct - The type of message. One of the -: -gtk.MESSAGE_INFO, gtk.MESSAGE_WARNING, -gtk.MESSAGE_QUESTION or -gtk.MESSAGE_ERROR. Default value: -gtk.MESSAGE_INFO - - - - "secondary-text" - Read-Write - The secondary text of the message dialog. Default - value: None. Available in GTK+ - 2.10. - - - - "secondary-use-markup" - Read-Write - If True the secondary text of the - dialog includes Pango markup. See the pango.parse_markup() - function. Default value: False. Available - in GTK+ 2.10. - - - - "text" - Read-Write - The primary text of the message dialog. If the dialog - has a secondary text, this will appear as the title. Default - value: None. Available in GTK+ - 2.10. - - - - "use-markup" - Read-Write - If True the primary text of the - dialog includes Pango markup. See the pango.parse_markup() - function. Default value: False. Available - in GTK+ 2.10. - - - - - -
- -
- - - gtk.MessageDialog Style Properties - - gtk.Widget Style Properties - gtk.Dialog Style Properties - -
- - - - - - - - - "message-border" - Read-Write - The width of border around the label and image in the -message dialog. Allowed values: >= 0. Default value: 12. - - - - "use-separator" - Read - If True draw a separator line between - the message label and the buttons in the dialog. This property is - available in GTK+ 2.4 and above. - - - - - -
- -
- - - Attributes - -
- - - - - - - - - - "image" - Read - The stock ID image - - - - "label" - Read - The label widget that contains the message -text. - - - - - -
- -
- - - gtk.MessageDialog Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Window Signal Prototypes - gtk.Dialog Signal Prototypes - - - - Description - - The gtk.MessageDialog -presents a dialog with an image representing the type of message (Error, -Question, etc.) alongside some message text. It's simply a convenience -widget; you could construct the equivalent of gtk.MessageDialog -from gtk.Dialog without -too much effort, but gtk.MessageDialog -saves time. - - The gtk.MessageDialog -types are listed in the . - - A selection of predefined button sets is available for use in a -message dialog. See the . - - See the gtk.Dialog reference -page for additional methods to be used with the gtk.MessageDialog. - - - - - Constructor - - - gtk.MessageDialog - parentNone - flags0 - typegtk.MESSAGE_INFO - buttonsgtk.BUTTONS_NONE - message_formatNone - - - - parent : - the transient parent, or None if -none - - - flags : - the dialog flags - a combination of: -gtk.DIALOG_MODAL, -gtk.DIALOG_DESTROY_WITH_PARENT or 0 for no -flags - - - type : - the type of message: -gtk.MESSAGE_INFO, gtk.MESSAGE_WARNING, -gtk.MESSAGE_QUESTION or -gtk.MESSAGE_ERROR. - - - buttons : - the predefined set of buttons to use: -gtk.BUTTONS_NONE, gtk.BUTTONS_OK, -gtk.BUTTONS_CLOSE, gtk.BUTTONS_CANCEL, -gtk.BUTTONS_YES_NO, -gtk.BUTTONS_OK_CANCEL - - - message_format : - a string containing the message text or -None - - - Returns : - a new gtk.MessageDialog -widget - - - - Creates a new gtk.MessageDialog, -which is a simple dialog with an icon indicating the dialog type (error, -warning, etc.) specified by type and some text -(message_format) the user may want to see. -parent if specified indicates the transient parent of -the dialog. The flags allow the specification special -dialog characteristics: make the dialog modal -(gtk.DIALOG_MODAL) and destroy the dialog when the parent is -destroyed (gtk.DIALOG_DESTROY_WITH_PARENT). When the user -clicks a button a "response" signal is emitted with response IDs. -buttons specifies the set of predefined buttons to -use: gtk.BUTTONS_NONE, gtk.BUTTONS_OK, -gtk.BUTTONS_CLOSE, gtk.BUTTONS_CANCEL, -gtk.BUTTONS_YES_NO, -gtk.BUTTONS_OK_CANCEL. See gtk.Dialog for more -details. - - - - - Methods - - - gtk.MessageDialog.set_markup - - - set_markup - str - - - - str : - a markup string (see the Pango markup language - reference) - - - - - This method is available in PyGTK 2.4 and above. - - - The set_markup() method sets the text -of the message dialog to the contents of str. If -str contains text marked up with Pango markup (see -), it will be displayed with -those attributes. Note the '<', '>' and '&' characters must be -replaced with '&lt;', '&gt;' and '&amp;' respectively to be -displayed literally. - - - - - gtk.MessageDialog.format_secondary_text - - - format_secondary_text - message_format - - - - message_format : - The text to be displayed as the secondary text -or None. - - - - - This method is available in PyGTK 2.6 and above. - - - The format_secondary_text() method sets -the secondary text of the message dialog to the text specified by -message_format. Note that setting a secondary text -makes the primary text bold, unless you have provided explicit -markup. - - - - - gtk.MessageDialog.format_secondary_markup - - - format_secondary_markup - message_format - - - - message_format : - A string containing the pango markup to use as -secondary text. - - - - - This method is available in PyGTK 2.6 and above. - - - The format_secondary_markup() method -sets the secondary text to the markup text specified by -message_format. Note that setting a secondary text -makes the primary text become bold, unless you have provided explicit -markup. - - - - - gtk.MessageDialog.set_image - - - set_image - image - - - - - image : - the image widget - - - - - This method is available in PyGTK 2.10 and above. - - - The set_image() method sets the - dialog's image to the gtk.Widget - specified by image. - - - - - -
diff --git a/docs/reference/pygtk-gtkmisc.xml b/docs/reference/pygtk-gtkmisc.xml deleted file mode 100644 index 1e8b6715..00000000 --- a/docs/reference/pygtk-gtkmisc.xml +++ /dev/null @@ -1,246 +0,0 @@ - - - - - - gtk.Misc - a base class for widgets with alignments and -padding. - - - - Synopsis - - - gtk.Misc - gtk.Widget - - set_alignment - xalign - yalign - - - get_alignment - - - - set_padding - xpad - ypad - - - get_padding - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Misc - - - - - - gtk.Misc Properties - - gtk.Object Properties - gtk.Widget Properties - -
- - - - - - - - - "xalign" - Read-Write - The horizontal alignment, from 0.0 to 1.0 - - - "xpad" - Read-Write - The amount of space to add on the left and right of the -widget, in pixels - - - "yalign" - Read-Write - The vertical alignment, from 0.0 to 1.0 - - - "ypad" - Read-Write - The amount of space to add above and below the widget, -in pixels - - - - - -
- -
- - - gtk.Misc Style Properties - - gtk.Widget Style Properties - - - - - gtk.Misc Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - - - - Description - - The gtk.Misc widget is an -abstract widget used to derive subclasses which have alignment and padding -attributes. The horizontal and vertical padding attributes allow extra space -to be added around the widget. The horizontal and vertical alignment -attributes enable the widget to be positioned within its allocated area. The -alignment values represent the fraction of available free space (allocation -minus the widget size) to place to the left or above the widget for x and y -alignment respectively. 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 have no effect. - - - - - Methods - - - gtk.Misc.set_alignment - - - set_alignment - xalign - yalign - - - - xalign : - the horizontal alignment - - - yalign : - the vertical alignment - - - - The set_alignment() method sets the -alignment of the widget in its allocated space. xalign -sets the fraction (0.0-1.0) of free space (horizontal allocation minus -widget width) to place to the left of the widget. -yalign sets the fraction (0.0-1.0) of free space -(vertical allocation minus widget height) to place above the widget. - - - - - gtk.Misc.get_alignment - - - get_alignment - - - - - Returns : - a tuple containing the X and Y alignments of the -widget - - - - The get_alignment() method returns a -tuple containing the X and Y alignments of the widget within its allocation. -See set_alignment(). - - - - - gtk.Misc.set_padding - - - set_padding - xpad - ypad - - - - 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 set_padding() method sets the -amount of space to add around the widget. The xpad -value specifies the number of pixels of padding to add to the left and right -of the widget. The yalign value specifies the number -of pixels to add above and below the widget. - - - - - gtk.Misc.get_padding - - - get_padding - - - - - Returns : - a tuple containing the horizontal and vertical -padding in pixels for the widget. - - - - The get_padding() method returns a -tuple containing the padding in the horizontal and vertical directions of -the widget. See set_padding(). - - - - - -
diff --git a/docs/reference/pygtk-gtknotebook.xml b/docs/reference/pygtk-gtknotebook.xml deleted file mode 100644 index 3bcc0c94..00000000 --- a/docs/reference/pygtk-gtknotebook.xml +++ /dev/null @@ -1,2455 +0,0 @@ - - - - - - gtk.Notebook - a tabbed notebook container. - - - - Synopsis - - - gtk.Notebook - gtk.Container - - gtk.Notebook - - - append_page - child - tab_labelNone - - - append_page_menu - child - tab_labelNone - menu_labelNone - - - prepend_page - child - tab_labelNone - - - prepend_page_menu - child - tab_labelNone - menu_labelNone - - - insert_page - child - tab_labelNone - position-1 - - - insert_page_menu - child - tab_labelNone - menu_labelNone - position-1 - - - remove_page - page_num - - - get_current_page - - - get_nth_page - page_num - - - get_n_pages - - - - page_num - child - - - set_current_page - page_num - - - next_page - - - prev_page - - - set_show_border - show_border - - - get_show_border - - - set_show_tabs - show_tabs - - - get_show_tabs - - - set_tab_pos - pos - - - get_tab_pos - - - set_scrollable - scrollable - - - get_scrollable - - - popup_enable - - - popup_disable - - - get_tab_label - child - - - set_tab_label - child - tab_labelNone - - - set_tab_label_text - child - tab_text - - - get_tab_label_text - child - - - get_menu_label - child - - - set_menu_label - child - menu_labelNone - - - set_menu_label_text - child - menu_text - - - get_menu_label_text - child - - - query_tab_label_packing - child - - - set_tab_label_packing - child - expand - fill - pack_type - - - reorder_child - child - position - - - set_group_id - group_id - - - get_group_id - - - - get_tab_reorderable - child - - - set_tab_reorderable - child - reorderable - - - get_tab_detachable - child - - - set_tab_detachable - child - detachable - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Notebook - - - - - - gtk.Notebook Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - -
- - - - - - - - - "enable-popup" - Read-Write - If True, pressing the right mouse - button on the notebook pops up a menu that you can use to go - to a page. Default value: False. - - - "group-id" - Read-Write - Group ID for tabs drag and drop. Allowed values: >= - -1. Default value: -1. - - - - "homogeneous" - Read-Write - If True, tabs should have - homogeneous sizes. Default value: - False. - - - "page" - Read-Write - The index of the current page. Allowed values: >= 0. - Default value: 0. - - - "scrollable" - Read-Write - If True, scroll arrows are added if - there are too many tabs to fit. Default value: - False. - - - "show-border" - Read-Write - If True, the border should be shown. - Default value: True. - - - "show-tabs" - Read-Write - If True, tabs should be shown. - Default value: True. - - - "tab-border" - Write - The width of the border around the tab labels. Default - value: 2. - - - "tab-hborder" - Read-Write - The width of the horizontal border of tab labels. - Default value: 2. - - - "tab-pos" - Read-Write - The side of the notebook that holds the tabs - one of - the : - gtk.POS_LEFT, - gtk.POS_RIGHT, - gtk.POS_TOP or - gtk.POS_BOTTOM. Default value: - gtk.POS_TOP. - - - "tab-vborder" - Read-Write - The width of the vertical border of tab labels. - Default value: 2, - - - - - -
- -
- - - gtk.Notebook Style Properties - - gtk.Widget Style Properties - -
- - - - - - - - - "arrow-spacing" - Read-Write - The "arrow-size" property defines the spacing between - the scroll arrows and the tabs. Allowed values: >= 0. - Default value: 0. Available in GTK+ 2.10. - - - - "has-backward-stepper" - Read-Write - If True the standard backward arrow - button is displayed. Default value: - True. Available in GTK+ 2.4 and - above. - - - - "has-forward-stepper" - Read-Write - If True the standard forward arrow - button is displayed. Default value: - True. Available in GTK+ 2.4 and above. - - - - "has-secondary-backward-stepper" - Read-Write - If True a second backward arrow - button is displayed on the opposite end of the tab - area. Default value: False. Available in - GTK+ 2.4 and above. - - - - "has-secondary-forward-stepper" - Read-Write - If True a second forward arrow - button is displayed on the opposite end of the tab - area. Default value: False. Available in - GTK+ 2.4 and above. - - - - "tab-curvature" - Read-Write - The "tab-curvature" property defines size of tab - curvature. Allowed values: >= 0. Default value: 1. Available - in GTK+ 2.10. - - - - "tab-overlap" - Read-Write - The "tab-overlap" property defines size of tab overlap - area. Default value: 2. Available in GTK+ 2.10. - - - - - -
- -
- - - gtk.Notebook Child Properties - -
- - - - - - - - - "detachable" - Read-Write - if True the tab is detachable. - Default value: False. - - - - "menu-label" - Read-Write - The string displayed in the child's menu entry. - Default value: None - - - "position" - Read-Write - The index of the child in the parent. Allowed values: - >= -1 Default value: 0. - - - "tab-expand" - Read-Write - If True, expand the child's tabs. - Default value: False. - - - "tab-fill" - Read-Write - If True, the child's tab should fill - the allocated area. Default value: - True. - - - "tab-label" - Read-Write - The string displayed on the child's tab label. Default - value: None. - - - tab-pack"" - Read-Write - A pack type indicating whether the child is packed with - reference to the start or end of the parent - one of the : - gtk.PACK_START or - gtk.PACK_END. Default value: - gtk.PACK_START. - - - - - -
- -
- - - Attributes - -
- - - - - - - - - - "tab_pos" - Read - The side of the notebook that holds the tabs: -gtk.POS_LEFT, gtk.POS_RIGHT, -gtk.POS_TOP or gtk.POS_BOTTOM - - - - - -
- -
- - - gtk.Notebook Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - "change-current-page" - - callback - notebook - - offset - - user_param1 - - ... - - - - - - "focus-tab" - - callback - notebook - - type - user_param1 - - ... - - - - - - - "move-focus-out" - - callback - notebook - - direction_type - user_param1 - - ... - - - - - - - "page-added" - - callback - notebook - - child - page_num - user_param1 - - ... - - - - - - - "page-removed" - - callback - notebook - - child - page_num - user_param1 - - ... - - - - - - - "page-reordered" - - callback - notebook - - child - page_num - user_param1 - - ... - - - - - - - "select-page" - - callback - notebook - - move_focus - user_param1 - - ... - - - - - - "switch-page" - - callback - notebook - - page - page_num - user_param1 - - ... - - - - - - - - - - Description - - The gtk.Notebook -widget is a gtk.Container -whose children are overlapping pages that can be switched between by using -tab labels along one edge. There are many configuration options for the -gtk.Notebook. You -can choose on which edge the tabs appear (see set_tab_pos()); -whether the notebook should be made bigger or scrolling arrows added if -there are too many tabs to fit (see set_scrollable()); -and, whether there will be a popup menu allowing the users to switch pages. -(see popup_enable(), -popup_disable()). - - The gtk.Notebook is -particularly useful for displaying a large number of application controls -that can be grouped into several functional areas. The typical example is -the user preferences dialog in some applications. For example, a notebook -page can be setup for each of font selection, color selection, formating, -etc. - - - - - Constructor - - - gtk.Notebook - - - - Returns : - the newly created gtk.Notebook - - - - Creates a new gtk.Notebook -widget with no pages. - - - - - Methods - - - gtk.Notebook.append_page - - - append_page - child - tab_labelNone - - - - child : - the gtk.Widget to use as -the contents of the page. - - - tab_label : - the gtk.Widget to be -used as the label for the page. - - - Returns : - in PyGTK 2.0 and 2.2 returns - None. In PyGTK 2.4 and above returns the index - number of the page in the notebook - - - - The append_page() method appends a page -to the notebook using the widget specified by child -and the widget specified by tab_label as the label on -the tab. - - In PyGTK 2.4 and above tab_label can be -None to use a default label. Also if -tab_label is not specified it will default to -None. - - - - - gtk.Notebook.append_page_menu - - - append_page_menu - child - tab_labelNone - menu_labelNone - - - - child : - the gtk.Widget to use as -the contents of the page. - - - tab_label : - the gtk.Widget to be -used as the label for the page. - - - menu_label : - the widget to use as a label for the -page-switch menu, if that is enabled. - - - Returns : - in PyGTK 2.0 and 2.2 returns - None. In PyGTK 2.4 and above returns the index - number of the page in the notebook - - - - The append_page_menu() method appends a -page to the notebook and specifying the widget to use as the label in the -popup menu. child specifies the widget to use as the -contents of the page; tab_label specifies the widget -to be used as the tab label; and, menu_label -specifies the widget to use in the popup menu. - - In PyGTK 2.4 and above tab_label can be -None to use a default label. If -tab_label is a gtk.Label or -None and menu_label is -None then the menu label will have the same text as the -tab label. Otherwise, menu_label must be specified -and not None. These parameters will default to -None in PyGTK 2.4 as well. - - - - - gtk.Notebook.prepend_page - - - prepend_page - child - tab_labelNone - - - - child : - the gtk.Widget to use as -the contents of the page. - - - tab_label : - the gtk.Widget to be -used as the label for the page. - - - Returns : - in PyGTK 2.0 and 2.2 returns - None. In PyGTK 2.4 and above returns the index - number of the page in the notebook - - - - The prepend_page() method prepends a -page to the notebook. child specifies the widget to -use as the contents of the page and tab_label -specifies the widget to be used as the tab label. - - In PyGTK 2.4 and above tab_label can be -None to use a default label. Also if -tab_label is not specified it will default to -None. - - - - - gtk.Notebook.prepend_page_menu - - - prepend_page_menu - child - tab_labelNone - menu_labelNone - - - - child : - the gtk.Widget to use as -the contents of the page. - - - tab_label : - the gtk.Widget to be -used as the label for the page. - - - menu_label : - the widget to use as a label for the -page-switch menu, if that is enabled. - - - Returns : - in PyGTK 2.0 and 2.2 returns - None. In PyGTK 2.4 and above returns the index - number of the page in the notebook - - - - The prepend_page_menu() method prepends -a page to the notebook specifying the widget to use as the label in the -popup menu. child specifies the widget to use as the -contents of the page; tab_label specifies the widget -to use as the tab label; and, menu_label specifies -the widget to use in the popup menu. - - In PyGTK 2.4 and above tab_label can be -None to use a default label. If -tab_label is a gtk.Label or -None and menu_label is -None then the menu label will have the same text as the -tab label. Otherwise, menu_label must be specified -and not None. These parameters will default to -None in PyGTK 2.4 as well. - - - - - gtk.Notebook.insert_page - - - insert_page - child - tab_labelNone - positionNone - - - - child : - the gtk.Widget to use as -the contents of the page. - - - tab_label : the -gtk.Widget to -be used as the label for the page. - - - position : - the index (starting at 0) at which to insert -the page, or -1 to append the page after all other -pages. - - - Returns : - in PyGTK 2.0 and 2.2 returns - None. In PyGTK 2.4 and above returns the index - number of the page in the notebook - - - - The insert_page() method inserts a page -into the notebook at the location specified by -position (0 is the first page). -child is the widget to use as the contents of the -page and tab_label specifies the widget to be used as -the tab label. If position is -1 the page is appended -to the notebook. In PyGTK 2.4 and above if tab_label -is None a default label if "page N" is used. - - In PyGTK 2.4 and above tab_label can be -None to use a default label. Also if -tab_label is not specified it will default to -None. - - In Pygtk 2.4 and above position will -default to -1 if not specified. - - - - - gtk.Notebook.insert_page_menu - - - insert_page_menu - child - tab_labelNone - menu_labelNone - positionNone - - - - child : - the gtk.Widget to use as -the contents of the page. - - - tab_label : - the -gtk.Widget to -be used as the label for the page. - - - menu_label : - the widget to use as a label for the -page-switch menu, if that is enabled. - - - position : - the index (starting at 0) at which to insert -the page, or -1 to append the page after all other -pages. - - - Returns : - in PyGTK 2.0 and 2.2 returns - None. In PyGTK 2.4 and above returns the index - number of the page in the notebook - - - - The insert_page_menu() method inserts a -page into the notebook at the location specified by -position. child specifies the -widget to use as the contents of the page; tab_label -specifies the widget to use as the tab label; and -menu_label specifies the widget to use as the label -in the popup menu. - - In PyGTK 2.4 and above tab_label can be -None to use a default label. If -tab_label is a gtk.Label or -None and menu_label is -None then the menu label will have the same text as the -tab label. Otherwise, menu_label must be specified -and not None. These parameters will default to -None in PyGTK 2.4 as well. - - In Pygtk 2.4 and above position will -default to -1 if not specified. - - - - - gtk.Notebook.remove_page - - - remove_page - page_num - - - - page_num : - the index of a notebook page, starting from 0. -If -1, the last page will be removed. - - - - The remove_page() method removes from -the notebook the page at the location specified by -index. The value of index -starts from 0. If index is -1 the last page of the -notebook will be removed. - - - - - gtk.Notebook.get_current_page - - - get_current_page - - - - Returns : - the index (starting from 0) of the current page -in the notebook. If the notebook has no pages, then -1 will be -returned. - - - - The get_current_page() method returns -the page index of the current page numbered from 0. - - - - - gtk.Notebook.get_nth_page - - - get_nth_page - page_num - - - - page_num : - the index of a page in the -notebook - - - Returns : - the child widget, or None if -page_num is out of bounds. - - - - The get_nth_page() method returns the -child widget contained in the page with the index specified by -page_num. If page_num is out -of bounds for the page range of the notebook this method returns -None. - - - - - gtk.Notebook.get_n_pages - - - get_n_pages - - - - - Returns : - the number of pages in the - notebook. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_n_pages() method returns the -number of pages in a notebook. - - - - - gtk.Notebook.page_num - - - page_num - child - - - - child : - a gtk.Widget - - - Returns : - the index of the page containing -child, or -1 if child is not -in the notebook. - - - - The page_num() method returns the index -of the page which contains the widget specified by -child or None if no page contains -child. - - - - - gtk.Notebook.set_current_page - - - set_current_page - page_num - - - - page_num : - the index of the page to switch to, starting -from 0. If negative, the last page will be used. If greater than the number -of pages in the notebook, nothing will be done. - - - - The set_current_page() method switches -to the page number specified by page_num. If -page_num is negative the last page is -selected. - - - - - gtk.Notebook.next_page - - - next_page - - - The next_page() method switches to the -next page. Nothing happens if the current page is the last page. - - - - - gtk.Notebook.prev_page - - - prev_page - - - The prev_page() method switches to the -previous page. Nothing happens if the current page is the first page. - - - - - gtk.Notebook.set_show_border - - - set_show_border - show_border - - - - show_border : - if True a bevel should be -drawn around the notebook. - - - - The show_border() method sets the -"show-border" property to the value of show_border. -If show_border is True a bevel -will be drawn around the notebook pages. This only has a visual effect when -the tabs are not shown. See set_show_tabs(). - - - - - gtk.Notebook.get_show_border - - - get_show_border - - - - Returns : - True if the bevel should be -drawn - - - - The get_show_border() method returns -the value of the "show-border" property. If "show-border" is -True a bevel will be drawn around the notebook pages when -tabs are not shown. See set_show_border(). - - - - - gtk.Notebook.set_show_tabs - - - set_show_tabs - show_tabs - - - - show_tabs : - if True the tabs should be -shown. - - - - The set_show_tabs() method sets the -"show-tabs" property to the value of show_tabs. If -show_tabs is True the notebook -tabs will be displayed. - - - - - gtk.Notebook.get_show_tabs - - - get_show_tabs - - - - Returns : - True if the tabs are -shown - - - - The get_show_tabs() method returns the -value of the "show-tabs" property. If "show-tabs" is True -the tabs of the notebook are shown. See set_show_tabs(). - - - - - gtk.Notebook.set_tab_pos - - - set_tab_pos - pos - - - - pos : - the edge to draw the tabs at: -gtk.POS_LEFT, gtk.POS_RIGHT, -gtk.POS_TOP or -gtk.POS_BOTTOM. - - - - The set_tab_pos() method sets the edge -at which the tabs for switching pages in the notebook are drawn as specified -by pos. The value of pos can -be one of: gtk.POS_LEFT, -gtk.POS_RIGHT, gtk.POS_TOP or -gtk.POS_BOTTOM. - - - - - gtk.Notebook.get_tab_pos - - - get_tab_pos - - - - Returns : - the edge at which the tabs are -drawn - - - - The get_tab_pos() method returns the -edge at which the tabs for switching pages in the notebook are drawn. The -return value is one of: gtk.POS_LEFT, -gtk.POS_RIGHT, gtk.POS_TOP or -gtk.POS_BOTTOM. - - - - - gtk.Notebook.set_scrollable - - - set_scrollable - scrollable - - - - scrollable : - if True scroll arrows should -be added - - - - The set_scrollable() method sets the -"scrollable" property to the value specified by -scrollable. If scrollable is -True the tab label area will have arrows for scrolling if -there are too many tabs to fit in the area. - - - - - gtk.Notebook.get_scrollable - - - get_scrollable - - - - Returns : - True if arrows for scrolling -are enabled - - - - The get_scrollable() method returns the -value of the "scrollable" property. If "scrollable" is -True the tab label area has scrolling arrows enabled and -displayed if there are too many tabs to fit in the display area. See set_scrollable(). - - - - - gtk.Notebook.popup_enable - - - popup_enable - - - The popup_enable() method enables the -popup menu: if the user clicks with the right mouse button on the tabs, a -menu with all the pages will be popped up. - - - - - gtk.Notebook.popup_disable - - - popup_disable - - - The popup_disable() method disables the -popup menu. - - - - - gtk.Notebook.get_tab_label - - - get_tab_label - child - - - - child : - a widget contained in a notebook -page - - - Returns : - the tab label widget for the page containing -child - - - - The get_tab_label() method returns the -tab label widget for the page containing the widget -child. None is returned if -child is not in the notebook. - - - - - gtk.Notebook.set_tab_label - - - set_tab_label - child - tab_labelNone - - - - child : - a widget contained in a notebook -page - - - tab_label : - the tab label widget to -use or None. - - - - The set_tab_label() method replaces the -tab label for the notebook page containing child with -the widget specified by tab_label. - - In PyGTK 2.4 and above tab_label can be -None to use a default label. Also if -tab_label is not specified it will default to -None. - - - - - gtk.Notebook.set_tab_label_text - - - set_tab_label_text - child - tab_text - - - - child : - a widget contained in a notebook -page - - - tab_text : - the new label text - - - - The set_tab_label_text() method creates -a new label with the text specified by tab_text and -sets it as the tab label for the page containing -child. - - - - - gtk.Notebook.get_tab_label_text - - - get_tab_label_text - child - - - - child : - a widget contained in a notebook -page - - - Returns : - value: the text of the tab label, or -None if the tab label widget is not a gtk.Label or -child is not in a notebook page. - - - - The get_tab_label_text() retrieves the -text of the tab label for the page containing child. -This method returns None if child -is not in a notebook page or the page tab label is not a gtk.Label -widget. - - - - - gtk.Notebook.get_menu_label - - - get_menu_label - child - - - - child : - a widget contained in a notebook -page - - - Returns : - the menu label, or None if -the notebook page does not have a menu label other than the default (the tab -label) or if child is not in a notebook page. - - - - The get_menu_label() method retrieves -the menu label widget of the page containing child. -If child is not in a notebook page or the menu label -has not been set (it defaults to the tab label), this method returns -None. - - - - - gtk.Notebook.set_menu_label - - - set_menu_label - child - menu_labelNone - - - - child : - a widget contained in a notebook -page - - - menu_label : - a widget to be used as the new menu -label - - - - The set_menu_label() replaces the menu -label for the page containing child with the widget -specified by menu_label. - - In PyGTK 2.4 and above menu_label can be -None to use a default label. Also if -menu_label is not specified it will default to -None. See the append_page_menu() -method for more information. - - - - - gtk.Notebook.set_menu_label_text - - - set_menu_label_text - child - menu_text - - - - child : - a widget contained in a notebook -page - - - menu_text : - the new menu label text - - - - The set_menu_label_text() method -creates a new label widget and replaces the menu label of the page -containingchild. - - - - - gtk.Notebook.get_menu_label_text - - - get_menu_label_text - child - - - - child : - a child widget of a notebook -page. - - - Returns : - value: the text of the tab label, or -None if the widget does not have a menu label other than -the default menu label, or the menu label widget is not a gtk.Label or -child is not contained in a notebook -page. - - - - The get_menu_label_text() method -retrieves the text of the menu label for the page containing -child. If child is not in a -notebook page or the menu label is not a gtk.Label widget or -the menu label has not been set (it default to the tab label), the return -value is None. - - - - - gtk.Notebook.query_tab_label_packing - - - query_tab_label_packing - child - - - - child : - the page - - - Returns : - a tuple containing: the expand value, the fill -value and the pack type - - - - The query_tab_label_packing() method -returns a tuple containing the packing attributes (expand, fill, pack type) -for the tab label of the page containing child. If -the expand attribute is True the tab can expand to take -up the free space in the tab area. If fill is True the -label widget in the tab can use up all the space in the tab. The pack type -can be one of gtk.PACK_START or -gtk.PACK_END to specify whether the tab is packed to the -left or right if tabs are on the top or bottom edge (top or bottom if the -tabs are on the left or right edge). - - - - - gtk.Notebook.set_tab_label_packing - - - set_tab_label_packing - child - expand - fill - pack_type - - - - child : - a widget contained in a notebook -page - - - expand : - if True the tab can expand -to fill the free space in the tab area - - - fill : - if True the label widget can -fill the space in the tab - - - pack_type : - the position of the tab: -gtk.PACK_START or -gtk.PACK_END - - - - The set_tab_label_packing() method sets -the packing parameters for the tab label of the page containing -child. If expand is -True the tab can expand to take up the free space in the -tab area. If fill is True the -label widget in the tab can use up all the space in the tab. The -pack_type can be one of -gtk.PACK_START or gtk.PACK_END to -specify whether the tab is packed to the left or right if tabs are on the -top or bottom edge (top or bottom if the tabs are on the left or right -edge).See gtk.Box.pack_start() -for the exact meaning of the parameters. - - - - - gtk.Notebook.reorder_child - - - reorder_child - child - position - - - - child : - the child widget to move - - - position : - the index of the page that -child is to move to, or -1 to move to the -end - - - - The reorder_child() method reorders -the notebook pages so that child appears in the page -whose index is specified by position. If -position is greater than or equal to the number of -children in the list or negative, child will be moved -to the end of the list. - - - - - gtk.Notebook.set_group_id - - - set_group_id - group_id - - - - - group_id : - a group identifier, or -1 to unset - it - - - - - This method is available in PyGTK 2.10 and above. - - - The set_group_id() method sets the - group identifier for the notebook to the value specified by - group_id. Notebooks sharing the same group - identifier will be able to exchange tabs via drag and drop. A notebook - with group identifier -1 will not be able to exchange tabs with any - other notebook. - - - - - gtk.Notebook.get_group_id - - - get_group_id - - - - - - Returns : - the group identifier, or -1 if none is - set. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_group_id() method returns the - current group identifier for the notebook. - - - - - gtk.Notebook.get_tab_reorderable - - - get_tab_reorderable - child - - - - - child : - a child gtk.Widget - - - Returns : - True if the tab is - reorderable. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_tab_reorderable() method - returns True if the tab can be reordered via drag - and drop. - - - - - gtk.Notebook.set_tab_reorderable - - - set_tab_reorderable - child - reorderable - - - - - child : - a child gtk.Widget - - - reorderable : - if True the tab is - reorderable. - - - - - This method is available in PyGTK 2.10 and above. - - - The set_tab_reorderable() method sets - the "reorderable" property of child to the - value of reorderable. If - reorderable is True, the - notebook tab can be reordered via drag and drop. - - - - - gtk.Notebook.get_tab_detachable - - - get_tab_detachable - child - - - - - child : - a child gtk.Widget - - - Returns : - if True the tab is - detachable. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_tab_detachable() method returns - the value of the "detachable" property of - child. The method returns - True if the tab contents can be detached from - notebook. - - - - - gtk.Notebook.set_tab_detachable - - - set_tab_detachable - child - detachable - - - - - child : - a child gtk.Widget - - - detachable : - if True the tab is - detachable or not - - - - - This method is available in PyGTK 2.10 and above. - - - The set_tab_detachable() method sets - the "detachable" property of child to the value - specified by detachable. If - detachable is True, - child can be moved from this notebook to - another notebook or widget. - - Note that two notebooks must share a common group identifier - (see the set_group_id() - method) to allow automatic tabs interchange between them. - - If you want a widget to interact with a notebook through DnD - (i.e.: accept dragged tabs from it) it must be set as a drop - destination and accept the target "gtk.NOTEBOOK_TAB". The notebook - will fill the selection with a reference to the child - widget that corresponds to the dropped tab. - - If you want a notebook to accept drags from other widgets, you - will have to set your own DnD code to do it. - - - - - - - Signals - - - The "change-current-page" gtk.Notebook Signal - - - callback - notebook - offset - user_param1 - ... - - - - - notebook : - the notebook that received the -signal - - - offset : - the count of pages to move (negative count is -backward) - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "change-current-page" signal is emitted when the page -forward or page backward request is issued. - - - - - The "focus-tab" gtk.Notebook Signal - - - callback - notebook - type - user_param1 - ... - - - - - notebook : - the notebook that received the -signal - - - type : - the type of tab: -gtk.NOTEBOOK_TAB_FIRST or -gtk.NOTEBOOK_TAB_LAST - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was -handled - - - - The "focus-tab" signal is emitted when the focus is changed by -tabbing. - - - - - The "move-focus-out" gtk.Notebook Signal - - - callback - notebook - direction_type - user_param1 - ... - - - - - notebook : - the notebook that received the -signal - - - direction_type : - the direction type of the focus move: -gtk.DIR_TAB_FORWARD, -gtk.DIR_TAB_BACKWARD, gtk.DIR_UP, -gtk.DIR_DOWN, gtk.DIR_LEFT or -gtk.DIR_RIGHT - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "move-focus-out" signal is emitted when the focus is moved -out of the notebook with the specified -direction_type. - - - - - The "page-added" Signal - - - callback - notebook - child - page_num - user_param1 - ... - - - - - notebook : - the notebook that received the -signal - - - child : - the child gtk.Widget - affected - - - page_num : - the new page number for - child - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in PyGTK 2.10 and above. - - - The "page-added" signal is emitted when a page is added to the - notebook. - - - - - The "page-removed" Signal - - - callback - notebook - child - page_num - user_param1 - ... - - - - - notebook : - the notebook that received the -signal - - - child : - the child gtk.Widget - affected - - - page_num : - the new page number for - child - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in PyGTK 2.10 and above. - - - The "page-removed" signal is emitted after a page is removed - from the notebook. - - - - - The "page-reordered" Signal - - - callback - notebook - child - page_num - user_param1 - ... - - - - - notebook : - the notebook that received the -signal - - - child : - the child gtk.Widget - affected - - - page_num : - the new page number for - child - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in PyGTK 2.10 and above. - - - The "page-reordered" signal is emitted when a page has been - reordered. - - - - - The "select-page" gtk.Notebook Signal - - - callback - notebook - move_focus - user_param1 - ... - - - - - notebook : - the notebook that received the -signal - - - move_focus : - if True move the -focus to a child widget - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was -handled - - - - The "select-page" signal is emitted when a new child page is -selected. - - - - - The "switch-page" gtk.Notebook Signal - - - callback - notebook - page - page_num - user_param1 - ... - - - - - notebook : - the notebook that received the -signal - - - page : - the new current page - - - page_num : - the index of the new current -page - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "switch-page" signal is emitted when the notebook page is -changed. Note the page parameter is a GPointer and -not usable within PyGTK. Use the page_num parameter -to retrieve the new current page using the get_nth_page() -method. - - - - - -
diff --git a/docs/reference/pygtk-gtkobject.xml b/docs/reference/pygtk-gtkobject.xml deleted file mode 100644 index fc225137..00000000 --- a/docs/reference/pygtk-gtkobject.xml +++ /dev/null @@ -1,673 +0,0 @@ - - - - - - gtk.Object - the base class of the PyGTK type hierarchy. - - - - Synopsis - - - gtk.Object - gobject.GObject - - flags - - - set_flags - flags - - - unset_flags - flags - - - destroy - - - - -Functions - - - gtk.bindings_activate - object - keyval - modifiers - - gtk.bindings_activate_event - object - event - - gtk.binding_entry_add_signal - object - keyval - modifiers - signal_name - ... - - gtk.binding_entry_remove - class_type - keyval - modifiers - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - - - - - - gtk.Object Properties - -
- - - - - - - - - "user-data" - Read-Write - Anonymous User Data Pointer - - - - - -
- -
- - - gtk.Object Signal Prototypes - - gobject.GObject Signal Prototypes - - - - "destroy" - - callback - object - - user_param1 - - ... - - - - - - - - - - Description - - gtk.Object is the -base class for all widgets, and for a few non-widget objects such as gtk.Adjustment. -gtk.Object -predates GObject; non-widgets -that derive from gtk.Object rather -than GObject do -so for backward compatibility reasons. - - The "destroy" signal, emitted by the destroy() -method asks all code owning a GTK reference to the object to release its GTK -reference. So, for example, if you call -window.destroy() where -window is a gtk.Window, GTK will -release the GTK reference count that it owns; if you call -button.destroy() where button is a gtk.Button, -button will be removed from its parent container and -the parent container will release its GTK reference to -button. Because these GTK references are released, -calling destroy() -should result in freeing all memory associated with an object (finalizing -it) if the GTK reference count reaches zero. However, in PyGTK the GTK -objects are wrapped in a Python object that has its own reference counting -mechanism. The destroy() -method does not affect the Python reference counts. The GTK object -associated with a Python object will not be released until the Python object -reference count reaches zero. Therefore, calling the destroy() -method will not result in the finalization of the GTK object until the -Python object is finalized. In the case mentioned above if a gtk.Button is -destroyed using the destroy() -method, it will be removed from its container and unmapped and unrealized -but it will not be finalized because the Python wrapper object will still -exist and hold a reference. - - - - - Methods - - - gtk.Object.flags - - - flags - - - - Returns : - the flags set for the -object - - - - The flags() method returns the value of -the flags for the object. The flags returned will include both the gtk.Object flags and -the gtk.Widget -flags. - - The gtk.Object flags -are: - - - - gtk.IN_DESTRUCTION - - the object is currently being destroyed. - - - - gtk.FLOATING - - the object is orphaned. - - - - gtk.RESERVED_1 - - reserved for future use - - - - gtk.RESERVED_2 - - reserved for future use - - - - - The gtk.Widget flags -are: - - - - gtk.TOPLEVEL - - widgets without a real parent (e.g. gtk.Window and gtk.Menu) have this -flag set throughout their lifetime. Toplevel widgets always contain their -own gtk.gdk.Window. - - - - gtk.NO_WINDOW - - a widget that does not provide its own gtk.gdk.Window. -Visible action (e.g. drawing) is performed on the parent's gtk.gdk.Window. - - - - gtk.REALIZED - - the widget has an associated gtk.gdk.Window. - - - - gtk.MAPPED - - the widget can be displayed on the screen. - - - - gtk.VISIBLE - - the widget will be mapped as soon as its parent is -mapped. - - - - gtk.SENSITIVE - - The sensitivity of a widget determines whether it will -receive certain events (e.g. button or key presses). One requirement for the -widget's sensitivity is to have this flag set. - - - - gtk.PARENT_SENSITIVE - - This is the second requirement for the widget's -sensitivity. Once a widget has gtk.SENSITIVE and -gtk.PARENT_SENSITIVE set, its state is effectively -sensitive. - - - - gtk.CAN_FOCUS - - the widget is able to handle focus grabs. - - - - gtk.HAS_FOCUS - - the widget has the focus - assumes that -gtk.CAN_FOCUS is set - - - - gtk.CAN_DEFAULT - - the widget is allowed to receive the default -action. - - - - gtk.HAS_DEFAULT - - the widget currently will receive the default -action. - - - - gtk.HAS_GRAB - - the widget is in the grab_widgets stack, and will be -the preferred one for receiving events. - - - - gtk.RC_STYLE - - the widgets style has been looked up through the RC -mechanism. It does not imply that the widget actually had a style defined -through the RC mechanism. - - - - gtk.COMPOSITE_CHILD - - the widget is a composite child of its -parent. - - - - gtk.NO_REPARENT - - unused - - - - gtk.APP_PAINTABLE - - set on widgets whose window the application directly -draws on, in order to keep GTK from overwriting the drawn stuff. - - - - gtk.RECEIVES_DEFAULT - - the widget when focused will receive the default action -and have gtk.HAS_DEFAULT set even if there is a different -widget set as default. - - - - gtk.DOUBLE_BUFFERED - - exposes done on the widget should be -double-buffered. - - - - - - - - gtk.Object.set_flags - - - set_flags - flags - - - - flags : - the gtk.Object and gtk.Widget flags to -be set on this object - - - - The set_flags() method sets the object -flags according to the value of flags. See flags() -for a description of the gtk.Object and gtk.Widget flags -that can be set. - - - - - gtk.Object.unset_flags - - - unset_flags - flags - - - - flags : - the gtk.Object and gtk.Widget flags to -be unset on this object - - - - The unset_flags() method unsets the -object flags according to the value of flags. See -flags() -for a description of the gtk.Object and gtk.Widget flags -that can be unset. - - - - - gtk.Object.destroy - - - destroy - - - The destroy() method emits the -"destroy" signal notifying all reference holders that they should release -the gtk.Object. - - - - - - - Functions - - - gtk.bindings_activate - - - gtk.bindings_activate - object - keyval - modifiers - - - - object : - the gtk.Object to -activate the bindings on - - - keyval : - a key value - - - modifiers : - a modifier mask - - -  : - - - - Returns : - True if the binding could be -activated - - - - The gtk.bindings_activate() function -activates the bindings associated with the gtk.Object specified -by object with the key value specified by keyval and -the modifier mask specified by modifiers. - - - - - gtk.bindings_activate_event - - - gtk.bindings_activate_event - object - event - - - - object : - the gtk.Object to -activate the bindings on - - - event : - a gtk.gdk.Event - - - Returns : - True if a matching key - binding was found - - - - The gtk.bindings_activate_event() function -looks up key bindings for the gtk.Object specified -by object to find one matching the key gtk.gdk.Event -specified by event, and if one was found, activate -it. - - - - - gtk.binding_entry_add_signal - - - gtk.binding_entry_add_signal - object - keyval - modifiers - signal_name - ... - - - - object : - the gtk.Object -class the binding entry will be associated with - - - keyval : - the key value - - - modifiers : - the modifier mask - - - signal_name : - the signal name - - - ... : - zero or more pairs of value type-value -pairs - - - - The gtk.binding_entry_add_signal() function -adds a binding (specified by keyval and -modifiers) to the binding set of the object class -derived from object. The signal specified by -signal_name will be emitted with the optional -arguments specified by the argument pairs denoted by ... that are value type -and value. This function is used when creating a new widget class to set up -key bindings. - - - - - gtk.binding_entry_remove - - - gtk.binding_entry_remove - class_type - keyval - modifiers - - - - class_type : - the gtk.Object -class the binding entry will be removed from - - - keyval : - the key value - - - modifiers : - the modifier mask - - - - - This function is available in PyGTK 2.2 and above. - - - The gtk.binding_entry_remove() function -removes the binding (specified by keyval and -modifiers) from the binding set of the object class -specified by class_type. - - - - - - - Signals - - - The "destroy" gtk.Object Signal - - - callback - object - user_param1 - ... - - - - - object : - the object that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "destroy" signal is emitted when the references for the -object should be destroyed. - - - - - -
diff --git a/docs/reference/pygtk-gtkoptionmenu.xml b/docs/reference/pygtk-gtkoptionmenu.xml deleted file mode 100644 index 6216015a..00000000 --- a/docs/reference/pygtk-gtkoptionmenu.xml +++ /dev/null @@ -1,370 +0,0 @@ - - - - - - gtk.OptionMenu - a widget used to provide a list of valid choices. - - - - Synopsis - - - gtk.OptionMenu - gtk.Button - - gtk.OptionMenu - - - get_menu - - - set_menu - menu - - - remove_menu - - - get_history - - - set_history - index - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Button - +-- gtk.OptionMenu - - - - - - gtk.OptionMenu Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Button Properties - -
- - - - - - - - - "menu" - Read-Write - The menu of options. - - - - - -
- -
- - - gtk.OptionMenu Style Properties - - gtk.Widget Style Properties - gtk.Button Style Properties - -
- - - - - - - - - "indicator-size" - Read - The size of the dropdown indicator - - - "indicator-spacing" - Read - The spacing around the indicator. - - - - - -
- -
- - - gtk.OptionMenu Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Button Signal Prototypes - - - - "changed" - - callback - optionmenu - - user_param1 - - ... - - - - - - - - - - Description - - - gtk.OptionMenu -is deprecated in PyGTK 2.4; use the gtk.ComboBox -instead. - - - A gtk.OptionMenu -is a widget allows the user to choose from a list of valid choices from an -associated menu. The gtk.OptionMenu -displays the last selected choice. When activated (clicked) the gtk.OptionMenu -displays a popup gtk.Menu which allows -the user to make a new choice. Using a gtk.OptionMenu -is simple: - - - - build a gtk.Menu using gtk.Menu() - - - then append menu items to it using gtk.MenuShell.append() - - - associate the menu with the option menu using set_menu() - - - set the selected menu item with set_history() - - - connect to the "changed" signal on the option menu; in the -"changed" signal - - - check the new selected menu item with get_history(). - - - - - - - Constructor - - - gtk.OptionMenu - - - - Returns : - a new optionmenu widget - - - - Creates a new gtk.OptionMenu -widget. - - - - - Methods - - - gtk.OptionMenu.get_menu - - - get_menu - - - - Returns : - a menu widget or None if no -menu is associated - - - - The get_menu() method returns the menu -that is associated with the optionmenu or None if no menu -is associated. - - - - - gtk.OptionMenu.set_menu - - - set_menu - menu - - - - menu : - a menu to be associated with the -optionmenu - - - - The set_menu() method associates the -gtk.Menu widget -specified by menu with the optionmenu thus providing -the way for a user to select a new choice. A simple menu, avoiding the use -of tearoff menu items, submenus, and accelerators, should be used. - - - - - gtk.OptionMenu.remove_menu - - - remove_menu - - - The remove_menu() method removes the -currently associated menu from the optionmenu. - - - - - gtk.OptionMenu.get_history - - - get_history - - - - Returns : - the index of the selected menu item, or -1 if -there are no menu items - - - - The get_history() method returns the -index of the currently selected menu item or -1 if there are no menu items. -The menu items are numbered from top to bottom, starting with 0. - - - - - gtk.OptionMenu.set_history - - - set_history - index - - - - index : - the index of the menu item to display as the -selected optionmenu choice - - - - The set_history() method selects the -menu item specified by index as the displayed -optionmenu choice. - - - - - - - Signals - - - The "changed" gtk.OptionMenu Signal - - - callback - optionmenu - user_param1 - ... - - - - - optionmenu : - the optionmenu that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "changed" signal is emitted when a new optionmenu choice is -made. - - - - - -
diff --git a/docs/reference/pygtk-gtkpagesetup.xml b/docs/reference/pygtk-gtkpagesetup.xml deleted file mode 100644 index 682e5947..00000000 --- a/docs/reference/pygtk-gtkpagesetup.xml +++ /dev/null @@ -1,817 +0,0 @@ - - - - - - - gtk.PageSetup - an object that stores page setup information (new in PyGTK - 2.10) - - - - Synopsis - - - gtk.PageSetup - gobject.GObject - - gtk.PageSetup - - - - copy - - - - get_orientation - - - - set_orientation - orientation - - - get_paper_size - - - - set_paper_size - size - - - get_top_margin - unit - - - set_top_margin - margin - unit - - - get_bottom_margin - unit - - - set_bottom_margin - margin - unit - - - get_left_margin - unit - - - set_left_margin - margin - unit - - - get_right_margin - unit - - - set_right_margin - margin - unit - - - set_paper_size_and_default_margins - size - - - get_paper_width - unit - - - get_paper_height - unit - - - get_page_width - unit - - - get_page_height - unit - - - - -Functions - - - gtk.print_run_page_setup_dialog - parent - page_setup - settings - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.PageSetup - - - - - - gtk.PageSetup Signal Prototypes - - gobject.GObject Signal Prototypes - - - - Description - - - This class is available in PyGTK 2.10 and above. - - - A gtk.PageSetup - object stores the page size, orientation and margins. The idea is that - you can get one of these from the page setup dialog and then pass it to - the gtk.PrintOperation - when printing. The benefit of splitting this out of the gtk.PrintSettings - is that these affect the actual layout of the page, and thus need to be - set long before user prints. - - The margins specified in this object are the "print margins", - i.e. the parts of the page that the printer cannot print on. These are - different from the layout margins that a word processor uses; they are - typically used to determine the minimal size for the layout - margins. - - To obtain a gtk.PageSetup - use the gtk.PageSetup() constructor - to get the defaults, or use the gtk.print_run_page_setup_dialog() - function to show the page setup dialog and receive the resulting page - setup. An example page setup function is: - - - def do_page_setup(): - if settings == None: - settings = gtk.PrintSettings() - - page_setup = gtk.print_run_page_setup_dialog(main_window, page_setup, - settings) - - - - - - Constructor - - - gtk.PageSetup - - - gtk.PageSetup - - - - - - Returns : - a new gtk.PageSetup. - - - - - This constructor is available in PyGTK 2.10 and above. - - - Creates a new gtk.PageSetup. - - - - - - - Methods - - - gtk.PageSetup.copy - - - copy - - - - - - Returns : - a copy of this page setup - - - - - This method is available in PyGTK 2.10 and above. - - - The copy() method copies this gtk.PageSetup. - - - - - gtk.PageSetup.get_orientation - - - get_orientation - - - - - - Returns : - the page orientation - - - - - This method is available in PyGTK 2.10 and above. - - - The get_orientation() method returns - the page orientation of the gtk.PageSetup. The - return value must be one of the . - - - - - gtk.PageSetup.set_orientation - - - set_orientation - orientation - - - - - orientation : - one of the - - - - - This method is available in PyGTK 2.10 and above. - - - The set_orientation() method sets the - page orientation of the gtk.PageSetup - to the value specified by orientation. The - value of orientation must be one of the - - - - - gtk.PageSetup.get_paper_size - - - get_paper_size - - - - - - Returns : - the paper size - - - - - This method is available in PyGTK 2.10 and above. - - - The get_paper_size() method gets the - paper size of the gtk.PageSetup. - - - - - gtk.PageSetup.set_paper_size - - - set_paper_size - size - - - - - size : - a gtk.PaperSize - - - - - This method is available in PyGTK 2.10 and above. - - - The set_paper_size() method sets the - paper size of the page setup without changing the margins. See the - set_paper_size_and_default_margins() - method. - - - - - gtk.PageSetup.get_top_margin - - - get_top_margin - unit - - - - - unit : - the unit for the return value - one of the - - - - Returns : - the top margin - - - - - This method is available in PyGTK 2.10 and above. - - - The get_top_margin() method returns the - top margin in units of unit. - - - - - gtk.PageSetup.set_top_margin - - - set_top_margin - margin - unit - - - - - margin : - the new top margin in units of - unit - - - unit : - the units for margin - - one of the - - - - - This method is available in PyGTK 2.10 and above. - - - The set_top_margin() method sets the - top margin of the page setup to the value specified by - margin in the units specified by - unit. - - - - - gtk.PageSetup.get_bottom_margin - - - get_bottom_margin - unit - - - - - unit : - the unit for the return - value - - - Returns : - the bottom margin - - - - - This method is available in PyGTK 2.10 and above. - - - The get_bottom_margin() method gets the - bottom margin in units of unit. - - - - - gtk.PageSetup.set_bottom_margin - - - set_bottom_margin - margin - unit - - - - - margin : - the new bottom margin in units of - unit - - - unit : - the units for margin - - one of the - - - - - This method is available in PyGTK 2.10 and above. - - - The set_bottom_margin() method sets the - bottom margin of the page setup to the value specified by - margin using the units specified by - unit. - - - - - gtk.PageSetup.get_left_margin - - - get_left_margin - unit - - - - - unit : - the unit for the return - value - - - Returns : - the left margin - - - - - This method is available in PyGTK 2.10 and above. - - - The get_left_margin() method gets the - left margin in units of unit. - - - - - gtk.PageSetup.set_left_margin - - - set_left_margin - margin - unit - - - - - margin : - the new left margin in units of - unit - - - unit : - the units for margin - - one of the - - - - - This method is available in PyGTK 2.10 and above. - - - The set_left_margin() method sets the - left margin of the page setup to the value specified by - margin using the units specified by - unit. - - - - - gtk.PageSetup.get_right_margin - - - get_right_margin - unit - - - - - unit : - the unit for the return value - one - of the - - - Returns : - the right margin - - - - - This method is available in PyGTK 2.10 and above. - - - The get_right_margin() method gets the - right margin in units of unit. - - - - - gtk.PageSetup.set_right_margin - - - set_right_margin - margin - unit - - - - - margin : - the new right margin in units of - unit - - - unit : - the units for margin - - one of the - - - - - This method is available in PyGTK 2.10 and above. - - - The set_right_margin() method sets the - right margin of the page setup to the value specified by - margin using the units specified by - unit. - - - - - gtk.PageSetup.set_paper_size_and_default_margins - - - set_paper_size_and_default_margins - size - - - - - size : - a gtk.PaperSize - - - - - This method is available in PyGTK 2.10 and above. - - - The - set_paper_size_and_default_margins() method - sets the paper size of the page setup to the value specified by - size and modifies the margins according to the - new paper size. - - - - - gtk.PageSetup.get_paper_width - - - get_paper_width - unit - - - - - unit : - the unit for the return value - one of the - - - - Returns : - the paper width. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_paper_width() method returns - the paper width in units of unit. - - Note that this function takes orientation, but not margins into - consideration. See the get_page_width() - method. - - - - - gtk.PageSetup.get_paper_height - - - get_paper_height - unit - - - - - unit : - the unit for the return value - one of the - - - - Returns : - the paper height. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_paper_height() method returns - the paper height in units of unit. - - Note that this function takes orientation, but not margins into - consideration. See the get_page_height() - method. - - - - - gtk.PageSetup.get_page_width - - - get_page_width - unit - - - - - unit : - the unit for the return value - one of the - - - - Returns : - the page width. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_page_width() method returns the - page width in units of unit. - - Note that this function takes orientation and margins into - consideration. See the get_paper_width() - method. - - - - - gtk.PageSetup.get_page_height - - - get_page_height - unit - - - - - unit : - the unit for the return value - one of the - - - - Returns : - the page height. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_page_height() method returns - the page height in units of unit. - - Note that this function takes orientation and margins into - consideration. See the get_paper_height() - method. - - - - - - - Functions - - - gtk.print_run_page_setup_dialog - - - gtk.print_run_page_setup_dialog - parent - page_setup - settings - - - - parent : - transient parent, or - None - - - page_setup : - an existing gtk.PageSetup, - or None - - - settings : - a gtk.PrintSettings - - - Returns : - a new gtk.PageSetup - - - - Runs a page setup dialog, letting the user modify the values - from page_setup. If the user cancels the dialog, the returned gtk.PageSetup - is identical to the passed in page_setup, otherwise it contains the - modifications done in the dialog. - - Note that this function may use a recursive mainloop to show the - page setup dialog. - - - - - - diff --git a/docs/reference/pygtk-gtkpagesetupunixdialog.xml b/docs/reference/pygtk-gtkpagesetupunixdialog.xml deleted file mode 100644 index 793d5fd4..00000000 --- a/docs/reference/pygtk-gtkpagesetupunixdialog.xml +++ /dev/null @@ -1,260 +0,0 @@ - - - - - - - gtkunixprint.PageSetupUnixDialog - a dialog for setting up a printer page on Unix (new in - PyGTK 2.10) - - - - Synopsis - - - gtkunixprint.PageSetupUnixDialog - gtk.Dialog - - gtkunixprint.PageSetupUnixDialog - titleNone - parentNone - - - set_page_setup - page_setup - - - get_page_setup - - - - set_print_settings - print_settings - - - get_print_settings - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Window - +-- gtk.Dialog - +-- gtkunixprint.PageSetupUnixDialog - - - - - - gtkunixprint.PageSetupUnixDialog Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Window Properties - gtk.Dialog Properties - - - - - gtkunixprint.PageSetupUnixDialog Style Properties - - gtk.Widget Style Properties - gtk.Dialog Style Properties - - - - - gtkunixprint.PageSetupUnixDialog Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Window Signal Prototypes - gtk.Dialog Signal Prototypes - - - - Description - - - This class is available for Unix systems in PyGTK 2.10 and - above. - - - The gtkunixprint.PageSetupUnixDialog - object implements a page setup dialog for platforms, like Unix, that - don't provide a native page setup dialog. It can be used very much like - any other PyGTK dialog, at the cost of the portability offered by the - high-level printing API. - - - - - Constructor - - - gtkunixprint.PageSetupUnixDialog - - - gtkunixprint.PageSetupUnixDialog - titleNone - parentNone - - - - - title : - the title of the dialog, or - None - - - parent : - the transient parent of the dialog, or - None - - - Returns : - the new gtkunixprint.PageSetupUnixDialog - - - - - This constructor is available in PyGTK 2.10 and above. - - - Creates a new page setup dialog with the optional title - specified by title and optionally using the - gtk.Window - specified by parent. - - - - - - - Methods - - - gtkunixprint.PageSetupUnixDialog.set_page_setup - - - set_page_setup - page_setup - - - - - page_setup : - a gtk.PageSetup - - - - - This method is available in PyGTK 2.10 and above. - - - The set_page_setup() method uses the - gtk.PageSetup - specified by page_setup to set the page setup - values for the dialog. - - - - - gtkunixprint.PageSetupUnixDialog.get_page_setup - - - get_page_setup - - - - - - Returns : - the current page setup - - - - - This method is available in PyGTK 2.10 and above. - - - The get_page_setup() method returns the - current page setup values from the dialog as a gtk.PageSetup. - - - - - gtkunixprint.PageSetupUnixDialog.set_print_settings - - - set_print_settings - print_settings - - - - - print_settings : - a gtk.PrintSettings - - - - - This method is available in PyGTK 2.10 and above. - - - The set_print_settings() method - installs the gtk.PrintSettings - specified by print_settings as the print settings for the - dialog. - - - - - gtkunixprint.PageSetupUnixDialog.get_print_settings - - - get_print_settings - - - - - - Returns : - the current print settings - - - - - This method is available in PyGTK 2.10 and above. - - - The get_print_settings() method returns - the current print settings from the dialog. - - - - - - diff --git a/docs/reference/pygtk-gtkpaned.xml b/docs/reference/pygtk-gtkpaned.xml deleted file mode 100644 index d5076860..00000000 --- a/docs/reference/pygtk-gtkpaned.xml +++ /dev/null @@ -1,970 +0,0 @@ - - - - - - gtk.Paned - a base class for widgets with two adjustable -panes - - - - Synopsis - - - gtk.Paned - gtk.Container - - add1 - child - - - add2 - child - - - pack1 - child - resizeFalse - shrinkTrue - - - pack2 - child - resizeTrue - shrinkTrue - - - get_position - - - set_position - position - - - compute_position - allocation - child1_req - child2_req - - - get_child1 - - - - get_child2 - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Paned - - - - - - gtk.Paned Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - -
- - - - - - - - - "max-position" - Read-Write - The largest possible value for the position property. -This property is derived from the size and shrinkability of the widget's -children. Available in GTK+ 2.4 and above. - - - - "min-position" - Read-Write - The smallest possible value for the position property. -This property is derived from the size and shrinkability of the widget's -children. Available in GTK+ 2.4 and above. - - - - "position" - Read-Write - The position of the paned separator in pixels (0 means -all the way to the left or top). - - - - "position-set" - Read-Write - If True, the "position" property is -valid. - - - - - -
- -
- - - gtk.Paned Child Properties - -
- - - - - - - - - "resize" - Read-Write - If True, the child expands and -shrinks along with the paned widget. Available in GTK+ 2.4 and above. - - - - "shrink" - Read-Write - If True, the child can be made -smaller than its requisition. Available in GTK+ 2.4 and above. - - - - - -
- -
- - - gtk.Paned Style Properties - - gtk.Widget Style Properties - -
- - - - - - - - - "handle-size" - Read - The width of the handle - - - - - -
- -
- - - gtk.Paned Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - "accept-position" - - callback - paned - user_param1 - ... - - - - - - "cancel-position" - - callback - paned - user_param1 - ... - - - - - - "cycle-child-focus" - - callback - paned - reversed - user_param1 - ... - - - - - - "cycle-handle-focus" - - callback - paned - reversed - user_param1 - ... - - - - - - "move-handle" - - callback - paned - scrolltype - user_param1 - ... - - - - - - "toggle-handle-focus" - - callback - paned - user_param1 - ... - - - - - - - - - - Description - - gtk.Paned is the base -class for widgets with two panes, arranged either horizontally (gtk.HPaned) or -vertically (gtk.VPaned). Child -widgets are added to the panes of the widget with the pack1() and -pack2() -methods. The division between 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 located is called the gutter.) Often, it is useful to -put each child inside a gtk.Frame 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, when the gtk.Paned is resized, -that child will expand or shrink along with the paned widget. If shrink is -True, the child can be made smaller than it's -requisition. Setting shrink to False allows the -application to set a minimum size. If resize is False for -both children, the resizing behaves as if resize is True -for both children. The application can set the position of the slider by -calling the set_position() -method. - - - - - Methods - - - gtk.Paned.add1 - - - add1 - child - - - - child : - the widget to add - - - - The add1() method adds the widget -specified by child to the top or left pane with the -default packing parameters (resize is False and shrink is -True). See the pack1() -method. - - - - - gtk.Paned.add2 - - - add2 - child - - - - child : - the widget to add - - - - The add2() method adds the widget -specified by child to the bottom or right pane with -the default packing parameters (resize is True and shrink -is True). See the pack2() -method. - - - - - gtk.Paned.pack1 - - - pack1 - child - resizeFalse - shrinkTrue - - - - child : - the widget to add - - - resize : - if True -child should resize when the paned is -resized - - - shrink : - if True -child can be made smaller than its -minimum size request - - - - The pack1() method adds the widget -specified by child to the top or left pane with the -parameters specified by resize and -shrink. If resize is -True child should be resized when -the paned widget is resized. If shrink is -True child can be made smaller -than its minimum size request. - - - - - gtk.Paned.pack2 - - - pack2 - child - resizeTrue - shrinkTrue - - - - child : - the widget to add - - - resize : - if True -child should resize when the paned is -resized - - - shrink : - if True -child can be made smaller than its -minimum size request - - - - The pack2() method adds the widget -specified by child to the bottom or right pane with -the parameters specified by resize and -shrink. If resize is -True child should be resized when -the paned widget is resized. If shrink is -True child can be made smaller -than its minimum size request. - - - - - gtk.Paned.get_position - - - get_position - - - - Returns : - the position of the divider - - - - The get_position() method returns the -position of the divider in pixels between the two panes. - - - - - gtk.Paned.set_position - - - set_position - position - - - - position : - the new pixel position of divider, a negative -value means that the position is unset. - - - - The set_position() method sets the -position of the divider between the two panes to the value specified by -position and sets the "position-set" property to -True if position is non-negative. -If position is negative the divider position will be -recalculated by the paned widget using the child widget requisitions and the -"position-set" property will be set to False. - - - - - gtk.Paned.compute_position - - - compute_position - allocation - child1_req - child2_req - - - - allocation : - the total space allocation in pixels for the -paned widget - - - child1_req : - the minimum space in pixels required for the -left or top child widget - - - child2_req : - the minimum space in pixels required for the -right or bottom child widget - - - - The compute_position() method computes -the position of the separator according to the specification of the -parameters: allocation, -child1_req and child2_req. The -calculation is affected by the packing parameters of the child widgets -depending on whether they can resize and shrink. This method is used by -subclasses of gtk.Paned and is -usually not needed by applications. the gtk.Widget.queue_resize() -method must be called after this method to have the resizing -displayed. - - The minimum position is 0 if child1's shrink value is -True or the value of child1_req, -if False. The maximum position is the value of -allocation if child2's shrink value is True, or the -value of (allocation - -child2_req), if False. The final -calculated position will be between the minimum and maximum -positions. - - - - - gtk.Paned.get_child1 - - - get_child1 - - - - - Returns : - the first child, orNone - - - - - This method is available in PyGTK 2.4 and above. - - - The get_child1() method returns the -first child of the paned widget. - - - - - gtk.Paned.get_child2 - - - get_child2 - - - - Returns : - the second child, or -None - - - - - This method is available in PyGTK 2.4 and above. - - - The get_child2() method returns -the second child of the paned widget. - - - - - - - Signals - - - The "accept-position" gtk.Paned Signal - - - callback - paned - user_param1 - ... - - - - - paned : - the paned that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was -handled - - - - The "accept-position" signal is emitted when -paned has the focus and any of the -Return, Enter, Space keys -are pressed. This will also cause the child widget with the focus to be -activated. - - - - - The "cancel-position" gtk.Paned Signal - - - callback - paned - user_param1 - ... - - - - - paned : - the paned that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was -handled - - - - The "cancel-position" signal is emitted when the -Esc key is pressed while paned has -the focus. - - - - - The "cycle-child-focus" gtk.Paned Signal - - - callback - paned - reversed - user_param1 - ... - - - - - paned : - the paned that received the -signal - - - reversed : - if True the focus cycle -direction should be reversed - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was -handled - - - - The "cycle-child-focus" signal is emitted when -F6 or ShiftF6 is -pressed while paned has the focus. - - - - - The "cycle-handle-focus" gtk.Paned Signal - - - callback - paned - reversed - user_param1 - ... - - - - - paned : - the paned that received the -signal - - - reversed : - if True the focus cycle -direction should be reversed - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was -handled - - - - The "cycle-handle-focus" signal is emitted when -paned has the focus and any of the -Tab, -CtrlTab - , ShiftTab - or -CtrlShiftTab - keys combinations are pressed. Tab and -CtrlTab - set reversed to -False while -ShiftTab - and CtrlShiftTab - set reversed to -True. - - - - - The "move-handle" gtk.Paned Signal - - - callback - paned - scrolltype - user_param1 - ... - - - - - paned : - the paned that received the -signal - - - scrolltype : - the scroll type: -gtk.SCROLL_NONE, gtk.SCROLL_JUMP, -gtk.SCROLL_STEP_BACKWARD, -gtk.SCROLL_STEP_FORWARD, -gtk.SCROLL_PAGE_BACKWARD, -gtk.SCROLL_PAGE_FORWARD, -gtk.SCROLL_STEP_UP, -gtk.SCROLL_STEP_DOWN, -gtk.SCROLL_PAGE_UP, -gtk.SCROLL_PAGE_DOWN, -gtk.SCROLL_STEP_LEFT, -gtk.SCROLL_STEP_RIGHT, -gtk.SCROLL_PAGE_LEFT, -gtk.SCROLL_PAGE_RIGHT, -gtk.SCROLL_START or -gtk.SCROLL_END - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was -handled - - - - The "move-handle" signal is emitted when -paned has the focus and one of the following key -combinations is pressed to move the separator: - - - - Left -Arrow - - - Right -Arrow - - - Up Arrow - - - Down -Arrow - - - Page Up - - - Page Down - - - Home - - - End - - - - The value of scrolltype is one of: -gtk.SCROLL_NONE, gtk.SCROLL_JUMP, -gtk.SCROLL_STEP_BACKWARD, -gtk.SCROLL_STEP_FORWARD, -gtk.SCROLL_PAGE_BACKWARD, -gtk.SCROLL_PAGE_FORWARD, -gtk.SCROLL_STEP_UP, -gtk.SCROLL_STEP_DOWN, -gtk.SCROLL_PAGE_UP, -gtk.SCROLL_PAGE_DOWN, -gtk.SCROLL_STEP_LEFT, -gtk.SCROLL_STEP_RIGHT, -gtk.SCROLL_PAGE_LEFT, -gtk.SCROLL_PAGE_RIGHT, -gtk.SCROLL_START or gtk.SCROLL_END. -The default handler for this signal moves the separator if the separator has -the focus. - - - - - The "toggle-handle-focus" gtk.Paned Signal - - - callback - paned - user_param1 - ... - - - - - paned : - the paned that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was -handled - - - - The "toggle-handle-focus" signal is emitted when -paned has the focus and F8 is -pressed to give the focus to or take the focus from the separator -handle. - - - - - -
diff --git a/docs/reference/pygtk-gtkpapersize.xml b/docs/reference/pygtk-gtkpapersize.xml deleted file mode 100644 index b4cf24b6..00000000 --- a/docs/reference/pygtk-gtkpapersize.xml +++ /dev/null @@ -1,686 +0,0 @@ - - - - - - - gtk.PaperSize - an object providing support for named paper sizes (new in - PyGTK 2.10) - - - - Synopsis - - - gtk.PaperSize - gobject.GBoxed - - gtk.PaperSize - nameNone - - - copy - - - - is_equal - size2 - - - get_name - - - - get_display_name - - - - get_ppd_name - - - - get_width - unit - - - get_height - unit - - - is_custom - - - - set_size - width - height - unit - - - get_default_top_margin - unit - - - get_default_bottom_margin - unit - - - get_default_left_margin - unit - - - get_default_right_margin - unit - - - - - -Functions - - - gtk.paper_size_new_from_ppd - ppd_name - ppd_display_name - width - height - - gtk.paper_size_new_cutom - name - display_name - width - height - unit - - gtk.paper_size_get_default - - - - - - - Description - - - This class is available in PyGTK 2.10 and above. - - - A gtk.PaperSize - handles paper sizes. It uses the standard called "PWG 5101.1-2002 PWG: - Standard for Media Standardized Names" to name the paper sizes (and to - get the data for the page sizes). The common standard paper sizes are - named by the . In addition to - standard paper sizes, gtk.PaperSize - allows to construct custom paper sizes with arbitrary dimensions. - - The gtk.PaperSize - object stores not only the dimensions (width and height) of a paper size - and its name, it also provides default print margins. - - - - - Constructor - - - gtk.PaperSize - - - gtk.PaperSize - nameNone - - - - - name : - a paper size name, or None - - - Returns : - a new gtk.PaperSize. - - - - - This constructor is available in PyGTK 2.10 and above. - - - Creates a new gtk.PaperSize - object by parsing a PWG 5101.1-2002 PWG paper name. - - If name is None, the - default paper size is returned, see - paper_size_get_default(). - - - - - - - Methods - - - gtk.PaperSize.copy - - - copy - - - - - - Returns : - a copy of other - - - - - This method is available in PyGTK 2.10 and above. - - - The copy() method copies an existing gtk.PaperSize. - - - - - gtk.PaperSize.is_equal - - - is_equal - size2 - - - - - size2 : - another gtk.PaperSize - object - - - Returns : - True, if this paper size and - size2 represent the same paper - size - - - - - This method is available in PyGTK 2.10 and above. - - - The is_equal() method returns the - result of comparing this paper size to the gtk.PaperSize - specified by size2. - - - - - gtk.PaperSize.get_name - - - get_name - - - - - - Returns : - the name of the paper size - - - - - This method is available in PyGTK 2.10 and above. - - - The get_name() method returns the name - of the paper size. - - - - - gtk.PaperSize.get_display_name - - - get_display_name - - - - - - Returns : - the human-readable name of the paper - size. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_display_name() method returns - the human-readable name of the paper size. - - - - - gtk.PaperSize.get_ppd_name - - - get_ppd_name - - - - - - Returns : - the PPD name of the paper - size or None - - - - - This method is available in PyGTK 2.10 and above. - - - The get_ppd_name() method returns the - PPD name of the paper size, which may be - None. - - - - - gtk.PaperSize.get_width - - - get_width - unit - - - - - unit : - the unit for the return value - one of the - . - - - Returns : - the paper width - - - - - This method is available in PyGTK 2.10 and above. - - - The get_width() method returns the - paper width of the paper size, in units of - unit. - - - - - gtk.PaperSize.get_height - - - get_height - unit - - - - - unit : - the unit for the return value - one of the - . - - - Returns : - the paper height - - - - - This method is available in PyGTK 2.10 and above. - - - The get_height() method returns the - paper height of the paper size, in units of - unit. - - - - - gtk.PaperSize.is_custom - - - is_custom - - - - - - Returns : - True if the paper size is a - custom paper size. - - - - The is_custom() method returns - True if paper size is not a standard paper - size. - - - - - gtk.PaperSize.set_size - - - set_size - width - height - unit - - - - - width : - the new width in units of - unit - - - height : - the new height in units of - unit - - - unit : - the unit for width and - height - one of the . - - - - - This method is available in PyGTK 2.10 and above. - - - The set_size() method changes the - dimensions of the paper size to width x - height in the units specified by - unit. - - - - - gtk.PaperSize.get_default_top_margin - - - get_default_top_margin - unit - - - - - unit : - the unit for the return value - one of the - . - - - Returns : - the default top margin - - - - - This method is available in PyGTK 2.10 and above. - - - The get_default_top_margin() method - returns the default top margin for the gtk.PaperSize. - - - - - gtk.PaperSize.get_default_bottom_margin - - - get_default_bottom_margin - unit - - - - - unit : - the unit for the return value - one of the - . - - - Returns : - the default bottom margin - - - - - This method is available in PyGTK 2.10 and above. - - - The get_default_bottom_margin() method - gets the default bottom margin for the paper size. - - - - - gtk.PaperSize.get_default_left_margin - - - get_default_left_margin - unit - - - - - unit : - the unit for the return value - one of the - . - - - Returns : - the default left margin - - - - - This method is available in PyGTK 2.10 and above. - - - The get_default_left_margin() method - gets the default left margin for the paper size. - - - - - gtk.PaperSize.get_default_right_margin - - - get_default_right_margin - unit - - - - - unit : - the unit for the return value - one of the - . - - - Returns : - the default right margin - - - - - This method is available in PyGTK 2.10 and above. - - - The get_default_right_margin() method - gets the default right margin for the paper size. - - - - - - - Functions - - - gtk.paper_size_new_from_ppd - - - gtk.paper_size_new_from_ppd - ppd_name - ppd_display_name - width - height - - - - >ppd_name : - a PPD paper name - - - ppd_display_name : - the corresponding human-readable - name - - - width : - the paper width, in points - - - height : - the paper height in points - - - Returns : - a new gtk.PaperSize - - - - - This function is available in PyGTK 2.10 and above. - - - The paper_size new__from_ppd() function - creates a new gtk.PaperSize - object by using PPD information. If ppd_name - is not a recognized PPD paper name, - ppd_display_name, width - and height are used to construct a custom gtk.PaperSize - object. - - - - - gtk.paper_size_new_custom - - - gtk.paper_size_new_custom - name - display_name - width - height - unit - - - - >name : - the paper name - - - display_name : - the corresponding human-readable - name - - - width : - the paper width, in units of - unit - - - height : - the paper height in units of - unit - - - unit : - the units - one of the . - - - Returns : - a new gtk.PaperSize - - - - - This function is available in PyGTK 2.10 and above. - - - The paper_size_new_custom() function - creates a new gtk.PaperSize - object with the given parameters. - - - - - gtk.paper_size_get_default - - - gtk.paper_size_get_default - - - - - Returns : - the name of the default paper - size. - - - - - This function is available in PyGTK 2.10 and above. - - - The paper_size_get_default() function - returns the name of the default paper size, which depends on the - current locale. - - - - - - diff --git a/docs/reference/pygtk-gtkplug.xml b/docs/reference/pygtk-gtkplug.xml deleted file mode 100644 index 6fc084c2..00000000 --- a/docs/reference/pygtk-gtkplug.xml +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - gtk.Plug - A toplevel window for embedding into other -processes. - - - - Synopsis - - - gtk.Plug - gtk.Window - - gtk.Plug - socket_id - - - construct - socket_id - - - get_id - - - - -Functions - - - gtk.plug_new_for_display - display - socket_id - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Window - +-- gtk.Plug - - - - - - gtk.Plug Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Window Properties - - - - - gtk.Plug Style Properties - - gtk.Widget Style Properties - - - - - gtk.Plug Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Window Signal Prototypes - - - - "embedded" - - callback - plug - user_param1 - ... - - - - - - - - - Description - - Together with gtk.Socket, gtk.Plug 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 gtk.Socket widget -and, passes the ID of that widgets window to the other process, which then -creates a gtk.Plug with that -window ID. Any widgets contained in the gtk.Plug then will -appear inside the first applications window. - - - - - Constructor - - - gtk.Plug - socket_id - - - - socket_id : - the window ID of the socket, or -0. - - - Returns : - a gtk.Widget - - - - Creates a new gtk.Plug widget inside -the gtk.Socket -identified by socket_id. If -socket_id is 0, the plug is left "unplugged" and can -later be plugged into a gtk.Socket by the -gtk.Socket.add_id() -method. - - - - - Methods - - - gtk.Plug.construct - - - construct - socket_id - - - - socket_id : - the window ID of the -socket - - - - - This method is not available in PyGTK 2.2 -and above. - - - The construct() method finishes the -initialization of plug for the gtk.Socket -identified by socket_id. This method will generally -only be used by subclasses of gtk.Plug. - - - - - gtk.Plug.get_id - - - get_id - - - - Returns : - the window ID for the plug - - - - The get_id() method returns the window -ID of the gtk.Plug widget, which -can be used to embed this window inside another window, for instance with -gtk.Socket.add_id(). - - - - - - - Functions - - - gtk.plug_new_for_display - - - gtk.plug_new_for_display - display - socket_id - - - - display : - the gtk.gdk.Display - associated with - socket_id's. - - - socket_id : - the window ID of the socket's - window. - - - Returns : - a gtk.Plug - object - - - - - This function is available in PyGTK 2.2 and above. - - - The gtk.plug_new_for_display() function -creates a new plug widget inside the gtk.Socket specified -by socket_id on the gtk.gdk.Display -specified by display. - - - - - - - Signals - - - The "embedded" gtk.Plug Signal - - - callback - plug - user_param1 - ... - - - - - plug : - the plug that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "embedded" signal is emitted when the plug window is -reparented to the socket window. - - - - - - diff --git a/docs/reference/pygtk-gtkprintcontext.xml b/docs/reference/pygtk-gtkprintcontext.xml deleted file mode 100644 index 9e3c4aed..00000000 --- a/docs/reference/pygtk-gtkprintcontext.xml +++ /dev/null @@ -1,428 +0,0 @@ - - - - - - - gtk.PrintContext - Encapsulates context for drawing pages (new in PyGTK 2.10) - - - - Synopsis - - - gtk.PrintContext - gobject.GObject - - get_cairo_context - - - - get_page_setup - - - - get_width - - - - get_height - - - - get_dpi_x - - - - get_dpi_y - - - - get_pango_fontmap - - - - create_pango_context - - - - create_pango_layout - - - - set_cairo_context - cr - dpi_x - dpi_y - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.PrintContext - - - - - - gtk.PrintContext Signal Prototypes - - gobject.GObject Signal Prototypes - - - - Description - - A gtk.PrintContext - encapsulates context information that is required when drawing pages for - printing, such as the cairo context and important parameters like page - size and resolution. It also lets you easily create pango.Layout - and pango.Context - objects that match the font metrics of the cairo surface. - - gtk.PrintContext - objects gets passed to the "begin-print", "end-print", - "request-page-setup" and "draw-page" signals on the gtk.PrintOperation. - - -Using <link -linkend="class-gtkprintcontext"><classname>gtk.PrintContext</classname></link> -in a "draw-page" callback - -def draw_page(operation, context, page_nr): - cr = context.get_cairo_context() - - # Draw a red rectangle, as wide as the paper (inside the margins) - cr.set_source_rgb(1.0, 0, 0) - cr.rectangle(0, 0, context.get_width(), 50) - - cr.fill() - - # Draw some lines - cr.move_to(20, 10) - cr.line_to(40, 20) - cr.arc(60, 60, 20, 0, M_PI) - cr.line_to(80, 20) - - cr.set_source_rgb(0, 0, 0) - cr.set_line_width(5) - cr.set_line_cap(cairo.LINE_CAP_ROUND) - cr.set_line_join(cairo.LINE_JOIN_ROUND) - - cr.stroke() - - # Draw some text - layout = context.create_layout() - layout.set_text("Hello World! Printing is easy") - desc = pango.FontDescription("sans 28") - layout.set_font_description(desc) - - cr.move_to(30, 20) - layout.layout_path() - - # Font Outline - cr.set_source_rgb(0.93, 1.0, 0.47) - cr.set_line_width(0.5) - cr.stroke_preserve() - - # Font Fill - cr.set_source_rgb(0, 0.0, 1.0) - cr.fill() - - - -Printing support was added in GTK+ 2.10. - - - - - Methods - - - gtk.PrintContext.get_cairo_context - - - get_cairo_context - - - - - - Returns : - the cairo context - - - - - This method is available in PyGTK 2.10 and above. - - - The get_cairo_context() method returns - the cairo context that is associated with the gtk.PrintContext. - - - - - gtk.PrintContext.get_page_setup - - - get_page_setup - - - - - - Returns : - the page setup - - - - - This method is available in PyGTK 2.10 and above. - - - The get_page_setup() method returns the - gtk.PageSetup - that determines the page dimensions of the gtk.PrintContext. - - - - - gtk.PrintContext.get_width - - - get_width - - - - - - Returns : - the width - - - - - This method is available in PyGTK 2.10 and above. - - - The get_width() method returns the width - of the gtk.PrintContext, - in pixels. - - - - - gtk.PrintContext.get_height - - - get_height - - - - - - Returns : - the height - - - - - This method is available in PyGTK 2.10 and above. - - - The get_height() method returns the - width of the gtk.PrintContext, - in pixels. - - - - - gtk.PrintContext.get_dpi_x - - - get_dpi_x - - - - - - Returns : - the horizontal resolution - - - - - This method is available in PyGTK 2.10 and above. - - - The get_dpi_x() method returns the - horizontal resolution of the gtk.PrintContext, - in dots per inch. - - - - - gtk.PrintContext.get_dpi_y - - - get_dpi_y - - - - - - Returns : - the vertical resolution - - - - - This method is available in PyGTK 2.10 and above. - - - The get_dpi_y() method returns the - vertical resolution of the gtk.PrintContext, - in dots per inch. - - - - - gtk.PrintContext.get_pango_fontmap - - - get_pango_fontmap - - - - - - Returns : - the font map - - - - - This method is available in PyGTK 2.10 and above. - - - The method returns a pango.FontMap - that is suitable for use with the gtk.PrintContext. - - - - - gtk.PrintContext.create_pango_context - - - create_pango_context - - - - - - Returns : - a new pango.Context - - - - - This method is available in PyGTK 2.10 and above. - - - The create_pango_context() method - creates a new pango.Context - that can be used with the gtk.PrintContext. - - - - - gtk.PrintContext.create_pango_layout - - - create_pango_layout - - - - - - Returns : - a new pango.Layout - - - - - This method is available in PyGTK 2.10 and above. - - - The create_pango_layout() method - creates a new pango.Layout - that is suitable for use with the gtk.PrintContext. - - - - - gtk.PrintContext.set_cairo_context - - - set_cairo_context - cr - dpi_x - dpi_y - - - - - cr : - - - - dpi_x : - - - - dpi_y : - - - - - - This method is available in PyGTK 2.10 and above. - - - The set_cairo_context() method sets the - CairoContext specified by cr as the cairo - context for the print context. dpi_x and - dpi_y specify the horizontal and vertical - resolution of the print context. - - - - - - diff --git a/docs/reference/pygtk-gtkprinter.xml b/docs/reference/pygtk-gtkprinter.xml deleted file mode 100644 index 6a544acc..00000000 --- a/docs/reference/pygtk-gtkprinter.xml +++ /dev/null @@ -1,671 +0,0 @@ - - - - - - - gtkunixprint.Printer - an object representing a print in Unix (new in PyGTK - 2.10) - - - - Synopsis - - - gtkunixprint.Printer - gobject.GObject - - - - - get_name - - - - get_state_message - - - - get_description - - - - get_location - - - - get_icon_name - - - - get_job_count - - - - is_active - - - - is_virtual - - - - is_default - - - - compare - b - - - accepts_pdf - - - - accepts_ps - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtkunixprint.Printer - - - - - - gtkunixprint.Printer Properties - -
- - - - - - - - - "accepts-pdf" - Read-Write-Construct Only - if True this printer can accept - PDF. Available in GTK+ 2.10. - - - - "accepts-ps" - Read-Write-Construct Only - if True this printer can accept - PostScript. Available in GTK+ 2.10. - - - - "backend" - Read-Write-Construct Only - The backend for the printer. Not currently useful in - PyGTK. Available in GTK+ 2.10. - - - - "icon-name" - Read - The icon name to use for the printer. Default value: - None. Available in GTK+ 2.10. - - - - "is-virtual" - Read-Write - if False this represents a real - hardware printer. Default value: - False. Available in GTK+ 2.10. - - - - "job-count" - Read - The number of jobs queued in the printer. Allowed - values: >= 0. Default value: 0. Available in GTK+ - 2.10. - - - - "location" - Read - The location of the printer. Default value: - None. Available in GTK+ 2.10. - - - - "name" - Read-Write-Construct Only - The name of the printer. Default value: - None. Available in GTK+ 2.10. - - - - "state-message" - Read - A string giving the current state of the printer. - Default value: None. Available in GTK+ - 2.10. - - - - - -
- -
- - - gtkunixprint.Printer Signal Prototypes - - gobject.GObject Signal Prototypes - - - - "details-acquired" - - callback - printer - success - user_param1 - ... - - - - - - - - - Description - - - This class is available in PyGTK 2.10 and above. - - - A gtkunixprint.Printer - object represents a printer. You only need to deal directly with - printers if you use the non-portable gtkunixprint.PrintUnixDialog - API. - - A gtkunixprint.Printer - allows you to get status information about the printer, such as its - description, its location, the number of queued jobs, etc. Most - importantly, a gtkunixprint.Printer - object can be used to create a gtkunixprint.PrintJob - object, that lets you print to the printer. - - - - - - - Methods - - - - - gtkunixprint.Printer.get_name - - - get_name - - - - - - Returns : - the name of the printer - - - - - This method is available in PyGTK 2.10 and above. - - - The get_name() method returns the name - of the printer. - - - - - gtkunixprint.Printer.get_state_message - - - get_state_message - - - - - - Returns : - the state message of the - printer - - - - - This method is available in PyGTK 2.10 and above. - - - The get_state_message() method returns - the state message describing the current state of the printer. - - - - - gtkunixprint.Printer.get_description - - - get_description - - - - - - Returns : - the description of the - printer - - - - - This method is available in PyGTK 2.10 and above. - - - The get_description() method returns - the description of the printer. - - - - - gtkunixprint.Printer.get_location - - - get_location - - - - - - Returns : - the location of the printer - - - - - This method is available in PyGTK 2.10 and above. - - - The get_location() method returns a - description of the location of the printer. - - - - - gtkunixprint.Printer.get_icon_name - - - get_icon_name - - - - - - Returns : - the icon name for the printer - - - - - This method is available in PyGTK 2.10 and above. - - - The get_icon_name() method returns the - name of the icon to use for the printer. - - - - - gtkunixprint.Printer.get_job_count - - - get_job_count - - - - - - Returns : - the number of jobs on the printer - - - - - This method is available in PyGTK 2.10 and above. - - - The get_job_count() method returns the - number of jobs currently queued on the printer. - - - - - gtkunixprint.Printer.is_active - - - is_active - - - - - - Returns : - True if the printer is active - - - - - This method is available in PyGTK 2.10 and above. - - - The is_active() method returns - True if the printer is currently active (i.e. - accepts new jobs). - - - - - gtkunixprint.Printer.is_virtual - - - is_virtual - - - - - - Returns : - True if the printer is - virtual - - - - - This method is available in PyGTK 2.10 and above. - - - The is_virtual() method returns - True if the printer is virtual (i.e. does not - represent actual printer hardware, but something like a CUPS - class). - - - - - gtkunixprint.Printer.is_default - - - is_default - - - - - - Returns : - True if the printer is the default - - - - - This method is available in PyGTK 2.10 and above. - - - The is_default() method returns - True if the printer is the default printer. - - - - - gtkunixprint.Printer.compare - - - compare - b - - - - - b : - a gtkunixprint.Printer - - - Returns : - an integer indicating the result of the - comparison of the gtkunixprint.Printer - names. - - - - - This method is available in PyGTK 2.10 and above. - - - The compare() method compares the name of the printer to the - name of the gtkunixprint.Printer - specified by b and returns: - - - - a negative integer if the name of the printer is less than - the name of b. - - - a negative integer if the name of the printer is the same as - the name of b. - - - a positive integer if the name of the printer is greater - than the name of b. - - - - - - - gtkunixprint.Printer.accepts_pdf - - - accepts_pdf - - - - - - Returns : - True if the printer accepts - PDF - - - - - This method is available in PyGTK 2.10 and above. - - - Returns whether the printer accepts input in PDF format. - - - - - gtkunixprint.Printer.accepts_ps - - - accepts_ps - - - - - - Returns : - True if the printer accepts - PostScript - - - - - This method is available in PyGTK 2.10 and above. - - - Returns whether the printer accepts input in PostScript - format. - - - - - - - Signals - - - The "details-acquired" Signal - - - callback - printer - success - user_param1 - ... - - - - - printer : - the printer that received the -signal - - - success : - True if the details were - successfully acquired - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.10 and above. - - - The "details-acquired" signal is emitted in response to a - request for detailed information about a printer from the print - backend. The success parameter indicates if the information was - actually obtained. - - - - - -
diff --git a/docs/reference/pygtk-gtkprintjob.xml b/docs/reference/pygtk-gtkprintjob.xml deleted file mode 100644 index a9e7cfb9..00000000 --- a/docs/reference/pygtk-gtkprintjob.xml +++ /dev/null @@ -1,548 +0,0 @@ - - - - - - - gtkunixprint.PrintJob - an object that represents a print job (new in PyGTK - 2.10) - - - - Synopsis - - - gtkunixprint.PrintJob - gobject.GObject - - gtkunixprint.PrintJob - title - printer - settings - page_setup - - - get_settings - - - - get_printer - - - - get_title - - - - get_status - - - - set_source_file - filename - - - get_surface - - - set_track_print_status - track_status - - - get_track_print_status - - - - send - callback - user_dataNone - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtkunixprint.PrintJob - - - - - - gtkunixprint.PrintJob Properties - -
- - - - - - - - - "page-setup" - Read-Write-Construct Only - The Page Setup. Available in GTK+ 2.10. - - - - "printer" - Read-Write-Construct Only - The Printer to print the job to. Available in GTK+ - 2.10. - - - - "settings" - Read-Write-Construct Only - The Printer Settings. Available in GTK+ 2.10. - - - - "title" - Read-Write-Construct Only - Title of the print job. Default value: - None. Available in GTK+ 2.10. - - - - "track-print-status" - Read-Write - if True the print job will continue - to emit status-changed signals after the print data has been - sent to the printer or print server. Available in GTK+ - 2.10. - - - - - -
- -
- - - gtkunixprint.PrintJob Signal Prototypes - - gobject.GObject Signal Prototypes - - - - "status-changed" - - callback - printjob - user_param1 - ... - - - - - - - - - Description - - - This class is available in PyGTK 2.10 and above. - - - A gtkunixprint.PrintJob - object represents a job that is sent to a printer. You only need to deal - directly with print jobs if you use the non-portable gtkunixprint.PrintUnixDialog - API. - - Use the get_surface() - method to obtain the cairo surface onto which the pages must be - drawn. Use the send() - method to send the finished job to the printer. If you don't use cairo - gtkunixprint.PrintJob - also supports printing of manually generated postscript, via the set_source_file() - method. - - - - - Constructor - - - gtkunixprint.PrintJob - - - gtkunixprint.PrintJob - title - printer - settings - page_setup - - - - - title : - the job title - - - printer : - a gtkunixprint.Printer - - - settings : - a gtk.PrintSettings - - - page_setup : - a gtk.PageSetup - - - Returns : - a new gtkunixprint.PrintJob - - - - - This constructor is available in PyGTK 2.10 and above. - - - Creates a new gtkunixprint.PrintJob. - - - - - - - Methods - - - gtkunixprint.PrintJob.get_settings - - - get_settings - - - - - - Returns : - the settings of the print - job - - - - - This method is available in PyGTK 2.10 and above. - - - The get_settings() method returns the - gtk.PrintSettings - of the print job. - - - - - gtkunixprint.PrintJob.get_printer - - - get_printer - - - - - - Returns : - the printer of the print - job - - - - - This method is available in PyGTK 2.10 and above. - - - The get_printer() method returns the - gtkunixprint.Printer - of the print job. - - - - - gtkunixprint.PrintJob.get_title - - - get_title - - - - - - Returns : - the title of the print job - - - - - This method is available in PyGTK 2.10 and above. - - - The get_title() method returns the - print job title. - - - - - gtkunixprint.PrintJob.get_status - - - get_status - - - - - - Returns : - the status of the print - job - - - - - This method is available in PyGTK 2.10 and above. - - - The get_status() method returns the - status of the print job. - - - - - gtkunixprint.PrintJob.set_source_file - - - set_source_file - filename - - - - - filename : - the file to be printed - - - Returns : - False if an error - occurred - - - - - This method is available in PyGTK 2.10 and above. - - - The set_source_file() method makes the - gtkunixprint.PrintJob - send the existing document specified by - filename to the printing system. The file can - be in any format understood by the platforms printing system - (typically PostScript, but on many platforms PDF may work too). - - - - - gtkunixprint.PrintJob.get_surface - - - get_surface - - - - - Returns : - the cairo surface of the print - job - - - - - This method is available in PyGTK 2.10 and above. - - - The get_surface() method returns a - cairo surface onto which the pages of the print job should be - rendered. - - - - - gtkunixprint.PrintJob.set_track_print_status - - - set_track_print_status - track_status - - - - - track_status : - if True track the status of - the print job after sending - - - - - This method is available in PyGTK 2.10 and above. - - - The set_track_print_status() method - enable or disables tracking of the print job status based on the value - specified by track_status. If - track_status is True, the - print job will try to continue report on the status of the print job - in the printer queues and printer. This can allow your application to - show things like "out of paper" issues, and when the print job - actually reaches the printer. - - This method is often implemented using some form of polling, so - tracking should not be enabled unless needed. - - - - - gtkunixprint.PrintJob.get_track_print_status - - - get_track_print_status - - - - - - Returns : - True if print job status - will be reported after printing - - - - - This method is available in PyGTK 2.10 and above. - - - The get_track_print_status() method - returns wheter jobs will be tracked after printing. For details, see - the set_track_print_status() - method. - - - - - gtkunixprint.PrintJob.send - - - send - callback - user_dataNone - - - - - callback : - the function to call when the job - completes - - - user_data : - user data that gets passed to - callback - - - Returns : - False if an error - occurred - - - - - This method is available in PyGTK 2.10 and above. - - - The send() method sends the print job - off to the printer and registers the function specified by - callback ro be called when the job - completes. - - The signature of callback is: - - -def callback(print_job, data, errormsg): - - - where data is - user_data and errormsg - is a message indicating what problem has occurred or - None if no error has occurred. - - - - - - - Signals - - - The "status-changed" Signal - - - callback - gtkprintjob - user_param1 - ... - - - - - gtkprintjob : - the gtkprintjob that received the - signal - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if - any) - - - - The "status-changed" signal is emitted when the status of a job - changes. The signal handler can use the get_status() - method to obtain the new status. - - - - - -
diff --git a/docs/reference/pygtk-gtkprintoperation.xml b/docs/reference/pygtk-gtkprintoperation.xml deleted file mode 100644 index 98fd792f..00000000 --- a/docs/reference/pygtk-gtkprintoperation.xml +++ /dev/null @@ -1,1709 +0,0 @@ - - - - - - - gtk.PrintOperation - a high-level printing API (new in PyGTK 2.10) - - - - Synopsis - - - gtk.PrintOperation - gobject.GObject - gtk.PrintOperationPreview - - gtk.PrintOperation - - - - set_default_page_setup - default_page_setupNone - - - get_default_page_setup - - - - set_print_settings - print_settingsNone - - - get_print_settings - - - - set_job_name - job_name - - - set_n_pages - n_pages - - - set_current_page - current_page - - - set_use_full_page - full_page - - - set_unit - unit - - - set_export_filename - filename - - - set_track_print_status - track_status - - - set_show_progress - show_progress - - - set_allow_async - allow_async - - - set_custom_tab_label - label - - - run - action - parentNone - - - get_error - - - - get_status - - - - get_status_string - - - - is_finished - - - - cancel - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.PrintOperation (implements gtk.PrintOperationPreview) - - - - - - gtk.PrintOperation Properties - -
- - - - - - - - - "allow-async" - Read-Write - If True the print operation may run - asynchronously or not. Some systems don't support asynchronous - printing, but those that do will return - gtk.PRINT_OPERATION_RESULT_IN_PROGRESS as the - status, and emit the done signal when the operation is actually - done. This property is available in GTK+ 2.10 and above. - - - - "current-page" - Read-Write - The current page in the document. If this is set before - gtk.PrintOperation.run(), - the user will be able to select to print only the current page. - Note that this only makes sense for pre-paginated documents. This - property is available in GTK+ 2.10 and above. - - - - "custom-tab-label" - Read-Write - Used as the label of the tab containing custom widgets. - Note that this property may be ignored on some platforms. If this - is None, GTK+ uses a default label. This - property is available in GTK+ 2.10 and above. - - - - "default-page-setup" - Read-Write - The gtk.PageSetup - used by default. This page setup will be used by gtk.PrintOperation.run(), - but it can be overridden on a per-page basis by connecting to the - "request-page-setup" signal. This property is available in GTK+ - 2.10 and above. - - - - "export-filename" - Read-Write - The name of a file file to generate instead of showing the - print dialog. Currently, PDF is the only supported format. The - intended use of this property is for implementing "Export to PDF" - actions. "Print to PDF" support is independent of this and is - done by letting the user pick the "Print to PDF" item from the - list of printers in the print dialog. This property is available - in GTK+ 2.10 and above. - - - - "job-name" - Read-Write - A string used to identify the job (e.g. in monitoring - applications like eggcups). If you don't set a job name, GTK+ - picks a default one by numbering successive print jobs. This - property is available in GTK+ 2.10 and above. - - - - "n-pages" - Read-Write - The number of pages in the document. This - must be set to a positive number before the - rendering starts. It may be set in a "begin-print" signal hander. - Note that the page numbers passed to the "request-page-setup" and - "draw-page" signals are 0-based, i.e. if the user chooses to print - all pages, the last "draw-page" signal will be for page - n_pages - 1. This property is available in - GTK+ 2.10 and above. - - - - "print-settings" - Read-Write - The gtk.PrintSettings - used for initializing the dialog. Setting this property is - typically used to re-establish print settings from a previous - print operation, see the gtk.PrintOperation.run() - method. This property is available in GTK+ 2.10 and above. - - - - "show-progress" - Read-Write - If True show a progress dialog during - the print operation. This property is available in GTK+ 2.10 and - above. - - - - "status" - Read - The status of the print operation. This property is - available in GTK+ 2.10 and above. - - - - "status-string" - Read - A string representation of the status of the print - operation. The string is translated and suitable for displaying - the print status e.g. in a gtk.Statusbar. - See the "status" property for a status value that is suitable for - programmatic use. This property is available in GTK+ 2.10 and - above. - - - - "track-print-status" - Read-Write - If True, the print operation will try to - continue report on the status of the print job in the printer - queues and printer. This can allow your application to show - things like "out of paper" issues, and when the print job actually - reaches the printer. However, this is often implemented using - polling, and should not be enabled unless needed. This property - is available in GTK+ 2.10 and above. - - - - "unit" - Read-Write - The transformation for the cairo context obtained from - gtk.PrintContext - is set up in such a way that distances are measured in units of - unit. This property is available in GTK+ - 2.10 and above. - - - - "use-full-page" - Read-Write - If True, the transformation for the - cairo context obtained from gtk.PrintContext - puts the origin at the top left corner of the page (which may not - be the top left corner of the sheet, depending on page orientation - and the number of pages per sheet). Otherwise, the origin is at - the top left corner of the imageable area (i.e. inside the - margins). This property is available in GTK+ 2.10 and - above. - - - - - -
- -
- - - gtk.PrintOperation Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.PrintOperationPreview Signal Prototypes - - - - "begin-print - - callback - operation - context - user_param1 - ... - - - - - "create-custom-widget - - callback - operation - user_param1 - ... - - - - - "custom-widget-apply - - callback - operation - widget - user_param1 - ... - - - - - "done - - callback - operation - result - user_param1 - ... - - - - - "draw-page - - callback - operation - context - page_nr - user_param1 - ... - - - - - "end-print - - callback - operation - context - user_param1 - ... - - - - - "paginate - - callback - printoperation - context - user_param1 - ... - - - - - "preview - - callback - operation - preview - context - parent - user_param1 - ... - - - - - "request-page-setup - - callback - operation - context - page_nr - setup - user_param1 - ... - - - - - "status-changed - - callback - operation - printoperation - user_param1 - ... - - - - - - - - - Description - - gtk.PrintOperation - is the high-level, portable printing API. It looks a bit different than - other GTK+ dialogs such as the gtk.FileChooser, - since some platforms don't expose enough infrastructure to implement a - good print dialog. On such platforms, gtk.PrintOperation - uses the native print dialog. On platforms which do not provide a native - print dialog, GTK+ uses its own, see gtkunixprint.PrintUnixDialog. - - The typical way to use the high-level printing API is to create a - gtk.PrintOperation - object with the gtk.PrintOperation - constructor when the user selects to print. Then you set some properties - on it, e.g. the page size, any gtk.PrintSettings - from previous print operations, the number of pages, the current page, - etc. - - Then you start the print operation by calling the gtk.PrintOperation.run() - method. It will then show a dialog, let the user select a printer and - options. When the user finished the dialog various signals will be - emitted on the gtk.PrintOperation, - the main one being "draw-page", which you are supposed to catch and - render the page on the provided gtk.PrintContext - using Cairo. - - -The high-level printing API - -settings = None - -def do_print(): - print = gtk.PrintOperation() - - if settings != None: - print.set_print_settings(settings) - - print.connect("begin_print", begin_print) - print.connect("draw_page", draw_page) - - res = print.run(gtk.PRINT_OPERATION_ACTION_PRINT_DIALOG, main_window) - - if res == gtk.PRINT_OPERATION_RESULT_APPLY: - settings = print.get_print_settings() - - - -Printing support was added in GTK+ 2.10. - - - - - Constructor - - - gtk.PrintOperation - - - gtk.PrintOperation - - - - - - Returns : - a new gtk.PrintOperation - - - - - This constructor is available in PyGTK 2.10 and above. - - - Creates a new gtk.PrintOperation. - - - - - - - Methods - - - gtk.PrintOperation.set_default_page_setup - - - set_default_page_setup - default_page_setupNone - - - - - default_page_setup : - a gtk.PageSetup, - or None - - - - - This method is available in PyGTK 2.10 and above. - - - The set_default_page_setup() method - makes default_page_setup the default page - setup. - - This page setup will be used by the gtk.PrintOperation.run() - method, but it can be overridden on a per-page basis by connecting to - the "request-page-setup" signal. - - - - - gtk.PrintOperation.get_default_page_setup - - - get_default_page_setup - - - - - - Returns : - the default page setup - - - - - This method is available in PyGTK 2.10 and above. - - - The get_default_page_setup() method - returns the default page setup, see the gtk.PrintOperation.set_default_page_setup() - method. - - - - - gtk.PrintOperation.set_print_settings - - - set_print_settings - print_settingsNone - - - - - print_settings : - gtk.PrintSettings, - or None - - - - - This method is available in PyGTK 2.10 and above. - - - The set_print_settings() method sets - the print settings. This is typically used to re-establish print - settings from a previous print operation, see the gtk.PrintOperation.run() - method. - - - - - gtk.PrintOperation.get_print_settings - - - get_print_settings - - - - - - Returns : - the current print settings. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_print_settings() method returns - the current print settings. - - Note that the return value is None until - either the gtk.PrintOperation.set_print_settings() - or gtk.PrintOperation.run() - methods have been called. - - - - - gtk.PrintOperation.set_job_name - - - set_job_name - job_name - - - - - job_name : - a string that identifies the print - job - - - - - This method is available in PyGTK 2.10 and above. - - - The set_job_name() method sets the name - of the print job. The name is used to identify the job (e.g. in - monitoring applications like eggcups). - - If you don't set a job name, GTK+ picks a default one by - numbering successive print jobs. - - - - - gtk.PrintOperation.set_n_pages - - - set_n_pages - n_pages - - - - - n_pages : - the number of pages - - - - - This method is available in PyGTK 2.10 and above. - - - The set_n_pages() >method sets the - number of pages in the document. - - This must be set to a positive number - before the rendering starts. It may be set in a "begin-print" signal - hander. - - Note that the page numbers passed to the "request-page-setup" - and "draw-page" signals are 0-based, i.e. if the user chooses to print - all pages, the last "draw-page" signal will be for page - n_pages - 1. - - - - - gtk.PrintOperation.set_current_page - - - set_current_page - current_page - - - - - current_page : - the current page, 0-based - - - - - This method is available in PyGTK 2.10 and above. - - - The set_current_page() method sets the - current page. - - If this is called before gtk.PrintOperation.run(), - the user will be able to select to print only the current page. - - Note that this only makes sense for pre-paginated - documents. - - - - - gtk.PrintOperation.set_use_full_page - - - set_use_full_page - full_page - - - - - full_page : - True to set up the gtk.PrintContext - for the full page - - - - - This method is available in PyGTK 2.10 and above. - - - The set_use_full_page() method sets the - "full-page" property to the value of - full_page. If full_page - is True, the transformation for the cairo context - obtained from gtk.PrintContext - puts the origin at the top left corner of the page (which may not be - the top left corner of the sheet, depending on page orientation and - the number of pages per sheet). Otherwise, the origin is at the top - left corner of the imageable area (i.e. inside the margins). - - - - - gtk.PrintOperation.set_unit - - - set_unit - unit - - - - - unit : - the unit to use - - - - - This method is available in PyGTK 2.10 and above. - - - The set_unit() method sets up the - transformation for the cairo context such distances are measured in - units of unit. - - - - - gtk.PrintOperation.set_export_filename - - - set_export_filename - filename - - - - - filename : - the filename for the exported file - - - - - This method is available in PyGTK 2.10 and above. - - - The set_export_filename() method sets - up the gtk.PrintOperation - to generate a file instead of showing the print dialog. The intended - use of this method is for implementing "Export to PDF" - actions. Currently, PDF is the only supported format. - - "Print to PDF" support is independent of this and is done by - letting the user pick the "Print to PDF" item from the list of - printers in the print dialog. - - - - - gtk.PrintOperation.set_track_print_status - - - set_track_print_status - track_status - - - - - track_status : - if True track status after - printing - - - - - This method is available in PyGTK 2.10 and above. - - - The set_track_print_status() method - sets the "track-print-status" to the value of - track_status. If - track_status is True, the - print operation will try to continue report on the status of the print - job in the printer queues and printer. This can allow your application - to show things like "out of paper" issues, and when the print job - actually reaches the printer. - - This method is often implemented using some form of polling, so - it should not be enabled unless needed. - - - - - gtk.PrintOperation.set_show_progress - - - set_show_progress - show_progress - - - - - show_progress : - if True show a progress - dialog - - - - - This method is available in PyGTK 2.10 and above. - - - The set_show_progress() method sets the - "show-progress" property to the value of - show_progress. If - show_progress is True, the - print operation will show a progress dialog during the print - operation. - - - - - gtk.PrintOperation.set_allow_async - - - set_allow_async - allow_async - - - - - allow_async : - if True allow asynchronous - operation - - - - - This method is available in PyGTK 2.10 and above. - - - The set_allow_async() method sets the - "allow-async" to the value of allow_async. If - allow_async is True the - gtk.PrintOperation.run() - may return before the print operation is completed. Note that some - platforms may not allow asynchronous operation. - - - - - gtk.PrintOperation.set_custom_tab_label - - - set_custom_tab_label - label - - - - - label : - - - - - - This method is available in PyGTK 2.10 and above. - - - The set_custom_tab_label() method sets - the label for the tab holding custom widgets. - - - - - gtk.PrintOperation.run - - - run - action - parentNone - - - - - action : - the action to start - one of the - - - parent : - Transient parent of the dialog, or None - - - Returns : - the result of the print operation - one of the - . A - return value of - gtk.PRINT_OPERATION_RESULT_APPLY indicates that - the printing was completed successfully. In this case, it is a - good idea to obtain the used print settings with the gtk.PrintOperation.get_print_settings() - method and store them for reuse with the next print operation. A - value of gtk.PRINT_OPERATION_RESULT_IN_PROGRESS - means the operation is running asynchronously, and will emit the - "done" signal when done. - - - - - This method is available in PyGTK 2.10 and above. - - - The run() method runs the print - operation, by first letting the user modify print settings in the - print dialog, and then print the document. - - Normally that this method does not return until the rendering of - all pages is complete. You can connect to the "status-changed" signal - to obtain some information about the progress of the print operation. - Furthermore, it may use a recursive mainloop to show the print - dialog. - - If you call the gtk.PrintOperation.set_allow_async() - method or set the "allow-async" property the operation will run - asyncronously if this is supported on the platform. The "done" signal - will be emitted with the operation results when the operation is done - (i.e. when the dialog is canceled, or when the print succeeds or - fails). - - - if settings != None: - print.set_print_settings( settings) - - if page_setup != None: - print.set_default_page_setup(page_setup) - - print.connect( "begin-print", begin_print, data) - print.connect("draw-page", draw_page, data) - - res = print.run(gtk.PRINT_OPERATION_ACTION_PRINT_DIALOG, parent) - - if res == gtkprint_OPERATION_RESULT_ERROR: - error_dialog = gtk.MessageDialog(parent, - gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_ERROR, - gtk.BUTTONS_CLOSE, - "Error printing file:\n") - error_dialog.connect("response", lambda w,id: w.destroy()) - error_dialog.show() - elif res == gtk.PRINT_OPERATION_RESULT_APPLY: - settings = print.get_print_settings() - - - - - - gtk.PrintOperation.get_error - - - get_error - - - - - - Returns : - the error message or - None - - - - - This method is available in PyGTK 2.10 and above. - - - The get_error() method returns the - error message or None. Call this when the result of - a print operation is - gtk.PRINT_OPERATION_RESULT_ERROR, either as - returned by the gtk.PrintOperation.run() - method, or in the "done" signal handler. - - - - - gtk.PrintOperation.get_status - - - get_status - - - - - - Returns : - the status of the print - operation - - - - - This method is available in PyGTK 2.10 and above. - - - The get_status() method returns the - status of the print operation as one of the . Also see the gtk.PrintOperation.get_status_string() - method. - - - - - gtk.PrintOperation.get_status_string - - - get_status_string - - - - - - Returns : - a string representation of the status of the - print operation - - - - - This method is available in PyGTK 2.10 and above. - - - The get_status_string() method returns - a string representation of the status of the print operation. The - string is translated and suitable for displaying the print status - e.g. in a gtk.Statusbar. - - Use the gtk.PrintOperation.get_status() - method to obtain a status value that is suitable for - programmatic use. - - - - - gtk.PrintOperation.is_finished - - - is_finished - - - - - - Returns : - True, if the print operation - is finished. - - - - - This method is available in PyGTK 2.10 and above. - - - The method returns True if the print operation is - completed. This is a convenience method to find out if the print - operation is finished, either successfully - (gtk.PRINT_STATUS_FINISHED) or unsuccessfully - (gtk.PRINT_STATUS_FINISHED_ABORTED). - - - When you enable print status tracking, the print operation can - be in a non-finished state even after done has been called, as the - operation status then tracks the print job status on the - printer. - - - - - - gtk.PrintOperation.cancel - - - cancel - - - - - This method is available in PyGTK 2.10 and above. - - - The cancel() method cancels a running - print operation. This method may be called from a "begin-print", - "paginate" or "draw-page" signal handler to stop the currently running - print operation. - - - - - - - Signals - - - The "begin-print" gtk.PrintOperation Signal - - callback - operation - context - user_param1 - ... - - - - - operation : - the gtk.PrintOperation - on which the signal was emitted - - - context : - the gtk.PrintContext - for the current operation - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - - This signal is available in GTK+ 2.10 and above. - - - The "begin-print" signal is emitted after the user has finished - changing print settings in the dialog, before the actual rendering - starts. - - A typical use for this signal is to use the parameters from the - gtk.PrintContext - and paginate the document accordingly, and then set the number of - pages with gtk.PrintOperation.set_n_pages(). - - - - - The "create-custom-widget" gtk.PrintOperation Signal - - callback - operation - user_param1 - ... - - - - - operation : - the gtk.PrintOperation on which the signal was emitted - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - Returns : - A custom widget that gets embedded in the print - dialog, or None - - - - - This signal is available in GTK+ 2.10 and above. - - - The "create-custom-widget" signal is emitted when displaying the - print dialog. If you return a widget in a handler for this signal it - will be added to a custom tab in the print dialog. You typically - return a container widget with multiple widgets in it. - - The print dialog owns the returned widget, and its lifetime - isn't controlled by the app. However, the widget is guaranteed to stay - around until the "custom-widget-apply" signal is emitted on the - operation. Then you can read out any information you need from the - widgets. - - - - - The "custom-widget-apply" gtk.PrintOperation Signal - - callback - operation - widget - user_param1 - ... - - - - - operation : - the gtk.PrintOperation on which the signal was emitted - - - widget : - the custom widget added in create-custom-widget - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - - This signal is available in GTK+ 2.10 and above. - - - The "custom-widget-apply" signal is emitted right before - "begin-print" if you added a custom widget in the - "create-custom-widget" handler. When you get this signal you should - read the information from the custom widgets, as the widgets are not - guaraneed to be around at a later time. - - - - - The "done" gtk.PrintOperation Signal - - callback - operation - result - user_param1 - ... - - - - - operation : - the gtk.PrintOperation on which the signal was emitted - - - result : - the result of the print operation - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - - This signal is available in GTK+ 2.10 and above. - - - The "done" signal is emitted when the print operation run has - finished doing everything required for - printing. result (one of the ) gives - you information about what happened during the run. If - result is - gtk.PRINT_OPERATION_RESULT_ERROR then you can call - the gtk.PrintOperation.get_error() - method for more information. - - If you enabled print status tracking then the gtk.PrintOperation.is_finished() - method may still return False after this was - emitted. - - - - - The "draw-page" gtk.PrintOperation Signal - - callback - operation - context - page_nr - user_param1 - ... - - - - - operation : - the gtk.PrintOperation on which the signal was emitted - - - context : - the gtk.PrintContext for the current operation - - - page_nr : - the number of the currently printed page - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - - This signal is available in GTK+ 2.10 and above. - - - The "draw-page" signal is emitted for every page that is - printed. The signal handler must render the - page_nr's page onto the cairo context obtained - from context using gtk.PrintContext.get_cairo_context(). - - -def draw_page(operation, context, page_nr, user_data): - cr = context.get_cairo_context() - width = context.get_width() - - cr.rectangle(0, 0, width, HEADER_HEIGHT) - - cr.set_source_rgb(0.8, 0.8, 0.8); - cr.fill() - - layout = context.create_pango_layout() - - desc = pango.FontDescription("sans 14") - layout.set_font_description(desc) - - layout.set_text("some text") - layout.set_width(width) - layout.set_alignment(pango.ALIGN_CENTER) - - x,layout_height = layout.get_size() - text_height = layout_height / pango.SCALE - - cr.move_to(width / 2, (HEADER_HEIGHT - text_height) / 2) - cr.show_layout(layout) - - - Use the gtk.PrintOperation.set_use_full_page() - and gtk.PrintOperation.set_unit() - methods before starting the print operation to set up the - transformation of the cairo context according to your - needs. - - - - - The "end-print" gtk.PrintOperation Signal - - callback - operation - context - user_param1 - ... - - - - - operation : - the gtk.PrintOperation on which the signal was emitted - - - context : - the gtk.PrintContext for the current operation - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - - This signal is available in GTK+ 2.10 and above. - - - The "end-print" signal is emitted after all pages have been - rendered. A handler for this signal can clean up any resources that - have been allocated in the "begin-print" handler. - - - - - The "paginate" gtk.PrintOperation Signal - - callback - printoperation - context - user_param1 - ... - - - - - printoperation : - the object which received the signal. - - - context : - the gtk.PrintContext - for the current operation - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - Returns : - - - - - - This signal is available in GTK+ 2.10 and above. - - - The "paginate" signal is emitted after the "begin-print" signal, - but before the actual rendering starts. It keeps getting emitted until - it returns False. - - This signal is intended to be used for paginating the document - in small chunks, to avoid blocking the user interface for a long - time. The signal handler should update the number of pages using the - gtk.PrintOperation.set_n_pages() - method, and return True if the document has been - completely paginated. - - If you don't need to do pagination in chunks, you can simply do - it all in the "begin-print" handler, and set the number of pages from - there. - - - - - The "preview" gtk.PrintOperation Signal - - callback - operation - preview - context - parent - user_param1 - ... - - - - - operation : - the gtk.PrintOperation on which the signal was emitted - - - preview : - the GtkPrintPreviewOperation for the current operation - - - context : - the gtk.PrintContext that will be used - - - parent : - the gtk.Window to use as window parent, or None - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - Returns : - True if the listener wants to take over control of the preview - - - - - This signal is available in GTK+ 2.10 and above. - - - The "preview" signal is emitted when a preview is requested from - the native dialog. If you handle this you must set the cairo context - on the printing context. - - If you don't override this, a default implementation using an - external viewer will be used. - - - - - The "request-page-setup" gtk.PrintOperation Signal - - callback - operation - context - page_nr - setup - user_param1 - ... - - - - - operation : - the gtk.PrintOperation on which the signal was emitted - - - context : - the gtk.PrintContext for the current operation - - - page_nr : - the number of the currently printed page - - - setup : - the gtk.PageSetup - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - - This signal is available in GTK+ 2.10 and above. - - - The "request-page-setup" signal is emitted once for every page - that is printed, to give the application a chance to modify the page - setup. Any changes done to setup will be in - force only for printing this page. - - - - - The "status-changed" gtk.PrintOperation Signal - - callback - operation - printoperation - user_param1 - ... - - - - - operation : - the gtk.PrintOperation on which the signal was emitted - - - printoperation : - the object which received the signal. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - - This signal is available in GTK+ 2.10 and above. - - - The "status-changed" signal is emitted at between the various - phases of the print operation. See the for the phases that - are being discriminated. Use the gtk.PrintOperation.get_status() - method to find out the current status. - - - - - -
diff --git a/docs/reference/pygtk-gtkprintoperationpreview.xml b/docs/reference/pygtk-gtkprintoperationpreview.xml deleted file mode 100644 index cac5d18d..00000000 --- a/docs/reference/pygtk-gtkprintoperationpreview.xml +++ /dev/null @@ -1,236 +0,0 @@ - - - - - - - gtk.PrintOperationPreview - an interface for printing preview (new in PyGTK - 2.10) - - - - Synopsis - - - gtk.PrintOperationPreview - gobject.GInterface - - render_page - page_nr - - - end_preview - - - - is_selected - page_nr - - - - - - - gtk.PrintOperationPreview Signal Prototypes - - - - - "got-page-size - - callback - printoperationpreview - printcontext - user_param1 - ... - - - - - "ready - - callback - printoperationpreview - printcontext - pagesetup - user_param1 - ... - - - - - - - - - Description - - gtk.PrintOperationPreview - is an interface implemented by gtk.PrintOperation - for previewing pages before printing. - - - - - Methods - - - gtk.PrintOperationPreview.render_page - - - render_page - page_nr - - - - - page_nr : - the number of the page to be - previewed - - - - - This method is available in PyGTK 2.10 and above. - - - - - - gtk.PrintOperationPreview.end_preview - - - end_preview - - - - - This method is available in PyGTK 2.10 and above. - - - - - - gtk.PrintOperationPreview.is_selected - - - is_selected - page_nr - - - - - page_nr : - - - - Returns : - True if - page_nr is the currently selected - page - - - - - This method is available in PyGTK 2.10 and above. - - - Returns True if the page with the number - specified by page_nr is currently - selected. - - - - - - - Signals - - - The "got-page-size" gtk.PrintOperationPreview Signal - - callback - printoperationpreview - printcontext - user_param1 - ... - - - - - printoperationpreview : - - - - printcontext : - the print context - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - - This signal is available in GTK+ 2.10 and above. - - - - - - The "ready" gtk.PrintOperationPreview Signal - - callback - printoperationpreview - printcontext - pagesetup - user_param1 - ... - - - - - printoperationpreview : - - - - printcontext : - the print context - - - pagesetup : - the page setup - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - - This signal is available in GTK+ 2.10 and above. - - - - - - - diff --git a/docs/reference/pygtk-gtkprintsettings.xml b/docs/reference/pygtk-gtkprintsettings.xml deleted file mode 100644 index 061cd626..00000000 --- a/docs/reference/pygtk-gtkprintsettings.xml +++ /dev/null @@ -1,1954 +0,0 @@ - - - - - - - gtk.PrintSettings - Stores print settings (new in PyGTK 2.10) - - - - Synopsis - - - gtk.PrintSettings - gobject.GObject - - gtk.PrintSettings - - - - copy - - - - has_key - key - - - get - key - - - set - key - value - - - unset - key - - - foreach - func - user_dataNone - - - get_bool - key - - - set_bool - key - value - - - get_double - key - - - get_double_with_default - key - def - - - set_double - key - value - - - get_length - key - unit - - - set_length - key - value - unit - - - get_int - key - - - get_int_with_default - key - def - - - set_int - key - value - - - get_printer - - - - set_printer - printer - - - get_orientation - - - - set_orientation - orientation - - - get_paper_size - - - - set_paper_size - paper_size - - - get_paper_width - unit - - - set_paper_width - width - unit - - - get_paper_height - unit - - - set_paper_height - height - unit - - - get_use_color - - - - set_use_color - use_color - - - get_collate - - - - set_collate - collate - - - get_reverse - - - - set_reverse - reverse - - - get_duplex - - - - set_duplex - duplex - - - get_quality - - - - set_quality - quality - - - get_n_copies - - - - set_n_copies - num_copies - - - get_number_up - - - - set_number_up - number_up - - - get_resolution - - - - set_resolution - resolution - - - get_scale - - - - set_scale - scale - - - get_print_pages - - - - set_print_pages - pages - - - get_page_ranges - num_ranges - - - set_page_ranges - page_ranges - num_ranges - - - get_page_set - - - - set_page_set - page_set - - - get_default_source - - - - set_default_source - default_source - - - get_media_type - - - - set_media_type - media_type - - - get_dither - - - - set_dither - dither - - - get_finishings - - - - set_finishings - finishings - - - get_output_bin - - - - set_output_bin - output_bin - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.PrintSettings - - - - - - gtk.PrintSettings Signal Prototypes - - gobject.GObject Signal Prototypes - - - - Description - - A gtk.PrintSettings - object represents the settings of a print dialog in a system-independent - way. The main use for this object is that once you've printed you can - get a settings object that represents the settings the user chose, and - the next time you print you can pass that object in so that the user - doesn't have to re-set all his settings. - - Its also possible to enumerate the settings so that you can easily - save the settings for the next time your app runs, or even store them in - a document. The predefined keys try to use shared values as much as - possible so that moving such a document between systems still - works. - - Printing support was added in GTK+ 2.10. - - - - - Constructor - - - gtk.PrintSettings - - - gtk.PrintSettings - - - - - - Returns : - a new gtk.PrintSettings - object - - - - - This constructor is available in PyGTK 2.10 and above. - - - Creates a new gtk.PrintSettings - object. - - - - - - - Methods - - - gtk.PrintSettings.copy - - - copy - - - - - - Returns : - a newly allocated copy of the print - settings - - - - - This method is available in PyGTK 2.10 and above. - - - Returns a copy of this gtk.PrintSettings - object. - - - - - gtk.PrintSettings.has_key - - - has_key - key - - - - - key : - a key - - - Returns : - True, if - key has a value - - - - - This method is available in PyGTK 2.10 and above. - - - Returns True, if a value is associated with - key. - - - - - gtk.PrintSettings.get - - - get - key - - - - - key : - a key - - - Returns : - the string value for - key - - - - - This method is available in PyGTK 2.10 and above. - - - Looks up the string value associated with - key. - - - - - gtk.PrintSettings.set - - - set - key - value - - - - - key : - a key - - - value : - a string value, or - None - - - - - This method is available in PyGTK 2.10 and above. - - - Associates value with - key. - - - - - gtk.PrintSettings.unset - - - unset - key - - - - - key : - a key - - - - - This method is available in PyGTK 2.10 and above. - - - Removes any value associated with key. - This has the same effect as setting the value to - None. - - - - - gtk.PrintSettings.foreach - - - foreach - func - user_dataNone - - - - - func : - the function to call - - - user_data : - user data for - func - - - - - This method is available in PyGTK 2.10 and above. - - - Calls func for each key-value pair. - - The signature of func is: - - - def func(key, value, data): - - - where key and - value are the key-value pair and - data is - user_data. - - - - - gtk.PrintSettings.get_bool - - - get_bool - key - - - - - key : - a key - - - Returns : - True, if - key maps to a true - value. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the boolean represented by the value that is associated - with key. - - - - - gtk.PrintSettings.set_bool - - - set_bool - key - value - - - - - key : - a key - - - value : - a boolean - - - - - This method is available in PyGTK 2.10 and above. - - - Sets key to the boolean value specified - by value.. - - - - - gtk.PrintSettings.get_double - - - get_double - key - - - - - key : - a key - - - Returns : - the double value of - key - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the double value associated with - key, or 0. - - - - - gtk.PrintSettings.get_double_with_default - - - get_double_with_default - key - def - - - - - key : - a key - - - def : - the default value - - - Returns : - the floating point number associated with - key - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the floating point number represented by the value that - is associated with key, or - def if the value does not represent a floating - point number. - - - - - gtk.PrintSettings.set_double - - - set_double - key - value - - - - - key : - a key - - - value : - a double value - - - - - This method is available in PyGTK 2.10 and above. - - - Sets key to the given double - value. - - - - - gtk.PrintSettings.get_length - - - get_length - key - unit - - - - - key : - a key - - - unit : - the unit of the return value - - - Returns : - the length value of key, - converted to unit - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value associated with key, - interpreted as a length. The returned value is converted to the units - specified by unit. - - - - - gtk.PrintSettings.set_length - - - set_length - key - value - unit - - - - - key : - a key - - - value : - a length - - - unit : - the unit of - length - - - - - This method is available in PyGTK 2.10 and above. - - - Associates a length in units of unit with - key. - - - - - gtk.PrintSettings.get_int - - - get_int - key - - - - - key : - a key - - - Returns : - the integer value of - key - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the integer value of key, or - 0. - - - - - gtk.PrintSettings.get_int_with_default - - - get_int_with_default - key - def - - - - - key : - a key - - - def : - the default value - - - Returns : - the integer value of - key - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value of key, interpreted as - an integer, or the default value specified by - def. - - - - - gtk.PrintSettings.set_int - - - set_int - key - value - - - - - key : - a key - - - value : - an integer - - - - - This method is available in PyGTK 2.10 and above. - - - Sets key to the given integer - value. - - - - - gtk.PrintSettings.get_printer - - - get_printer - - - - - - Returns : - the printer name - - - - - This method is available in PyGTK 2.10 and above. - - - Convenience method to obtain the value of the "printer" - key. - - - - - gtk.PrintSettings.set_printer - - - set_printer - printer - - - - - printer : - the printer name - - - - - This method is available in PyGTK 2.10 and above. - - - Convenience function to set the "printer" key the value - specified by printer. - - - - - gtk.PrintSettings.get_orientation - - - get_orientation - - - - - - Returns : - the orientation - - - - - This method is available in PyGTK 2.10 and above. - - - Get the value of the "orientation" key, converted to one of the - . - - - - - gtk.PrintSettings.set_orientation - - - set_orientation - orientation - - - - - orientation : - a page orientation - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the value of the "orientation" key to one of the specified by - orientation. - - - - - gtk.PrintSettings.get_paper_size - - - get_paper_size - - - - - - Returns : - the paper size - - - - - This method is available in PyGTK 2.10 and above. - - - Gets the value of the "paper-format" key, converted to a gtk.PaperSize. - - - - - gtk.PrintSettings.set_paper_size - - - set_paper_size - paper_size - - - - - paper_size : - a paper size - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the value of the "paper-format", "paper-width" and - "paper-height" keys using the gtk.PaperSize - specified by paper_size. - - - - - gtk.PrintSettings.get_paper_width - - - get_paper_width - unit - - - - - unit : - the unit for the return value - - - Returns : - the paper width, in units of - unit - - - - - This method is available in PyGTK 2.10 and above. - - - Retuens the value of the "printer-width" key converted to the - units specified by unit. - - - - - gtk.PrintSettings.set_paper_width - - - set_paper_width - width - unit - - - - - width : - the paper width - - - unit : - the units of width - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the value of the "printer-width" key using the units - specified by unit. - - - - - gtk.PrintSettings.get_paper_height - - - get_paper_height - unit - - - - - unit : - the units for the return - value - - - Returns : - the paper height, in units of - unit - - - - - This method is available in PyGTK 2.10 and above. - - - Gets the value of the "paper-height" key converted to the units - specified by unit. - - - - - gtk.PrintSettings.set_paper_height - - - set_paper_height - height - unit - - - - - height : - the paper height - - - unit : - the units of - height - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the value of the "paper-height" key using the units - specified by unit. - - - - - gtk.PrintSettings.get_use_color - - - get_use_color - - - - - - Returns : - whether to use color - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value of the "use-color" key. If - True color will be used when printing. - - - - - gtk.PrintSettings.set_use_color - - - set_use_color - use_color - - - - - use_color : - if True use - color - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the value of the "use-color" key to the value specified by - use_color. If use_color - is True color will be used when printing. - - - - - gtk.PrintSettings.get_collate - - - get_collate - - - - - - Returns : - True if the printed pages - are to be collated - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value of the "collate" key. - - - - - gtk.PrintSettings.set_collate - - - set_collate - collate - - - - - collate : - if True, collate the - output - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the value of the "collate" key. If - collate is True the output - pages will be collated. - - - - - gtk.PrintSettings.get_reverse - - - get_reverse - - - - - - Returns : - True if the order of the - printed pages shoudl be reversed. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value of the "reverse" key. - - - - - gtk.PrintSettings.set_reverse - - - set_reverse - reverse - - - - - reverse : - if True reverse the - output - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the value of the "reverse" key. If - reverse is True the output - pages willl be reversed. - - - - - gtk.PrintSettings.get_duplex - - - get_duplex - - - - - - Returns : - the "duplex" key. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value of the "duplex" key - one of the . - - - - - gtk.PrintSettings.set_duplex - - - set_duplex - duplex - - - - - duplex : - one of the - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the value of the "duplex" - key. duplexp must be one of the - - - - - gtk.PrintSettings.get_quality - - - get_quality - - - - - - Returns : - the print quality - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value of the "quality" key. - - - - - gtk.PrintSettings.set_quality - - - set_quality - quality - - - - - quality : - one of the - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the value of the "quality" - key. quality must be one of the . - - - - - gtk.PrintSettings.get_n_copies - - - get_n_copies - - - - - - Returns : - the number of copies to print - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value of the "n-copies" key. - - - - - gtk.PrintSettings.set_n_copies - - - set_n_copies - num_copies - - - - - num_copies : - the number of copies - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the value of the "n-copies" key to the value specified by - num_copies. - - - - - gtk.PrintSettings.get_number_up - - - get_number_up - - - - - - Returns : - the number of pages per sheet - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value of the "number-up" key which specifies the - number of pages per sheet. - - - - - gtk.PrintSettings.set_number_up - - - set_number_up - number_up - - - - - number_up : - the number of pages per sheet - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the value of the "number-up" - key. number_up specifies the number of document - pages to be printed per sheet. - - - - - gtk.PrintSettings.get_resolution - - - get_resolution - - - - - - Returns : - the resolution in dpi - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value of the "resolution" key in dpi. - - - - - gtk.PrintSettings.set_resolution - - - set_resolution - resolution - - - - - resolution : - the resolution in dpi - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the value of the "resolution" key in dpi. - - - - - gtk.PrintSettings.get_scale - - - get_scale - - - - - - Returns : - the scale in percent - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value of the "scale" key as a float number. - - - - - gtk.PrintSettings.set_scale - - - set_scale - scale - - - - - scale : - the scale in percent - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the value of the "scale" key using the float number - specified by scale. - - - - - gtk.PrintSettings.get_print_pages - - - get_print_pages - - - - - - Returns : - which pages to print - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value of the "print-pages" key as one if the . - - - - - gtk.PrintSettings.set_print_pages - - - set_print_pages - pages - - - - - pages : - one if the - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the value of the "print-pages" key to one of the . - - - - - gtk.PrintSettings.get_page_ranges - - - get_page_ranges - - - - - - Returns : - a list of [age ranges as - 2-tuples - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value of the "page-ranges" key as a list of - 2-tuples containing the start and end page numbers of each - range. - - - - - gtk.PrintSettings.set_page_ranges - - - set_page_ranges - page_ranges - num_ranges - - - - - page_ranges : - a sequence of page range - 2-tuples - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the value of the "page-ranges" key to the value of - page_ranges which should be a sequence of - 2-tuples containing the start and end page numbers of each page - range. - - - - - gtk.PrintSettings.get_page_set - - - get_page_set - - - - - - Returns : - the set of pages to print - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value of the "page-set" key which is one of the - . - - - - - gtk.PrintSettings.set_page_set - - - set_page_set - page_set - - - - - page_set : - one of the - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the value of the "page-set" key to the value specified by - page_set which should be one of the . - - - - - gtk.PrintSettings.get_default_source - - - get_default_source - - - - - - Returns : - the default source - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value of the "default-source" key. - - - - - gtk.PrintSettings.set_default_source - - - set_default_source - default_source - - - - - default_source : - the default source - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the value of the "default-source" key to the string - specified by default_source. - - - - - gtk.PrintSettings.get_media_type - - - get_media_type - - - - - - Returns : - the media type - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value of the "media-type" key. - - The set of media types is defined in PWG 5101.1-2002 PWG. - - - - - gtk.PrintSettings.set_media_type - - - set_media_type - media_type - - - - - media_type : - the media type - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the value of the "media-type" key. - - The set of media types is defined in PWG 5101.1-2002 PWG. - - - - - gtk.PrintSettings.get_dither - - - get_dither - - - - - - Returns : - the dithering that is used - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value of the "dither" key. - - - - - gtk.PrintSettings.set_dither - - - set_dither - dither - - - - - dither : - the dithering that is used - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the value of the "dither" key to the string specified by - dither. - - - - - gtk.PrintSettings.get_finishings - - - get_finishings - - - - - - Returns : - the finishings - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value of the "finishings" key. - - - - - gtk.PrintSettings.set_finishings - - - set_finishings - finishings - - - - - finishings : - the finishings - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the value of the "finishings" key to the string specified - by finishings. - - - - - gtk.PrintSettings.get_output_bin - - - get_output_bin - - - - - - Returns : - the output bin - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value of the "output-bin" key. - - - - - gtk.PrintSettings.set_output_bin - - - set_output_bin - output_bin - - - - - output_bin : - the output bin - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the value of the "output-bin" key to the value specified by - output_bin. - - - - - - diff --git a/docs/reference/pygtk-gtkprintunixdialog.xml b/docs/reference/pygtk-gtkprintunixdialog.xml deleted file mode 100644 index 527b1f5e..00000000 --- a/docs/reference/pygtk-gtkprintunixdialog.xml +++ /dev/null @@ -1,467 +0,0 @@ - - - - - - - gtkunixprint.PrintUnixDialog - an dialog for selecting a printer in Unix (new in PyGTK - 2.10) - - - - Synopsis - - - gtkunixprint.PrintUnixDialog - gtk.Dialog - - gtkunixprint.PrintUnixDialog - titleNone - parentNone - - - set_page_setup - page_setup - - - get_page_setup - - - - set_current_page - current_page - - - get_current_page - - - - set_settings - settingsNone - - - get_settings - - - - get_selected_printer - - - - add_custom_tab - child - tab_label - - - set_manual_capabilities - capabilities - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Window - +-- gtk.Dialog - +-- gtkunixprint.PrintUnixDialog - - - - - - gtkunixprint.PrintUnixDialog Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Window Properties - gtk.Dialog Properties - -
- - - - - - - - - "current-page" - Read-Write - The current page in the document. Allowed values: >= - -1. Default value: -1. Available in GTK+ 2.10. - - - - "page-setup" - Read-Write - The gtk.PageSetup - to use. Available in GTK+ 2.10. - - - - "print-settings" - Read-Write - The gtk.PrintSettings - used for initializing the dialog. Available in GTK+ - 2.10. - - - - "selected-printer" - Read-Write - The gtkunixprint.Printer - that is selected. Available in GTK+ 2.10. - - - - - -
- -
- - - gtkunixprint.PrintUnixDialog Style Properties - - gtk.Widget Style Properties - gtk.Dialog Style Properties - - - - - gtkunixprint.PrintUnixDialog Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Window Signal Prototypes - gtk.Dialog Signal Prototypes - - - - Description - - - - - - - Constructor - - - gtkunixprint.PrintUnixDialog - - - gtkunixprint.PrintUnixDialog - titleNone - parentNone - - - - - title : - The title of the dialog, or - None - - - parent : - The transient parent of the dialog, or - None - - - Returns : - a new gtkunixprint.PrintUnixDialog - - - - - This constructor is available in PyGTK 2.10 and above. - - - Creates a new gtkunixprint.PrintUnixDialog. - - - - - - - Methods - - - gtkunixprint.PrintUnixDialog.set_page_setup - - - set_page_setup - page_setup - - - - - page_setup : - a gtk.PageSetup - - - - - This method is available in PyGTK 2.10 and above. - - - The set_page_setup() method sets the - "page-setup" property to the gtk.PageSetup - specified by page_setup. - - - - - gtkunixprint.PrintUnixDialog.get_page_setup - - - get_page_setup - - - - - - Returns : - the page setup of the - dialog. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_page_setup() method returns the - gtk.PageSetup - that is used by the gtkunixprint.PrintUnixDialog. - - - - - gtkunixprint.PrintUnixDialog.set_current_page - - - set_current_page - current_page - - - - - current_page : - the current page number. - - - - - This method is available in PyGTK 2.10 and above. - - - The set_current_page() method sets the - "current-page" property ot the value specified by - current_page. If - current_page is not -1 (the default value), the - current page choice for the range of pages to print is enabled. - - - - - gtkunixprint.PrintUnixDialog.get_current_page - - - get_current_page - - - - - - Returns : - the current page of the dialog - - - - - This method is available in PyGTK 2.10 and above. - - - The get_current_page() method returns - the current page of the gtkunixprint.PrintUnixDialog. - - - - - gtkunixprint.PrintUnixDialog.set_settings - - - set_settings - settingsNone - - - - - settings : - a gtk.PrintSettings, - or None - - - - - This method is available in PyGTK 2.10 and above. - - - The set_settings() method sets the - gtk.PrintSettings - for the gtkunixprint.PrintUnixDialog. Typically, - this is used to restore saved print settings from a previous print - operation before the print dialog is shown. - - - - - gtkunixprint.PrintUnixDialog.get_settings - - - get_settings - - - - - - Returns : - a new gtk.PrintSettings - object with the values from the dialog - - - - - This method is available in PyGTK 2.10 and above. - - - The get_settings() method returns a new - gtk.PrintSettings - object that represents the current values in the print dialog. - - - - - gtkunixprint.PrintUnixDialog.get_selected_printer - - - get_selected_printer - - - - - - Returns : - the currently selected - printer - - - - - This method is available in PyGTK 2.10 and above. - - - The get_selected_printer() method - returns the currently selected gtkunixprint.Printer. - - - - - gtkunixprint.PrintUnixDialog.add_custom_tab - - - add_custom_tab - child - tab_label - - - - - child : - a gtk.Widget - - - tab_label : - a gtk.Widget - - - - - This method is available in PyGTK 2.10 and above. - - - The add_custom_tab() method adds a tab - to the dialog using the gtk.Widget - specified by child for the contents and - tab_label for the label. - - - - - gtkunixprint.PrintUnixDialog.set_manual_capabilities - - - set_manual_capabilities - capabilities - - - - - capabilities : - one of the - - - - - This method is available in PyGTK 2.10 and above. - - - The set_manual_capabilities() method - lets you specify the printing capabilities your application supports - using the specified by - capabilities. For example, if the application - can handle scaling the output then it should pass - gtkunixprint.PRINT_CAPABILITY_SCALE. If it doesn't - pass that, the dialog will only let you select the scale if the - printing system automatically handles scaling. - - - - - -
diff --git a/docs/reference/pygtk-gtkprogressbar.xml b/docs/reference/pygtk-gtkprogressbar.xml deleted file mode 100644 index f5d23849..00000000 --- a/docs/reference/pygtk-gtkprogressbar.xml +++ /dev/null @@ -1,505 +0,0 @@ - - - - - - gtk.ProgressBar - a widget which indicates progress visually. - - - - Synopsis - - - gtk.ProgressBar - gtk.Progress - - gtk.ProgressBar - - - - pulse - - - set_text - text - - - set_fraction - fraction - - - set_pulse_step - fraction - - - set_orientation - orientation - - - get_text - - - - get_fraction - - - - get_pulse_step - - - - get_orientation - - - - set_ellipsize - mode - - - get_ellipsize - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Progress - +-- gtk.ProgressBar - - - - - - gtk.ProgressBar Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Progress Properties - -
- - - - - - - - - "discrete-blocks" - Read-Write - The number of discrete blocks in a progress bar (when shown - in the discrete style) - - - - "ellipsize" - Read-Write - The preferred place to ellipsize the string, if the - progressbar does not have enough room to display the entire - string, specified as one of the . Note that - setting this property to a value other than - pango.ELLIPSIZE_NONE has the side-effect that - the progressbar requests only enough space to display the ellipsis - "...". Another means to set a progressbar's width is the gtk.Widget.set_size_request(). - This property is available in GTK+ 2.6 and above. - - - - "fraction" - Read-Write - The fraction of total work that has been completed - - - - "orientation" - Read-Write - The orientation and growth direction of the progress -bar - one of the : -gtk.PROGRESS_LEFT_TO_RIGHT, -gtk.PROGRESS_RIGHT_TO_LEFT, -gtk.PROGRESS_BOTTOM_TO_TOP, -gtk.PROGRESS_TOP_TO_BOTTOM - - - - "pulse-step" - Read-Write - The fraction of total progress to move the bouncing -block when pulsed - - - - "text" - Read-Write - The text to be displayed in the progress bar - - - - - -
- -
- - - gtk.ProgressBar Style Properties - - gtk.Widget Style Properties - - - - - gtk.ProgressBar Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - - - - Description - - The gtk.ProgressBar -is typically used to display the progress of a long running operation. It -provides a visual clue that processing is underway. The gtk.ProgressBar -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 gtk.ProgressBar -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 the set_fraction() -method 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 gtk.ProgressBar -in activity mode, which shows activity by a block moving back and forth -within the progress area. In this mode, the application is required to call -the pulse() -method periodically to update the progress bar. - - There is quite a bit of flexibility provided to control the -appearance of the gtk.ProgressBar. -Methods are provided to control the orientation of the bar, optional text -can be displayed along with the bar, and the step size used in activity mode -can be set. - - - - - Constructor - - - gtk.ProgressBar - - - - - Returns : - a new gtk.ProgressBar -widget - - - - Creates a new gtk.Progressbar -widget. - - - - - Methods - - - gtk.ProgressBar.pulse - - - pulse - - - The pulse() method nudges the -progressbar to indicate that some progress has been made, but you don't know -how much. This method also changes progress bar mode to "activity mode," -where a block bounces back and forth. Each call to the pulse() -method causes the block to move by a little bit (the amount of movement per -pulse is determined by the set_pulse_step() -method). - - - - - gtk.ProgressBar.set_text - - - set_text - text - - - - text : - a UTF-8 string - - - - The set_text() method superimposes the -text specified by text on the progress bar. - - - - - gtk.ProgressBar.set_fraction - - - set_fraction - fraction - - - - fraction : - the fraction of the task that's been -completed - - - - The set_fraction() method causes the -progress bar to "fill in" the portion of the bar specified by -fraction. The value of -fraction should be between 0.0 and 1.0. - - - - - gtk.ProgressBar.set_pulse_step - - - set_pulse_step - fraction - - - - fraction : - a value between 0.0 and -1.0 - - - - The set_pulse_step() method sets the -portion (specified by fraction) of the total progress -bar length to move the bouncing block for each call to the pulse() -method. - - - - - gtk.ProgressBar.set_orientation - - - set_orientation - orientation - - - - orientation : - the orientation of the progress -bar - - - - The set_orientation() method switches -the progress bar to a different orientation as specified by the value of -orientation. The value of -orientation must be one of the . - - - - - gtk.ProgressBar.get_text - - - get_text - - - - Returns : - the text, or -None - - - - The get_text() method returns the text -superimposed on the progress bar. If there is no superimposed text this -method returns None. - - - - - gtk.ProgressBar.get_fraction - - - get_fraction - - - - Returns : - a fraction from 0.0 to 1.0 - - - - The get_fraction() method returns the -current fraction of the task that's been set by the set_fraction() -method . - - - - - gtk.ProgressBar.get_pulse_step - - - get_pulse_step - - - - Returns : - a fraction from 0.0 to 1.0 - - - - The get_pulse_step() method returns the -pulse step set with the set_pulse_step(). - - - - - gtk.ProgressBar.get_orientation - - - get_orientation - - - - Returns : - the orientation of the progress -bar - - - - The get_orientation() method returns -the current progress bar orientation. See the set_orientation() -method for information about the orientation values. - - - - - gtk.ProgressBar.set_ellipsize - - - set_ellipsize - mode - - - - mode : - one of the - - - - - This method is available in PyGTK 2.6 and above. - - - The set_ellipsize() method sets the -mode used to ellipsize (add an ellipsis "...") the text if there is not -enough space to render the entire string to the value specified by -mode. mode must be one of the - - - - - - gtk.ProgressBar.get_ellipsize - - - get_ellipsize - - - - - Returns : - the mode used to ellipsize -text - - - - - This method is available in PyGTK 2.6 and above. - - - The get_ellipsize() method returns the -mode used to ellipsize text when there is not enough space. See the set_ellipsize() -method for information. - - - - - -
diff --git a/docs/reference/pygtk-gtkradioaction.xml b/docs/reference/pygtk-gtkradioaction.xml deleted file mode 100644 index 7f7209f5..00000000 --- a/docs/reference/pygtk-gtkradioaction.xml +++ /dev/null @@ -1,341 +0,0 @@ - - - - - gtk.RadioAction - - an action that can be grouped so that only one can be - active (new in PyGTK 2.4) - - - - Synopsis - - - gtk.RadioAction - gtk.ToggleAction - - gtk.RadioAction - name - label - tooltip - stock_id - value - - - set_group - group - - - get_group - - - - get_current_value - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Action - +-- gtk.ToggleAction - +-- gtk.RadioAction - - - - - - gtk.RadioAction Properties - - gtk.Action Properties - gtk.ToggleAction Properties - -
- - - - - - - - - "current-value" - Read-Write - The value property of the currently active member of the - group to which this action belongs. This property is available in - GTK+ 2.10 and above. - - - - "group" - Write - Sets a new group for a radio action. This property is - available in GTK+ 2.4 and above - - - - "value" - Read-Write - - The value is an arbitrary integer which can be used as - a convenient way to determine which action in the group is - currently active in an "activate" or "changed" signal - handler. See the get_current_value() - and the gtk.ActionGroup.add_radio_actions() - methods for convenient ways to get and set this property. This - property is available in GTK+ 2.4 and above - - - - - -
- -
- - - gtk.RadioAction Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Action Signal Prototypes - gtk.ToggleAction Signal Prototypes - - - - "changed" - - callback - radioaction - current - user_param1 - ... - - - - - - - - - Description - - - This object is available in PyGTK 2.4 and above. - - - A gtk.RadioAction -is a subclass of gtk.ToggleAction -and similar to gtk.RadioMenuItem. -A number of radio actions can be linked together so that only one may be -active at any one time. - - - - - Constructor - - - gtk.RadioAction - name - label - tooltip - stock_id - value - - - - name : - A unique name for the action - - - label : - The label displayed in menu items and on - buttons - - - tooltip : - A tooltip for this action - - - stock_id : - The stock icon to display in widgets representing - this action - - - value : - A unique integer value that get_current_value() - should return if this action is selected. - - - Returns : - a new gtk.RadioAction - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new gtk.RadioAction -object suing the properties specified by: name, -label, tooltip, -stock_id and value. To add the -action to a gtk.ActionGroup -and set the accelerator for the action, call the gtk.ActionGroup.add_action_with_accel(). - - - - - Methods - - - gtk.RadioAction.set_group - - - set_group - group - - - - group : - another gtk.RadioAction or None - - - - - This method is available in PyGTK 2.4 and above. - - - The set_group() method sets the radio -group for the radio action to the same group as the gtk.RadioAction -specified by group i.e. the radio action joins the -group. - - In PyGTK 2.6.2 and above, if group is -None the radio action is removed from its current -group. - - - - - gtk.RadioAction.get_group - - - get_group - - - - Returns : - a list containing the radio actions in the - group or None - - - - - This method is available in PyGTK 2.4 and above. - - - The get_group() method returns a list -containing the group that the radio action belongs to or -None if the radio action is not part of a group. - - - - - gtk.RadioAction.get_current_value - - - get_current_value - - - - - Returns : - The value of the currently active group - member - - - - - This method is available in PyGTK 2.4 and above. - - - The get_current_value() method returns -the "value" property of the the currently active member of the group that -the radio action belongs to. - - - - - - - Signals - - - The "changed" gtk.RadioAction Signal - - - callback - radioaction - current - user_param1 - ... - - - - - radioaction : - the radioaction that received the -signal - - - current : - the currently active gtk.RadioAction - in the group - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.4 and above. - - - The "changed" signal is emitted on every member of a radio group -when the active member is changed. The signal gets emitted after the -"activate" signals for the previous and current active members. - - - - - -
diff --git a/docs/reference/pygtk-gtkradiobutton.xml b/docs/reference/pygtk-gtkradiobutton.xml deleted file mode 100644 index 11e7fb83..00000000 --- a/docs/reference/pygtk-gtkradiobutton.xml +++ /dev/null @@ -1,323 +0,0 @@ - - - - - - gtk.RadioButton - a choice of one of multiple check buttons. - - - - Synopsis - - - gtk.RadioButton - gtk.CheckButton - - gtk.RadioButton - group - None - label - None - use_underline - True - - - get_group - - - set_group - group - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Button - +-- gtk.ToggleButton - +-- gtk.CheckButton - +-- gtk.RadioButton - - - - - - gtk.RadioButton Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Button Properties - gtk.ToggleButton Properties - -
- - - - - - - - - "group" - Write - The group that the radiobutton is in. - - - - - -
- -
- - - gtk.RadioButton Style Properties - - gtk.Widget Style Properties - gtk.Button Style Properties - gtk.CheckButton Style Properties - - - - - gtk.RadioButton Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Button Signal Prototypes - gtk.ToggleButton Signal Prototypes - - - - "group-changed" - - callback - radiobutton - user_param1 - ... - - - - - - - - - Description - - A single gtk.RadioButton -performs the same basic function as a gtk.CheckButton, -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 gtk.RadioButton -is used to give the user a choice of one of many options. - - Radio button widgets are created with gtk.RadioButton() passing -None as the group (first) argument -if this is the first radio button in a group. In subsequent calls, pass a -reference to a gtk.RadioButton -as the first argument to specify the group. The second (optional) argument -to gtk.RadioButton() is a -label that is used to specify the text of the button. The label text is -parsed for mnemonic characters (preceded by an underscore) to specify an -accelerator for the radiobutton. See gtk.AccelGroup -and gtk.AccelLabel -for more information on mnemonic accelerators. - - To retrieve the group a gtk.RadioButton -is assigned to, use the get_group() -method. To remove a gtk.RadioButton -from one group and make it part of a new one, use the set_group() -method. - - - - - Constructor - - - gtk.RadioButton - group - None - label - None - use_underline - True - - - - group : - an existing gtk.RadioButton -or None - - - label : - a string to use as the button text or -None - - - use_underline : - if True, an underscore in the -label text indicates the next character should be underlined and used for the -mnemonic accelerator key if it is the first character so -marked. Available in PyGTK 2.4 and above. - - - Returns : - a new gtk.RadioButton -widget - - - - Creates a new gtk.RadioButton -widget with the label text specified by label, adding -it to the same group as group. -label is parsed for underscore characters that -indicate mnemonic accelerators. If label is -None, no label is created. If -group is None, the new radiobutton -becomes the first member of a new radiobutton group. - - In PyGTK 2.4 and above the use_underline -parameter is available and defaults to True. If -use_underline is set to False the -label text will not be parsed for mnemonic characters. - - - - - Methods - - - gtk.RadioButton.get_group - - - get_group - - - - Returns : - the list of radiobuttons in the same group that -contains the radiobutton or None - - - - The get_group() method returns the list -of radiobuttons that are in the same group as the radiobutton or -None if the radiobutton is not in a group. - - - - - gtk.RadioButton.set_group - - - set_group - group - - - - group : - a gtk.RadioButton - whose group the radiobutton will be added to or -None - - - - The set_group() method adds the -radiobutton to the group of the radiobutton specified by -group. - - In PyGTK 2.6.2 and above, if group is -None the radiobutton is removed from its current -group. - - - - - - - Signals - - - The "group-changed" gtk.RadioButton Signal - - - callback - radiobutton - user_param1 - ... - - - - - radiobutton : - the radiobutton that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.4 and above. - - - The "group-changed" signal is emitted when a gtk.RadioButton -is added to or removed from the group. - - - - - -
diff --git a/docs/reference/pygtk-gtkradiomenuitem.xml b/docs/reference/pygtk-gtkradiomenuitem.xml deleted file mode 100644 index 90a7ed3c..00000000 --- a/docs/reference/pygtk-gtkradiomenuitem.xml +++ /dev/null @@ -1,294 +0,0 @@ - - - - - - gtk.RadioMenuItem - a choice from multiple check menu items. - - - - Synopsis - - - gtk.RadioMenuItem - gtk.CheckMenuItem - - gtk.RadioMenuItem - group - None - label - None - use_underline - True - - - get_group - - - set_group - group - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Item - +-- gtk.MenuItem - +-- gtk.CheckMenuItem - +-- gtk.RadioMenuItem - - - - - - gtk.RadioMenuItem Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.CheckMenuItem Properties - -
- - - - - - - - - "group" - Write - The radio menu item whose group this widget belongs to. - This property is available in GTK+ 2.8 and above. - - - - - -
- -
- - - gtk.RadioMenuItem Style Properties - - gtk.Widget Style Properties - gtk.MenuItem Style Properties - gtk.CheckMenuItem Style Properties - - - - - gtk.RadioMenuItem Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Item Signal Prototypes - gtk.MenuItem Signal Prototypes - gtk.CheckMenuItem Signal Prototypes - - - - "group-changed" - - callback - radiomenuitem - user_param1 - ... - - - - - - - - - Description - - A gtk.RadioMenuItem -widget is a check menu item that belongs to a group. Only one of the radio -menu items in a group can be selected. - - - - - Constructor - - - gtk.RadioMenuItem - group - None - label - None - use_underline - True - - - - group : - a gtk.RadioMenuItem -whose group the new radiomenuitem should be added to, or -None if a new group should be -created - - - label : - a string to be used as the label text or -None if no label is needed - - - use_underline : - if True, an underscore in the -label text indicates the next character should be underlined and used for the -mnemonic accelerator key if it is the first character so -marked. Available in PyGTK 2.4 and above. - - - Returns : - a new gtk.RadioMenuItem -widget - - - - Creates a new gtk.RadioMenuItem -containing a label with its text specified by label. -label will be parsed for underscores that indicate -the mnemonic accelerator for the radiomenuitem. The radiomenuitem will be -added to the group containing the gtk.RadioMenuItem -specified by group. If group -is None, a new group will be created to hold the new -radiomenuitem. If label is None -the radiomenuitem is created without a label. - - In PyGTK 2.4 and above the use_underline -parameter is available and defaults to True. If -use_underline is set to False the -label text will not be parsed for mnemonic characters. - - - - - Methods - - - gtk.RadioMenuItem.get_group - - - get_group - - - - Returns : - the list of radiomenuitems in the same group -that contains the radiomenuitem or - None - - - - The get_group() method returns the list -of gtk.RadioMenuItems -that are in the same group as the radiomenuitem or None -if the radiomenuitem is not in a group. - - - - - gtk.RadioMenuItem.set_group - - - set_group - group - - - - group : - a gtk.RadioMenuItem -whose group the radiomenuitem will be added to or -None. - - - - The set_group() method adds the -radiomenuitem to the group of the gtk.RadioMenuItem -specified by group. - - In PyGTK 2.6.2 and above, if group is -None the radiomenuitem will be removed from its current -group. - - - - - - - Signals - - - The "group-changed" gtk.RadioMenuItem Signal - - - callback - radiomenuitem - user_param1 - ... - - - - - radiomenuitem : - the radiomenuitem that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.4 and above. - - - The "group-changed" signal is emitted when a gtk.RadioMenuItem -is added to or removed from the group. - - - - - -
diff --git a/docs/reference/pygtk-gtkradiotoolbutton.xml b/docs/reference/pygtk-gtkradiotoolbutton.xml deleted file mode 100644 index 7bac5e60..00000000 --- a/docs/reference/pygtk-gtkradiotoolbutton.xml +++ /dev/null @@ -1,224 +0,0 @@ - - - - - gtk.RadioToolButton a toolbar item that - contains a radio button (new in PyGTK 2.4) - - - - Synopsis - - - gtk.RadioToolButton - gtk.ToggleToolButton - - gtk.RadioToolButton - groupNone - stock_idNone - - - set_group - group - - - get_group - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.ToolItem - +-- gtk.ToolButton - +-- gtk.ToggleToolButton - +-- gtk.RadioToolButton - - - - - - gtk.RadioToolButton Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.ToolItem Properties - gtk.ToolButton Properties - gtk.ToggleToolButton Properties - -
- - - - - - - - - "group" - Write - Sets a new group for a radio tool button. This property - is available in GTK+ 2.4 and above. - - - - - -
- -
- - - gtk.RadioToolButton Style Properties - - gtk.Widget Style Properties - gtk.ToolButton Style Properties - - - - - gtk.RadioToolButton Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.ToolItem Signal Prototypes - gtk.ToolButton Signal Prototypes - gtk.ToggleToolButton Signal Prototypes - - - - Description - - - This widget is available in PyGTK 2.4 and above. - - - A gtk.RadioToolButton -is a gtk.ToolItem that -contains a radio button, that is, a button that is part of a group of toggle -buttons where only one button can be active at a time. Use the gtk.RadioToolButton() -constructor to create a new gtk.RadioToolButton. - - - - - Constructor - - - gtk.RadioToolButton - groupNone - stock_idNone - - - - group : - an existing gtk.RadioToolButton - - - stock_id : - the name of a stock item - - - Returns : - a new gtk.RadioToolButton - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new gtk.RadioToolButton, -adding it to the same group as the gtk.RadioToolButton -specified by group if it is not -None. The new gtk.RadioToolButton -will contain an icon and label from the stock item specified by -stock_id if it is not None. - - - - - Methods - - - gtk.RadioToolButton.set_group - - - set_group - group - - - - group : - an existing gtk.RadioToolButton or None. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_group() method adds the radio -tool button to the same group as the gtk.RadioToolButton -specified by group. - - In PyGTK 2.6.2 and above, if group is -None the radiotoolbutton will be removed from its current -group. - - - - - gtk.RadioToolButton.get_group - - - get_group - - - - - Returns : - a list containing the gtk.RadioToolButtons - in the group or None - - - - - This method is available in PyGTK 2.4 and above. - - - The get_group() method returns a list -containing the gtk.RadioButton -objects that are in the same group as the radio tool button or -None if the radiotoolbutton is not in a group. - - - - - -
diff --git a/docs/reference/pygtk-gtkrange.xml b/docs/reference/pygtk-gtkrange.xml deleted file mode 100644 index e2ce9918..00000000 --- a/docs/reference/pygtk-gtkrange.xml +++ /dev/null @@ -1,790 +0,0 @@ - - - - - - gtk.Range - a base class for widgets that allow a user to set a value in -a range. - - - - Synopsis - - - gtk.Range - gtk.Widget - - set_update_policy - policy - - - get_update_policy - - - set_adjustment - adjustment - - - get_adjustment - - - set_inverted - setting - - - get_inverted - - - set_increments - step - page - - - set_range - min - max - - - set_value - value - - - get_value - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Range - - - - - - gtk.Range Properties - - gtk.Object Properties - gtk.Widget Properties - -
- - - - - - - - - "adjustment" - Read-Write - The gtk.Adjustment - that contains the current value of this range object - - - - "inverted" - Read-Write - If True, the slider movement is - reversed e.g right-to-left instead of left-to-right - - - - "lower-stepper-sensitivity" - Read-Write - The sensitivity policy for the stepper that points to the - adjustment's lower side - - - - "update-policy" - Read-Write - How the range should be updated on the screen: - gtk.UPDATE_CONTINUOUS, - gtk.UPDATE_DISCONTINUOUS, - gtk.UPDATE_DELAYED. - - - - - -
- -
- - - gtk.Range Style Properties - - gtk.Widget Style Properties - -
- - - - - - - - - "activate-slider" - Read - With this option set to True, - sliders will be drawn ACTIVE and with - shadow IN while they are dragged - - - - "arrow-displacement-x" - Read - The distance horizontally to move the arrow when the - button is depressed - - - - "arrow-displacement-y" - Read - The distance vertically to move the arrow when the - button is depressed - - - - "slider-width" - Read - The width of scrollbar or scale thumb - - - - "stepper-size" - Read - The length of step buttons at ends - - - - "stepper-spacing" - Read - The spacing between step buttons and thumb - - - - "trough-border" - Read - The spacing between thumb or steppers and outer trough - bevel - - - - "trough-side-details" - Read - This property is available in GTK+ 2.10 and above. - - - - "trough-under-steppers" - Read - if True draw the trough across the - full length of the range or to exclude the steppers and their - spacing. Note that setting the "stepper-spacing" style - property to any value > 0 will automatically enable - "trough-under-steppers" too. This property is available in - GTK+ 2.10 and above. - - - - - -
- -
- - - gtk.Range Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - - - - "adjust-bounds" - - callback - range - value - user_param1 - ... - - - - - "change-value - - callback - range - scroll - value - arg1 - arg2 - user_param1 - ... - - - - - "move-slider" - - callback - range - scrolltype - user_param1 - ... - - - - - "value-changed" - - callback - range - user_param1 - ... - - - - - - - - - Description - - The gtk.Range is the base -class for the gtk.Scale and gtk.Scrollbar -widgets. The gtk.Range provides -the common functionality for these widgets that allow a user to set a value -in a range of values. The gtk.Scale works in -conjunction with a gtk.Adjustment -which provides the range information. - - - - - Methods - - - gtk.Range.set_update_policy - - - set_update_policy - policy - - - - policy : - the update policy: -gtk.UPDATE_CONTINUOUS, -gtk.UPDATE_DISCONTINUOUS, -gtk.UPDATE_DELAYED - - - - The set_update_policy() method sets the -"update-policy" property to the value specified by -policy. The update policy has the following values -and effects: - - - - - gtk.UPDATE_CONTINUOUS - - anytime the range slider is moved, the range value will -change and the "value_changed" signal will be emitted. - - - - gtk.UPDATE_DELAYED - - the value will be updated after a brief timeout where -no slider motion occurs, so value changes are delayed slightly rather than -continuously updated. - - - - gtk.UPDATE_DISCONTINUOUS - - the value will only be updated when the user releases -the button and ends the slider drag operation. - - - - - - - - - - gtk.Range.get_update_policy - - - get_update_policy - - - - Returns : - the current update policy - - - - The get_update_policy() method gets the -value of the "update-policy" property. The update policy is one of: -gtk.UPDATE_CONTINUOUS, -gtk.UPDATE_DISCONTINUOUS or -gtk.UPDATE_DELAYED. See the set_update_policy() -method for details. - - - - - gtk.Range.set_adjustment - - - set_adjustment - adjustment - - - - adjustment : - a gtk.Adjustment - - - - The set_adjustment() method sets the -"adjustment" property to the value specified by -adjustment. The gtk.Adjustment -is used as the "model" object for this range widget. -adjustment indicates the current range value, the -minimum and maximum range values, the step and page increments used for -keybindings and scrolling, and the page size. The page size is normally 0 -for gtk.Scale -and nonzero for gtk.Scrollbar, -and indicates the size of the visible area of the widget being scrolled. The -page size affects the size of the scrollbar slider. - - - - - gtk.Range.get_adjustment - - - get_adjustment - - - - Returns : - a gtk.Adjustment - - - - The get_adjustment() method returns the -value of the "adjustment" property. See the set_adjustment() -method for details. - - - - - gtk.Range.set_inverted - - - set_inverted - setting - - - - setting : - if True invert the -range - - - - The set_inverted() method sets the -"inverted" property to the value specified by -setting. If setting is -True the normal motion of the range widget is reversed. -Ranges normally move from lower to higher values as the slider moves from -top to bottom or left to right. Inverted ranges have higher values at the -top or left rather than on the bottom or right. - - - - - gtk.Range.get_inverted - - - get_inverted - - - - Returns : - True if the range is -inverted - - - - The get_inverted() method returns the -value of the "inverted" property that was set by the set_inverted() -method. - - - - - gtk.Range.set_increments - - - set_increments - step - page - - - - step : - the step size - - - page : - the page size - - - - The set_increments() method sets the -step and page sizes for the range to the values specified by -step and page respectively. -The step size is used when the user clicks the gtk.Scrollbar -arrows or moves gtk.Scale via the -arrow keys. The page size is used for example when moving via Page -Up or Page Down keys. - - - - - gtk.Range.set_range - - - set_range - min - max - - - - min : - the minimum range value - - - max : - the maximum range value - - - - The set_range() method sets the minimum -and maximum allowable values for the gtk.Range to that -values specified by min and -max respectively. If the range has a non-zero page -size, it is also forced to be between min and -max. - - - - - gtk.Range.set_value - - - set_value - value - - - - value : - the new value of the range - - - - - The set_value() method sets the current -value of the range to the value specified by value. -value will be forced inside the minimum or maximum -range values. The range emits the "value_changed" signal if the value -changes. - - - - - gtk.Range.get_value - - - get_value - - - - Returns : - the current value of the -range. - - - - The get_value() method gets the current -value of the range. - - - - - - - Signals - - - The "adjust-bounds" gtk.Range Signal - - - callback - range - value - user_param1 - ... - - - - - range : - the range that received the -signal - - - value : - the value - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "adjust-bounds" signal is emitted when the range is adjusted -by user action. Note the value can be more or less than the range since it -depends on the mouse position. - - - - - The "change-value" gtk.Range Signal - - callback - range - scroll - value - user_param1 - ... - - - - - range : - the range that received the signal. the object - which received the signal. - - - scroll : - the type of scroll action that was performed - - one of the .. - - - value : - the new value resulting from the scroll - action. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - Returns : - True to prevent other - handlers from being invoked for the signal or - False to propagate the signal - further. - - - - - This signal is available in GTK+ 2.6 and above. - - - The "change-value" signal is emitted when a scroll action is - performed on a range. It allows an application to determine the type - of scroll event that occurred and the resultant new value. The - application can handle the event itself and return - True to prevent further processing. Or, by - returning False, it can pass the event to other - handlers until the default GTK+ handler is reached. - - The value parameter is unrounded. An application that overrides - the "change-value" signal is responsible for clamping the value to the - desired number of decimal digits. - - It is not possible to use delayed update policies in an - overridden "change-value" handler. - - - - - The "move-slider" gtk.Range Signal - - - callback - range - scrolltype - user_param1 - ... - - - - - range : - the range that received the -signal - - - scrolltype : - the scroll type issued because a key was - pressed by the user; one of the . - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "move-slider" signal is emitted when the user presses a key -(e.g. Page Up, Home, Right -Arrow) to move the slider. - - - - - The "value-changed" gtk.Range Signal - - - callback - range - user_param1 - ... - - - - - range : - the range that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "value-changed" signal is emitted when the range value is -changed either programmatically or by user action. - - - - - -
diff --git a/docs/reference/pygtk-gtkrcstyle.xml b/docs/reference/pygtk-gtkrcstyle.xml deleted file mode 100644 index 2222f2dd..00000000 --- a/docs/reference/pygtk-gtkrcstyle.xml +++ /dev/null @@ -1,979 +0,0 @@ - - - - - - gtk.RcStyle - an object holding resource styles - - - - Synopsis - - - gtk.RcStyle - gobject.GObject - - copy - - - - - -Functions - - - gtk.rc_add_default_file - filename - - gtk.rc_set_default_files - filenames - - gtk.rc_get_default_files - - - gtk.rc_get_style_by_paths - settings - widget_path - class_path - type - - gtk.rc_reparse_all_for_settings - settings - force_load - - gtk.rc_reset_styles - settings - - gtk.rc_parse - filename - - gtk.rc_parse_string - rc_string - - gtk.rc_reparse_all - - - gtk.rc_find_module_in_path - module_file - - gtk.rc_get_theme_dir - - - gtk.rc_get_module_dir - - - gtk.rc_get_im_module_path - - - gtk.rc_get_im_module_file - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.RcStyle - - - - - - gtk.RcStyle Signal Prototypes - - gobject.GObject Signal Prototypes - - - - Description - - PyGTK via GTK+ provides -resource file mechanism for configuring various aspects of the operation of -a program at runtime. - - Default files - - An application can cause GTK+ to parse a -specific RC file by calling the gtk.rc_parse() -function. In addition to this, certain files will be read at the end of -GTK+ initialization. Unless modified, the files looked -for will be <SYSCONFDIR>/gtk-2.0/gtkrc and -.gtkrc-2.0 in the users home directory. (<SYSCONFDIR> defaults to -/usr/local/etc.) The set of these default files can be -retrieved with the gtk.rc_get_default_files() -function and modified with the gtk.rc_add_default_file() -and gtk.rc_set_default_files() -functions. Additionally, the GTK_RC_FILES environment -variable can be set to a list of files in order to overwrite the set of -default files at runtime. - - For each RC file, in addition to the file itself, -GTK+ will look for a locale-specific file that will be -parsed after 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 and ~/.gtkrc.ja, -and parses the first of those that exists. - -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 hierarchy. 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 the set_name() -method 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 gtk.Entry 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 hierarchy (not the layout -hierarchy) in sequence, so the pattern: - - - class "GtkButton" style "my-style" - - - will match not just gtk.Button widgets, -but also gtk.ToggleButton -and gtk.CheckButton -widgets, since those classes derive from gtk.Button. - - 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 { ... } - - Declares a binding set. - - - - class pattern [ style | binding [ : priority ]] name - - Specifies a style or binding set for a particular branch -of the inheritance hierarchy. - - - - include filename - - Parses another file at this point. If -filename is not an absolute filename, it is searched -in the directories of the currently open RC files. GTK+ -also tries to load a locale-specific variant of the included file. - - - - 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 ] { ... } - - Declares a style. - - - - widget pattern [ style | binding [ : priority ]] name - - Specifies a style or binding set for a particular group -of widgets by matching on the widget pathname. - - - - widget_class pattern [ style | binding [ : priority ]] name - - Specifies 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 class declarations. Within each -type of declaration, later declarations override earlier ones. Within a -style declaration, the possible elements are: - - - - bg[state] = color - - Sets the color used for the background of most -widgets. - - - - fg[state] = color - - Sets the color used for the foreground of most -widgets. - - - - base[state] = color - - Sets the color used for the background of widgets -displaying editable text. This color is used for the background of, among -others, gtk.TextView and -gtk.Entry. - - - - text[state] = color - - Sets the color used for foreground of widgets using -base for the background color. - - - - bg_pixmap[state] = pixmap - - Sets a background pixmap to be used in place of the -bg color (or for gtk.TextView, in -place of the base color). The special value -"<parent>" may be used to indicate that the widget should use the same -background pixmap as its parent. The special value "<none>" may be -used to indicate no background pixmap. - - - - font = font - - Sets the font for a widget. font must be a XLFD font -description, e.g. -"-*-helvetica-medium-r-normal--10-*-*-*-*-*-*-*". - - - - fontset = font - - Sets the fontset for a widget. Overrides any font -declarations. font must be a comma-separated list of XLFD font descriptions, -e.g. "-JIS-Fixed-Medium-R-Normal--26-180-100-100-C-240, --JIS-Fixed-Medium-R-Normal--26-180-100-100-C-120, --GB-Fixed-Medium-R-Normal--26-180-100-100-C-240, --Adobe-Courier-Bold-R-Normal--25-180-100-100-M-150". - - - - font_name = font - - Sets the font for a widget. Overrides any -font or fontset declarations. -font must be a Pango font name, e.g. "Sans Italic -10". - - - - stock["stock-id"] = { icon source specifications } - - Defines the icon for a stock item. - - - - engine "engine" { engine-specific settings } - - Defines the engine to be used when drawing with this -style. - - - - class::property = value - - Sets a style property for a widget -class. - - - - - 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 gtk.Scrollbar, -tabs of a gtk.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 -gtk.Button and -gtk.MenuItem -widgets 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 items in a list widget, and the selection in an -editable widget. - - - - INSENSITIVE - - A color used for the background of widgets that have been -set insensitive with the set_sensitive() -method. - - - - - Colors can be specified as a string containing a color name (from -the X color database /usr/lib/X11/rgb.txt), in one of -the hexadecimal forms #rrrrggggbbbb, -#rrrgggbbb, #rrggbb, or -#rgb, where r, g -and b are hex digits, or they can be specified as a -triplet { r, g, b}, where r, -g and b are either integers in the -range 0-65635 or floats in the range 0.0-1.0. - -In a stock definition, icon sources are specified as a 4-tuple of -image filename, text direction, widget state, and size, in that order. Each -icon source specifies an image filename to use with a given direction, -state, and size. The * character can be used as a wildcard, and if -direction-state-size are omitted they default to *. So for example, the -following specifies different icons to use for left-to-right and -right-to-left languages: - - - stock["my-stock-item"] = - { - { "itemltr.png", LTR, *, * }, - { "itemrtl.png", RTL, *, * } - } - - - This could be abbreviated as follows: - - - stock["my-stock-item"] = - { - { "itemltr.png", LTR }, - { "itemrtl.png", RTL } - } - - - You can specify custom icons for specific sizes, as -follows: - - - stock["my-stock-item"] = - { - { "itemmenusize.png", *, *, "gtk-menu" }, - { "itemtoolbarsize.png", *, *, "gtk-large-toolbar" } - { "itemgeneric.png" } /* implicit *, *, * as a fallback */ - } - - - The sizes that come with GTK+ itself are -"gtk-menu", "gtk-small-toolbar", "gtk-large-toolbar", "gtk-button", -"gtk-dialog". Applications can define other sizes. It's also possible to use -custom icons for a given state, for example: - - - stock["my-stock-item"] = - { - { "itemprelight.png", *, PRELIGHT }, - { "iteminsensitive.png", *, INSENSITIVE }, - { "itemgeneric.png" } /* implicit *, *, * as a fallback */ - } - - - When selecting an icon source to use, GTK+ will -consider text direction most important, state second, and size third. It -will select the best match based on those criteria. If an attribute matches -exactly (e.g. you specified PRELIGHT or specified the -size), GTK+ won't modify the image; if the attribute -matches with a wildcard, GTK+ will scale or modify the -image to match the state and size the user requested. - - 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. 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 - - - theme - - - application - - - gtk - - - lowest - - - - rc is the default for bindings read from an RC -file, theme is the default for bindings read from theme -RC files, application should be used for bindings an -application sets up, and gtk is used for bindings that -GTK+ creates internally. - - - - - Methods - - - gtk.RcStyle.copy - - - copy - - - - Returns : - a new gtk.RcStyle that is -a copy of the rcstyle - - - - The copy() method returns a new gtk.RcStyle that is -a copy of the RC style. This method will correctly copy an RC style that is -a member of a class derived from gtk.RcStyle. - - - - - - - Functions - - - gtk.rc_add_default_file - - - gtk.rc_add_default_file - filename - - - - filename : - the name of a file containing resource -data - - - - The gtk.rc_add_default_file() function adds -the file specified by filename to the list of files -to be parsed for resource data. - - - - - gtk.rc_set_default_files - - - gtk.rc_set_default_files - filenames - - - - filenames : - a list of filenames - - - - The gtk.rc_set_default_files() function -sets the list of files (specified by filenames) that -will be parsed for resource information. - - - - - gtk.rc_get_default_files - - - gtk.rc_get_default_files - - - - - Returns : - the current list of resource -files - - - - The gtk.rc_get_default_files() function -returns a list of filenames (as set by the gtk.rc_set_default_files() -function) that will be parsed for resource data. - - - - - gtk.rc_get_style_by_paths - - - gtk.rc_get_style_by_paths - settings - widget_path - class_path - type - - - - settings : - a gtk.Settings -object - - - widget_path : - the widget path to use when looking up the -style - - - class_path : - the class path to use when looking up the -style - - - type : - a type that will be used along with parent -types of this type when matching against class styles, or -gobject.TYPE_NONE - - - Returns : - a gtk.Style created by -matching with the supplied paths, or None if nothing -matching was specified and the default style should be -used. - - - - The gtk.rc_get_style_by_paths() function -returns a gtk.Style created -from styles defined in a RC file by providing the raw components used in -matching. This function may be useful when creating pseudo-widgets that -should be themed like widgets but don't actually have corresponding -PyGTK widgets. An example of this would be items inside a -GNOME canvas widget. - - - - - gtk.rc_reparse_all_for_settings - - - gtk.rc_reparse_all_for_settings - settings - force_load - - - - settings : - a gtk.Settings -object - - - force_load : - if True reparse the RC files -even if they haven't changed - - - Returns : - True if the files were -reparsed - - - - The gtk.rc_reparse_all_for_settings() -function reparses the files associated with the gtk.Settings -object specified by settings if any of the files have -changed and force_load is False -and . If force_load is True the -files are always reparsed. - - - - - gtk.rc_reset_styles - - - gtk.rc_reset_styles - settings - - - - settings : - a gtk.Settings -object - - - Returns : - a gtk.Style - - - - - This function is available in PyGTK 2.4 and above. - - - The gtk.rc_reset_styles() function returns -a gtk.Style. This -function computes the styles for all widgets that use the gtk.Settings -object specified by settings. (There is one gtk.Settings -object per gtk.gdk.Screen, see -the gtk.settings_get_for_screen() -function). It is useful when some global parameter has changed that affects -the appearance of all widgets, because when a widget gets a new style, it -will both redraw and recompute any cached information about its -appearance. As an example, it is used when the default font size set by the -operating system changes. Note that this function doesn't affect widgets -that have a style set explicitly on them with the gtk.Widget.set_style() -method. - - - - - gtk.rc_parse - - - gtk.rc_parse - filename - - - - filename : - the name of a file to parse for resource -data - - - - The gtk.rc_parse() function parses the file -specified by filename for resource data. - - - - - gtk.rc_parse_string - - - gtk.rc_parse_string - rc_string - - - - rc_string : - a string to parse for resource -data - - - - The gtk.rc_parse_string() function parses -the string specified by rc_string for resource -data. - - - - - gtk.rc_reparse_all - - - gtk.rc_reparse_all - - - - - Returns : - True if the files were -reparsed. - - - - The gtk.rc_reparse_all() function discards -all style data and reparses all the RC files for resource data if any of -them have changed. - - - - - gtk.rc_find_module_in_path - - - gtk.rc_find_module_in_path - module_file - - - - module_file : - the name of a theme engine - - - Returns : - the filename of the theme engine or -None - - - - The gtk.rc_find_module_in_path() function -searches for a theme engine named by module_file. -This function is not useful for applications and should not be used. - - - - - gtk.rc_get_theme_dir - - - gtk.rc_get_theme_dir - - - - - Returns : - the name of the themes -directory - - - - The gtk.rc_get_theme_dir() function returns -the name of the directory where themes should be installed. - - - - - gtk.rc_get_module_dir - - - gtk.rc_get_module_dir - - - - - Returns : - the theme engines directory -name - - - - The gtk.rc_get_module_dir() function -returns the name of the directory where PyGTK searches -for theme engines. - - - - - gtk.rc_get_im_module_path - - - gtk.rc_get_im_module_path - - - - - Returns : - the IM modules path - - - - The gtk.rc_get_im_module_path() function -returns the path where PyGTK searches for IM -modules. - - - - - gtk.rc_get_im_module_file - - - gtk.rc_get_im_module_file - - - - - Returns : - the name of the IM modules -file - - - - The gtk.rc_get_im_module_file() function -returns the name of the PyGTK IM modules file. - - - - - - diff --git a/docs/reference/pygtk-gtkrecentchooser.xml b/docs/reference/pygtk-gtkrecentchooser.xml deleted file mode 100644 index f138ea17..00000000 --- a/docs/reference/pygtk-gtkrecentchooser.xml +++ /dev/null @@ -1,1273 +0,0 @@ - - - - - - - gtk.RecentChooser - an interface implemented by gtk.RecentChooserWidget, - gtk.RecentChooserMenu - and gtk.RecentChooserDialog (new in PyGTK 2.10) - - - - - Synopsis - - - gtk.RecentChooser - - set_show_private - show_private - - - get_show_private - - - - set_show_not_found - show_not_found - - - get_show_not_found - - - - set_select_multiple - select_multiple - - - get_select_multiple - - - - set_limit - limit - - - get_limit - - - - set_local_only - local_only - - - get_local_only - - - - set_show_tips - show_tips - - - get_show_tips - - - - set_show_numbers - show_numbers - - - get_show_numbers - - - - set_show_icons - show_icons - - - get_show_icons - - - - set_sort_type - sort_type - - - get_sort_type - - - - set_sort_func - sort_func - sort_dataNone - - - set_current_uri - uri - - - get_current_uri - - - - get_current_item - - - - select_uri - uri - - - unselect_uri - uri - - - select_all - - - - unselect_all - - - - get_items - - - - get_uris - - - add_filter - filter - - - remove_filter - filter - - - list_filters - - - - set_filter - filter - - - get_filter - - - - - - - - Ancestry - -+-- gtk.RecentChooser - - - - - - gtk.RecentChooser Properties - -
- - - - - - - - - "filter" - Read-Write - The current gtk.RecentFilter - for selecting which resources are displayed - - - - "limit" - Read-Write - The maximum number of items to be displayed - - - - "local-only" - Read-Write - if True the selected resource(s) should - be limited to local file: URIs - - - - "recent-manager" - Write-Construct Only - The RecentManager object to use - - - - "select-multiple" - Read-Write - if True allow multiple items to be - selected - - - - "show-icons" - Read-Write - if True there should be an icon near the - item - - - - "show-not-found" - Read-Write - if True the items pointing to - unavailable resources should be displayed - - - - "show-private" - Read-Write - if True the private items should be - displayed - - - - "show-tips" - Read-Write - if True there should be a tooltip on the - item - - - - "sort-type" - Read-Write - The sorting order of the items displayed - one of the - - - - - -
- -
- - - gtk.RecentChooser Signal Prototypes - - - - - "item-activated - - callback - chooser - user_param1 - ... - - - - - "selection-changed - - callback - chooser - user_param1 - ... - - - - - - - - - Description - - gtk.RecentChooser - is an interface that can be implemented by widgets displaying the list - of recently used files. In PyGTK, the main objects that implement this - interface are gtk.RecentChooserWidget, - gtk.RecentChooserDialog - and gtk.RecentChooserMenu. - - Recently used files are supported since GTK+ 2.10. - - - - - Methods - - - gtk.RecentChooser.set_show_private - - - set_show_private - show_private - - - - - show_private : - if True show private - items - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the "show-private" property to the value of - show_private. If - show_private is True show - recently used resources marked registered as private. - - - - - gtk.RecentChooser.get_show_private - - - get_show_private - - - - - - Returns : - True if the recent chooser - should show private items. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns True if recently used resources - registered as private should be displayed. - - - - - gtk.RecentChooser.set_show_not_found - - - set_show_not_found - show_not_found - - - - - show_not_found : - if True show the local items - we didn't find - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the "show-not'found" property to the value specified by - show_not_found. If - show_not_found is True, - display the recently used resources that it didn't find. This only - applies to local resources. - - - - - gtk.RecentChooser.get_show_not_found - - - get_show_not_found - - - - - - Returns : - True if the resources not - found should be displayed. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns True if the recently used resources - that were not found shoudl be shown. - - - - - gtk.RecentChooser.set_select_multiple - - - set_select_multiple - select_multiple - - - - - select_multiple : - if True more than one item - can be selected - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the "select-multiple" property to the value of - select_multiple. If - select_mulitple is True - multiple items can be selected. - - - - - gtk.RecentChooser.get_select_multiple - - - get_select_multiple - - - - - - Returns : - True if more than one item - can be selected. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns True if multiple items can be - selected. - - - - - gtk.RecentChooser.set_limit - - - set_limit - limit - - - - - limit : - a positive integer, or -1 for all items - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the number of items that should be returned by the gtk.RecentChooser.get_items() - and gtk.RecentChooser.get_uris() - methods. - - - - - gtk.RecentChooser.get_limit - - - get_limit - - - - - - Returns : - A positive integer, or -1 meaning that all - items are returned. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the number of items that can be returned by the gtk.RecentChooser.get_items() - and gtk.RecentChooser.get_uris() - methods. - - - - - gtk.RecentChooser.set_local_only - - - set_local_only - local_only - - - - - local_only : - if True only local files can - be shown - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the "local-only" property to the value of - local_only. If - local_only is True only - local resources, that is resources using the file:// URI scheme, - should be shown in the recently used resources selector. If - local_only is True (the - default) then the resources shown are guaranteed to be accessible - through the operating system native file system. - - - - - gtk.RecentChooser.get_local_only - - - get_local_only - - - - - - Returns : - True if only local resources - should be shown. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns True if only local resources should - be shown in the recently used resources selector. See the gtk.RecentChooser.set_local_only() - method. - - - - - gtk.RecentChooser.set_show_tips - - - set_show_tips - show_tips - - - - - show_tips : - if True tooltips should be - shown - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the "show-tips" property to the value of - show_tips. If show_tips - is True, show a tooltips on the widget. - - - - - gtk.RecentChooser.get_show_tips - - - get_show_tips - - - - - - Returns : - True if the recent chooser - should show tooltips. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns True if tooltips should be - displayed. - - - - - gtk.RecentChooser.set_show_numbers - - - set_show_numbers - show_numbers - - - - - show_numbers : - if True show - numbers - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the "show-number" property to the value of - show_numbers. If - show_numbers is True, show - recently used resources prepended by a unique number. - - - - - gtk.RecentChooser.get_show_numbers - - - get_show_numbers - - - - - - Returns : - True if the recent chooser - should show display numbers. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns True if recently used resources - should be displayed prepended by a unique number. - - - - - gtk.RecentChooser.set_show_icons - - - set_show_icons - show_icons - - - - - show_icons : - if True show an icon near - the resource - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the "show-icon" property to the value of - show_icon. If show_icon - is True, show an icon near the resource when - displaying it. - - - - - gtk.RecentChooser.get_show_icons - - - get_show_icons - - - - - - Returns : - True if the icons should be - displayed. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns True if an icon should be shown near - the resource. - - - - - gtk.RecentChooser.set_sort_type - - - set_sort_type - sort_type - - - - - sort_type : - the sort order that the chooser should use - - one of the - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the sorting order of the recently used resources list to - the value specified by sort_type which must be one of the . - - - - - gtk.RecentChooser.get_sort_type - - - get_sort_type - - - - - - Returns : - the sorting order - one of the . - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value set by the gtk.RecentChooser.set_sort_type() - method.. - - - - - gtk.RecentChooser.set_sort_func - - - set_sort_func - sort_func - sort_dataNone - - - - - sort_func : - the comparison function - - - sort_data : - user data to pass to sort_func, or None - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the comparison function specified by - sort_func to be used when sorting. If the - "sort-type" property is set to - gtk.RECENT_SORT_CUSTOM, the chooser will sort using - this function. - - The signature of the comparison function is: - - - def sort_func(a, b, data): - - - where a and b are - two gtk.RecentInfo - objects and data is - sort_data. sort_func - should return a positive integer if the first item comes before the - second, zero if the two items are equal and a negative integer if the - first item comes after the second. - - - - - gtk.RecentChooser.set_current_uri - - - set_current_uri - uri - - - - - uri : - a URI - - - Returns : - True if the URI was - found. - - - - - This method is available in PyGTK 2.10 and above. - - - Sets uri as the current URI. Raises the - gobject.GError exception when an error occurs. - - - - - gtk.RecentChooser.get_current_uri - - - get_current_uri - - - - - - Returns : - a URI. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the currently selected URI. - - - - - gtk.RecentChooser.get_current_item - - - get_current_item - - - - - - Returns : - a gtk.RecentInfo - object. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the gtk.RecentInfo - for the currently selected item. - - - - - gtk.RecentChooser.select_uri - - - select_uri - uri - - - - - uri : - a URI - - - Returns : - True if - uri was found. - - - - - This method is available in PyGTK 2.10 and above. - - - Selects uri. Raises the gobject.GError - exception when an error occurs. - - - - - gtk.RecentChooser.unselect_uri - - - unselect_uri - uri - - - - - uri : - a URI - - - - - This method is available in PyGTK 2.10 and above. - - - Unselects uri. - - - - - gtk.RecentChooser.select_all - - - select_all - - - - - This method is available in PyGTK 2.10 and above. - - - Selects all the items inside chooser, if - the "select-multiple" property is True. - - - - - gtk.RecentChooser.unselect_all - - - unselect_all - - - - - This method is available in PyGTK 2.10 and above. - - - Unselects all the items. - - - - - gtk.RecentChooser.get_items - - - get_items - - - - - - Returns : - A list of gtk.RecentInfo - objects. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the list of recently used resources in form of gtk.RecentInfo - objects. - - The return value of this function is affected by the "sort-type" - and "limit" properties. - - - - - gtk.RecentChooser.get_uris - - - get_uris - - - - - Returns : - A list of strings. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns a list of the URIs of the recently used - resources. - - The return value of this function is affected by the "sort-type" - and "limit" properties>. - - - - - gtk.RecentChooser.add_filter - - - add_filter - filter - - - - - filter : - a gtk.RecentFilter - - - - - This method is available in PyGTK 2.10 and above. - - - Adds filter to the list of gtk.RecentFilter - objects. - - If no previous filter objects were defined, this method will - call the gtk.RecentChooser.set_filter() - method. - - - - - gtk.RecentChooser.remove_filter - - - remove_filter - filter - - - - - filter : - a gtk.RecentFilter - - - - - This method is available in PyGTK 2.10 and above. - - - Removes filter from the list of gtk.RecentFilter - objects. - - - - - gtk.RecentChooser.list_filters - - - list_filters - - - - - - Returns : - A list of gtk.RecentFilter - objects.. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns a list of the gtk.RecentFilter - objects. - - - - - gtk.RecentChooser.set_filter - - - set_filter - filter - - - - - filter : - a gtk.RecentFilter - - - - - This method is available in PyGTK 2.10 and above. - - - Sets filter as the current gtk.RecentFilter - object used by the recent chooser to filter the displayed recently - used resources. - - - - - gtk.RecentChooser.get_filter - - - get_filter - - - - - - Returns : - a gtk.RecentFilter - object. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the currently used gtk.RecentFilter - object. - - - - - - - Signals - - - The "item-activated" gtk.RecentChooser Signal - - callback - chooser - user_param1 - ... - - - - - chooser : - the object which received the signal - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - - This signal is available in GTK+ 2.10 and above. - - - This signal is emitted when the user "activates" a recent item - in the recent chooser. This can happen by double-clicking on an item - in the recently used resources list, or by pressing - Enter. - - - - - The "selection-changed" gtk.RecentChooser Signal - - callback - chooser - user_param1 - ... - - - - - chooser : - the object which received the signal - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - - This signal is available in GTK+ 2.10 and above. - - - This signal is emitted when there is a change in the set of - selected recently used resources. This can happen when a user - modifies the selection with the mouse or the keyboard, or when - explicitly calling methods to change the selection. - - - - - -
diff --git a/docs/reference/pygtk-gtkrecentchooserdialog.xml b/docs/reference/pygtk-gtkrecentchooserdialog.xml deleted file mode 100644 index b5840783..00000000 --- a/docs/reference/pygtk-gtkrecentchooserdialog.xml +++ /dev/null @@ -1,197 +0,0 @@ - - - - - - - gtk.RecentChooserDialog - Displays recently used files in a dialog (new in PyGTK - 2.10) - - - - Synopsis - - - gtk.RecentChooserDialog - gtk.Dialog - gtk.RecentChooser - - gtk.RecentChooserDialog - titleNone - parentNone - managerNone - buttonsNone - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Window - +-- gtk.Dialog - +-- gtk.RecentChooserDialog (implements gtk.RecentChooser) - - - - - - gtk.RecentChooserDialog Properties - - gtk.RecentChooser Properties - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Window Properties - gtk.Dialog Properties - - - - - gtk.RecentChooserDialog Style Properties - - gtk.Widget Style Properties - gtk.Dialog Style Properties - - - - - gtk.RecentChooserDialog Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Window Signal Prototypes - gtk.Dialog Signal Prototypes - gtk.RecentChooser Signal Prototypes - - - - Description - - gtk.RecentChooserDialog - is a dialog box suitable for displaying the recently used documents. - This widgets works by putting a gtk.RecentChooserWidget - inside a gtk.Dialog. It - exposes the gtk.RecentChooser - interface, so you can use all the gtk.RecentChooser - methods on the recent chooser dialog as well as those for gtk.Dialog. - - Note that gtk.RecentChooserDialog - does not have any methods of its own. Instead, you should use the - methods that work on a gtk.RecentChooser. - - - Typical usage - - In the simplest of cases, you can use the following code to use - a gtk.RecentChooserDialog - to select a recently used file: - - - dialog = gtk.RecentChooserDialog("Recent Documents", parent_window, None, - (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, - gtk.STOCK_OPEN, gtk.RESPONSE_ACCEPT)) - - if dialog.run() == gtk.RESPONSE_ACCEPT: - info = dialog.get_current_item () - open_file(info.get_uri()) - dialog.destroy() - - - - Recently used files are supported since GTK+ 2.10. - - - - - Constructor - - - gtk.RecentChooserDialog - - - gtk.RecentChooserDialog - titleNone - parentNone - managerNone - buttonsNone - - - - - title : - Title of the dialog, or - None - - - parent : - Transient parent of the dialog, or - None, - - - manager : - a gtk.RecentManager, - or None, - - - buttons : - a sequence of text-response - pairs - - - Returns : - a new gtk.RecentChooserDialog - - - - - This constructor is available in PyGTK 2.10 and above. - - - Creates a new gtk.RecentChooserDialog - with the title text specified by title (or - None for the default title; see gtk.Window.set_title()) - and transient parent window specified by parent - (or None for none; see gtk.Window.set_transient_for()). - manager specifies a gtk.RecentManager - object (or None). buttons is - a sequence of button text/response ID pairs should be listed, or - None (the default value) if no buttons are - needed. The button text can be either a stock ID such as - gtk.STOCK_OK, or some arbitrary text. A response - ID can be any positive number, or one of the pre-defined . This constructor - is analogous to gtk.Dialog. - - - - - - diff --git a/docs/reference/pygtk-gtkrecentchoosermenu.xml b/docs/reference/pygtk-gtkrecentchoosermenu.xml deleted file mode 100644 index c2df99f9..00000000 --- a/docs/reference/pygtk-gtkrecentchoosermenu.xml +++ /dev/null @@ -1,224 +0,0 @@ - - - - - - - gtk.RecentChooserMenu - Displays recently used files in a menu (new in PyGTK - 2.10) - - - - Synopsis - - - gtk.RecentChooserMenu - gtk.Menu - gtk.RecentChooser - - gtk.RecentChooserMenu - manager - - - get_show_numbers - - - - set_show_numbers - show_numbers - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.MenuShell - +-- gtk.Menu - +-- gtk.RecentChooserMenu (implements gtk.RecentChooser) - - - - - - gtk.RecentChooserMenu Properties - - gtk.RecentChooser Properties - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.MenuShell Properties - gtk.Menu Properties - -
- - - - - - - - - "show-numbers" - Read-Write - Whether the first ten items in the menu should be prepended by -a number acting as a unique mnemonic. -This property is available in GTK+ 2.10 and above. - - - - - -
- -
- - - gtk.RecentChooserMenu Style Properties - - gtk.Widget Style Properties - gtk.Menu Style Properties - - - - - gtk.RecentChooserMenu Child Properties - - gtk.Menu Child Properties - - - - - gtk.RecentChooserMenu Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.MenuShell Signal Prototypes - gtk.Menu Signal Prototypes - gtk.RecentChooser Signal Prototypes - - - - Description - - -gtk.RecentChooserMenu is a widget suitable for displaying recently used files -inside a menu. It can be used to set a sub-menu of a gtk.MenuItem using -gtk.MenuItem.set_submenu(), or as the menu of a gtk.MenuToolButton. - - - -Note that gtk.RecentChooserMenu does not have any methods of its own. Instead, -you should use the functions that work on a gtk.RecentChooser. - - - -Recently used files are supported since GTK+ 2.10. - - - - - - - - Constructor - - - gtk.RecentChooserMenu - - - gtk.RecentChooserMenu - manager - - - - - manager : - a gtk.RecentManager - - - Returns : - a new gtk.RecentChooserMenu, bound to manager. - - - - - This constructor is available in PyGTK 2.10 and above. - - - Creates a new gtk.RecentChooserMenu widget using manager as - the underlying recently used resources manager. - - This is useful if you have implemented your own recent manager, - or if you have a customized instance of a gtk.RecentManager - object or if you wish to share a common gtk.RecentManager object - among multiple gtk.RecentChooser widgets. - - - - - - - Methods - - - gtk.RecentChooserMenu.get_show_numbers - - - get_show_numbers - - - - - - Returns : - True if numbers should be shown. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value set by gtk.RecentChooserMenu.set_show_numbers(). - - - - - gtk.RecentChooserMenu.set_show_numbers - - - set_show_numbers - show_numbers - - - - - show_numbers : - whether to show numbers - - - - - This method is available in PyGTK 2.10 and above. - - - Sets whether a number should be added to the items of menu. The - numbers are shown to provide a unique character for a mnemonic to - be used inside the menu item's label. Only the first the items - get a number to avoid clashes. - - - - - -
diff --git a/docs/reference/pygtk-gtkrecentchooserwidget.xml b/docs/reference/pygtk-gtkrecentchooserwidget.xml deleted file mode 100644 index f19a4668..00000000 --- a/docs/reference/pygtk-gtkrecentchooserwidget.xml +++ /dev/null @@ -1,139 +0,0 @@ - - - - - - - gtk.RecentChooserWidget - Displays recently used files (new in PyGTK 2.10) - - - - Synopsis - - - gtk.RecentChooserWidget - gtk.VBox - gtk.RecentChooser - - gtk.RecentChooserWidget - managerNone - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Box - +-- gtk.VBox - +-- gtk.RecentChooserWidget (implements gtk.RecentChooser) - - - - - - gtk.RecentChooserWidget Properties - - gtk.RecentChooser Properties - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Box Properties - - - - - gtk.RecentChooserWidget Style Properties - - gtk.Widget Style Properties - - - - - gtk.RecentChooserWidget Child Properties - - gtk.Box Child Properties - - - - - gtk.RecentChooserWidget Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.RecentChooser Signal Prototypes - - - - Description - - gtk.RecentChooserWidget - is a widget suitable for selecting recently used files. It is the main - building block of a gtk.RecentChooserDialog. - Most applications will only need to use the latter; you can use gtk.RecentChooserWidget - as part of a larger window if you have special needs. - - Note that gtk.RecentChooserWidget - does not have any methods of its own. Instead, you should use the - methods that work on a gtk.RecentChooser. - - Recently used files are supported since GTK+ 2.10. - - - - - Constructor - - - gtk.RecentChooserWidget - - - gtk.RecentChooserWidget - managerNone - - - - - manager : - a gtk.RecentManager - - - Returns : - a new gtk.RecentChooserWidget - - - - - This constructor is available in PyGTK 2.10 and above. - - - Creates a new gtk.RecentChooserWidget - with an optional gtk.RecentManager. - - This is useful if you have implemented your own recent manager, - or if you have a customized instance of a gtk.RecentManager - object. - - - - - - diff --git a/docs/reference/pygtk-gtkrecentfilter.xml b/docs/reference/pygtk-gtkrecentfilter.xml deleted file mode 100644 index 6d181c47..00000000 --- a/docs/reference/pygtk-gtkrecentfilter.xml +++ /dev/null @@ -1,509 +0,0 @@ - - - - - - - gtk.RecentFilter - A filter for selecting a subset of recently used files - (new in PyGTK 2.10) - - - - Synopsis - - - gtk.RecentFilter - gtk.Object - - gtk.RecentFilter - - - - set_name - name - - - get_name - - - - add_mime_type - mime_type - - - add_pattern - pattern - - - add_pixbuf_formats - - - - add_application - application - - - add_group - group - - - add_age - days - - - add_custom - needed - func - data - - - get_needed - - - - filter - filter_info - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.RecentFilter - - - - - - gtk.RecentFilter Properties - - gtk.Object Properties - - - - - gtk.RecentFilter Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - - - - Description - - A gtk.RecentFilter - can be used to restrict the files being shown in a gtk.RecentChooser. - Files can be filtered based on their name (with the gtk.RecentFilter.add_pattern() - method), on their mime type (with the gtk.FileFilter.add_mime_type() - method), on the application that has registered them (with the gtk.RecentFilter.add_application() - method), or by a custom filter function (with the gtk.RecentFilter.add_custom() - method). - - Filtering by mime type handles aliasing and subclassing of mime - types; e.g. a filter for "text/plain" also matches a file with mime type - "application/rtf", since "application/rtf" is a subclass of - "text/plain". Note that gtk.RecentFilter - allows wildcards for the subtype of a mime type, so you can e.g. filter - for "image/*". - - Normally, filters are used by adding them to a gtk.RecentChooser, - see the gtk.RecentChooser.add_filter() - method, but it is also possible to manually use a filter on a file with - the gtk.RecentFilter.filter() - method. - - Recently used files are supported since GTK+ 2.10. - - - - - Constructor - - - gtk.RecentFilter - - - gtk.RecentFilter - - - - - - Returns : - a new gtk.RecentFilter - - - - - This constructor is available in PyGTK 2.10 and above. - - - Creates a new gtk.RecentFilter - with no rules added to it. Such a filter does not accept any recently - used resources, so is not particularly useful until you add rules with - the gtk.RecentFilter.add_pattern(), - gtk.RecentFilter.add_mime_type(), - gtk.RecentFilter.add_application(), - gtk.RecentFilter.add_age() - methods. To create a filter that accepts any recently used resource, - use: - - - filter = gtk.RecentFilter() - filter.add_pattern("*") - - - - - - - - Methods - - - gtk.RecentFilter.set_name - - - set_name - name - - - - - name : - the human readable name - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the human-readable name of the filter; this is the string - that will be displayed in the recently used resources selector user - interface if there is a selectable list of filters. - - - - - gtk.RecentFilter.get_name - - - get_name - - - - - - Returns : - the name of the filter, or - None. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the human-readable name for the filter. See the gtk.RecentFilter.set_name() - method. - - - - - gtk.RecentFilter.add_mime_type - - - add_mime_type - mime_type - - - - - mime_type : - a MIME type - - - - - This method is available in PyGTK 2.10 and above. - - - Adds a rule that filters resources based on their registered - MIME type. - - - - - gtk.RecentFilter.add_pattern - - - add_pattern - pattern - - - - - pattern : - a file pattern - - - - - This method is available in PyGTK 2.10 and above. - - - Adds a rule that filters resources based on a pattern matching - their display name. - - - - - gtk.RecentFilter.add_pixbuf_formats - - - add_pixbuf_formats - - - - - This method is available in PyGTK 2.10 and above. - - - Adds a rule that filters image files based on the formats - supported by gtk.gdk.Pixbuf. - - - - - gtk.RecentFilter.add_application - - - add_application - application - - - - - application : - an application name - - - - - This method is available in PyGTK 2.10 and above. - - - Adds a rule that filters resources based on the name of the - application that has registered them. - - - - - gtk.RecentFilter.add_group - - - add_group - group - - - - - group : - a group name - - - - - This method is available in PyGTK 2.10 and above. - - - Adds a rule that filters resources based on the name of the - group to which they belong - - - - - gtk.RecentFilter.add_age - - - add_age - days - - - - - days : - number of days - - - - - This method is available in PyGTK 2.10 and above. - - - Adds a rule that filters resources based on their age - - that is, the number of days elapsed since they were last - modified. - - - - - gtk.RecentFilter.add_custom - - - add_custom - needed - func - data - - - - - needed : - a combination of the - indicating the information that the custom filter function - needs. - - - func : - callback function; if the function returns True, then - the file will be displayed. - - - data : - data to pass to func - - - - - This method is available in PyGTK 2.10 and above. - - - Adds a rule to a filter that filters resources based on a custom - callback function. needed is a combination of - the which - provides information about what sorts of information that the filter - function needs; this allows PyGTK to avoid retrieving expensive - information when it isn't needed by the filter. - - The signature of the filter function is: - - - def func(filterinfo, user_data): - - - where filterinfo is a dict containing the - info requested by needed as key-value pairs and - user_data is data. The - possible filterinfo keys are: "uri", - "display_name", "mime_type", "applications", "age" and - "groups". - - - - - gtk.RecentFilter.get_needed - - - get_needed - - - - - - Returns : - a combination of the - indicating what fields are used for filtering when calling the - gtk.RecentFilter.filter() - method - - - - - This method is available in PyGTK 2.10 and above. - - - Returns a combination of the indicating - what fields are used for filtering. - - This method will not typically be used by applications; it is - intended principally for use in the implementation of gtk.RecentChooser. - - - - - gtk.RecentFilter.filter - - - filter - filter_info - - - - - filter_info : - a filter info dict containing information about - a recently used resource - - - Returns : - True if the file should be - displayed - - - - - This method is available in PyGTK 2.10 and above. - - - Returns True if a file should be displayed. - filter_info is a dict that should include the - key-value pairs as specified by the return flags from the gtk.RecentFilter.get_needed() - method. The possible filter_info keys are: - "uri", "display_name", "mime_type", "applications", "age" and - "groups". - - This method will not typically be used by applications; it is - intended principally for use in the implementation of gtk.RecentChooser. - - - - - - diff --git a/docs/reference/pygtk-gtkrecentinfo.xml b/docs/reference/pygtk-gtkrecentinfo.xml deleted file mode 100644 index 177a8462..00000000 --- a/docs/reference/pygtk-gtkrecentinfo.xml +++ /dev/null @@ -1,681 +0,0 @@ - - - - - - - gtk.RecentInfo - information found when looking up an entry of the recently - used files list. (new in PyGTK 2.10) - - - - Synopsis - - - gtk.RecentInfo - gobject.GBoxed - - get_uri - - - - get_display_name - - - - get_description - - - - get_mime_type - - - - get_added - - - - get_modified - - - - get_visited - - - - get_private_hint - - - - get_application_info - app_name - - - get_applications - - - last_application - - - - has_application - app_name - - - get_groups - - - has_group - group_name - - - get_icon - size - - - get_short_name - - - - get_uri_display - - - - get_age - - - - is_local - - - - exists - - - - match - info_b - - - - - - - Description - - A gtk.RecentInfo - contains the information about an entry in a gtk.RecentManager. - - - - - Methods - - - gtk.RecentInfo.get_uri - - - get_uri - - - - - - Returns : - the URI of the resource. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the URI of the resource. - - - - - gtk.RecentInfo.get_display_name - - - get_display_name - - - - - - Returns : - the display name of the - resource. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the name of the resource. If none has been defined, the - basename of the resource is obtained. - - - - - gtk.RecentInfo.get_description - - - get_description - - - - - - Returns : - the description of the - resource. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the (short) description of the resource. - - - - - gtk.RecentInfo.get_mime_type - - - get_mime_type - - - - - - Returns : - the MIME type of the - resource. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the MIME type of the resource. - - - - - gtk.RecentInfo.get_added - - - get_added - - - - - - Returns : - the number of seconds elapsed from system's - Epoch when the resource was added to the list, or -1 on - failure. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the timestamp (seconds from system's Epoch) when the - resource was added to the recently used resources list. - - - - - gtk.RecentInfo.get_modified - - - get_modified - - - - - - Returns : - the number of seconds elapsed from system's - Epoch when the resource was last modified, or -1 on - failure. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the timestamp (seconds from system's Epoch) when the - resource was last modified. - - - - - gtk.RecentInfo.get_visited - - - get_visited - - - - - - Returns : - the number of seconds elapsed from system's - Epoch when the resource was last visited, or -1 on - failure. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the timestamp (seconds from system's Epoch) when the - resource was last visited. - - - - - gtk.RecentInfo.get_private_hint - - - get_private_hint - - - - - - Returns : - True if the private flag was - found. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the value of the "private" flag. Resources in the - recently used list that have this flag set to True - should only be displayed by the applications that have registered - them. - - - - - gtk.RecentInfo.get_application_info - - - get_application_info - app_name - - - - - app_name : - the name of the application that has registered - this item - - - Returns : - a 3-tuple (containing the command line, the - number of times this item was registered and the timestamp this - item was last registered for this application) if an application - named app_name has registered this resource - inside the recently used list, or None - otherwise. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns a 3-tuple containg the data regarding the application - that has registered this resource. The 3-tuple contains the command - line, the number of times this item was registered and the timestamp - this item was last registered for this application - - If the command line contains any escape characters defined - inside the storage specification, they will be expanded. - - - - - gtk.RecentInfo.get_applications - - - get_applications - length - - - - - Returns : - a list of application name - strings. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the list of applications that have registered this - resource. - - - - - gtk.RecentInfo.last_application - - - last_application - - - - - - Returns : - an application name. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the name of the last application that has registered the - recently used resource. - - - - - gtk.RecentInfo.has_application - - - has_application - app_name - - - - - app_name : - a string containing an application - name - - - Returns : - True if an application with - the name app_name was found, - False otherwise. - - - - - This method is available in PyGTK 2.10 and above. - - - Checks whether an application registered this resource using - app_name. - - - - - gtk.RecentInfo.get_groups - - - get_groups - length - - - - - Returns : - a list of group names. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns a list containing the names of all groups registered - for the recently used item. - - - - - gtk.RecentInfo.has_group - - - has_group - group_name - - - - - group_name : - the name of a group - - - Returns : - True if the group was - found. - - - - - This method is available in PyGTK 2.10 and above. - - - Checks whether group_name appears inside - the groups registered for the recently used item. - - - - - gtk.RecentInfo.get_icon - - - get_icon - size - - - - - size : - the size of the icon in - pixels - - - Returns : - a gtk.gdk.Pixbuf - containing the icon, or - None. - - - - - This method is available in PyGTK 2.10 and above. - - - Retrieves the icon of size size - associated to the resource MIME type. - - - - - gtk.RecentInfo.get_short_name - - - get_short_name - - - - - - Returns : - the short name as a UTF-8 string - - - - - This method is available in PyGTK 2.10 and above. - - - Computes a valid UTF-8 string that can be used as the name of - the item in a menu or list. For example, calling this function on an - item that refers to "file:///foo/bar.txt" will yield "bar.txt". - - - - - gtk.RecentInfo.get_uri_display - - - get_uri_display - - - - - - Returns : - a UTF-8 string containing the resource's URI or - None - - - - - This method is available in PyGTK 2.10 and above. - - - Gets a displayable version of the resource's URI. - - - - - gtk.RecentInfo.get_age - - - get_age - - - - - - Returns : - a positive integer containing the number of - days elapsed since the time this resource was last - modified. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the number of days elapsed since the last update of the - resource. - - - - - gtk.RecentInfo.is_local - - - is_local - - - - - - Returns : - True if the resource is - local. - - - - - This method is available in PyGTK 2.10 and above. - - - Checks whether the resource is local or not by looking at the - scheme of its URI. - - - - - gtk.RecentInfo.exists - - - exists - - - - - - Returns : - True if the resource - exists - - - - - This method is available in PyGTK 2.10 and above. - - - Checks whether the resource still exists. At the moment this - check is done only on resources pointing to local files. - - - - - gtk.RecentInfo.match - - - match - info_b - - - - - info_b : - a gtk.RecentInfo - - - Returns : - True if - info_b matches this recent - info. - - - - - This method is available in PyGTK 2.10 and above. - - - Checks if info_b matches this recent - info. - - - - - - diff --git a/docs/reference/pygtk-gtkrecentmanager.xml b/docs/reference/pygtk-gtkrecentmanager.xml deleted file mode 100644 index de3f2fbb..00000000 --- a/docs/reference/pygtk-gtkrecentmanager.xml +++ /dev/null @@ -1,719 +0,0 @@ - - - - - - - gtk.RecentManager - manages recently used files (new in PyGTK - 2.10) - - - - Synopsis - - - gtk.RecentManager - gobject.GObject - - gtk.RecentManager - - - - set_screen - screen - - - add_item - uri - - - add_full - uri - recent_data - - - remove_item - uri - - - lookup_item - uri - - - has_item - uri - - - move_item - uri - new_uri - - - set_limit - limit - - - get_limit - - - - get_items - - - - purge_items - - - - -Functions - - - gtk.recent_manager_get_default - - - gtk.recent_manager_get_for_screen - screen - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.RecentManager - - - - - - gtk.RecentManager Properties - -
- - - - - - - - - "filename" - Read-Write-Construct Only - The full path to the file to be used to store and read the - recently used resources list This property is available in GTK+ - 2.10 and above. - - - - "limit" - Read-Write - The maximum number of items to be returned by the gtk.RecentManager.get_items() - function. This property is available in GTK+ 2.10 and - above. - - - - "size" - Read - The size of the recently used resources list. This - property is available in GTK+ 2.10 and above. - - - - - -
- -
- - - gtk.RecentManager Signal Prototypes - - gobject.GObject Signal Prototypes - - - - "changed - - callback - recent_manager - user_param1 - ... - - - - - - - - - Description - - gtk.RecentManager - provides a facility for adding, removing and looking up recently used - files. Each recently used file is identified by its URI, and has - meta-data associated to it, like the names and command lines of the - applications that have registered it, the number of time each - application has registered the same file, the mime type of the file and - whether the file should be displayed only by the applications that have - registered it. - - The gtk.RecentManager - acts like a database of all the recently used files. You can create new - gtk.RecentManager - objects, but it is more efficient to use the standard recent manager for - the gtk.gdk.Screen - so that information about the recently used files is shared with other - people using them. In case the default screen is being used, adding a - new recently used file is as simple as: - - - - manager = gtk.recent_manager_get_default() - manager.add_item(file_uri) - - - -While looking up a recently used file is as simple as: - - - - manager = gtk.recent_manager_get_default() - try: - info = manager.lookup_item(file_uri) - except gobject.GError: - print "Could not find the file: ", file_uri - - - -Recently used files are supported since GTK+ 2.10. - - - - - Constructor - - - gtk.RecentManager - - - gtk.RecentManager - - - - - - Returns : - A newly created gtk.RecentManager - object. - - - - - This constructor is available in PyGTK 2.10 and above. - - - Creates a new recent manager object. Recent manager objects are - used to handle the list of recently used resources. A gtk.RecentManager - object monitors the recently used resources list, and emits the - "changed" signal each time something inside the list changes. - - gtk.RecentManager - objects are expansive: be sure to create them only when needed. You - should use the gtk.recent_manager_get_for_screen() - or the gtk.recent_manager_get_default() - functions instead. - - - - - - - Methods - - - gtk.RecentManager.set_screen - - - set_screen - screen - - - - - screen : - a gtk.gdk.Screen - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the screen for a recent manager; the screen is used to - track the user's currently configured recently used documents - storage. - - - - - gtk.RecentManager.add_item - - - add_item - uri - - - - - uri : - a valid URI - - - Returns : - True if the new item was - successfully added to the recently used resources - list - - - - - This method is available in PyGTK 2.10 and above. - - - Adds a new resource, pointed by uri, into - the recently used resources list. - - This method automatically retrieves some of the needed metadata - and sets other metadata to common default values. - - See the gtk.RecentManager.add_full() - method if you want to explicitly define the metadata for the resource - pointed by uri. - - - - - gtk.RecentManager.add_full - - - add_full - uri - recent_data - - - - - uri : - a valid URI - - - recent_data : - a dict containing metadata of the - resource - - - Returns : - True if the new item was - successfully added to the recently used resources - list. - - - - - This method is available in PyGTK 2.10 and above. - - - Adds a new resource, pointed by uri, into - the recently used resources list, using the metadata specified inside - the dict passed in recent_data. - - The passed URI will be used to identify this resource inside the - list. - - In order to register the new recently used resource, metadata - about the resource must be passed as well as the URI. The metadata is - stored in a dict, which must contain the MIME type of the resource - pointed by the URI ("mime_type"), the name of the application that is - registering the item ("app_name"), and a command line to be used when - launching the item ("app_exec"). - - Optionally, the recent_data dict might - contain a UTF-8 string to be used when viewing the item instead of the - last component of the URI ("display_name"), a short description of the - item ("description"), whether the item should be considered private - - that is, should be displayed only by the applications that have - registered it("is_private") or a list of the groups that the item - belongs to ("groups"). - - - - - gtk.RecentManager.remove_item - - - remove_item - uri - - - - - uri : - the URI of the item you wish to remove - - - Returns : - True if the item pointed by - uri has been successfully removed by the - recently used resources list. - - - - - This method is available in PyGTK 2.10 and above. - - - Removes a resource pointed by uri from - the recently used resources list handled by a recent manager. Raises - the gobject.GError when an error occurs. - - - - - gtk.RecentManager.lookup_item - - - lookup_item - uri - - - - - uri : - a URI - - - Returns : - a gtk.RecentInfo - object containing information about the resource pointed by - uri, or None if the URI - was not registered in the recently used resources - list. - - - - Searches for a URI inside the recently used resources list, and - returns a gtk.RecentInfo - object containing information about the resource like its MIME type, - or its display name. Raises the gobject.GError when an error - occurs. - - - - - gtk.RecentManager.has_item - - - has_item - uri - - - - - uri : - a URI - - - Returns : - True if the resource was - found. - - - - - This method is available in PyGTK 2.10 and above. - - - Checks whether there is a recently used resource registered with - uri. - - - - - gtk.RecentManager.move_item - - - move_item - uri - new_uri - - - - - uri : - the URI of a recently used resource - - - new_uri : - the new URI of the recently used resource, or None to - remove the item pointed by uri in the list - - - Returns : - True on - success. - - - - - This method is available in PyGTK 2.10 and above. - - - Changes the location of a recently used resource from - uri to new_uri. - - Please note that this function will not affect the resource - pointed by the URIs, but only the URI used in the recently used - resources list. Raises the gobject.GError when an error occurs. - - - - - gtk.RecentManager.set_limit - - - set_limit - limit - - - - - limit : - the maximum number of items to return, or - -1. - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the maximum number of item that the gtk.RecentManager.get_items() - function should return. If limit is set to -1, - then return all the items. - - - - - gtk.RecentManager.get_limit - - - get_limit - - - - - - Returns : - the number of items to return, or -1 for every - item. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the maximum number of items that the gtk.RecentManager.get_items() - method should return. - - - - - gtk.RecentManager.get_items - - - get_items - - - - - - Returns : - a list of gtk.RecentInfo - objects. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the list of recently used resources as gtk.RecentInfo - objects. - - - - - gtk.RecentManager.purge_items - - - purge_items - - - - - Returns : - the number of items that have been removed from - the recently used resources list. - - - - - This method is available in PyGTK 2.10 and above. - - - Purges every item from the recently used resources list. Raises - the gobject.GError when an error occurs. - - - - - - - Functions - - - gtk.recent_manager_get_default - - - gtk.recent_manager_get_default - - - - - Returns : - A unique gtk.RecentManager - associated with the default screen. This recent manager is - associated to the screen and can be used as long as the screen is - open. - - - - - This function is available in PyGTK 2.10 and above. - - - Gets the recent manager for the default screen. See the gtk.recent_manager_get_for_screen() - function. - - - - - gtk.recent_manager_get_for_screen - - - gtk.recent_manager_get_for_screen - screen - - - - screen : - a gtk.gdk.Screen - - - Returns : - A unique gtk.RecentManager - associated with the given screen. This recent manager is - associated to the with the screen and can be used as long as the - screen is open. - - - - - This function is available in PyGTK 2.10 and above. - - - Gets the recent manager object associated with - screen; if this function has not previously - been called for the given screen, a new recent manager object will be - created and associated with the screen. Recent manager objects are - fairly expensive to create, so using this function is usually a better - choice than calling the gtk.RecentManager() - constructor and setting the screen yourself; by using this function a - single recent manager object will be shared between users. - - - - - - - Signals - - - The "changed" gtk.RecentManager Signal - - callback - recent_manager - user_param1 - ... - - - - - recent_manager : - the recent manager - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - - This signal is available in GTK+ 2.10 and above. - - - Emitted when the current recently used resources manager changes - its contents. - - - - - -
diff --git a/docs/reference/pygtk-gtkrequisition.xml b/docs/reference/pygtk-gtkrequisition.xml deleted file mode 100644 index c7ce2666..00000000 --- a/docs/reference/pygtk-gtkrequisition.xml +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - gtk.Requisition - an object containing information about the desired space -requirements of a widget. - - - - Synopsis - - - gtk.Requisition - gobject.GBoxed - - copy - - - free - - - - - - - Attributes - -
- - - - - - - - - - "width" - Read-Write - the desired width of the widget - - - - "height" - Read-Write - the desired height of the widget - - - - - -
- -
- - - Description - - A gtk.Requisition -holds the information about the desired space requirements (width and -height) of a widget. A gtk.Requisition -object has width and height attributes -that can be read and written. - - - There appears to be no way to create or use a gtk.Requisition -in PyGTK other than as an argument in the handler for the gtk.Widget "size-request" signal. - - - - - - Methods - - - gtk.Requisition.copy - - - copy - - - - Returns : - a copy of the gtk.Requisition - - - - The copy() method returns a copy of the -gtk.Requisition. - - - - - gtk.Requisition.free - - - free - - - - This method is deprecated and should not be used since it can - crash your application. - - - The free() method frees the resources -allocated to the gtk.Requisition. - - - - - -
diff --git a/docs/reference/pygtk-gtkruler.xml b/docs/reference/pygtk-gtkruler.xml deleted file mode 100644 index d5ce0e42..00000000 --- a/docs/reference/pygtk-gtkruler.xml +++ /dev/null @@ -1,308 +0,0 @@ - - - - - - gtk.Ruler - a base class for horizontal or vertical rulers - - - - Synopsis - - - gtk.Ruler - gtk.Widget - - set_metric - metric - - - set_range - lower - upper - position - max_size - - - draw_ticks - - - draw_pos - - - get_metric - - - get_range - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Ruler - - - - - - gtk.Ruler Properties - - gtk.Object Properties - gtk.Widget Properties - -
- - - - - - - - - "lower" - Read-Write - the lower limit of the ruler - - - - "max-size" - Read-Write - the maximum size of the ruler - - - - "metric" - Read-Write - The metric used for the ruler. This property is available - in GTK+ 2.8 and above. - - - - "position" - Read-Write - the position of the mark on the ruler - - - - "upper" - Read-Write - the upper limit of the ruler - - - - - -
- -
- - - gtk.Ruler Style Properties - - gtk.Widget Style Properties - - - - - gtk.Ruler Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - - - - Description - - - This widget is considered too specialized or little-used for -PyGTK and GTK+, and will in the future be moved to some other package. If -your application needs this widget, feel free to use it, as the widget does -work and is useful in some applications; it's just not of general interest. -However, it will eventually move out of the PyGTK and GTK+ -distribution. - - - The gtk.Ruler widget is a -base class for horizontal and vertical rulers. Rulers are used to show the -mouse pointer's location in a window. Within the ruler a small triangle -indicates the location of the mouse relative to the horizontal or vertical -ruler. See gtk.HRuler to learn -about horizontal rulers. See gtk.VRuler to learn -about vertical rulers. - - - - - Methods - - - gtk.Ruler.set_metric - - - set_metric - metric - - - - metric : - the measurement units - - - - The set_metric() method sets the -measurement units of the ruler to the value specified by -metric. Available units are -gtk.PIXELS, gtk.INCHES, or -gtk.CENTIMETERS. The default unit of measurement is -gtk.PIXELS. - - - - - gtk.Ruler.set_range - - - set_range - lower - upper - position - max_size - - - - lower : - the upper limit of the ruler - - - upper : - the lower limit of the ruler - - - position : - the position of the mark on the ruler - - - max_size : - the maximum size of the rule - - - - The set_range() method sets the range -of the ruler to the values specified by lower, -upper, position and -max_size (all values are floats). - - - - - gtk.Ruler.draw_ticks - - - draw_ticks - - - The draw_ticks() method is overridden -by the gtk.Ruler subclasses -(gtk.HRuler -and gtk.VRuler) to draw -the tick marks on the ruler. This method is not used by applications. - - - - - gtk.Ruler.draw_pos - - - draw_pos - - - The draw_pos() method is overridden by -the gtk.Ruler -subclasses (gtk.HRuler and gtk.VRuler) to draw -the position mark on the ruler. This method is not used by -applications. - - - - - gtk.Ruler.get_metric - - - get_metric - - - - Returns : - the measurement units currently used for the -ruler - - - - The get_metric() method returns the -units used for a gtk.Ruler. See the -set_metric() -method. - - - - - gtk.Ruler.get_range - - - get_range - - - - - Returns> : - a tuple containing: the lower limit of the -ruler, the upper limit of the ruler, the current position of the mark on the -ruler and the maximum size of the ruler used when calculating the space to -leave for the text. - - - - The get_range() method returns a tuple -containing the values indicating the range and current position of a gtk.Ruler. See the -set_range() -method. - - - - - -
diff --git a/docs/reference/pygtk-gtkscale.xml b/docs/reference/pygtk-gtkscale.xml deleted file mode 100644 index 2e077dbc..00000000 --- a/docs/reference/pygtk-gtkscale.xml +++ /dev/null @@ -1,455 +0,0 @@ - - - - - - gtk.Scale - a base class for the scale widgets. - - - - Synopsis - - - gtk.Scale - gtk.Range - - set_digits - digits - - - get_digits - - - - set_draw_value - draw_value - - - get_draw_value - - - - set_value_pos - pos - - - get_value_pos - - - - get_layout - - - get_layout_offsets - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Range - +-- gtk.Scale - - - - - - gtk.Scale Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Range Properties - -
- - - - - - - - - "digits" - Read-Write - The number of decimal places that are displayed in the -value - - - - "draw-value" - Read-Write - If True the current value is -displayed as a string next to the slider - - - - "value-pos" - Read-Write - The position in which the current value is displayed: -gtk.POS_LEFT, gtk.POS_RIGHT, -gtk.POS_TOP or gtk.POS_BOTTOM - - - - - -
- -
- - - gtk.Scale Style Properties - - gtk.Widget Style Properties - gtk.Range Style Properties - -
- - - - - - - - - "slider-length" - Read - The length of scale's slider - - - - "value-spacing" - Read - The space between value text and the slider or trough - area - - - - - -
- -
- - - gtk.Scale Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Range Signal Prototypes - - - - "format-value" - - callback - scale - user_param1 - ... - - - - - - - - - Description - - The gtk.Scale widget is -an abstract base class, used only for deriving the subclasses gtk.HScale and gtk.VScale. A gtk.Scale is a slider -control used to select a numeric value. Since gtk.Scale is a -subclass of gtk.Range, see the -gtk.Range -methods for additional methods. To set the value of a scale, you would -normally use set_value(). -To detect changes to the value, you would normally use the "value_changed" -signal. - - - - - Methods - - - gtk.Scale.set_digits - - - set_digits - digits - - - - digits : - the number of decimal places to -display - - - - The set_digits() method sets the -"digits" property to the value specified by digits. -The value of digits specifies the number of decimal -places that are displayed in the value. The value of the adjustment is also -rounded off to this number of digits if "draw-value" is -True, so the retrieved value matches the value the user -sees. If the "draw-value" property has been set to False -by using the set_draw_value() -method, the adjustment value will not be rounded at all. - - - - - gtk.Scale.get_digits - - - get_digits - - - - Returns : - the number of decimal places that are -displayed. - - - - The get_digits() method returns the -value of the "digits" property that indicates the number of decimal places -that are displayed in the value. - - - - - gtk.Scale.set_draw_value - - - set_draw_value - draw_value - - - - draw_value : - If True draw the current -value next to the slider - - - - The set_draw_value() method sets the -"draw-value" property to the value specified by -draw_value. If draw_value is -True the current value is displayed next to the -slider. - - - - - gtk.Scale.get_draw_value - - - get_draw_value - - - - Returns : - True if the current value is -to be drawn next to the slider - - - - The get_draw_value() method returns the -value of the "draw-value" property. If "draw-value" is -True the current scale value is drawn next to the -slider. - - - - - gtk.Scale.set_value_pos - - - set_value_pos - pos - - - - pos : - the position where the current value is -displayed. - - - - The set_value_pos() method sets the -value of the "value-pos" property to the value specified by -pos. The value of pos must be -one of: gtk.POS_LEFT, gtk.POS_RIGHT, -gtk.POS_TOP or gtk.POS_BOTTOM. - - - - - gtk.Scale.get_value_pos - - - get_value_pos - - - - Returns : - the position where the current value is -displayed. - - - - The get_value_pos() method returns the -value of the "value-pos" property. See the set_value_pos() -method. - - - - - gtk.Scale.get_layout - - - get_layout - - - - Returns : - the pango.Layout - for this scale or None if the draw_value - property is False. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_layout() method returns the -pango.Layout -used to display the scale. - - - - - gtk.Scale.get_layout_offsets - - - get_layout_offsets - - - - - Returns : - a 2-tuple containing the coordinates where the - scale will draw the pango.Layout - representing the text in the scale - - - - - This method is available in PyGTK 2.4 and above. - - - The get_layout_offsets() method returns -a 2-tuple containing the coordinates where the scale will draw the pango.Layout -representing the text in the scale. Remember when using the pango.Layout -function you need to convert to and from pixels using the pango.PIXELS() -function or pango.SCALE. If the "draw-value" property is -False, the return values are undefined. - - - - - - - Signals - - - The "format-value" gtk.Scale Signal - - - callback - scale - value - user_param1 - ... - - - - - scale : - the scale that received the -signal - - - value : - the value to be formatted - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - a string representing - value for display - - - - The "format-value" signal is emitted when the scale is being -redrawn with a value displayed. The "format-value" signal handler should -return a formatted string containing value. - - - - - -
diff --git a/docs/reference/pygtk-gtkscrollbar.xml b/docs/reference/pygtk-gtkscrollbar.xml deleted file mode 100644 index 2ccbce1f..00000000 --- a/docs/reference/pygtk-gtkscrollbar.xml +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - gtk.Scrollbar - a base class for scrollbar widgets. - - - - Synopsis - - - gtk.Scrollbar - gtk.Range - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Range - +-- gtk.Scrollbar - - - - - - gtk.Scrollbar Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Range Properties - - - - - gtk.Scrollbar Style Properties - - gtk.Widget Style Properties - gtk.Range Style Properties - -
- - - - - - - - - "fixed-slider-length" - Read - If True don't change the slider -size, just lock it to the minimum length - - - - "has-backward-stepper" - Read - If True display the standard -backward arrow button - - - - "has-forward-stepper" - Read - If True display the standard forward -arrow button - - - - "has-secondary-backward-stepper" - Read - If True display a second backward -arrow button on the opposite end of the scrollbar - - - - "has-secondary-forward-stepper" - Read - If True display a secondary forward -arrow button on the opposite end of the scrollbar - - - - min-slider-length"" - Read - The minimum length of scrollbar slider - - - - - -
- -
- - - gtk.Scrollbar Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Range Signal Prototypes - - - - Description - - The gtk.Scrollbar -widget is an abstract base class for gtk.HScrollbar -and gtk.VScrollbar. -The position of the thumb in a scrollbar is controlled by the scroll -adjustments. The gtk.Scrollbar uses the attributes in an adjustment (see gtk.Adjustment) as follows: - - - - the adjustment.lower attribute is the -minimum value of the scroll region - - - the adjustment.upper attribute is the -maximum value of the scroll region - - - the adjustment.value attribute -represents the position of the scrollbar, which must be between -adjustment.lower and adjustment.upper -- adjustment.page_size - - - the adjustment.page_size attribute -represents the size of the visible scrollable area - - - the adjustment.step_increment attribute -is the distance to scroll when the small stepper arrows are clicked - - - the adjustment.page_increment attribute -is the distance to scroll when the Page Up or Page -Down keys are pressed - - - - - -
diff --git a/docs/reference/pygtk-gtkscrolledwindow.xml b/docs/reference/pygtk-gtkscrolledwindow.xml deleted file mode 100644 index 44569704..00000000 --- a/docs/reference/pygtk-gtkscrolledwindow.xml +++ /dev/null @@ -1,1050 +0,0 @@ - - - - - - gtk.ScrolledWindow - adds scrollbars to its child widget. - - - - Synopsis - - - gtk.ScrolledWindow - gtk.Bin - - gtk.ScrolledWindow - hadjustmentNone - vadjustmentNone - - - set_hadjustment - hadjustment - - - set_vadjustment - vadjustment - - - get_hadjustment - - - - get_vadjustment - - - - get_hscrollbar - - - - get_vscrollbar - - - - set_policy - hscrollbar_policy - vscrollbar_policy - - - get_policy - hscrollbar_policy - vscrollbar_policy - - - set_placement - window_placement - - - get_placement - - - set_shadow_type - type - - - get_shadow_type - - - add_with_viewport - child - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.ScrolledWindow - - - - - - gtk.ScrolledWindow Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - -
- - - - - - - - - "hadjustment" - Read-Write-Construct - The gtk.Adjustment -for the horizontal position. - - - - hscrollbar-policy"" - Read-Write - The horizontal scrollbar display policy; one of: -gtk.POLICY_ALWAYS, -gtk.POLICY_AUTOMATIC or -gtk.POLICY_NEVER. - - - - "shadow-type" - Read-Write - The style of bevel around the contents; one of: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT. - - - - "vadjustment" - Read-Write-Construct - The gtk.Adjustment -for the vertical position. - - - - "vscrollbar-policy" - Read-Write - The vertical scrollbar display policy; one of: -gtk.POLICY_ALWAYS, -gtk.POLICY_AUTOMATIC or -gtk.POLICY_NEVER. - - - - "window-placement" - Read-Write - Where the contents are located with respect to the -scrollbars; one of: gtk.CORNER_TOP_LEFT, -gtk.CORNER_BOTTOM_LEFT, -gtk.CORNER_TOP_RIGHT, -gtk.CORNER_BOTTOM_RIGHT. - - - - "window-placement-set" - Read-Write - If True "window-placement" should be - used to determine the location of the contents with respect to the - scrollbars. - - - - - -
- -
- - - gtk.ScrolledWindow Style Properties - - gtk.Widget Style Properties - -
- - - - - - - - - "scrollbar-spacing" - Read - - The number of pixels between the scrollbars and the - scrolled window. Available in GTK+ 2.2 and - above. - - - - - -
- -
- - - gtk.ScrolledWindow Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - "move-focus-out" - - callback - scrolledwindow - direction - user_param1 - ... - - - - - "scroll-child" - - callback - scrolledwindow - scrolltype - horizontal - user_param1 - ... - - - - - - - - - Description - - A gtk.ScrolledWindow -is a subclass of gtk.Bin that adds -scrollbars to a single child widget and optionally draws a beveled frame -around the child widget. The scrolled window can work in two ways: - - - - Some widgets have native scrolling support using "slots" to -hold gtk.Adjustment -objects. Widgets with native scroll support include gtk.TreeView, -gtk.TextView, and -gtk.Layout. - - - Widgets that lack native scrolling support use the gtk.Viewport -widget that acts as an adapter class, implementing scrollability for child -widgets that lack their own scrolling capabilities. Use gtk.Viewport to -scroll child widgets such as gtk.Table, gtk.Box, and so -on. - - - - If a widget has native scrolling abilities, it can be added to the -gtk.ScrolledWindow -with the gtk.Container.add() -method. If a widget does not, you must first add the widget to a gtk.Viewport, then -add the gtk.Viewport to -the scrolled window. The convenience method add_with_viewport() -does exactly this, so you can ignore the presence of the viewport. - - The position of the scrollbars is controlled by the scroll -adjustments. The gtk.ScrolledWindow -uses the attributes in an adjustment (see gtk.Adjustment) -as follows: - - - - the adjustment.lower attribute is the -minimum value of the scroll region - - - the adjustment.upper attribute is the -maximum value of the scroll region - - - the adjustment.value attribute -represents the position of the scrollbar, which must be between -adjustment.lower and adjustment.upper -- adjustment.page_size - - - the adjustment.page_size attribute -represents the size of the visible scrollable area - - - the adjustment.step_increment attribute -is the distance to scroll when the small stepper arrows are -clicked - - - the adjustment.page_increment attribute -is the distance to scroll when the Page Up or Page -Down keys are pressed - - - - If a gtk.ScrolledWindow -doesn't behave quite as you would like, or doesn't have exactly the right -layout, it's very possible to set up your own scrolling with gtk.Scrollbar and -for example a gtk.Table. - - - - - Constructor - - - gtk.ScrolledWindow - hadjustment - None - vadjustment - None - - - - hadjustment : - the horizontal gtk.Adjustment -or None - - - vadjustment : a -vertical gtk.Adjustment -or None - - - Returns : - a new gtk.ScrolledWindow -widget - - - - Creates a new scrolled window with the horizontal and vertical -gtk.Adjustment -specified by hadjustment and -vadjustment respectively. These will be shared with -the scrollbars and the child widget to keep the bars in sync with the child. -If hadjustment and vadjustment -are None or not specified the scrolled window will create -them for you. - - - - - Methods - - - gtk.ScrolledWindow.set_hadjustment - - - set_hadjustment - hadjustment - - - - hadjustment : - the horizontal gtk.Adjustment - - - - The set_hadjustment() method sets the -horizontal adjustment (and the "hadjustment" property) to the value of -hadjustment. hadjustment must -be a gtk.Adjustment. - - - - - gtk.ScrolledWindow.set_vadjustment - - - set_vadjustment - vadjustment - - - - vadjustment : - the vertical gtk.Adjustment - - - - The set_vadjustment() method sets the -vertical adjustment (and the "vadjustment" property) to the value of -vadjustment. vadjustment must -be a gtk.Adjustment. - - - - - gtk.ScrolledWindow.get_hadjustment - - - get_hadjustment - - - - Returns : - the horizontal gtk.Adjustment - - - - The get_hadjustment() method returns -the value of the "hadjustment" property which is a reference to the -horizontal adjustment. - - - - - gtk.ScrolledWindow.get_vadjustment - - - get_vadjustment - - - - Returns : - the vertical gtk.Adjustment - - - - The get_vadjustment() method returns -the value of the "vadjustment" property which is a reference to the vertical -adjustment. - - - - - gtk.ScrolledWindow.get_hscrollbar - - - get_hscrollbar - - - - - Returns : - The horizontal scrollbar of the scrolled window -or None if it does not exist. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_hscrollbar() method returns the -gtk.HScrollbar -for the scrolled window or None if there is no horizontal -scrollbar. - - - - - gtk.ScrolledWindow.get_vscrollbar - - - get_vscrollbar - - - - Returns : - The vertical scrollbar of the scrolled window -or None if it does not exist. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_vscrollbar() method returns the -gtk.VScrollbar -for the scrolled window or None if there is no vertical -scrollbar. - - - - - gtk.ScrolledWindow.set_policy - - - set_policy - hscrollbar_policy - vscrollbar_policy - - - - hscrollbar_policy : - the policy for the horizontal -scrollbar - - - vscrollbar_policy : - the policy for the vertical -scrollbar - - - - The set_policy() method sets the -"hscrollbar_policy" and "vscrollbar_policy" properties to the value of -hscrollbar_policy and -vscrollbar_policy respectively. The policy determines -when the scrollbar should be displayed. The policy value is one of: - - - - gtk.POLICY_ALWAYS - - the scrollbar is always present - - - - gtk.POLICY_AUTOMATIC - - the scrollbar is present only if needed i.e. the -contents are larget than the window - - - - gtk.POLICY_NEVER - - the scrollbar is never present - - - - - - - - - - gtk.ScrolledWindow.get_policy - - - get_policy - - - - - Returns> : - a tuple containing the horizontal and vertical -scrollbar policies - - - - The get_policy() method returns a tuple -containing the horizontal and vertical scrollbar policies. See the set_policy() method for more detail. - - - - - gtk.ScrolledWindow.set_placement - - - set_placement - window_placement - - - - window_placement : - the placement of the contents with respect to -the scrollbars - - - - The set_placement() method sets the -"window-placement" property to the value specified by -window_placement. The window placement determines the -location of the child widget with respect to the scrollbars. -window_placement must be one of: - - - - gtk.CORNER_TOP_LEFT - - Place the scrollbars on the right and bottom of the -widget (default behavior). - - - - gtk.CORNER_BOTTOM_LEFT - - Place the scrollbars on the top and right of the -widget. - - - - gtk.CORNER_TOP_RIGHT - - Place the scrollbars on the left and bottom of the -widget. - - - - gtk.CORNER_BOTTOM_RIGHT - - Place the scrollbars on the top and left of the -widget. - - - - - - - - - - gtk.ScrolledWindow.get_placement - - - get_placement - - - - Returns : - the current placement -value. - - - - The get_placement() method returns the -value of the "window-placement" property that determines the placement of -the scrollbars with respect to the scrolled window. See the set_placement() -method for more detail. - - - - - gtk.ScrolledWindow.set_shadow_type - - - set_shadow_type - type - - - - type : - the kind of bevel shadow to draw around the -scrolled window contents - - - - The set_shadow_type() method sets the -value of the "shadow-type" property to the value of -shadow_type. shadow_type -determines the type of bevel shadow drawn around the contents of the -scrolled window. The shadow type must be one of: - - - - gtk.SHADOW_NONE - - No outline. - - - - gtk.SHADOW_IN - - The outline is beveled inward. - - - - gtk.SHADOW_OUT - - The outline is beveled outward. - - - - gtk.SHADOW_ETCHED_IN - - The outline is an inward etched bevel. - - - - gtk.SHADOW_ETCHED_OUT - - The outline is an outward etched bevel. - - - - - - - - - - gtk.ScrolledWindow.get_shadow_type - - - get_shadow_type - - - - Returns : - the current shadow type - - - - The get_shadow_type() method returns -the value of the "shadow-type" property that determines the shadow type of -the scrolled window. See the set_shadow_type() -method for more detail. - - - - - gtk.ScrolledWindow.add_with_viewport - - - add_with_viewport - child - - - - child : - the widget to be scrolled - - - - The add_with_viewport() method is used -to add a widget (specified by child) without native -scrolling capabilities to the scrolled window. This is a convenience -function that is equivalent to adding child to a -gtk.Viewport, then -adding the viewport to the scrolled window. If a child has native scrolling -(e.g. gtk.TextView, -gtk.TreeView, -gtk.Layout), -use gtk.Container.add() -instead of this method. - - The viewport scrolls the child by moving its gtk.gdk.Window, -and takes the size of the child to be the size of its toplevel gtk.gdk.Window. -This will be wrong for most widgets that support native scrolling. For -example, if you add a widget such as gtk.TreeView with -a viewport, the whole widget will scroll, including the column -headings. - - - - - - - Signals - - - The "move-focus-out" gtk.ScrolledWindow Signal - - - callback - scrolledwindow - direction - user_param1 - ... - - - - - scrolledwindow : - the scrolledwindow that received the -signal - - - direction : - the direction that the focus is moving either -gtk.DIR_TAB_FORWARD or -gtk.DIR_TAB_BACKWARD. - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "move-focus-out" signal is emitted when the user presses -ControlTab - or ControlShiftTab - to move the focus out of the scrolled window. The -direction is either -gtk.DIR_TAB_FORWARD or -gtk.DIR_TAB_BACKWARD - - - - - The "scroll-child" gtk.ScrolledWindow Signal - - - callback - scrolledwindow - scrolltype - horizontal - user_param1 - ... - - - - - scrolledwindow : - the scrolledwindow that received the -signal - - - scrolltype : - the scroll type; one of: -gtk.SCROLL_STEP_BACKWARD, -gtk.SCROLL_STEP_FORWARD, -gtk.SCROLL_PAGE_BACKWARD, -gtk.SCROLL_PAGE_FORWARD, -gtk.SCROLL_PAGE_UP, -gtk.SCROLL_PAGE_DOWN, gtk.SCROLL_START -or gtk.SCROLL_END. - - - horizontal : - if True scroll in the horizontal -direction - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "scroll-child" signal is emitted when the child widget is -being scrolled by a keyboard action. The default key bindings with resulting -scrolltype and horizontal -arguments are: - - - - Control - Left Arrow - - - gtk.SCROLL_STEP_BACKWARD - -horizontal - - - - Control - Right Arrow - - - gtk.SCROLL_STEP_FORWARD - -horizontal - - - - Control - Up Arrow - - - gtk.SCROLL_STEP_BACKWARD - -vertical - - - - Control - Down Arrow - - - gtk.SCROLL_STEP_FORWARD - -vertical - - - - Control - Page Up - - - gtk.SCROLL_PAGE_BACKWARD - -horizontal - - - - Control - Page Down - - - gtk.SCROLL_PAGE_FORWARD - -horizontal - - - - Page Up - - - gtk.SCROLL_PAGE_BACKWARD - -vertical - - - - Page Down - - - gtk.SCROLL_PAGE_FORWARD - -vertical - - - - Control - Home - - - gtk.SCROLL_START - -horizontal - - - - Control - End - - - gtk.SCROLL_END - -horizontal - - - - Home - - - gtk.SCROLL_START - -vertical - - - - End - - - gtk.SCROLL_END - vertical - - - - - - - - - - -
diff --git a/docs/reference/pygtk-gtkselectiondata.xml b/docs/reference/pygtk-gtkselectiondata.xml deleted file mode 100644 index 5fa5e4d8..00000000 --- a/docs/reference/pygtk-gtkselectiondata.xml +++ /dev/null @@ -1,1027 +0,0 @@ - - - - - - gtk.SelectionData - an object that stores information about a -selection - - - - Synopsis - - - gtk.SelectionData - gobject.GBoxed - - set - type - format - data - - - set_text - str - len - - - get_text - - - - get_targets - - - - targets_include_text - - - tree_set_row_drag_data - tree_model - path - - - tree_get_row_drag_data - - - - set_pixbuf - pixbuf - - - get_pixbuf - - - - set_uris - uris - - - get_uris - - - - targets_include_image - writable - - - targets_include_rich_text - buffer - - - targets_include_uri - - - - - -Functions - - - gtk.selection_owner_set_for_display - display - widget - selection - time0 - - gtk.target_list_add_image_targets - listNone - info0 - writableFalse - - gtk.target_list_add_text_targets - listNone - info0 - - gtk.target_list_add_uri_targets - listNone - info0 - - gtk.target_list_add_rich_text_targets - list - info - deserializable - buffer - - gtk.targets_include_image - targets - writable - - gtk.targets_include_rich_text - targets - buffer - - gtk.targets_include_text - targets - - gtk.targets_include_uri - targets - - - - - - - Attributes - -
- - - - - - - - - - "selection" - Read - A gtk.gdk.Atom indicating the selection type (e.g. "PRIMARY"). - - - - "target" - Read - A gtk.gdk.Atom indicating the selection target type (e.g. "TARGETS"). - - - - "type" - Read - A gtk.gdk.Atom indicating the selection data type (e.g. "STRING"). - - - - "format" - Read - The unit length of the data in bits (e.g. 8 for a -string or 32 of an integer). - - - - "data" - Read - The data as a string. - - - - - -
- -
- - - Description - - A gtk.SelectionData -object is used to store information about a chunk of data associated with a -selection. In PyGTK the selection data is always a string so the application -will have to provide functions to convert the data to and from a string to -support data types other than strings and targets. The string and targets -types are directly supported using the set_text(), -get_text() -and get_targets() -methods. - - - - - Methods - - - gtk.SelectionData.set - - - set - type - format - data - - - - type : - a gtk.gdk.Atom or string -that specifies a gtk.gdk.Atom - - - format : - the number of bits in a -unit - - - data : - a string containing the -data - - - - The set() method sets the data for a -selection in the gtk.SelectionData -object. data is a string containing the data to be -set; format is the number of bits in a unit of the -data (e.g. integer data has a format of 32 on most systems; string data -format is 8); and, type is a gtk.gdk.Atom or a -string that specifies a gtk.gdk.Atom. - - - - - gtk.SelectionData.set_text - - - set_text - str - len - - - - str : - a string - - - len : - the length of str, or -1 -if str for the full length. - - - Returns : - True, if the selection was -successfully set; otherwise, False. - - - - The set_text() method sets the contents -of the selection from the string specified by str. -The string is converted to the form specified by the -selection_data.target attribute. This method returns True -if the selection data was successfully set. - - - - - gtk.SelectionData.get_text - - - get_text - - - - Returns : - a string containing the converted text, or -None. - - - - The get_text() method returns the -contents of the selection data as a string. - - - - - gtk.SelectionData.get_targets - - - get_targets - - - - - Returns : - a tuple containing a list of targets (gtk.gdk.Atoms) or -None if no valid targets are -available. - - - - The get_targets() method returns a -tuple containing a list of valid targets for the selection as a list of -gtk.gdk.Atoms or -None if there are no valid targets. - - - - - gtk.SelectionData.targets_include_text - - - targets_include_text - - - - Returns : - True if the selection data -holds a list of targets, and a suitable target for text is -included. - - - - The targets_include_text() method -returns True if any of the selection data targets can be -used to provide text. - - - - - gtk.SelectionData.tree_set_row_drag_data - - - tree_set_row_drag_data - tree_model - path - - - - tree_model : - a gtk.TreeModel - - - path : - a row in -tree_model - - - Returns : - True if the gtk.SelectionData -had the proper target type to allow us to set a tree -row - - - - The tree_set_row_drag_data() method -sets the selection data of target type GTK_TREE_MODEL_ROW -for the row (specified by path) in the gtk.TreeModel -(specified by tree_model). Normally used in a "drag-data-get" signal -handler. - - - - - gtk.SelectionData.tree_get_row_drag_data - - - tree_get_row_drag_data - - - - - Returns : - a tuple containing a gtk.TreeModel and -one of its rows. - - - - The tree_get_row_drag_data() method -returns a tuple containing a gtk.TreeModel and -a row from that gtk.TreeModel -from selection data of target type GTK_TREE_MODEL_ROW. -Normally called from a "drag-data-received" -signal handler. This method can only be used if the selection data -originates from the same process that's calling this method, because a -pointer to the tree model is being passed around. In the "drag-data-received" -signal handler, you can assume that selection data of type -"GTK_TREE_MODEL_ROW" is from the current process. - - - - - gtk.SelectionData.set_pixbuf - - - set_pixbuf - pixbuf - - - - pixbuf : - a gtk.gdk.Pixbuf - - - Returns : - True, if the selection was -successfully set; otherwise, False. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_pixbuf() method sets the -contents of the selection from the gtk.gdk.Pixbuf -specified by pixbuf. This method returns -True if the selection data was successfully set. - - - - - gtk.SelectionData.get_pixbuf - - - get_pixbuf - - - - - Returns : - if the selection data contained a recognized -image type and it could be converted to a gtk.gdk.Pixbuf, a -newly allocated pixbuf is returned, or -None. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_pixbuf() method returns the -contents of the selection data as a gtk.gdk.Pixbuf if -possible. - - - - - gtk.SelectionData.set_uris - - - set_uris - uris - - - - uris : - a list of strings holding -URIs - - - Returns : - True, if the selection was -successfully set; otherwise, False. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_uris() method sets the contents -of the selection from the list of URIs specified by -uris. This method returns True if -the selection data was successfully set. - - - - - gtk.SelectionData.get_uris - - - get_uris - - - - - Returns : - a list of URIs, or -None. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_uris() method returns the -contents of the selection data as a list of URIs. - - - - - gtk.SelectionData.targets_include_image - - - targets_include_image - writable - - - - writable : - If True only accept targets -that GTK+ can convert a gtk.gdk.Pixbuf -to. - - - Returns : - True, if the selection has a -list of targets that includes an image target. - - - - - This method is available in PyGTK 2.6 and above. - - - The targets_include_image() method -returns True if the selection targets include an image -target. - - - - - gtk.SelectionData.targets_include_rich_text - - - targets_include_rich_text - buffer - - - - - buffer : - a gtk.TextBuffer - - - Returns : - True if a suitable target - for rich text is included in the selectiondata - targets. - - - - - This method is available in PyGTK 2.10 and above. - - - Determines if any of the selectiondata targets can be used to - provide rich text. - - - - - gtk.SelectionData.targets_include_uri - - - targets_include_uri - - - - - - Returns : - True if a suitable target - for uris is included in the selectiondata - targets. - - - - - This method is available in PyGTK 2.10 and above. - - - Determines if any of the selectiondata targets can be used to - provide a list of URIs. - - - - - - - Functions - - - gtk.selection_owner_set_for_display - - - gtk.selection_owner_set_for_display - display - widget - selection - time0 - - - - display : - the gtk.gdk.Display - where the selection is set - - - widget : - the new selection owner (a gtk.Widget), - or None. - - - selection : - a gtk.gdk.Atom - or string representing a selection target - - - time : - the timestamp used to claim the - selection - - - Returns : - True if the operation - succeeded - - - - The gtk.selection_owner_set_for_display() -function claims ownership of the selection specified by -selection for the widget specified by -widget on the gtk.gdk.Display -specified by display. If -widget is None, the ownership of -the selection is released. - - - - - gtk.target_list_add_image_targets - - - gtk.target_list_add_image_targets - listNone - info0 - writableFalse - - - - list : - A sequence of target entry tuples or -None - - - info : - an application specified ID that will be -passed back to the application - - - writable : - If True, only add targets -for image formats that a pixbuf can be converted to. - - - Returns : - a new list concatenating -list and the built-in image targets supported by -gtk.SelectionData. - - - - - This function is available in PyGTK 2.6 and above. - - - The gtk.target_list_add_image_targets() -function adds the image target tuples supported by gtk.SelectionData -to the list of target entry tuples specified by -list. info is used as the info -field of the target entry tuples. - - - - - gtk.target_list_add_text_targets - - - gtk.target_list_add_text_targets - listNone - info0 - - - - list : - A sequence of target entry tuples or -None - - - info : - an application specified ID that will be -passed back to the application - - - Returns : - a new list concatenating -list and the built-in text targets supported by -gtk.SelectionData. - - - - - This function is available in PyGTK 2.6 and above. - - - The gtk.target_list_add_text_targets() -function adds the text target tuples supported by gtk.SelectionData -to the list of target entry tuples specified by -list. info is used as the info -field of the target entry tuples. - - - - - gtk.target_list_add_uri_targets - - - gtk.target_list_add_uri_targets - listNone - info0 - - - - list : - A sequence of target entry tuples or -None - - - info : - an application specified ID that will be -passed back to the application - - - Returns : - a new list concatenating -list and the built-in URI targets supported by -gtk.SelectionData. - - - - - This function is available in PyGTK 2.6 and above. - - - The gtk.target_list_add_uri_targets() -function adds the URI target tuples supported by gtk.SelectionData -to the list of target entry tuple specified by -list. info is used as the info -field of the target entry tuples. - - - - - gtk.targets_include_uri - - - gtk.targets_include_uri - targets - - - - targets : - a list of target strings - - - Returns : - True if targets includes a - uri target. - - - - - This function is available in PyGTK 2.10 and above. - - - Determines if any of the targets in - targets can be used to provide an uri - list. - - - - - gtk.targets_include_text - - - gtk.targets_include_text - targets - - - - targets : - a list of target strings - - - Returns : - True if targets includes a - text target. - - - - - This function is available in PyGTK 2.10 and above. - - - Determines if any of the targets in - targets can be used to provide text. - - - - - gtk.targets_include_rich_text - - - gtk.targets_include_rich_text - targets - buffer - - - - targets : - a list of target strings - - - buffer : - a gtk.TextBuffer - - - Returns : - - - - - - This function is available in PyGTK 2.10 and above. - - - Determines if any of the targets in - targets can be used to provide rich - text. - - - - - gtk.targets_include_image - - - gtk.targets_include_image - targets - writable - - - - targets : - a list of target strings - - - writable : - if True accept only targets - for which GTK+ knows how to convert a pixbuf into the - format - - - Returns : - True if - targets include a suitable target for - images - - - - - This function is available in PyGTK 2.10 and above. - - - Determines if any of the targets in targets can be used to - provide a gtk.gdk.Pixbuf. - - - - - gtk.target_list_add_rich_text_targets - - - gtk.target_list_add_rich_text_targets - list - info - deserializable - buffer - - - - list : - a list of targets - - - info : - an ID that will be passed back to the - application - - - deserializable : - if True, deserializable rich - text formats will be added, otherwise, serializable formats will - be added. - - - buffer : - a gtk.TextBuffer - - - Returns : - a target list with the rich text targets - registered with buffer appended to - list. - - - - - This function is available in PyGTK 2.10 and above. - - - Appends the rich text targets registered with the register_serialize_format() - or register_deserialize_format() - methods to the target list. All targets are added with the same - info. - -list - - - - - -
diff --git a/docs/reference/pygtk-gtkseparator.xml b/docs/reference/pygtk-gtkseparator.xml deleted file mode 100644 index 23fad7e0..00000000 --- a/docs/reference/pygtk-gtkseparator.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - gtk.Separator - a base class for visual separator widgets. - - - - Synopsis - - - gtk.Separator - gtk.Widget - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Separator - - - - - - gtk.Separator Properties - - gtk.Object Properties - gtk.Widget Properties - - - - - gtk.Separator Style Properties - - gtk.Widget Style Properties - - - - - gtk.Separator Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - - - - Description - - The gtk.Separator -widget is an abstract base class, used only for deriving the subclasses -gtk.HSeparator -and gtk.VSeparator. -A separator is a visual delimiter between widgets. - - - - diff --git a/docs/reference/pygtk-gtkseparatormenuitem.xml b/docs/reference/pygtk-gtkseparatormenuitem.xml deleted file mode 100644 index e91c2b97..00000000 --- a/docs/reference/pygtk-gtkseparatormenuitem.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - gtk.SeparatorMenuItem - a separator used in menus. - - - - Synopsis - - - gtk.SeparatorMenuItem - gtk.MenuItem - - gtk.SeparatorMenuItem - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Item - +-- gtk.MenuItem - +-- gtk.SeparatorMenuItem - - - - - - gtk.SeparatorMenuItem Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - - - - - gtk.SeparatorMenuItem Style Properties - - gtk.Widget Style Properties - gtk.MenuItem Style Properties - - - - - gtk.SeparatorMenuItem Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Item Signal Prototypes - gtk.MenuItem Signal Prototypes - - - - Description - - The gtk.SeparatorMenuItem -is a separator used to group items within a menu. It displays a horizontal -line with a shadow to make it appear sunken into the interface. - - - - - Constructor - - - gtk.SeparatorMenuItem - - - - Returns : - a new gtk.SeparatorMenuItem -widget - - - - Creates a new gtk.SeparatorMenuItem -widget. - - - - diff --git a/docs/reference/pygtk-gtkseparatortoolitem.xml b/docs/reference/pygtk-gtkseparatortoolitem.xml deleted file mode 100644 index be81a5f0..00000000 --- a/docs/reference/pygtk-gtkseparatortoolitem.xml +++ /dev/null @@ -1,212 +0,0 @@ - - - - - gtk.SeparatorToolItem - a toolbar item that separates groups of other toolbar -items (new in PyGTK 2.4) - - - - Synopsis - - - gtk.SeparatorToolItem - gtk.ToolItem - - gtk.SeparatorToolItem - - - get_draw - - - set_draw - draw - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.ToolItem - +-- gtk.SeparatorToolItem - - - - - - gtk.SeparatorToolItem Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.ToolItem Properties - -
- - - - - - - - - "draw" - Read-Write - - If True, the separator is - drawn. Available in GTK+ 2.4. - - - - - -
- -
- - - gtk.SeparatorToolItem Style Properties - - gtk.Widget Style Properties - - - - - gtk.SeparatorToolItem Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.ToolItem Signal Prototypes - - - - Description - - - This widget is available in PyGTK 2.4 and above. - - - A gtk.SeparatorToolItem -is a gtk.ToolItem that -separates groups of other gtk.ToolItem -objects. Depending on the theme, a gtk.SeparatorToolItem -will often look like a vertical line on horizontally docked toolbars. - - If the gtk.SeparatorToolItem -is set to expand (using the gtk.ToolItem.set_expand() -method) and the "draw" property is False, a gtk.SeparatorToolItem -will act as a "spring" that forces other items to the ends of the -toolbar. - - - - - Constructor - - - gtk.SeparatorToolItem - - - - - Returns : - the new gtk.SeparatorToolItem - -Since: 2.4 - - - - - This constructor is available in PyGTK 2.4 and above. - - - Create a new gtk.SeparatorToolItem - - - - - Methods - - - gtk.SeparatorToolItem.get_draw - - - get_draw - - - - - Returns : - True if - separator_tool_item is drawn as a line, or - just blank. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_draw() method returns -True if the separator tool item is drawn as a line or -False, if it's just blank. See the set_draw() -method. - - - - - gtk.SeparatorToolItem.set_draw - - - set_draw - draw - - - - draw : - if True the gtk.SeparatorToolItem - is drawn as a vertical line - - - - - This method is available in PyGTK 2.4 and above. - - - The set_draw() method sets the "draw" -property to the value of draw. If -draw is True the gtk.SeparatorToolItem -is drawn as a vertical line; if False, just blank. -Setting the "draw" property to False along with passing -True to the gtk.ToolItem.set_expand() -is useful to create an item that forces following items to the end of the -toolbar. - - - - - -
diff --git a/docs/reference/pygtk-gtksettings.xml b/docs/reference/pygtk-gtksettings.xml deleted file mode 100644 index b94b7436..00000000 --- a/docs/reference/pygtk-gtksettings.xml +++ /dev/null @@ -1,740 +0,0 @@ - - - - - - gtk.Settings - an object that contains the global settings for the -widgets on a gtk.gdk.Screen - - - - Synopsis - - - gtk.Settings - gobject.GObject - - - - - set_string_property - name - v_string - origin - - - set_long_property - name - v_long - origin - - - set_double_property - name - v_double - origin - - - - -Functions - - - gtk.settings_get_default - - - gtk.settings_get_for_screen - screen - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Settings - - - - - - gtk.Settings Properties - -
- - - - - - - - - "color-hash" - Read - Holds a hash table representation of the - gtk-color-scheme setting, mapping color names to gtk.gdk.Colors. - This property is available in GTK+ 2.10 and above. - - - - "gtk-alternative-button-order" - Read-Write - If True, buttons in dialogs should -use the alternative button order. Available in GTK+ 2.6 and above. Default -value: False - - - - "gtk-button-images" - Read-Write - If True, stock icons should be shown -in buttons. Available in GTK+ 2.4 and above. -Default value: True - - - - "gtk-can-change-accels" - Read-Write - If True, the menu accelerators can -be changed by pressing a key over the menu item. Default -value: False - - - - "gtk-color-palette" - Read-Write - The palette to use in the color selector. -Default value: "black:white:gray50:red:purple:blue:light blue:green:yellow:orange:lavender:brown:goldenrod4:dodger blue:pink:light green:gray10:gray30:gray75:gray90" - - - - "gtk-color-scheme" - Read-Write - A palette of named colors for use in themes. The format of - the string is: - -name1: color1 -name2: color2 -... - -Color names must be acceptable as identifiers in the gtk.RcStyle syntax, -and color specifications must be in the format accepted by the gtk.gdk.color_parse() -function. Note that due to the way the color tables from different sources -are merged, color specifications will be converted to hexadecimal form when -getting this property. Default value: ''. This property is available in -GTK+ 2.10 and above. - - - - "gtk-cursor-blink" - Read-Write - If True, the cursor should -blink. Default value: True - - - - "gtk-cursor-blink-time" - Read-Write - The length of the cursor blink cycle, in -milliseconds. Allowed values: >= 100. Default value: 1200 - - - - "gtk-cursor-theme-name" - Read-Write - Name of the cursor theme to use, or - None to use the default theme. Default - value: None - - - - "gtk-cursor-theme-size" - Read-Write - Size to use for cursors, or 0 to use the default - size. Allowed values: [0,128]. Default value: 0. - - - - "gtk-dnd-drag-threshold" - Read-Write - The number of pixels the cursor can move before -dragging starts. Allowed values: >= 1. Default value: 8 - - - - "gtk-double-click-distance" - Read-Write - The maximum distance allowed between two clicks for -them to be considered a double click (in pixels). Available in GTK+ 2.4 -and above. Allowed values: >= 0. Default value: 5 - - - - "gtk-double-click-time" - Read-Write - The maximum time allowed between two clicks for them to -be considered a double click (in milliseconds). Allowed values: >= 0. -Default value: 250 - - - - "gtk-enable-animations" - Read-Write - If True enable toolkit-wide - animations. Default value: True. - - - - "gtk-entry-password-hint-timeout" - Read-Write - How long to show the last input character in hidden - entries. This value is in milliseconds. 0 disables showing the - last char. 600 is a good value for enabling it. Default value: - 0. This property is available in GTK+ 2.10 and above. - - - - "gtk-entry-select-on-focus" - Read-Write - If True, select the contents of an -entry when it is focused. Default value: True - - - - "gtk-fallback-icon-theme" - Read-Write - Name of a icon theme to fall back to. Default value: - None. - - - - "gtk-font-name" - Read-Write - The name of the default font to use. -Default value: "Sans 10" - - - - "gtk-icon-sizes" - Read-Write - The list of icon sizes -(gtk-menu=16,16;gtk-button=20,20...). -Default value: None - - - - "gtk-icon-theme-name" - Read-Write - The name of the icon theme to use. Available in -GTK+ 2.4 and above. Default value: "hicolor" - - - - "gtk-key-theme-name" - Read-Write - The name of the key theme RC file to load. -Default value: None - - - - "gtk-label-select-on-focus" - Read-Write - If True select the contents of a - selectable label when it is focused. Default value: - True. - - - - "gtk-menu-bar-accel" - Read-Write - The keybinding to activate the menu bar. Default - value: "F10" - - - - "gtk-menu-bar-popup-delay" - Read-Write - The delay before the submenus of a menu bar appear. - Allowed values: >= 0. Default value: 0 Available in GTK+ 2.2 - and above. - - - - "gtk-menu-images" - Read-Write - If True images should be shown in - menus. Default value: True. Available in - GTK+ 2.4 and above. - - - - "gtk-menu-popdown-delay" - Read-Write - The time before hiding a submenu when the pointer is - moving toward the submenu. Allowed values: >= 0. Default - value: 1000. Available in GTK+ 2.2 and above. - - - - "gtk-menu-popup-delay" - Read-Write - Minimum time the pointer must stay over a menu item - before the submenu appears. Allowed values: >= 0. Default - value: 225. Available in GTK+ 2.2 and above. - - - - "gtk-modules" - Read-Write - The list of currently active GTK modules. Default - value: None. Available in GTK+ 2.6 and - above. - - - - "gtk-scrolled-window-placement" - Read-Write - Where the contents of scrolled windows are located with - respect to the scrollbars, if not overridden by the scrolled - window's own placement. Default value: - gtk.CORNER_TOP_LEFT. - - - - "gtk-show-input-method-menu" - Read-Write - If True the context menus of entries - and text views should offer to change the input - method. Default value: True. - - - - "gtk-show-unicode-menu" - Read-Write - If True the context menus of entries - and text views should offer to insert control - characters. Default value: True. - - - - "gtk-split-cursor" - Read-Write - If True, two cursors should be - displayed for mixed left-to-right and right-to-left text. - Default value: True - - - - "gtk-theme-name" - Read-Write - The name of the theme RC file to load. Default value: - "Raleigh" - - - - "gtk-timeout-expand" - Read-Write - Expand value for timeouts, when a widget is expanding a - new region. Allowed values: >= 0. Default value: 500. - - - - "gtk-timeout-initial" - Read-Write - Starting value for timeouts, when button is - pressed. Allowed values: >= 0. Default value: 200. - - - - "gtk-timeout-repeat" - Read-Write - Repeat value for timeouts, when button is - pressed. Allowed values: >= 0. Default value: 20. - - - - "gtk-toolbar-icon-size" - Read-Write - the toolbar icon size - one of: - gtk.ICON_SIZE_MENU, - gtk.ICON_SIZE_SMALL_TOOLBAR, - gtk.ICON_SIZE_LARGE_TOOLBAR, - gtk.ICON_SIZE_BUTTON, - gtk.ICON_SIZE_DND or - gtk.ICON_SIZE_DIALOG. Default value: - gtk.ICON_SIZE_LARGE_TOOLBAR. - - - - "gtk-toolbar-style" - Read-Write - The toolbar display style - one of: - gtk.TOOLBAR_ICONS, - gtk.TOOLBAR_TEXT, - gtk.TOOLBAR_BOTH or - gtk.TOOLBAR_BOTH_HORIZ. Default value: - gtk.TOOLBAR_BOTH - - - - "gtk-touchscreen-mode" - Read-Write - When True, there are no motion notify events delivered - on this screen, and widgets can't use the pointer hovering - them for any essential functionality. Default value: - False. This property is available in GTK+ - 2.10 and above. - - - - "gtk-xft-antialias" - Read-Write - Whether to antialias Xft fonts; 0=no, 1=yes, - -1=default. Default value: -1. Available in GTK+ 2.4 and - above. - - - - "gtk-xft-dpi" - Read-Write - Resolution for Xft, in 1024 * dots/inch. -1 to use - default value. Allowed values: [-1,1048576]. Default value: - -1. Available in GTK+ 2.4 and above. - - - - "gtk-xft-hinting" - Read-Write - Whether to hint Xft fonts; 0=no, 1=yes, -1=default. - Default value: -1. Available in GTK+ 2.4 and above. - - - - "gtk-xft-hintstyle" - Read-Write - What degree of hinting to use; none, slight, medium, or - full. Default value: None. Available in - GTK+ 2.4 and above. - - - - "gtk-xft-rgba" - Read-Write - Type of subpixel antialiasing; none, rgb, bgr, vrgb, - vbgr. Default value: None. Available in - GTK+ 2.4 and above. - - - - - -
- -
- - - Description - - The gtk.Settings -object stores the values of the global settings associated with a gtk.gdk.Screen. The -gtk.Settings -object for the default gtk.gdk.Screen can -be retrieved using the gtk.settings_get_default() -function. The gtk.Widget.get_settings() -method returns the gtk.Settings -object of the gtk.gdk.Screen that -the widget is displayed on. - - - - - Methods - - - - - gtk.Settings.set_string_property - - - set_string_property - name - v_string - origin - - - - name : - the name of the property to -set - - - v_string : - the string value - - - origin : - the string value of the -origin - - - - The set_string_property() method sets -the property named name to the string value specified -by v_string at the string origin specified by -origin. origin is an -application specified string like "filename:linenumber" or -"myapp:widgetname". - - - - - gtk.Settings.set_long_property - - - set_long_property - name - v_long - origin - - - - name : - the name of the property to -set - - - v_long : - the long value - - - origin : - the string value of the -origin - - - - The set_long_property() method sets the -property named name to the long value specified by -v_long at the string origin specified by -origin. origin is an -application specified string like "filename:linenumber" or -"myapp:widgetname". - - - - - gtk.Settings.set_double_property - - - set_double_property - name - v_double - origin - - - - name : - the name of the property to -set - - - v_double : - the double value - - - origin : - the string value of the -origin - - - - The set_double_property() method sets -the property named name to the double value specified -by v_long at the string origin specified by -origin. origin is an -application specified string like "filename:linenumber" or -"myapp:widgetname". - - - - - - - Functions - - - gtk.settings_get_default - - - gtk.settings_get_default - - - - - - Returns : - the singleton gtk.Settings -object - - - - The gtk.settings_get_default function -returns the singleton gtk.Settings -object. - - - - - gtk.settings_get_for_screen - - - gtk.settings_get_for_screen - screen - - - - - screen : - a gtk.gdk.Screen - object - - - Returns : - a gtk.Settings - object - - - - - This function is available in PyGTK 2.2 and above. - - - The gtk.settings_get_for_screen() function -returns the singleton gtk.Settings -object for the gtk.gdk.Screen -specified by screen. - - - - - -
diff --git a/docs/reference/pygtk-gtksizegroup.xml b/docs/reference/pygtk-gtksizegroup.xml deleted file mode 100644 index 73ae329f..00000000 --- a/docs/reference/pygtk-gtksizegroup.xml +++ /dev/null @@ -1,349 +0,0 @@ - - - - - - gtk.SizeGroup - an object that groups widgets so they request the same -size - - - - Synopsis - - - gtk.SizeGroup - gobject.GObject - - gtk.SizeGroup - mode - - - set_mode - mode - - - get_mode - - - - set_ignore_hidden - ignore_hidden - - - get_ignore_hidden - - - - add_widget - widget - - - remove_widget - widget - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.SizeGroup - - - - - - gtk.SizeGroup Properties - -
- - - - - - - - - "ignore-hidden" - Read-Write - If True, hidden widgets are ignored -when determining the size of the group. -Default value: False. -Available in GTK+ 2.8 and above. - - - - "mode" - Read-Write - The directions in which the size group effects the -requested sizes of its component widgets - one of the . -Default value: gtk.SIZE_GROUP_HORIZONTAL. - - - - - -
- -
- - - gtk.SizeGroup Signal Prototypes - - gobject.GObject Signal Prototypes - - - - Description - - gtk.SizeGroup -provides a mechanism for grouping a number of widgets together so they all -request the same amount of space. This is typically useful when you want a -column of widgets to have the same size, but you can't use a gtk.Table widget. The -size requested for each widget in a gtk.SizeGroup is -the maximum of the sizes that would have been requested for each widget in -the size group if they were not in the size group. The mode of the size -group (see set_mode() -and the ) determines whether -this applies to the horizontal size, the vertical size, or both -sizes: - - Note that size groups only affect the amount of space requested, -not the size that the widgets finally receive. If you want the widgets in a -gtk.SizeGroup to -actually be the same size, you need to pack them in such a way that they get -the size they request and not more. For example, if you are packing your -widgets into a table, you would not include the gtk.FILL -flag. gtk.SizeGroup -objects are referenced by each widget in the size group, so once you have -added all widgets to a gtk.SizeGroup. If -the widgets in the size group are subsequently destroyed, then they will be -removed from the size group and drop their references on the size group; -when all widgets have been removed, the size group will be freed. - - Widgets can be part of multiple size groups; PyGTK will compute -the horizontal size of a widget from the horizontal requisition of all -widgets that can be reached from the widget by a chain of size groups of -type gtk.SIZE_GROUP_HORIZONTAL or -gtk.SIZE_GROUP_BOTH, and the vertical size from the -vertical requisition of all widgets that can be reached from the widget by a -chain of size groups of type gtk.SIZE_GROUP_VERTICAL or -gtk.SIZE_GROUP_BOTH. - - - - - Constructor - - - gtk.SizeGroup - mode - - - - mode : - the mode for the new size -group. - - - Returns : - a new gtk.SizeGroup - - - - Creates a new gtk.SizeGroup -with the mode specified by the value of mode which is -one of the . - - - - - Methods - - - gtk.SizeGroup.set_mode - - - set_mode - mode - - - - mode : - the mode to set for the size -group. - - - - The set_mode() method sets the "mode" -property of the size group to the value specified by -mode. The "mode" of the size group determines whether -the widgets in the size group should all have the same horizontal -requisition (see the ). - - - - - gtk.SizeGroup.get_mode - - - get_mode - - - - - Returns : - the current mode of the size -group. - - - - The get_mode() method returns the value -of the "mode" property of the size group. See the set_mode() -method. - - - - - gtk.SizeGroup.set_ignore_hidden - - - set_ignore_hidden - ignore_hidden - - - - ignore_hidden : - If True hidden widgets should -be ignored when calculating the size - - - - - This method is available in PyGTK 2.8 and above. - - - The set_ignore_hidden() method sets the -"ignore-hidden" property to the value of -ignore_hidden. If -ignore_hidden is True invisible -widgets will be ignored when calculating size. - - - - - gtk.SizeGroup.get_ignore_hidden - - - get_ignore_hidden - - - - - Returns : - True if hidden widgets are -ignored in size calculations. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_ignore_hidden() method returns -the value of the "ignore-hidden" property of the size group. If -"ignore-hidden" is True, invisible widgets are ignored in -size calculations. - - - - - gtk.SizeGroup.add_widget - - - add_widget - widget - - - - widget : - the gtk.Widget to -add - - - - The add_widget() method adds the widget -specified by widget to the gtk.SizeGroup. -The requisition of the widget will then be determined as the maximum of its -requisition and the requisition of the other widgets in the size group. -Whether this applies horizontally, vertically, or in both directions depends -on the mode of the size group. See the set_mode() -method for more detail. - - - - - gtk.SizeGroup.remove_widget - - - remove_widget - widget - - - - widget : - the gtk.Widget to -remove - - - - The remove_widget() method removes the widget specified by -widget from the gtk.SizeGroup. - - - - - -
diff --git a/docs/reference/pygtk-gtksocket.xml b/docs/reference/pygtk-gtksocket.xml deleted file mode 100644 index e0edfe28..00000000 --- a/docs/reference/pygtk-gtksocket.xml +++ /dev/null @@ -1,316 +0,0 @@ - - - - - - gtk.Socket - a container for widgets from other processes. - - - - Synopsis - - - gtk.Socket - gtk.Container - - gtk.Socket - - - add_id - window_id - - - get_id - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Socket - - - - - - gtk.Socket Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - - - - - gtk.Socket Style Properties - - gtk.Widget Style Properties - - - - - gtk.Socket Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - "plug-added" - - callback - socket - user_param1 - ... - - - - - "plug-removed" - - callback - socket - user_param1 - ... - - - - - - - - - Description - - Together with a gtk.Plug, a gtk.Socket 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 gtk.Socket widget -and, passes the that widget's window ID to the other process, which then -creates a gtk.Plug with that -window ID. Any widgets contained in the gtk.Plug then will -appear inside the first applications window. The socket's window ID is -obtained by using the get_id() -method. Before using this function, the socket must have been realized, and -added to its parent. - - When PyGTK 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. The communication between a gtk.Socket and a -gtk.Plug follows -the XEmbed protocol. - - - - - Constructor - - - gtk.Socket - - - - Returns : - the new gtk.Socket. - - - - Creates a new gtk.Socket. - - - - - Methods - - - gtk.Socket.add_id - - - add_id - window_id - - - - window_id : - the window ID of a client participating in the -XEMBED protocol. - - - - The add_id() method adds an XEMBED -client specified by window_id, such as a gtk.Plug, to the gtk.Socket. The -client may be in the same process or in a different process. - -To embed a gtk.Plug in a gtk.Socket, you can -either: - - - - create the gtk.Plug by calling -gtk.Plug(), then call gtk.Plug.get_id() -to get the window ID of the plug, and finally pass that to the gtk.Socket.add_id(); -or, - - - call the gtk.Socket.get_id() -method to get the window ID for the socket, then create the gtk.Plug by calling -gtk.Plug() passing in that ID. -The gtk.Socket -must have already be added into a toplevel window before you can make this -call. - - - - - - - gtk.Socket.get_id - - - get_id - - - - Returns : - the window ID for the -socket - - - - The get_id() method gets the window ID -of a gtk.Socket widget, -which can then be used to create a client embedded inside the socket, for -instance with gtk.Plug(). The -gtk.Socket -must have already be added into a toplevel window before you can make this -call. - - - - - - - Signals - - - The "plug-added" gtk.Socket Signal - - - callback - socket - user_param1 - ... - - - - - socket : - the socket that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "plug-added" signal is emitted when a plug is added to the -socket. - - - - - The "plug-removed" gtk.Socket Signal - - - callback - socket - user_param1 - ... - - - - - socket : - the socket that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the gtk.Socket - should not be destroyed. - - - - The "plug-removed" signal is emitted when a plug is removed from -the socket. The default action is to destroy the gtk.Socket widget, -so if you want to reuse it you must add a signal handler that returns -True. - - - - - - diff --git a/docs/reference/pygtk-gtkspinbutton.xml b/docs/reference/pygtk-gtkspinbutton.xml deleted file mode 100644 index 79de7526..00000000 --- a/docs/reference/pygtk-gtkspinbutton.xml +++ /dev/null @@ -1,1250 +0,0 @@ - - - - - - gtk.SpinButton - retrieve an integer or floating-point number from the -user. - - - - Synopsis - - - gtk.SpinButton - gtk.Entry - - gtk.SpinButton - adjustmentNone - climb_rate0.0 - digits0 - - - configure - adjustment - climb_rate - digits - - - set_adjustment - adjustment - - - get_adjustment - - - set_digits - digits - - - get_digits - - - set_increments - step - page - - - get_increments - - - - set_range - min - max - - - get_range - - - - get_value - - - get_value_as_int - - - set_value - value - - - set_update_policy - policy - - - get_update_policy - - - set_numeric - numeric - - - get_numeric - - - spin - direction - increment1.0 - - - set_wrap - wrap - - - get_wrap - - - set_snap_to_ticks - snap_to_ticks - - - get_snap_to_ticks - - - update - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Entry (implements gtk.Editable, gtk.CellEditable) - +-- gtk.SpinButton - - - - - - gtk.SpinButton Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Entry Properties - -
- - - - - - - - - "adjustment" - Read-Write - The adjustment that holds the value of the -spinbutton - - - - "climb-rate" - Read-Write - The acceleration rate when you hold down a -button - - - - "digits" - Read-Write - The number of decimal places to display - - - - "numeric" - Read-Write - If True, non-numeric characters -should be ignored - - - - "snap-to-ticks" - Read-Write - If True, erroneous values are -automatically changed to a spin button's nearest step increment - - - - "update-policy" - Read-Write - either gtk.UPDATE_ALWAYS (the spin -button should update always), or gtk.UPDATE_IF_VALID the -spin button should update only when the value is legal) - - - - "value" - Read-Write - the current value - - - - "wrap" - Read-Write - If True, a spin button should wrap -upon reaching its limits - - - - - -
- -
- - - gtk.SpinButton Style Properties - - gtk.Widget Style Properties - gtk.Entry Style Properties - -
- - - - - - - - - "shadow-type" - Read - the shadow type of the spinbutton - one of: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN -or gtk.SHADOW_ETCHED_OUT - - - - - -
- -
- - - gtk.SpinButton Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Entry Signal Prototypes - gtk.Editable Signal Prototypes - gtk.CellEditable Signal Prototypes - - - - "change-value" - - callback - spinbutton - scrolltype - user_param1 - ... - - - - - "input" - - callback - spinbutton - value_ptr - user_param1 - ... - - - - - "output" - - callback - spinbutton - user_param1 - ... - - - - - "value-changed" - - callback - spinbutton - user_param1 - ... - - - - - "wrapped - - callback - spinbutton - user_param1 - ... - - - - - - - - - Description - - A gtk.SpinButton -is a subclass of gtk.Entry that -provides a way for a user to set the value of some numeric attribute within -a predefined range. Rather than having to directly type a number into a -gtk.Entry, a -gtk.SpinButton -allows the user to click on one of two arrows to increment or decrement the -displayed value. A value can still be typed in and validated. A gtk.SpinButton -uses a gtk.Adjustment -to specify the range and value of interest. See the gtk.Adjustment -section for more details about an adjustment's properties. - - - - - Constructor - - - gtk.SpinButton - adjustmentNone - climb_rate0.0 - digits0 - - - - adjustment : - a gtk.Adjustment -or None to create a new adjustment - - - climb_rate : - the acceleration factor - - - digits : - the number of decimal places to -display - - - Returns : - a new gtk.SpinButton -widget - - - - Creates a new gtk.SpinButton -widget using the gtk.Adjustment -specified by adjustment, the acceleration factor -specified by climb_rate and displaying the number of -decimals specified by digits. If -adjustment is None or is not -specified a new gtk.Adjustment -will be created. If climb_rate is not specified it -defaults to 0.0. If digits is not specified it -defaults to 0. - - - - - Methods - - - gtk.SpinButton.configure - - - configure - adjustment - climb_rate - digits - - - - adjustment : - a gtk.Adjustment -or None to create a new adjustment - - - climb_rate : - the acceleration factor - - - digits : - the number of decimal places to -display - - - - The configure() method changes the -properties of an existing spin button by associating the gtk.Adjustment -specified by adjustment, setting the acceleration -rate to the c value specified by climb_rate and -setting the number of decimal places to display to the value specified by -digits. If adjustment is -None a new gtk.Adjustment -will be created. - - - - - gtk.SpinButton.set_adjustment - - - set_adjustment - adjustment - - - - adjustment : - a gtk.Adjustment -to replace the existing adjustment - - - - The set_adjustment() method sets the -"adjustment" property to the value specified by -adjustment replacing the current adjustment object -associated with the spinbutton. - - - - - gtk.SpinButton.get_adjustment - - - get_adjustment - - - - Returns : - the gtk.Adjustment -object associated with the spinbutton - - - - The get_adjustment() method returns the -value of the "adjustment" property. - - - - - gtk.SpinButton.set_digits - - - set_digits - digits - - - - digits : - the number of decimal places to be displayed -for the spin button's value - - - - The set_digits() method sets the -"digits" property to the value specified by digits. -The value of "digits" determines the number of decimal places (up to 20 -digits) to be displayed by the spinbutton. - - - - - gtk.SpinButton.get_digits - - - get_digits - - - - Returns : - the current number of decimal places to be -displayed - - - - The get_digits() method returns the -value of the "digits" property. The value of "digits" determines the number -of decimal places the spinbutton displays. See the set_digits() -method for more detail. - - - - - gtk.SpinButton.set_increments - - - set_increments - step - page - - - - step : - increment applied for each -left mousebutton press. - - - page : - increment applied for each -middle mousebutton press. - - - - The set_increments() method sets the -step_increment and page_increment -attributes of the gtk.Adjustment -associated with the spinbutton to the values specified by -step and page respectively. -These affect how quickly the value changes when the spin button's arrows are -activated. - - - - - gtk.SpinButton.get_increments - - - get_increments - - - - - Returns : - a tuple containing the step and page -increments - - - - The get_increments() method returns a -tuple containing the values of the step_increment and -page_increment attributes of the gtk.Adjustment -associated with the spinbutton. See the set_increments() -method for more detail. - - - - - gtk.SpinButton.set_range - - - set_range - min - max - - - - min : - the minimum allowable -value - - - max : - the maximum allowable -value - - - - The set_range() method sets the minimum -and maximum allowable values for spinbutton by setting the -lower and upper attributes of the -associated gtk.Adjustment -to the values of min and max -respectively. - - - - - gtk.SpinButton.get_range - - - get_range - - - - - Returns : - a tuple containing the minimum and maximum -allowed values - - - - The get_range() method returns a tuple -containing the range allowed for the spinbutton. See the set_range() -method for more detail. - - - - - gtk.SpinButton.get_value - - - get_value - - - - Returns : - the value of the -spin_button - - - - The get_value() method returns the -value of the "value" property of the spinbutton (really the -value attribute of the associated gtk.Adjustment). - - - - - gtk.SpinButton.get_value_as_int - - - get_value_as_int - - - - Returns : - the value of the spinbutton as an -integer - - - - The get_value_as_int() method returns -the value of the spinbutton represented as an integer. - - - - - gtk.SpinButton.set_value - - - set_value - value - - - - value : - the new value - - - - The set_value() method sets the value -of the "value" property to the value specified by -value (sets the value attribute of -the associated gtk.Adjustment. - - - - - gtk.SpinButton.set_update_policy - - - set_update_policy - policy - - - - policy : - the new update policy - - - - The set_update_policy() method sets the -"update-policy" property to the value of policy. The -value of policy is either of: - - - - gtk.UPDATE_ALWAYS - - the value is always displayed. - - - - gtk.UPDATE_IF_VALID - - the value is only displayed if it is valid within the -bounds of the spinbutton's gtk.Adjustment. - - - - - - - - - - gtk.SpinButton.get_update_policy - - - get_update_policy - - - - Returns : - the current update policy - - - - The get_update_policy() method returns -the value of the "update-policy" property that determines the update -behavior of a spin button. See the set_update_policy() -method for more detail. - - - - - gtk.SpinButton.set_numeric - - - set_numeric - numeric - - - - numeric : - a flag indicating if only numeric entry is -allowed. - - - - The set_numeric() method sets the value -of the "numeric" property to the value of numeric. If -numeric is True only numeric text -can be typed into the spin button. - - - - - gtk.SpinButton.get_numeric - - - get_numeric - - - - Returns : - True if only numeric text -can be entered - - - - The get_numeric() method returns the -value of the "numeric" preoperty. See the set_numeric() -method for more detail. - - - - - gtk.SpinButton.spin - - - spin - direction - increment1.0 - - - - direction : - the direction to spin. - - - increment : - the step increment to apply in the specified -direction. - - - - The spin() method increments or -decrements a spin button's value in the direction specified by -direction with a step size specified by -increment. The value of -increment is only used if direction is -gtk.SPIN_USER_DEFINED. The value of -direction must be one of: - - - - gtk.SPIN_STEP_FORWARD - - forward by step_increment - - - - gtk.SPIN_STEP_BACKWARD - - backward by step_increment - - - - gtk.SPIN_PAGE_FORWARD - - forward by step_increment - - - - gtk.SPIN_PAGE_BACKWARD - - backward by step_increment - - - - gtk.SPIN_HOME - - move to minimum value - - - - gtk.SPIN_END - - move to maximum value - - - - gtk.SPIN_USER_DEFINED - - add increment to the -value - - - - - - - - - - gtk.SpinButton.set_wrap - - - set_wrap - wrap - - - - wrap : - if True wrapping is -performed. - - - - The set_wrap() method sets the "wrap" -property to the value of wrap. If -wrap is True the spin button value -wraps around to the opposite limit when the upper or lower limit of the -range is exceeded. - - - - - gtk.SpinButton.get_wrap - - - get_wrap - - - - Returns : - True if the spin button -wraps - - - - The get_wrap() method returns the value -of the "wrap" property. If the value of "wrap" is True -the spinbutton's value wraps around to the opposite limit when the upper or -lower limit of the range is exceeded. See the set_wrap() -method. - - - - - gtk.SpinButton.set_snap_to_ticks - - - set_snap_to_ticks - snap_to_ticks - - - - snap_to_ticks : - if True invalid values -should be corrected. - - - - The set_snap_to_ticks() method sets the -"snap-to-ticks" property to the value of -snap_to_ticks. If -snap_to_ticks is True values are -corrected to the nearest step increment when a spin button is activated -after providing an invalid value. - - - - - gtk.SpinButton.get_snap_to_ticks - - - get_snap_to_ticks - - - - Returns : - True if values are snapped -to the nearest step. - - - - The get_snap_to_ticks() method returns -the value of the "snap-to-ticks" property. If the value of "snap-to-ticks" -is True the input values are corrected to the nearest -step. See the set_snap_to_ticks() -method. - - - - - gtk.SpinButton.update - - - update - - - The update() method manually forces an -update of the spin button. - - - - - - - Signals - - - The "change-value" gtk.SpinButton Signal - - - callback - spinbutton - scrolltype - user_param1 - ... - - - - - spinbutton : - the spinbutton that received the -signal - - - scrolltype : - the scrolltype: -gtk.SCROLL_STEP_UP, -gtk.SCROLL_STEP_DOWN, -gtk.SCROLL_PAGE_UP, gtk.SCROLL_PAGE_DOWN, -gtk.SCROLL_START or -gtk.SCROLL_END - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "change-value" signal is emitted when the spinbutton value is -changed by keyboard action using the Up Arrow -, Down Arrow , -Page Up , Page -Down , ControlPage Up -or ControlPage -Down keys. - - - - - The "input" gtk.SpinButton Signal - - - callback - spinbutton - value_ptr - user_param1 - ... - - - - - spinbutton : - the spinbutton that received the -signal - - - value_ptr : - a pointer to the value - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the input value was - retrieved and handled; False if not handled and - -1 if an error occurred during processing. - - - - The "input" signal is emitted when the value changes. The -value_ptr is a GPointer to the value that cannot be accessed from PyGTK. -This signal cannot be handled in PyGTK. - - - - - The "output" gtk.SpinButton Signal - - - callback - spinbutton - user_param1 - ... - - - - - spinbutton : - the spinbutton that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if no further - processing is required. - - - - The "output" signal is emitted when the spinbutton display value -is changed either by setting a new value or changing the digits and on -realizing the widget. Returns True if the handler -successfully set the text and no further processing is required. - - - - - The "value-changed" gtk.SpinButton Signal - - - callback - spinbutton - user_param1 - ... - - - - - spinbutton : - the spinbutton that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "value-changed" signal is emitted when any of the settings (i.e. value, digits) that change the display of the spinbutton are changed. - - - - - The "wrapped" gtk.SpinButton Signal - - callback - spinbutton - user_param1 - ... - - - - - spinbutton : - the object which received the signal - the object which received the signal. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - - This signal is available in GTK+ 2.10 and above. - - - The "wrapped" signal is emitted right after the spinbutton wraps - from its maximum to minimum value or vice-versa. - - - - - -
diff --git a/docs/reference/pygtk-gtkstatusbar.xml b/docs/reference/pygtk-gtkstatusbar.xml deleted file mode 100644 index a8d68129..00000000 --- a/docs/reference/pygtk-gtkstatusbar.xml +++ /dev/null @@ -1,506 +0,0 @@ - - - - - gtk.Statusbar - 3 - PyGTK Docs - - - - gtk.Statusbar - report messages of minor importance to the user. - - - - Synopsis - - - gtk.Statusbar - gtk.HBox - - gtk.Statusbar - - - get_context_id - context_description - - - push - context_id - text - - - pop - context_id - - - remove - context_id - message_id - - - set_has_resize_grip - setting - - - get_has_resize_grip - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Box - +-- gtk.HBox - +-- gtk.Statusbar - - - - - - gtk.Statusbar Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Box Properties - -
- - - - - - - - - "has-resize-grip" - Read-Write - - If True, the statusbar has a grip - for resizing the toplevel window. Available in GTK+ 2.4 and - above. - - - - - -
- -
- - - gtk.Statusbar Style Properties - - gtk.Widget Style Properties - -
- - - - - - - - - "shadow-type" - Read - The style of bevel around the statusbar text - - - - - -
- -
- - - gtk.Statusbar Child Properties - - gtk.Box Child Properties - - - - - gtk.Statusbar Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - "text-popped" - - callback - statusbar - context_id - text - user_param1 - ... - - - - - "text-pushed" - - callback - statusbar - context_id - text - user_param1 - ... - - - - - - - - - Description - - A gtk.Statusbar is -usually placed along the bottom of an application's main gtk.Window. 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). It may also have a resize grip -(a triangular area in the lower right corner) which can be clicked on to -resize the window containing the statusbar. Status bars in PyGTK 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. The context_id can be generated by the -get_context_id() -method, and associated with a context message. An existing context_id can be -retrieved using the context message using the get_context_id() -method. 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. - - - - - Constructor - - - gtk.Statusbar - - - - Returns : - a new gtk.Statusbar -widget - - - - Creates a new gtk.Statusbar -widget. - - - - - Methods - - - gtk.Statusbar.get_context_id - - - get_context_id - context_description - - - - context_description : - a string identifying the context for the -message - - - Returns : - an integer context -identifier - - - - The get_context_id() method returns a -new or existing context identifier, given a description of the actual -context specified by context_description. In effect, -get_context_id() both registers and retrieves a -context identifier. - - - - - gtk.Statusbar.push - - - push - context_id - text - - - - context_id : - a context identifier - - - text : - the message text - - - Returns : - an integer message -identifier - - - - The push() method pushes a new message -specified by text with the specified -context_id onto a statusbar's stack and returns a -message id that that can be used with the remove() -method. - - - - - gtk.Statusbar.pop - - - pop - context_id - - - - context_id : - a context identifier - - - - The pop() method removes the top -message with the specified context_id from the -statusbar's stack. - - - - - gtk.Statusbar.remove - - - remove - context_id - message_id - - - - context_id : - the context identifier - - - message_id : - the message identifier - - - - The remove() method removes the message -with the specified message_id and -context_id from the statusbar's message stack. - - - - - gtk.Statusbar.set_has_resize_grip - - - set_has_resize_grip - setting - - - - setting : - if True a resize grip is -displayed - - - - The set_has_resize_grip() method sets -the internal "has_resize_grip" property to the value specified by -setting. If setting is -True a resize grip is displayed on the statusbar - - - - - gtk.Statusbar.get_has_resize_grip - - - get_has_resize_grip - - - - Returns : - True if a resize grip is -displayed - - - - The get_has_resize_grip() method -returns the value of the internal "has_resize_grip" property that determines -if a resize grip is displayed on the statusbar. - - - - - - - Signals - - - The "text-popped" gtk.Statusbar Signal - - - callback - statusbar - context_id - text - user_param1 - ... - - - - - statusbar : - the statusbar that received the -signal - - - context_id : - the context identifier of the top -message - - - text : - the string containing the top message -text - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "text-popped" signal is emitted when a message is removed -from the statusbar message stack. Note the text and context_id are for the -top message on the statusbar stack not the message that was actually -removed. - - - - - The "text-pushed" gtk.Statusbar Signal - - - callback - statusbar - context_id - text - user_param1 - ... - - - - - statusbar : - the statusbar that received the -signal - - - context_id : - the context identifier of the message -added - - - text : - the string containing the message -text - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "text-pushed" signal is emitted when a message is added to -the statusbar message stack. - - - - - -
diff --git a/docs/reference/pygtk-gtkstatusicon.xml b/docs/reference/pygtk-gtkstatusicon.xml deleted file mode 100644 index 0b32318a..00000000 --- a/docs/reference/pygtk-gtkstatusicon.xml +++ /dev/null @@ -1,1065 +0,0 @@ - - - - - - - gtk.StatusIcon - display an icon in the system tray (new in PyGTK - 2.10) - - - - Synopsis - - - gtk.StatusIcon - gobject.GObject - - gtk.StatusIcon - - - - set_from_pixbuf - pixbuf - - - set_from_file - filename - - - set_from_stock - stock_id - - - set_from_icon_name - icon_name - - - get_storage_type - - - - get_pixbuf - - - - get_stock - - - - get_icon_name - - - - get_size - - - - set_tooltip - tooltip_text - - - set_visible - visible - - - get_visible - - - - set_blinking - blinking - - - get_blinking - - - - is_embedded - - - - get_geometry - screen - area - orientation - - - - -Functions - - - gtk.status_icon_new_from_pixbuf - pixbuf - - gtk.status_icon_new_from_file - filename - - gtk.status_icon_new_from_stock - stock_id - - gtk.status_icon_new_from_icon_name - icon_name - - gtk.status_icon_position_menu - menu - statusicon - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.StatusIcon - - - - - - gtk.StatusIcon Properties - -
- - - - - - - - - "blinking" - Read-Write - if True the status icon is - blinking. Default value: False. - - - - "file" - Write - Filename to load and display. Default value: - None. - - - - "icon-name" - Read-Write - The name of the icon from the icon theme. Default value: - None. - - - - "pixbuf" - Read-Write - A gtk.gdk.Pixbuf - to display. - - - - "size" - Read - The size of the icon. Default value: 0. - - - - "stock" - Read-Write - Stock ID for a stock image to display. Default value: - None. - - - - "storage-type" - Read - The representation being used for image data. Default - value: gtk.IMAGE_EMPTY. - - - - "visible" - Read-Write - If True the status icon is - visible. Default value: True. - - - - - -
- -
- - - gtk.StatusIcon Signal Prototypes - - gobject.GObject Signal Prototypes - - - - "activate" - - callback - status_icon - user_param1 - ... - - - - - "popup-menu" - - callback - status_icon - button - activate_time - user_param1 - ... - - - - - "size-changed" - - callback - status_icon - size - user_param1 - ... - - - - - - - - - Description - - The "system tray" or notification area is normally used for - transient icons that indicate some special state. For example, a system - tray icon might appear to tell the user that they have new mail, or have - an incoming instant message, or something along those lines. The basic - idea is that creating an icon in the notification area is less annoying - than popping up a dialog. - - A gtk.StatusIcon - object can be used to display an icon in a "system tray". The icon can - have a tooltip, and the user can interact with it by activating it or - popping up a context menu. Critical information should not solely be - displayed in a gtk.StatusIcon, - since it may not be visible (e.g. when the user doesn't have a - notification area on his panel). This can be checked with the gtk.StatusIcon.is_embedded() - method. - - On X11, the implementation follows the freedesktop.org "System - Tray" specification. - Implementations of the "tray" side of this specification can be found - e.g. in the GNOME and KDE panel applications. - - Note that a gtk.StatusIcon - is not a widget, but just a gobject.GObject. - Making it a widget would be impractical, since the system tray on Win32 - doesn't allow to embed arbitrary widgets. - - - - - Constructor - - - gtk.StatusIcon - - - gtk.StatusIcon - - - - - - Returns : - a new gtk.StatusIcon - - - - - This constructor is available in PyGTK 2.10 and above. - - - Creates an empty status icon object. - - - - - - - Methods - - - gtk.StatusIcon.set_from_pixbuf - - - set_from_pixbuf - pixbuf - - - - - pixbuf : - a gtk.gdk.Pixbuf - or None - - - - - This method is available in PyGTK 2.10 and above. - - - Makes status_icon display - pixbuf. See the gtk.status_icon_new_from_pixbuf() - function for details. - - - - - gtk.StatusIcon.set_from_file - - - set_from_file - filename - - - - - filename : - a filename - - - - - This method is available in PyGTK 2.10 and above. - - - Makes status_icon display the file - filename. See the gtk.status_icon_new_from_file() - function for details. - - - - - gtk.StatusIcon.set_from_stock - - - set_from_stock - stock_id - - - - - stock_id : - a stock icon id - - - - - This method is available in PyGTK 2.10 and above. - - - Makes status_icon display the stock icon - with the id stock_id. See the gtk.status_icon_new_from_stock() - function for details. - - - - - gtk.StatusIcon.set_from_icon_name - - - set_from_icon_name - icon_name - - - - - icon_name : - an icon name - - - - - This method is available in PyGTK 2.10 and above. - - - Makes status_icon display the icon named - icon_name from the current icon theme. See the - gtk.status_icon_new_from_icon_name() - function for details. - - - - - gtk.StatusIcon.get_storage_type - - - get_storage_type - - - - - - Returns : - the image representation being used - one of - the . - - - - - This method is available in PyGTK 2.10 and above. - - - Gets the type of representation being used by the gtk.StatusIcon - to store image data. If the gtk.StatusIcon - has no image data, the return value will be - gtk.IMAGE_EMPTY. - - - - - gtk.StatusIcon.get_pixbuf - - - get_pixbuf - - - - - - Returns : - the displayed pixbuf, or - None if the image is - empty. - - - - - This method is available in PyGTK 2.10 and above. - - - Gets the gtk.gdk.Pixbuf - being displayed by the gtk.StatusIcon. - The storage type of the status icon must be - gtk.IMAGE_EMPTY or - gtk.IMAGE_PIXBUF (see the gtk.StatusIcon.get_storage_type() - method). - - - - - gtk.StatusIcon.get_stock - - - get_stock - - - - - - Returns : - stock id of the displayed stock icon, or - None if the image is - empty. - - - - - This method is available in PyGTK 2.10 and above. - - - Gets the id of the stock icon being displayed by the gtk.StatusIcon. - The storage type of the status icon must be - gtk.IMAGE_EMPTY or - gtk.IMAGE_STOCK (see the gtk.StatusIcon.get_storage_type() - method). - - - - - gtk.StatusIcon.get_icon_name - - - get_icon_name - - - - - - Returns : - name of the displayed icon, or - None if the image is - empty. - - - - - This method is available in PyGTK 2.10 and above. - - - Gets the name of the icon being displayed by the gtk.StatusIcon. - The storage type of the status icon must be - gtk.IMAGE_EMPTY or - gtk.IMAGE_ICON_NAME (see the gtk.StatusIcon.get_storage_type() - method). - - - - - gtk.StatusIcon.get_size - - - get_size - - - - - - Returns : - the size that is available for the - image - - - - - This method is available in PyGTK 2.10 and above. - - - Gets the size in pixels that is available for the image. Stock - icons and named icons adapt their size automatically if the size of - the notification area changes. For other storage types, the - "size-changed" signal can be used to react to size changes. - - - - - gtk.StatusIcon.set_tooltip - - - set_tooltip - tooltip_text - - - - - tooltip_text : - the tooltip text, or - None - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the tooltip of the status icon. - - - - - gtk.StatusIcon.set_visible - - - set_visible - visible - - - - - visible : - if True show the status - icon, if False hide it - - - - - This method is available in PyGTK 2.10 and above. - - - Shows or hides a status icon. - - - - - gtk.StatusIcon.get_visible - - - get_visible - - - - - - Returns : - True if the status icon is - visible - - - - - This method is available in PyGTK 2.10 and above. - - - Returns True if the status icon is visible. - Note that being visible does not guarantee that the user can actually - see the icon, see also the gtk.StatusIcon.is_embedded() - method. - - - - - gtk.StatusIcon.set_blinking - - - set_blinking - blinking - - - - - blinking : - if True turn blinking on, if - False turn it off - - - - - This method is available in PyGTK 2.10 and above. - - - Makes the status icon start or stop blinking. Note that - blinking user interface elements may be problematic for some users, - and thus may be turned off, in which case this setting has no - effect. - - - - - gtk.StatusIcon.get_blinking - - - get_blinking - - - - - - Returns : - True if the icon is - blinking - - - - - This method is available in PyGTK 2.10 and above. - - - Returns True if the icon is blinking, see the - gtk.StatusIcon.set_blinking() - method. - - - - - gtk.StatusIcon.is_embedded - - - is_embedded - - - - - - Returns : - True if the status icon is - embedded in a notification area. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns True if the status icon is embedded - in a notification area. - - - - - gtk.StatusIcon.get_geometry - - - get_geometry - - - - - Returns : - a 3-tuple (containing the screen, area occupied - by the status icon and the panel orientation) or - None. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns information in a 3-tuple about the location of the - status icon on screen. The 3-tuple contains the gtk.gdk.Screen, - the area occupied by the status icon as a gtk.gdk.Rectangle - and the orientation of the panel containing the statis icon - one of - the . This information - can be used to e.g. position popups like notification bubbles. See - the gtk.status_icon_position_menu() - function for a more convenient alternative for positioning - menus. - - Note that some platforms do not provide this information. - - - - - - - Functions - - - gtk.status_icon_new_from_pixbuf - - - gtk.status_icon_new_from_pixbuf - pixbuf - - - - pixbuf : - - - - Returns : - a new gtk.StatusIcon - - - - Creates a status icon displaying pixbuf. - The image will be scaled down to fit in the available space in the - notification area, if necessary. - - - - - gtk.status_icon_new_from_file - - - gtk.status_icon_new_from_file - filename - - - - filename : - - - - Returns : - a new gtk.StatusIcon - - - - Creates a status icon displaying the image in the file specified - by filename. The image will be scaled down to - fit in the available space in the notification area, if - necessary. - - - - - gtk.status_icon_new_from_stock - - - gtk.status_icon_new_from_stock - stock_id - - - - stock_id : - a stock icon id - - - Returns : - a new gtk.StatusIcon - - - - Creates a status icon displaying a stock icon. Sample stock icon - names are gtk.STOCK_OPEN, - gtk.STOCK_QUIT. You can register your own stock - icon names, see the gtk.IconFactory.add_default() - and gtk.IconFactory.add() - methods. - - - - - gtk.status_icon_new_from_icon_name - - - gtk.status_icon_new_from_icon_name - icon_name - - - - icon_name : - an icon name - - - Returns : - a new gtk.StatusIcon - - - - Creates a status icon displaying an icon from the current icon - theme. If the current icon theme is changed, the icon will be updated - appropriately. - - - - - gtk.status_icon_position_menu - - - gtk.status_icon_position_menu - menu - statusicon - - - - menu : - the gtk.Menu - - - statusicon : - the gtk.StatusIcon - - - Returns : - a 3-tuple containing the x and y coordinates - for the menu and a boolean indicating whether the menu should be - pushed in to be completely inside the screen instead of just - clamped to the size to the screen. - - - - Menu positioning function to use with the popup() - method to position menu aligned to - statusicon . - - Eample use of this function is: - - - menu.popup(None, None, gtk.status_icon_position_menu, - event.button, event.time, statusicon) - - - - - - - - Signals - - - The "activate" gtk.StatusIcon Signal - - callback - status_icon - user_param1 - ... - - - - - status_icon : - the object which received the signal - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - - This signal is available in GTK+ 2.10 and above. - - - Gets emitted when the user activates the status icon. If and - how status icons can be activated is platform-dependent. - - - - - The "popup-menu" gtk.StatusIcon Signal - - callback - status_icon - button - activate_time - user_param1 - ... - - - - - status_icon : - the object which received the signal - - - button : - the button that was pressed, or 0 if the - signal is not emitted in response to a button press event - - - activate_time : - the timestamp of the event that - triggered the signal emission - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - - This signal is available in GTK+ 2.10 and above. - - - Gets emitted when the user brings up the context menu of the - status icon. Whether status icons can have context menus and how these - are activated is platform-dependent. - - The button and - activate_timeout parameters should be passed as - the last two arguments to the gtk.Menu.popup() - method. - - - - - The "size-changed" gtk.StatusIcon Signal - - callback - status_icon - size - statusicon - arg1 - user_param1 - ... - - - - - status_icon : - the object which received the signal - - - size : - the new size - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - Returns : - True if the icon was updated - for the new size. Otherwise, GTK+ will scale the icon as - necessary. - - - - - This signal is available in GTK+ 2.10 and above. - - - Gets emitted when the size available for the image changes, - e.g. because the notification area got resized. - - - - - -
diff --git a/docs/reference/pygtk-gtkstyle.xml b/docs/reference/pygtk-gtkstyle.xml deleted file mode 100644 index 689c1f89..00000000 --- a/docs/reference/pygtk-gtkstyle.xml +++ /dev/null @@ -1,2948 +0,0 @@ - - - - - - gtk.Style - an object that hold style information for widgets - - - - Synopsis - - - gtk.Style - gobject.GObject - - gtk.Style - - - copy - - - attach - window - - - detach - - - set_background - window - state_type - - - apply_default_background - window - set_bg - state_type - area - x - y - width - height - - - lookup_icon_set - stock_id - - - render_icon - source - direction - state - size - widget - detail - - - paint_hline - window - state_type - area - widget - detail - x1 - x2 - y - - - paint_vline - window - state_type - area - widget - detail - y1 - y2 - x - - - paint_shadow - window - state_type - shadow_type - area - widget - detail - x - y - width - height - - - paint_polygon - window - state_type - shadow_type - area - widget - detail - points - fill - - - paint_arrow - window - state_type - shadow_type - area - widget - detail - arrow_type - fill - x - y - width - height - - - paint_diamond - window - state_type - shadow_type - area - widget - detail - x - y - width - height - - - paint_box - window - state_type - shadow_type - area - widget - detail - x - y - width - height - - - paint_flat_box - window - state_type - shadow_type - area - widget - detail - x - y - width - height - - - paint_check - window - state_type - shadow_type - area - widget - detail - x - y - width - height - - - paint_option - window - state_type - shadow_type - area - widget - detail - x - y - width - height - - - paint_tab - window - state_type - shadow_type - area - widget - detail - x - y - width - height - - - paint_shadow_gap - window - state_type - shadow_type - area - widget - detail - x - y - width - height - gap_side - gap_x - gap_width - - - paint_box_gap - window - state_type - shadow_type - area - widget - detail - x - y - width - height - gap_side - gap_x - gap_width - - - paint_extension - window - state_type - shadow_type - area - widget - detail - x - y - width - height - gap_side - - - paint_focus - window - state_type - area - widget - detail - x - y - width - height - - - paint_slider - window - state_type - shadow_type - area - widget - detail - x - y - width - height - orientation - - - paint_handle - window - state_type - shadow_type - area - widget - detail - x - y - width - height - orientation - - - paint_expander - window - state_type - area - widget - detail - x - y - expander_style - - - paint_layout - window - state_type - use_text - area - widget - detail - x - y - layout - - - paint_resize_grip - window - state_type - area - widget - detail - edge - x - y - width - height - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Style - - - - - - Attributes - - - Even though the following attributes that are arrays of gtk.gdk.Color, - gtk.gdk.GC - or gtk.gdk.Pixmap - objects are read-only, the individual array items are - read-write. - - -
- - - - - - - - - - "fg" - Read - An array of gtk.gdk.Colors to be -used for the foreground colors in each widget state. - - - - "bg" - Read - An array of gtk.gdk.Colors to be -used for the background colors in each widget state. - - - - "light" - Read - An array of gtk.gdk.Colors to be -used for the light colors in each widget state. The light colors are -slightly lighter than the bg colors and used for creating shadows. - - - - "dark" - Read - An array of gtk.gdk.Colors to be -used for the dark colors in each widget state. The dark colors are slightly -darker than the bg colors and used for creating shadows. - - - - "mid" - Read - An array of gtk.gdk.Colors to be -used for the mid colors (between light and dark) in each widget -state - - - - "text" - Read - An array of gtk.gdk.Colors to be -used for the text colors in each widget state. - - - - "base" - Read - An array of gtk.gdk.Colors to be -used for the base colors in each widget state. - - - - "text_aa" - Read - An array of gtk.gdk.Colors to be -used for the anti-aliased text colors in each widget state. - - - - "black" - Read-Write - A gtk.gdk.Color that is -used for the black color. - - - - "white" - Read-Write - A gtk.gdk.Color that is -used for the white color. - - - - "font_desc" - Read - A pango.FontDescription used as -the default text font. - - - - "xthickness" - Read - The thickness of lines drawn vertically. - - - - "ythickness" - Read - The thickness of lines drawn horizontally. - - - - "fg_gc" - Read - An array of graphics contexts (gtk.gdk.GC) for drawing -using the fg colors. - - - - "bg_gc" - Read - An array of graphics contexts (gtk.gdk.GC) for drawing -using the bg colors. - - - - "light_gc" - Read - An array of graphics contexts (gtk.gdk.GC) for drawing -using the light colors. - - - - "dark_gc" - Read - An array of graphics contexts (gtk.gdk.GC) for drawing -using the dark colors. - - - - "mid_gc" - Read - An array of graphics contexts (gtk.gdk.GC) for drawing -using the mid colors. - - - - "text_gc" - Read - An array of graphics contexts (gtk.gdk.GC) for drawing -using the text colors. - - - - "base_gc" - Read - An array of graphics contexts (gtk.gdk.GC) for drawing -using the base colors. - - - - "text_aa_gc" - Read - An array of graphics contexts (gtk.gdk.GC) for drawing -using the anti-aliased text colors. - - - - "black_gc" - Read-Write - A graphics context (gtk.gdk.GC) for drawing -using the black color. - - - - "white_gc" - Read-Write - A graphics context (gtk.gdk.GC) for drawing -using the white color. - - - - "bg_pixmap" - Read - An array of gtk.gdk.Pixmap to -be used for the background stippling in each widget state. - - - - - -
- -
- - - gtk.Style Signal Prototypes - - gobject.GObject Signal Prototypes - - - - "realize - - callback - style - user_param1 - ... - - - - - "unrealize - - callback - style - user_param1 - ... - - - - - - - - - Description - - A gtk.Style object -encapsulates the information that provides the look and feel for a widget. -Each gtk.Widget has an -associated gtk.Style object that -is used when rendering that widget. Usually the gtk.Style for a -widget is the same as the default style that is set by GTK and modified the -theme engine. A gtk.Style holds -information for the five possible widget states though not every widget -supports all five states: - - - - gtk.STATE_NORMAL - - The state of a sensitive widget that is not active and -does not have the focus - - - - gtk.STATE_ACTIVE - - The state of a sensitive widget when it is active e.g. a -button that is pressed but not yet released - - - - gtk.STATE_PRELIGHT - - The state of a sensitive widget that has the focus e.g. a -button that has the mouse pointer over it. - - - - gtk.STATE_SELECTED - - The state of a widget that is selected e.g. selected text -in a gtk.Entry -widget - - - - gtk.STATE_INSENSITIVE - - The state of a widget that is insensitive and will not -respond to any events e.g. cannot be activated, selected or -prelit. - - - - - A gtk.Style contains -the read-only attributes described in the above section. - - Usually applications should not need to use or modify the gtk.Style of their -widgets. - - - - - Constructor - - - gtk.Style - - - - Returns : - a new gtk.Style -object - - - - Creates a new gtk.Style -object. - - - - - Methods - - - gtk.Style.copy - - - copy - - - - Returns : - a copy of the gtk.Style -object - - - - The copy() method returns a copy of the -style object. - - - - - gtk.Style.attach - - - attach - window - - - - window : - a gtk.Window. - - - Returns : - a gtk.Style -object - - - - The attach() method adapts a style to -the specified window. This process allocates the -colors and creates the graphics contexts for the style specializing them to -a particular visual and colormap. A new gtk.Style may be -created if the style has already been adapted to a window with a different -style and colormap. - - - - - gtk.Style.detach - - - detach - - - The detach() method detaches the style and frees its resources if it is no longer attached. - - - - - gtk.Style.set_background - - - set_background - window - state_type - - - - window : - a gtk.gdk.Window - - - state_type : - a widget state - - - - The set_background() method sets the -background of window to the background color or -pixmap of the style for the widget state specified by -state_type. - - - - - gtk.Style.apply_default_background - - - apply_default_background - window - set_bg - state_type - area - x - y - width - height - - - - window : - a gtk.gdk.Window - - - set_bg : - if True use the bg_pixmap -for the widget state - - - state_type : - the widget state - - - area : - the clipping area - - - x : - the x location - - - y : - the y location - - - width : - the width - - - height : - the height - - - - The apply_default_background() method -sets the background of the specified window in the -area specified by x, y, -width and height. The -background color is derived from the bg_gc of the style with the state -specified by state_type. If -area is not None it specifies a -clipping area for the application of the background. - - - - - gtk.Style.lookup_icon_set - - - lookup_icon_set - stock_id - - - - stock_id : - a stock ID - - - Returns : - a gtk.IconSet - - - - The lookup_icon_set() method looks in -the gtk.IconFactory -list associated with the style and the default icon factory for the stock -icon specified by stock_id. If the stock icon iconset -is found it is returned. - - - - - gtk.Style.render_icon - - - render_icon - source - direction - state - size - widget - None - detail - None - - - - source : - the gtk.IconSource -specifying the icon to render - - - direction : - a text direction - - - state : - a widget state - - - size : - the size to render the icon at. A size of -1 -means render at the size of the source and don't scale. - - - widget : - a widget - - - detail : - a style detail - - - Returns : - a gtk.gdk.Pixbuf - - - - The render_icon() method renders the -icon specified by source at the specified -size for the specified widget -state according to the given parameters and returns -the result in a gtk.gdk.Pixbuf. - - - - - gtk.Style.paint_hline - - - paint_hline - window - state_type - area - widget - detail - x1 - x2 - y - - - - window : - a gtk.gdk.Window - - - state_type : - a widget state - - - area : - the rectangle that clips the -output - - - widget : - a widget - - - detail : - a detail string - - - x1 : - the starting x coordinate - - - x2 : - the ending x coordinate - - - y : - the y coordinate - - - - The paint_hline() method draws a -horizontal line from (x1, y) -to (x2, y) in -window using the specified -state_type of the style. If -area is not None the line is -clipped by the rectangle specified by area. - - - - - gtk.Style.paint_vline - - - paint_vline - window - state_type - area - widget - detail - y1 - y2 - x - - - - window : - a gtk.gdk.Window - - - state_type : - a widget state - - - area : - the rectangle to which the output is -clipped - - - widget : - a widget - - - detail : - a detail string - - - y1 : - the starting y coordinate - - - y2 : - the ending y coordinate - - - x : - the x coordinate - - - - The paint_vline() method draws a -vertical line from (x, y1) to -(x, y2) in -window using the specified -state_type of the style. If -area is not None the line is -clipped by the rectangle specified by area. - - - - - gtk.Style.paint_shadow - - - paint_shadow - window - state_type - shadow_type - area - widget - detail - x - y - width - height - - - - window : - a gtk.gdk.Window* - - - state_type : - a widget state - - - shadow_type : - a type of shadow - one of: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT - - - area : - the rectangle to which the output is -clipped - - - widget : - a widget - - - detail : - a detail string - - - x : - the x location - - - y : - the y location - - - width : - the width - - - height : - the height - - - - The paint_shadow() method draws a -shadow of the specified shadow_type on the specified -window with the size specified by -x, y, -width and height. If -area is not None the shadow is -clipped to the rectangle' area. state_type specifies -the style state to use for drawing. - - - - - gtk.Style.paint_polygon - - - paint_polygon - window - state_type - shadow_type - area - widget - detail - points - fill - - - - window : - a gtk.gdk.Window - - - state_type : - a widget state - - - shadow_type : - a shadow type - one of: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT - - - area : - a clipping rectangle - - - widget : - a widget - - - detail : - a detail string - - - points : - a list or tuple containing point (x, y) -tuples - - - fill : - if True the polygon should -be filled - - - - The paint_polygon() method draws a -polygon on the specified window with the shadow type -specified by shadow_type connecting the points -specified by points. If area -is not None it specifies a clipping rectangle. The style -state specified by state_type determines the graphics -context to use while drawing. - - - - - gtk.Style.paint_arrow - - - paint_arrow - window - state_type - shadow_type - area - widget - detail - arrow_type - fill - x - y - width - height - - - - window : - a gtk.gdk.Window - - - state_type : - the widget state - - - shadow_type : - a shadow type - one of: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT - - - area : - a clipping rectangle - - - widget : - a widget - - - detail : - a detail string - - - arrow_type : - an arrow type - one of: -gtk.ARROW_UP, gtk.ARROW_DOWN, -gtk.ARROW_LEFT, -gtk.ARROW_RIGHT - - - fill : - if True the arrow should be -filled - - - x : - the x location - - - y : - the y location - - - width : - the width - - - height : - the height - - - - The paint_arrow() method draws an arrow -of the type specified by arrow_type on the specified -window with the shadow type specified by -shadow_type with the location and size specified by -x, y, -width and height. If -area is not None it specifies a -clipping rectangle. The widget state specified by -state_type determines the graphics context to use -while drawing. - - - - - gtk.Style.paint_diamond - - - paint_diamond - window - state_type - shadow_type - area - widget - detail - x - y - width - height - - - - window : - a gtk.gdk.Window - - - state_type : - a widget state - - - shadow_type : - a shadow type - one of: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT - - - area : - a clipping rectangle - - - widget : - a widget - - - detail : - a detail string - - - x : - the x location - - - y : - the y location - - - width : - the width - - - height : - the height - - - - The paint_diamond() method draws a -diamond on the specified window with the shadow type -specified by shadow_type and the location and size -specified by x, y, -width and height. If -area is not None it specifies a -clipping rectangle. The widget state specified by -state_type determines the graphics context to use -while drawing. - - - - - gtk.Style.paint_box - - - paint_box - window - state_type - shadow_type - area - widget - detail - x - y - width - height - - - - window : - a gtk.gdk.Window - - - state_type : - a widget state - - - shadow_type : - a shadow type - one of: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT - - - area : - a clipping rectangle - - - widget : - a widget - - - detail : - a detail string - - - x : - the x location - - - y : - the y location - - - width : - the width - - - height : - the height - - - - The paint_box() method draws a box on -the specified window with the shadow type specified -by shadow_type and the location and size specified by -x, y, -width and height. If -area is not None it specifies a -clipping rectangle. The widget state specified by -state_type determines the graphics context to use -while drawing. - - - - - gtk.Style.paint_flat_box - - - paint_flat_box - window - state_type - shadow_type - area - widget - detail - x - y - width - height - - - - window : - a gtk.gdk.Window - - - state_type : - a widget state - - - shadow_type : - a shadow type - one of: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT - - - area : - a clipping rectangle - - - widget : - a widget - - - detail : - a detail string - - - x : - the x location - - - y : - the y location - - - width : - the width - - - height : - the height - - - - The paint_flat_box() method draws a -flat box (no shadow) on the specified window with -the location and size specified by x, -y, width and -height. If area is not -None it specifies a clipping rectangle. The style state -specified by state_type determines the graphics -context to use while drawing. - - - - - gtk.Style.paint_check - - - paint_check - window - state_type - shadow_type - area - widget - detail - x - y - width - height - - - - window : - a gtk.gdk.Window - - - state_type : - a widget state - - - shadow_type : - a shadow type - one of: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT - - - area : - a clipping rectangle - - - widget : - a widget - - - detail : - a detail string - - - x : - the x location - - - y : - the y location - - - width : - the width - - - height : - the height - - - - The paint_check() method draws a check -on the specified window with the shadow type -specified by shadow_type and the location and size -specified by x, y, -width and height. If -area is not None it specifies a -clipping rectangle. The widget state specified by -state_type determines the graphics context to use -while drawing. - - - - - gtk.Style.paint_option - - - paint_option - window - state_type - shadow_type - area - widget - detail - x - y - width - height - - - - window : - a gtk.gdk.Window - - - state_type : - a widget state - - - shadow_type : - a shadow type - one of: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT - - - area : - a clipping rectangle - - - widget : - a widget - - - detail : - a detail string - - - x : - the x location - - - y : - the y location - - - width : - the width - - - height : - the height - - - - The paint_option() method draws an -option menu item on the specified window with the -shadow type specified by shadow_type and the location -and size specified by x, y, -width and height. If -area is not None it specifies a -clipping rectangle. The widget state specified by -state_type determines the graphics context to use -while drawing. - - - - - gtk.Style.paint_tab - - - paint_tab - window - state_type - shadow_type - area - widget - detail - x - y - width - height - - - - window : - a gtk.gdk.Window - - - state_type : - a widget state - - - shadow_type : - a shadow type - one of: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT - - - area : - a clipping rectangle - - - widget : - a widget - - - detail : - a detail string - - - x : - the x location - - - y : - the y location - - - width : - the width - - - height : - the height - - - - The paint_tab() method draws a tab on -the specified window with the shadow type specified -by shadow_type and the location and size specified by -x, y, -width and height. If -area is not None it specifies a -clipping rectangle. The widget state specified by -state_type determines the graphics context to use -while drawing. - - - - - gtk.Style.paint_shadow_gap - - - paint_shadow_gap - window - state_type - shadow_type - area - widget - detail - x - y - width - height - gap_side - gap_x - gap_width - - - - window : - a gtk.gdk.Window - - - state_type : - a widget state - - - shadow_type : - a shadow type - one of: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT - - - area : - a clipping rectangle - - - widget : - a widget - - - detail : - a detail string - - - x : - the x location - - - y : - the y location - - - width : - the width - - - height : - the height - - - gap_side : - a position - one of: -gtk.POS_LEFT, gtk.POS_RIGHT, -gtk.POS_TOP, -gtk.POS_BOTTOM - - - gap_x : - the x position of the gap - - - gap_width : - the gap width - - - - The paint_shadow_gap() method draws a -shadow with a gap on the specified window with the -shadow type specified by shadow_type and the location -and size specified by x, y, -width and height. The gap -position and width is specified by gap_side, -gap_x and gap_width. If -area is not None it specifies a -clipping rectangle. The widget state specified by -state_type determines the graphics context to use -while drawing. - - - - - gtk.Style.paint_box_gap - - - paint_box_gap - window - state_type - shadow_type - area - widget - detail - x - y - width - height - gap_side - gap_x - gap_width - - - - window : - a gtk.gdk.Window - - - state_type : - a widget state - - - shadow_type : - a shadow type - one of: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT - - - area : - a clipping rectangle - - - widget : - a widget - - - detail : - a detail string - - - x : - the x location - - - y : - the y location - - - width : - the width - - - height : - the height - - - gap_side : - a position - one of: -gtk.POS_LEFT, gtk.POS_RIGHT, -gtk.POS_TOP, -gtk.POS_BOTTOM - - - gap_x : - the x position of the gap - - - gap_width : - the gap width - - - - The paint_box_gap() method draws a box -with a gap on the specified window with the shadow -type specified by shadow_type and the location and -size specified by x, y, -width and height. The gap -position and width is specified by gap_side, -gap_x and gap_width. If -area is not None it specifies a -clipping rectangle. The widget state specified by -state_type determines the graphics context to use -while drawing. - - - - - gtk.Style.paint_extension - - - paint_extension - window - state_type - shadow_type - area - widget - detail - x - y - width - height - gap_side - - - - window : - a gtk.gdk.Window - - - state_type : - a widget state - - - shadow_type : - a shadow type - one of: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT - - - area : - a clipping rectangle - - - widget : - a widget - - - detail : - a detail string - - - x : - the x location - - - y : - the y location - - - width : - the width - - - height : - the height - - - gap_side : - a position - one of: -gtk.POS_LEFT, gtk.POS_RIGHT, -gtk.POS_TOP, -gtk.POS_BOTTOM - - - - The paint_extension() method draws an -extension on the specified window with the shadow -type specified by shadow_type and the location and -size specified by x, y, -width and height. The -extension position is specified by gap_side. If -area is not None it specifies a -clipping rectangle. The widget state specified by -state_type determines the graphics context to use -while drawing. - - - - - gtk.Style.paint_focus - - - paint_focus - window - state_type - area - widget - detail - x - y - width - height - - - - window : - a gtk.gdk.Window - - - state_type : - a widget state - - - area : - a clipping rectangle - - - widget : - a widget - - - detail : - a detail string - - - x : - the x location - - - y : - the y location - - - width : - the width - - - height : - the height - - - - The paint_focus() method draws a focus -indicator on the specified window with the location -and size specified by x, y, -width and height. If -area is not None it specifies a -clipping rectangle. The widget state specified by -state_type determines the graphics context to use -while drawing. - - - - - gtk.Style.paint_slider - - - paint_slider - window - state_type - shadow_type - area - widget - detail - x - y - width - height - orientation - - - - window : - a gtk.gdk.Window - - - state_type : - a widget state - - - shadow_type : - a shadow type - one of: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT - - - area : - a clipping rectangle - - - widget : - a widget - - - detail : - a detail string - - - x : - the x location - - - y : - the y location - - - width : - the width - - - height : - the height - - - orientation : - a position - one of: -gtk.ORIENTATION_HORIZONTAL or -gtk.ORIENTATION_VERTICAL - - - - The paint_slider() method draws a -slider with the specified orientation on the -specified window with the shadow type specified by -shadow_type and the location and size specified by -x, y, -width and height. If -area is not None it specifies a -clipping rectangle. The widget state specified by -state_type determines the graphics context to use -while drawing. - - - - - gtk.Style.paint_handle - - - paint_handle - window - state_type - shadow_type - area - widget - detail - x - y - width - height - orientation - - - - window : - a gtk.gdk.Window - - - state_type : - a widget state - - - shadow_type : - a shadow type - one of: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN, -gtk.SHADOW_ETCHED_OUT - - - area : - a clipping rectangle - - - widget : - a widget - - - detail : - a detail string - - - x : - the x location - - - y : - the y location - - - width : - the width - - - height : - the height - - - orientation : - a position - one of: -gtk.ORIENTATION_HORIZONTAL or -gtk.ORIENTATION_VERTICAL - - - - The paint_handle() method draws a -handle with the specified orientation on the -specified window with the shadow type specified by -shadow_type and the location and size specified by -x, y, -width and height. If -area is not None it specifies a -clipping rectangle. The widget state specified by -state_type determines the graphics context to use -while drawing. - - - - - gtk.Style.paint_expander - - - paint_expander - window - state_type - area - widget - detail - x - y - expander_style - - - - window : - a gtk.gdk.Window - - - state_type : - a widget state - - - area : - a clipping rectangle - - - widget : - a widget - - - detail : - a detail string - - - x : - the x location - - - y : - the y location - - - expander_style : - an expander style - one of: -gtk.EXPANDER_COLLAPSED, -gtk.EXPANDER_SEMI_COLLAPSED, -gtk.EXPANDER_SEMI_EXPANDED or -gtk.EXPANDER_EXPANDED - - - - The paint_expander() method draws an -expander with the specified expander_style on the -specified window at the location specified by -x, y. If -area is not None it specifies a -clipping rectangle. The widget state specified by -state_type determines the graphics context to use -while drawing. - - - - - gtk.Style.paint_layout - - - paint_layout - window - state_type - use_text - area - widget - detail - x - y - layout - - - - window : - a gtk.gdk.Window - - - state_type : - a widget state - - - use_text : - if True use the text -graphics context for drawing - - - area : - a clipping rectangle - - - widget : - a widget - - - detail : - a detail string - - - x : - the x location - - - y : - the y location - - - layout : - a Pango.Layout object -containing the text to display - - - - The paint_layout() method draws the -text in a pango.Layout specified by -layout on the specified window -at the location specified by x and -y. If text is True use the text -graphics context of the style for drawing, otherwise use the fg graphics -context. If area is not None it -specifies a clipping rectangle. The widget state specified by -state_type determines the graphics context to use -while drawing. - - - - - gtk.Style.paint_resize_grip - - - paint_resize_grip - window - state_type - area - widget - detail - edge - x - y - width - height - - - - window : - a gtk.gdk.Window - - - state_type : - a widget state - - - area : - a clipping rectangle - - - widget : - a widget - - - detail : - a detail string - - - edge : - the edge in which to draw the resize grip, -currently only gtk.WINDOW_EDGE_SOUTH_EAST is -implemented - - - x : - the x location - - - y : - the y location - - - width : - the width - - - height : - the height - - - - The paint_resize_grip() method draws a -resize grip at the specified edge on the specified -window with the location and size specified by -x, y, -width and height. If -area is not None it specifies a -clipping rectangle. The widget state specified by -state_type determines the graphics context to use -while drawing. Currently the grip can only be drawn at the -gtk.WINDOW_EDGE_SOUTH_EAST (lower right) edge. - - - - - - - Signals - - - The "realize" gtk.Style Signal - - callback - style - user_param1 - ... - - - - - style : - the object which received the - signal. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - - This signal is available in GTK+ 2.4 and above. - - - Emitted when the style has been initialized for a particular - colormap and depth. Connecting to this signal is probably seldom - useful since most of the time applications and widgets only deal with - styles that have been already realized. - - - - - The "unrealize" gtk.Style Signal - - callback - style - user_param1 - ... - - - - - style : - the object which received the - signal. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - - This signal is available in GTK+ 2.4 and above. - - - Emitted when the aspects of the style specific to a particular - colormap and depth are being cleaned up. A connection to this signal - can be useful if a widget wants to cache objects like a gtk.gdk.GC as - object data on gtk.Style. - This signal provides a convenient place to free such cached - objects. - - - - - -
diff --git a/docs/reference/pygtk-gtktable.xml b/docs/reference/pygtk-gtktable.xml deleted file mode 100644 index d6dd568b..00000000 --- a/docs/reference/pygtk-gtktable.xml +++ /dev/null @@ -1,761 +0,0 @@ - - - - - - gtk.Table - layout widgets in a two-dimensional array - - - - Synopsis - - - gtk.Table - gtk.Container - - gtk.Table - rows1 - columns1 - homogeneousFalse - - - resize - rows - columns - - - attach - child - left_attach - right_attach - top_attach - bottom_attach - xoptionsgtk.EXPAND|gtk.FILL - yoptionsgtk.EXPAND|gtk.FILL - xpadding0 - ypadding0 - - - set_row_spacing - row - spacing - - - get_row_spacing - row - - - set_col_spacing - column - spacing - - - get_col_spacing - column - - - set_row_spacings - spacing - - - get_default_row_spacing - - - set_col_spacings - spacing - - - get_default_col_spacing - - - set_homogeneous - homogeneous - - - get_homogeneous - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Table - - - - - - gtk.Table Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - -
- - - - - - - - - "column-spacing" - Read-Write - The amount of space between two adjacent -columns - - - - "homogeneous" - Read-Write - If True, the table cells are all the -same width or height - - - - "n-columns" - Read-Write - The number of columns in the table - - - - "n-rows" - Read-Write - The number of rows in the table - - - - "row-spacing" - Read-Write - The amount of space between two adjacent rows - - - - - -
- -
- - - gtk.Table Style Properties - - gtk.Widget Style Properties - - - - - gtk.Table Child Properties - -
- - - - - - - - - "bottom-attach" - Read-Write - The lowest row of the child - - - - "left-attach" - Read-Write - The leftmost column of the child - - - - "right-attach" - Read-Write - The rightmost column of the child - - - - "top-attach" - Read-Write - The uppermost row of the child - - - - "x-options" - Read-Write - the horizontal behavior of the child - a combination -of: gtk.EXPAND, gtk.SHRINK and -gtk.FILL - - - - "x-padding" - Read-Write - Extra space added between the child widget and its left -and right neighbors, in pixels - - - - "y-options" - Read-Write - the vertical behavior of the child - a combination of: -gtk.EXPAND, gtk.SHRINK and -gtk.FILL - - - - "y-padding" - Read-Write - Extra space added between the child widget and its top -and bottom neighbors, in pixels - - - - - -
- - - gtk.Table Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - -
- - - Description - - The gtk.Table manages a -group of widgets that are arranged 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(). The size of a table can -be changed using the resize() -method. - - Widgets can be added to a table using the attach() -method. To alter the space of the row next to a specific row, use the set_row_spacing() -method, and for a column, the set_col_spacing() -method. The gaps between all rows or columns can be changed by calling the -set_row_spacings() -or set_col_spacings() -methods respectively. The set_homogeneous() -method changes the setting that determines whether all cells in the table -will resize themselves to the size of the largest widget in the -table. - - - - - Constructor - - - gtk.Table - rows1 - columns1 - homogeneousFalse - - - - rows : - the number of rows - - - columns : - the number of columns - - - homogeneous : - if True all table cells will -be the same size as the largest cell - - - Returns : - a new gtk.Table -widget - - - - Creates a new gtk.Table widget with -the number of rows and columns specified by the value of -rows and columns respectively. -The value of rows and columns -must be in the range 0 .. 65535. If homogeneous is -True the table cells will all be the same size as the -largest cell. If rows or -columns are not specified they default to 1. - - - - - Methods - - - gtk.Table.resize - - - resize - rows - columns - - - - rows : - The new number of rows. - - - columns : - The new number of columns. - - - - The resize() method changes the size of -the table as specified by the parameters, rows and -columns. - - - - - gtk.Table.attach - - - attach - child - left_attach - right_attach - top_attach - bottom_attach - xoptions - gtk.EXPAND|gtk.FILL - yoptions - gtk.EXPAND|gtk.FILL - xpadding - 0 - ypadding - 0 - - - - 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 top side of a -child widget to. - - - bottom_attach : - the row number to attach the bottom side of a -child widget to. - - - xoptions : - used to specify the properties of the child -widget when the table is resized horizontally. - - - yoptions : - used to specify the properties of the child -widget when the table is resized vertically. - - - xpadding : - the amount of padding to add on the left and -right of the widget - - - ypadding : - the amount of padding to add above and below -the widget - - - - The attach() method adds the widget -specified by child to the table. The number of -'cells' that a widget will occupy is specified by: - - - - left_attach - the column to the -left of the widget - - - right_attach - the column to the -right of the widget - - - top_attach - the row above the -widget and - - - bottom_attach - the row below the -widget - - - - The xoptions and -yoptions determine the expansion properties of the -widget in the horizontal and vertical directions respectively (the default -value is gtk.FILL|gtk.EXPAND). The -value of the options is a combination of: - - - - gtk.EXPAND - - the table cell should expand to take up any extra space -that has been allocated to the table. - - - - gtk.SHRINK - - the widget should shrink when the table cell -shrinks. - - - - gtk.FILL - - the widget should fill the space allocated to -it in the table cell. - - - - - The xpadding and ypadding parameters determine the extra padding added around the widget. By default these are 0. - - - - - gtk.Table.set_row_spacing - - - set_row_spacing - row - spacing - - - - row : - the row number whose spacing will be -changed. - - - spacing : - the number of pixels of added -spacing - - - - The set_row_spacing() method sets the -spacing in pixels (specified by spacing) between the -specified row and the following row. - - - - - gtk.Table.get_row_spacing - - - get_row_spacing - row - - - - row : - a row in the table, 0 indicates the first -row - - - Returns : - the row spacing - - - - The get_row_spacing() method returns -the amount of space between the specified row, and -the following row. See the set_row_spacing() -method. - - - - - gtk.Table.set_col_spacing - - - set_col_spacing - column - spacing - - - - column : - the column number whose spacing will be -changed. - - - spacing : - the number of pixels of added -spacing - - - - The set_col_spacing() method sets the -spacing in pixels (specified by spacing) between the -specified column and the following column. - - - - - gtk.Table.get_col_spacing - - - get_col_spacing - column - - - - column : - a column in the table, 0 indicates the first -column - - - Returns : - the column spacing - - - - The get_col_spacing() returns the -amount of space between the specified column, and the -following column. See the set_col_spacing() -method. - - - - - gtk.Table.set_row_spacings - - - set_row_spacings - spacing - - - - spacing : - the number of pixels of space to place between -every row in the table. - - - - The set_row_spacings() method sets the -"row-spacing" property, that determines the space between every row in -table, to the value of spacing. - - - - - gtk.Table.get_default_row_spacing - - - get_default_row_spacing - - - - Returns : - the default row spacing - - - - The get_default_row_spacing() method -returns the value of the "row-spacing" property that specifies the default -row spacing for the table i.e. the spacing that will be used for newly added -rows. (See the set_row_spacings()) - - - - - gtk.Table.set_col_spacings - - - set_col_spacings - spacing - - - - spacing : - the number of pixels of space to place between -every column in the table. - - - - The set_col_spacings() method sets the -"column-spacing" property, that determines the space between every column in -table, to the value of spacing. - - - - - gtk.Table.get_default_col_spacing - - - get_default_col_spacing - - - - Returns : - the default column spacing - - - - The get_default_col_spacing() method -returns the value of the "column-spacing" property to the default column -spacing for the table i.e. the spacing that will be used for newly added -columns. (See the set_col_spacings()) - - - - - gtk.Table.set_homogeneous - - - set_homogeneous - homogeneous - - - - homogeneous : - if True all cells will be -the same size as the largest cell - - - - The set_homogeneous() method sets the -"homogeneous" property to the value of homogeneous. If -homogeneous is True all cells will be the same size as the -largest cell. - - - - - gtk.Table.get_homogeneous - - - get_homogeneous - - - - Returns : - True if the cells are all -set to the same size - - - - The get_homogeneous() method returns the -value of the "homogeneous" property. If the value of "homogeneous" is -True all cells are set to the same width and height. (See -the set_homogeneous() -method) - - - - - -
diff --git a/docs/reference/pygtk-gtktearoffmenuitem.xml b/docs/reference/pygtk-gtktearoffmenuitem.xml deleted file mode 100644 index e4793bd3..00000000 --- a/docs/reference/pygtk-gtktearoffmenuitem.xml +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - gtk.TearoffMenuItem - a menu item used to tear off and reattach its -menu. - - - - Synopsis - - - gtk.TearoffMenuItem - gtk.MenuItem - - gtk.TearoffMenuItem - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Item - +-- gtk.MenuItem - +-- gtk.TearoffMenuItem - - - - - - gtk.TearoffMenuItem Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - - - - - gtk.TearoffMenuItem Style Properties - - gtk.Widget Style Properties - gtk.MenuItem Style Properties - - - - - gtk.TearoffMenuItem Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Item Signal Prototypes - gtk.MenuItem Signal Prototypes - - - - Description - - A gtk.TearoffMenuItem -is a special gtk.MenuItem which -is used to tear off and reattach its menu. When its menu is shown normally, -the gtk.TearoffMenuItem -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 gtk.TearoffMenuItem -is drawn as a dotted line which has a left pointing arrow graphic indicating -that the tearoff menu can be reattached. Activating it will remove the -tearoff menu window. - - - - - Constructor - - - gtk.TearoffMenuItem - - - - Returns : - a new gtk.TearoffMenuItem -widget - - - - Creates a new gtk.TearoffMenuItem -widget. - - - - diff --git a/docs/reference/pygtk-gtktextattributes.xml b/docs/reference/pygtk-gtktextattributes.xml deleted file mode 100644 index 89b1fbd4..00000000 --- a/docs/reference/pygtk-gtktextattributes.xml +++ /dev/null @@ -1,353 +0,0 @@ - - - - - - gtk.TextAttributes - an object containing the attributes set on some -text - - - - Synopsis - - - gtk.TextAttributes - gobject.GBoxed - - gtk.TextAttributes - - - copy - - - copy_values - dest - - - - - - - Attributes - -
- - - - - - - - - - "bg_color" - Read - The background color - - - - "fg_color" - Read - The foreground color - - - - "bg_stipple" - Read - The background stipple bitmap - - - - "fg_stipple" - Read - The foreground stipple bitmap - - - - "rise" - Read - The subscript or superscript rise - - - - "underline" - Read - The style of underline - one of: -pango.UNDERLINE_NONE, -pango.UNDERLINE_SINGLE, -pango.UNDERLINE_DOUBLE, -pango.UNDERLINE_LOW - - - - "strikethrough" - Read - If True strikethrough the text - - - - "draw_bg" - Read - If True some background attributes -are set - - - - "justification" - Read - The type of justification - one of: -gtk.JUSTIFY_LEFT, gtk.JUSTIFY_RIGHT, -gtk.JUSTIFY_CENTER, -gtk.JUSTIFY_FILL - - - - "direction" - Read - The text direction - one of: -gtk.TEXT_DIR_NONE, gtk.TEXT_DIR_LTR, -gtk.TEXT_DIR_RTL - - - - "font" - Read - A pango.FontDescription - - - - "font_scale" - Read - The scale of the font e.g. 2.5 - - - - "left_margin" - Read - The width of the left margin in pixels - - - - "indent" - Read - The width of the paragraph indent in pixels - - - - "right_margin" - Read - The width of the right margin - - - - "pixels_above_lines" - Read - The number of pixels space above a paragraph - - - - "pixels_below_lines" - Read - The number of pixels space below a paragraph - - - - "pixels_inside_wrap" - Read - The number of pixels of space between wrapped lines in -a paragraph - - - - "tabs" - Read - A set of tabs contained in a -pango.TabArray - - - - "wrap_mode" - Read - The wrap mode - one of: gtk.WRAP_NONE, - gtk.WRAP_CHAR, - gtk.WRAP_WORD - - - - "language" - Read - The pango.Language object -describing the text language - - - - "invisible" - Read - If True the text is hidden (Not -implemented in PyGTK2) - - - - "bg_full_height" - Read - If True the background is fit to the -full line height - - - - "editable" - Read - If True the text is editable - - - - "realized" - Read - If True the text has been -realized - - - - "pad1" - Read - - - - - "pad2" - Read - - - - - "pad3" - Read - - - - - "pad4" - Read - - - - - - -
- -
- - - Description - - A gtk.TextAttributes -object holds a set of attributes that describe the properties of a section -of text. A gtk.TextAttributes -object is usually obtained by calling either of the gtk.TextIter.get_attributes() -or gtk.TextView.get_default_attributes() -methods to retrieve the attributes in effect. - - A gtk.TextAttributes -object created with gtk.TextAttributes() cannot -be applied within PyGTK because there is no way to set the attributes. -Likewise, the copy() -and copy_values() -methods can create a new copy or copy the attributes but there are no -methods in PyGTK that take a gtk.TextAttributes -object as an argument. The most effective way to use a gtk.TextAttributes -object is to read its attributes and use them to set the properties of a -gtk.TextTag. - - - - - Constructor - - - gtk.TextAttributes - - - - Returns : - a new gtk.TextAttributes - - - - Creates a gtk.TextAttributes -object, that contains a set of attributes of some text. - - - - - Methods - - - gtk.TextAttributes.copy - - - copy - - - - Returns : - a copy of the gtk.TextAttributes -object - - - - The copy() method copies the text -attributes and returns a new gtk.TextAttributes -object. - - - - - gtk.TextAttributes.copy_values - - - copy_values - dest - - - - dest : - the gtk.TextAttributes -whose attributes will be set - - - - The copy_values() method copies the -values from the gtk.TextAttributes -object to dest so that dest -has the same values. Frees existing values in -dest. - - - - - -
diff --git a/docs/reference/pygtk-gtktextbuffer.xml b/docs/reference/pygtk-gtktextbuffer.xml deleted file mode 100644 index c9d9daa1..00000000 --- a/docs/reference/pygtk-gtktextbuffer.xml +++ /dev/null @@ -1,3943 +0,0 @@ - - - - - - gtk.TextBuffer - stores attributed text for display in a gtk.TextView - - - - Synopsis - - - gtk.TextBuffer - gobject.GObject - - gtk.TextBuffer - table - None - - - - get_line_count - - - get_char_count - - - get_tag_table - - - set_text - text - - - insert - iter - text - - - insert_at_cursor - text - - - insert_interactive - iter - text - default_editable - - - insert_interactive_at_cursor - text - default_editable - - - insert_range - iter - start - end - - - insert_range_interactive - iter - start - end - default_editable - - - insert_with_tags - iter - text - ... - - - insert_with_tags_by_name - iter - text - ... - - - delete - start - end - - - delete_interactive - start_iter - end_iter - default_editable - - - get_text - start - end - include_hidden_chars - True - - - get_slice - start - end - include_hidden_chars - True - - - insert_pixbuf - iter - pixbuf - - - insert_child_anchor - iter - anchor - - - create_child_anchor - iter - - - create_mark - mark_name - where - left_gravity - False - - - move_mark - mark - where - - - delete_mark - mark - - - get_mark - name - - - move_mark_by_name - name - where - - - delete_mark_by_name - name - - - get_insert - - - get_selection_bound - - - place_cursor - where - - - select_range - ins - bound - - - apply_tag - tag - start - end - - - remove_tag - tag - start - end - - - apply_tag_by_name - name - start - end - - - remove_tag_by_name - name - start - end - - - remove_all_tags - start - end - - - create_tag - tag_name - None - ... - - - get_iter_at_line_offset - line_number - char_offset - - - get_iter_at_line_index - line_number - byte_index - - - get_iter_at_offset - char_offset - - - get_iter_at_line - line_number - - - get_start_iter - - - - get_end_iter - - - - get_bounds - - - - get_iter_at_mark - mark - - - get_iter_at_child_anchor - anchor - - - get_modified - - - set_modified - setting - - - add_selection_clipboard - clipboard - - - remove_selection_clipboard - clipboard - - - cut_clipboard - clipboard - default_editable - - - copy_clipboard - clipboard - - - paste_clipboard - clipboard - override_location - default_editable - - - get_selection_bounds - - - - delete_selection - interactive - default_editable - - - begin_user_action - - - - end_user_action - - - - backspace - iter - interactive - default_editable - - - get_has_selection - - - - get_copy_target_list - - - - get_paste_target_list - - - - register_serialize_format - mime_type - function - user_data - - - register_serialize_tagset - tagset_nameNULL - - - register_deserialize_format - mime_type - function - user_data - - - register_deserialize_tagset - tagset_nameNULL - - - unregister_serialize_format - format - - - unregister_deserialize_format - format - - - deserialize_set_can_create_tags - format - can_create_tags - - - deserialize_get_can_create_tags - format - - - get_serialize_formats - - - - get_deserialize_formats - - - - serialize - content_buffer - format - start - end - - - deserialize - content_buffer - format - iter - data - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.TextBuffer - - - - - - gtk.TextBuffer Properties - -
- - - - - - - - - "copy-target-list" - Read - The list of targets this buffer supports for clipboard - copying and as DND source. This property is available in GTK+ - 2.10 and above. - - - - "cursor-position" - Read - The position of the insert mark (as offset from the - beginning of the buffer). It is useful for getting notified - when the cursor moves. Allowed values: >= 0. Default value: - 0. This property is available in GTK+ 2.10 and above. - - - - "has-selection" - Read - If True the buffer has some text - currently selected. Default value: - False. This property is available in GTK+ - 2.10 and above. - - - - "paste-target-list" - Read - The list of targets this buffer supports for clipboard - pasting and as DND destination. This property is available in - GTK+ 2.10 and above. - - - - "tag-table" - Read-Write-Construct Only - The gtk.TextTagTable - associated with the textbuffer. Available in GTK+ 2.2 and - above. - - - - "text" - Read-Write - The text content of the buffer. Without child widgets - and images, see the gtk.TextBuffer.get_text() - method for more information. Default value: "". This property - is available in GTK+ 2.8 and above. - - - - - -
- -
- - - Attributes - -
- - - - - - - - - - "tag_table" - Read - The gtk.TextTagTable -associated with the textbuffer. - - - - - -
- -
- - - gtk.TextBuffer Signal Prototypes - - gobject.GObject Signal Prototypes - - - - "apply-tag" - - callback - textbuffer - texttag - start - end - user_param1 - ... - - - - - "begin-user-action" - - callback - textbuffer - user_param1 - ... - - - - - "changed" - - callback - textbuffer - user_param1 - ... - - - - - "delete-range" - - callback - textbuffer - start - end - user_param1 - ... - - - - - "end-user-action" - - callback - textbuffer - user_param1 - ... - - - - - "insert-child-anchor" - - callback - textbuffer - iter - anchor - user_param1 - ... - - - - - "insert-pixbuf" - - callback - textbuffer - iter - pixbuf - user_param1 - ... - - - - - "insert-text" - - callback - textbuffer - iter - text - length - user_param1 - ... - - - - - "mark-deleted" - - callback - textbuffer - textmark - user_param1 - ... - - - - - "mark-set" - - callback - textbuffer - iter - textmark - user_param1 - ... - - - - - "modified-changed" - - callback - textbuffer - user_param1 - ... - - - - - "remove-tag" - - callback - textbuffer - texttag - start - end - user_param1 - ... - - - - - - - - - Description - - A gtk.TextBuffer -is the core component of the PyGTK text editing system. A gtk.TextBuffer -contains the text, pixbufs and child widget anchors that are displayed in -one or more gtk.TextView -widgets. A gtk.TextBuffer -has an associated gtk.TextTagTable -that contains the gtk.TextTag objects -that can be used to set attributes on the text in the textbuffer. - - A gtk.TextBuffer -can be automatically created when creating a gtk.TextView or it -can be created with the gtk.TextBuffer() constructor and -associated with a gtk.TextView using -the set_buffer() -method or the gtk.TextView() -constructor. - - - - - Constructor - - - gtk.TextBuffer - table - None - - - - table : - a tag table, or None to create a new -one - - - Returns : - a new text buffer object - - - - Creates a new gtk.TextBuffer -object. - - - - - Methods - - - gtk.TextBuffer.get_line_count - - - get_line_count - - - - Returns : - the number of lines in the -buffer - - - - The get_line_count() method returns the -number of lines in the buffer. This value is cached, so the function is very -fast. - - - - - gtk.TextBuffer.get_char_count - - - get_char_count - - - - Returns : - the number of characters in the -buffer - - - - The get_char_count() method returns the -number of characters in the buffer; note that characters and bytes are not -the same, you can't e.g. expect the contents of the buffer in string form to -be this many bytes long. The character count is cached, so this function is -very fast. - - - - - gtk.TextBuffer.get_tag_table - - - get_tag_table - - - - Returns : - the buffer's tag table - - - - The get_tag_table() method returns the -gtk.TextTagTable -object associated with the textbuffer. - - - - - gtk.TextBuffer.set_text - - - set_text - text - - - - text : - UTF-8 text to insert - - - - The set_text() method replaces the -current contents of the textbuffer with the contents of -text. text must be valid -UTF-8. - - - - - gtk.TextBuffer.insert - - - insert - iter - text - - - - iter : - a gtk.TextIter -specifying a position in the buffer - - - text : - UTF-8 format text to -insert - - - - The insert() method inserts the -contents of text into the textbuffer at the position -specified by iter. The "insert_text" signal is -emitted and the text insertion actually occurs in the default handler for -the signal. iter is invalidated when insertion occurs -(because the buffer contents change), but the default signal handler -revalidates it to point to the end of the inserted text. - - - - - gtk.TextBuffer.insert_at_cursor - - - insert_at_cursor - text - - - - text : - some text in UTF-8 format - - - - The insert_at_cursor() method is a -convenience method that calls the insert() -method, using the current cursor position as the insertion point. - - - - - gtk.TextBuffer.insert_interactive - - - insert_interactive - iter - text - default_editable - - - - iter : - a gtk.TextIter -specifying a position in -buffer - - - text : - some UTF-8 text - - - default_editable : - default editability of -buffer - - - Returns : - True if the text was -actually inserted - - - - The insert_interactive() method is -similar to the insert() -method, except the insertion of text at -iter will not occur if iter is -at a non-editable location in the buffer. A location is non-editable if a -gtk.TextTag -applied at that location has its "editable" attribute set to -False or the gtk.TextView used -by the user is set non-editable. Usually you want to prevent insertions at -locations if the insertion results from a user action (is -interactive). - - default_editable indicates the -editability of text that doesn't have a tag affecting editability applied to -it. Typically the result of the gtk.TextView.get_editable() -method is appropriate here. - - - - - gtk.TextBuffer.insert_interactive_at_cursor - - - insert_interactive_at_cursor - text - default_editable - - - - text : - text in UTF-8 format - - - default_editable : - default editability of -buffer - - - Returns : - True if the text was -actually inserted - - - - The insert_interactive_at_cursor() -method calls the insert_interactive() -method to insert text at the cursor (insert) -position. default_editable indicates the editability -of text that doesn't have a tag affecting editability applied to it. -Typically the result of the gtk.TextView.get_editable() -method is appropriate here. - - - - - gtk.TextBuffer.insert_range - - - insert_range - iter - start - end - - - - iter : - a gtk.TextIter -specifying a position in the -textbuffer - - - start : - a gtk.TextIter -specifying a position in a (possibly different) gtk.TextBuffer - - - end : - a gtk.TextIter -specifying another position in the same buffer as -start - - - - The insert_range() method copies text, -tags, and pixbufs (but not child anchors) between -start and end (the order of -start and end doesn't matter) -form a gtk.TextBuffer -and inserts the copy at iter. Used instead of simply -getting/inserting text because it preserves images and tags. If -start and end are in a -different buffer from buffer, the two buffers must -share the same tag table. This method is implemented via emissions of the -"insert_text" and "apply_tag" signals. - - - - - gtk.TextBuffer.insert_range_interactive - - - insert_range_interactive - iter - start - end - default_editable - - - - iter : - a gtk.TextIter -specifying a position in the -textbuffer - - - start : - a gtk.TextIter -specifying a position in a (possibly different) gtk.TextBuffer - - - end : - a gtk.TextIter -specifying another position in the same buffer as -start - - - default_editable : - default editability of the -buffer - - - Returns : - True if an insertion was -possible at iter - - - - The insert_range_interactive() method -is similar to the insert_range() -method, except the insertion of text at -iter will not occur if the insertion position is -non-editable. A location is non-editable if a gtk.TextTag applied -at that location has its "editable" attribute set to -False or the gtk.TextView used -by the user is set non-editable. The default_editable -parameter indicates whether the text is editable at -iter if no tags enclosing iter -affect editability. Typically the result of the gtk.TextView.get_editable() -method is appropriate here. - - - - - - gtk.TextBuffer.insert_with_tags - - - insert_with_tags - iter - text - ... - - - - iter : - a gtk.TextIter -specifying a position in buffer - - - text : - UTF-8 text - - - ... : - one or more optional gtk.TextTag objects -to apply to text - - - - The insert_with_tags() method inserts -the specified text into the textbuffer at the -location specified by iter, applying any optional -tags following the first two parameters to the newly-inserted text. This -method is a convenience method that is equivalent to calling the insert() -method, then the apply_tag() -method on the inserted text. - - - - - gtk.TextBuffer.insert_with_tags_by_name - - - insert_with_tags_by_name - iter - text - ... - - - - iter : - a gtk.TextIter -specifying a position in buffer - - - text : - UTF-8 text - - - ... : - one or more optional gtk.TextTag names -to apply to text - - - - The insert_with_tags_by_name() method -is similar to the insert_with_tags() -method, but uses tag names instead of tag objects. - - - - - gtk.TextBuffer.delete - - - delete - start - end - - - - start : - a gtk.TextIter -specifying a position in the textbuffer - - - end : - a gtk.TextIter -specifying another position in the textbuffer - - - - The delete() method deletes the text -between start and end. The -order of start and end is not -actually relevant as the delete() method will -reorder them. This method emits the "delete_range" signal, and the default -handler of that signal deletes the text. Because the textbuffer is modified, -all outstanding iterators become invalid after calling this function; -however, start and end will be -re-initialized to point to the location where text was deleted. - - - - - gtk.TextBuffer.delete_interactive - - - delete_interactive - start_iter - end_iter - default_editable - - - - start_iter : - a gtk.TextIter -specifying the start of the text to delete - - - end_iter : - a gtk.TextIter -specifying the end of the text to delete - - - default_editable : - whether the buffer is editable by -default - - - Returns : - True if some text was -actually deleted - - - - The delete_interactive() method deletes -all editable text in the given range. This method calls -the delete() -method for each editable sub-range of -[start,end). -start and end are revalidated -to point to the location of the last deleted range, or left untouched if no -text was deleted. A range of text is non-editable if -a gtk.TextTag -applied to that range has its "editable" attribute set to -False or the gtk.TextView used -by the user is set non-editable. The default_editable -parameter indicates whether text is editable if no -tags enclosing any part of text affect editability. -Typically the result of the gtk.TextView.get_editable() -method is appropriate here. - - - - - gtk.TextBuffer.get_text - - - get_text - start - end - include_hidden_chars - True - - - - start : - a gtk.TextIter -specifying the start of a range - - - end : - a gtk.TextIter -specifying the end of a range - - - include_hidden_chars : - if True include invisible -text - - - Returns : - the text in the range - - - - The get_text() method returns the text -in the specified range -[start,end). Undisplayed text -(text marked with tags that set the invisibility attribute) are excluded if -include_hidden_chars is False. -get_text() does not return characters representing -embedded images, so byte and character indexes into the returned string do -not correspond to byte and character indexes into the -buffer. Contrast this behavior with the get_slice() -method. - - - - - gtk.TextBuffer.get_slice - - - get_slice - start - end - include_hidden_chars - - - - start : - a gtk.TextIter -specifying the start of a range - - - end : - a gtk.TextIter -specifying the end of a range - - - include_hidden_chars : - if True include invisible -text - - - Returns : - the contents of the range including text and -indicators for pixbufs and child anchors - - - - The get_slice() method returns the text -in the range [start,end). -Undisplayed text (text marked with tags that set the invisibility attribute) -is excluded if include_hidden_chars is -False. The returned string includes a 0xFFFC character -whenever the textbuffer contains embedded images or child anchors, so byte -and character indexes into the returned string do -correspond to byte and character indexes into the buffer. Contrast this -behavior with the get_text() -method. Note that 0xFFFC can occur in normal text as well, so it is not a -reliable indicator that a pixbuf or widget is in the buffer. - - - - - gtk.TextBuffer.insert_pixbuf - - - insert_pixbuf - iter - pixbuf - - - - iter : - a gtk.TextIter -specifying the location to insert the pixbuf - - - pixbuf : - a gtk.gdk.Pixbuf - - - - The insert_pixbuf() method inserts an -image specified by pixbuf into the text buffer at the -location specified by iter. The image will be counted -as one character in character counts, and when obtaining the buffer contents -as a string, will be represented by the Unicode "object replacement -character" 0xFFFC. Note that the "slice" variants for obtaining portions of -the buffer as a string include this character for pixbufs, but the "text" -variants do not. e.g. see the get_slice() -and get_text() -methods. - - - - - gtk.TextBuffer.insert_child_anchor - - - insert_child_anchor - iter - anchor - - - - iter : - a gtk.TextIter -specifying the location to insert the anchor - - - anchor : - a gtk.TextChildAnchor - - - - The insert_child_anchor() method -inserts a child widget anchor specified by anchor -into the textbuffer at the location specified by -iter. The anchor will be counted as one character in -character counts, and when obtaining the buffer contents as a string, will -be represented by the Unicode "object replacement character" 0xFFFC. Note -that the "slice" variants for obtaining portions of the buffer as a string -include this character for child anchors, but the "text" variants do not. -e.g. see the get_slice() -and get_text() -methods. The create_child_anchor() -is a more convenient alternative to this function. - - - - - gtk.TextBuffer.create_child_anchor - - - create_child_anchor - iter - - - - iter : - a gtk.TextIter -specifying a location in the buffer - - - Returns : - the new child anchor - - - - The create_child_anchor() method is a -convenience function that creates a child anchor with the gtk.TextChildAnchor() -constructor and inserts it into the textbuffer at the location specified by -iter with the insert_child_anchor() -method. - - - - - gtk.TextBuffer.create_mark - - - create_mark - mark_name - where - left_gravity - - - - mark_name : - the name for the new mark, or -None - - - where : - a gtk.TextIter -specifying the location to place the mark - - - left_gravity : - if True the mark has left -gravity - - - Returns : - the new gtk.TextMark -object - - - - The create_mark() method creates a mark -with the name specified by mark_name at the position -specified by where and left gravity specified by -left_gravity. If mark_name is -None, the mark is anonymous; otherwise, the mark can be -retrieved by name using the get_mark() -method. If a mark has left gravity, and text is inserted at the mark's -current location, the mark will be moved to the left of the newly-inserted -text. If the mark has right gravity (left_gravity = -False), the mark will end up on the right of -newly-inserted text. The standard left-to-right cursor is a mark with right -gravity (when you type, the cursor stays on the right side of the text -you're typing). Marks are owned by the buffer and go away when the buffer -does. This method emits the "mark_set" signal as notification of the mark's -initial placement. - - - - - gtk.TextBuffer.move_mark - - - move_mark - mark - where - - - - mark : - a gtk.TextMark - - - where : - a gtk.TextIter -specifying a new location for mark - - - - The move_mark() method moves the gtk.TextMark -specified by mark to the new location specified by -where.This method emits the "mark_set" signal as -notification of the move. - - - - - gtk.TextBuffer.delete_mark - - - delete_mark - mark - - - - mark : - a gtk.TextMark in -the textbuffer - - - - The delete_mark() method deletes the -gtk.TextMark -specified by mark, so that it's no longer located -anywhere in the textbuffer. Most operations on mark -become invalid and there is no way to undelete a mark. The get_deleted() -method will return True after this method has been called -on a mark to indicate that a mark no longer belongs to a textbuffer. The -"mark_deleted" signal will be emitted as notification after the mark is -deleted. - - - - - gtk.TextBuffer.get_mark - - - get_mark - name - - - - name : - a mark name - - - Returns : - a gtk.TextMark, or -None - - - - The get_mark() method returns the mark named -name in the textbuffer, or None if -no such mark exists in the buffer. - - - - - gtk.TextBuffer.move_mark_by_name - - - move_mark_by_name - name - where - - - - name : - the name of a mark - - - where : - a gtk.TextIter -specifying the new location for mark - - - - The move_mark_by_name() method moves -the mark named name (which must exist) to the -textbuffer location specified by where. See the move_mark() -method for details. - - - - - gtk.TextBuffer.delete_mark_by_name - - - delete_mark_by_name - name - - - - name : - the name of a mark in -buffer - - - - The delete_mark_by_name() method -deletes the mark (which must exist) named name. See -the delete_mark() -for details. - - - - - gtk.TextBuffer.get_insert - - - get_insert - - - - Returns : - the insertion point mark - - - - The get_insert() method returns the -mark that represents the cursor (insertion point). Equivalent to calling the -get_mark() -method to get the mark named "insert", but very slightly more efficient, and -involving less typing. - - - - - gtk.TextBuffer.get_selection_bound - - - get_selection_bound - - - - Returns : - the selection bound mark - - - - The get_selection_bound() method -returns the mark that represents the selection bound. Equivalent to calling -the get_mark() -method to get the mark named "selection_bound", but very slightly more -efficient, and involving less typing. The currently-selected text in a -textbuffer is the region between the "selection_bound" and "insert" marks. -If "selection_bound" and "insert" are in the same place, then there is no -current selection. The get_selection_bounds() -method is a convenience method for handling the selection, if you just -want to know whether there's a selection and what its bounds are. - - - - - gtk.TextBuffer.place_cursor - - - place_cursor - where - - - - where : - a gtk.TextIter -specifying where to put the cursor - - - - The place_cursor() method moves the -"insert" and "selection_bound" marks simultaneously to the location -specified by where. If you move them to the same -place in two steps with the move_mark() -method, you will temporarily select a region in between their old and new -locations, which is inefficient. This method moves them as a unit, which can -be optimized. - - - - - gtk.TextBuffer.select_range - - - select_range - ins - bound - - - - ins : - a gtk.TextIter -specifying where to put the "insert" mark - - - bound : - a gtk.TextIter -specifying where to put the "selection_bound" mark - - - - - This method is available in PyGTK 2.4 and above. - - - The select_range() method moves the -"insert" and "selection_bound" marks simultaneously to the locations -specified by ins and bound -respectively. If you move them to the same place in two steps with the -move_mark() -method, you will temporarily select a region in between their old and new -locations, which is inefficient. This method moves them as a unit, which can -be optimized. - - - - - gtk.TextBuffer.apply_tag - - - apply_tag - tag - start - end - - - - tag : - a gtk.TextTag - - - start : - a gtk.TextIter -specifying the start of the range - - - end : - a gtk.TextIter -specifying the end of the range - - - - The apply_tag() method emits the -"apply-tag" signal that causes the gtk.TextTag -specified by tag to be applied to the range of text -between start and end by the -default signal handler. start and -end do not have to be in order. - - - - - gtk.TextBuffer.remove_tag - - - remove_tag - tag - start - end - - - - tag : - a gtk.TextTag - - - start : - a gtk.TextIter -specifying the start of the range - - - end : - a gtk.TextIter -specifying the end of the range - - - - The delete_tag() method emits the -"remove_tag" signal that causes the default handler for the signal to remove -all occurrences of the gtk.TextTag -specified by tag from the text in the range between -start and end. -start and end don't have to be -in order. - - - - - gtk.TextBuffer.apply_tag_by_name - - - apply_tag_by_name - name - start - end - - - - name : - the name of a gtk.TextTag - - - start : - a gtk.TextIter -specifying the start of the range - - - end : - a gtk.TextIter -specifying the end of the range - - - - The apply_tag_by_name() method calls -the gtk.TextTagTable.lookup() -method on the textbuffer's tag table to find the gtk.TextTag with -the specified name, then calls the apply_tag() -method to apply that tag to the text in the range between -start and end. -start and end don't have to be -in order. - - - - - gtk.TextBuffer.remove_tag_by_name - - - remove_tag_by_name - name - start - end - - - - name : - the name of a gtk.TextTag - - - start : - a gtk.TextIter -specifying the start of the range - - - end : - a gtk.TextIter -specifying the end of the range - - - - The delete_tag_by_name() method calls -the gtk.TextTagTable.lookup() -method on the textbuffer's tag table to find the gtk.TextTag, then -calls the remove_tag() -method to remove that that tag from the text in the range between -start and end. -start and end don't have to be -in order. - - - - - gtk.TextBuffer.remove_all_tags - - - remove_all_tags - start - end - - - - start : - a gtk.TextIter -specifying the start of the range - - - end : - a gtk.TextIter -specifying the end of the range - - - - The remove_all_tags() method removes -all tags in the text in the range between start and -end. Be careful with this function; it could remove -tags added in code unrelated to the code you're currently writing. That is, -using this function is probably a bad idea if you have two or more unrelated -code sections that add tags. start and -end don't have to be in order. - - - - - gtk.TextBuffer.create_tag - - - create_tag - tag_name - None - ... - - - - tag_name : - the name of the new tag, or -None if the tag is anonymous - - - ... : - one or more property_name= value pairs - - - - Returns : - a new tag - - - - The create_tag() method creates a tag -with the name specified by tag_name and adds it to -the tag table for the textbuffer. If one or more -property_name=value pairs are available they are used to -set the properties of the tag. Note the property_name -must be specified using underscores instead of dashes e.g. use -pixels_above_lines=10 instead of pixels-above-lines=10. This method is -equivalent to calling the gtk.TextTag() constructor and then -adding the tag to the buffer's tag table with the gtk.TextTagTable.add() -method. If tag_name is None, the -tag is anonymous. If tag_name is -non-None, a tag called tag_name -must not already exist in the tag table for this buffer. - - - - - gtk.TextBuffer.get_iter_at_line_offset - - - get_iter_at_line_offset - line_number - char_offset - - - - line_number : - the line number counting from -0 - - - char_offset : - the char offset from start of -line - - - Returns : - a gtk.TextIter - - - - The get_iter_at_line_offset() returns -an iterator pointing to the position specified by -char_offset within the line specified by -line_number. The char_offset -must exist, offsets off the end of the line are not allowed. Note specify -characters, not bytes; UTF-8 may encode one character -as multiple bytes. - - - - - gtk.TextBuffer.get_iter_at_line_index - - - get_iter_at_line_index - line_number - byte_index - - - - line_number : - the line number counting from -0 - - - byte_index : - the byte index from start of -line - - - Returns : - a gtk.TextIter - - - - The get_iter_at_line_index() method -returns an iterator pointing to the position specified by -byte_index within the line specified by -line_number. byte_index must -be the start of a UTF-8 character, and must not be beyond the end of the -line. Note specify bytes, not characters; UTF-8 may -encode one character as multiple bytes. - - - - - gtk.TextBuffer.get_iter_at_offset - - - get_iter_at_offset - char_offset - - - - char_offset : - the char offset from start of buffer, counting -from 0 - - - Returns : - a gtk.TextIter - - - - The get_iter_at_offset() method returns -an iterator pointing to the location specified by -char_offset characters from the start of the entire -buffer. - - - - - gtk.TextBuffer.get_iter_at_line - - - get_iter_at_line - line_number - - - - line_number : - line number counting from -0 - - - Returns : - a gtk.TextIter - - - - The get_iter_at_line() method returns -an iterator pointing to the start of the line specified by -line_number. - - - - - gtk.TextBuffer.get_start_iter - - - get_start_iter - - - - - Returns : - a gtk.TextIter - - - - The get_start_iter() method returns an -iterator pointing at the location of the first position in the text buffer. -This is the same as using the get_iter_at_offset() -with an argument of 0. - - - - - - gtk.TextBuffer.get_end_iter - - - get_end_iter - - - - - Returns : - a gtk.TextIter - - - - The get_end_iter() method returns an -iterator pointing at the "end iterator," one past the last valid character -in the text buffer. If passed to the gtk.TextIter.get_char() -method, the end iterator has a character value of 0. The entire buffer lies -in the range from the first position in the buffer (call the get_start_iter() -method to get character position 0) to the end iterator. - - - - - gtk.TextBuffer.get_bounds - - - get_bounds - - - - - Returns : - a tuple containing gtk.TextIter objects -that point at the first and last positions in the buffer - - - - The get_bounds() method returns a tuple -containing the first and last iterators in the buffer, i.e. the entire -buffer lies within the range. - - - - - gtk.TextBuffer.get_iter_at_mark - - - get_iter_at_mark - mark - - - - mark : - a gtk.TextMark in -the textbuffer - - - Returns : - a gtk.TextIter - - - - The get_iter_at_mark() method returns -an iterator that points at the current position of -mark. - - - - - gtk.TextBuffer.get_iter_at_child_anchor - - - get_iter_at_child_anchor - iter - anchor - - - - anchor : - a child anchor that appears in the -textbuffer - - - Returns : - a gtk.TextIter - - - - The get_iter_at_child_anchor() method -returns an iterator that points at the location of -anchor within the textbuffer. - - - - - gtk.TextBuffer.get_modified - - - get_modified - - - - Returns : - True if the buffer has been -modified - - - - The get_modified() method returns -True if the buffer has been modified since the last call -to the set_modified() -method set the modification flag to False. Used for -example to enable a "save" function in a text editor. - - - - - gtk.TextBuffer.set_modified - - - set_modified - setting - - - - setting : - the modification flag -setting - - - - The set_modified() method sets the -modification flag of the textbuffer to the value specified by -setting. The modification flag is used to keep track -of whether the buffer has been modified since the last time it was saved. -Whenever the buffer is saved to disk, call this method with a -setting of False. When the buffer -is modified, it will automatically set the modification flag to -True and emit a "modified_changed" signal. - - - - - gtk.TextBuffer.add_selection_clipboard - - - add_selection_clipboard - clipboard - - - - clipboard : - a gtk.Clipboard - - - - - This method is available in PyGTK 2.2 and above. - - - The add_selection_clipboard() method -adds the gtk.Clipboard -specified by clipboard to the list of clipboards in -which the selection contents of the buffer are available. In most cases, -clipboard will be the -gtk.gdk.SELECTION_PRIMARY clipboard - - - - - gtk.TextBuffer.remove_selection_clipboard - - - remove_selection_clipboard - clipboard - - - - clipboard : - a gtk.Clipboard - added to the buffer by the add_selection_clipboard() - method. - - - - - This method is available in PyGTK 2.2 and above. - - - The remove_selection_clipboard() method -removes the gtk.Clipboard -added with the add_selection_clipboard() -method. - - - - - gtk.TextBuffer.cut_clipboard - - - cut_clipboard - clipboard - default_editable - - - - clipboard : - the gtk.Clipboard - object to cut to. - - - default_editable : - the default editability of the - buffer - - - - - This method is available in PyGTK 2.2 and above. - - - The cut_clipboard() method copies the -currently-selected text to the gtk.Clipboard -specified by clipboard, then deletes said text if -it's editable as specified by -default_editable. Typically the result of the gtk.TextView.get_editable() -method is appropriate here. - - - - - gtk.TextBuffer.copy_clipboard - - - copy_clipboard - clipboard - - - - clipboard : - the gtk.Clipboard - object to copy to. - - - - - This method is available in PyGTK 2.2 and above. - - - The copy_clipboard() method copies the -currently-selected text to the gtk.ClipBoard -specified by clipboard. - - - - - gtk.TextBuffer.paste_clipboard - - - paste_clipboard - clipboard - override_location - default_editable - - - - clipboard : - the gtk.Clipboard - to paste from - - - override_location : - the gtk.TextIter - specifying the location to insert pasted text, or - None for at the cursor - - - default_editable : - the default editability of the - buffer - - - - - This method is available in PyGTK 2.2 and above. - - - The paste_clipboard() method pastes the -contents of the gtk.ClipBoard -specified by clipboard at the insertion point, or at -the location specified by override_location (if not -None). (Note: pasting is asynchronous, that is, we'll -ask for the paste data and return, and at some point later after the main -loop runs, the paste data will be inserted.) - - - - - gtk.TextBuffer.get_selection_bounds - - - get_selection_bounds - - - - - Returns : - a tuple containing gtk.TextIter objects pointing to the selection start and end or an empty tuple if there is no -selection - - - - The get_selection_bounds() method -returns a tuple containing iterators that point at the start and end of the -selection, if any. If there is no selection an empty tuple is -returned. - - - - - gtk.TextBuffer.delete_selection - - - delete_selection - interactive - default_editable - - - - interactive : - if True the deletion is -caused by user interaction - - - default_editable : - if True the buffer is -editable by default - - - Returns : - True if there was a -non-empty selection to delete - - - - The delete_selection() method deletes -the text in the range between the "insert" and "selection_bound" marks, i.e. -the currently-selected text. If interactive is -True, the editability of the selection will be considered -(users can't delete uneditable text) and default_editable is used to -determine the default editability of the textbuffer usually as a result of a -call to the gtk.TextView.get_editable() -method. - - - - - gtk.TextBuffer.begin_user_action - - - begin_user_action - - - The begin_user_action() method is -called to indicate that the textbuffer operations until a call to the end_user_action() -method are part of a single user-visible operation. The operations between -the begin_user_action() and end_user_action() -methods can then be grouped when creating an undo stack. gtk.TextBuffer -maintains a count of calls to the -begin_user_action() method that have not been -closed with a call to the end_user_action() -method, and emits the "begin_user_action" and "end_user_action" signals only -for the outermost pair of calls. This allows you to chain user -actions. - - The "interactive" textbuffer mutation methods, such as the insert_interactive() -method, automatically call the begin and end user action methods around the -textbuffer operations they perform, so there's no need to add extra calls if -you user action consists solely of a single call to one of those -methods. - - - - - gtk.TextBuffer.end_user_action - - - end_user_action - - - - The end_user_action() method should be -paired with a call to the begin_user_action() -method. - - - - - gtk.TextBuffer.backspace - - - backspace - iter - interactive - default_editable - - - - iter : - a gtk.TextIter - - - interactive : - if True the deletion is -caused by user interaction - - - default_editable : - if True the buffer is -editable by default - - - Returns : - True if the buffer was -modified - - - - - This method is available in PyGTK 2.6 and above. - - - The backspace() method performs the -appropriate action as if the user hit the delete key with the cursor at the -position specified by iter. In the normal case a -single character will be deleted, but when combining accents are involved, -more than one character can be deleted, and when precomposed character and -accent combinations are involved, less than one character will be -deleted. - - Because the buffer is modified, all outstanding iterators become -invalid after calling this function; however, iter -will be re-initialized to point to the location where text was -deleted. - - - - - gtk.TextBuffer.get_has_selection - - - get_has_selection - - - - - - Returns : - True if there is text - selected - - - - - This method is available in PyGTK 2.10 and above. - - - Indicates whether the buffer has some text currently - selected. - - - - - gtk.TextBuffer.get_copy_target_list - - - get_copy_target_list - - - - - - Returns : - a list of the targets each represented as a - 3-tuple containing the target name, a combination of the and an - application assigned integer - - - - - This method is available in PyGTK 2.10 and above. - - - This method returns the list of targets this text buffer can - provide for copying and as DND source. The targets in the list are - added with info values from the , using - the gtk.target_list_add_rich_text_targets() - and gtk.target_list_add_text_targets() - functions. - - - - - gtk.TextBuffer.get_paste_target_list - - - get_paste_target_list - - - - - - Returns : - a list of the targets each represented as a - 3-tuple containing the target name, a combination of the and an - application assigned integer - - - - - This method is available in PyGTK 2.10 and above. - - - This method returns the list of targets this text buffer supports - for pasting and as DND destination. The targets in the list are - added with info values from the , using - the gtk.target_list_add_rich_text_targets() - and gtk.target_list_add_text_targets() - functions. - - - - - gtk.TextBuffer.register_serialize_format - - - register_serialize_format - mime_type - function - user_data - - - - - mime_type : - the format's mime-type - - - function : - the serialize function to register - - - user_data : - function's user_data - - - Returns : - the newly registered format's - mime-type. - - - - - This method is available in PyGTK 2.10 and above. - - - This method registers a rich text serialization - function along with its - mime_type with the passed - buffer. - - The signature of function is: - - - def function(register_buf, content_buf, start, end, data): - - - where register_buf is the textbuffer that - the format is registered with, content_buf is - the textbuffer containing the text to be serialized, - start and end are - textiters bounding the text to be serialized and - data is - user_data. function - should return the serialized data. - - - - - gtk.TextBuffer.register_serialize_tagset - - - register_serialize_tagset - tagset_nameNULL - - - - - tagset_name : - an optional tagset name, or - None - - - Returns : - the newly registered format's - mime-type. - - - - - This method is available in PyGTK 2.10 and above. - - - This method registers GTK+'s internal rich text serialization - format with this textbuffer. The internal format does not comply to - any standard rich text format and only works between gtk.TextBuffer - instances. It is capable of serializing all of a text buffer's tags - and embedded pixbufs. - - This method is just a wrapper around gtk.TextBuffer.register_serialize_format(). The - mime_type used for registering is - "application/x-gtk-text-buffer-rich-text", or - "application/x-gtk-text-buffer-rich-text;format=tagset_name" - if a tagset_name was passed. - - The tagset_name can be used to restrict the - transfer of rich text to buffers with compatible sets of tags, in - order to avoid unknown tags from being pasted. It is probably the - common case to pass a non-None tagset here, - since the None tagset requires the receiving buffer - to deal with with pasting of arbitrary tags. - - - - - gtk.TextBuffer.register_deserialize_format - - - register_deserialize_format - mime_type - function - user_data - - - - - mime_type : - the format's mime-type - - - function : - the deserialize function to register - - - user_data : - function's user_data - - - Returns : - the newly registered format's - mime-type. - - - - - This method is available in PyGTK 2.10 and above. - - - This method registers a rich text deserialization - function along with its - mime_type with the passed - buffer. - - The signature of function is: - - - def function(register_buf, content_buf, iter, data, create_tags, udata): - - - where register_buf is the textbuffer that - the format is registered with, content_buf is - the textbuffer that data will be deserialized into, - iter is a textiter indicating the start of the - deserialized data in content_buf, create_tags - is a boolean indicating if tags should be created during - deserializtion and udata is - user_data. function - should return True if the data was successfully - deserialized. - - - - - gtk.TextBuffer.register_deserialize_tagset - - - register_deserialize_tagset - tagset_nameNULL - - - - - tagset_name : - an optional tagset name, or - None - - - Returns : - the newly registered format's - mime-type. - - - - - This method is available in PyGTK 2.10 and above. - - - This method registers GTK+'s internal rich text serialization - format with this buffer. See the gtk.TextBuffer.register_serialize_tagset() - method for details. - - - - - gtk.TextBuffer.unregister_serialize_format - - - unregister_serialize_format - format - - - - - format : - a target string representing a registered rich - text format. - - - - - This method is available in PyGTK 2.10 and above. - - - This method unregisters a rich text format that was previously - registered using the gtk.TextBuffer.register_serialize_format() - or gtk.TextBuffer.register_serialize_tagset() - methods. - - - - - gtk.TextBuffer.unregister_deserialize_format - - - unregister_deserialize_format - format - - - - - format : - a target string representing a registered rich - text format. - - - - - This method is available in PyGTK 2.10 and above. - - - This method unregisters a rich text format that was previously - registered using the gtk.TextBuffer.register_deserialize_format() - or gtk.TextBuffer.register_deserialize_tagset() - methods. - - - - - gtk.TextBuffer.deserialize_set_can_create_tags - - - deserialize_set_can_create_tags - format - can_create_tags - - - - - format : - a target string representing a registered rich - text format - - - can_create_tags : - if True deserializing - format may create tags - - - - - This method is available in PyGTK 2.10 and above. - - - Use this method to allow a rich text deserialization function to - create new tags in the receiving buffer. Note that using this method - is almost always a bad idea, because the rich text functions you - register should know how to map the rich text format they handle to - your text buffers set of tags. - - The ability of creating new (arbitrary!) tags in the receiving - buffer is meant for special rich text formats like the internal one - that is registered using gtk.TextBuffer.register_deserialize_tagset(), - because that format is essentially a dump of the internal structure of - the source buffer, including its tag names. - - You should allow creation of tags only if you know what you are - doing, e.g. if you defined a tagset name for your application suite's - text buffers and you know that it's fine to receive new tags from - these buffers, because you know that your application can handle the - newly created tags. - - - - - gtk.TextBuffer.deserialize_get_can_create_tags - - - deserialize_get_can_create_tags - format - - - - - format : - a target string representing a registered rich - text format - - - Returns : - True if deserializing - format may create tags - - - - - This method is available in PyGTK 2.10 and above. - - - This method returns the value set with the gtk.TextBuffer.deserialize_set_can_create_tags() - method. - - - - - gtk.TextBuffer.get_serialize_formats - - - get_serialize_formats - - - - - Returns : - a list of target strings representing the - registered formats. - - - - - This method is available in PyGTK 2.10 and above. - - - This method returns a list of the rich text serialize formats - registered using the gtk.TextBuffer.register_serialize_format() - or gtk.TextBuffer.register_serialize_tagset() - methods. - - - - - gtk.TextBuffer.get_deserialize_formats - - - get_deserialize_formats - - - - - Returns : - a list of target strings representing the - registered formats. - - - - - This method is available in PyGTK 2.10 and above. - - - This method returns the rich text deserialize formats registered - using the gtk.TextBuffer.register_deserialize_format() - or gtk.TextBuffer.register_deserialize_tagset() - methods. - - - - - gtk.TextBuffer.serialize - - - serialize - content_buffer - format - start - end - - - - - content_buffer : - the gtk.TextBuffer - to serialize - - - format : - the rich text format to use for - serializing - - - start : - start of block of text to - serialize - - - end : - end of block of test to - serialize - - - Returns : - the serialized data, encoded as - format - - - - - This method is available in PyGTK 2.10 and above. - - - This method serializes the portion of text between start - and end in the rich text format represented by format. - - The formats to be used must be registered using the gtk.TextBuffer.register_serialize_format() - or gtk.TextBuffer.register_serialize_tagset() - methods beforehand. - - - - - gtk.TextBuffer.deserialize - - - deserialize - content_buffer - format - iter - data - - - - - content_buffer : - the gtk.TextBuffer - to deserialize into - - - format : - the rich text format to use for - deserializing - - - iter : - insertion point for the deserialized - text - - - data : - data to deserialize - - - Returns : - True on success, - False otherwise. - - - - - This method is available in PyGTK 2.10 and above. - - - This method deserializes rich text in format - format and inserts it at iter in - content_buffer. - - The formats to be used must be registered using the gtk.TextBuffer.register_deserialize_format() - or gtk.TextBuffer.register_deserialize_tagset() - methods beforehand. - - - - - - - Signals - - - The "apply-tag" gtk.TextBuffer Signal - - - callback - textbuffer - texttag - start - end - user_param1 - ... - - - - - textbuffer : - the textbuffer that received the -signal - - - texttag : - the gtk.TextTag being -applied - - - start : - a gtk.TextIter -pointing to the start of the range of text - - - end : - a gtk.TextIter -pointing to the end of the range of text - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "apply-tag" signal is emitted when -texttag is applied to the text in -textbuffer in the range specified by -start and end. - - - - - The "begin-user-action" gtk.TextBuffer Signal - - - callback - textbuffer - user_param1 - ... - - - - - textbuffer : - the textbuffer that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "begin-user-action" signal is emitted on the first call to -the begin_user_action() -method. - - - - - The "changed" gtk.TextBuffer Signal - - - callback - textbuffer - user_param1 - ... - - - - - textbuffer : - the textbuffer that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "changed" signal is emitted when text is inserted in -textbuffer. - - - - - The "delete-range" gtk.TextBuffer Signal - - - callback - textbuffer - start - end - user_param1 - ... - - - - - textbuffer : - the textbuffer that received the -signal - - - start : - a gtk.TextIter -pointing to the start of the range of text - - - end : - a gtk.TextIter -pointing to the end of the range of text - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "delete-range" signal is emitted when the text in the range -specified by start and end is -to be deleted. - - - - - The "end-user-action" gtk.TextBuffer Signal - - - callback - textbuffer - user_param1 - ... - - - - - textbuffer : - the textbuffer that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "end-user-action" signal is emitted when the call to the -end_user_action() -method reduces the user action count to zero i.e. undoes the first call to -the begin_user_action() -method. - - - - - The "insert-child-anchor" gtk.TextBuffer Signal - - - callback - textbuffer - iter - anchor - user_param1 - ... - - - - - textbuffer : - the textbuffer that received the -signal - - - iter : - a gtk.TextIter - - - anchor : - a gtk.TextChildAnchor - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "insert-child-anchor" signal is emitted when -anchor is inserted into -textbuffer at the location specified by -iter. - - - - - The "insert-pixbuf" gtk.TextBuffer Signal - - - callback - textbuffer - iter - pixbuf - user_param1 - ... - - - - - textbuffer : - the textbuffer that received the -signal - - - iter : - a gtk.TextIter - - - pixbuf : - a gtk.gdk.Pixbuf - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "insert-pixbuf" signal is emitted when -pixbuf is inserted into -textbuffer at the location specified by -iter. - - - - - The "insert-text" gtk.TextBuffer Signal - - - callback - textbuffer - iter - text - length - user_param1 - ... - - - - - textbuffer : - the textbuffer that received the -signal - - - iter : - a gtk.TextIter - - - text : - the text inserted in -textbuffer - - - length : - the length of the text inserted in -textbuffer - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "insert-text" signal is emitted when -text of the size specified by -length is inserted into -textbuffer at the location specified by -iter. - - - - - The "mark-deleted" gtk.TextBuffer Signal - - - callback - textbuffer - textmark - user_param1 - ... - - - - - textbuffer : - the textbuffer that received the -signal - - - textmark : - the gtk.TextMark - that is being deleted - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "mark-deleted" signal is emitted when -textmark is being deleted from -textbuffer. - - - - - The "mark-set" gtk.TextBuffer Signal - - - callback - textbuffer - user_param1 - ... - - - - - textbuffer : - the textbuffer that received the -signal - - - iter : - a gtk.TextIter -pointing at the location where textmark will be -set. - - - textmark : - the gtk.TextMark - that is being set - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "mark-set" signal is emitted when -textmark is being set at the location specified by -iter in textbuffer. - - - - - The "modified-changed" gtk.TextBuffer Signal - - - callback - textbuffer - user_param1 - ... - - - - - textbuffer : - the textbuffer that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "modified-changed" signal is emitted when the modification -flag is changed. - - - - - The "remove-tag" gtk.TextBuffer Signal - - - callback - textbuffer - texttag - start - end - user_param1 - ... - - - - - textbuffer : - the textbuffer that received the -signal - - - texttag : - the gtk.TextTag being -removed - - - start : - a gtk.TextIter -pointing to the start of the range of text - - - end : - a gtk.TextIter - pointing to the end of the range of text - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "remove-tag" signal is emitted when -texttag is being removed from the -textbuffer text in the range specified by -start and end. - - - - - -
diff --git a/docs/reference/pygtk-gtktextchildanchor.xml b/docs/reference/pygtk-gtktextchildanchor.xml deleted file mode 100644 index 73e8086d..00000000 --- a/docs/reference/pygtk-gtktextchildanchor.xml +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - gtk.TextChildAnchor - a location in a textbuffer for placing widgets - - - - Synopsis - - - gtk.TextChildAnchor - gobject.GObject - - gtk.TextChildAnchor - - - get_widgets - - - get_deleted - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.TextChildAnchor - - - - - - gtk.TextChildAnchor Signal Prototypes - - gobject.GObject Signal Prototypes - - - - Description - - A gtk.TextChildAnchor -provides a location in a gtk.TextBuffer -for placing child widgets in a gtk.TextView. -Since a gtk.TextBuffer -can be associated with more than one gtk.TextView a -gtk.TextChildAnchor -can have a different child widget inserted for each textview it is displayed -in. - - - - - Constructor - - - gtk.TextChildAnchor - - - - Returns : - a new gtk.TextChildAnchor -object - - - - Creates a new gtk.TextChildAnchor. -Usually you would then insert it into a gtk.TextBuffer -with the gtk.TextBuffer.insert_child_anchor() -method. To perform the creation and insertion in one step, use the -convenience method gtk.TextBuffer.create_child_anchor() -method. - - - - - Methods - - - gtk.TextChildAnchor.get_widgets - - - get_widgets - - - - Returns : - a list of widgets anchored at the child -anchor - - - - The get_widgets() method returns a list -of all widgets anchored at this child anchor from all the associated -textviews. - - - - - gtk.TextChildAnchor.get_deleted - - - get_deleted - - - - Returns : - True if the child anchor has -been deleted from its textbuffer - - - - The get_deleted() method returns -True if the child anchor has been deleted from its -textbuffer. - - - - - - diff --git a/docs/reference/pygtk-gtktextiter.xml b/docs/reference/pygtk-gtktextiter.xml deleted file mode 100644 index 004dcb32..00000000 --- a/docs/reference/pygtk-gtktextiter.xml +++ /dev/null @@ -1,3110 +0,0 @@ - - - - - - gtk.TextIter - an object pointing at a location in a gtk.TextBuffer - - - - Synopsis - - - gtk.TextIter - gobject.GBoxed - - get_buffer - - - - copy - - - - get_offset - - - - get_line - - - - get_line_offset - - - - get_line_index - - - - get_visible_line_offset - - - - get_visible_line_index - - - - get_char - - - get_slice - end - - - get_text - end - - - get_visible_slice - end - - - get_visible_text - end - - - get_pixbuf - - - - get_marks - - - - get_child_anchor - - - - get_toggled_tags - toggled_on - - - begins_tag - tag - None - - - ends_tag - tag - None - - - toggles_tag - tag - None - - - has_tag - tag - - - get_tags - - - - editable - default_setting - - - can_insert - default_editability - - - starts_word - - - - ends_word - - - - inside_word - - - - starts_sentence - - - - ends_sentence - - - - inside_sentence - - - - starts_line - - - - ends_line - - - - is_cursor_position - - - - get_chars_in_line - - - - get_bytes_in_line - - - - get_attributes - values - - - get_language - - - - is_end - - - - is_start - - - - forward_char - - - - backward_char - - - - forward_chars - count - - - backward_chars - count - - - forward_line - - - - backward_line - - - - forward_lines - count - - - backward_lines - count - - - forward_word_ends - count - - - backward_word_starts - count - - - forward_word_end - - - - backward_word_start - - - - forward_cursor_position - - - - backward_cursor_position - - - - forward_cursor_positions - count - - - backward_cursor_positions - count - - - backward_sentence_start - - - - forward_sentence_end - - - - backward_sentence_starts - count - - - forward_sentence_ends - count - - - forward_visible_word_ends - count - - - backward_visible_word_starts - count - - - forward_visible_word_end - - - - backward_visible_word_start - - - - forward_visible_cursor_position - - - - backward_visible_cursor_position - - - - forward_visible_cursor_positions - count - - - backward_visible_cursor_positions - count - - - forward_visible_line - - - - backward_visible_line - - - - forward_visible_lines - count - - - backward_visible_lines - count - - - set_offset - char_offset - - - set_line - line_number - - - set_line_offset - char_on_line - - - set_line_index - byte_on_line - - - forward_to_end - - - - forward_to_line_end - - - - set_visible_line_offset - char_on_line - - - set_visible_line_index - byte_on_line - - - forward_to_tag_toggle - tag - - - backward_to_tag_toggle - tag - - - forward_find_char - pred - user_data - limit - - - backward_find_char - pred - user_data - limit - - - forward_search - str - flags - limit - None - - - backward_search - str - flags - limit - None - - - equal - rhs - - - compare - rhs - - - in_range - start - end - - - order - second - - - - - - - Description - - A gtk.TextIter -points to a position between two characters in a gtk.TextBuffer. -A gtk.TextIter is -usually created using a gtk.TextBuffer -method and are invalidated when the number of characters in the gtk.TextBuffer -changes (with some exceptions when inserting or deleting) including -inserting or deleting pixbufs or child anchors. There are a huge number of -gtk.TextIter -methods mostly dealing with moving the textiter location in the textbuffer, -checking the location or retrieving text or objects at a location. - - - - - Methods - - - gtk.TextIter.get_buffer - - - get_buffer - - - - Returns : - the textbuffer - - - - The get_buffer() method returns the -gtk.TextBuffer -object this iterator is associated with. - - - - - gtk.TextIter.copy - - - copy - - - - Returns : - a copy of the textiter - - - - The copy() method creates a copy of the -textiter. - - - - - gtk.TextIter.get_offset - - - get_offset - - - - Returns : - a character offset - - - - The get_offset() method returns the -character offset of the textiter. Each character in a gtk.TextBuffer -has an offset, starting with 0 for the first character in the textbuffer. -Use gtk.TextBuffer.get_iter_at_offset() -to convert an offset back into a textiter. - - - - - gtk.TextIter.get_line - - - get_line - - - - Returns : - a line number - - - - The get_line() method returns the line -number containing the textiter. Lines in a gtk.TextBuffer -are numbered beginning with 0 for the first line. - - - - - gtk.TextIter.get_line_offset - - - get_line_offset - - - - Returns : - the offset from the start of the -line - - - - The get_line_offset() method returns -the character offset of the textiter location, counting from the start of -the line containing the textiter location. The first character on the line -has offset 0. - - - - - gtk.TextIter.get_line_index - - - get_line_index - - - - Returns : - the number of bytes from the start of the -line - - - - The get_line_offset() method returns -the byte index of the textiter location, counting from the start of the line -containing the textiter location. Remember that gtk.TextBuffer -encodes text in UTF-8, and that characters can require a variable number of -bytes to represent. - - - - - gtk.TextIter.get_visible_line_offset - - - get_visible_line_offset - - - - Returns : - the offset in visible characters from the start -of the line - - - - The get_visible_line_offset() method -returns the offset in characters of the textiter location from the start of -the line containing the textiter location, not counting characters that are -invisible due to tags with the "invisible" attribute set. - - - - - gtk.TextIter.get_visible_line_index - - - get_visible_line_index - - - - Returns : - a byte index from the start of the -line - - - - The get_visible_line_index() method -returns the byte index of the textiter location from the start of the line, -not counting bytes that are invisible due to tags with the "invisible" -attribute set. - - - - - gtk.TextIter.get_char - - - get_char - - - - Returns : - a Unicode character, or 0 if the textiter is -not dereferenceable - - - - The get_char() method returns the -Unicode character at this textiter location. If the textiter points at a -non-character element, such as an image embedded in the buffer, the Unicode -"unknown" character 0xFFFC is returned. If invoked on the end textiter, zero -is returned; zero is not a valid Unicode character. So you can write a loop -which ends when the get_char() -method returns 0. - - - - - gtk.TextIter.get_slice - - - get_slice - end - - - - end : - the textiter at the end of a -range - - - Returns : - a slice of text from the -textbuffer - - - - The get_slice() method returns the text -in the range between the locations specified by the textiter and -end. A "slice" is an array of characters encoded in -UTF-8 format, including the Unicode "unknown" character 0xFFFC for iterable -non-character elements in the textbuffer, such as images. Because images -are encoded in the slice, byte and character offsets in the returned array -will correspond to byte offsets in the textbuffer. Note that 0xFFFC can -occur in normal text as well, so it is not a reliable indicator that a -pixbuf or widget is in the textbuffer. - - - - - gtk.TextIter.get_text - - - get_text - end - - - - end : - textiter at end of a range - - - Returns : - array of characters from the -buffer - - - - The get_text() method returns the text -in the range between the locations specified by the textiter and -end. If the range contains non-text elements such as -images, the character and byte offsets in the returned string will not -correspond to character and byte offsets in the textbuffer. If you want the -offsets to correspond, use the get_slice() -method. - - - - - gtk.TextIter.get_visible_slice - - - get_visible_slice - end - - - - end : - textiter at end of range - - - Returns : - a slice of visible text from the -textbuffer - - - - The get_visible_slice() method is -similar to the get_slice() -method, but invisible text is excluded. Invisible text is text with the -"invisible" attribute set on it. - - - - - gtk.TextIter.get_visible_text - - - get_visible_text - end - - - - end : - textiter at end of range - - - Returns : - a string containing visible text from the -textbuffer - - - - The get_visible_text() method is -similar to the get_text(), -but invisible text is excluded. Invisible text is text with the "invisible" -attribute set on it. - - - - - gtk.TextIter.get_pixbuf - - - get_pixbuf - - - - Returns : - a pixbuf or -None - - - - The get_pixbuf() method returns the -gtk.gdk.Pixbuf -object at the textiter location, if any; otherwise, None -is returned. - - - - - gtk.TextIter.get_marks - - - get_marks - - - - Returns : - a list of gtk.TextMark -objects - - - - The get_marks() method returns a list -of all gtk.TextMark -objects at the textiter location. Because marks don't take up any "space" in -the buffer, multiple marks can exist in the same location. The returned list -is not in any meaningful order. - - - - - gtk.TextIter.get_child_anchor - - - get_child_anchor - - - - Returns : - a child anchor or -None - - - - The get_child_anchor() method returns -the gtk.TextChildAnchor -at the textiter location, if any; otherwise, None is -returned. - - - - - gtk.TextIter.get_toggled_tags - - - get_toggled_tags - toggled_on - - - - toggled_on : - if True get toggled-on tags; -otherwise get toggle-off tags - - - Returns : - a list of tags toggled at this -point - - - - The get_toggled_tags() method returns a -list of gtk.TextTag objects -that are toggled on or off at this point. If -toggled_on is True, the list -contains tags that are toggled on. If a tag is toggled on at the textiter -location, some non-empty range of characters following the textiter has that -tag applied to it. If a tag is toggled off, then some non-empty range -following the textiter location does not have the tag applied to it. - - - - - gtk.TextIter.begins_tag - - - begins_tag - tag - None - - - - tag : - a gtk.TextTag, or -None - - - Returns : - True if the textiter is the -start of a range tagged with tag - - - - The begins_tag() method returns -True if tag is toggled on at -exactly this point. If tag is -None, this method returns True if any -tag is toggled on at this point. Note that the -begins_tag() method returns True only if the -textiter location is the start of the tagged range; the -has_tag() -indicates if a textiter location is within a tagged -range. - - - - - gtk.TextIter.ends_tag - - - ends_tag - tag - None - - - - tag : - a gtk.TextTag, or -None - - - Returns : - True if the textiter is the -end of a range tagged with tag - - - - The ends_tag() method returns -True if tag is toggled off at the -location the textiter points to. If tag is -None, this method returns True if any -tag is toggled off at this point. Note that the -ends_tag() returns True only if -the textiter location is the end of the tagged range; -the has_tag() -indicates if a textiter location is within a tagged -range. - - - - - gtk.TextIter.toggles_tag - - - toggles_tag - tag - None - - - - tag : - a gtk.TextTag, or -None - - - Returns : - True if -tag is toggled on or off at the textiter -location - - - - The toggles_tag() method returns -True if a range of text with tag -applied to it begins or ends at the textiter location. -If tag is None this method returns -True if any tag begins or ends at the textiter -location. - - - - - gtk.TextIter.has_tag - - - has_tag - tag - - - - tag : - a gtk.TextTag - - - Returns : - True if the textiter -location is tagged with tag - - - - The has_tag() method returns -True if the textiter location is within a range of text -tagged with tag. - - - - - gtk.TextIter.get_tags - - - get_tags - - - - Returns : - a list of gtk.TextTag -objects - - - - The get_tags() method returns a list of -tags that apply to the textiter location, in ascending order of priority -(highest-priority tags are last). - - - - - gtk.TextIter.editable - - - editable - default_setting - - - - default_setting : - if True the text is editable -by default - - - Returns : - True if the textiter -location is inside an editable range or text - - - - The editable() method returns -True if the character at the textiter location is within -an editable range of text. Non-editable text is "locked" and can't be -changed by the user via a gtk.TextView. This -method is a convenience wrapper around the get_attributes() -method. If no tags applied to this text location affect editability, the -value of default_setting will be returned. - - Do not use this method to determine if text can be inserted at -the textiter location. For insertion you don't want to know if the char at -the textiter location is inside an editable range of text, you want to know -whether a new character inserted at the textiter location would be inside an -editable range of text. Use the can_insert() -method to determine if text can be inserted. - - - - - gtk.TextIter.can_insert - - - can_insert - default_editability - - - - default_editability : - if True the text is editable -by default - - - Returns : - True if text inserted at -iter would be editable - - - - The can_insert() method considers the -default editability of the buffer, and the tags that affect editability, to -determine if text inserted at the textiter location would be editable. If -so, the user should be allowed to insert text at the textiter location. The -gtk.TextBuffer.insert_interactive() -uses this function to determine if insertions are allowed at a given -position. - - - - - gtk.TextIter.starts_word - - - starts_word - - - - Returns : - True if the textiter -location is at the start of a word - - - - The starts_word() method returns -True if the textiter location begins a natural-language -word. Word breaks are determined by Pango and should be correct for nearly -any language (if not, the correct fix would be to the Pango word break -algorithms). - - - - - gtk.TextIter.ends_word - - - ends_word - - - - Returns : - True if the textiter -location is at the end of a word - - - - The ends_word() method returns -True if the textiter location ends a natural-language -word. Word breaks are determined by Pango and should be correct for nearly -any language (if not, the correct fix would be to the Pango word break -algorithms). - - - - - gtk.TextIter.inside_word - - - inside_word - - - - Returns : - True if the textiter -location is inside a word - - - - The inside_word() method returns -True if the textiter location is inside a -natural-language word (as opposed to say inside some whitespace). Word -breaks are determined by Pango and should be correct for nearly any language -(if not, the correct fix would be to the Pango word break -algorithms). - - - - - gtk.TextIter.starts_sentence - - - starts_sentence - - - - Returns : - True if the textiter -location is at the start of a sentence. - - - - The starts_sentence() method returns -True if the textiter location begins a sentence. -Sentence boundaries are determined by Pango and should be correct for nearly -any language (if not, the correct fix would be to the Pango text boundary -algorithms). - - - - - gtk.TextIter.ends_sentence - - - ends_sentence - - - - Returns : - True if the textiter -location is at the end of a sentence. - - - - The ends_sentence() method returns -True if the textiter location ends a sentence. Sentence -boundaries are determined by Pango and should be correct for nearly any -language (if not, the correct fix would be to the Pango text boundary -algorithms). - - - - - gtk.TextIter.inside_sentence - - - inside_sentence - - - - Returns : - True if the textiter -location is inside a sentence. - - - - The inside_sentence() method returns -True if the textiter location is inside a sentence (as -opposed to in between two sentences, e.g. after a period and before the -first letter of the next sentence). Sentence boundaries are determined by -Pango and should be correct for nearly any language (if not, the correct fix -would be to the Pango text boundary algorithms). - - - - - gtk.TextIter.starts_line - - - starts_line - - - - Returns : - True if the textiter -location begins a line - - - - The starts_line() method returns -True if the textiter location begins a paragraph, i.e. if -the .get_line_offset() -method would return 0. - - - - - gtk.TextIter.ends_line - - - ends_line - - - - Returns : - True if the textiter -location is at the end of a line - - - - The ends_line() method returns -True if the textiter location points to the start of the -paragraph delimiter characters for a line (delimiters will be either a -newline, a carriage return, a carriage return followed by a newline, or a -Unicode paragraph separator character). Note that an textiter pointing to -the \n of a \r\n pair will not be counted as the end of a line, the line -ends before the \r. The end textiter is considered to be at the end of a -line, even though there are no paragraph delimiter chars there. - - - - - gtk.TextIter.is_cursor_position - - - is_cursor_position - - - - Returns : - True if the cursor can be -placed at the textiter location - - - - The is_cursor_position() method returns -True if the cursor can be placed at the textiter -location. See the forward_cursor_position() -method for details on what a cursor position is. - - - - - gtk.TextIter.get_chars_in_line - - - get_chars_in_line - - - - Returns : - the number of characters in the -line - - - - The get_chars_in_line() method returns -the number of characters in the line containing the textiter location, -including the paragraph delimiters. - - - - - gtk.TextIter.get_bytes_in_line - - - get_bytes_in_line - - - - Returns : - the number of bytes in the -line - - - - The get_bytes_in_line() method returns -the number of bytes in the line containing the textiter location, including -the paragraph delimiters. - - - - - gtk.TextIter.get_attributes - - - get_attributes - values - - - - values : - a gtk.TextAttributes -object to be filled in - - - Returns : - True if -values was modified - - - - The get_attributes() method computes -the effect of any tags applied to the textiter location and applies those -attributes to the gtk.TextAttributes -object specified by values (which should be -initialized to the default settings you wish to use if no tags are in -effect). Typically the default attributes are obtained from the gtk.TextView.get_default_attributes() -method. If any tags affected values, the method -returns True. - - - - - gtk.TextIter.get_language - - - get_language - - - - Returns : - the pango language in effect at the textiter -location - - - - The get_language() method is a -convenience wrapper around the get_attributes() -method, that returns the language in effect at the textiter location. If no -tags affecting language apply to the textiter location, the return value is -identical to that of the gtk.get_default_language() -function. - - - - - gtk.TextIter.is_end - - - is_end - - - - Returns : - True if the textiter is the -end textiter - - - - The is_end() method returns -True if the textiter is the end textiter, i.e. one past -the last dereferenceable textiter in the buffer. The -is_end() method is the most efficient way to check -whether an textiter is the end textiter. - - - - - gtk.TextIter.is_start - - - is_start - - - - Returns : - True if the textiter -location is at the start of the textbuffer - - - - The is_start() method returns -True if the textiter location is at the start of the -textbuffer, that is if the textiter location has a character offset of -0. - - - - - gtk.TextIter.forward_char - - - forward_char - - - - Returns : - True if the textiter -location moved and is dereferenceable - - - - The forward_char() method moves the -textiter location forward by one character offset and returns -True if the textiter location moved and the new location -is dereferenceable. Note that images embedded in the buffer occupy 1 -character slot, so the forward_char() method may -actually move onto an image instead of a character, if you have images in -your buffer. If the textiter location is the end textiter or one character -before it, the textiter location will now point at the end textiter, and the -forward_char() method returns -False. - - - - - gtk.TextIter.backward_char - - - backward_char - - - - Returns : - True if the textiter location moved and is -not the start textiter - - - - The backward_char() method moves the -textiter location backward by one character offset and returns -True if the textiter location moved. If the old textiter -location was the first in the buffer (character offset 0), the -backward_char() method returns -False. - - - - - gtk.TextIter.forward_chars - - - forward_chars - count - - - - count : - the number of characters to move, may be -negative - - - Returns : - True if the textiter -location moved and is dereferenceable - - - - The forward_chars() method moves the -textiter location forward count characters if -possible. If the textiter location would move past the start or end of the -buffer, the location moves to the start or end of the textbuffer. The -forward_chars() method returns -True if the new position of the resulting textiter -location is different from its original position, and is dereferenceable -(the last textiter in the buffer is not dereferenceable). If -count is 0, the function does nothing and returns -False. - - - - - gtk.TextIter.backward_chars - - - backward_chars - count - - - - count : - the number of characters to move, may be -negative - - - Returns : - True if the textiter -location moved and is dereferenceable - - - - The backward_chars() method moves the -textiter location backward forward count characters, -if possible. If the textiter location would move past the start or end of -the buffer, the location moves to the start or end of the textbuffer. The -backward_chars() method returns -True if the new position of the resulting textiter -location is different from its original position, and is dereferenceable -(the last textiter in the buffer is not dereferenceable). If -count is 0, the function does nothing and returns -False. - - - - - gtk.TextIter.forward_line - - - forward_line - - - - Returns : - True if the textiter -location can be dereferenced - - - - The forward_line() method moves the -textiter location to the start of the next line and returns -True if the textiter location moved to a dereferenceable -position, and False if the textiter location moved to the -end of the buffer, or if the textiter location was originally at the end of -the buffer. - - - - - gtk.TextIter.backward_line - - - backward_line - - - - Returns : - True if the textiter -location moved - - - - The backward_line() method moves the -textiter location to the start of the previous line and returns -True if the textiter location was moved. If the textiter -location was at the textbuffer start, this method returns -False. For example if the textiter location was already -on line 0, but not at the start of the line, the textiter location is -snapped to the start of the line and the method returns -True. - - - - - - gtk.TextIter.forward_lines - - - forward_lines - count - - - - count : - the number of lines to move forward, may be -negative - - - Returns : - True if the textiter -location moved and is dereferenceable - - - - The forward_lines() method moves the -textiter location forward count lines, if possible. -If the textiter location would move past the start or end of the buffer, the -location moves to the start or end of the textbuffer. The method -returns: - - - - True if the textiter moved to a -dereferenceable position; or, - - - False if the textiter location didn't -move, or moved onto the end textiter or if count was -0. - - - - If count is negative, the textiter -location moves backward by count lines. - - - - - gtk.TextIter.backward_lines - - - backward_lines - count - - - - count : - the number of lines to move backward, may be -negative - - - Returns : - True if the textiter -location moved to a dereferenceable position - - - - The backward_lines() method moves the -textiter location backward by count lines, if -possible. If the textiter location would move past the start or end of the -buffer, the location moves to the start or end of the textbuffer. The -method returns: - - - - True if the textiter moved to a -dereferenceable position; or, - - - False if the textiter location didn't -move, or moved onto the end textiter or if count was -0. - - - - If count is negative, the textiter -location moves forward by count lines. - - - - - gtk.TextIter.forward_word_ends - - - forward_word_ends - count - - - - count : - the number of times to -move - - - Returns : - True if the textiter -location moved and is not the end textiter - - - - The forward_word_ends() method calls -the forward_word_end() -method up to count times or the backward_word_starts() -method if count is negative. The method returns -True if the textiter location changed and the resulting -location is not at the end of the textbuffer. - - - - - gtk.TextIter.backward_word_starts - - - backward_word_starts - count - - - - count : - the number of times to -move - - - Returns : - True if the textiter -location moved and is not the end textiter - - - - The backward_word_starts() method calls the -backward_word_start() -method up to count times or the forward_word_ends() -method if count is negative. The method returns -True if the textiter location changed and the resulting -location is not at the end of the textbuffer. - - - - - gtk.TextIter.forward_word_end - - - forward_word_end - - - - Returns : - True if the textiter -location moved to a dereferenceable position - - - - The forward_word_end() method moves the -textiter location forward to the next word end. If the textiter location is -currently on a word end, the location moves forward to the next one after -that. Word breaks are determined by Pango and should be correct for nearly -any language (if not, the correct fix would be to the Pango word break -algorithms). The method returns True if the textiter location moved to a -dereferenceable position - - - - - gtk.TextIter.backward_word_start - - - backward_word_start - - - - Returns : - True if the textiter -location moved - - - - The backward_word_start() method moves -the textiter location backward to the previous word start. If the textiter -location is currently on a word start, the location moves backward to the -next one before that. Word breaks are determined by Pango and should be -correct for nearly any language (if not, the correct fix would be to the -Pango word break algorithms). The method returns True if -the textiter location moved. - - - - - gtk.TextIter.forward_cursor_position - - - forward_cursor_position - - - - Returns : - True if we moved and the new -position is dereferenceable - - - - The forward_cursor_position() method -moves the textiter location forward by a single cursor position. Cursor -positions are (unsurprisingly) positions where the cursor can appear. -Surprisingly, there may not be a cursor position between all characters. The -most common example for European languages would be a carriage -return/newline sequence. For some Unicode characters, the equivalent of say -the letter "a" with an accent mark will be represented as two characters, -first the letter then a "combining mark" that causes the accent to be -rendered; so the cursor can't go between those two characters. The method -returns True if the textiter location changed and the -resulting location is not at the end of the textbuffer. - - - - - gtk.TextIter.backward_cursor_position - - - backward_cursor_position - - - - Returns : - True if we moved and the new -position is dereferenceable - - - - The backward_cursor_position() method -is similar to the forward_cursor_position() -method, except the location moves backward. - - - - - gtk.TextIter.forward_cursor_positions - - - forward_cursor_positions - count - - - - count : - the number of positions to -move - - - Returns : - True if the textiter -location moved and the new position is dereferenceable - - - - The forward_cursor_positions() method -moves up to count cursor positions. See the forward_cursor_position() -method for more details. The method returns True if the -textiter moved to a dereferenceable location. - - - - - gtk.TextIter.backward_cursor_positions - - - backward_cursor_positions - count - - - - count : - the number of positions to -move - - - Returns : - True if the textiter -location moved and the new position is dereferenceable - - - - The backward_cursor_positions() method -moves the textiter location up to count cursor -positions. See the forward_cursor_position() -method for details. - - - - - gtk.TextIter.backward_sentence_start - - - backward_sentence_start - - - - Returns : - True if the textiter -location moved - - - - The backward_sentence_start() method -moves the textiter location backward to the previous sentence start. If the -textiter location is already at the start of a sentence, the location moves -backward to the next one. Sentence boundaries are determined by Pango and -should be correct for nearly any language (if not, the correct fix would be -to the Pango text boundary algorithms). - - - - - gtk.TextIter.forward_sentence_end - - - forward_sentence_end - - - - Returns : - True if the textiter -location moved and is not the end textiter - - - - The forward_sentence_end() method moves -the textiter location forward to the next sentence end. (If the textiter -location is at the end of a sentence, the location moves to the next end of -sentence.) Sentence boundaries are determined by Pango and should be -correct for nearly any language (if not, the correct fix would be to the -Pango text boundary algorithms). The method returns True -if the textiter location changed and the resulting location is not at the -end of the textbuffer. - - - - - gtk.TextIter.backward_sentence_starts - - - backward_sentence_starts - count - - - - count : - the number of sentences to -move - - - Returns : - True if the textiter -location moved and is not the end textiter - - - - The backward_sentence_starts() method -calls the backward_sentence_start() -method (or the forward_sentence_end()() -method if count is negative) up to count times, or -until it returns False. If count -is negative, the location moves forward instead of backward. The method -returns True if the textiter location changed and the -resulting location is not at the end of the textbuffer. - - - - - gtk.TextIter.forward_sentence_ends - - - forward_sentence_ends - count - - - - count : - the number of sentences to -move - - - Returns : - True if the textiter -location moved and is not the end textiter - - - - The forward_sentence_ends() method -calls the forward_sentence_end() -method count times (or until the forward_sentence_end() -method returns False). If count is -negative, the location moves backward instead of forward. The method returns -True if the textiter location changed and the resulting -location is not at the end of the textbuffer. - - - - - gtk.TextIter.forward_visible_word_ends - - - forward_visible_word_ends - count - - - - count : - the number of times to move - - - Returns : - True if the textiter moved - and is not the end iterator - - - - - This method is available in PyGTK 2.4 and above. - - - The forward_visible_word_ends() method -calls the forward_visible_word_end() -method the number of times specified by count. - - - - - gtk.TextIter.backward_visible_word_starts - - - backward_visible_word_starts - count - - - - count : - the number of times to move - - - Returns : - True if the textiter moved - and is not the end iterator - - - - - This method is available in PyGTK 2.4 and above. - - - The backward_visible_word_starts() -method calls the backward_visible_word_start() -method the number of times specified by count. - - - - - gtk.TextIter.forward_visible_word_end - - - forward_visible_word_end - - - - - Returns : - True if the textiter moved - and is not the end iterator - - - - - This method is available in PyGTK 2.4 and above. - - - The forward_visible_word_end() method -moves the textiter forward to the next visible word end. (If the textiter is -currently on a word end, it moves forward to the next one after that.) Word -breaks are determined by Pango and should be correct for nearly any language -(if not, the correct fix would be to the Pango word break -algorithms). - - - - - gtk.TextIter.backward_visible_word_start - - - backward_visible_word_start - - - - - Returns : - True if the textiter moved - and is not the end iterator - - - - - This method is available in PyGTK 2.4 and above. - - - The backward_visible_word_start() -method moves the textiter backward to the previous visible word start. (If -textiter is currently on a word start, it moves backward to the next one -after that.) Word breaks are determined by Pango and should be correct for -nearly any language (if not, the correct fix would be to the Pango word -break algorithms). - - - - - gtk.TextIter.forward_visible_cursor_position - - - forward_visible_cursor_position - - - - Returns : - True if we moved and the new -position is dereferenceable - - - - - This method is available in PyGTK 2.4 and above. - - - The forward_visible_cursor_position() -method moves the textiter location forward by a single visible cursor -position. Cursor positions are (unsurprisingly) positions where the cursor -can appear. Surprisingly, there may not be a cursor position between all -characters. The most common example for European languages would be a -carriage return/newline sequence. For some Unicode characters, the -equivalent of say the letter "a" with an accent mark will be represented as -two characters, first the letter then a "combining mark" that causes the -accent to be rendered; so the cursor can't go between those two -characters. The method returns True if the textiter -location changed and the resulting location is not at the end of the -textbuffer. - - - - - gtk.TextIter.backward_visible_cursor_position - - - backward_visible_cursor_position - - - - Returns : - True if we moved and the new -position is dereferenceable - - - - - This method is available in PyGTK 2.4 and above. - - - The backward_visible_cursor_position() -method is similar to the forward_visible_cursor_position() -method, except the location moves backward. - - - - - gtk.TextIter.forward_visible_cursor_positions - - - forward_visible_cursor_positions - count - - - - count : - the number of positions to -move - - - Returns : - True if the textiter -location moved and the new position is dereferenceable - - - - - This method is available in PyGTK 2.4 and above. - - - The forward_visible_cursor_positions() -method moves up to count visible cursor -positions. See the forward_visible_cursor_position() -method for more details. The method returns True if the -textiter moved to a dereferenceable location. - - - - - gtk.TextIter.backward_visible_cursor_positions - - - backward_visible_cursor_positions - count - - - - count : - the number of positions to -move - - - Returns : - True if the textiter -location moved and the new position is dereferenceable - - - - - This method is available in PyGTK 2.4 and above. - - - The backward_visible_cursor_positions() -method moves the textiter location up to count -visible cursor positions. See the forward_visible_cursor_position() -method for details. - - - - - gtk.TextIter.forward_visible_line - - - forward_visible_line - - - - Returns : - True if the textiter -location can be dereferenced - - - - - This method is available in PyGTK 2.8 and above. - - - The forward_visible_line() method moves -the textiter location to the start of the next visible line and returns -True if the textiter location moved to a dereferenceable -position, and False if the textiter location moved to the -end of the buffer, or if the textiter location was originally at the end of -the buffer. - - - - - gtk.TextIter.backward_visible_line - - - backward_visible_line - - - - Returns : - True if the textiter -location moved - - - - - This method is available in PyGTK 2.8 and above. - - - The backward_visible_line() method -moves the textiter location to the start of the previous visible line and -returns True if the textiter location was moved. If the -textiter location was at the textbuffer start, this method returns -False. For example if the textiter location was already -on line 0, but not at the start of the line, the textiter location is -snapped to the start of the line and the method returns -True. - - - - - - gtk.TextIter.forward_visible_lines - - - forward_visible_lines - count - - - - count : - the number of visible lines to move forward, -may be negative - - - Returns : - True if the textiter -location moved and is dereferenceable - - - - - This method is available in PyGTK 2.8 and above. - - - The forward_visible_lines() method -moves the textiter location forward count visible -lines, if possible. If the textiter location would move past the start or -end of the buffer, the location moves to the start or end of the textbuffer. -The method returns: - - - - True if the textiter moved to a -dereferenceable position; or, - - - False if the textiter location didn't -move, or moved onto the end textiter or if count was -0. - - - - If count is negative, the textiter -location moves backward by count visible lines. - - - - - gtk.TextIter.backward_visible_lines - - - backward_visible_lines - count - - - - count : - the number of visible lines to move backward, -may be negative - - - Returns : - True if the textiter -location moved to a dereferenceable position - - - - - This method is available in PyGTK 2.8 and above. - - - The backward_visible_lines() method -moves the textiter location backward by count lines, -if possible. If the textiter location would move past the start or end of -the buffer, the location moves to the start or end of the textbuffer. The -method returns: - - - - True if the textiter moved to a -dereferenceable position; or, - - - False if the textiter location didn't -move, or moved onto the end textiter or if count was -0. - - - - If count is negative, the textiter -location moves forward by count visible lines. - - - - - gtk.TextIter.set_offset - - - set_offset - char_offset - - - - char_offset : - a character number - - - - The set_offset() method sets the -textiter location to point to the location that is -char_offset counts from the start of the textbuffer -(starting with 0). - - - - - gtk.TextIter.set_line - - - set_line - line_number - - - - line_number : - a line number (counted from -0) - - - - The set_line() method sets the textiter -location to the start of the line specified by -line_number. If line_number -is negative or larger than the number of lines in the textbuffer, the method -moves the textiter location to the start of the last line in the -buffer. - - - - - gtk.TextIter.set_line_offset - - - set_line_offset - char_on_line - - - - char_on_line : - a character offset relative to the start of the -textiter location's current line - - - - The set_line_offset() method moves the -textiter location within a line, to the new character -(not byte) offset specified by char_on_line. The -character offset must be less than or equal to the number of characters in -the line; if equal, the textiter location moves to the start of the next -line. See the set_line_index() -method if you have a byte index rather than a character offset. - - - - - gtk.TextIter.set_line_index - - - set_line_index - byte_on_line - - - - byte_on_line : - a byte index relative to the start of the -textiter location's current line - - - - The set_line_index() method is similar -to the set_line_offset(), -but works with a byte index instead of a character -index. The given byte index must be at the start of a character, it can't be -in the middle of a UTF-8 encoded character. - - - - - gtk.TextIter.forward_to_end - - - forward_to_end - - - The forward_to_end() method moves the -textiter location forward to the "end textiter," that points one past the -last valid character in the buffer. The get_char() -method called on the end textiter returns 0, which is convenient for writing -loops. - - - - - gtk.TextIter.forward_to_line_end - - - forward_to_line_end - - - - Returns : - True if we moved and the new -location is not the end textiter - - - - The forward_to_line_end() method moves -the textiter to point to the paragraph delimiter characters at the end of -the current line. The paragraph delimiter characters are a newline, a -carriage return, a carriage return-newline in sequence, or the Unicode -paragraph separator character. If the textiter is already at the paragraph -delimiter characters, moves to the paragraph delimiter characters for the -next line. If the textiter location is on the last line in the buffer, which -does not end in paragraph delimiters, moves to the end textiter (end of the -last line), and returns False. - - - - - gtk.TextIter.set_visible_line_offset - - - set_visible_line_offset - char_on_line - - - - char_on_line : - a character offset - - - - The set_visible_char_offset() method is -similar to the set_line_offset() -method, but the offset is in visible characters, i.e. text with the -invisible attribute set is not counted in the offset. - - - - - gtk.TextIter.set_visible_line_index - - - set_visible_line_index - byte_on_line - - - - byte_on_line : - a byte index - - - - The set_visible_line_index() method is -similar to the set_line_index() -method, but the index is in visible bytes, i.e. text with the attribute set -is not counted in the index. - - - - - gtk.TextIter.forward_to_tag_toggle - - - forward_to_tag_toggle - tag - - - - tag : - a gtk.TextTag, or -None - - - Returns : - True if a tag toggle was -found after the textiter location - - - - The forward_to_tag_toggle() method -moves the textiter location forward to the next toggle (on or off) of the -gtk.TextTag -specified by tag, or to the next toggle of any tag if -tag is None. If no matching tag -toggles are found, this method returns False and sets the -textiter location to the end of the textbuffer; otherwise, returns -True. The -forward_to_tag_toggle() method does not recognize -toggles located at the textiter location, only toggles after the textiter -location. - - - - - gtk.TextIter.backward_to_tag_toggle - - - backward_to_tag_toggle - tag - - - - tag : - a gtk.TextTag, or -None - - - Returns : - True if a tag toggle was -found before the textiter location - - - - The backward_to_tag_toggle() method -moves the textiter location backward to the next toggle (on or off) of the -gtk.TextTag -specified by tag, or to the next toggle of any tag if -tag is None. If no matching tag -toggles are found, this method returns False and sets the -textiter location to the start of the textbuffer; otherwise, returns -True. The -backward_to_tag_toggle() method does not recognize -toggles located at the textiter location, only toggles before the textiter -location. - - - - - gtk.TextIter.forward_find_char - - - forward_find_char - pred - user_data - limit - - - - pred : - a function to be called on each - character - - - user_data : - user data for - pred - - - limit : - a gtk.TextIter - pointing at a position to end the search, or - None for the end of the - buffer. - - - Returns : - True if a match was - found - - - - - This method is available in PyGTK 2.4 and above. - - - The forward_find_char() method advances -the textiter, calling the function specified by pred -on each character. If pred returns -True, forward_find_char stops -scanning and returns True. If pred -never returns True, the textiter location is set to -limit or the end textiter, if -limit is None. - - - This method is likely to be very slow since the Python -function pred is called for every character. - - - - - - gtk.TextIter.backward_find_char - - - backward_find_char - pred - user_data - limit - - - - pred : - a function to be called on each - character - - - user_data : - user data for pred - - - limit : - a gtk.TextIter - pointing at a position to end the search, or - None for the beginning of the - buffer. - - - Returns : - True if a match was - found - - - - - This method is available in PyGTK 2.4 and above. - - - The backward_find_char() method is -similar to the forward_find_char() -method, but goes backward from the textiter location. - - - This method is likely to be very slow since the Python -function pred is called for every character. - - - - - - gtk.TextIter.forward_search - - - forward_search - str - flags - limit - None - - - - str : - a search string - - - flags : - the flags affecting how the search is -done - - - limit : - a bound for the search, or -None to set the bound to the end of the buffer - - - Returns : - a tuple containing gtk.TextIter -objects pointing at the start and end locations of the -match - - - - The forward_search() method searches -forward for the text string specified by str and -returns a tuple containing gtk.TextIter -objects that point at the start and end locations of the match. The search -will stop at the location specified by limit or the -end of the textbuffer if limit is -None or is not specified. Note that a search is a linear -or O(n) operation, so you may wish to use limit to -avoid locking up your UI when searching large buffers. - - If the gtk.TEXT_SEARCH_VISIBLE_ONLY flag is -present, the match may have invisible text interspersed in -str (i.e. str will be a -possibly-noncontiguous subsequence of the matched range). Likewise, if -gtk.TEXT_SEARCH_TEXT_ONLY is present, the match may have -pixbufs or child anchors mixed inside the matched range. If these flags are -not given, the match must be exact i.e. the special 0xFFFC character in -str will match embedded pixbufs or child -widgets. - - - - - gtk.TextIter.backward_search - - - backward_search - str - flags - limit - None - - - - str : - a search string - - - flags : - the flags affecting the -search - - - limit : - a bound for the search, or -None to set the bound to the end of the -buffer - - - Returns : - start of match and end of -match - - - - The backward_search() method is the -same as the forward_search() -method, except searches backward. - - - - - gtk.TextIter.equal - - - equal - rhs - - - - rhs : - another gtk.TextIter -object - - - Returns : - True if the textiters point -to the same place in the buffer - - - - The equal() method tests if the -textiter specified by rhs points to the same location -in the textbuffer as the textiter. - - - - - gtk.TextIter.compare - - - compare - rhs - - - - rhs : - another gtk.TextIter -object - - - Returns : - -1 if the textiter location is less than the -rhs location, 1 if the textiter location is greater, -0 if they are equal - - - - The compare() method returns: - - - - -1 if the textiter location is less than the location of -the textiter specified by rhs; - - - 1 if the textiter location is greater than the location -of the textiter specified by rhs; and, - - - 0 if the textiter location is equal to the location of -the textiter specified by rhs. - - - - Ordering is in character offset order, i.e. the first character -in the buffer is less than the second character in the buffer. - - - - - gtk.TextIter.in_range - - - in_range - start - end - - - - start : - the start of the text -range - - - end : - the end of the text range - - - Returns : - True if the textiter -location is in the text range - - - - The in_range() method returns -True if the textiter location is in the text range -specified by the gtk.TextIter -objects start and end. -start and end must be in -ascending order. - - - - - gtk.TextIter.order - - - order - second - - - - second : - another gtk.TextIter -object - - - - The order() method swaps the locations of -first and second if -second comes before first in -the buffer. This method can be used to ensure that -first and second are in -sequence. Most text buffer methods that take a range call this -automatically, so there's no real reason to call it yourself in those cases. -There are some exceptions, such as the in_range(), -that expect a pre-sorted range. - - - - - - diff --git a/docs/reference/pygtk-gtktextmark.xml b/docs/reference/pygtk-gtktextmark.xml deleted file mode 100644 index 2decf4fc..00000000 --- a/docs/reference/pygtk-gtktextmark.xml +++ /dev/null @@ -1,226 +0,0 @@ - - - - - - gtk.TextMark - a position in a textbuffer that is preserved across -textbuffer modifications - - - - Synopsis - - - gtk.TextMark - gobject.GObject - - set_visible - setting - - - get_visible - - - get_name - - - get_deleted - - - get_buffer - - - get_left_gravity - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.TextMark - - - - - - gtk.TextMark Signal Prototypes - - gobject.GObject Signal Prototypes - - - - Description - - A gtk.TextMark is -like a bookmark in a textbuffer - it preserves a position in the text. You -can get an iterator corresponding to a textmark by using the gtk.TextBuffer.get_iter_at_mark() -method. Unlike iterators, textmarks remain valid across buffer modifications -(e.g. when text is inserted or deleted). When text containing a textmark is -deleted, the textmark remains in the position originally occupied by the -deleted text. When text is inserted at a textmark, a textmark with left -gravity will be moved to the beginning of the newly-inserted text, and a -textmark with right gravity will be moved to the end. Textmarks optionally -have names that can be used to avoid passing the gtk.TextMark -object around. Textmarks are typically created using the gtk.TextBuffer.create_mark() -method. A gtk.TextBuffer -has two built-in gtk.TextMark -objects named: insert and -selection_bound which refer to the insertion point and -the boundary of the selection (these may refer to the same location). - - - - - Methods - - - gtk.TextMark.set_visible - - - set_visible - setting - - - - setting : - if True the textmark is -visible - - - - The set_visible() method sets the -visibility of the textmark to the value specified by -setting. If setting is -True the textmark will be visible as a vertical bar. The -insertion point is normally visible but most textmarks are not visible by -default. The text widget uses a visible textmark to indicate where a drop -will occur when dragging-and-dropping text. - - - - - gtk.TextMark.get_visible - - - get_visible - - - - Returns : - True if the textmark is -visible - - - - The get_visible() method returns -True if the textmark is visible (i.e. a vertical bar is -displayed for it) - - - - - gtk.TextMark.get_name - - - get_name - - - - Returns : - the textmark name or -None - - - - The get_name() method returns the -textmark name or None if the textmark is -anonymous. - - - - - gtk.TextMark.get_deleted - - - get_deleted - - - - Returns : - True if the textmark is -deleted - - - - The get_deleted() method returns -True if the textmark has been removed from its textbuffer -with gtk.TextBuffer.delete_mark(). -Textmarks can't be used once deleted. - - - - - gtk.TextMark.get_buffer - - - get_buffer - - - - Returns : - the textmark's gtk.TextBuffer - - - - The get_buffer() method returns the -gtk.TextBuffer -object the textmark is located inside, or None if the -textmark is deleted. - - - - - gtk.TextMark.get_left_gravity - - - get_left_gravity - - - - Returns : - True if the textmark has -left gravity - - - - The get_left_gravity() method returns -True if the textmark has left gravity. - - - - - - diff --git a/docs/reference/pygtk-gtktexttag.xml b/docs/reference/pygtk-gtktexttag.xml deleted file mode 100644 index 006c2a28..00000000 --- a/docs/reference/pygtk-gtktexttag.xml +++ /dev/null @@ -1,793 +0,0 @@ - - - - - - gtk.TextTag - an object used to apply attributes to text in a gtk.TextBuffer - - - - Synopsis - - - gtk.TextTag - gobject.GObject - - gtk.TextTag - name - None - - - get_priority - - - set_priority - priority - - - event - event_object - event - iter - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.TextTag - - - - - - gtk.TextTag Properties - -
- - - - - - - - - "background" - Write - The background color as a string - - - - "background-full-height" - Read-Write - If True, the background color fills -the entire line height - - - - "background-full-height-set" - Read-Write - If True, this tag affects background -height - - - - "background-gdk" - Read-Write - The background color as a (possibly unallocated) gtk.gdk.Color - - - - "background-set" - Read-Write - If True, this tag affects the -background color - - - - "background-stipple" - Read-Write - The bitmap to use as a mask when drawing the text -background - - - - "background-stipple-set" - Read-Write - If True, this tag affects the -background stipple - - - - "direction" - Read-Write - The text direction: -gtk.TEXT_DIR_NONE, gtk.TEXT_DIR_LTR or -gtk.TEXT_DIR_RTL - - - - "editable" - Read-Write - It True the text can be modified by -the user - - - - "editable-set" - Read-Write - If True, this tag affects text -editability - - - - "family" - Read-Write - The name of the font family, e.g. Sans, Helvetica, -Times, Monospace - - - - "family-set" - Read-Write - If True, this tag affects the font -family - - - - "font" - Read-Write - The font description as a string, e.g. "Sans Italic -12" - - - - "font-desc" - Read-Write - The font description as a pango.FontDescription -object - - - - "foreground" - Write - The foreground color as a string - - - - "foreground-gdk" - Read-Write - The foreground color as a (possibly unallocated) gtk.gdk.Color - - - - "foreground-set" - Read-Write - If True, this tag affects the -foreground color - - - - "foreground-stipple" - Read-Write - The bitmap to use as a mask when drawing the text -foreground - - - - "foreground-stipple-set" - Read-Write - If True, this tag affects the -foreground stipple - - - - "indent" - Read-Write - The amount to indent the paragraph, in pixels - - - - "indent-set" - Read-Write - If True, this tag affects -indentation - - - - "invisible" - Read-Write - If True, this text is hidden - - - - "invisible-set" - Read-Write - If True, this tag affects text -visibility - - - - "justification" - Read-Write - The text justification: -gtk.JUSTIFY_LEFT, gtk.JUSTIFY_RIGHT, -gtk.JUSTIFY_CENTER or -gtk.JUSTIFY_FILL - - - - "justification-set" - Read-Write - If True, this tag affects paragraph -justification - - - - "language" - Read-Write - The language this text is in, as an ISO code. Pango can -use this as a hint when rendering the text. If you don't understand this -parameter, you probably don't need it. - - - - "language-set" - Read-Write - If True, this tag affects the -language the text is rendered as - - - - "left-margin" - Read-Write - The width of the left margin in pixels - - - - "left-margin-set" - Read-Write - If True, this tag affects the left -margin - - - - "name" - Read-Write - The name of the texttag or None if -anonymous - - - - "paragraph-background" - Write - The paragraph background color as a string. This - property is available in GTK+ 2.8 and above. - - - - "paragraph-background-gdk" - Read-Write - The paragraph background color as a as a (possibly - unallocated) gtk.gdk.Color. - This property is available in GTK+ 2.8 and above. - - - - "paragraph-background-set" - Read-Write - if True this tag affects the - paragraph background color - - - - "pixels-above-lines" - Read-Write - The number of pixels of blank space above -paragraphs - - - - "pixels-above-lines-set" - Read-Write - If True, this tag affects the number -of pixels above lines - - - - "pixels-below-lines" - Read-Write - The number of pixels of blank space below -paragraphs - - - - "pixels-below-lines-set" - Read-Write - If True, this tag affects the number -of pixels above lines - - - - "pixels-inside-wrap" - Read-Write - The number of pixels of blank space between wrapped -lines in a paragraph - - - - "pixels-inside-wrap-set" - Read-Write - If True, this tag affects the number -of pixels between wrapped lines - - - - "right-margin" - Read-Write - The width of the right margin in pixels - - - - "right-margin-set" - Read-Write - If True, this tag affects the right -margin - - - - "rise" - Read-Write - The offset of text above the baseline (below the -baseline if rise is negative) in pixels - - - - "rise-set" - Read-Write - If True, this tag affects the -rise - - - - "scale" - Read-Write - The font size as a scale factor relative to the default -font size. This properly adapts to theme changes etc. so is recommended. -Pango predefines some scales such as -pango.SCALE_XX_SMALL, -pango.SCALE_X_SMALL, -pango.SCALE_SMALL, pango.SCALE_MEDIUM, -pango.SCALE_LARGE, -pango.SCALE_X_LARGE, -pango.SCALE_XX_LARGE. - - - - "scale-set" - Read-Write - If True, this tag scales the font -size by a factor - - - - "size" - Read-Write - The font size in Pango units. - - - - "size-points" - Read-Write - The font size in points - - - - "size-set" - Read-Write - If True, this tag affects the font -size - - - - "stretch" - Read-Write - The font stretch - one of: -pango.STRETCH_ULTRA_CONDENSED, -pango.STRETCH_EXTRA_CONDENSED, -pango.STRETCH_CONDENSED, -pango.STRETCH_SEMI_CONDENSED, -pango.STRETCH_NORMAL, -pango.STRETCH_SEMI_EXPANDED, -pango.STRETCH_EXPANDED, -pango.STRETCH_EXTRA_EXPANDED, -pango.STRETCH_ULTRA_EXPANDED - - - - "stretch-set" - Read-Write - If True, this tag affects the font -stretch - - - - "strikethrough" - Read-Write - If True, strike through the -text - - - - "strikethrough-set" - Read-Write - If True, this tag affects -strikethrough - - - - "style" - Read-Write - The font style - one of: -pango.STYLE_NORMAL, -pango.STYLE_OBLIQUE or -pango.STYLE_ITALIC. - - - - "style-set" - Read-Write - If True, this tag affects the font -style - - - - "tabs" - Read-Write - The custom tabs for this text - - - - "tabs-set" - Read-Write - If True, this tag affects -tabs - - - - "underline" - Read-Write - The style of underline for this text: -pango.UNDERLINE_NONE, -pango.UNDERLINE_SINGLE, -pango.UNDERLINE_DOUBLE or -pango.UNDERLINE_LOW - - - - "underline-set" - Read-Write - If True, this tag affects -underlining - - - - "variant" - Read-Write - The font variant - either -pango.VARIANT_NORMAL or -pango.VARIANT_SMALL_CAPS. - - - - "variant-set" - Read-Write - If True, this tag affects the font -variant - - - - "weight" - Read-Write - The font weight as an integer: -pango.WEIGHT_ULTRALIGHT = 200, -pango.WEIGHT_LIGHT = 300, -pango.WEIGHT_NORMAL = 400, -pango.WEIGHT_BOLD = 700, -pango.WEIGHT_ULTRABOLD = 800, -pango.WEIGHT_HEAVY = 900. - - - - "weight-set" - Read-Write - If True, this tag affects the font -weight - - - - "wrap-mode" - Read-Write - The wrap mode of the text: -gtk.WRAP_NONE, gtk.WRAP_CHAR or -gtk.WRAP_WORD - - - - "wrap-mode-set" - Read-Write - If True, this tag affects line wrap -mode - - - - - -
- -
- - - gtk.TextTag Signal Prototypes - - gobject.GObject Signal Prototypes - - - - "event" - - callback - texttag - widget - event - iter - user_param1 - ... - - - - - - - - - Description - - A gtk.TextTag object -holds attributes that can be applied to a range of text in a gtk.TextBuffer. -A texttag can be associated with more than one gtk.TextBuffer -by adding it to the gtk.TextTagTable -objects of the textbuffers. The attributes of a texttag can be set using the -GObject.set_property() -method or as part of texttag creation using the gtk.TextBuffer.create_tag() -method. Since not every attribute property of a gtk.TextTag may be -set each attribute property has a boolean property that indicates whether -the attribute property is set by this texttag. Therefore before retrieving -an attribute value from a texttag you have to check if the associated -boolean property of the attribute property is -True. - - - - - Constructor - - - gtk.TextTag - name - None - - - - name : - tag name, or None if the -texttag is anonymous - - - Returns : - a new gtk.TextTag - - - - Creates a gtk.TextTag with -the name specified by name. If -name is None the texttag will be -anonymous. The texttag attributes are configured using the GObject.set_property() -method. - - - - - Methods - - - gtk.TextTag.get_priority - - - get_priority - - - - Returns : - the texttag's priority. - - - - The get_priority() method returns the priority or the -texttag. - - - - - gtk.TextTag.set_priority - - - set_priority - priority - - - - priority : - the new priority - - - - The set_priority() method sets the -priority of a gtk.TextTag to the -value specified by priority. Valid priorities start -at 0 and go to one less than the value returned by the gtk.TextTagTable.get_size() -method. Each texttag in a table has a unique priority; setting the priority -of one texttag shifts the priorities of all the other texttags in the table -to maintain a unique priority for each texttag. Higher priority tags "win" -if two texttags both set the same text attribute for a range of text. When -adding a texttag to a gtk.TextTagTable, -it will be assigned the highest priority in the table by default; so -normally the precedence of a set of texttags is the order in which they were -added to the table, or created with the gtk.TextBuffer.create_tag() -method, that adds the texttag to the buffer's table automatically. - - - - - gtk.TextTag.event - - - event - event_object - event - iter - - - - event_object : - the object that received the event, such as a -widget - - - event : - the event - - - iter : - the location where the event was -received - - - Returns : - the result of signal emission (whether the -event was handled) - - - - The event() method emits the "event" -signal on the gtk.TextTag for the -widget specified by event_object with the event -specified by event at the textbuffer location -specified by iter. This method returns -True if the event was handled. - - - - - - - Signals - - - The "event" gtk.TextTag Signal - - - callback - texttag - widget - event - iter - user_param1 - ... - - - - - texttag : - the texttag that received the -signal - - - widget : - the widget that received -event - - - event : - the event - - - iter : - the gtk.TextIter -pointing to the location where the event was received - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "event" signal is emitted when an event occurs in a range of -text that is enclosed in the texttag. The widget that -the event occurred in is specified by widget. -iter holds the location that the event occurred at -and event describes the event. - - - - - -
diff --git a/docs/reference/pygtk-gtktexttagtable.xml b/docs/reference/pygtk-gtktexttagtable.xml deleted file mode 100644 index acdc3e54..00000000 --- a/docs/reference/pygtk-gtktexttagtable.xml +++ /dev/null @@ -1,443 +0,0 @@ - - - - - - gtk.TextTagTable - A collection of gtk.TextTag objects -that can be used together - - - - Synopsis - - - gtk.TextTagTable - gobject.GObject - - gtk.TextTagTable - - - add - tag - - - remove - tag - - - lookup - name - - - foreach - func - dataNone - - - get_size - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.TextTagTable - - - - - - gtk.TextTagTable Signal Prototypes - - gobject.GObject Signal Prototypes - - - - "tag-added" - - callback - texttagtable - texttag - user_param1 - ... - - - - - "tag-changed" - - callback - texttagtable - texttag - size_changed - user_param1 - ... - - - - - "tag-removed" - - callback - texttagtable - texttag - user_param1 - ... - - - - - - - - - Description - - A gtk.TextTagTable -object holds a set of gtk.TextTag objects -for use with a gtk.TextBuffer. -Usually a gtk.TextTagTable -is created automatically when a gtk.TextBuffer -is created but a standalone gtk.TextTagTable -can be created using the gtk.TextTagTable() constructor. -A gtk.TextTagTable -can be passed as an argument to the gtk.TextBuffer() constructor to -associate an existing gtk.TextTagTable -rather than creating a new one. This is useful when several textbuffers need -to use the same texttags. - - - - - Constructor - - - gtk.TextTagTable - - - - Returns : - a new gtk.TextTagTable - - - - Creates a new gtk.TextTagTable. -The table contains no tags by default. - - - - - Methods - - - gtk.TextTagTable.add - - - add - tag - - - - tag : - a gtk.TextTag - - - - The add() method adds a texttag to the -texttagtable. The texttag is assigned the highest priority in the -texttagtable. A ValueError exception is raised if -tag is in a texttag table already, or has the same -name as another texttag in the texttagtable. - - - - - gtk.TextTagTable.remove - - - remove - tag - - - - tag : - a gtk.TextTag - - - - The remove() method removes a texttag -from the texttagtable. - - - - - gtk.TextTagTable.lookup - - - lookup - name - - - - name : - the name of a texttag - - - Returns : - The texttag, or None if none -by that name is in the texttagtable. - - - - The lookup() method looks in the -texttagtable for a gtk.TextTag with -the name specified by name and returns it if found. -This method returns None if name -does not identify a gtk.TextTag in the -texttagtable. - - - - - gtk.TextTagTable.foreach - - - foreach - func - dataNone - - - - func : - a function to call on each texttag - - - data : - user data to pass to - func or - None - - - - - This method is available in PyGTK 2.4 and above. - - - The foreach() method calls the function -specified by func on each texttag in the text tag -table passing the user data specified by data. The -signature of func is: - - - def func(texttag, user_data): - - - where texttag is a gtk.TextTag in the -text tag table and user_data is -data. - - - - - gtk.TextTagTable.get_size - - - get_size - - - - Returns : - the number of texttags in the -texttagtable - - - - The get_size() method returns the size -of the texttagtable (number of texttags). - - - - - - - Signals - - - The "tag-added" gtk.TextTagTable Signal - - - callback - texttagtable - texttag - user_param1 - ... - - - - - texttagtable : - the texttagtable that received the -signal - - - texttag : - a gtk.TextTag - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "tag-added" signal is emitted when the gtk.TextTag -specified by texttag is added to -texttagtable. - - - - - The "tag-changed" gtk.TextTagTable Signal - - - callback - texttagtable - texttag - size_changed - user_param1 - ... - - - - - texttagtable : - the texttagtable that received the -signal - - - texttag : - a gtk.TextTag - - - size_changed : - if True a -texttag property has changed that may affect the size -of the text enclosed by the texttag - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "tag-changed" signal is emitted when a property of the gtk.TextTag -specified by texttag is changed. If -size_changed is True the text -enclosed by texttag will change size. - - - - - The "tag-removed" gtk.TextTagTable Signal - - - callback - texttagtable - texttag - user_param1 - ... - - - - - texttagtable : - the texttagtable that received the -signal - - - texttag : - a gtk.TextTag - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "tag-removed" signal is emitted when the gtk.TextTag -specified by texttag is removed from -texttagtable - - - - - - diff --git a/docs/reference/pygtk-gtktextview.xml b/docs/reference/pygtk-gtktextview.xml deleted file mode 100644 index 2330395b..00000000 --- a/docs/reference/pygtk-gtktextview.xml +++ /dev/null @@ -1,3462 +0,0 @@ - - - - - - gtk.TextView - a widget that displays the contents of a gtk.TextBuffer - - - - Synopsis - - - gtk.TextView - gtk.Container - - gtk.TextView - bufferNone - - - set_buffer - buffer - - - get_buffer - - - scroll_to_iter - iter - within_margin - use_alignFalse - xalign0.5 - yalign0.5 - - - scroll_to_mark - mark - within_margin - use_alignFalse - xalign0.5 - yalign0.5 - - - scroll_mark_onscreen - mark - - - move_mark_onscreen - mark - - - place_cursor_onscreen - - - get_visible_rect - - - - set_cursor_visible - setting - - - get_cursor_visible - - - get_iter_location - iter - - - get_iter_at_location - x - y - - - get_line_yrange - iter - - - get_line_at_y - target_iter - - - buffer_to_window_coords - win - buffer_x - buffer_y - - - window_to_buffer_coords - win - window_x - window_y - - - get_window - win - - - get_window_type - window - - - set_border_window_size - type - size - - - get_border_window_size - type - - - forward_display_line - iter - - - backward_display_line - iter - - - forward_display_line_end - iter - - - backward_display_line_start - iter - - - starts_display_line - iter - - - move_visually - iter - count - - - add_child_at_anchor - child - anchor - - - add_child_in_window - child - which_window - xpos - ypos - - - move_child - child - xpos - ypos - - - set_wrap_mode - wrap_mode - - - get_wrap_mode - - - - set_editable - setting - - - get_editable - - - - - set_overwrite - overwrite - - - get_overwrite - - - - set_accepts_tab - accepts_tab - - - get_accepts_tab - - - - - set_pixels_above_lines - pixels_above_lines - - - get_pixels_above_lines - - - set_pixels_below_lines - pixels_below_lines - - - get_pixels_below_lines - - - set_pixels_inside_wrap - pixels_inside_wrap - - - get_pixels_inside_wrap - - - set_justification - justification - - - get_justification - - - set_left_margin - left_margin - - - get_left_margin - - - set_right_margin - right_margin - - - get_right_margin - - - set_indent - indent - - - get_indent - - - set_tabs - tabs - - - get_tabs - - - - get_default_attributes - - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.TextView - - - - - - gtk.TextView Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - -
- - - - - - - - - "accepts-tab" - Read-Write - - If True, pressing -Tab will result in a tab character being entered; otherwise -the focus will be moved. Available in GTK+ 2.4 and above. - - - - "buffer" - Read-Write - - The buffer that is displayed. Available in GTK+ 2.4 and -above. - - - - "cursor-visible" - Read-Write - If True, the insertion cursor is -shown - - - - "editable" - Read-Write - If True, the text can be modified by -the user by default - - - - "indent" - Read-Write - The default amount to indent the paragraph, in -pixels - - - - "justification" - Read-Write - The default text justification: -gtk.JUSTIFY_LEFT, gtk.JUSTIFY_RIGHT, -gtk.JUSTIFY_CENTER or -gtk.JUSTIFY_FILL - - - - "left-margin" - Read-Write - The default width of the left margin in pixels - - - - "overwrite" - Read-Write - - If True, the entered text overwrites - existing contents. Available in GTK+ 2.4 and above. - - - - "pixels-above-lines" - Read-Write - The default number of pixels of blank space above -paragraphs - - - - "pixels-below-lines" - Read-Write - The default number of pixels of blank space below -paragraphs - - - - "pixels-inside-wrap" - Read-Write - The default number of pixels of blank space between -wrapped lines in a paragraph - - - - "right-margin" - Read-Write - The default width of the right margin in pixels - - - - "tabs" - Read-Write - The default custom tabs - - - - "wrap-mode" - Read-Write - The default wrap mode: -gtk.WRAP_NONE, gtk.WRAP_CHAR or -gtk.WRAP_WORD - - - - - -
- -
- - - gtk.TextView Style Properties - - gtk.Widget Style Properties - -
- - - - - - - - - "error-underline-color" - Read-Write - - The gtk.gdk.Color with -which to draw error-indication underlines. Available in GTK+ 2.4 and -above. - - - - - -
- -
- - - gtk.TextView Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - "backspace - - callback - textview - user_param1 - ... - - - - - "copy-clipboard" - - callback - textview - user_param1 - ... - - - - - "cut-clipboard" - - callback - textview - user_param1 - ... - - - - - "delete-from-cursor" - - callback - textview - delete_type - count - user_param1 - ... - - - - - "insert-at-cursor" - - callback - textview - string - user_param1 - ... - - - - - "move-cursor" - - callback - textview - step_size - count - extend_selection - user_param1 - ... - - - - - "move-focus" - - callback - textview - direction - user_param1 - ... - - - - - "move-viewport" - - callback - textview - scrollstep - count - user_param1 - ... - - - - - "page-horizontally" - - callback - textview - count - extend_selection - user_param1 - ... - - - - - "paste-clipboard" - - callback - textview - user_param1 - ... - - - - - "populate-popup" - - callback - textview - menu - user_param1 - ... - - - - - "select-all" - - callback - textview - select - user_param1 - ... - - - - - "set-anchor" - - callback - textview - user_param1 - ... - - - - - "set-scroll-adjustments" - - callback - textview - hadjustment - vadjustment - user_param1 - ... - - - - - "toggle-overwrite" - - callback - textview - user_param1 - ... - - - - - - - - - Description - - A gtk.TextView -widget provides the display for the contents of a gtk.TextBuffer -object. A textview provides a set of attributes for the default display of -text from a textbuffer. The attributes set by gtk.TextTag objects -override the attributes set on a gtk.TextView -widget. Since a gtk.TextBuffer -can be associated with multiple gtk.TextView -widgets each having a different set of default attributes, the display of -the same text in different textview widgets can be quite different except -for those attributes that are overridden by texttags. - - A gtk.TextView -widget has several gtk.gdk.Window -widgets most of which are not displayed by default: - - - - gtk.TEXT_WINDOW_WIDGET - - The widget window - - - - gtk.TEXT_WINDOW_TEXT - - The window that holds the text - - - - gtk.TEXT_WINDOW_LEFT - - The left border window - not displayed by -default - - - - gtk.TEXT_WINDOW_RIGHT - - The right border window - not displayed by -default - - - - gtk.TEXT_WINDOW_TOP - - The top border window - not displayed by -default - - - - gtk.TEXT_WINDOW_BOTTOM - - The bottom border window - not displayed by -default - - - - gtk.TEXT_WINDOW_PRIVATE - - An internal inaccessible gtk.gdk.Window - - - - - The border windows are not created until they are given a size by -using the set_border_window_size() -method. - - Depending on the wrap mode of the textview a textbuffer line may be -displayed as more than one screen display line. The textview has methods to -navigate through the display lines. - - A gtk.TextChildAnchor -in a gtk.TextBuffer -provides a place for a PyGTK widget to be placed in a -gtk.TextView. Each -textview displaying the same textbuffer with a child anchor must have a -different widget placed at that child anchor. In addition, a widget can be -placed at a specific location in one of the above gtk.TextView -windows using the add_child_in_window() -method. The widget will be clipped to the window boundaries if it is larger -than the window or located where it extends beyond the window -boundaries. - - A gtk.TextView has a -default popup menu that includes the usual cut, copy and paste -capabilities. In PyGTK 2.2 gtk.Clipboard -objects are supported so your program can access the contents of the cut, -copy and paste clipboard through the -gdk.SELECTION_CLIPBOARD clipboard. Also the selected text -in a gtk.TextView is -available on the gdk.SELECTION_PRIMARY clipboard. - - - - - Constructor - - - gtk.TextView - bufferNone - - - - buffer : - a gtk.TextBuffer -or None - - - Returns : - a new gtk.TextView. - - - - Creates a new gtk.TextView -widget displaying the gtk.TextBuffer -specified by buffer. If buffer -is None, a new gtk.TextBuffer -will be created. One textbuffer can be shared among many widgets. - - - - - Methods - - - gtk.TextView.set_buffer - - - set_buffer - buffer - - - - buffer : - a gtk.TextBuffer - - - - The set_buffer() method sets the gtk.TextBuffer -specified by buffer as the textbuffer being displayed -by the textview. - - - - - gtk.TextView.get_buffer - - - get_buffer - - - - Returns : - a gtk.TextBuffer - - - - The get_buffer() method returns the -gtk.TextBuffer -being displayed by this textview. - - - - - gtk.TextView.scroll_to_iter - - - scroll_to_iter - iter - within_margin - use_alignFalse - xalign0.5 - yalign0.5 - - - - iter : - a gtk.TextIter -object - - - within_margin : - the margin as a [0.0,0.5) fraction of screen -size - - - use_align : - if True use the alignment -arguments; if False, just get iter -on screen - - - xalign : - the horizontal alignment of -iter within visible area. - - - yalign : - the vertical alignment of -iter within visible area - - - Returns : - True if scrolling -occurred - - - - The scroll_to_iter() method scrolls the -textview so that the gtk.TextIter -location specified by iter is on the screen in the -position indicated by xalign and -yalign. If use_align is -True the alignments specify the fraction of screen space -to the left of or above the location of iter. If -use_align is False, the text -scrolls the minimal distance to get iter on screen, -possibly not scrolling at all. The effective screen for purposes of this -method is reduced by a margin of size specified by -within_margin. - - - This method uses the currently-computed height of the lines in -the text buffer. The line heights are computed in an idle handler so this -method may not have the desired effect if it's called before the height -computations are complete. To avoid oddness, consider using the scroll_to_mark() -method that saves a point to be scrolled to after line validation. - - - - - - gtk.TextView.scroll_to_mark - - - scroll_to_mark - mark - within_margin - use_alignFalse - xalign0.5 - yalign0.5 - - - - mark : - a gtk.TextMark -object - - - within_margin : - the margin as a [0.0,0.5) fraction of screen -size - - - use_align : - if True use the alignment -arguments; if False, just get mark -on screen - - - xalign : - the horizontal alignment of -mark within the visible area. - - - yalign : - the vertical alignment of -mark within the visible area - - - - The scroll_to_mark() method scrolls the -textview so that the gtk.TextMark -location specified by mark is on the screen in the -position specified by xalign and -yalign. If use_align is -True the alignments specify the fraction of screen space -to the left of or above the location of mark. If -use_align is False, the text -scrolls the minimal distance to get mark on screen, -possibly not scrolling at all. The effective screen for purposes of this -function is reduced by a margin of size specified by -within_margin. - - - - - gtk.TextView.scroll_mark_onscreen - - - scroll_mark_onscreen - mark - - - - mark : - a gtk.TextMark in -the textbuffer for textview - - - - The scroll_mark_onscreen() method -scrolls the textview the minimum distance to place the gtk.TextMark -location specified by mark within the visible area of -the widget. - - - - - gtk.TextView.move_mark_onscreen - - - move_mark_onscreen - mark - - - - mark : - a gtk.TextMark -object - - - Returns : - True if -mark moved (wasn't already -on screen) - - - - The move_mark_onscreen() moves the -gtk.TextMark -location specified by mark to a location within the -currently-visible text area of the textview. - - - - - gtk.TextView.place_cursor_onscreen - - - place_cursor_onscreen - - - - Returns : - True if the cursor had to be -moved. - - - - The place_cursor_onscreen() method -moves the cursor to a new location within the currently visible region of -the buffer, if it isn't there already. - - - - - gtk.TextView.get_visible_rect - - - get_visible_rect - - - - - Returns : - a gtk.gdk.Rectangle - - - - The get_visible_rect() method returns a -gtk.gdk.Rectangle -containing the coordinates of the currently-visible region of the buffer. -The rectangle is in buffer coordinates that can be converted to window -coordinates with the buffer_to_window_coords() -method. - - - - - gtk.TextView.set_cursor_visible - - - set_cursor_visible - setting - - - - setting : - if True show the insertion -cursor - - - - The set_cursor_visible() method sets -the "cursor-visible" property to the value of -setting. If setting is -True the cursor is visible; if False, -it is not. A buffer with no editable text probably shouldn't have a visible -cursor, so you may want to turn the cursor off. - - - - - gtk.TextView.get_cursor_visible - - - get_cursor_visible - - - - Returns : - True if the insertion mark -is visible - - - - The get_cursor_visible() method returns -the value of the "cursor-visible" property that determines if the insertion -point is visible. - - - - - gtk.TextView.get_iter_location - - - get_iter_location - iter - - - - iter : - a gtk.TextIter - - - Returns : - a gtk.gdk.Rectangle -containing the bounds of the character at -iter - - - - The get_iter_location() method returns -a gtk.gdk.Rectangle -that contains the character at the location specified by -iter. The rectangle position is in buffer coordinates -that can be converted to window coordinates with the buffer_to_window_coords() -method. - - - - - gtk.TextView.get_iter_at_location - - - get_iter_at_location - x - y - - - - x : - x position, in buffer -coordinates - - - y : - y position, in buffer -coordinates - - - Returns : - a gtk.TextIter - - - - The get_iter_at_location() method -returns a gtk.TextIter that -points at the location specified by the buffer coordinates -x and y. Buffer coordinates -are coordinates for the entire buffer, not just the currently-displayed -portion. Window coordinates from an event, must be converted to buffer -coordinates with the window_to_buffer_coords() -method before using them with this method. - - - - - - - gtk.TextView.get_line_yrange - - - get_line_yrange - iter - - - - iter : - a gtk.TextIter - - - Returns : - a tuple containing a y coordinate and a -height - - - - The get_line_yrange() method locates -the line containing the gtk.TextIter -specified by iter and returns a tuple containing the -y coordinate of the top of the line and the height of the line. The -coordinate is a buffer coordinate that can be converted to window -coordinates with the buffer_to_window_coords() -method. - - - - - gtk.TextView.get_line_at_y - - - get_line_at_y - y - - - - y : - a y coordinate - - - Returns : - a tuple containing a gtk.TextIter -pointing at the line start and the top coordinate of the -line - - - - The get_line_at_y() method returns a -tuple containing: - - - - a gtk.TextIter -pointing at the start of the line with the vertical coordinate specified by -y and, - - - the vertical coordinate of the top edge of the -line. - - - - y is in buffer coordinates that can be -converted from window coordinates with the window_to_buffer_coords() -method. - - - - - gtk.TextView.buffer_to_window_coords - - - buffer_to_window_coords - win - buffer_x - buffer_y - - - - win : - one of the textview windows except -gtk.TEXT_WINDOW_PRIVATE - - - buffer_x : - buffer x coordinate - - - buffer_y : - buffer y coordinate - - - Returns : - a tuple containing the window x and y -coordinates - - - - The buffer_to_window_coords() method -returns a tuple containing the x and y coordinates for the window specified -by win that correspond to the textbuffer coordinates -specified by buffer_x and -buffer_y. See the above description for more details on -textview window types. - - - You can't convert coordinates for a non-existing window (see -the set_border_window_size() -method). - - - - - - gtk.TextView.window_to_buffer_coords - - - window_to_buffer_coords - win - window_x - window_y - - - - win : - a textview window except -gtk.TEXT_WINDOW_PRIVATE - - - window_x : - window x coordinate - - - window_y : - window y coordinate - - - Returns : - a tuple containing the textbuffer x and y -coordinates - - - - The window_to_buffer_coords() method -returns a tuple containing the textbuffer x and y coordinates corresponding -to the window_x and window_y -coordinates in the window specified by win, See the -above description for more -details on textview window types. - - - You can't convert coordinates for a non-existing window (see -the set_border_window_size()) -method. - - - - - - gtk.TextView.get_window - - - get_window - win - - - - win : - a textview window type - - - Returns : - a gtk.gdk.Window, or -None - - - - The get_window() method returns the -gtk.gdk.Window -corresponding to an area of the textview specified by -win: - - - - gtk.TEXT_WINDOW_WIDGET - - The widget window - - - - gtk.TEXT_WINDOW_TEXT - - The window that holds the text - - - - gtk.TEXT_WINDOW_LEFT - - The left border window - not displayed by -default - - - - gtk.TEXT_WINDOW_RIGHT - - The right border window - not displayed by -default - - - - gtk.TEXT_WINDOW_TOP - - The top border window - not displayed by -default - - - - gtk.TEXT_WINDOW_BOTTOM - - The bottom border window - not displayed by -default - - - - gtk.TEXT_WINDOW_PRIVATE - - An internal inaccessible gtk.gdk.Window - - - - - This method returns None if the window is -nonexistent i.e. if its width or height is 0. - - - - - gtk.TextView.get_window_type - - - get_window_type - window - - - - window : - a window type - - - Returns : - the window type. - - - - The get_window_type() method returns -the type of the gtk.gdk.Window -specified by window. This method is used to find out -what window type an event corresponds to. If you connect to an event signal -on the textview, this method can be called on -event.window to see what window type it was. See the -get_window() -method for more details on window types. - - - - - gtk.TextView.set_border_window_size - - - set_border_window_size - type - size - - - - type : - a textview border window -type - - - size : - the width or height of the -window - - - - The set_border_window_size() method -sets the width of a gtk.TEXT_WINDOW_LEFT or -gtk.TEXT_WINDOW_RIGHT window, or the height of a -gtk.TEXT_WINDOW_TOP or -gtk.TEXT_WINDOW_BOTTOM window. This method automatically -destroys the corresponding window if the size is set to 0, and creates the -window if the size is set to non-zero. This method can only be used for the -"border windows", it doesn't work with the -gtk.TEXT_WINDOW_WIDGET, -gtk.TEXT_WINDOW_TEXT, or -gtk.TEXT_WINDOW_PRIVATE windows. - - - - - gtk.TextView.get_border_window_size - - - get_border_window_size - type - - - - type : - a textview border window -type - - - Returns : - the width or height of the textview border -window - - - - The get_border_window_size() method -returns the width or height of the border window of the type specified by -type. See the set_border_window_size() -method for more details. - - - - - gtk.TextView.forward_display_line - - - forward_display_line - iter - - - - iter : - a gtk.TextIter - - - Returns : - True if -iter was moved and is not on the end -iterator - - - - The forward_display_line() method moves -the location of iter forward by one display line. A -textview display line is different from a textbuffer line. Textbuffer lines -are paragraphs and are separated by newlines or other paragraph separator -characters. Display lines are created by line-wrapping a textbuffer line. If -wrapping is turned off, display lines and textbuffer lines will be the same. -Display lines are divided differently for each textview, since they depend -on the textview's width and the textview's default wrap mode. Paragraphs are -the same in all views, since they depend on the contents of the gtk.TextBuffer. -This method returns True if the location of -iter moves to a dereferenceable position (i.e. not -the end position). - - - - - gtk.TextView.backward_display_line - - - backward_display_line - iter - - - - iter : - a gtk.TextIter - - - Returns : - True if -iter was moved - - - - The backward_display_line() method -moves the location of iter backward by one display -line. A textview display line is different from a textbuffer line. Textview -lines are paragraphs and are separated by newlines or other paragraph -separator characters. Display lines are created by line-wrapping a -textbuffer line. If wrapping is turned off, display lines and textbuffer -lines will be the same. Display lines are divided differently for each -textview, since they depend on the textview's width and the textview's -default wrap mode. Paragraphs are the same in all views, since they depend -on the contents of the gtk.TextBuffer. -This method returns True if the location of -iter moves to a dereferenceable position (i.e. not -the end position). - - - - - gtk.TextView.forward_display_line_end - - - forward_display_line_end - iter - - - - iter : - a gtk.TextIter - - - Returns : - True if -iter was moved and is not on the end -iterator - - - - The forward_display_line_end() method -moves the location of iter forward to the next -display line end. A textview display line is different from a textbuffer -line. Textbuffer lines are paragraphs and are separated by newlines or other -paragraph separator characters. Display lines are created by line-wrapping a -textbuffer line. If wrapping is turned off, display lines and textbuffer -lines will be the same. Display lines are divided differently for each -textview, since they depend on the textview's width and the textview's -default wrap mode. Paragraphs are the same in all views, since they depend -on the contents of the gtk.TextBuffer. -This method returns True if the location of -iter moves to a dereferenceable position (i.e. not -the end position). - - - - - gtk.TextView.backward_display_line_start - - - backward_display_line_start - iter - - - - iter : - a gtk.TextIter - - - Returns : - True if -iter was moved - - - - The backward_display_line_start() -method moves the location of iter backward to the -next display line start. A textview display line is different from a -textbuffer line. Textbuffer lines are paragraphs and are separated by newlines -or other paragraph separator characters. Display lines are created by -line-wrapping a textbuffer line. If wrapping is turned off, display lines -and textbuffer lines will be the same. Display lines are divided differently -for each textview, since they depend on the textview's width and the -textview's default wrap mode. Paragraphs are the same in all views, since -they depend on the contents of the gtk.TextBuffer. -This method returns True if the location of -iter moves to a dereferenceable position (i.e. not -the end position). - - - - - gtk.TextView.starts_display_line - - - starts_display_line - iter - - - - iter : - a gtk.TextIter - - - Returns : - True if the location of -iter is at the beginning of a display -line - - - - The starts_display_line() method -returns True if the location of -iter is at the start of a display line. See the forward_display_line() -method for an explanation of display lines vs. textbuffer lines -(paragraphs). - - - - - gtk.TextView.move_visually - - - move_visually - iter - count - - - - iter : - a gtk.TextIter - - - count : - the number of characters to move (may be -negative) - - - Returns : - True if -iter moved and is not on the end -iterator - - - - The move_visually() method moves the -location of iter by count -cursor positions. If count is negative the location moves against the -normal text direction. Note a cursor position move may move over multiple -characters when multiple characters combine to form one grapheme. - - - - - gtk.TextView.add_child_at_anchor - - - add_child_at_anchor - child - anchor - - - - child : - a gtk.Widget - - - anchor : - a gtk.TextChildAnchor -in the textview's gtk.TextBuffer - - - - The add_child_at_anchor() method adds -the widget specified by child in the textview, at the -gtk.TextChildAnchor -specified by anchor. - - - - - gtk.TextView.add_child_in_window - - - add_child_in_window - child - which_window - xpos - ypos - - - - child : - a gtk.Widget - - - which_window : - the textview window -child should appear in - - - xpos : - the X position of child -in window coordinates - - - ypos : - the Y position of child -in window coordinates - - - - The add_child_in_window() method adds -the widget specified by child at the fixed -coordinates specified by xpos and -ypos in one of the text widget's windows specified by -which_window. The window must have nonzero size (see -the set_border_window_size() -method). - - - The child coordinates are given -relative to the gtk.gdk.Window -specified by which_window, and these coordinates have -no sane relationship to scrolling. When placing child -in a gtk.TEXT_WINDOW_WIDGET window, scrolling is -irrelevant, child floats above all scrollable areas. -However, placing child in one of the scrollable -windows (a border windows or the text window), you'll need to compute the -correct position of child in textbuffer coordinates -any time scrolling occurs or textbuffer changes occur, and then call the -move_child() -method to update the child's position. Unfortunately there's no good way to -detect that scrolling has occurred, using the current API; a possible hack -would be to update all child positions when the scroll adjustments change or -the text buffer changes. - - - - - - gtk.TextView.move_child - - - move_child - child - xpos - ypos - - - - child : - a child widget in the -textview - - - xpos : - the new X position in window -coordinates - - - ypos : - the new Y position in window -coordinates - - - - The move_child() method moves the -position of child to the location (in its current -window) specified by xpos and -ypos. - - - - - gtk.TextView.set_wrap_mode - - - set_wrap_mode - wrap_mode - - - - wrap_mode : - a wrap mode value - - - - The set_wrap_mode() method sets the -"wrap-mode" property of the textview to the value specified by -wrap_mode. The value of wrap_mode can be one of: -gtk.WRAP_NONE, gtk.WRAP_CHAR or -gtk.WRAP_WORD. The "wrap-mode" property defines the wrap -mode for text that is not influenced by a gtk.TextTag that -sets its "wrap_mode" attribute. - - - - - gtk.TextView.get_wrap_mode - - - get_wrap_mode - - - - Returns : - the line wrap setting - - - - The get_wrap_mode() method returns the -value of the "wrap-mode" property. The value of "wrap-mode" can be one of: -gtk.WRAP_NONE, gtk.WRAP_CHAR or -gtk.WRAP_WORD. The "wrap-mode" property defines the wrap -mode for text that is not influenced by a gtk.TextTag that -sets its "wrap_mode" attribute. - - - - - gtk.TextView.set_editable - - - set_editable - setting - - - - setting : - if True the text is editable -by default - - - - The set_editable() method sets the -"editable" property to the value of setting. If -setting is True the text in -textview is editable by default. The "editable" property determines the -editability of the gtk.TextView text -that is not influenced by a gtk.TextTag that -sets its "editable" attribute. - - - - - gtk.TextView.get_editable - - - get_editable - - - - - Returns : - True if text is editable -by default - - - - The get_editable() method returns the -value of the "editable" property. The "editable" property determines the -editability of the gtk.TextView text -that is not influenced by a gtk.TextTag that -sets its "editable" attribute. - - - - - gtk.TextView.set_overwrite - - - set_overwrite - overwrite - - - - overwrite : - if True turn on overwrite - mode; if False turn it off - - - - - This method is available in PyGTK 2.4 and above. - - - The set_overwrite() method sets the -"overwrite" property to the value of overwrite. If -overwrite is True, inserted text -overwrites the existing text. - - - - - gtk.TextView.get_overwrite - - - get_overwrite - - - - - Returns : - True if the textview is in - overwrite mode - - - - - This method is available in PyGTK 2.4 and above. - - - The get_overwrite() method returns the -value of the "overwrite" property. see the set_overwrite() -method for more information. - - - - - gtk.TextView.set_accepts_tab - - - set_accepts_tab - accepts_tab - - - - accepts_tab : - if True pressing the - Tab key should insert a tab character; if - False, pressing the Tab key - should move the keyboard focus. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_accepts_tab() method sets the -"accepts_tab" property to the value of -accepts_tab. If accepts_tab is -True a tab character is inserted. If -accepts_tab is False the keyboard -focus is moved to the next widget in the focus chain. - - - - - gtk.TextView.get_accepts_tab - - - get_accepts_tab - - - - - Returns : - True if pressing the - Tab key inserts a tab character, - False if pressing the Tab key - moves the keyboard focus. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_accepts_tab() method returns -the value of the "accepts_tab" property. See the set_accepts_tab() -method for more information. - - - - - gtk.TextView.set_pixels_above_lines - - - set_pixels_above_lines - pixels_above_lines - - - - pixels_above_lines : - the number of pixels above -paragraphs - - - - The set_pixels_above_lines() method -sets the "pixels-above-lines" property to the value of -pixels_above_lines. The "pixels-above-lines" property -determines the number of blank pixels to place above textbuffer lines -(paragraphs) in the textview for text that is not influenced by a gtk.TextTag that -sets its "pixels-above-lines" attribute. - - - - - gtk.TextView.get_pixels_above_lines - - - get_pixels_above_lines - - - - Returns : - the default number of pixels above -paragraphs - - - - The get_pixels_above_lines() method -returns the value of the "pixels-above-lines" property. The -"pixels-above-lines" property determines the number of pixels to put above -textbuffer lines (paragraphs) in the textview for text that is not -influenced by a gtk.TextTag that -sets its "pixels-above-lines" attribute. - - - - - gtk.TextView.set_pixels_below_lines - - - set_pixels_below_lines - pixels_below_lines - - - - pixels_below_lines : - the default number of pixels below -paragraphs - - - - The set_pixels_below_lines() method -sets the "pixels-below-lines" property to the value of -pixels_below_lines. The "pixels-below-lines" property -determines the number of blank pixels to place below textbuffer lines -(paragraphs) in the textview for text that is not influenced by a gtk.TextTag that -sets its "pixels-below-lines" attribute. - - - - - gtk.TextView.get_pixels_below_lines - - - get_pixels_below_lines - - - - Returns : - the default number of blank pixels below -paragraphs - - - - The get_pixels_below_lines() method -returns the value of the "pixels-below-lines" property. The -"pixels-below-lines" property determines the number of pixels to put below -textbuffer lines (paragraphs) in the textview for text that is not -influenced by a gtk.TextTag that -sets its "pixels-below-lines" attribute. - - - - - gtk.TextView.set_pixels_inside_wrap - - - set_pixels_inside_wrap - pixels_inside_wrap - - - - pixels_inside_wrap : - the default number of pixels between wrapped -lines - - - The set_pixels_inside_wrap() method -sets the "pixels-inside_wrap" property to the value of -pixels_inside_wrap. The "pixels-inside_wrap" property -determines the number of blank pixels to place between wrapped textbuffer -lines (inside paragraphs) for text that is not influenced by a gtk.TextTag that -sets its "pixels-inside_wrap" attribute. - - - - - gtk.TextView.get_pixels_inside_wrap - - - get_pixels_inside_wrap - - - - Returns : - the default number of pixels of blank space -between wrapped lines - - - - The get_pixels_inside_wrap() method -returns the value of the "pixels-inside-wrap" property. The -"pixels-inside-wrap" property determines the number of pixels to put between -wrapped textbuffer lines (inside paragraphs) for text that is not influenced -by a gtk.TextTag that -sets its "pixels-inside-wrap" attribute. - - - - - gtk.TextView.set_justification - - - set_justification - justification - - - - justification : - the text justification - - - - The set_justification() method sets the -"justification" property to the value of -justification. The value of justification must be one -of: gtk.JUSTIFY_LEFT, -gtk.JUSTIFY_RIGHT, gtk.JUSTIFY_CENTER -or gtk.JUSTIFY_FILL. The "justification" property -determines the justification of text in the textview that is not influenced -by a gtk.TextTag that -set its "justification" attribute. - - - - - gtk.TextView.get_justification - - - get_justification - - - - Returns : - the default justification - - - - The get_justification() method returns -the value of the "justification" property. the default justification of -paragraphs in text_view. The value of "justification" -must be one of: gtk.JUSTIFY_LEFT, -gtk.JUSTIFY_RIGHT, gtk.JUSTIFY_CENTER -or gtk.JUSTIFY_FILL. The "justification" property -determines the justification of text in the textview that is not influenced -by a gtk.TextTag that -set its "justification" attribute. - - - - - gtk.TextView.set_left_margin - - - set_left_margin - left_margin - - - - left_margin : - the default left margin in pixels - - - - The set_left_margin() method sets the -"left-margin" property to the value of left_margin. -The "left-margin"property determines the number of pixels of space for the -left margin of text that is not influenced by a gtk.TextTag that -sets its "left_margin" attribute. - - - - - gtk.TextView.get_left_margin - - - get_left_margin - - - - Returns : - the default left margin in -pixels - - - - The get_left_margin() method returns -the value of the "left_margin" property. The "left-margin"property -determines the number of pixels of space for the left margin of text that -is not influenced by a gtk.TextTag that -sets its "left_margin" attribute. - - - - - gtk.TextView.set_right_margin - - - set_right_margin - right_margin - - - - right_margin : - the default right margin in -pixels - - - The set_right_margin() method sets the -"right-margin" property to the value of right_margin. -The "right-margin"property determines the number of pixels of space for the -right margin of text that is not influenced by a gtk.TextTag that -sets its "right_margin" attribute. - - - - - gtk.TextView.get_right_margin - - - get_right_margin - - - - Returns : - the default right margin in -pixels - - - The get_right_margin() method returns -the value of the "right_margin" property. The "right-margin"property -determines the number of pixels of space for the right margin of text that -is not influenced by a gtk.TextTag that -sets its "right_margin" attribute. - - - - - gtk.TextView.set_indent - - - set_indent - indent - - - - indent : - the default indentation in -pixels - - - - The set_indent() method sets the -"indent" property to the value of indent. The -"indent" property determines the indentation for textview paragraphs that -are not influenced by a gtk.TextTag that -sets its "indent" attribute. The indentation may be negative. - - - - - gtk.TextView.get_indent - - - get_indent - - - - Returns : - the default number of pixels of -indentation - - - - The get_indent() method returns the -value of the "indent" property. The "indent" property determines the -indentation for textview paragraphs that are not influenced by a gtk.TextTag that -sets its "indent" attribute. The indentation may be negative. - - - - - gtk.TextView.set_tabs - - - set_tabs - tabs - - - - tabs : - the default tabs as a pango.TabArray - - - - The set_tabs() method sets the "tabs" -property to a copy of the value of tabs. The "tabs" -property contains the custom tab stops for the textview paragraphs that are -not influenced by a gtk.TextTag that -sets its "tabs" attribute. - - - - - gtk.TextView.get_tabs - - - get_tabs - - - - Returns : - a copy of default tab array, or -None if "standard" tabs are used - - - - The get_tabs() method returns the value -of the "tabs" property. The "tabs" property contains the custom tab stops -for the textview paragraphs that are not influenced by a gtk.TextTag that -sets its "tabs" attribute. The returned value will be -None if "standard" (8-space) tabs are used. - - - - - gtk.TextView.get_default_attributes - - - get_default_attributes - - - - Returns : - a new gtk.TextAttributes - - - - The get_default_attributes() method -returns a copy of the default gtk.TextAttributes. -These attributes are used for text unless the text is influenced by a gtk.TextTag. -You'd typically pass the default attributes in to the gtk.TextIter.get_attributes() -method to get the attributes in effect at a given text position. - - - - - - - Signals - - - The "backspace" gtk.TextView Signal - - callback - textview - user_param1 - ... - - - - - textview : - the object which received the signal. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - - This signal is available in GTK+ 2.10 and above. - - - The "backspace" signal is emitted when the - Backspace key is pressed. - - - - - - The "copy-clipboard" gtk.TextView Signal - - - callback - textview - user_param1 - ... - - - - - textview : - the textview that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "copy-clipboard" signal is emitted when a selection is -copied to the clipboard from textview. - - - - - The "cut-clipboard" gtk.TextView Signal - - - callback - textview - user_param1 - ... - - - - - textview : - the textview that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "cut-clipboard" signal is emitted when a selection is cut -from textview to the clipboard. - - - - - The "delete-from-cursor" gtk.TextView Signal - - - callback - textview - delete_type - count - user_param1 - ... - - - - - textview : - the textview that received the -signal - - - delete_type : - the type of deletion - - - count : - the number of deletions to -do - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "delete-from-cursor" signal is emitted when a deletion of -the type specified by delete_type is initiated by -user action (e.g. pressing the Delete or -Backspace keys). The value of -delete_type must be one of: - - - - gtk.DELETE_CHARS - - - gtk.DELETE_WORD_ENDS - - - gtk.DELETE_WORDS - - - gtk.DELETE_DISPLAY_LINES - - - gtk.DELETE_DISPLAY_LINE_ENDS - - - gtk.DELETE_PARAGRAPH_ENDS - - - gtk.DELETE_PARAGRAPHS - - - gtk.DELETE_WHITESPACE - - - - count specifies the number of times that -deletion should be applied. - - - - - The "insert-at-cursor" gtk.TextView Signal - - - callback - textview - string - user_param1 - ... - - - - - textview : - the textview that received the -signal - - - string : - the text to be inserted - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "insert-at-cursor" signal is emitted when -string is being inserted in -textview. - - - - - The "move-cursor" gtk.TextView Signal - - - callback - textview - step_size - count - extend_selection - user_param1 - ... - - - - - textview : - the textview that received the -signal - - - step_size : - the step size to move - - - count : - the number of steps to -move - - - extend_selection : - if True extend the -selection - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "move-cursor" signal is emitted when the cursor is moved by -count steps of step_size. If -extend_selection is True the -selection is extended by the cursor movement. The value of step_size must be -one of: - - - - gtk.MOVEMENT_LOGICAL_POSITIONS - - move by graphemes - - - - gtk.MOVEMENT_VISUAL_POSITIONS - - move by graphemes - - - - gtk.MOVEMENT_WORDS - - move by words - - - - gtk.MOVEMENT_DISPLAY_LINES - - move by lines(wrapped lines) - - - - gtk.MOVEMENT_DISPLAY_LINE_ENDS - - move to line ends(wrapped lines) - - - - gtk.MOVEMENT_PARAGRAPHS - - move by paragraphs(newline-ended lines) - - - - gtk.MOVEMENT_PARAGRAPH_ENDS - - move to ends of a paragraph - - - - gtk.MOVEMENT_PAGES - - move by pages - - - - gtk.MOVEMENT_BUFFER_ENDS - - move to ends of the buffer - - - - - - - - - - The "move-focus" gtk.TextView Signal - - - callback - textview - direction - user_param1 - ... - - - - - textview : - the textview that received the -signal - - - direction : - the direction to move the -focus - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "move-focus" signal is emitted when the focus moves from -textview in the direction specified by -direction that must be one of: -gtk.DIR_TAB_FORWARD, -gtk.DIR_TAB_BACKWARD, gtk.DIR_UP, -gtk.DIR_DOWN, gtk.DIR_LEFT or -gtk.DIR_RIGHT - - - - - The "move-viewport" gtk.TextView Signal - - - callback - textview - scrollstep - count - user_param1 - ... - - - - - textview : - the textview that received the -signal - - - scrollstep : - the size of the scroll step: - gtk.SCROLL_STEPS, - gtk.SCROLL_PAGES, - gtk.SCROLL_ENDS, - gtk.SCROLL_HORIZONTAL_STEPS, - gtk.SCROLL_HORIZONTAL_PAGES or - gtk.SCROLL_HORIZONTAL_ENDS - - - count : - the number of scroll steps of size - scrollstep to take - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.4 and above. - - - The "move-viewport" signal is emitted when the viewport is being -moved usually as the result of user action in moving the cursor or using -the scrollbars. - - - - - The "page-horizontally" gtk.TextView Signal - - - callback - textview - count - extend_selection - user_param1 - ... - - - - - textview : - the textview that received the -signal - - - count : - the number of pages to -move - - - extend_selection : - if True extend the -selection - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "page-horizontally" signal is emitted when user initiates -horizontal paging by pressing one of the key combinations: - - - - Control - Page Up - - - Page horizontally with -extend_selection set to -False - - - - Shift - Control - Page Up - - - Page horizontally with -extend_selection set to -True - - - - - - - - - - The "paste-clipboard" gtk.TextView Signal - - - callback - textview - user_param1 - ... - - - - - textview : - the textview that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "paste-clipboard" signal is emitted when the contents of the -clipboard are pasted into textview. - - - - - The "populate-popup" gtk.TextView Signal - - - callback - textview - menu - user_param1 - ... - - - - - textview : - the textview that received the -signal - - - menu : - the menu to populate - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "populate-popup" signal is emitted when the popup menu -(specified by menu) associated with -textview needs to be populated. - - - - - The "select-all" gtk.TextView Signal - - - callback - textview - select - user_param1 - ... - - - - - textview : - the textview that received the -signal - - - select : - if True select the buffer - contents; otherwise deselect the buffer - contents - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - - This signal is available in GTK+ 2.2 and above. - - - The "select-all" signal is emitted when the user presses one -of: - - - - Controla or -Control/ to -select all text in a buffer - - - Control\ to -deselect all text in a buffer - - - - - - - - - The "set-anchor" gtk.TextView Signal - - - callback - textview - user_param1 - ... - - - - - textview : - the textview that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "set-anchor" signal is emitted when an application calls the -GObject.emit()() -method on textview with "set-anchor" as the signal. - - - - - The "set-scroll-adjustments" gtk.TextView Signal - - - callback - textview - hadjustment - vadjustment - user_param1 - ... - - - - - textview : - the textview that received the -signal - - - hadjustment : - the horizontal adjustment - - - vadjustment : - the vertical adjustment - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "set-scroll-adjustments" signal is emitted when one or both -adjustments (specified by hadjustment and -vadjustment) are set on -textview. - - - - - The "toggle-overwrite" gtk.TextView Signal - - - callback - textview - user_param1 - ... - - - - - textview : - the textview that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "toggle-overwrite" signal is emitted when the user presses -the Insert key. - - - - - -
diff --git a/docs/reference/pygtk-gtktoggleaction.xml b/docs/reference/pygtk-gtktoggleaction.xml deleted file mode 100644 index 7cd5976c..00000000 --- a/docs/reference/pygtk-gtktoggleaction.xml +++ /dev/null @@ -1,350 +0,0 @@ - - - - - gtk.ToggleAction an action which can be - toggled between two states (new in PyGTK 2.4) - - - - Synopsis - - - gtk.ToggleAction - gtk.Action - - gtk.ToggleAction - name - label - tooltip - stock_id - - - toggled - - - - set_active - is_active - - - get_active - - - - set_draw_as_radio - draw_as_radio - - - get_draw_as_radio - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Action - +-- gtk.ToggleAction - - - - - - gtk.ToggleAction Properties - - gtk.Action Properties - -
- - - - - - - - - "active" - Read-Write - If the toggle action should be active in or not. This - property is available in GTK+ 2.10 and above. - - - - "draw-as-radio" - Read-Write - If True, the proxies for this action - look like radio action proxies. Available in GTK+ 2.4 and - above. - - - - - -
- -
- - - gtk.ToggleAction Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Action Signal Prototypes - - - - "toggled" - - callback - toggleaction - user_param1 - ... - - - - - - - - - Description - - - This object is available in PyGTK 2.4 and above. - - - A gtk.ToggleAction -which is a subclass of gtk.Action -corresponds roughly to a gtk.CheckMenuItem. It -has an "active" state specifying whether the action has been checked or -not. - - - - - Constructor - - - gtk.ToggleAction - name - label - tooltip - stock_id - - - - name : - a unique name for the action - - - label : - the label displayed in menu items and on -buttons - - - tooltip : - a tooltip for the action - - - stock_id : - the stock icon to display in widgets representing -the action - - - Returns : - a new gtk.ToggleAction - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new gtk.ToggleAction -object. To add the action to a gtk.ActionGroup -and set the accelerator for the action, call the gtk.ActionGroup.add_action_with_accel() -method. - - - - - Methods - - - gtk.ToggleAction.toggled - - - toggled - - - - - This method is available in PyGTK 2.4 and above. - - - The toggled() method emits the -"toggled" signal on the toggle action. - - - - - gtk.ToggleAction.set_active - - - set_active - is_active - - - - is_active : - if True the action should be - checked - - - - - This method is available in PyGTK 2.4 and above. - - - The set_active() method sets the -checked state on the toggle action. - - - - - gtk.ToggleAction.get_active - - - get_active - - - - - Returns : - True if the toggle action is - checked - - - - - This method is available in PyGTK 2.4 and above. - - - The get_active() method returns -True if the toggle action is checked. - - - - - gtk.ToggleAction.set_draw_as_radio - - - set_draw_as_radio - draw_as_radio - - - - draw_as_radio : - if True the action should - have proxies like a radio action - - - - - This method is available in PyGTK 2.4 and above. - - - The set_draw_as_radio() method sets the -"draw-as-radio" property to the value of -draw_as_radio. If -draw_as_radio is True the action -should have proxies like a radio action. - - - - - gtk.ToggleAction.get_draw_as_radio - - - get_draw_as_radio - - - - - Returns : - True if the action should - have proxies like a radio action. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_draw_as_radio() method returns -the value of the "draw-as-radio" property. If "draw-as-radio" is -True the action should have proxies like a radio -action. - - - - - - - Signals - - - The "toggled" gtk.ToggleAction Signal - - - callback - toggleaction - user_param1 - ... - - - - - toggleaction : - the toggleaction that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.4 and above. - - - The "toggled" signal is emitted when the toggle action changes -its active state. - - - - - -
diff --git a/docs/reference/pygtk-gtktogglebutton.xml b/docs/reference/pygtk-gtktogglebutton.xml deleted file mode 100644 index 123fe341..00000000 --- a/docs/reference/pygtk-gtktogglebutton.xml +++ /dev/null @@ -1,463 +0,0 @@ - - - - - - gtk.ToggleButton - a button that retains its state - - - - Synopsis - - - gtk.ToggleButton - gtk.Button - - gtk.ToggleButton - label - None - use_underline - True - - - set_mode - draw_indicator - - - get_mode - - - set_active - is_active - - - get_active - - - toggled - - - set_inconsistent - setting - - - get_inconsistent - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Button - +-- gtk.ToggleButton - - - - - - gtk.ToggleButton Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Button Properties - -
- - - - - - - - - "active" - Read-Write - If True, the toggle button should be -pressed in. - - - - "draw-indicator" - Read-Write - If True, the toggle part of the -button is displayed. - - - - "inconsistent" - Read-Write - If True, the toggle button is in an -"in between" state. - - - - - -
- -
- - - gtk.ToggleButton Style Properties - - gtk.Widget Style Properties - gtk.Button Style Properties - - - - - Attributes - -
- - - - - - - - - - "draw_indicator" - Read - If True, the toggle part of the -button is displayed. - - - - - -
- -
- - - gtk.ToggleButton Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Button Signal Prototypes - - - - "toggled" - - callback - togglebutton - user_param1 - ... - - - - - - - - - Description - - A gtk.ToggleButton -is a gtk.Button that has -two stable states: 'pressed-in' ("on" or "active") and "normal" ("off" or -"inactive"). The state changes to the alternate state each time the -togglebutton is clicked. The state of a gtk.ToggleButton -can be set specifically using the set_active() -method, and retrieved using the get_active() -method. To simply switch the state of a toggle button, use the toggled() -method. - - - - - Constructor - - - gtk.ToggleButton - label - None - use_underline - True - - - - label : - the text to be displayed by the button label -including an underscore to indicate the mnemonic character if desired or -None if no label is required. - - - use_underline : - if True, an underscore in the -label text indicates the next character should be underlined and used for the -mnemonic accelerator key if it is the first character so -marked. Available in PyGTK 2.4 and above. - - - Returns : - a new gtk.ToggleButton -widget - - - - Creates a new gtk.ToggleButton -widget with the text label specified by label. -label will be parsed for underscore characters that -indicate mnemonic accelerators. If label is -None or not specified, no label will be created. - - In PyGTK 2.4 and above the use_underline -parameter is available and defaults to True. If -use_underline is set to False the -label text will not be parsed for mnemonic characters. - - - - - Methods - - - gtk.ToggleButton.set_mode - - - set_mode - draw_indicator - - - - draw_indicator : - if True display the button -as an indicator with a label; if False just display as a -normal button - - - - The set_mode() method sets the -"draw-indicator" property to the value of -draw_indicator. If draw_indicator is -True the button is displayed as an indicator with a -label; otherwise, the button is displayed as a normal button. - - This method only affects subclasses of gtk.ToggleButton -like gtk.CheckButton -and gtk.RadioButton. - - - - - gtk.ToggleButton.get_mode - - - get_mode - - - - Returns : - True if the button is -displayed as an indicator with a label; False if -displayed as a normal button. - - - - The get_mode() method returns the value -of the "draw-indicator" property. If "draw-indicator" is -True the button is displayed as an indicator with a -label; if False, the button is displayed as a normal -button. See the set_mode() -method. - - - - - gtk.ToggleButton.set_active - - - set_active - is_active - - - - is_active : - if True the togglebutton -state is active ("on") - - - - The set_active() method sets the -"active" property to the value of is_active. If -is_active is True the gtk.ToggleButton -is 'pressed in', and if False it's 'normal'. This method -causes the "toggled" signal to be emitted. - - - - - gtk.ToggleButton.get_active - - - get_active - - - - Returns : - True if the togglebutton is -active - - - - The get_active() method returns the -value of the "active" property. If "active" is True the -togglebutton is 'pressed in'; if False, it's -'normal'. - - - - - gtk.ToggleButton.toggled - - - toggled - - - The toggled() method emits the -"toggled" signal on the togglebutton. - - - - - gtk.ToggleButton.set_inconsistent - - - set_inconsistent - setting - - - - setting : - if True the state is -inconsistent - - - - The set_inconsistent() method sets the -"inconsistent" property to the value of setting. If -setting is True the togglebutton -is displayed in the inconsistent state - an "in between" state. This method -is useful if the user has selected a range of elements (such as some text or -spreadsheet cells) that are affected by a toggle button, and the current -values in that range are inconsistent and you want to indicate that by -setting the toggle button to an "in between" display. Normally you would -turn off the inconsistent state again if the user clicks the toggle -button. - - - - - gtk.ToggleButton.get_inconsistent - - - get_inconsistent - - - - Returns : - True if the state is -inconsistent - - - - The get_inconsistent() method returns -the value of the "inconsistent" property. If "inconsistent" is -True the togglebutton is displayed in an 'in between' -state. See the set_inconsistent() -method for more details. - - - - - - - Signals - - - The "toggled" gtk.ToggleButton Signal - - - callback - togglebutton - user_param1 - ... - - - - - togglebutton : - the togglebutton that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "toggled" signal is emitted when the togglebutton state -changes either programmatically or by user action. - - - - - -
diff --git a/docs/reference/pygtk-gtktoggletoolbutton.xml b/docs/reference/pygtk-gtktoggletoolbutton.xml deleted file mode 100644 index 4c4002be..00000000 --- a/docs/reference/pygtk-gtktoggletoolbutton.xml +++ /dev/null @@ -1,266 +0,0 @@ - - - - - gtk.ToggleToolButton - - A gtk.ToolItem -containing a toggle button (new in PyGTK 2.4) - - - - Synopsis - - - gtk.ToggleToolButton - gtk.ToolButton - - gtk.ToggleToolButton - stock_idNone - - - set_active - is_active - - - get_active - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.ToolItem - +-- gtk.ToolButton - +-- gtk.ToggleToolButton - - - - - - gtk.ToggleToolButton Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.ToolItem Properties - gtk.ToolButton Properties - -
- - - - - - - - - "active" - Read-Write - If the toggle tool button should be pressed in or not. - This property is available in GTK+ 2.8 and above. - - - - - -
- -
- - - gtk.ToggleToolButton Style Properties - - gtk.Widget Style Properties - gtk.ToolButton Style Properties - - - - - gtk.ToggleToolButton Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.ToolItem Signal Prototypes - gtk.ToolButton Signal Prototypes - - - - "toggled" - - callback - toggletoolbutton - user_param1 - ... - - - - - - - - - Description - - - This widget is available in PyGTK 2.4 and above. - - - A gtk.ToggleToolButton -is a gtk.ToolItem that -contains a toggle button. Use the gtk.ToggleToolButton() -constructor to create a new gtk.ToggleToolButton. - - - - - Constructor - - - gtk.ToggleToolButton - stock_idNone - - - - stock_id : - the name of a stock item - - - Returns : - a newly created gtk.ToggleToolButton - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new gtk.ToggleToolButton. If -stock_id is not None the toggle -tool button contains the image and text from the specified stock -item. - - - - - Methods - - - gtk.ToggleToolButton.set_active - - - set_active - is_active - - - - is_active : - if True the toggle tool - button is active - - - - - This method is available in PyGTK 2.4 and above. - - - The set_active() method sets the status -of the toggle tool button to the value specified by -is_active. If is_active is -True the gtk.ToggleButton -is 'pressed in' (active). This method causes the toggled signal to be -emitted. - - - - - gtk.ToggleToolButton.get_active - - - get_active - - - - - Returns : - True if the toggle tool - button is pressed in (active) - - - - - This method is available in PyGTK 2.4 and above. - - - The get_active() method returns -True if the toggle tool button is pressed in (active) and -False if it is raised. - - - - - - - Signals - - - The "toggled" gtk.ToggleToolButton Signal - - - callback - toggletoolbutton - user_param1 - ... - - - - - toggletoolbutton : - the toggletoolbutton that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.4 and above. - - - The "toggled" signal is emitted when the toggle tool button -changes state. - - - - - -
diff --git a/docs/reference/pygtk-gtktoolbar.xml b/docs/reference/pygtk-gtktoolbar.xml deleted file mode 100644 index 3a452745..00000000 --- a/docs/reference/pygtk-gtktoolbar.xml +++ /dev/null @@ -1,2570 +0,0 @@ - - - - - - gtk.Toolbar - a bar holding buttons and other widgets. - - - - Synopsis - - - gtk.Toolbar - gtk.Container - - gtk.Toolbar - - - - - insert - item - pos - - - get_item_index - item - - - get_n_items - - - - get_nth_item - n - - - get_drop_index - x - y - - - set_drop_highlight_item - tool_item - index - - - set_show_arrow - show_arrow - - - get_show_arrow - - - - get_relief_style - - - - - append_item - text - tooltip_text - tooltip_private_text - icon - callback - user_dataNone - - - prepend_item - text - tooltip_text - tooltip_private_text - icon - callback - user_data - - - insert_item - text - tooltip_text - tooltip_private_text - icon - callback - user_data - position - - - insert_stock - stock_id - tooltip_text - tooltip_private_text - callback - user_data - position - - - append_space - - - prepend_space - - - insert_space - position - - - remove_space - position - - - append_element - type - widget - text - tooltip_text - tooltip_private_text - icon - callback - user_data - - - prepend_element - type - widget - text - tooltip_text - tooltip_private_text - icon - callback - user_data - - - insert_element - type - widget - text - tooltip_text - tooltip_private_text - icon - callback - user_data - position - - - append_widget - widget - tooltip_text - tooltip_private_text - - - prepend_widget - widget - tooltip_text - tooltip_private_text - - - insert_widget - widget - tooltip_text - tooltip_private_text - position - - - set_orientation - orientation - - - set_style - style - - - set_icon_size - icon_size - - - set_tooltips - enable - - - unset_style - - - unset_icon_size - - - get_orientation - - - get_style - - - get_icon_size - - - get_tooltips - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Toolbar - - - - - - gtk.Toolbar Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - -
- - - - - - - - - "icon-size" - Read-Write - The size of the icons in a toolbar is normally determined - by the "toolbar-icon-size" setting. When this property is set, it - overrides the setting. This should only be used for - special-purpose toolbars, normal application toolbars should - respect the user preferences for the size of icons. This property - is available in GTK+ 2.10 and above. - - - - "icon-size-set" - Read-Write - if True the icon-size property has - been set. This property is available in GTK+ 2.10 and - above. - - - - "orientation" - Read-Write - The orientation of the toolbar: -gtk.ORIENTATION_HORIZONTAL or -gtk.ORIENTATION_VERTICAL - - - - "show-arrow" - Read-Write - If True an arrow should be shown -if the toolbar doesn't fit. Available in GTK+ 2.4 and above. - - - - "toolbar-style" - Read-Write - The toolbar style: -gtk.TOOLBAR_ICONS, gtk.TOOLBAR_TEXT, -gtk.TOOLBAR_BOTH or -gtk.TOOLBAR_BOTH_HORIZ - - - - "tooltips" - Read-Write - If the tooltips of the toolbar should be active or not. - This property is available in GTK+ 2.8 and above. - - - - - -
- -
- - - gtk.Toolbar Style Properties - - gtk.Widget Style Properties - -
- - - - - - - - - "button-relief" - Read - The type of bevel around toolbar buttons: -gtk.RELIEF_NORMAL, gtk.RELIEF_HALF or -gtk.RELIEF_NONE - - - - "internal-padding" - Read - The amount of border space between the toolbar shadow -and the buttons - - - - "max-child-expand" - Read - Maximum amount of space an expandable item will be given - - - - "shadow-type" - Read - The style of bevel around the toolbar: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN -or gtk.SHADOW_ETCHED_OUT - - - - "space-size" - Read - The size of spacers - - - - "space-style" - Read - The spacer style: -gtk.TOOLBAR_SPACE_EMPTY or -gtk.TOOLBAR_SPACE_LINE - - - - - -
- -
- - - gtk.Toolbar Child Properties - -
- - - - - - - - - "expand" - Read-Write - If True, the item should receive -extra space when the toolbar grows. Available in GTK+ 2.4 and above. - - - - - "homogeneous" - Read-Write - If True, the item should be the -same size as other homogeneous items. Available in GTK+ 2.4 and above. - - - - -
- -
- - - gtk.Toolbar Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - "focus-home-or-end - - callback - toolbar - focus_home - user_param1 - ... - - - - - "move-focus - - callback - toolbar - dir - user_param1 - ... - - - - - "orientation-changed" - - callback - toolbar - orientation - user_param1 - ... - - - - - "popup-context-menu" - - callback - toolbar - x - y - button - user_param1 - ... - - - - - "style-changed" - - callback - toolbar - style - user_param1 - ... - - - - - - - - - Description - - A gtk.Toolbar is a -subclass of gtk.Container -that holds and manages a set of buttons and widgets in a horizontal or -vertical bar. A gtk.Toolbar is -usually used in an application as an alternative to a menu to provide a more -direct means to activate dialogs or set options. Items in the toolbar can be -visibly grouped by adding space between the elements. The toolbar style can -be set to display only icons, only text or both icons and text. Each toolbar -item has an associated gtk.Tooltips to -provide a brief description of the items purpose. - - In PyGTK 2.4 the interface of the gtk.Toolbar has -changed to take advantage of the new gtk.ToolItem -widgets. The following describes the new features. - - A toolbar can contain instances of a subclass of gtk.ToolItem -(gtk.ToolButton, -gtk.RadioToolButton, -gtk.ToggleToolButton -and gtk.SeparatorToolItem). To -add a gtk.ToolItem to -the a toolbar, use the insert() -method. To remove an item from the toolbar use the gtk.Container.remove() -method. To add a button to the toolbar, add an instance of gtk.ToolButton. Toolbar -items can be visually grouped by adding instances of gtk.SeparatorToolItem -to the toolbar. If a gtk.SeparatorToolItem -has the "expand" property set to True and the "draw" -property set to False the effect is to force all -following items to the end of the toolbar. Creating a context menu for the -toolbar can be done by connecting to the "popup-context-menu" signal. - - - - - Constructor - - - gtk.Toolbar - - - - Returns : - a new gtk.Toolbar -widget - - - - Creates a new gtk.Toolbar -widget. - - - - - Methods - - - gtk.Toolbar.insert - - - insert - item - pos - - - - item : - a gtk.ToolItem - - - pos : - the position of the new item - - - - - This method is available in PyGTK 2.4 and above - - - The insert() method inserts the gtk.ToolItem -specified by item into the toolbar at the position -specified by pos. If pos is 0 -item is prepended to the start of the toolbar. If -pos is negative, item is -appended to the end of the toolbar. - - - - - gtk.Toolbar.get_item_index - - - get_item_index - item - - - - item : - a gtk.ToolItem - that is a child of the toolbar - - - Returns : - the position of item on the - toolbar. - - - - - This method is available in PyGTK 2.4 and above - - - The get_item_index() method returns the -position (starting from 0) on the toolbar of the gtk.ToolItem -specified by item. It is an error -if item is not a child of the toolbar. - - - - - gtk.Toolbar.get_n_items - - - get_n_items - - - - - Returns : - the number of items on the - toolbar - - - - - This method is available in PyGTK 2.4 and above - - - The get_n_items() method returns the -number of items on the toolbar. - - - - - gtk.Toolbar.get_nth_item - - - get_nth_item - n - - - - n : - a position on the toolbar - - - Returns : - The gtk.ToolItem - on the toolbar at position n, or - None if there isn't an item at position - n - - - - - This method is available in PyGTK 2.4 and above - - - The get_nth_item() method returns the -toolbar gtk.ToolItem at -the position specified by n, or -None if the toolbar does not contain an item at position -n. - - - - - gtk.Toolbar.get_drop_index - - - get_drop_index - x - y - - - - x : - the x coordinate of a point on the - toolbar - - - y : - the y coordinate of a point on the - toolbar - - - Returns : - The toolbar position corresponding to the point - (x, - y). - - - - - This method is available in PyGTK 2.4 and above - - - The get_drop_index() method returns the -position on the toolbar corresponding to the point specified by -x and y. This is useful when -dragging items to the toolbar. This method returns the position index where -a new item should be inserted. - - The x and y -coordinates are relative to the toolbar. - - - - - gtk.Toolbar.set_drop_highlight_item - - - set_drop_highlight_item - tool_item - index - - - - tool_item : - a gtk.ToolItem, - or None to turn off - highlighting - - - index : - a position index on the toolbar - - - - - This method is available in PyGTK 2.4 and above - - - The set_drop_highlight_item() method -highlights the toolbar to give an idea of what it would look like if the -gtk.ToolItem -specified by tool_item was added at the position -specified by index. If -tool_item is None, highlighting is -turned off and index is ignored. - - The tool_item passed to this method must -not be part of any widget hierarchy. When an item is set as drop highlight -item it can not added to any widget hierarchy or used as highlight item for -another toolbar. - - - - - gtk.Toolbar.set_show_arrow - - - set_show_arrow - show_arrow - - - - show_arrow : - if True, show an arrow to - indicate menu overflow - - - - - This method is available in PyGTK 2.4 and above - - - The set_show_arrow() method sets the -"show-arrow" property to the value of show_arrow. If -show_arrow is True an arrow is -displayed (for an overflow menu) when the toolbar doesn't have room for all -items on it. Items that are not displayed due to a lack of room are -available through the overflow menu. - - - - - gtk.Toolbar.get_show_arrow - - - get_show_arrow - - - - - Returns : - True if an overflow menu can - be used - - - - - This method is available in PyGTK 2.4 and above - - - The get_show_arrow() method returns the -value of the "show-arrow" property. If "show-arrow" is -True the toolbar has an overflow menu. See the set_show_arrow() -method for more information. - - - - - gtk.Toolbar.get_relief_style - - - get_relief_style - - - - - Returns : - the relief style of buttons on the - toolbar - - - - - This method is available in PyGTK 2.4 and above - - - The get_relief_style() method returns -the relief style of buttons on the toolbar. See the gtk.Button.set_relief() -method for more information. The return value will be one of: - - - - gtk.RELIEF_NORMAL - - - gtk.RELIEF_HALF - - - gtk.RELIEF_NONE - - - - - - - gtk.Toolbar.append_item - - - append_item - text - tooltip_text - tooltip_private_text - icon - callback - user_data - None - - - - text : - the text label or -None - - - tooltip_text : - the tooltip text or -None - - - tooltip_private_text : - the private tooltip text or -None - - - icon : - a gtk.Widget or -None - - - callback : - a callback function or method or -None - - - user_data : - a user data object or -None - - - Returns : - a gtk.Button -widget - - - - - This method is deprecated in PyGTK 2.4 and above - - - The append_item() method adds a new -gtk.Button to -the end (right or bottom) of the toolbar with: - - - - the label specified by -text, - - - the gtk.Tooltips text -and private text specified by tooltip_text and -tooltip_private_text respectively and - - - an icon (or any gtk.Widget) -specified by icon. - - - - A reference to the new button is returned. When the button is -clicked the function or method specified by callback -will be called with the user data specified by -user_data. All or any of the arguments can have the -value None. - - - - - gtk.Toolbar.prepend_item - - - prepend_item - text - tooltip_text - tooltip_private_text - icon - callback - user_data - - - - text : - the text label or -None - - - tooltip_text : - the tooltip text or -None - - - tooltip_private_text : - the private tooltip text or -None - - - icon : - a gtk.Widget or -None - - - callback : - a callback function or method or -None - - - user_data : - a user data object or -None - - - Returns : - a gtk.Button -widget - - - - - This method is deprecated in PyGTK 2.4 and above - - - The prepend_item() method adds a new -gtk.Button to -the beginning (left or top) of the toolbar with: - - - - the label specified by -text, - - - the gtk.Tooltips text -and private text specified by tooltip_text and -tooltip_private_text respectively and - - - an icon (or any gtk.Widget) -specified by icon. - - - - A reference to the new button is returned. When the button is -clicked the function or method specified by callback -will be called with the user data specified by -user_data. All or any of the arguments can have the -value None. - - - - - gtk.Toolbar.insert_item - - - insert_item - text - tooltip_text - tooltip_private_text - icon - callback - user_data - position - - - - text : - the text label or -None - - - tooltip_text : - the tooltip text or -None - - - tooltip_private_text : - the private tooltip text or -None - - - icon : - a gtk.Widget or -None - - - callback : - a callback function or method or -None - - - user_data : - a user data object or -None - - - position : - The position to insert the button or -1 to -append - - - Returns : - a gtk.Button -widget - - - - - This method is deprecated in PyGTK 2.4 and above - - - The insert_item() method inserts a new -gtk.Button the -toolbar at the position specified by position -with: - - - - the label specified by -text, - - - the gtk.Tooltips text -and private text specified by tooltip_text and -tooltip_private_text respectively and - - - an icon (or any gtk.Widget) -specified by icon. - - - - A reference to the new button is returned. When the button is -clicked the function or method specified by callback -will be called with the user data specified by -user_data. All or any of the arguments (except -position) can have the value -None. If position is negative -the button will be appended to the toolbar. - - - - - gtk.Toolbar.insert_stock - - - insert_stock - stock_id - tooltip_text - tooltip_private_text - callback - user_data - position - - - - stock_id : - the ID of the stock item to use as the button -label and icon - - - tooltip_text : - the tooltip text or -None - - - tooltip_private_text : - the private tooltip text or -None - - - callback : - a callback function or method or -None - - - user_data : - a user data object or -None - - - position : - The position to insert the button or -1 to -append - - - Returns : - a gtk.Button -widget - - - - - This method is deprecated in PyGTK 2.4 and above - - - The insert_stock() method inserts a new -gtk.Button the -toolbar at the position specified by position -with: - - - - the stock item specified by -stock_id used for the label text and icon, - - - the gtk.Tooltips text -and private text specified by tooltip_text and -tooltip_private_text respectively. - - - - A reference to the new button is returned. When the button is -clicked the function or method specified by callback -will be called with the user data specified by -user_data. All or any of the arguments (except -position) can have the value -None. If position is negative -the button will be appended to the toolbar. If -stock_id is not a known stock item ID, it's inserted -verbatim, except that underscores are used to mark mnemonic -accelerators. - - - - - gtk.Toolbar.append_space - - - append_space - - - - This method is deprecated in PyGTK 2.4 and above - - - The append_space() method appends a -space to the end of the toolbar. - - - - - gtk.Toolbar.prepend_space - - - prepend_space - - - - This method is deprecated in PyGTK 2.4 and above - - - The prepend_space() method prepends a -space to the beginning of the toolbar. - - - - - gtk.Toolbar.insert_space - - - insert_space - position - - - - position : - The position to insert the space or -1 to -append - - - - - This method is deprecated in PyGTK 2.4 and above - - - The insert_space() method inserts a -space at the specified position in the -toolbar. - - - - - gtk.Toolbar.remove_space - - - remove_space - position - - - - position : - the index of the space to -remove. - - - - - This method is deprecated in PyGTK 2.4 and above - - - The remove_space() method removes a -space from the specified position. - - - - - gtk.Toolbar.append_element - - - append_element - type - widget - text - tooltip_text - tooltip_private_text - icon - callback - user_data - - - - type : - the type of widget - one -of: gtk.TOOLBAR_CHILD_SPACE, -gtk.TOOLBAR_CHILD_BUTTON, -gtk.TOOLBAR_CHILD_TOGGLEBUTTON, -gtk.TOOLBAR_CHILD_RADIOBUTTON or -gtk.TOOLBAR_CHILD_WIDGET - - - widget : - a widget or -None - - - text : - the text label or -None - - - tooltip_text : - the tooltip text or -None - - - tooltip_private_text : - the private tooltip text or -None - - - icon : - a gtk.Widget or -None - - - callback : - a callback function or method or -None - - - user_data : - a user data object or -None - - - Returns : - the new toolbar element as a gtk.Widget. - - - - - This method is deprecated in PyGTK 2.4 and above - - - The append_element() method adds a new -element of the specified type to the end (right or -bottom) of the toolbar with the gtk.Tooltips text -and private text specified by tooltip_text and -tooltip_private_text respectively. The behavior of -the method depends on the type of element being added: - - - - gtk.TOOLBAR_CHILD_WIDGET - - The specified widget is the -element added to the toolbar. The text, -icon, callback and -user_data arguments are ignored. - - - - gtk.TOOLBAR_CHILD_BUTTON - - The string specified by text and -the gtk.Widget -specified by icon are used to create the label for a -gtk.Button to -add to the toolbar. The function or method specified by -callback and the object specified by -user_data are connected to the button's "clicked" -signal. The widget argument must have the value -None. - - - - gtk.TOOLBAR_CHILD_TOGGLEBUTTON - - The string specified by text and -the gtk.Widget -specified by icon are used to create the label for a -gtk.ToggleButton -to add to the toolbar. The function or method specified by -callback and the object specified by -user_data are connected to the button's "clicked" -signal. The widget argument must have the value -None. - - - - gtk.TOOLBAR_CHILD_RADIOBUTTON - - The string specified by text and -the gtk.Widget -specified by icon are used to create the label for a -gtk.RadioButton -to add to the toolbar. The gtk.RadioButton -specified by widget is used to set the group for the -radiobutton. If widget is None a -new radiobutton group is created. The function or method specified by -callback and the object specified by -user_data are connected to the button's "clicked" -signal. - - - - gtk.TOOLBAR_CHILD_SPACE - - A space element is added to the toolbar. The -widget argument must have the value -None. The text, -icon, tooltip_text, -tooltip_private_text, callback -and user_data arguments are ignored. - - - - - The text, icon, -callback, user_data, -tooltip_text and -tooltip_private_text arguments may have the value -None. - - - - - gtk.Toolbar.prepend_element - - - prepend_element - type - widget - text - tooltip_text - tooltip_private_text - icon - callback - user_data - - - - type : - the type of widget - one -of: gtk.TOOLBAR_CHILD_SPACE, -gtk.TOOLBAR_CHILD_BUTTON, -gtk.TOOLBAR_CHILD_TOGGLEBUTTON, -gtk.TOOLBAR_CHILD_RADIOBUTTON or -gtk.TOOLBAR_CHILD_WIDGET - - - widget : - a widget or -None - - - text : - the text label or -None - - - tooltip_text : - the tooltip text or -None - - - tooltip_private_text : - the private tooltip text or -None - - - icon : - a gtk.Widget or -None - - - callback : - a callback function or method or -None - - - user_data : - a user data object or -None - - - Returns : - the new toolbar element as a gtk.Widget. - - - - - This method is deprecated in PyGTK 2.4 and above - - - The prepend_element() method adds a new -element of the specified type to the beginning (left -or top) of the toolbar with the gtk.Tooltips text -and private text specified by tooltip_text and -tooltip_private_text respectively. The behavior of -the method depends on the type of element being added: - - - - gtk.TOOLBAR_CHILD_WIDGET - - The widget specified by widget -is the element added to the toolbar, otherwise widget -should be None. The text, -icon, callback and -user_data arguments are ignored. - - - - gtk.TOOLBAR_CHILD_BUTTON - - The string specified by text and -the gtk.Widget -specified by icon are used to create the label for a -gtk.Button to -add to the toolbar. The function or method specified by -callback and the object specified by -user_data are connected to the button's "clicked" -signal. The widget argument must have the value -None. - - - - gtk.TOOLBAR_CHILD_TOGGLEBUTTON - - The string specified by text and -the gtk.Widget -specified by icon are used to create the label for a -gtk.ToggleButton -to add to the toolbar. The function or method specified by -callback and the object specified by -user_data are connected to the button's "clicked" -signal. The widget argument must have the value -None. - - - - gtk.TOOLBAR_CHILD_RADIOBUTTON - - The string specified by text and -the gtk.Widget -specified by icon are used to create the label for a -gtk.RadioButton -to add to the toolbar. The gtk.RadioButton -specified by widget is used to set the group for the -radiobutton. If widget is None a -new radiobutton group is created. The function or method specified by -callback and the object specified by -user_data are connected to the button's "clicked" -signal. - - - - gtk.TOOLBAR_CHILD_SPACE - - A space element is added to the toolbar. The -widget argument must have the value -None. The text, -icon, tooltip_text, -tooltip_private_text, callback -and user_data arguments are ignored. - - - - - The text, icon, -callback, user_data, -tooltip_text and -tooltip_private_text arguments may have the value -None. - - - - - gtk.Toolbar.insert_element - - - insert_element - type - widget - text - tooltip_text - tooltip_private_text - icon - callback - user_data - position - - - - type : - the type of widget - one -of: gtk.TOOLBAR_CHILD_SPACE, -gtk.TOOLBAR_CHILD_BUTTON, -gtk.TOOLBAR_CHILD_TOGGLEBUTTON, -gtk.TOOLBAR_CHILD_RADIOBUTTON or -gtk.TOOLBAR_CHILD_WIDGET - - - widget : - a widget or -None - - - text : - the text label or -None - - - tooltip_text : - the tooltip text or -None - - - tooltip_private_text : - the private tooltip text or -None - - - icon : - a gtk.Widget or -None - - - callback : - a callback function or method or -None - - - user_data : - a user data object or -None - - - position : - the position to insert the new element -at. - - - Returns : - the new toolbar element as a gtk.Widget. - - - - - This method is deprecated in PyGTK 2.4 and above - - - The insert_element() method adds a new -element of the specified type at the specified -position in the toolbar with the gtk.Tooltips text -and private text specified by tooltip_text and -tooltip_private_text respectively. The behavior of -the method depends on the type of element being added: - - - - gtk.TOOLBAR_CHILD_WIDGET - - The widget specified by widget -is the element added to the toolbar, otherwise widget -should be None. The text, -icon, callback and -user_data arguments are ignored. - - - - gtk.TOOLBAR_CHILD_BUTTON - - The string specified by text and -the gtk.Widget -specified by icon are used to create the label for a -gtk.Button to -add to the toolbar. The function or method specified by -callback and the object specified by -user_data are connected to the button's "clicked" -signal. The widget argument must have the value -None. - - - - gtk.TOOLBAR_CHILD_TOGGLEBUTTON - - The string specified by text and -the gtk.Widget -specified by icon are used to create the label for a -gtk.ToggleButton -to add to the toolbar. The function or method specified by -callback and the object specified by -user_data are connected to the button's "clicked" -signal. The widget argument must have the value -None. - - - - gtk.TOOLBAR_CHILD_RADIOBUTTON - - The string specified by text and -the gtk.Widget -specified by icon are used to create the label for a -gtk.RadioButton -to add to the toolbar. The gtk.RadioButton -specified by widget is used to set the group for the -radiobutton. If widget is None a -new radiobutton group is created. The function or method specified by -callback and the object specified by -user_data are connected to the button's "clicked" -signal. - - - - gtk.TOOLBAR_CHILD_SPACE - - A space element is added to the toolbar. The -widget argument must have the value -None. The text, -icon, tooltip_text, -tooltip_private_text, callback -and user_data arguments are ignored. - - - - - The text, icon, -callback, user_data, -tooltip_text and -tooltip_private_text arguments may have the value -None. - - - - - gtk.Toolbar.append_widget - - - append_widget - widget - tooltip_text - tooltip_private_text - - - - widget : - a gtk.Widget to add to -the toolbar. - - - tooltip_text : - the tooltip text or -None - - - tooltip_private_text : - the private tooltip text or -None - - - - - This method is deprecated in PyGTK 2.4 and above - - - The append_widget() method adds the -specified widget to the end (right or bottom) of the -toolbar. tooltip_text and -tooltip_private_text specify the tooltip text and -private text respectively. - - - - - gtk.Toolbar.prepend_widget - - - prepend_widget - widget - tooltip_text - tooltip_private_text - - - - widget : - a gtk.Widget to add to -the toolbar. - - - tooltip_text : - the tooltip text or -None - - - tooltip_private_text : - the private tooltip text or -None - - - - - This method is deprecated in PyGTK 2.4 and above - - - The prepend_widget() method adds the -specified widget to the start (left or top) of the -toolbar. tooltip_text and -tooltip_private_text specify the tooltip text and -private text respectively. - - - - - gtk.Toolbar.insert_widget - - - insert_widget - widget - tooltip_text - tooltip_private_text - position - - - - widget : - a gtk.Widget to add to -the toolbar. - - - tooltip_text : - the tooltip text or -None - - - tooltip_private_text : - the private tooltip text or -None - - - position : - the position to insert this widget -at. - - - - - This method is deprecated in PyGTK 2.4 and above - - - The insert_widget() method adds the -specified widget at the specified -position in the toolbar. -tooltip_text and -tooltip_private_text specify the tooltip text and -private text respectively. - - - - - gtk.Toolbar.set_orientation - - - set_orientation - orientation - - - - orientation : - the new orientation either -gtk.ORIENTATION_HORIZONTAL or -gtk.ORIENTATION_VERTICAL - - - - The set_orientation() method sets the -"orientation" property to the value of orientation. -The value of orientation is either -gtk.ORIENTATION_HORIZONTAL or -gtk.ORIENTATION_VERTICAL - - - - - gtk.Toolbar.set_style - - - set_style - style - - - - style : - the new style - one of: -gtk.TOOLBAR_ICONS, gtk.TOOLBAR_TEXT, -gtk.TOOLBAR_BOTH or -gtk.TOOLBAR_BOTH_HORIZ - - - - The set_style() method sets the -"toolbar-style" property to the value of style. The -value of style must be one of the . Setting the style -overrides the user preferences for the toolbar style. - - - A gtk.ToolItem label -will not be displayed if the toolbar style is -gtk.TOOLBAR_BOTH_HORIZ and the gtk.ToolItem -"is-important" property is False (the default). See the -gtk.ToolItem.set_is_important() -method for more information. - - - - - - gtk.Toolbar.set_icon_size - - - set_icon_size - icon_size - - - - icon_size : - The size of stock icons in the toolbar - one -of: gtk.ICON_SIZE_MENU, -gtk.ICON_SIZE_SMALL_TOOLBAR, -gtk.ICON_SIZE_LARGE_TOOLBAR, -gtk.ICON_SIZE_BUTTON, -gtk.ICON_SIZE_DND or -gtk.ICON_SIZE_DIALOG - - - - - This method is deprecated in PyGTK 2.4 and above - - - The set_icon_size() method sets the -size of stock icons in the toolbar to the value specified by -icon_size. The value of -icon_size must be one of: - - - - gtk.ICON_SIZE_MENU - - - gtk.ICON_SIZE_SMALL_TOOLBAR - - - gtk.ICON_SIZE_LARGE_TOOLBAR - - - gtk.ICON_SIZE_BUTTON - - - gtk.ICON_SIZE_DND, or - - - gtk.ICON_SIZE_DIALOG - - - - This method can be called both before and after adding the -icons. Setting the icon size will override the user preferences for the -default icon size. - - - - - gtk.Toolbar.set_tooltips - - - set_tooltips - enable - - - - enable : - if True tooltips should be -used - - - - The set_tooltips() method enables or -disables tooltips for the toolbar depending on the value of -enable. If enable is -True, tooltips will be used. - - - - - gtk.Toolbar.unset_style - - - unset_style - - - The unset_style() method unsets a -toolbar style set with the set_style() -method, allowing the user preferences to determine the toolbar style. - - - - - gtk.Toolbar.unset_icon_size - - - unset_icon_size - - - - This method is deprecated in PyGTK 2.4 and above - - - The unset_icon_size() method unsets -toolbar icon size set with the set_icon_size(), -allowing the user preferences to determine the icon size. - - - - - gtk.Toolbar.get_orientation - - - get_orientation - - - - Returns : - the orientation - - - - The get_orientation() method returns -the value of the "orientation" property that determines the current -orientation of the toolbar. See the set_orientation() -method for more details. - - - - - gtk.Toolbar.get_style - - - get_style - - - - Returns : - the current toolbar style - - - - The get_style() method returns the -value of the "toolbar-style" property. See the set_style() -method for more details. - - - - - gtk.Toolbar.get_icon_size - - - get_icon_size - - - - Returns : - the current icon size for the icons on the -toolbar. - - - - The get_icon_size() method returns the -current icon size for the toolbar. See the set_icon_size() -method for more details. - - - - - gtk.Toolbar.get_tooltips - - - get_tooltips - - - - Returns : - True if tooltips are -enabled - - - - The get_tooltips() method returns -True if tooltips are enabled. See the set_tooltips() -method for more details. - - - - - - - Signals - - - The "focus-home-or-end" gtk.Toolbar Signal - - callback - toolbar - focus_home - user_param1 - ... - - - - - toolbar : - the gtk.Toolbar which emitted the signal - the object which received the signal. - - - focus_home : - True if the first item - should be focused - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - Returns : - True if the signal was - handled, False if not - - - - A keybinding signal used internally by GTK+. This signal can't - be used in application code - - - - - The "move-focus" gtk.Toolbar Signal - - callback - toolbar - dir - arg1 - user_param1 - ... - - - - - toolbar : - the gtk.Toolbar - which emitted the signal the object which received the - signal. - - - dir : - one of the - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - Returns : - True if the signal was - handled, False if not - - - - A keybinding signal used internally by GTK+. This signal can't - be used in application code. - - - - - The "orientation-changed" gtk.Toolbar Signal - - - callback - toolbar - orientation - user_param1 - ... - - - - - toolbar : - the toolbar that received the -signal - - - orientation : - the new orientation - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "orientation-changed" signal is emitted when the -orientation of toolbar is -changed. - - - - - The "popup-context-menu" gtk.Toolbar Signal - - - callback - toolbar - x - y - button - user_param1 - ... - - - - - toolbar : - the toolbar that received the -signal - - - x : - the x coordinate of the mouse -event - - - y : - the u coordinate of the mouse -event - - - button : - the number of the mouse button - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was - handled - - - - - This signal is available in GTK+ 2.4 and above. - - - The "popup-context-menu" signal is emitted when the user -right-clicks the toolbar or uses the keybinding to display a popup -menu. Application developers should handle this signal if they want to -display a context menu on the toolbar. The context-menu should appear at the -coordinates given by x and -y. The mouse button number is given by the -button parameter. If the menu was popped up using the -keyboard, button is -1. - - - - - The "style-changed" gtk.Toolbar Signal - - - callback - toolbar - style - user_param1 - ... - - - - - toolbar : - the toolbar that received the -signal - - - style : - the new style - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "style-changed" signal is emitted when the -style of toolbar is -changed. - - - - - -
diff --git a/docs/reference/pygtk-gtktoolbutton.xml b/docs/reference/pygtk-gtktoolbutton.xml deleted file mode 100644 index 9cd01e11..00000000 --- a/docs/reference/pygtk-gtktoolbutton.xml +++ /dev/null @@ -1,736 +0,0 @@ - - - - - gtk.ToolButton a gtk.ToolItem - subclass that displays buttons (new in PyGTK 2.4) - - - - Synopsis - - - gtk.ToolButton - gtk.ToolItem - - gtk.ToolButton - icon_widgetNone - labelNone - - - gtk.ToolButton - stock_id - - - set_label - label - - - get_label - - - - set_use_underline - use_underline - - - get_use_underline - - - - set_stock_id - stock_id - - - get_stock_id - - - - set_icon_name - icon_name - - - get_icon_name - - - - set_icon_widget - icon_widget - - - get_icon_widget - - - - set_label_widget - label_widget - - - get_label_widget - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.ToolItem - +-- gtk.ToolButton - - - - - - gtk.ToolButton Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.ToolItem Properties - -
- - - - - - - - - "icon-name" - Read-Write - The themed icon name to display in the item. This -property only has an effect if not overridden by "label", "icon-widget" or -"stock-id" properties. Default value: None. -Available in GTK+ 2.8 and above. - - - - "icon-widget" - Read-Write - The icon widget to display in the item. -Default value: None. - - - - "label" - Read-Write - The text to show in the item. -Default value: None. - - - - "label-widget" - Read-Write - The widget to use as the item label instead of -"label". Default value: None. - - - - "stock-id" - Read-Write - The stock icon displayed on the item if "label" and -"label-widget" are None. -Default value: None. - - - - "use-underline" - Read-Write - If True, an underline in the "label" -property indicates that the next character should be used for the mnemonic -accelerator key in the overflow menu. -Default value: False. - - - - - -
- -
- - - gtk.ToolButton Style Properties - - gtk.Widget Style Properties - -
- - - - - - - - - "icon-spacing" - Read-Write - Spacing in pixels between the icon and label - - - - - -
- -
- - - gtk.ToolButton Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.ToolItem Signal Prototypes - - - - - Signal Prototypes - - - - "clicked" - - callback - toolbutton - user_param1 - ... - - - - - - - - - Description - - - This widget is available in PyGTK 2.4 and above. - - - A gtk.ToolButton -is a sub class of gtk.ToolItem that -contains a button. Use the gtk.ToolButton() constructor to -create a new gtk.ToolButton -specifying a widget to use as the icon and a label for the -text. Alternatively use the other gtk.ToolButton() constructor to -create a gtk.ToolButton -from a stock item. - - The label of a gtk.ToolButton -is determined by the properties "label_widget", "label", and "stock_id". If -"label_widget" specifies a gtk.Widget, that -widget is used as the label. If "label-widget" is None, -then the string in "label" is used as the label. If both "label-widget" and -"label" are None, the label is determined by the stock -item specified by "stock-id". Finally, if "label-widget", "label" and -"stock-id" are all None, the button does not have a -label. - - The icon of a gtk.ToolButton -is determined by the properties "icon-widget" and "stock-id". If -"icon-widget" specifies a gtk.Widget, that -widget is used as the icon. If "icon-widget" is None, the -icon is determined by the stock item specified by "stock-id". If both -"icon-widget" and "stock-id" are None, the button does -not have an icon. - - - - - Constructor - - - gtk.ToolButton - - - gtk.ToolButton - icon_widgetNone - labelNone - - - - icon_widget : - a gtk.Widget - that will be used as the icon widget, or - None - - - label : - a string that will be used as the label, or - None - - - Returns : - A new gtk.ToolButton - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new gtk.ToolButton -optionally using the icon specified by icon_widget -and the label text specified by label. If both -icon_widget and label are -None, the tool button will be empty. - - - - - gtk.ToolButton - - - gtk.ToolButton - stock_id - - - - stock_id : - a string that specifies a stock - item - - - Returns : - A new gtk.ToolButton - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new gtk.ToolButton -using the stock item specified by stock_id to -determine the icon and label text. It is an error if -stock_id is not a name of a stock item. - - - - - - - Methods - - - gtk.ToolButton.set_label - - - set_label - label - - - - label : - a string that will be used as label, or - None. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_label() method sets the "label" -property to the value of label. If the "label_widget" -property is None, label will be used as the label of the -tool button. - - - - - gtk.ToolButton.get_label - - - get_label - - - - Returns : - The label, or - None - - - - - This method is available in PyGTK 2.4 and above. - - - The get_label() method returns the -value of the "label" property that is used as the label of the tool button -if the "label-widget" property is None. - - - - - gtk.ToolButton.set_use_underline - - - set_use_underline - use_underline - - - - use_underline : - if True, an underline in the - label string specifies a mnemonic key for the overflow - menu - - - - - This method is available in PyGTK 2.4 and above. - - - The set_use_underline() method sets the -"use-underline" property to the value of -use_underline. If -use_underline is True, an -underline in the "label" property indicates that the next character should -be used for the mnemonic accelerator key in the overflow menu. For example, -if the label property is "_Open" and use_underline is -True, the label on the tool button will be "Open" and the -item on the overflow menu will have an underlined 'O'. Labels shown on tool -buttons never have mnemonics on them; this property only affects the menu -item on the overflow menu. - - - - - gtk.ToolButton.get_use_underline - - - get_use_underline - - - - - Returns : - True if underscores in the - "label" property are used as mnemonics on menu items on the - overflow menu. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_use_underline() method returns -the value of the "use-underline" property. If "use-underline" is -True, underscores in the label property are used as -mnemonics on menu items on the overflow menu. See the set_use_underline() -method for more information. - - - - - gtk.ToolButton.set_stock_id - - - set_stock_id - stock_id - - - - stock_id : - a name of a stock item, or - None - - - - - This method is available in PyGTK 2.4 and above. - - - The set_stock_id() method sets the -"stock-id" property to the value of stock_id. The -stock item specified by stock_id is used to determine -the icon and label if not overridden by the "label" and "icon-widget" -properties. See the gtk.ToolButton() constructor for -more information. - - - - - gtk.ToolButton.get_stock_id - - - get_stock_id - - - - - Returns : - the name of the stock item. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_stock_id() method returns the -value of the "stock-id" property that contains the name of a stock item or -None. See the gtk.ToolButton() constructor for -more information. - - - - - gtk.ToolButton.set_icon_name - - - set_icon_name - icon_name - - - - icon_name : - a name of a themed icon, or -None - - - - - This method is available in PyGTK 2.8 and above. - - - The set_icon_name() method sets the -"icon-name" property to the value of icon_name. The -themed icon name specified by icon_name is used to -determine the icon for the toolbutton if not overridden by the "label", -"stock-id" and "icon-widget" properties. See the gtk.ToolButton() constructor for -more information. - -In PyGTK 2.10 and above, icon_name may be -None to unset the icon name. - - - - - gtk.ToolButton.get_icon_name - - - get_icon_name - - - - - Returns : - the name of the stock item. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_icon_name() method returns the -value of the "icon_name" property that contains the name of a themed icon or -None. See the gtk.ToolButton() constructor for -more information. - - - - - gtk.ToolButton.set_icon_widget - - - set_icon_widget - icon_widget - - - - icon_widget : - the widget used as icon, or - None - - - - - This method is available in PyGTK 2.4 and above. - - - The set_icon_widget() method sets the -"icon-widget" property to the value of -icon_widget. If icon_widget -specifies a gtk.Widget, it is -used as the icon of the tool button. If icon_widget -is None the icon is determined by the "stock_id" -property. If the "stock_id" property is also None, the -tool button will not have an icon. - - - - - gtk.ToolButton.get_icon_widget - - - get_icon_widget - - - - - Returns : - The widget used as icon on - button, or - None. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_icon_widget() method returns -the value of the "icon-widget" property that contains the gtk.Widget used as -the icon on the tool button. See the set_icon_widget() -method for more information. - - - - - gtk.ToolButton.set_label_widget - - - set_label_widget - label_widget - - - - label_widget : - the widget used as the label, or - None - - - - - This method is available in PyGTK 2.4 and above. - - - The set_label_widget() method sets the -"label-widget" property to the gtk.Widget specified -by label_widget that will be used as the label for -the tool button. If label_widget is -None the "label" property is used as label. If -"label-widget" and "label" are both None, the label in -the stock item determined by the "stock_id" property is used as the -label. If "label-widget", "label" and "stock_id" are all -None, the tool button will not have a label. - - - - - gtk.ToolButton.get_label_widget - - - get_label_widget - - - - - Returns : - The widget used as label on - button, or - None. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_label_widget() method returns -the value of the "label-widget" property that is used as the label on the -tool button. See the gtk.ToolButton.set_label_widget() -method for more information. - - - - - - - Signals - - - The "clicked" gtk.ToolButton Signal - - - callback - toolbutton - user_param1 - ... - - - - - toolbutton : - the toolbutton that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "clicked" signal is emitted when the tool button is clicked -with the mouse or activated with the keyboard. - - - - - -
diff --git a/docs/reference/pygtk-gtktoolitem.xml b/docs/reference/pygtk-gtktoolitem.xml deleted file mode 100644 index b5f152ad..00000000 --- a/docs/reference/pygtk-gtktoolitem.xml +++ /dev/null @@ -1,1167 +0,0 @@ - - - - - gtk.ToolItem the base class of widgets - that can be added to gtk.Toolbar - (new in PyGTK 2.4) - - - - Synopsis - - - gtk.ToolItem - gtk.Bin - - gtk.ToolItem - - - - set_homogeneous - homogeneous - - - get_homogeneous - - - - set_expand - expand - - - get_expand - - - - set_tooltip - tooltips - tip_textNone - tip_privateNone - - - set_use_drag_window - use_drag_window - - - get_use_drag_window - - - - set_visible_horizontal - visible_horizontal - - - get_visible_horizontal - - - - set_visible_vertical - visible_vertical - - - get_visible_vertical - - - - set_is_important - is_important - - - get_is_important - - - get_icon_size - - - - get_orientation - - - - get_toolbar_style - - - - get_relief_style - - - - retrieve_proxy_menu_item - - - - set_proxy_menu_item - menu_item_id - menu_item - - - get_proxy_menu_item - menu_item_id - - - rebuild_menu - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.ToolItem - - - - - - gtk.ToolItem Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - - - These properties are available in GTK+ 2.4 and above. - - -
- - - - - - - - - "is-important" - Read-Write - - If True, the toolbar item is -considered important and the toolbar buttons show text in -gtk.TOOLBAR_BOTH_HORIZ mode. Default value: -False - - - - "visible-horizontal" - Read-Write - - If True, the toolbar item is visible -when the toolbar is in a horizontal orientation. Default value: -True - - - - "visible-vertical" - Read-Write - - If True, the toolbar item is visible -when the toolbar is in a vertical orientation. Default value: -True - - - - - -
- -
- - - gtk.ToolItem Style Properties - - gtk.Widget Style Properties - - - - - gtk.ToolItem Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - "create-menu-proxy" - - callback - toolitem - user_param1 - ... - - - - - "set-tooltip" - - callback - toolitem - tooltips - tip_text - tip_private - user_param1 - ... - - - - - "toolbar-reconfigured" - - callback - toolitem - user_param1 - ... - - - - - - - - - Description - - - This widget is available in PyGTK 2.4 and above. - - - A gtk.ToolItem is a -widget that can appear on a gtk.Toolbar. To -create a toolbar item that contains something else than a button, use the -gtk.ToolItem() constructor -then use the gtk.Container.add() -method to add a child widget to the tool item. - - To create and use toolbar items that contain buttons, see the -gtk.ToolButton, -gtk.ToggleToolButton -and gtk.RadioToolButton -classes. See the gtk.Toolbar class -for a description of the toolbar widget. - - - - - Constructor - - - gtk.ToolItem - - - - - Returns : - the new gtk.ToolItem - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new empty gtk.ToolItem - - - - - Methods - - - gtk.ToolItem.set_homogeneous - - - set_homogeneous - homogeneous - - - - homogeneous : - if True the tool item is the - same size as other homogeneous items - - - - - This method is available in PyGTK 2.4 and above. - - - The set_homogeneous() method sets the -homogeneous setting of the tool item to the value of -homogeneous. If homogeneous is -True the tool item is to be allocated the same size as -other homogeneous items. The effect is that all homogeneous items will have -the same width as the widest of the items. - - - - - gtk.ToolItem.get_homogeneous - - - get_homogeneous - - - - - Returns : - True if the item is the same - size as other homogeneous items. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_homogeneous() method returns -the setting of the homogeneous setting of the tool item. If -True the tool item is the same size as other homogeneous -items. See the set_homogeneous() -method for more detail. - - - - - gtk.ToolItem.set_expand - - - set_expand - expand - - - - expand : - If True the tool item is - allocated extra space when available - - - - - This method is available in PyGTK 2.4 and above. - - - The set_expand() method sets the expand -setting of the tool item to the value of expand. If -expand is True the tool item is -allocated extra space when there is more room on the toolbar than needed for -the items. The effect is that the item gets bigger when the toolbar gets -bigger and smaller when the toolbar gets smaller. - - - - - gtk.ToolItem.get_expand - - - get_expand - - - - - Returns : - True if the tool item is - allocated extra space when available. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_expand() method returns the -value of the expand setting of the tool item. If True the -tool item is allocated extra space. See the gtk.ToolItem.set_expand() -method for more detail. - - - - - gtk.ToolItem.set_tooltip - - - set_tooltip - tooltips - tip_textNone - tip_privateNone - - - - tooltips : - The gtk.Tooltips - object to be used - - - tip_text : - the text to be used as tooltip text for the - tool item or None - - - tip_private : - the text to be used as private tooltip - text or None - - - - - This method is available in PyGTK 2.4 and above. - - - The set_tooltip() method sets the gtk.Tooltips -object specified by tooltips to be used for the tool -item with the tooltip text specified by tip_text and -the private text specified by tip_private. See the -gtk.Tooltips.set_tip() -method for more information. - - - - - gtk.ToolItem.set_use_drag_window - - - set_use_drag_window - use_drag_window - - - - use_drag_window : - if True the tool item has a - drag window. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_use_drag_window() method -determines whether the tool item has a drag window according to the value of -use_drag_window. If -use_drag_window is True the -toolitem can be used as a drag source through the gtk.Widget.drag_source_set() -method. When the tool item has a drag window it will intercept all events, -even those that would otherwise be sent to a child of the tool item - - - - - gtk.ToolItem.get_use_drag_window - - - get_use_drag_window - - - - - Returns : - True if the tool item uses a - drag window. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_use_drag_window() returns the -setting that determines if the tool item has a drag window. See the set_use_drag_window() -for more information. - - - - - gtk.ToolItem.set_visible_horizontal - - - set_visible_horizontal - visible_horizontal - - - - visible_horizontal : - if True the tool item is - visible when in horizontal mode - - - - - This method is available in PyGTK 2.4 and above. - - - The set_visible_horizontal() method -sets the "visible-horizontal" property to the value of -visible_horizontal. If -visible_horizontal is True, the -tool item is visible when the toolbar is docked horizontally. - - - - - gtk.ToolItem.get_visible_horizontal - - - get_visible_horizontal - - - - - Returns : - True if the tool item is - visible on toolbars that are docked - horizontally. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_visible_horizontal() method -returns the value of the "visible-horizontal" property. If -"visible-horizontal" is True, the tool item is visible on -toolbars that are docked horizontally. - - - - - gtk.ToolItem.set_visible_vertical - - - set_visible_vertical - visible_vertical - - - - visible_vertical : - if True, the tool item is - visible when the toolbar is in vertical mode - - - - - This method is available in PyGTK 2.4 and above. - - - The set_visible_vertical() method sets -the "visible-vertical" property to the value of -visible_vertical. If -visible_vertical is True, the tool -item is visible when the toolbar is docked vertically. Some tool items, such -as text entries, are too wide to be useful on a vertically docked -toolbar. If visible_vertical is -False the tool item will not appear on toolbars that are -docked vertically. - - - - - gtk.ToolItem.get_visible_vertical - - - get_visible_vertical - - - - - Returns : - True if the tool item is visible when the - toolbar is docked vertically - - - - - This method is available in PyGTK 2.4 and above. - - - The get_visible_vertical() method -returns the value of the "visible-vertical" property. If "visible-vertical" -is True, the tool item is visible when the toolbar is -docked vertically. See the set_visible_vertical() -method for more information. - - - - - gtk.ToolItem.set_is_important - - - set_is_important - is_important - - - - is_important : - if True, the tool item - should be considered important - - - - - This method is available in PyGTK 2.4 and above. - - - The set_is_important() method sets the -"is-important" property to the value of -is_important. If is_important -is True the tool item should be considered important. The -gtk.ToolButton -class uses this property to determine whether to show its label when the -toolbar style is gtk.TOOLBAR_BOTH_HORIZ. The result is -that only tool buttons with the "is_important" property set have labels, an -effect known as "priority text". - - - - - gtk.ToolItem.get_is_important - - - get_is_important - - - - - Returns : - True if the tool item is - considered important. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_is_important() method returns -the value of the "is-important" property. If "is-important" is -True, the tool item is considered important. See the -set_is_important() -method for more information. - - - - - gtk.ToolItem.get_icon_size - - - get_icon_size - - - - - Returns : - the icon size used for the tool - item - - - - - This method is available in PyGTK 2.4 and above. - - - The get_icon_size() method returns the -icon size used for the tool item. Custom subclasses of gtk.ToolItem -should call this method to find out what size icons they should use. The -return value should be one of: gtk.ICON_SIZE_MENU, -gtk.ICON_SIZE_SMALL_TOOLBAR, -gtk.ICON_SIZE_LARGE_TOOLBAR, -gtk.ICON_SIZE_BUTTON, -gtk.ICON_SIZE_DND, -gtk.ICON_SIZE_DIALOG or an integer value returned from -the gtk.icon_size_register() -function. - - - - - gtk.ToolItem.get_orientation - - - get_orientation - - - - - Returns : - the orientation used for the tool - item - - - - - This method is available in PyGTK 2.4 and above. - - - The get_orientation() method returns -the orientation used for the tool item. Custom subclasses of gtk.ToolItem -should call this method to find out what size icons they should use. The -return value should be either gtk.ORIENTATION_HORIZONTAL -or gtk.ORIENTATION_VERTICAL. - - - - - gtk.ToolItem.get_toolbar_style - - - get_toolbar_style - - - - - Returns : - the toolbar style used for the tool - item - - - - - This method is available in PyGTK 2.4 and above. - - - The get_toolbar_style() method returns -the toolbar style used for the tool item. Custom subclasses of gtk.ToolItem -should call this method in the "toolbar-reconfigured" -signal handler to find out in what style the toolbar is displayed and change -themselves accordingly. - - Possibilities are: - - - - gtk.TOOLBAR_BOTH, meaning the tool item -should show both an icon and a label, stacked vertically - - - gtk.TOOLBAR_ICONS, meaning the toolbar -shows only icons - - - gtk.TOOLBAR_TEXT, meaning the tool item -should only show text - - - gtk.TOOLBAR_BOTH_HORIZ, meaning the tool -item should show both an icon and a label, arranged horizontally.. - - - - - - - gtk.ToolItem.get_relief_style - - - get_relief_style - - - - - Returns : - the relief style used for the tool - item - - - - - This method is available in PyGTK 2.4 and above. - - - The get_relief_style() method returns -the relief style of the tool item. See the gtk.Button.set_relief() -method for more information. Custom subclasses of gtk.ToolItem -should call this method in the handler of the gtk.ToolItem -"toolbar-reconfigured" -signal to find out the relief style of buttons. - - The return value should be one of: -gtk.RELIEF_NORMAL, gtk.RELIEF_HALF or -gtk.RELIEF_NONE. - - - - - gtk.ToolItem.retrieve_proxy_menu_item - - - retrieve_proxy_menu_item - - - - - Returns : - The gtk.MenuItem that is going to appear in the -overflow menu for the tool item - - - - - This method is available in PyGTK 2.4 and above. - - - The retrieve_proxy_menu_item() method -returns the gtk.MenuItem that -was last set by the set_proxy_menu_item() -method, i.e. the gtk.MenuItem that -is going to appear in the overflow menu. - - - - - gtk.ToolItem.set_proxy_menu_item - - - set_proxy_menu_item - menu_item_id - menu_item - - - - menu_item_id : - a string used to identify - menu_item - - - menu_item : - a gtk.MenuItem - to be used in the overflow menu or - None - - - - - This method is available in PyGTK 2.4 and above. - - - The set_proxy_menu_item() method sets -the gtk.MenuItem -specified by menu_item to be used in the toolbar -overflow menu. menu_item_id is used to identify the -caller of this method and should also be used with the get_proxy_menu_item() -method. If menu_item is None the -tool item will not appear in the overflow menu. - - - - - gtk.ToolItem.get_proxy_menu_item - - - get_proxy_menu_item - menu_item_id - - - - menu_item_id : - a string used to identify the menu - item - - - Returns : - The gtk.MenuItem - matching menu_item_id. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_proxy_menu_item() method -returns the gtk.MenuItem -corresponding to the string specified by menu_item_id -as passed to the set_proxy_menu_item() -method. - - Custom subclasses of gtk.ToolItem -should use this method to update their menu item when the gtk.ToolItem -changes. Forcing a match with menu_item_id ensures -that a gtk.ToolItem will -not inadvertently change a menu item that they did not create. - - - - - gtk.ToolItem.rebuild_menu - - - rebuild_menu - - - - This method is available in PyGTK 2.6 and above. - - - The rebuild_menu() method ignals to the -toolbar that the overflow menu item has changed. If the overflow menu is -visible when this method it called, the menu will be rebuilt. The method -must be called when the tool item changes what it will do in response to the -"create_menu_proxy" signal. - - - - - - - Signals - - - The "create-menu-proxy" gtk.ToolItem Signal - - - callback - toolitem - user_param1 - ... - - - - - toolitem : - the toolitem that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was - handled - - - - - This signal is available in GTK+ 2.4 and above. - - - The "create-menu-proxy" signal is emitted when the toolbar is -displaying an overflow menu and is trying to determine if -toolitem should appear in the overflow menu. In -response toolitem should either - - - - call the set_proxy_menu_item() -method specifying menu_item as -None and return True to indicate that -the item should not appear in the overflow menu - - - call the set_proxy_menu_item() -method with a new menu item and return True, or - - - return False to indicate that the signal -was not handled by the item. This means that the item will not appear in the -overflow menu unless a later handler installs a menu item. - - - - The toolbar may cache the result of this signal. When the tool -item changes how it will respond to this signal it must call the rebuild_menu()) -method to invalidate the cache and ensure that the toolbar rebuilds its -overflow menu. - - - - - The "set-tooltip" gtk.ToolItem Signal - - - callback - toolitem - tooltips - tip_text - tip_private - user_param1 - ... - - - - - toolitem : - the toolitem that received the -signal - - - tooltips : - the gtk.Tooltips - - - tip_text : - the tooltip text - - - tip_private : - the tooltip private text - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was - handled - - - - - This signal is available in GTK+ 2.4 and above. - - - The "set-tooltip" signal is emitted when the tool item's tooltip -changes. Application developers can use the set_tooltip() -method to set the item's tooltip. - - - - - The "toolbar-reconfigured" gtk.ToolItem Signal - - - callback - toolitem - user_param1 - ... - - - - - toolitem : - the toolitem that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.4 and above. - - - The "toolbar-reconfigured" signal is emitted when some property -of the toolbar that the item is a child of changes. For custom subclasses of -gtk.ToolItem, the -default handler of this signal uses the methods: - - - - gtk.Toolbar.get_orientation() - - - gtk.Toolbar.get_style() - - - gtk.Toolbar.get_icon_size() - - - gtk.Toolbar.get_relief_style() - - - - to find out what the toolbar should look like and change -themselves accordingly. - - - - - -
diff --git a/docs/reference/pygtk-gtktooltips.xml b/docs/reference/pygtk-gtktooltips.xml deleted file mode 100644 index 7938224d..00000000 --- a/docs/reference/pygtk-gtktooltips.xml +++ /dev/null @@ -1,343 +0,0 @@ - - - - - - gtk.Tooltips - add tips to your widgets. - - - - Synopsis - - - gtk.Tooltips - gtk.Object - - gtk.Tooltips - - - enable - - - disable - - - set_tip - widget - tip_text - tip_privateNone - - - force_window - - - - -Functions - - - gtk.tooltips_data_get - widget - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Tooltips - - - - - - gtk.Tooltips Properties - - gtk.Object Properties - - - - - Attributes - -
- - - - - - - - - - "tip_window" - Read - The window that the tooltip is displayed in. - - - - "tip_label" - Read - The label that displays the tooltip text. - - - - "active_tips_data" - Read - The data associated with the active tooltip. - - - - "tips_data_list" - Read - A list containing the data associated with the tooltips in a tooltips group. For each tooltip the data is a tuple containing: -the tooltip object, the associated widget, the tooltip text and the tooltip -private text. - - - - "delay" - Read - The delay between the mouse pausing over the widget and -the display of the tooltip in msec. - - - - "enabled" - Read - If True the tooltips are -enabled - - - - "use_sticky_delay" - Read - If True shorten the delay for -showing a tooltip on another widget is already showing a tooltip. - - - - "timer_tag" - Read - The tag of the timeout handler used for the -delay. - - - - - -
- -
- - - gtk.Tooltips Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - - - - Description - - 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 the gtk.Tooltips() constructor. Every -tooltip in the group can then be turned off with a call to the disable() -method and enabled with the enable() -method. To assign a tip to a particular gtk.Widget, use the -set_tip() -method. - - - Tooltips can only be set on widgets which have their own X -window. To check if a widget has its own window use -widget.flags()&gtk.NO_WINDOW. To add a tooltip to a -widget that doesn't have its own window, place the widget inside a gtk.EventBox and -add a tooltip to the eventbox instead. - - - The default appearance of all tooltips in a program is determined -by the current theme that the user has selected. Information about the -tooltip (if any) associated with an arbitrary widget can be retrieved using -the gtk.tooltips_data_get() -function. - - - - - Constructor - - - gtk.Tooltips - - - - Returns : - a new gtk.Tooltips -object - - - - Creates an empty gtk.Tooltips -group. - - - - - Methods - - - gtk.Tooltips.enable - - - enable - - - The enable() method enables a group of -tooltips. A tooltip will be displayed over its associated widget when -the mouse pointer pauses over the widget. - - - - - gtk.Tooltips.disable - - - disable - - - The disable() method disables a group -of tooltips. A tooltip will not be displayed over its associated widget when -the mouse pointer pauses over the widget. - - - - - gtk.Tooltips.set_tip - - - set_tip - widget - tip_text - tip_privateNone - - - - widget : - a gtk.Widget - - - tip_text : - the tooltip text - - - tip_private : - the tooltip private text for context sensitive display - - - - The set_tips() method creates a tooltip -for the specified widget. The text specified by -tooltip_text will be displayed when the mouse pointer -pauses over widget if the tooltips are -enabled.. - - - - - gtk.Tooltips.force_window - - - force_window - - - The force_window() method ensures that -the window used for displaying the given tooltips is created. Applications -should never have to call this function, since PyGTK takes care of -this. - - - - - - - Functions - - - gtk.tooltips_data_get - - - gtk.tooltips_data_get - widget - - - - widget : - a widget - - - Returns : - a tuple containing the tooltip data associated -with widget or -None - - - - The gtk.tooltips_data_get() function -returns a tuple containing the tooltip data associated with -widget. The tuple contains: - - - - the gtk.Tooltips group -containing the tooltip - - - the widget - - - the tooltip text string - - - the tooltip private text string or -None - - - - If widget does not have an associated -tooltip this function returns None. - - - - - -
diff --git a/docs/reference/pygtk-gtktreedragdest.xml b/docs/reference/pygtk-gtktreedragdest.xml deleted file mode 100644 index 300012e4..00000000 --- a/docs/reference/pygtk-gtktreedragdest.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - gtk.TreeDragDest - an interface that manages the data transfer for a -destination of a gtk.TreeView drag -and drop operation - - - - Synopsis - - - gtk.TreeDragDest - gobject.GInterface - - drag_data_received - dest - selection_data - - - row_drop_possible - dest_path - selection_data - - - - - - - Description - - The gtk.TreeDragDest -is an interface for checking and receiving the data for the destination of a -gtk.TreeView -drag and drop operation. - - - - - Methods - - - gtk.TreeDragDest.drag_data_received - - - drag_data_received - dest - selection_data - - - - dest : - the row to drop the data in front -of - - - selection_data : - the data to drop - - - Returns : - True if a new row was -created before position dest - - - - The drag_data_received() method asks -the gtk.TreeDragDest -to insert a row before the path dest, deriving the -contents of the row from selection_data. If -dest is outside the tree so that inserting before it -is impossible, False will be returned. Also, -False may be returned if the new row is not created for -some model-specific reason. - - - - - gtk.TreeDragDest.row_drop_possible - - - row_drop_possible - dest_path - selection_data - - - - dest_path : - a destination row - - - selection_data : - the data being dragged - - - Returns : - True if a drop is possible before -dest_path - - - - The row_drop_possible() method -determines if a drop is possible before the tree path specified by -dest_path and at the same depth as -dest_path. That is, can we drop the data specified by -selection_data at that location. -dest_path does not have to exist but the return value -will almost certainly be False if the parent of -dest_path doesn't exist, though. - - - - - - diff --git a/docs/reference/pygtk-gtktreedragsource.xml b/docs/reference/pygtk-gtktreedragsource.xml deleted file mode 100644 index 6d86a221..00000000 --- a/docs/reference/pygtk-gtktreedragsource.xml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - gtk.TreeDragSource - an interface that manages the source data transfer for a -gtk.TreeView -drag and drop operation - - - - Synopsis - - - gtk.TreeDragSource - gobject.GInterface - - row_draggable - path - - - drag_data_delete - path - - - drag_data_get - path - selection_data - - - - - - - Description - - A gtk.TreeDragSource is an interface that provides for the management of the source data for a gtk.TreeView drag and drop operation. - - - - - Methods - - - gtk.TreeDragSource.row_draggable - - - row_draggable - path - - - - path : - the row from which the user is initiating a -drag - - - Returns : - True if the row can be -dragged - - - - The row_draggable() method asks the -gtk.TreeDragSource -if the row specified by path can be used as the -source of a DND operation. If the gtk.TreeDragSource -doesn't implement this interface, the row is assumed draggable. - - - - - gtk.TreeDragSource.drag_data_delete - - - drag_data_delete - path - - - - path : - the row that was being -dragged - - - Returns : - True if the row was -successfully deleted - - - - The drag_data_delete() method asks the -gtk.TreeDragSource -to delete the row specified by path, because it was -moved somewhere else via drag-and-drop. This method returns -False if the deletion fails because -path no longer exists, or for some other -model-specific reason. - - - - - gtk.TreeDragSource.drag_data_get - - - drag_data_get - path - selection_data - - - - path : - the row that was dragged - - - selection_data : - a gtk.SelectionData -to fill with data from the dragged row - - - Returns : - True if data of the required -type was provided - - - - The drag_data_get() method asks the -gtk.TreeDragSource -to fill in the selection data object specified by -selection_data with a representation of the row -specified by path. The -selection_data target attribute gives the required -type of the data. - - - - - - diff --git a/docs/reference/pygtk-gtktreeiter.xml b/docs/reference/pygtk-gtktreeiter.xml deleted file mode 100644 index 0da7820c..00000000 --- a/docs/reference/pygtk-gtktreeiter.xml +++ /dev/null @@ -1,121 +0,0 @@ - - - - - - gtk.TreeIter - An object that points at a path in a gtk.TreeModel. - - - - Synopsis - - - gtk.TreeIter - gobject.GBoxed - - copy - - - free - - - - - - - Description - - A gtk.TreeIter is an -object that points at a path in a gtk.TreeModel. A -gtk.TreeIter -is created using one of the gtk.TreeModel or -gtk.TreeModelSort -methods: - - - - gtk.TreeModel.get_iter() - - - gtk.TreeModel.get_iter_from_string() - - - gtk.TreeModel.get_iter_first() - - - gtk.TreeModel.get_iter_root() - - - gtk.TreeModel.iter_children() - - - gtk.TreeModel.iter_parent() - - - gtk.TreeModelSort.convert_child_iter_to_iter() - - - gtk.TreeModelSort.convert_child_iter_to_child_iter() - - - - - - - Methods - - - gtk.TreeIter.copy - - - copy - - - - Returns : - a copy of the treeiter. - - - - The copy() method returns a copy of the -treeiter. This iter must be freed with the free() -method. - - - - - gtk.TreeIter.free - - - free - - - - This method is deprecated and should not be used since it can - crash your application. - - - The free() method frees a gtk.TreeIter. - - - - - diff --git a/docs/reference/pygtk-gtktreemodel.xml b/docs/reference/pygtk-gtktreemodel.xml deleted file mode 100644 index a1b766f0..00000000 --- a/docs/reference/pygtk-gtktreemodel.xml +++ /dev/null @@ -1,1579 +0,0 @@ - - - - - - gtk.TreeModel - the tree interface used by gtk.TreeView - - - - Synopsis - - - gtk.TreeModel - gobject.GInterface - - get_flags - - - get_n_columns - - - get_column_type - index - - - get_iter - path - - - get_iter_from_string - path_string - - - get_string_from_iter - iter - - - get_iter_root - - - - get_iter_first - - - - get_path - iter - - - get_value - iter - column - - - iter_next - iter - - - iter_children - parent - - - iter_has_child - iter - - - iter_n_children - iter - - - iter_nth_child - parent - n - - - iter_parent - child - - - ref_node - iter - - - unref_node - iter - - - get - iter - column - ... - - - foreach - func - user_data - - - row_changed - path - iter - - - row_inserted - path - iter - - - row_has_child_toggled - path - iter - - - row_deleted - path - - - rows_reordered - path - iter - new_order - - - filter_new - rootNone - - - - - -Functions - - - gtk.tree_row_reference_inserted - proxy - path - - gtk.tree_row_reference_deleted - proxy - path - - - - - - gtk.TreeModel Signal Prototypes - - - - "row-changed" - - callback - treemodel - path - iter - user_param1 - ... - - - - - "row-deleted" - - callback - treemodel - path - user_param1 - ... - - - - - "row-has-child-toggled" - - callback - treemodel - path - iter - user_param1 - ... - - - - - "row-inserted" - - callback - treemodel - path - iter - user_param1 - ... - - - - - "rows-reordered" - - callback - treemodel - path - iter - new_order - user_param1 - ... - - - - - - - - - Description - - The gtk.TreeModel -interface defines a generic tree interface for use by the gtk.TreeView -widget. It is an abstract interface, and is designed to be usable with any -appropriate data structure. The programmer just has to implement this -interface on their own data type for it to be viewable by a gtk.TreeView -widget. - - The model is represented as a hierarchical tree of strongly-typed, -columned data. In other words, the model can be seen as a tree where every -node has different values depending on which column is being queried. The -type of data found in a column is determined by using the Python or GObject -type system (i.e. gobject.TYPE_INT, gtk.BUTTON, gobject.TYPE_STRING, etc.). -The types are homogeneous per column across all nodes. It is important to -note that this interface only provides a way of examining a model and -observing changes. The implementation of each individual model decides how -and if changes are made. - - In order to make life simpler for programmers who do not need to -write their own specialized model, two generic models are provided: the -gtk.TreeStore and -the gtk.ListStore. To -use these, the developer simply pushes data into these models as necessary. -These models provide the data structure as well as all appropriate tree -interfaces. As a result, implementing drag and drop, sorting, and storing -data is trivial. For the vast majority of trees and lists, these two models -are sufficient. - - Models are accessed on a node-column level of granularity. One can -query for the value of a model at a certain node and a certain column on -that node. A particular node in a model is referenced using a path or a -gtk.TreeIter -object. Most of the interface consists of operations on a gtk.TreeIter. - - A path is essentially a potential node. It is a location on a -model that may or may not actually correspond to a node on a specific model. -A path can be converted into either an array of unsigned integers or a -string. The string form is a list of numbers separated by a colon. Each -number refers to the offset at that level. Thus, the path "0" refers to the -root node and the path "2:4" refers to the fifth child of the third -node. - - By contrast, a gtk.TreeIter is a -reference to a specific node on a specific model. One can convert a path to -a treeiter by calling get_iter(). -These treeiters are the primary way of accessing a model and are similar to -the textiters used by gtk.TextBuffer. -The model interface defines a set of operations using them for navigating -the model. - - It is expected that models fill in the treeiter with private data. -For example, the gtk.ListStore -model, which is internally a simple linked list, stores a list node in one -of the pointers. The gtk.TreeModelSort -stores an array and an offset in two of the pointers. Additionally, there is -an integer field. This field is generally filled with a unique stamp per -model. This stamp is for catching errors resulting from using invalid -treeiters with a model. - - The lifecycle of a treeiter can be a little confusing at first. -treeiters are expected to always be valid for as long as the model is -unchanged (and doesn't emit a signal). The model is considered to own all -outstanding treeiters and nothing needs to be done to free them from the -user's point of view. Additionally, some models guarantee that an treeiter -is valid for as long as the node it refers to is valid (most notably the -gtk.TreeStore and -gtk.ListStore). -Although generally uninteresting, as one always has to allow for the case -where treeiters do not persist beyond a signal, some very important -performance enhancements were made in the sort model. As a result, the -gtk.TREE_MODEL_ITERS_PERSIST flag was added to indicate -this behavior. - - A gtk.TreeModel -object supports some of the Python Mapping protocol that allows you to -retrieve a gtk.TreeModelRow -object representing a row in the model. You can also set the values in a row -using the same protocol. For example, you can retrieve the second row of a -gtk.TreeModel -using any of: - - - treemodelrow = model[1] - treemodelrow = model[(1,)] - treemodelrow = model['1'] - treemodelrow = model["1"] - - - Also if the model has two columns both containing strings then the -following will set the values of the third row. - - - model[(2,)] = ('new string value', 'string 2') - - - You can also retrieve the number of top level items in the gtk.TreeModel by -using the Python len() function: - - - n_rows = len(model) - - - A gtk.TreeModelRowIter -object can be retrieved for iterating over the top level rows of a gtk.TreeModel by -calling the Python iter() function: - - - treemodelrowiter = iter(model) - - - See the PyGTK -tutorial for more information. - - - - - Methods - - - gtk.TreeModel.get_flags - - - get_flags - - - - Returns : - the flags supported by this -interface. - - - - The get_flags() method returns a set of -flags supported by this interface. The flags are a bitwise combination -of: - - - - gtk.TREE_MODEL_ITERS_PERSIST - - Treeiters survive all signals emitted by the -tree. - - - - gtk.TREE_MODEL_LIST_ONLY - - The model is a list only, and never has -children - - - - - The flags supported should not change during the lifecycle of -the tree_model. - - - - - gtk.TreeModel.get_n_columns - - - get_n_columns - - - - Returns : - The number of columns. - - - - The get_n_columns() method returns the -number of columns supported by the treemodel. - - - - - gtk.TreeModel.get_column_type - - - get_column_type - index - - - - index : - the column index. - - - Returns : - the type of the column. - - - - The get_column_type() method returns -the type of the column. - - - - - gtk.TreeModel.get_iter - - - get_iter - path - - - - path : - a path - - - Returns : - a new gtk.TreeIter that -points at path. - - - - The get_iter() method returns a new -gtk.TreeIter -pointing to path. This method raises a -ValueError exception if path is -not a valid tree path. - - - - - gtk.TreeModel.get_iter_from_string - - - get_iter_from_string - path_string - - - - path_string : - a string representation of a -path. - - - Returns : - a new gtk.TreeIter that -points at the path represented by -path_string - - - - The get_iter_from_string() method -returns a gtk.TreeIter -pointing to the path represented by path_string, if -it exists. This method raises a ValueError exception if -path_string does not represent a valid tree -path. - - - - - gtk.TreeModel.get_string_from_iter - - - get_string_from_iter - iter - - - - iter : - An gtk.TreeIter. - - - Returns : - A string representation of iter - - - - - This method is available in PyGTK 2.2 and above. - - - The get_string_from_iter() method -returns a string representation of the path pointed to by -iter. This string is a ':' separated list of -numbers. For example, "4:10:0:3" would be an acceptable return value for -this string. - - - - - gtk.TreeModel.get_iter_root - - - get_iter_root - - - - - Returns : - a new gtk.TreeIter that -points at the first path in the treemodel or -None - - - - The get_iter_root() method returns a -gtk.TreeIter -pointing to the path "0" or None if the tree is -empty. - - - - - gtk.TreeModel.get_iter_first - - - get_iter_first - - - - - Returns : - a new gtk.TreeIter that points at the first path in the treemodel or None - - - - The get_iter_first() method returns a -gtk.TreeIter -pointing to the path "0" or None if the tree is -empty. - - - - - gtk.TreeModel.get_path - - - get_path - iter - - - - iter : - a gtk.TreeIter. - - - Returns : - the tree path referenced by -iter. - - - - The get_path() method returns the tree -path referenced by iter. - - - - - gtk.TreeModel.get_value - - - get_value - iter - column - - - - iter : - a gtk.TreeIter. - - - column : - the column value to -retrieve. - - - Returns : - a value. - - - - The get_value() method returns the -value at column at the path pointed to by -iter. - - - - - gtk.TreeModel.iter_next - - - iter_next - iter - - - - iter : - a gtk.TreeIter. - - - Returns : - a gtk.TreeIter - pointing at the next row or None if there is no - next row. - - - - The iter_next() method returns a gtk.TreeIter -pointing at the row at the current level after the row referenced by -iter. If there is no next row, -None is returned. iter is -unchanged. - - - - - gtk.TreeModel.iter_children - - - iter_children - parent - - - - parent : - the gtk.TreeIter -pointing to the parent - - - Returns : - the new gtk.TreeIter to be -set to the first child or None - - - - The iter_children() method returns a -new gtk.TreeIter -pointing to the first child of parent. If -parent has no children, None is -returned. parent will remain a valid node after this -method has been called. - - - - - gtk.TreeModel.iter_has_child - - - iter_has_child - iter - - - - iter : - a gtk.TreeIter to -test for children. - - - Returns : - True if -iter has children. - - - - The iter_has_child() method returns -True if iter has children, or -False otherwise. - - - - - gtk.TreeModel.iter_n_children - - - iter_n_children - iter - - - - iter : - a gtk.TreeIter, or -None. - - - Returns : - the number of children of -iter. - - - - The iter_n_children() method returns -the number of children that iter has. As a special -case, if iter is None, then the -number of top level nodes is returned. - - - - - gtk.TreeModel.iter_nth_child - - - iter_nth_child - parent - n - - - - parent : - a gtk.TreeIter to -get the child from, or None. - - - n : - Then index of the desired -child. - - - Returns : - the gtk.TreeIter that -is set to the nth child or None - - - - The iter_nth_child() method returns a -new gtk.TreeIter -pointing to the child of parent, with the index -specified by n. The first index is 0. If -n is too big, or parent has no -children, this method returns None. -parent will remain a valid node after this function -has been called. As a special case, if parent is -None, then the treeiter points to the -nth root node. - - - - - gtk.TreeModel.iter_parent - - - iter_parent - child - - - - child : - The gtk.TreeIter. - - - Returns : - a new gtk.TreeIter set -to the parent of child or -None - - - - The iter_parent() method returns a -gtk.TreeIter -pointing to the parent of child. If -child is at the top level, and doesn't have a parent, -then None is returned. child will -remain a valid node after this method has been called. - - - - - gtk.TreeModel.ref_node - - - ref_node - iter - - - - iter : - a gtk.TreeIter. - - - - The ref_node() method lets the -treemodel ref the node that iter points to. This is -an optional method for models to implement. To be more specific, models may -ignore this call as it exists primarily for performance reasons. This -function is primarily meant as a way for views to let the caching model know -when nodes are being displayed (and hence, whether or not to cache that -node.) For example, a file-system based model would not want to keep the -entire file-hierarchy in memory, just the sections that are currently being -displayed by every current view. A model should be expected to be able to -get a treeiter independent of it's reffed state. - - - - - gtk.TreeModel.unref_node - - - unref_node - iter - - - - iter : - a gtk.TreeIter. - - - - The unref_node() method lets the -treemodel unref the node that iter points to. This is -an optional method for models to implement. To be more specific, models may -ignore this call as it exists primarily for performance reasons. For more -information on what this means, see the ref_node() -method. Please note that nodes that are deleted are not unreffed. - - - - - gtk.TreeModel.get - - - get - iter - column - ... - - - - iter : - a gtk.TreeIter - pointing at the row to retrieve data value - from - - - column : - a column number - - - ... : - zero or more column numbers - - - Returns : - a tuple containing the column - values - - - - - This method is available in PyGTK 2.4 and above. - - - The get() method returns a tuple -containing the values of one or more cells in the row referenced by the -gtk.TreeIter -specified by iter. column specifies the first column -number to retrieve a value from. The additional arguments should contain -integer column numbers for additional column values. For example, to get -values from columns 0 and 3, you would write: - - - value0, value3 = treemodel_get(iter, 0, 3) - - - - - - - - - - gtk.TreeModel.foreach - - - foreach - func - user_data - - - - func : - a function to be called on each -row - - - user_data : - the user data to passed to -func. - - - - The foreach() method calls -func on each node in model in a depth-first fashion. -user_data is passed to func -each time it is called. If func returns -True, then the operation ceases, and -foreach() returns. - The signature of func is: - - def func(model, path, iter, user_data) - - where model is the treemodel, -path is the current path, and -iter is a treeiter pointing to -path. - If func is an object method its signature -will be: - - def func(self, model, path, iter, user_data) - - - - - - gtk.TreeModel.row_changed - - - row_changed - path - iter - - - - path : - a path pointing to the changed -row - - - iter : - a gtk.TreeIter -pointing to the changed row - - - - The row_changed() method emits the -"row-changed" signal on the treemodel with the parameters -path and iter that are the -path and a treeiter pointing to the path of the changed row. - - - - - gtk.TreeModel.row_inserted - - - row_inserted - path - iter - - - - path : - a path pointing to the inserted -row - - - iter : - a gtk.TreeIter -pointing to the inserted row - - - - The row_inserted() method emits the -"row-inserted" signal on the treemodel with the parameters -path and iter that are the -path and a treeiter pointing to the path of the inserted row. - - - - - gtk.TreeModel.row_has_child_toggled - - - row_has_child_toggled - path - iter - - - - path : - a path pointing to the changed -row - - - iter : - a gtk.TreeIter -pointing to the changed row - - - - The row_has_child_toggled() method -emits the "row-has-child-toggled" signal on the treemodel with the -parameters path and iter that -are the path and a treeiter pointing to the path of the changed row. This -should be called by models after the child state of a node changes. - - - - - gtk.TreeModel.row_deleted - - - row_deleted - path - - - - path : - a path pointing to the previous location of the -deleted row. - - - - The row_deleted() method emits the -"row-deleted" signal on the treemodel. This should be called by models after -a row has been removed. The location pointed to by -path should be the location that the deleted row was -at. It may not be a valid location anymore. - - - - - gtk.TreeModel.rows_reordered - - - rows_reordered - path - iter - new_order - - - - path : - A tree path pointing to the tree node whose - children have been reordered, or None or () or - "" to indicate the top level node. - - - iter : - A valid gtk.TreeIter - pointing to the node whose children have been reordered, or - None to indicate the top level - node. - - - new_order : - a sequence of integers containing the new -indexes of the children, i.e. the former child n is now -at the position specified by -new_order[n]. - - - - The rows_reordered() method emits the -"rows_reordered" signal on the tree model. This method should be called by a -tree model when its rows have been reordered. If iter -is None to indicate that the top level rows have been -reordered, path should be None or -() or "". - - - - - gtk.TreeModel.filter_new - - - filter_new - rootNone - - - - root : - a tree path or - None. - - - Returns : - A new gtk.TreeModel. - - - - - This method is available in PyGTK 2.4 and above. - - - The filter_new() method creates a new -gtk.TreeModel, -with the tree model as the child_model and the virtual root specified by -root. - - - - - - - Functions - - - gtk.tree_row_reference_inserted - - - gtk.tree_row_reference_inserted - proxy - path - - - - proxy : - a GObject - - - path : - a row position that was -inserted - - - - The gtk.tree_row_reference_inserted() -function lets a set of row references know that the model emitted the -"row_inserted" signal for the row specified by -path. - - - - - gtk.tree_row_reference_deleted - - - gtk.tree_row_reference_deleted - proxy - path - - - - proxy : - a GObject - - - path : - a row position that was -deleted - - - - The gtk.tree_row_reference_deleted() -function lets a set of row references know that the model emitted the -"row_deleted" signal for the row specified by -path. - - - - - - - Signals - - - The "row-changed" gtk.TreeModel Signal - - - callback - treemodel - path - iter - user_param1 - ... - - - - - treemodel : - the treemodel that received the -signal - - - path : - a path - - - iter : - a gtk.TreeIter -pointing at path - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "row-changed" signal is emitted when the row specified by -path and pointed to by iter -has changed in the treemodel. Usually, this means -that one or more column values have changed. - - - - - The "row-deleted" gtk.TreeModel Signal - - - callback - treemodel - path - user_param1 - ... - - - - - treemodel : - the treemodel that received the -signal - - - path : - a path - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "row-deleted" signal is emitted when the row that was -specified by path is deleted from -treemodel. - - - - - The "row-has-child-toggled" gtk.TreeModel Signal - - - callback - treemodel - path - iter - user_param1 - ... - - - - - treemodel : - the treemodel that received the -signal - - - path : - a path - - - iter : - a gtk.TreeIter -pointing at path - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "row-has-child-toggled" signal is emitted when the child -state of the row specified by path and pointed to by -iter has changed in -treemodel. - - - - - The "row-inserted" gtk.TreeModel Signal - - - callback - treemodel - path - iter - user_param1 - ... - - - - - treemodel : - the treemodel that received the -signal - - - path : - a path - - - iter : - a gtk.TreeIter -pointing at path - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "row-inserted" signal is emitted when the row specified by -path and pointed to by iter is -inserted into treemodel. The row referenced by -iter will be empty so using the get_value() -method will always return None. Connect to the -"row-changed" signal if you want to track value changes. - - - - - The "rows-reordered" gtk.TreeModel Signal - - - callback - treemodel - path - iter - new_order - user_param1 - ... - - - - - treemodel : - the treemodel that received the -signal - - - path : - a path - - - iter : - a gtk.TreeIter -pointing at path - - - new_order : - an array of reordered row -numbers - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "rows-reordered" signal is emitted when the -treemodel child rows of the row specified by -path and pointed to by iter -are reordered. new_order is an array of node index -numbers representing the new order of the rows. The value of -new_order cannot be retrieved in PyGTK because it is -passed as an opaque pointer (gobject.GPointer) -value. iter may be None and -path an empty tuple to indicate that the top level -rows were reordered. - - - - - - diff --git a/docs/reference/pygtk-gtktreemodelfilter.xml b/docs/reference/pygtk-gtktreemodelfilter.xml deleted file mode 100644 index 82de68c6..00000000 --- a/docs/reference/pygtk-gtktreemodelfilter.xml +++ /dev/null @@ -1,542 +0,0 @@ - - - - - gtk.TreeModelFilter - - a gtk.TreeModel -which hides parts of an underlying tree (new in PyGTK 2.4) - - - - Synopsis - - - gtk.TreeModelFilter - gobject.GObject - gtk.TreeModel - gtk.TreeDragSource - - set_visible_func - func - dataNone - - - set_modify_func - types - func - dataNone - - - set_visible_column - column - - - get_model - - - - convert_child_iter_to_iter - child_iter - - - convert_iter_to_child_iter - filter_iter - - - convert_child_path_to_path - child_path - - - convert_path_to_child_path - filter_path - - - refilter - - - - clear_cache - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.TreeModelFilter (implements gtk.TreeModel, gtk.TreeDragSource) - - - - - - gtk.TreeModelFilter Properties - -
- - - - - - - - - "child-model" - Read-Write-Construct Only - - The gtk.TreeModel for -the filtermodel to filter. Available in GTK+ 2.4 and above. - - - - "virtual-root" - Read-Write-Construct Only - - The virtual root (relative to the child model) for this -filtermodel. Available in GTK+ 2.4 and above. - - - - - -
- -
- - - gtk.TreeModelFilter Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.TreeModel Signal Prototypes - - - - Description - - - This object is available in PyGTK 2.4 and above. - - - A gtk.TreeModelFilter -is a tree model which wraps another tree model, and can do the following -things: - - - - Filter specific rows, based on data from a "visible -column", a column storing booleans indicating whether the row should be -filtered or not, or based on the return value of a "visible function", which -gets a model, iter and -user_data and returns a boolean indicating whether -the row should be filtered or not. - - - Modify the "appearance" of the model, using a modify -function. This is extremely powerful and allows for just changing some -values and also for creating a completely different synthetic model based on -the child model. For example, you can create a model with columns -synthesized from the data in the child model. - - - Set a different root node, also known as a "virtual -root". You can pass in a tree path indicating the root node for the filter -at construction time. - - - - A gtk.TreeModelFilter is -created using the gtk.TreeModel.filter_new() method. For example: - - - liststore = gtk.ListStore(gobject.TYPE_INT, gobject.TYPE_STRING) - modelfilter = liststore.filter_new() - - - The gtk.TreeModelFilter -objects support the Python mapping and iterator protocols. See the gtk.TreeModel -Description and the PyGTK -tutorial for more information. - - - - - Methods - - - gtk.TreeModelFilter.set_visible_func - - - set_visible_func - func - dataNone - - - - func : - a function called to determine the visibility - of a row - - - data : - User data to pass to - func - - - - - This method is available in PyGTK 2.4 and above. - - - The set_visible_func() method sets the -visible function used when filtering the rows of the treemodel filter to the -value of func. data is the -user data that is passed to func (see below). This method will fail if the -set_visible_column() -method has already been called. The visible function signature is: - - - def visible_func(model, iter, user_data): - - - where model is the child gtk.TreeModel, -iter is a gtk.TreeIter -pointing at a row in model and user_data is the data -parameter. The function should return True if the row -should be visible. - - - - - gtk.TreeModelFilter.set_modify_func - - - set_modify_func - types - func - dataNone - - - - types : - a sequence containing the column - types - - - func : - a function that is called to provide the data - for a specific row and column - - - data : - user data to pass to the modify function, or - None. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_modify_func() method uses the -list of column types specified by types and the -function specified by func to provide a synthetic -model based on the child model of the gtk.TreeModelFilter. data -is passed to func when it is -called. func is called for each data access to return -the data which should be displayed at the location specified using the -parameters of the modify function. - - The signature of func is: - - - def func(model, iter, column, user_data) - - - where model is the gtk.TreeModelFilter, -iter is a gtk.TreeIter -pointing at a row in model, -column is the column number to provide the value for -and user_data is -data. func should returns the -generated value for the specified location in -model. - - - This method must be called before the gtk.TreeModelFilter -is associated with a gtk.TreeView and -before either of the gtk.TreeModel.get_n_columns() -or gtk.TreeModel.get_column_type() -methods are called. Also this method can only be called once - there is no -way to change the modify function once it is set. - - - Since func is called for every access to -a value in model, it will be slow for models with a -large number of rows and/or columns. - - - - - gtk.TreeModelFilter.set_visible_column - - - set_visible_column - column - - - - column : - the number of the column containing the visible - information. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_visible_column() method sets -the visible column setting to the value of -column. The visible column setting contains the -number of the "child-model" column that is used to determine the visibility -of the model rows. The specified column should be a column of type -gobject.TYPE_BOOLEAN, where True means -that a row is visible, and False, not visible. This -method will fail if the set_visible_func() -method has already been called. - - - - - gtk.TreeModelFilter.get_model - - - get_model - - - - - Returns : - the child gtk.TreeModel - - - - - This method is available in PyGTK 2.4 and above. - - - The get_model() method returns the -child gtk.TreeModel of -the treemodel filter - - - - - gtk.TreeModelFilter.convert_child_iter_to_iter - - - convert_child_iter_to_iter - child_iter - - - - child_iter : - A valid gtk.TreeIter - pointing to a row on the child model. - - - Returns : - a gtk.TreeIter - pointing to a row in the treemodel filter. - - - - - This method is available in PyGTK 2.4 and above. - - - The convert_child_iter_to_iter() method -returns a gtk.TreeIter -pointing to the row in the treemodel filter that corresponds to the child -treemodel row pointed to by the gtk.TreeIter -specified by child_iter. - - - - - gtk.TreeModelFilter.convert_iter_to_child_iter - - - convert_iter_to_child_iter - filter_iter - - - - filter_iter : - A valid gtk.TreeIter - pointing to a row in the treemodel filter. - - - Returns : - a gtk.TreeIter - pointing to a row in the child treemodel. - - - - - This method is available in PyGTK 2.4 and above. - - - The convert_iter_to_child_iter() method -a gtk.TreeIter -pointing to the row in the child treemodel that corresponds to the treemodel -filter row pointed to by the gtk.TreeIter -specified by filter_iter. - - - - - gtk.TreeModelFilter.convert_child_path_to_path - - - convert_child_path_to_path - child_path - - - - child_path : - a tree path in the child treemodel to - convert. - - - Returns : - a treemodel filter tree path, or - None. - - - - - This method is available in PyGTK 2.4 and above. - - - The convert_child_path_to_path() method -returns a treemodel filter tree path that corresponds to the child treemodel -tree path specified by child_path. If -child_path isn't a valid path on the child model, -None is returned. - - - - - gtk.TreeModelFilter.convert_path_to_child_path - - - convert_path_to_child_path - filter_path - - - - filter_path : - a treemodel filter tree path to - convert. - - - Returns : - a child treemodel tree path, or - None. - - - - - This method is available in PyGTK 2.4 and above. - - - The convert_path_to_child_path() method -returns a child treemodel tree path that corresponds to the treemodel filter -tree path specified by filter_path. If -filter_path does not point to a row in the child -model, None is returned. - - - - - gtk.TreeModelFilter.refilter - - - refilter - - - - - This method is available in PyGTK 2.4 and above. - - - The refilter() method emits the gtk.TreeModel -"row-changed" signal -for each row in the child model, thereby causing the filter to re-evaluate -whether a row is visible or not. - - - - - gtk.TreeModelFilter.clear_cache - - - clear_cache - - - - - This method is available in PyGTK 2.4 and above. - - - The clear_cache() method clears the -treemodel filter of any cached iterators that haven't been reffed with the -gtk.TreeModel.ref_node(). This -might be useful if the child model being filtered is static (and doesn't -change often) and there has been a lot of unreffed access to nodes. As a -side effect of this function, all unreffed iters will be invalid. This -method should almost never be called by an application. - - - - - -
diff --git a/docs/reference/pygtk-gtktreemodelsort.xml b/docs/reference/pygtk-gtktreemodelsort.xml deleted file mode 100644 index df981913..00000000 --- a/docs/reference/pygtk-gtktreemodelsort.xml +++ /dev/null @@ -1,425 +0,0 @@ - - - - - - gtk.TreeModelSort - a tree model that is a sorted version of a child gtk.TreeModel - - - - Synopsis - - - gtk.TreeModelSort - gobject.GObject - gtk.TreeModel - gtk.TreeSortable - - gtk.TreeModelSort - child_model - - - get_model - - - - convert_child_path_to_path - child_path - - - convert_child_iter_to_iter - sort_iter - child_iter - - - convert_path_to_child_path - sorted_path - - - convert_iter_to_child_iter - child_iter - sorted_iter - - - reset_default_sort_func - - - - clear_cache - - - iter_is_valid - iter - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.TreeModelSort (implements gtk.TreeModel, gtk.TreeSortable) - - - - - - gtk.TreeModelSort Properties - -
- - - - - - - - - "model" - Read-Write-Construct - The child model for the gtk.TreeModelSort -to sort. - - - - - -
- -
- - - gtk.TreeModelSort Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.TreeSortable Signal Prototypes - gtk.TreeModel Signal Prototypes - - - - Description - - A gtk.TreeModelSort -is a sorted model of its child model. A gtk.TreeModelSort -implements the gtk.TreeModel -interface and the gtk.TreeSortable -interface to manage the sort functions. - - The gtk.TreeModelSort -objects support the Python mapping and iterator protocols. See the gtk.TreeModel -Description and the PyGTK -tutorial for more information. - - - - - Constructor - - - gtk.TreeModelSort - child_model - - - - child_model : - a child gtk.TreeModel - - - Returns : - A new gtk.TreeModel. - - - - Creates a new gtk.TreeModel, -with child_model as the child model. - - - - - Methods - - - gtk.TreeModelSort.get_model - - - get_model - - - - Returns : - the "child model" being -sorted - - - - The get_model() method returns the -model that the gtk.TreeModelSort -is sorting. - - - - - gtk.TreeModelSort.convert_child_path_to_path - - - convert_child_path_to_path - child_path - - - - child_path : - A child tree path to -convert - - - Returns : - A new tree path in the treemodelsort, or -None - - - - The convert_child_path_to_path() method -converts the path in the child model specified by -child_path to a path relative to the treemodelsort. -That is, child_path points to a path in the child -model. The returned path will point to the same row in the sorted model. -If child_path isn't a valid path on the child model, -then None is returned. - - - - - gtk.TreeModelSort.convert_child_iter_to_iter - - - convert_child_iter_to_iter - sort_iter - child_iter - - - - sort_iter : - None or a gtk.TreeIter for -backward compatibility. - - - child_iter : - A valid gtk.TreeIter -pointing to a row on the child model - - - Returns : - A gtk.TreeIter -pointing to the same path in the sorted model. - - - - The convert_child_iter_to_iter() method -returns a gtk.TreeIter that -points to the row in the treemodelsort that corresponds to the row pointed -to by child_iter. sort_iter -parameter should be None but can specify a gtk.TreeIter for -backward compatibility. - - - - - gtk.TreeModelSort.convert_path_to_child_path - - - convert_path_to_child_path - sorted_path - - - - sorted_path : - a path in the sorted model - - - Returns : - a new path in the child model, or -None - - - - The convert_path_to_child_path() method -returns a path in the child model that refers to the same row as the path in -the sorted model specified by sorted_path. That is, -sorted_path points to a location in treemodelsort and -the returned path will point to the same location in the child model. If -sorted_path does not point to a location in the child -model, None is returned. - - - - - gtk.TreeModelSort.convert_iter_to_child_iter - - - convert_iter_to_child_iter - child_iter - sorted_iter - - - - child_iter : - None or a gtk.TreeIter for -backward compatibility. - - - sorted_iter : - A valid gtk.TreeIter -pointing to a row on -tree_model_sort. - - - Returns : - A gtk.TreeIter that -points to a row in the child model - - - - The convert_iter_to_child_iter() method -returns a gtk.TreeIter that -points to the row in the child model that is the same row pointed to by -sorted_iter in the treemodelsort. -child_iter should be None but can -specify a gtk.TreeIter for -backward compatibility. - - - - - gtk.TreeModelSort.reset_default_sort_func - - - reset_default_sort_func - - - The reset_default_sort_func() method -resets the default sort function to be in the 'unsorted' state. That is, it -is in the same order as the child model. It will re-sort the model to be in -the same order as the child model only if the gtk.TreeModelSort -is in 'unsorted' state. - - - - - gtk.TreeModelSort.clear_cache - - - clear_cache - - - The clear_cache() method clears the -treemodelsort of any cached iterators that haven't been reffed with the -ref_node() -method. This might be useful if the child model being sorted is static (and -doesn't change often) and there has been a lot of unreffed access to nodes. -As a side effect of this function, all unreffed gtk.TreeIter -objects will be invalid. - - - - - gtk.TreeModelSort.iter_is_valid - - - iter_is_valid - iter - - - - iter : - A gtk.TreeIter. - - - Returns : - True if - iter is valid - - - - - This method is available in PyGTK 2.2 and above. - - - The iter_is_valid() method checks if -the gtk.TreeIter -specified by iter is valid for the treemodel -sort. - - - This method is slow. Only use it for debugging and/or testing -purposes. - - - - - - -
diff --git a/docs/reference/pygtk-gtktreerowreference.xml b/docs/reference/pygtk-gtktreerowreference.xml deleted file mode 100644 index c03214aa..00000000 --- a/docs/reference/pygtk-gtktreerowreference.xml +++ /dev/null @@ -1,234 +0,0 @@ - - - - - gtk.TreeRowReference - - an object maintaining a persistent reference to a gtk.TreeModel -row (new in PyGTK 2.4) - - - - Synopsis - - - gtk.TreeRowReference - gobject.GBoxed - - gtk.TreeRowReference - model - path - - - get_path - - - - get_model - - - - valid - - - - copy - - - - free - - - - - - - - Description - - - This object is available in PyGTK 2.4 and above. - - - A gtk.TreeRowReference -is an object that points to a row in a gtk.TreeModel -similar to a gtk.TreeIter. A -gtk.TreeRowReference, -unlike a gtk.TreeIter, -maintains a persistent reference in spite of changes in the model. - - - - - Constructor - - - gtk.TreeRowReference - model - path - - - - model : - a gtk.TreeModel - - - path : - a valid tree path to monitor - - - Returns : - a gtk.TreeRowReference, - or None - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a row reference pointing to the treemodel row specified by -model and path. This reference -will continue pointing to the node in spite of changes in -model. It listens to all signals emitted by -model, and updates its path appropriately. If -path isn't a valid path in -model, None is returned. - - - - - Methods - - - gtk.TreeRowReference.get_path - - - get_path - - - - - Returns : - A current path, or -None. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_path() method returns the path -that the row reference currently points to, or None if -the path pointed to is no longer valid. - - - - - gtk.TreeRowReference.get_model - - - get_model - - - - - Returns : - the model, or -None. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_model() method returns the -model that the row reference currently monitors, or None -if the model is not set. - - - - - gtk.TreeRowReference.valid - - - valid - - - - - Returns : - True if the row reference - points to a valid path. - - - - - This method is available in PyGTK 2.4 and above. - - - The valid() method returns -True if the row reference is not None -and refers to a current valid path. - - - - - gtk.TreeRowReference.copy - - - copy - - - - - Returns : - a copy of the row reference - - - - - This method is available in PyGTK 2.4 and above. - - - The copy() method returns a copy of the -tree row reference. - - - - - gtk.TreeRowReference.free - - - free - - - - - This method is available in PyGTK 2.4 and above. - - - - This method is deprecated and should not be used since it may -crash your application. - - - The free() method frees the tree row reference. The row -reference may be None. - - - - - - diff --git a/docs/reference/pygtk-gtktreeselection.xml b/docs/reference/pygtk-gtktreeselection.xml deleted file mode 100644 index 81334a2d..00000000 --- a/docs/reference/pygtk-gtktreeselection.xml +++ /dev/null @@ -1,827 +0,0 @@ - - - - - - gtk.TreeSelection - the selection object for gtk.TreeView - - - - Synopsis - - - gtk.TreeSelection - gtk.Object - - set_mode - type - - - get_mode - - - - set_select_function - func - data - None - full - False - - - - - - get_tree_view - - - - get_selected - - - - get_selected_rows - - - count_selected_rows - - - - selected_foreach - func - data - None - - - select_path - path - - - unselect_path - path - - - select_iter - iter - - - unselect_iter - iter - - - path_is_selected - path - - - iter_is_selected - iter - - - select_all - - - - unselect_all - - - - select_range - start_path - end_path - - - unselect_range - start_path - end_path - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.TreeSelection - - - - - - gtk.TreeSelection Signal Prototypes - - gobject.GObject Signal Prototypes - - - - "changed" - - callback - treeselection - user_param1 - ... - - - - - - - - - Description - - The gtk.TreeSelection -object is a helper object to manage the selection for a gtk.TreeView -widget. The gtk.TreeSelection -object is automatically created when a new gtk.TreeView -widget is created, and cannot exist independent of this widget. The primary -reason the gtk.TreeSelection -object exists is for cleanliness of code and API. That is, there is no -conceptual reason all these functions could not be methods on the gtk.TreeView -widget instead of a separate function. The gtk.TreeSelection -object is retrieved from a gtk.TreeView by -calling the gtk.TreeView.get_selection() -method. It can be manipulated to check the selection status of the tree, as -well as select and deselect individual rows. Selection is done completely on -the view side. As a result, multiple views of the same model can have -completely different selections. Additionally, you cannot change the -selection of a row on the model that is not currently displayed by the view -without expanding its parents first. - - One of the important things to remember when monitoring the -selection of a view is that the "changed" signal is mostly a hint. That is, -it may only emit one signal when a range of rows is selected. Additionally, -it may on occasion emit a "changed" signal when nothing has happened (mostly -as a result of programmers calling the select_path() -or select_iter() -methods on an already selected row). - - - - - Methods - - - gtk.TreeSelection.set_mode - - - set_mode - type - - - - type : - the selection mode - - - - The set_mode() method sets the -selection mode of the treeselection to the mode specified by -type. The value of type must -be one of: gtk.SELECTION_NONE, -gtk.SELECTION_SINGLE, -gtk.SELECTION_BROWSE or -gtk.SELECTION_MULTIPLE. See the description for more -detail. - - If the previous type was -gtk.SELECTION_MULTIPLE, then the anchor is kept selected, -if it was previously selected. - - - - - gtk.TreeSelection.get_mode - - - get_mode - - - - - Returns : - the current selection mode - - - - The get_mode() method returns the -selection mode for treeselection. See the set_mode() -method for more information. - - - - - gtk.TreeSelection.set_select_function - - - set_select_function - func - dataNone - fullFalse - - - - func : - the selection function. - - - data : - the selection function's -data. - - - full : - if True - func will be passed a full set of - args - - - - The set_selection_function() method -sets the selection function to func (a function or -method). If the selection function is set, it is called before any node is -selected or unselected, giving some control over which nodes are selected. -The selection function should return True if the state of -the node may be toggled, and False if the state of the -node should be left unchanged. The signature of the selection function -callback is: - - - - selectfunction - info - - - selectmethod - self - info - - - -where info is a tuple containing a path or a -path and data if data was -passed to the set_select_function() -method. - -In PyGTK 2.10 and above if the additional optional parameter -full is True the signature of -func should be: - - - - selectfunction - selection - model - path - path_currently_selected - user_data - - - selectmethod - self - selection - model - path - is_selected - user_data - - - - where selection is the gtk.TreeSelection, - model is the gtk.TreeModel - used by the gtk.TreeView - associated with selection, path is the path of - the selected row, is_selected is - True if the row is currently selected and - user_data is data if any - (may not be present if data was - None). If func is a method - then self is the object that the method is - called upon. - - - - - - - gtk.TreeSelection.get_tree_view - - - get_tree_view - - - - Returns : - a gtk.TreeView - - - - The get_tree_iter() method returns the -tree view associated with the treeselection. - - - - - gtk.TreeSelection.get_selected - - - get_selected - - - - - Returns : - a 2-tuple containing a reference to the gtk.TreeModel and -a gtk.TreeIter -pointing to the currently selected node. - - - - The get_selected() method returns a -2-tuple containing the treemodel and a treeiter pointing to the selected node -in the treemodel if the treeselection is set to -gtk.SELECTION_SINGLE or -gtk.SELECTION_BROWSE. The returned gtk.TreeIter will -be None if there is no row selected. This method will not -work if you use selection is -gtk.SELECTION_MULTIPLE. - - - - - gtk.TreeSelection.get_selected_rows - - - get_selected_rows - - - - Returns : - a 2-tuple containing the tree model and a list - of the tree paths of all selected rows. - - - - - This method is available in PyGTK 2.2 and above. - - - The get_selected_rows() method returns -a 2-tuple containing a gtk.TreeModel and -a list of the tree paths of all selected rows. Additionally, if you are -planning on modifying the tree model after calling this method, you may want -to convert the returned list into a list of gtk.TreeRowReference -objects. To do this, you can use the gtk.TreeRowReference() -constructor. - - - - - gtk.TreeSelection.count_selected_rows - - - count_selected_rows - - - - - Returns : - The number of rows selected. - - - - - This method is available in PyGTK 2.2 and above. - - - The count_selected_rows() method -returns the number of rows that have been selected. - - - - - gtk.TreeSelection.selected_foreach - - - selected_foreach - func - data - None - - - - func : - the function or method to call for each -selected node. - - - data : - the user data to pass to -func. - - - - The selected_foreach() method calls the -function or method specified by func for each -selected node passing the user data specified by -data. The signature of func -is: - - - - foreachfunction - treemodel - path - iter - ... - - - foreachmethod - self - treemodel - path - iter - ... - - - - where treemodel is the gtk.TreeModel -being viewed, path is the path of the selected row, -iter is a gtk.TreeIter -pointing to the selected row and ... is the user data -if any (may not be present if data was -None). If func is a method then -self is the object that the method is called -upon. - - - You cannot modify the tree or selection in the callback -function. - - - - - - gtk.TreeSelection.select_path - - - select_path - path - - - - path : - the tree path to be -selected. - - - - The select_path() method selects the -row at path. - - - - - gtk.TreeSelection.unselect_path - - - unselect_path - path - - - - path : - the tree path to be -unselected. - - - - The unselect_path() method unselects -the row at path. - - - - - gtk.TreeSelection.select_iter - - - select_iter - iter - - - - iter : - the gtk.TreeIter to be -selected. - - - - The select_iter() method selects the -row pointed to by the gtk.TreeIter -specified by iter. - - - - - gtk.TreeSelection.unselect_iter - - - unselect_iter - iter - - - - iter : - the gtk.TreeIter to be -unselected. - - - - The unselect_iter() method unselects -the row pointed to by the gtk.TreeIter -specified by iter. - - - - - gtk.TreeSelection.path_is_selected - - - path_is_selected - path - - - - path : - A tree path to check if -selected. - - - Returns : - True if -path is selected. - - - - The path_is_selected() method returns -True if the row pointed to by path -is currently selected. If path does not point to a -valid location, False is returned. - - - - - gtk.TreeSelection.iter_is_selected - - - iter_is_selected - iter - - - - iter : - a gtk.TreeIter - - - Returns : - True, if the row pointed to -by iter is selected - - - - The iter_is_selected() method returns -True if the row pointed to by iter -is currently selected. - - - - - gtk.TreeSelection.select_all - - - select_all - - - The select_all() method selects all the -nodes. The treeselection is must be set to -gtk.SELECTION_MULTIPLE mode. - - - - - gtk.TreeSelection.unselect_all - - - unselect_all - - - The unselect_all() method unselects all -the nodes. - - - - - gtk.TreeSelection.select_range - - - select_range - start_path - end_path - - - - start_path : - the initial node path of the -range. - - - end_path : - the final node path of the -range. - - - - The select_range() method selects a -range of nodes specified by the tree paths -start_path and end_path -inclusive. - - - - - gtk.TreeSelection.unselect_range - - - unselect_range - start_path - end_path - - - - start_path : - The initial node of the - range. - - - end_path : - The final node of the - range. - - - - - This method is available in PyGTK 2.2 and above. - - - The unselect_range() method unselects -the range of nodes specified by the tree paths -start_path and end_path -inclusive. - - - - - - - Signals - - - The "changed" gtk.TreeSelection Signal - - - callback - treeselection - user_param1 - ... - - - - - treeselection : - the treeselection that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "changed" signal is emitted when the selection has -changed. - - - - - - diff --git a/docs/reference/pygtk-gtktreesortable.xml b/docs/reference/pygtk-gtktreesortable.xml deleted file mode 100644 index e8b2a2bd..00000000 --- a/docs/reference/pygtk-gtktreesortable.xml +++ /dev/null @@ -1,402 +0,0 @@ - - - - - - gtk.TreeSortable - an interface for sorting a gtk.TreeModel - - - - Synopsis - - - gtk.TreeSortable - gobject.GInterface - - sort_column_changed - - - get_sort_column_id - - - - set_sort_column_id - sort_column_id - order - - - set_sort_func - sort_column_id - sort_func - user_data - None - - - set_default_sort_func - sort_func - user_data - None - - - has_default_sort_func - - - - - - - gtk.TreeSortable Signal Prototypes - - - - "sort-column-changed" - - callback - treesortable - user_param1 - ... - - - - - - - - - Description - - The gtk.TreeSortable -interface provide the common methods for a gtk.TreeModel to -implement a sorted model for a gtk.TreeView. See -the gtk.TreeModelSort -for an example of a treemodel that implements the gtk.TreeSortable -interface. The key element of the interface is a "sort column ID" which is -an arbitrary integer value referring to a sort function and associated user -data. A sort column ID must be greater than or equal to zero. A usable sort -column ID is created by using the set_sort_func() -method. The sort column ID can then be used for sorting a gtk.ListStore or -gtk.TreeStore -using the set_sort_column_id() -method. - - The gtk.ListStore and -gtk.TreeStore -objects automatically setup sort column IDs corresponding to the columns in -the store. These sort column IDs are associated with an internal comparison -function that handles the fundamental types: - - - - gboolean - - - str - - - int - - - long - - - float - - - - - Once a sort column ID has been set on a gtk.TreeModel -implementing the gtk.TreeSortable -interface it cannot be returned to the original unsorted state. You can -change the sort function or use a default sort function but you cannot set -the gtk.TreeModel to -have no sort function. - - - - - - Methods - - - gtk.TreeSortable.sort_column_changed - - - sort_column_changed - - - The sort_column_changed() method emits -the "sort_column_changed" signal on the treesortable object. - - - - - gtk.TreeSortable.get_sort_column_id - - - get_sort_column_id - - - - - Returns : - a tuple containing the sort column id and the -sort type: gtk.SORT_ASCENDING or -gtk.SORT_DESCENDING - - - - The get_sort_column_id() method returns -a tuple containing the current sort column ID and the sort type (either -gtk.SORT_ASCENDING or -gtk.SORT_DESCENDING), if applicable. If the sort column -ID is not set, then the tuple (-2, 0) is returned. If the -sort column ID is set to -1 indicating the default sort function is to be -used this method returns (None, -None) - - - - - gtk.TreeSortable.set_sort_column_id - - - set_sort_column_id - sort_column_id - order - - - - sort_column_id : - the sort column id to set - - - order : - the sort order: - gtk.SORT_ASCENDING or - gtk.SORT_DESCENDING - - - - The set_sort_column_id() method sets -the current sort comparison function to that associated with the sort column -ID specified by sort_column_id with the sort order -type specified by order. The value of order must be -either: gtk.SORT_ASCENDING or -gtk.SORT_DESCENDING. The treesortable will resort itself -to reflect this change, after emitting a "sort_column_changed" signal. - - If sort_column_id is -1, then the default -sort function will be used, if it is set. If a default sort function is not -set then the sort column ID is not changed. - - - - - gtk.TreeSortable.set_sort_func - - - set_sort_func - sort_column_id - sort_func - user_data - None - - - - sort_column_id : - the sort column id to set the function -for - - - sort_func : - The sorting function - - - user_data : - the user data to pass to the sort func, or -None - - - - The set_sort_func() method sets the -comparison function (or method) used when sorting on the sort column ID -specified by column_id to the value specified by -sort_func. If the current sort column id of the -treesortable is the same as sort_column_id, the model -will be resorted. The signature of the comparison function (or method) -is: - - - - comparefunction - treemodel - iter1 - iter2 - user_data - - - comparemethod - self - treemodel - iter1 - iter2 - user_data - - - - where treemodel is the tree model -implementing the gtk.TreeSortable -interface, iter1 and iter2 -point at the rows to compare and user_data is the -user data specified in set_sort_func() or -None. If sort_func is a method -then self is the object associated with the -method. - - The comparison callback should return -1 if the -iter1 row should come before the -iter2 row, 0 if the rows are equal, or 1 if the -iter1 row should come after the -iter2 row. - - - - - gtk.TreeSortable.set_default_sort_func - - - set_default_sort_func - sort_func - user_data - None - - - - sort_func : - the sorting function - - - user_data : - the user data to pass to -sort_func, or -None - - - - The set_default_sort_func() method sets -the default comparison function (or method) to the value of -sort_func. If the current sort column id of the -treesortable is -1 (the get_sort_column_id() -method returns (None, None)), then the model will be resorted using the -sort_func. See the set_sort_func() -method for more details on the signature of the comparison function. - -In Pygtk 2.10, sort_func can be -None to have no default comparison function. This means -that once the model has been sorted, it can't go back to the default -state. In this case, when the current sort column id of sortable is -1, the -model will be unsorted. - - - - - gtk.TreeSortable.has_default_sort_func - - - has_default_sort_func - - - - Returns : - True, if the model has a -default sort function - - - - The has_default_sort_func() method -returns True if the model has a default sort function. -This is used primarily by gtk.TreeViewColumn -to determine if a model can go back to the default state, or not. - - - - - - - Signals - - - The "sort-column-changed" gtk.TreeSortable Signal - - - callback - treesortable - user_param1 - ... - - - - - treesortable : - the treesortable that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "sort-column-changed" signal is emitted when the sort_column_changed() -method is called or the sort column is changed using the set_sort_column_id() -method. - - - - - - diff --git a/docs/reference/pygtk-gtktreestore.xml b/docs/reference/pygtk-gtktreestore.xml deleted file mode 100644 index bb9bd097..00000000 --- a/docs/reference/pygtk-gtktreestore.xml +++ /dev/null @@ -1,878 +0,0 @@ - - - - - - gtk.TreeStore - a model for tree widgets with columns - - - - Synopsis - - - gtk.TreeStore - gobject.GObject - gtk.TreeModel - gtk.TreeDragSource - gtk.TreeDragDest - gtk.TreeSortable - - gtk.TreeStore - ... - - - - - - set_value - iter - column - value - - - set - iter - ... - - - remove - iter - - - insert - parent - position - rowNone - - - insert_before - parent - sibling - rowNone - - - insert_after - parent - sibling - rowNone - - - prepend - parent - rowNone - - - append - parent - rowNone - - - is_ancestor - iter - descendant - - - iter_depth - iter - - - clear - - - iter_is_valid - iter - - - reorder - parent - new_order - - - swap - a - b - - - move_after - iter - position - - - move_before - iter - position - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.TreeStore (implements gtk.TreeModel, gtk.TreeDragSource, gtk.TreeDragDest, gtk.TreeSortable) - - - - - - gtk.TreeStore Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.TreeSortable Signal Prototypes - gtk.TreeModel Signal Prototypes - - - - Description - - A gtk.TreeStore is -a model for multi-columned tree widgets. A gtk.TreeStore is -a subclass of gobject.GObject and -implements the gtk.TreeModel, -gtk.TreeDragSource, -gtk.TreeDragDest -and gtk.TreeSortable -interfaces. - - The gtk.TreeStore -objects support the Python mapping and iterator protocols. See the gtk.TreeModel -Description and the PyGTK -tutorial for more information. - - - - - Constructor - - - gtk.TreeStore - ... - - - - ... : - one or more column types - - - Returns : - a new gtk.TreeStore - - - - Creates a new tree store as with one or more columns each of the -types passed in. As an example: - - - gtk.TreeStore(gobject.TYPE_INT, gobject.TYPE_STRING, gtk.gdk.Pixbuf) - - - will create a new gtk.TreeStore -with three columns, of type int, string and gtk.gdk.Pixbuf -respectively. - - - - - Methods - - - - - gtk.TreeStore.set_value - - - set_value - iter - column - value - - - - iter : - a gtk.TreeIter for -the row being modified - - - column : - the column number to -modify - - - value : - a new value for the cell - - - - The set_value() method sets the data in -the cell specified by iter and -column to the value specified by -value. The type of value must -be convertible to the type of the column. - - - - - gtk.TreeStore.set - - - set - iter - ... - - - - iter : - a gtk.TreeIter for -the row being modified - - - ... : - one or more column ID-value -pairs - - - - The set() method sets the value of one -or more cells in the row referenced by iter. The -argument list following iter should contain pairs of -integer column numbers followed by the value to be set. For example, to set -column 0 with type gobject.TYPE_STRING to "Foo", you -would write: - - - store.set(iter, 0, "Foo") - - - - - - - - gtk.TreeStore.remove - - - remove - iter - - - - iter : - a gtk.TreeIter - - - Returns : - None in PyGTK 2.0. Returns - True in PyGTK 2.2 and above if - iter is still valid. - - - - The remove() method removes the row -pointed to by iter from the treestore. After being -removed, iter is set to the next valid row at that -level, or invalidated if it previously pointed to the last one. - - - - - gtk.TreeStore.insert - - - insert - parent - position - row - None - - - - parent : - a gtk.TreeIter, or -None - - - position : - the position to insert the new -row - - - row : - an optional list or tuple containing column -values (in order) to set on the row or -None - - - Returns : - a gtk.TreeIter -pointing to the new row - - - - The insert() method inserts a new row -at position. If parent is not -None, then the row will be made a child of -parent. Otherwise, the row will be created at the -toplevel. If position is larger than the number of -rows at that level, then the new row will be inserted to the end of the -list. This method returns a gtk.TreeIter -pointing at the new row. If row is not -None it must be a tuple or list containing ordered column -values that are used to set values in the columns of the row. - - - - - gtk.TreeStore.insert_before - - - insert_before - parent - sibling - row - None - - - - parent : - a gtk.TreeIter, or -None - - - sibling : - a gtk.TreeIter, or -None - - - row : - an optional list or tuple containing ordered -column values to set on the row or -None - - - Returns : - a gtk.TreeIter -pointing to the new row - - - - The insert_before() method inserts a -new row before the row pointed to by sibling. If -sibling is None, then the row will -be appended to the children of the row pointed to by -parent. If parent and -sibling are None, the row will be -appended to the toplevel. If both sibling and -parent are set, then parent -must be the parent of sibling. When -sibling is set, parent is -optional. This method returns a gtk.TreeIter -pointing at the new row. If row is not -None it must be a tuple or list containing ordered column -values that are used to set values in the columns of the row. - - - - - gtk.TreeStore.insert_after - - - insert_after - parent - sibling - row - None - - - - parent : - a gtk.TreeIter, or -None - - - sibling : - a gtk.TreeIter, or -None - - - row : - a tuple or list containing ordered column -values to be set in the new row - - - Returns : - a gtk.TreeIter -pointing to the new row - - - - The insert_after() method inserts a new -row after the row pointed to by sibling. If -sibling is None, then the row will -be prepended to the beginning of the children of -parent. If parent and -sibling are None, then the row -will be prepended to the toplevel. If both sibling -and parent are set, parent -must be the parent of sibling. When -sibling is set, parent is -optional. This method returns a gtk.TreeIter -pointing at the new row. If row is not -None it must be a tuple or list containing ordered column -values that are used to set values in the columns of the row. - - - - - gtk.TreeStore.prepend - - - prepend - parent - row - None - - - - parent : - a gtk.TreeIter, or -None - - - row : - a tuple or list containing ordered column -values to be set in the new row - - - Returns : - a gtk.TreeIter -pointing to the new row - - - - The prepend() method prepends a new row -to the treestore. If parent is not -None, the new row will be prepended before the first -child of parent, otherwise it will prepend a row to -the top level. This method returns a gtk.TreeIter -pointing at the new row. If row is not -None it must be a tuple or list containing ordered column -values that are used to set values in the columns of the row. - - - - - gtk.TreeStore.append - - - append - parent - row - None - - - - parent : - a gtk.TreeIter, or -None - - - row : - a tuple or list containing ordered column -values to be set in the new row - - - Returns : - a gtk.TreeIter -pointing to the new row - - - - The append() method appends a new row -to the treestore. If parent is not -None, the new row will be prepended after the last child -of parent, otherwise it will append a row to the top -level. This method returns a gtk.TreeIter -pointing at the new row. If row is not -None it must be a tuple or list containing ordered column -values that are used to set values in the columns of the row. - - - - - gtk.TreeStore.is_ancestor - - - is_ancestor - iter - descendant - - - - iter : - a gtk.TreeIter - - - descendant : - a gtk.TreeIter - - - Returns : - True, if -iter is an ancestor of -descendant - - - The is_ancestor() method returns -True if the row pointed to by iter -is an ancestor of the row pointed to by descendant. -That is, iter is the parent (or grandparent or -great-grandparent) of descendant. - - - - - gtk.TreeStore.iter_depth - - - iter_depth - iter - - - - iter : - a gtk.TreeIter - - - Returns : - the depth of -iter - - - - The iter_depth() method returns the -depth of the row pointed to by iter. This will be 0 -for anything on the root level, 1 for anything down a level, etc. - - - - - gtk.TreeStore.clear - - - clear - - - - The clear() method removes all rows -from the treestore. - - - - - gtk.TreeStore.iter_is_valid - - - iter_is_valid - iter - - - - iter : - a gtk.TreeIter. - - - Returns : - True if - iter is valid for the tree - store, - - - - - This method is available in PyGTK 2.2 and above. - - - The iter_is_valid() method returns -True if iter is a valid gtk.TreeIter for -the tree store. - - - This function is slow. Only use it for debugging and/or -testing purposes. - - - - - - gtk.TreeStore.reorder - - - reorder - parent - new_order - - - - parent : - a gtk.TreeIter. - - - new_order : - a list of integers mapping the new position of - each child to its old position before the re-ordering, - i.e. new_order[newpos] = - oldpos. - - - - - This method is available in PyGTK 2.2 and above. - - - The reorder() method reorders the -children of the tree store node pointed to by parent -to match the order of the list of row numbers contained in -new_order. Note that this method only works with -unsorted stores. - - - - - gtk.TreeStore.swap - - - swap - a - b - - - - a : - a gtk.TreeIter. - - - b : - another gtk.TreeIter. - - - - - This method is available in PyGTK 2.2 and above. - - - The swap() method swaps the tree store -nodes pointed to by a and b in -the same level of the tree store. Note that this method only works with -unsorted stores. - - - - - gtk.TreeStore.move_after - - - move_after - iter - position - - - - iter : - a gtk.TreeIter. - - - position : - a second gtk.TreeIter - or None. - - - - - This method is available in PyGTK 2.2 and above. - - - The move_after() method moves the tree -store node specified by iter to the position after -the node specified by -position. iter and -position should be in the same level. Note that this -method only works with unsorted stores. If position -is None, iter will be moved to the -start of the level. - - - - - gtk.TreeStore.move_before - - - move_before - iter - position - - - - iter : - a gtk.TreeIter. - - - position : - a gtk.TreeIter - or None. - - - - - This method is available in PyGTK 2.2 and above. - - - The move_before() method moves the tree store node pointed to by -iter to the position before the node specified by -position. iter and -position should be in the same level. Note that this -method only works with unsorted stores. If position -is None, iter will be moved to the -end of the level. - - - - - - diff --git a/docs/reference/pygtk-gtktreeview.xml b/docs/reference/pygtk-gtktreeview.xml deleted file mode 100644 index 8ee228cf..00000000 --- a/docs/reference/pygtk-gtktreeview.xml +++ /dev/null @@ -1,4245 +0,0 @@ - - - - - - gtk.TreeView - a widget for displaying both trees and lists. - - - - Synopsis - - - gtk.TreeView - gtk.Container - - gtk.TreeView - modelNone - - - get_model - - - set_model - modelNone - - - get_selection - - - get_hadjustment - - - set_hadjustment - adjustment - - - get_vadjustment - - - set_vadjustment - adjustment - - - get_headers_visible - - - set_headers_visible - headers_visible - - - columns_autosize - - - set_headers_clickable - active - - - set_rules_hint - setting - - - get_rules_hint - - - append_column - column - - - remove_column - column - - - insert_column - column - position - - - insert_column_with_attributes - position - title - cell - ... - - - insert_column_with_data_func - position - title - cell - func - data - None - - - get_column - n - - - get_columns - - - move_column_after - column - base_column - - - set_expander_column - column - - - get_expander_column - - - set_column_drag_function - func - user_data - - - scroll_to_point - tree_x - tree_y - - - scroll_to_cell - path - column - use_align - row_align - col_align - - - row_activated - path - column - - - expand_all - - - - collapse_all - - - - expand_to_path - path - - - expand_row - path - open_all - - - collapse_row - path - - - map_expanded_rows - func - data - - - row_expanded - path - - - set_reorderable - reorderable - - - get_reorderable - - - set_cursor - path - focus_columnNone - start_editingFalse - - - set_cursor_on_cell - path - focus_columnNone - focus_cellNone - start_editingFalse - - - get_cursor - - - - get_bin_window - - - get_path_at_pos - x - y - - - get_cell_area - path - column - - - get_background_area - path - column - - - get_visible_rect - - - - widget_to_tree_coords - wx - wy - - - tree_to_widget_coords - tx - ty - - - enable_model_drag_source - start_button_mask - targets - actions - - - enable_model_drag_dest - targets - actions - - - unset_rows_drag_source - - - unset_rows_drag_dest - - - set_drag_dest_row - path - pos - - - get_drag_dest_row - - - - get_dest_row_at_pos - x - y - - - create_row_drag_icon - path - - - set_enable_search - enable_search - - - get_enable_search - - - get_search_column - - - - set_search_column - column - - - - - - set_search_equal_func - funcNone - user_dataNone - - - - - - get_fixed_height_mode - - - - set_fixed_height_mode - enable - - - get_hover_selection - - - - set_hover_selection - hover - - - get_hover_expand - - - - set_hover_expand - expand - - - - - - set_row_separator_func - funcNone - user_dataNone - - - get_visible_range - - - get_headers_clickable - - - - get_search_entry - - - - set_search_entry - entryNone - - - set_search_position_func - func - dataNone - - - set_rubber_banding - enable - - - get_rubber_banding - - - - get_grid_lines - - - - set_grid_lines - grid_lines - - - get_enable_tree_lines - - - - set_enable_tree_lines - enabled - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.TreeView - - - - - - gtk.TreeView Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - -
- - - - - - - - - "enable-grid-lines" - Read-Write - If True grid lines should be drawn - in the tree view - - - - "enable-search" - Read-Write - If True, the user can search through -columns interactively. Default value: True - - - - "enable-tree-lines" - Read-Write - If True tree lines should be drawn - in the tree view - - - - "expander-column" - Read-Write - The column for the expander - - - - "fixed-height-mode" - Read-Write - If True, assume all rows have the -same height thereby speeding up display. Default value: -False. Available in GTK+ 2.4 and above. - - - - "hadjustment" - Read-Write - The horizontal Adjustment for the widget - - - - "headers-clickable" - Write - If True, the column headers respond -to click events. Default value: False - - - - "headers-visible" - Read-Write - If True, show the column header -buttons. Default value: True - - - - "hover-expand" - Read-Write - - If True, rows expand or collapse if -the pointer moves over them. This mode is primarily intended for treeviews -in popups, e.g. in gtk.ComboBox or -gtk.EntryCompletion. Default -value: False. Available in GTK+ 2.6 and above. - - - - "hover-selection" - Read-Write - - If True, the selected row follows -the pointer. Currently, this works only for the selection modes -gtk.SELECTION_SINGLE and -gtk.SELECTION_BROWSE. This mode is primarily intended for -treeviews in popups, e.g. in gtk.ComboBox or -gtk.EntryCompletion. Default -value: False. Available in GTK+ 2.6 and above. - - - - "level-indentation" - Read-Write - Extra indentation for each level - - - - "model" - Read-Write - The model for the tree view - - - - "reorderable" - Read-Write - If True, the view is -reorderable. Default value: False. - - - - "rubber-banding" - Read-Write - If True enable selection of multiple - items by dragging the mouse pointer - - - - "rules-hint" - Read-Write - If True, hint to the theme engine to -draw rows in alternating colors. Default value: -False. - - - - "search-column" - Read-Write - The model column to search when searching through -code. Allowed values: >= -1. Default value: -1 - - - - "show-expanders" - Read-Write - View has expanders - - - - "vadjustment" - Read-Write - The vertical Adjustment for the widget - - - - - -
- -
- - - gtk.TreeView Style Properties - -
- - - - - - - - - "allow-rules" - Read - If True, allow drawing of -alternating color rows. Default value: True - - - - "even-row-color" - Read - The gtk.gdk.Color -to use for even rows. Available in GTK+ 2.2 and above. - - - - "expander-size" - Read - The size of the expander arrow. Allowed values: >= 0. -Default value: 12 - - - - "grid-line-pattern" - Read - Dash pattern used to draw the tree view grid lines - - - - "grid-line-width" - Read - Width, in pixels, of the tree view grid lines - - - - "horizontal-separator" - Read - The horizontal space between cells. Must be an even -number. Allowed values: >= 0. Default value: 2 - - - - "indent-expanders" - Read - If True, the expanders are -indented. - - - - "odd-row-color" - Read - The gtk.gdk.Color -to use for odd rows. Available in GTK+ 2.2 and above. - - - - "row-ending-details" - Read - Enable extended row background theming - - - - "tree-line-pattern" - Read - Dash pattern used to draw the tree view lines - - - - "tree-line-width" - Read - Width, in pixels, of the tree view lines - - - - "vertical-separator" - Read - The vertical space between cells. Must be an even -number. Allowed values: >= 0. Default value: 2 - - - - - -
- -
- - - gtk.TreeView Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - "columns-changed" - - callback - treeview - user_param1 - ... - - - - - "cursor-changed" - - callback - treeview - user_param1 - ... - - - - - "expand-collapse-cursor-row" - - callback - treeview - logical - expand - open_all - user_param1 - ... - - - - - "move-cursor" - - callback - treeview - step - count - user_param1 - ... - - - - - "row-activated" - - callback - treeview - path - view_column - user_param1 - ... - - - - - "row-collapsed" - - callback - treeview - iter - path - user_param1 - ... - - - - - "row-expanded" - - callback - treeview - iter - path - user_param1 - ... - - - - - "select-all" - - callback - treeview - user_param1 - ... - - - - - "select-cursor-parent" - - callback - treeview - user_param1 - ... - - - - - "select-cursor-row" - - callback - treeview - start_editing - user_param1 - ... - - - - - "set-scroll-adjustments" - - callback - treeview - hadjustment - vadjustment - user_param1 - ... - - - - - "start-interactive-search" - - callback - treeview - user_param1 - ... - - - - - "test-collapse-row" - - callback - treeview - iter - path - user_param1 - ... - - - - - "test-expand-row" - - callback - treeview - iter - path - user_param1 - ... - - - - - "toggle-cursor-row" - - callback - treeview - user_param1 - ... - - - - - "unselect-all" - - callback - treeview - user_param1 - ... - - - - - - - - - Description - - A gtk.TreeView -widget is used to display the contents of any model implementing the gtk.TreeModel -interface. The tree models provided standard with GTK+ -and PyGTK are: - - - - gtk.ListStore - - - gtk.TreeStore - - - gtk.TreeModelSort - - - - In addition, PyGTK provides gtk.GenericTreeModel -that allows you to create your own tree model entirely in Python. - - The gtk.TreeView uses -columns and cell renderers to actually display the model information. -GTK+ and PyGTK provides the gtk.TreeViewColumn -to manage the display of a column and the following cell renderers: - - - - gtk.CellRendererPixbuf - - - gtk.CellRendererText - - - gtk.CellRendererToggle - - - - In addition, PyGTK provides the gtk.GenericCellRenderer -that allows you to create your own cell renderers entirely in Python. - - - - - Constructor - - - gtk.TreeView - model - None - - - - model : - the tree model to display - - - Returns : - A new gtk.TreeView -widget. - - - - Creates a new gtk.TreeView -widget displaying the model specified by model. - - - - - Methods - - - gtk.TreeView.get_model - - - get_model - - - - Returns : - the current gtk.TreeModel, or -None if none is currently being -used. - - - - The get_model() method returns the -value of the "model" property containing the model the gtk.TreeView is -displaying or None there is no the model. - - - - - gtk.TreeView.set_model - - - set_model - model - None - - - - model : - the new tree model to use with the -treeview - - - - The set_model() method sets the "model" -property for the treeview to the value of model. If -the treeview already has a model set, this method will remove it before -setting the new model. If model is -None, it will unset the old model. - - - - - gtk.TreeView.get_selection - - - get_selection - - - - Returns : - A gtk.TreeSelection -object. - - - - The get_selection() method returns the -current gtk.TreeSelection -associated with the treeview. - - - - - gtk.TreeView.get_hadjustment - - - get_hadjustment - - - - Returns : - a gtk.Adjustment -object, or None if none is currently being -used. - - - - The get_hadjustment() method returns -the value of the "hadjustment" property that contains the current horizontal -gtk.Adjustment -object or None (if no horizontal adjustment is being -used). - - - - - gtk.TreeView.set_hadjustment - - - set_hadjustment - adjustment - - - - adjustment : - the gtk.Adjustment -to set - - - - The set_hadjustment() method sets the -"hadjustment" property to the value of adjustment -that must be a gtk.Adjustment -object. - - - - - gtk.TreeView.get_vadjustment - - - get_vadjustment - - - - Returns : - a gtk.Adjustment -object, or None if none is currently being -used. - - - - The get_vadjustment() method returns -the value of the "vadjustment" property that contains the horizontal gtk.Adjustment -or None if there is no vertical adjustment. - - - - - gtk.TreeView.set_vadjustment - - - set_vadjustment - adjustment - - - - adjustment : - the gtk.Adjustment -to set - - - - The set_vadjustment() method sets the -"vadjustment" property to the value of adjustment. -The new gtk.Adjustment -replaces the current vertical adjustment. - - - - - gtk.TreeView.get_headers_visible - - - get_headers_visible - - - - Returns : - True if the headers are -visible. - - - - The get_headers_visible() method -returns the value of the "headers-visible" property. If "headers-visible" is -True the headers on the treeview are visible. - - - - - gtk.TreeView.set_headers_visible - - - set_headers_visible - headers_visible - - - - headers_visible : - if True the headers are -visible - - - - The set_headers_visible() method sets -the "headers-visible" property to the value of -headers_visible. If -headers_visible is True the -headers will be displayed. - - - - - gtk.TreeView.columns_autosize - - - columns_autosize - - - The columns_autosize() method resizes -all columns to their optimal width. Only works after the treeview has been -realized. - - - - - gtk.TreeView.set_headers_clickable - - - set_headers_clickable - active - - - - active : - if True the headers are -clickable - - - - The set_headers_clickable() method sets -the "headers-clickable" property to the value of -active. If active is -True the column title buttons can be clicked. - - - - - gtk.TreeView.set_rules_hint - - - set_rules_hint - setting - - - - setting : - if True the tree requires -reading across rows - - - - The set_rules_hint() method sets the -"rules-hint" property to the value of setting. If -setting is True it indicates that -the user interface for your application requires users to read across tree -rows and associate cells with one another. By default, the tree will be -rendered with alternating row colors. Do not use it -just because you prefer the appearance of the ruled tree; that's a question -for the theme. Some themes will draw tree rows in alternating colors even -when rules are turned off, and users who prefer that appearance all the time -can choose those themes. You should call this method only as a -semantic hint to the theme engine that your tree makes -alternating colors useful from a functional standpoint (since it has lots of -columns, generally). - - - - - gtk.TreeView.get_rules_hint - - - get_rules_hint - - - - Returns : - True if rules are useful for -the user of this tree - - - - The get_rules_hint() returns the value -of the "rules-hint" property. See the set_rules_hint() -method for more information on the use of "rules-hint". - - - - - gtk.TreeView.append_column - - - append_column - column - - - - column : - the gtk.TreeViewColumn -to add. - - - Returns : - the number of columns in -tree_view after appending. - - - - The append_column() method appends the -specified column to the list of columns and returns -the new number of columns in the treeview. - - - - - gtk.TreeView.remove_column - - - remove_column - column - - - - column : - the gtk.TreeViewColumn -to remove. - - - Returns : - the number of columns in the treeview after the -column removal. - - - - The remove_column() method removes the -specified column from the treeview. - - - - - gtk.TreeView.insert_column - - - insert_column - column - position - - - - column : - the gtk.TreeViewColumn -to be inserted. - - - position : - the position to insert -column. - - - Returns : - the number of columns in the treeview after the -insertion. - - - - The insert_column() method inserts the -specified column into the treeview at the location -specified by position. If -position is -1, then the column is inserted at the -end. - - - - - gtk.TreeView.insert_column_with_attributes - - - insert_column_with_attributes - position - title - cell - ... - - - - position : - the position to insert the new column -in. - - - title : - the title to set the header -to. - - - cell : - the gtk.CellRenderer. - - - ... : - optional keyword-value -arguments - - - Returns : - the gtk.TreeViewColumn -that was inserted. - - - - The insert_column_with_attributes() -method creates a new gtk.TreeViewColumn -and inserts it into the treeview at the location specified by -position with the column title specified by -title and using the gtk.CellRenderer -specified by cell. If position -is -1, then the newly created column is inserted at the end. The column is -initialized with the optional attributes passed as keyword-value pairs (e.g. -text=0, foreground=2). See the gtk.TreeViewColumn.add_attribute() -method for more information. - - - - - gtk.TreeView.insert_column_with_data_func - - - insert_column_with_data_func - position - title - cell - func - data - None - - - - position : - the position to insert, -1 for -append - - - title : - the column title - - - cell : - a cell renderer for the -column - - - func : - the function or method to set attributes of the -cell renderer - - - data : - the data to pass with -func - - - Returns : - the number of columns in the treeview after the -insertion - - - - The insert_column_with_data_func() -method is a convenience function that inserts a new column into the treeview -at the location specified by position with the -specified title and the cell renderer specified by -cell and using the function or method specified by -func to set cell renderer attributes (normally using -data from the model). The signature of func is: - - - - celldatafunction - column - cell - model - iter - user_data - - - celldatamethod - self - column - cell - model - iter - user_data - - - - where column is the gtk.TreeViewColumn -in the treeview, cell is the gtk.CellRenderer -for column, model is the gtk.TreeModel for -the treeview and iter is the gtk.TreeIter -pointing at the row. See the gtk.TreeViewColumn.set_cell_data_func() -and gtk.TreeViewColumn.pack_start() -methods for more detail. - - - - - gtk.TreeView.get_column - - - get_column - n - - - - n : - the position of the column, counting from -0. - - - Returns : - the gtk.TreeViewColumn, -or None if the position is outside the range of -columns. - - - - The get_column() method returns the -gtk.TreeViewColumn -at the specified position in the treeview. - - - - - gtk.TreeView.get_columns - - - get_columns - - - - Returns : - a list of gtk.TreeViewColumn -s - - - - The get_columns() method returns a list -of all the gtk.TreeViewColumn -objects currently in the treeview. - - - - - gtk.TreeView.move_column_after - - - move_column_after - column - base_column - - - - column : - the gtk.TreeViewColumn -to be moved. - - - base_column : - the gtk.TreeViewColumn -column is to be after, or -None. - - - - The move_column_after() method moves -the gtk.TreeViewColumn -specified by column to be after the treeview column -specified by base_column. If -base_column is None, then -column is placed in the first position. - - - - - gtk.TreeView.set_expander_column - - - set_expander_column - column - - - - column : - the column to draw the expander arrow at -orNone. - - - - The set_expander_column() method sets -the "expander-column" property to the value of column -which must be a gtk.TreeViewColumn -in the treeview. If column is -None, then the expander arrow is always at the first -visible column. - - - - - gtk.TreeView.get_expander_column - - - get_expander_column - - - - Returns : - the expander column. - - - - The get_expander_column() method -returns the value of the "expander-column" property that contains the -current expander column i.e. the column that has the expander arrow drawn -next to it. - - - - - gtk.TreeView.set_column_drag_function - - - set_column_drag_function - func - user_data - - - - func : - A function to determine which columns are reorderable, or None. - - - user_data : - User data to be passed to func, or None - - - - - This method is available in PyGTK 2.4 and above. - - - The set_column_drag_function() method -sets the user function specified by func for -determining where a column may be dropped when dragged. The user function is -called on every column pair in turn at the beginning of a column drag to -determine where a drop can take place. The signature of -func is: - - - def func(tree_view, column, prev_column, next_column, data) - - - where tree_view is the gtk.TreeView, -column is the gtk.TreeViewColumn -being dragged, prev_column and next_column are the two gtk.TreeViewColumn -objects bracketing the drop spot, and data is -user_data. If prev_column or -next_column is None, then the drop -is at an edge. If func is None, -the user drag function is removed and the gtk.TreeView -reverts to the default behavior of allowing any reorderable column to be -dropped anywhere. - - - - - gtk.TreeView.scroll_to_point - - - scroll_to_point - tree_x - tree_y - - - - tree_x : - the X coordinate of new top-left pixel of -visible area, or -1 - - - tree_y : - the Y coordinate of new top-left pixel of -visible area, or -1 - - - - The scroll_to_point() method scrolls -the treeview so that the top-left corner of the visible area is at the -location specified by tree_x and -tree_y, where tree_x and -tree_y are specified in tree window coordinates. The -treeview must be realized before this method is called. If it isn't, you -should use the scroll_to_cell() -method instead. If either tree_x or -tree_y are -1, there is no scrolling in that -direction. - - - - - gtk.TreeView.scroll_to_cell - - - scroll_to_cell - path - column - None - use_align - False - row_align - 0.0 - col_align - 0.0 - - - - path : - the path of the row to move -to - - - column : - the gtk.TreeViewColumn -to move horizontally to, or None. - - - use_align : - if True use the alignment -arguments - - - row_align : - the vertical alignment of the row specified by -path. - - - col_align : - the horizontal alignment of the column -specified by column. - - - - The scroll_to_cell() method scrolls the -treeview display to the position specified by column -and path. If column is -None, no horizontal scrolling occurs. The alignment -parameters specified by row_align and -col_align determines where -column is placed within the treeview. The values of -col_align and row_align range -from 0.0 to 1.0. The alignment values specify the fraction of display space -that is to the left of or above the cell. If -use_align is False, the alignment -arguments are ignored, and the tree does the minimum amount of work to -scroll the cell onto the screen. This means that the cell will be scrolled -to the edge closest to it's current position. If the cell is currently -visible on the screen, nothing is done. This method only works if the model -is set, and path is a valid row in the model. - - - - - gtk.TreeView.row_activated - - - row_activated - path - column - - - - path : - the tree path of the row of the cell to be -activated. - - - column : - the gtk.TreeViewColumn -of the cell to be activated. - - - - The row_activated() method activates -the cell determined by path and -column. - - - - - gtk.TreeView.expand_all - - - expand_all - - - - The expand_all() method recursively -expands all nodes in the treeview. - - - - - gtk.TreeView.collapse_all - - - collapse_all - - - - The collapse_all() method recursively -collapses all visible, expanded nodes in the treeview. - - - - - gtk.TreeView.expand_to_path - - - expand_to_path - path - - - - path : - a path to a row. - - - - - This method is available in PyGTK 2.2 and above. - - - The expand_to_row() method expands the -row with the tree path specified by path. This will -also expand all parent rows of path as -necessary. - - - - - gtk.TreeView.expand_row - - - expand_row - path - open_all - - - - path : - the path to a row - - - open_all : - if True recursively expand, -otherwise just expand immediate children - - - - The expand_row() method opens the row -specified by path so its children are visible. If -open_all is True all rows are -expanded, otherwise only the immediate children of -path are expanded. - - - - - gtk.TreeView.collapse_row - - - collapse_row - path - - - - path : - the path to a row - - - - The collapse_row() method collapses the -row specified by path (hides its child rows, if they -exist). - - - - - gtk.TreeView.map_expanded_rows - - - map_expanded_rows - func - data - - - - func : - A function to be called - - - data : - User data to be passed to the function. - - - - - This method is available in PyGTK 2.2 and above. - - - The map_expanded_rows() method calls -the function specified by func on all expanded rows -passing data as an argument. - - - - - gtk.TreeView.row_expanded - - - row_expanded - path - - - - path : - the path to a row to test the expansion -state. - - - Returns : - True if -path is expanded. - - - - The row_expanded() method returns -True if the node pointed to by -path is expanded. - - - - - gtk.TreeView.set_reorderable - - - set_reorderable - reorderable - - - - reorderable : - if True, the tree can be -reordered. - - - - The set_reorderable() method sets the -"reorderable" property to the value of reorderable. -This method is a convenience method to allow you to reorder models that -support the gtk.TreeDragSource -and the gtk.TreeDragDest -interfaces. Both gtk.TreeStore and -gtk.ListStore -support these. If reorderable is -True, then the user can reorder the model by dragging and -dropping rows. The application can listen to these changes by connecting to -the model's signals. - - - This function does not give you any degree of control over the -order -- any reordering is allowed. If more control is needed, you should -probably handle drag and drop manually. - - - - - - gtk.TreeView.get_reorderable - - - get_reorderable - - - - Returns : - True if the tree can be -reordered. - - - - The get_reorderable() method returns -the value of the "reorderable" property that determines if the user can -reorder the tree via drag-and-drop. See the set_reorderable() -method for more information. - - - - - gtk.TreeView.set_cursor - - - set_cursor - path - focus_columnNone - start_editingFalse - - - - path : - a tree path - - - focus_column : - a gtk.TreeViewColumn, -or None - - - start_editing : - if True the specified cell -should start being edited. - - - - The set_cursor() method sets the -current keyboard focus to be at the row specified by -path, and selects it. This is useful when you want to -focus the user's attention on a particular row. If -column is not None, then focus is -given to the specified column. Additionally, if -column is specified, and -start_editing is True, then -editing should be started in the specified cell. This method is often -followed by the gtk.Widget.grab_focus() -method to give keyboard focus to the treeview. Please note that editing can -only happen when the widget is realized. - - - - - gtk.TreeView.set_cursor_on_cell - - - set_cursor_on_cell - path - focus_columnNone - focus_cellNone - start_editingFalse - - - - path : - a tree path - - - focus_column : - a gtk.TreeViewColumn, - or None - - - focus_cell : - a gtk.CellRenderer, - or None - - start_editing : - True if the specified cell - should start being edited. - - - - - This method is available in PyGTK 2.2 and above. - - - The set_cursor_on_cell() method sets -the current keyboard focus to be at the node specified by -path, and selects it. This is useful when you want -to focus the user's attention on a particular row. If -focus_column is specified, focus is given to that -column. If focus_column and -focus_cell are specified, and -focus_column contains 2 or more editable or -activatable cells, then focus is given to the cell specified by -focus_cell. Additionally, if -focus_column is specified, and -start_editing is True, editing -should be started in the specified cell. This method is often followed by -the gtk.Widget.grab_focus() -method in order to give keyboard focus to the widget. Please note that -editing can only happen when the widget is realized. - - - - - gtk.TreeView.get_cursor - - - get_cursor - - - - - Returns : - a tuple containing the current cursor path and -focus column. - - - - The get_cursor() method returns a tuple -containing the current path and focus column. If the cursor isn't currently -set, the current path will be None. If no column -currently has focus, the current focus column will be -None. - - - - - gtk.TreeView.get_bin_window - - - get_bin_window - - - - Returns : - a gtk.gdk.Window, or -None - - - - The get_bin_window() method returns the -window that the treeview renders to or None if the -treeview is not realized yet. This is used primarily to compare to the -event.window attribute to confirm that the event on the -treeview is on the right window. - - - - - gtk.TreeView.get_path_at_pos - - - get_path_at_pos - x - y - - - - x : - The x position to be -identified. - - - y : - The y position to be -identified. - - - Returns : - a tuple containing: a tree path; a gtk.TreeViewColumn - object; the X coordinate relative to the cell; and, the Y - coordinate relative to the cell. If there is no path at the - position None is returned. - - - - The get_path_at_pos() method returns a -tuple containing: - - - - the path at the specified point -(x, y), relative to widget -coordinates - - - the gtk.TreeViewColumn -at that point - - - the X coordinate relative to the cell -background - - - the Y coordinate relative to the cell -background - - - - x and y are -relative to the coordinates of an event on the treeview only when -event.window==treeview.get_bin_window(). It is primarily -used for popup menus. This method is only meaningful if the treeview is -realized. This method returns None if there is no path at -the position. - - - - - gtk.TreeView.get_cell_area - - - get_cell_area - path - column - - - - path : - a tree path for the row - - - column : - a gtk.TreeViewColumn -for the column - - - Returns : - rectangle - - - - The get_cell_area() method returns the -bounding gtk.gdk.Rectangle -in tree window coordinates for the cell at the row specified by -path and the column specified by -column. If path points to a -path not currently displayed, the y and -height attributes of the rectangle will be 0. The sum -of all cell rects does not cover the entire tree; there are extra pixels in -between rows, for example. The returned rectangle is equivalent to the -cell_area passed to the gtk.CellRenderer.render() -method. This method is only valid if the treeview is realized. - - - - - gtk.TreeView.get_background_area - - - get_background_area - path - column - - - - path : - a tree path for the row, - - - column : - a gtk.TreeViewColumn -for the column - - - Returns : - a rectangle - - - - The get_background_area() method -returns the bounding gtk.gdk.Rectangle -in tree window coordinates for the cell at the row specified by -path and the column specified by -column. If path points to a -node not found in the tree, the y and -height attributes of the rectangle will be 0. The -returned rectangle is equivalent to the -background_area passed to the gtk.CellRenderer.render(). -These background areas tile to cover the entire tree window (except for the -area used for header buttons). Contrast with the -cell_area, returned by the get_cell_area() -method, that returns only the cell itself, excluding the surrounding borders -and the tree expander area. - - - - - gtk.TreeView.get_visible_rect - - - get_visible_rect - - - - - Returns : - a rectangle - - - - The get_visible_rect() method returns -the bounding gtk.gdk.Rectangle -for the currently visible region of the treeview widget, in tree -coordinates. Convert to widget coordinates with the tree_to_widget_coords(). -Tree coordinates start at 0,0 for row 0 of the tree, and cover the entire -scrollable area of the tree. - - - - - gtk.TreeView.widget_to_tree_coords - - - widget_to_tree_coords - wx - wy - - - - wx : - the widget X coordinate - - - wy : - the widget Y coordinate - - - Returns : - a tuple containing the tree X and Y -coordinates - - - - The widget_to_tree_coords() method -returns a tuple containing the tree X and Y coordinates for the widget -coordinates specified by wx and -wy. The tree coordinates cover the full scrollable -area of the tree. - - - - - gtk.TreeView.tree_to_widget_coords - - - tree_to_widget_coords - tx - ty - - - - tx : - tree X coordinate - - - ty : - tree Y coordinate - - - Returns : - a tuple containing the widget X and Y -coordinates - - - - The tree_to_widget_coords() method -returns a tuple containing the widget coordinates for the tree coordinates -specified by tx and ty. - - - - - gtk.TreeView.enable_model_drag_source - - - enable_model_drag_source - start_button_mask - targets - actions - - - - start_button_mask : - the bitmask of buttons that can start the -drag - - - targets : - a sequence of tuples containing target -data - - - actions : - the possible actions for a -drag - - - - The enable_model_drag_source() method - sets the treeview to start a drag operation when the user click and - drags on a row. The value of start_button_mask - is a combination of the. - - targets is a sequence (list or tuple) of - tuples that contain information about the targets. The target data - contains a string representing the drag type, target flags (a - combination of the ) and an application - assigned integer ID used for identification purposes. - - The value of actions is one of the . - - - - - gtk.TreeView.enable_model_drag_dest - - - enable_model_drag_dest - targets - actions - - - - targets : - a sequence of tuples containing target -data - - - actions : - the possible actions for a -drag - - - - The enable_model_drag_dest() method - sets the treeview to receive a drag drop. - - targets is a sequence (list or tuple) of - tuples that contain information about the targets. The target data - contains a string representing the drag type, target flags (a - combination of gtk.TARGET_SAME_APP and - gtk.TARGET_SAME_WIDGET or neither) and an - application assigned integer ID used for identification - purposes. - - The value of actions is one of the . - - - - - gtk.TreeView.unset_rows_drag_source - - - unset_rows_drag_source - - - The unset_rows_drag_source() method -unsets the drag source information. - - - - - gtk.TreeView.unset_rows_drag_dest - - - unset_rows_drag_dest - - - The unset_rows_drag_dest() method -unsets the drag destination information. - - - - - gtk.TreeView.set_drag_dest_row - - - set_drag_dest_row - path - pos - - - - path : - a tree path of the row to highlight, or - None. - - - pos : - a drop position - - - - The set_drag_dest_row() method sets the -treeview drag destination row to the value specified by -path with the drop position specified by -pos. The value of pos must be -one of: gtk.TREE_VIEW_DROP_BEFORE, -gtk.TREE_VIEW_DROP_AFTER, -gtk.TREE_VIEW_DROP_INTO_OR_BEFORE or -gtk.TREE_VIEW_DROP_INTO_OR_AFTER. - -In PyGTK 2.10 and above, path may be -None. - - - - - gtk.TreeView.get_drag_dest_row - - - get_drag_dest_row - - - - - Returns : - a 2-tuple containing the tree path and the drop - position relative to the tree path or - None - - - - The get_drag_dest_row() method returns -a 2-tuple containing the path of the drag destination row and a drop -position relative to the destination row. The drop position is one of: -gtk.TREE_VIEW_DROP_BEFORE, -gtk.TREE_VIEW_DROP_AFTER, -gtk.TREE_VIEW_DROP_INTO_OR_BEFORE or -gtk.TREE_VIEW_DROP_INTO_OR_AFTER. This method returns -None if no drag destination row is set. - - - - - gtk.TreeView.get_dest_row_at_pos - - - get_dest_row_at_pos - x - y - - - - x : - the x coordinate of the -position - - - y : - the y coordinate of the -position - - - Returns : - a 2-tuple containing the path of the row and -the drop position at the position specified by x and -y or None - - - - The get_dest_row_at_pos() method -returns a 2-tuple containing the path of the row and the drop position -relative to the row of the position specified by x -and y. The drop position is one of: -gtk.TREE_VIEW_DROP_BEFORE, -gtk.TREE_VIEW_DROP_AFTER, -gtk.TREE_VIEW_DROP_INTO_OR_BEFORE or -gtk.TREE_VIEW_DROP_INTO_OR_AFTER. - - - - - gtk.TreeView.create_row_drag_icon - - - create_row_drag_icon - path - - - - path : - a tree path - - - Returns : - a new pixmap of the drag -icon. - - - - The create_row_drag_icon() method -creates a gtk.gdk.Pixmap -representation of the row specified by path. This -image is used for a drag icon. - - - - - gtk.TreeView.set_enable_search - - - set_enable_search - enable_search - - - - enable_search : - if True, the user can search -interactively - - - - The set_enable_search() method sets the -"enable-search" property to the value of -enable_search. If -enable_search is True the user can -type in text to search through the tree interactively. - - - - - gtk.TreeView.get_enable_search - - - get_enable_search - - - - Returns : - True if the user can search -interactively - - - - The get_enable_search() method returns -the value of the "enable-search" property. If "enable-search" is -True the tree allows interactive searching. - - - - - gtk.TreeView.get_search_column - - - get_search_column - - - - Returns : - the column the interactive search code -searches. - - - - The get_search_column() method returns -the value of the "search-column" property that is the column searched by -the interactive search code. - - - - - gtk.TreeView.set_search_column - - - set_search_column - column - - - - column : - the column to search - - - - The set_search_column() method sets the -"search-column" property to the value of column. The -value of column is the column where the interactive -search code should search. Additionally, this method turns on interactive -searching (see the set_enable_search() -method). - - - - - - - gtk.TreeView.set_search_equal_func - - - set_search_equal_func - funcNone - user_dataNone - - - - func : - the compare function to use during the search or None - - - user_data : - user data to pass to func, or None - - - - - This method is available in PyGTK 2.4 and above. - - - The set_search_equal_func() method sets -the compare function for the interactive search capabilities to the function -specified by func. If -user_data is specified and not -None, it is passed to func. If -func is None, the default gtk.TreeView -search equal function will be used. The signature of -func is: - - - def func(model, column, key, iter, data) - - - where model is the gtk.TreeModel of -the gtk.TreeView, -column is the number of the column being searched -(see the set_search_column() -method for more information), key is the string being -searched for, iter is a gtk.TreeIter -pointing to the current candidate row and data is the -context data user_data. func -should return False to indicate that the row matches the -search criteria. - - - - - - - - gtk.TreeView.get_fixed_height_mode - - - get_fixed_height_mode - - - - - Returns : - True if fixed height mode -is enabled. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_fixed_height_mode() method -returns the value of the "fixed-height-mode" property. If the -"fixed-height-mode" property is True, all rows are -assumed to be the same height. - - - - - gtk.TreeView.set_fixed_height_mode - - - set_fixed_height_mode - enable - - - - enable : - if True enable fixed height -mode. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_fixed_height_mode() method sets -the "fixed-height-mode" property to the value of -enable. If enable is -True all rows are assumed to have the same height which -speeds up gtk.TreeView -displays. Only enable this option if all rows are the same height and all -columns are of type gtk.TREE_VIEW_COLUMN_FIXED (see the -). - - - - - gtk.TreeView.get_hover_selection - - - get_hover_selection - - - - - Returns : - True if hover selection -mode is enabled. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_hover_selection() method -returns the value of the "hover-selection" property. If the -"hover-selection" property is True the selected row -follows the pointer. See the set_hover_selection() -method for more detail. - - - - - gtk.TreeView.set_hover_selection - - - set_hover_selection - hover - - - - hover : - if True enable hover -selection mode. - - - - - This method is available in PyGTK 2.6 and above. - - - The () method sets the -"hover-selection" property to the value of hover. If -hover is True the hover selection -mode is enables and the selected row follows the pointer. Currently, this -works only for the selection modes gtk.SELECTION_SINGLE -and gtk.SELECTION_BROWSE (see the ). - - - - - gtk.TreeView.get_hover_expand - - - get_hover_expand - - - - - Returns : - True if hover expand mode is -enabled - - - - - This method is available in PyGTK 2.6 and above. - - - The get_hover_expand() method returns -the value of the "hover-expand" property. If the "hover-expand" property is -True rows expand or collapse if the pointer moves over -them. - - - - - gtk.TreeView.set_hover_expand - - - set_hover_expand - expand - - - - expand : - if True enable hover expand -mode. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_hover_expand() method sets the -"hover-expand" property to the value of expand. If -expand is True, rows expand or -collapse if the pointer moves over them. - - - - - gtk.TreeView.set_row_separator_func - - - set_row_separator_func - funcNone - user_dataNone - - - - func : - the row separator function or -None - - - user_data : - user data to pass to func, or None - - - - - This method is available in PyGTK 2.6 and above. - - - The set_row_separator_func() method -sets the row separator function to the function specified by -func. The row separator function is used to determine -if a row should be displayed as a separator. If -user_data is specified and not -None, it is passed to func. If -func is None, no separators will -be drawn. The signature of func is: - - - def func(model, iter, data) - - - where model is the gtk.TreeModel of -the gtk.TreeView, -iter is a gtk.TreeIter -pointing to the current candidate row and data is the -context data user_data. func -should return True to indicate that the row is a -separator. - - A common way to implement this is to have a boolean column in - model, whose values func - returns. - - - - - gtk.TreeView.get_visible_range - - - get_visible_range - - - - - Returns : - a 2-tuple containing the start and end paths of -the visible region or None. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_visible_range() method returns -a 2-tuple containing the start and end paths for the visible region in the -treeview. If no valid paths are available this method returns -None. - - - - - gtk.TreeView.get_headers_clickable - - - get_headers_clickable - - - - - - Returns : - True if all header columns - are clickable - - - - - This method is available in PyGTK 2.10 and above. - - - Returns True if all header columns are - clickable. - - - - - gtk.TreeView.get_search_entry - - - get_search_entry - - - - - - Returns : - the entry currently in use as the search - entry. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the gtk.Entry which - is currently in use as the interactive search entry for the treeview. - In case the built-in entry is being used, None will - be returned. - - - - - gtk.TreeView.set_search_entry - - - set_search_entry - entryNone - - - - - entry : - the entry the interactive search code of the - treeview should use or - None - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the entry which the interactive search code will use for - this treeview. This is useful when you want to provide a search entry - in our interface at all time at a fixed position. Passing - None for entry will make the - interactive search code use the built-in popup entry again. - - - - - gtk.TreeView.set_search_position_func - - - set_search_position_func - func - dataNone - - - - - func : - the function to use to position the search - dialog, or None to use the default search - position function - - - data : - user data to pass to - func, or - None - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the function to use when positioning the search dialog. The - signature of func is: - - - def func(treeview, search_dialog, user_data): - - - where search_dialog is the dialog to be - positioned and user_data is - data. - - - - - gtk.TreeView.set_rubber_banding - - - set_rubber_banding - enable - - - - - enable : - if True enable rubber - banding - - - - - This method is available in PyGTK 2.10 and above. - - - Enables or disables rubber banding. If the selection mode is - gtk.SELECTION_MULTIPLE, rubber banding will allow - the user to select multiple rows by dragging the mouse. - - - - - gtk.TreeView.get_rubber_banding - - - get_rubber_banding - - - - - - Returns : - True if rubber banding is - enabled. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns whether rubber banding is enabled. If the selection - mode is gtk.SELECTION_MULTIPLE, rubber banding will - allow the user to select multiple rows by dragging the mouse. - - - - - gtk.TreeView.get_grid_lines - - - get_grid_lines - - - - - - Returns : - one of the - indicating which grid lines are enabled. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns which grid lines are enabled. - - - - - gtk.TreeView.set_grid_lines - - - set_grid_lines - grid_lines - - - - - grid_lines : - one of the - indicating which grid lines to enable. - - - - - This method is available in PyGTK 2.10 and above. - - - Sets which grid lines to draw. - - - - - gtk.TreeView.get_enable_tree_lines - - - get_enable_tree_lines - - - - - - Returns : - True if tree lines are - drawn. - - - - - This method is available in PyGTK 2.10 and above. - - - Returns True if tree lines are drawn. - - - - - gtk.TreeView.set_enable_tree_lines - - - set_enable_tree_lines - enabled - - - - - enabled : - if True enable tree line - drawing. - - - - - This method is available in PyGTK 2.10 and above. - - - Sets whether to draw lines interconnecting the expanders. This - does not have any visible effects for lists. - - - - - - - Signals - - - The "columns-changed" gtk.TreeView Signal - - - callback - treeview - user_param1 - ... - - - - - treeview : - the treeview that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "columns-changed" signal is emitted when a column has been -added to, removed from or moved in treeview. - - - - - The "cursor-changed" gtk.TreeView Signal - - - callback - treeview - user_param1 - ... - - - - - treeview : - the treeview that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "cursor-changed" signal is emitted when the cursor moves or -is set. - - - - - The "expand-collapse-cursor-row" gtk.TreeView Signal - - - callback - treeview - logical - expand - open_all - user_param1 - ... - - - - - treeview : - the treeview that received the -signal - - - logical : - if True - - - - expand : - if True the row should be -expanded - - - open_all : - if True recursively expand -all children - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was - handled. - - - - The "expand-collapse-cursor-row" signal is emitted when the row -at the cursor needs to be expanded or collapsed. - - - - - The "move-cursor" gtk.TreeView Signal - - - callback - treeview - step - count - user_param1 - ... - - - - - treeview : - the treeview that received the -signal - - - step : - the movement step size - - - count : - the number of steps to -take - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was - handled. - - - - The "move-cursor" signal is emitted when the user moves the -cursor using the Right, Left, -Up or Down arrow keys or the -Page Up, Page Down, Home -and End keys. - - - - - The "row-activated" gtk.TreeView Signal - - - callback - treeview - path - view_column - user_param1 - ... - - - - - treeview : - the treeview that received the -signal - - - path : - the path of the activated -row - - - view_column : - the column in the activated -row - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "row-activated" signal is emitted when the row_activated() -method is called or the user double clicks a treeview -row. "row-activated" is also emitted when a non-editable row is selected and -one of the keys: Space, ShiftSpace , -Return or Enter is pressed. - - - - - The "row-collapsed" gtk.TreeView Signal - - - callback - treeview - iter - path - user_param1 - ... - - - - - treeview : - the treeview that received the -signal - - - iter : - a gtk.TreeIter - pointing to the row that collapsed - - - path : - the path of the row that -collapsed - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "row-collapsed" signal is emitted when a row is collapsed by -user of programmatic action. - - - - - The "row-expanded" gtk.TreeView Signal - - - callback - treeview - iter - path - user_param1 - ... - - - - - treeview : - the treeview that received the -signal - - - iter : - a gtk.TreeIter - pointing to the row that expanded - - - path : - the path of the row that -expanded - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "row-expanded" signal is emitted when a row is expanded via -user or programmatic action. - - - - - The "select-all" gtk.TreeView Signal - - - callback - treeview - user_param1 - ... - - - - - treeview : - the treeview that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was - handled. - - - - The "select-all" signal is emitted when the user presses -Controla - or Control/ - . - - - - - The "select-cursor-parent" gtk.TreeView Signal - - - callback - treeview - user_param1 - ... - - - - - treeview : - the treeview that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was - handled. - - - - The "select-cursor-parent" signal is emitted when the user -presses Backspace while -a row has the cursor. - - - - - The "select-cursor-row" gtk.TreeView Signal - - - callback - treeview - start_editing - user_param1 - ... - - - - - treeview : - the treeview that received the -signal - - - start_editing : - if True the cell editing is -started - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was - handled. - - - - The "select-cursor-row" signal is emitted when a non-editable -row is selected and one of the keys: Space, ShiftSpace, -Return or Enter is pressed. - - - - - The "set-scroll-adjustments" gtk.TreeView Signal - - - callback - treeview - hadjustment - vadjustment - user_param1 - ... - - - - - treeview : - the treeview that received the -signal - - - hadjustment : - a horizontal gtk.Adjustment - - - vadjustment : - a vertical gtk.Adjustment - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was - handled. - - - - The "set-scroll-adjustments" signal is emitted when new -horizontal or vertical adjustments are set on the -treeview. - - - - - The "start-interactive-search" gtk.TreeView Signal - - - callback - treeview - user_param1 - ... - - - - - treeview : - the treeview that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was - handled. - - - - The "start-interactive-search" signal is emitted when the user -presses Controlf -. - - - - - The "test-collapse-row" gtk.TreeView Signal - - - callback - treeview - iter - path - user_param1 - ... - - - - - treeview : - the treeview that received the -signal - - - iter : - the gtk.TreeIter -pointing at the row to test. - - - path : - the path of the row to be -tested - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the row should be - collapsed. - - - - The "test-collapse-row" signal is emitted when the row pointed -to by iter and path is to be -collapsed. - - - - - The "test-expand-row" gtk.TreeView Signal - - - callback - treeview - iter - path - user_param1 - ... - - - - - treeview : - the treeview that received the -signal - - - iter : - the gtk.TreeIter -pointing at the row to test. - - - path : - the path of the row to -test - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the row should be - expanded. - - - - The "test-expand-row" signal is emitted when the row pointed to -by iter and path is to be -expanded. - - - - - The "toggle-cursor-row" gtk.TreeView Signal - - - callback - treeview - user_param1 - ... - - - - - treeview : - the treeview that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was - handled. - - - - The "toggle-cursor-row" signal is emitted when the user presses -ControlSpace -. - - - - - The "unselect-all" gtk.TreeView Signal - - - callback - treeview - user_param1 - ... - - - - - treeview : - the treeview that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the signal was - handled. - - - - The "unselect-all" signal is emitted when the user presses -ShiftControla - or ShiftControl/ -. - - - - - -
diff --git a/docs/reference/pygtk-gtktreeviewcolumn.xml b/docs/reference/pygtk-gtktreeviewcolumn.xml deleted file mode 100644 index 34d7c2bd..00000000 --- a/docs/reference/pygtk-gtktreeviewcolumn.xml +++ /dev/null @@ -1,1868 +0,0 @@ - - - - - - gtk.TreeViewColumn - a visible column in a gtk.TreeView -widget - - - - Synopsis - - - gtk.TreeViewColumn - gtk.Object - - gtk.TreeViewColumn - title - None - cell_renderer - None - ... - - - pack_start - cell - expandTrue - - - pack_end - cell - expandTrue - - - clear - - - get_cell_renderers - - - - add_attribute - cell_renderer - attribute - column - - - set_attributes - cell_renderer - ... - - - set_cell_data_func - cell_renderer - func - func_data - None - - - clear_attributes - cell_renderer - - - set_spacing - spacing - - - get_spacing - - - - set_visible - visible - - - get_visible - - - - set_resizable - resizable - - - get_resizable - - - - set_sizing - type - - - get_sizing - - - get_width - - - - get_fixed_width - - - - set_fixed_width - fixed_width - - - set_min_width - min_width - - - get_min_width - - - - set_max_width - max_width - - - get_max_width - - - - clicked - - - set_title - title - - - get_title - - - - set_expand - expand - - - get_expand - - - - set_clickable - active - - - get_clickable - - - - set_widget - widget - - - get_widget - - - - set_alignment - xalign - - - get_alignment - - - - set_reorderable - reorderable - - - get_reorderable - - - - set_sort_column_id - sort_column_id - - - get_sort_column_id - - - - set_sort_indicator - setting - - - get_sort_indicator - - - - set_sort_order - order - - - get_sort_order - - - - cell_set_cell_data - tree_model - iter - is_expander - is_expanded - - - cell_get_size - cell_area(0,0,0,0) - - - cell_is_visible - - - - focus_cell - cell - - - cell_get_position - cell_renderer - - - queue_resize - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.TreeViewColumn - - - - - - gtk.TreeViewColumn Properties - - gtk.Object Properties - -
- - - - - - - - - "alignment" - Read-Write - The alignment of the column header text or -widget - - - - "clickable" - Read-Write - If True, the header can be -clicked - - - - "expand" - Read-Write - If True, the column can expand to -take extra available space. Available in GTK+ 2.4 and above - - - - "fixed-width" - Read-Write - The current fixed width of the column - - - - "max-width" - Read-Write - The maximum allowed width of the column - - - - "min-width" - Read-Write - The minimum allowed width of the column - - - - "reorderable" - Read-Write - If True, the column can be reordered -around the headers - - - - "resizable" - Read-Write - If True, the user can resize the -column - - - - "sizing" - Read-Write - The resize mode of the column: -gtk.TREE_VIEW_COLUMN_GROW_ONLY, -gtk.TREE_VIEW_COLUMN_AUTOSIZE or -gtk.TREE_VIEW_COLUMN_FIXED - - - - "sort-indicator" - Read-Write - If True, how a sort -indicator - - - - "sort-order" - Read-Write - The sort direction the sort indicator should indicate: -gtk.SORT_ASCENDING or -gtk.SORT_DESCENDING - - - - "spacing" - Read-Write - Space which is inserted between cells - - - - "title" - Read-Write - The title to appear in the column header - - - - "visible" - Read-Write - If True, display the column - - - - "widget" - Read-Write - The widget to put in the column header button instead -of the column title - - - - "width" - Read - The current width of the column - - - - - -
- -
- - - gtk.TreeViewColumn Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - - - - "clicked" - - callback - treeviewcolumn - user_param1 - ... - - - - - - - - - Description - - The gtk.TreeViewColumn -object is a visible column in a gtk.TreeView -widget. A gtk.TreeViewColumn -manages the display of the header and the cells using a gtk.CellRenderer. - - In PyGTK 2.4 gtk.TreeViewColumn -implementes the gtk.CellLayout -interface. - - - - - Constructor - - - gtk.TreeViewColumn - title - None - cell_renderer - None - ... - - - - title : - the header title string - - - cell_renderer : - a gtk.CellRenderer - - - ... : - zero or more attribute=column -pairs - - - Returns : - A newly created gtk.TreeViewColumn. - - - - Creates a new gtk.TreeViewColumn -with the header string specified by title and using -the gtk.CellRenderer -specified by cell_renderer. Zero or more -attribute=column pairs may be added to specify from which -tree model column to retrieve the attribute value. For example: - - - column = gtk.TreeViewColumn('Column Title', cell_renderer, text=0, foreground=1) - - - will retrieve the 'text' attribute values for the cell renderer -from column 0 in the treemodel and the 'foreground' attribute values from -column 1. See the add_attribute() -method for more detail. - - - - - Methods - - - gtk.TreeViewColumn.pack_start - - - pack_start - cell - expandTrue - - - - cell : - a gtk.CellRenderer. - - - expand : - if True -cell is to be given the extra space allocated to the -cell box. - - - - The pack_start() method packs the gtk.CellRenderer -specified by cell into the beginning column. If -expand is True, then the -cell is allocated a share of all available space that -the column is allocated. Note expand defaults to -True in PyGTK 2.4. - - - - - gtk.TreeViewColumn.pack_end - - - pack_end - cell - expandTrue - - - - cell : - a gtk.CellRenderer. - - - expand : - if True -cell is to be given the extra space allocated to the -cell box. - - - - The pack_end() method packs the gtk.CellRenderer -specified by cell into the column. If -expand is True, then the -cell is allocated a share of all available space that -the column is allocated. Note expand defaults to -True in PyGTK 2.4. - - - - - gtk.TreeViewColumn.clear - - - clear - - - The clear() method unsets all the -mappings on all renderers on the column. - - - - - gtk.TreeViewColumn.get_cell_renderers - - - get_cell_renderers - - - - Returns : - a list of gtk.CellRenderer -objects - - - - The get_cell_renderers() method returns -a list containing all the cell renderers in the column, in no particular -order. - - - - - gtk.TreeViewColumn.add_attribute - - - add_attribute - cell_renderer - attribute - column - - - - cell_renderer : - the gtk.CellRenderer -to set attributes on - - - attribute : - an attribute on the -renderer - - - column : - the column position on the model to get the -attribute from. - - - - The add_attribute() method adds an -attribute mapping to the list in the tree column. The -column is the column of the tree model to get a value -from, and the attribute is the parameter on -cell_renderer to be set from the value. So for -example if column 2 of the model contains strings, you could have the "text" -attribute of a gtk.CellRendererText -get its values from column 2. - - - - - gtk.TreeViewColumn.set_attributes - - - set_attributes - cell_renderer - ... - - - - cell_renderer : - the gtk.CellRenderer -we're setting the attributes of - - - ... : - zero or more -attribute=column pairs - - - - The set_attributes() method sets the -attribute locations of the gtk.CellRenderer -specified by cell_renderer using the -attribute=column pairs (e.g. text=0, foreground=1). See -the add_attribute() -method for more detail. All existing cell attributes are removed, and -replaced with the new attributes. - - - - - gtk.TreeViewColumn.set_cell_data_func - - - set_cell_data_func - cell_renderer - func - func_data - None - - - - cell_renderer : - a gtk.CellRenderer - - - func : - the function or method to -use. - - - func_data : - the user data to pass when calling -func. - - - - The set_cell_data_func() method sets -the data function (or method) to use for the column gtk.CellRenderer -specified by cell_renderer. This function (or method) -is used instead of the standard attribute mappings for setting the column -values, and should set the attributes of the cell renderer as appropriate. -func may be None to remove the -current data function. The signature of func -is: - - - - celldatafunction - column - cell - model - iter - user_data - - - celldatamethod - self - column - cell - model - iter - user_data - - - - where column is the gtk.TreeViewColumn -in the treeview, cell is the gtk.CellRenderer -for column, model is the gtk.TreeModel for -the treeview and iter is the gtk.TreeIter -pointing at the row. - - - - - gtk.TreeViewColumn.clear_attributes - - - clear_attributes - cell_renderer - - - - cell_renderer : - a gtk.CellRenderer -to clear the attribute mapping on. - - - - The clear_attributes() method clears -all existing attributes previously set with the set_attributes() -method. - - - - - gtk.TreeViewColumn.set_spacing - - - set_spacing - spacing - - - - spacing : - the distance between cell renderers in -pixels. - - - - The set_spacing() method sets the -spacing field of the treeview column, which is the number of pixels to place -between cell renderers packed into it. - - - - - gtk.TreeViewColumn.get_spacing - - - get_spacing - - - - Returns : - the spacing of the treeview -column. - - - - The get_spacing() method returns the -spacing of the treeview column. - - - - - gtk.TreeViewColumn.set_visible - - - set_visible - visible - - - - visible : - if True the treeview column -is visible. - - - - The set_visible() method sets the -"visible" property to the value of visible. If -visible is True the treeview -column is visible - - - - - gtk.TreeViewColumn.get_visible - - - get_visible - - - - Returns : - True if the column is -visible - - - - The get_visible() method returns the -value of the "visible" property. If "visible" is True the -treeview column is visible. - - - - - gtk.TreeViewColumn.set_resizable - - - set_resizable - resizable - - - - resizable : - if True, the column can be -resized - - - - The set_resizable() method sets the -"resizable" property to the value of resizable. If -resizable is True the user can -explicitly resize the column by grabbing the outer edge of the column -button. If resizable is True and -the sizing mode of the column is -gtk.TREE_VIEW_COLUMN_AUTOSIZE, the sizing mode is changed -to gtk.TREE_VIEW_COLUMN_GROW_ONLY. - - - - - gtk.TreeViewColumn.get_resizable - - - get_resizable - - - - Returns : - True, if the treeview column -can be resized. - - - - The get_resizable() method returns the -value of the "resizable" property. If "resizable" is -True, the treeview column can be resized by the -user. - - - - - gtk.TreeViewColumn.set_sizing - - - set_sizing - type - - - - type : - The treeview column sizing: -gtk.TREE_VIEW_COLUMN_GROW_ONLY, -gtk.TREE_VIEW_COLUMN_AUTOSIZE or -gtk.TREE_VIEW_COLUMN_FIXED. - - - - The set_sizing() method sets the -"sizing" property to the value of type. The value of -type must be one of the . - - - - - gtk.TreeViewColumn.get_sizing - - - get_sizing - - - - Returns : - the treeview column sizing -type. - - - - The get_sizing() method returns the -value of the "sizing" property that contains the current type of the -treeview column sizing mode. See the set_sizing() -method for more detail. - - - - - gtk.TreeViewColumn.get_width - - - get_width - - - - Returns : - the current width of the treeview -column. - - - - The get_width() method returns the -value of the "width" property that contains the current size of the treeview -column in pixels. - - - - - gtk.TreeViewColumn.get_fixed_width - - - get_fixed_width - - - - Returns : - the fixed width of the treeview -column - - - - The get_fixed_width() method returns -the value of the "fixed-width" property that contains the fixed width of the -treeview column i.e. the width of the treeview column only if the sizing -type is gtk.TREE_VIEW_COLUMN_FIXED. - - - - - gtk.TreeViewColumn.set_fixed_width - - - set_fixed_width - fixed_width - - - - fixed_width : - the size to set the treeview column to. Must be -greater than 0. - - - - The set_fixed_width() method sets the -"fixed-width" property to the value of fixed_width. -The value of fixed_width is the size of the column in -pixels. This is meaningful only if the sizing type is -gtk.TREE_VIEW_COLUMN_FIXED. The size of the column is -clamped to the min and max width for the column. Please note that the min -and max width of the column doesn't actually affect the "fixed_width" -property of the widget, just the actual size when displayed. - - - - - gtk.TreeViewColumn.set_min_width - - - set_min_width - min_width - - - - min_width : - the minimum width of the treeview column in -pixels, or -1. - - - - The set_min_width() method sets the -"min-width" property to the value of min_width. The -value of min_width is the minimum width of the -treeview column. If min_width is -1, then the -minimum width is unset. - - - - - gtk.TreeViewColumn.get_min_width - - - get_min_width - - - - Returns : - the minimum width of the treeview -column. - - - - The get_min_width() method returns the -value of the "min-width" property that contains the minimum width in pixels -of the treeview column, or -1 if no minimum width is set. - - - - - gtk.TreeViewColumn.set_max_width - - - set_max_width - max_width - - - - max_width : - the maximum width of the column in pixels, or --1. - - - - The set_max_width() method sets the -"max-width" property to the value of max_width. The -value of max_width becomes the maximum width of the -treeview column. If max_width is -1, then the -maximum width is unset. Note, the column can actually be wider than max -width if it's the last column in a view. In this case, the column expands to -fill any extra space. - - - - - gtk.TreeViewColumn.get_max_width - - - get_max_width - - - - Returns : - the maximum width of the treeview -column. - - - - The get_max_width() method returns the -value of the "max-width" property that contains the maximum width in pixels -of the treeview column, or -1 if no maximum width is set. - - - - - gtk.TreeViewColumn.clicked - - - clicked - - - The clicked() method emits the -"clicked" signal on the treeview column. The treeview column must be -clickable. - - - - - gtk.TreeViewColumn.set_title - - - set_title - title - - - - title : - the title string of the treeview -column. - - - - The set_title() method sets the "title" -property to the value of title. The "title" property -contains the string that is used to set the treeview column title. If a -custom widget has been set (see the set_widget() -method), this value is ignored. - - - - - gtk.TreeViewColumn.get_title - - - get_title - - - - Returns : - the title of the column. - - - - The get_title() method returns the -value of the "title" property that contains the treeview column -title. - - - - - gtk.TreeViewColumn.set_expand - - - set_expand - expand - - - - expand : - if True the column expands - to take extra space if available. - - - - - This method is available in PyGTK 2.4 and above. - - - The set_expand() method sets the -"expand" property to the value of expand. If expand -is True the column expands to take available extra -space. This space is shared equally among all columns that have their -"expand" property set to True. If no column has this -option set, then the last column gets all extra space. By default, every -column is created with this False. - - - - - gtk.TreeViewColumn.get_expand - - - get_expand - - - - - Returns : - True, if the column - expands - - - - - This method is available in PyGTK 2.4 and above. - - - The get_expand() method returns the -value of the "expand" property. If "expand is True if the -column expands to take any available space. - - - - - gtk.TreeViewColumn.set_clickable - - - set_clickable - active - - - - active : - if True the treeview column -header can be clicked - - - - The set_clickable() method sets the -"clickable" property to the value of active. If -active is True the header can take -keyboard focus, and be clicked. - - - - - gtk.TreeViewColumn.get_clickable - - - get_clickable - - - - Returns : - True if the user can click -the column header. - - - - The get_clickable() method returns the -value of the "clickable" property. If "clickable" is True -the user can click on the header for the treeview column. - - - - - gtk.TreeViewColumn.set_widget - - - set_widget - widget - - - - widget : - a child gtk.Widget. - - - - The set_widget() method sets the widget -in the header to be widget. - - - - - gtk.TreeViewColumn.get_widget - - - get_widget - - - - Returns : - the gtk.Widget in the -column header, or None - - - - The get_widget() method returns the -gtk.Widget in -the button on the column header. If a custom widget has not been set using -the set_widget() -method None is returned. - - - - - gtk.TreeViewColumn.set_alignment - - - set_alignment - xalign - - - - xalign : - the horizontal alignment, in the range 0.0 to -1.0 inclusive. - - - - The set_alignment() method sets the -"alignment" property to the value of xalign. -xalign specifies the alignment of the title or custom -widget inside the column header. The alignment value specifies the fraction -of free space to the left of the widget. - - - - - gtk.TreeViewColumn.get_alignment - - - get_alignment - - - - Returns : - the current alignment of the treeview -column. - - - - The get_alignment() method returns the -value of the "alignment" property that contains the current horizontal -alignment of the treeview column. See the set_alignment() -method for more detail. - - - - - gtk.TreeViewColumn.set_reorderable - - - set_reorderable - reorderable - - - - reorderable : - if True, the column can be -reordered. - - - - The set_reorderable() method sets the -"reorderable" property to the value of reorderable. -If reorderable is True, the column -can be reordered by the end user dragging the header. - - - - - gtk.TreeViewColumn.get_reorderable - - - get_reorderable - - - - Returns : - True if the treeview column -can be reordered by the user. - - - - The get_reorderable() method returns -the value of the "reorderable" property. If "reorderable" is -True the treeview column can be reordered by the -user. - - - - - gtk.TreeViewColumn.set_sort_column_id - - - set_sort_column_id - sort_column_id - - - - sort_column_id : - the logical column ID of the model to sort -on or -1. - - - - The set_sort_column_id() method is a -convenience method that sets the column's sort column ID to the value -specified by sort_column_id (an integer value). The -treeview model sorts on the sort_column_id when this -treeview column is selected for sorting. This method also makes the treeview -column header clickable. If sort_column_id is -1 -sorting using the treeview column is disabled. - - This method sets up a number of callbacks that manage the -sorting of the tree model when the column header is clicked. These callbacks -provide toggling of the sort order, enabling the sort indicator and so -on. - - - - - gtk.TreeViewColumn.get_sort_column_id - - - get_sort_column_id - - - - Returns : - the current column ID for this column, or -1 if -this column can't be used for sorting. - - - - The get_sort_column_id() method returns -the logical column ID that the model sorts on when this column is selected -for sorting. See the set_sort_column_id() -method. - - - - - gtk.TreeViewColumn.set_sort_indicator - - - set_sort_indicator - setting - - - - setting : - if True display an indicator -that the column is sorted - - - - The set_sort_indicator() method sets -the "sort-indicator" property to the value of -setting. If setting is -True an arrow is displayed in the header button when the -column is sorted. Call the set_sort_order() -to change the direction of the arrow. - - - If the set_sort_column_id() -convenience method has been called the visibility of the sort indicator will -be managed automatically. See the set_sort_order() -method for more information. - - - - - - gtk.TreeViewColumn.get_sort_indicator - - - get_sort_indicator - - - - Returns : - True if the sort indicator -arrow is displayed - - - - The get_sort_indicator() method returns -the value of the "sort-indicator" property. If "sort-indicator" is -True an arrow is displayed in the header button when the -column is sorted. - - - - - gtk.TreeViewColumn.set_sort_order - - - set_sort_order - order - - - - order : - the sort order that the sort indicator should -indicate - - - - The set_sort_order() method set the "sort-order" property to the -value of order. The value of order must be either: -gtk.SORT_ASCENDING or -gtk.SORT_DESCENDING. This method changes the appearance -of the sort indicator. - - - This method does not actually sort the -model. Use the set_sort_column_id() -method if you want automatic sorting support. This method is primarily for -custom sorting behavior, and should be used in conjunction with the set_sort_column_id() -method to do that. For custom models, the mechanism will vary. - - - The sort indicator changes direction to indicate normal sort or -reverse sort. Of course, you must have the sort indicator enabled to see -anything when calling this method; see the set_sort_indicator() -method. - - - - - gtk.TreeViewColumn.get_sort_order - - - get_sort_order - - - - Returns : - the sort order the sort indicator is -indicating - - - - The get_sort_order() method returns the -value of the "sort-order" property that indicates in which direction the -treeview column is sorted. See the set_sort_order() -method for more detail. - - - - - gtk.TreeViewColumn.cell_set_cell_data - - - cell_set_cell_data - tree_model - iter - is_expander - is_expanded - - - - tree_model : - the gtk.TreeModel to -get the cell renderer's attributes from. - - - iter : - the gtk.TreeIter to -get the cell renderer's attributes from. - - - is_expander : - if True, the row has -children - - - is_expanded : - if True, the row has visible -children - - - - The cell_set_cell_data() method sets -the cell renderer attributes based on the specified -tree_model and iter. That is, -for every attribute mapping in the treeview column, it will get a value from -the set column in the iter, and use that value to set -the attribute on the cell renderer. If is_expander is -True the tree model row has children that may or may not -be displayed. If is_expanded is -True the tree model row has children that are -displayed. - - - - - gtk.TreeViewColumn.cell_get_size - - - cell_get_size - cell_area(0,0,0,0) - - - - cell_area : - an optional 4-tuple or 4-list or gtk.gdk.Rectangle - specifying the area allocated for a cell in the - column - - - Returns : - a tuple containing five values: a gtk.gdk.Rectangle -holding the area a cell in the column will be allocated; the x offset of the -cell; the y offset of the cell; the cell width; and, the cell -height - - - - The cell_get_size() method returns a -tuple containing: - - - - a gtk.gdk.Rectangle -holding the area a cell in the treeview column will be allocated. - - - the x offset of the cell relative to -cell_area. - - - the y offset of the cell relative to -cell_area. - - - the width of the cell. - - - the height of the cell. - - - - This method is used primarily by the gtk.TreeView. - - - - - gtk.TreeViewColumn.cell_is_visible - - - cell_is_visible - - - - Returns : - True, if any of the cells -packed into the treeview column are currently visible - - - - The cell_is_visible() method returns -True if any of the cells packed into the treeview column -are visible. For this to be meaningful, you must first initialize the cells -with the cell_set_cell_data() -method. - - - - - gtk.TreeViewColumn.focus_cell - - - focus_cell - cell - - - - cell : - a gtk.CellRenderer - - - - - This method is available in PyGTK 2.2 and above. - - - The focus_cell() method sets the -current keyboard focus to be at cell, if the column -contains 2 or more editable and activatable cells. - - - - - gtk.TreeViewColumn.cell_get_position - - - cell_get_position - cell_renderer - - - - cell_renderer : - a gtk.CellRenderer - - - Returns : - a 2-tuple containing the horizontal position - and size of a cell or None - - - - - This method is available in PyGTK 2.4 and above. - - - The cell_get_position() method returns -the horizontal position and size of the cell specified by -cell_renderer. If the cell is not found in the -column, None is returned. - - - - - gtk.TreeViewColumn.queue_resize - - - queue_resize - - - - This method is available in PyGTK 2.8 and above. - - - The queue_resize() method flags the - column, and the cell renderers added to this column, to have their sizes - renegotiated. - - - - - - - Signals - - - The "clicked" gtk.TreeViewColumn Signal - - - callback - treeviewcolumn - user_param1 - ... - - - - - treeviewcolumn : - the treeviewcolumn that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "clicked" signal is emitted when the user clicks on the -treeviewcolumn header button. - - - - - -
diff --git a/docs/reference/pygtk-gtkuimanager.xml b/docs/reference/pygtk-gtkuimanager.xml deleted file mode 100644 index 9648be5f..00000000 --- a/docs/reference/pygtk-gtkuimanager.xml +++ /dev/null @@ -1,1334 +0,0 @@ - - - - - gtk.UIManager - - construct menus and toolbars from an XML - description (new in PyGTK 2.4) - - - - Synopsis - - - gtk.UIManager - gobject.GObject - - gtk.UIManager - - - - set_add_tearoffs - add_tearoffs - - - get_add_tearoffs - - - - insert_action_group - action_group - pos - - - remove_action_group - action_group - - - get_action_groups - - - - get_accel_group - - - - get_widget - path - - - get_toplevels - types - - - get_action - path - - - add_ui_from_string - buffer - - - add_ui_from_file - filename - - - add_ui - merge_id - path - name - action - type - top - - - remove_ui - merge_id - - - get_ui - - - - ensure_update - - - - new_merge_id - - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.UIManager - - - - - - gtk.UIManager Properties - -
- - - - - - - - - "add-tearoffs" - Read-Write - - If True, regular menus have tearoff -menu items. Note that this only affects regular menus. Generated popup menus -never have tearoff menu items. Available in GTK+ 2.4 and -above. - - - - "ui" - Read-Write - An XML string describing the merged UI. - - - - - -
- -
- - - gtk.UIManager Signal Prototypes - - gobject.GObject Signal Prototypes - - - - "actions-changed" - - callback - uimanager - user_param1 - ... - - - - - "add-widget" - - callback - uimanager - widget - user_param1 - ... - - - - - "connect-proxy" - - callback - uimanager - action - widget - user_param1 - ... - - - - - "disconnect-proxy" - - callback - uimanager - action - widget - user_param1 - ... - - - - - "post-activate" - - callback - uimanager - action - user_param1 - ... - - - - - "pre-activate" - - callback - uimanager - action - user_param1 - ... - - - - - - - - - Description - - - This object is available in PyGTK 2.4 and above. - - - A gtk.UIManager -constructs a user interface (menus and toolbars) from one or more UI -definitions, which reference actions from one or more action groups. - - - UI Definitions - - The UI definitions are specified in an XML format which can be -roughly described by the following DTD. - - -<!ELEMENT ui (menubar|toolbar|popup|accelerator)* > -<!ELEMENT menubar (menuitem|separator|placeholder|menu)* > -<!ELEMENT menu (menuitem|separator|placeholder|menu)* > -<!ELEMENT popup (menuitem|separator|placeholder|menu)* > -<!ELEMENT toolbar (toolitem|separator|placeholder)* > -<!ELEMENT placeholder (menuitem|toolitem|separator|placeholder|menu)* > -<!ELEMENT menuitem EMPTY > -<!ELEMENT toolitem EMPTY > -<!ELEMENT separator EMPTY > -<!ELEMENT accelerator EMPTY > -<!ATTLIST menubar name #IMPLIED > -<!ATTLIST toolbar name #IMPLIED > -<!ATTLIST popup name #IMPLIED > -<!ATTLIST placeholder name #IMPLIED > -<!ATTLIST menu name #IMPLIED - action #REQUIRED - position (top|bot) #IMPLIED > -<!ATTLIST menuitem name #IMPLIED - action #REQUIRED - position (top|bot) #IMPLIED > -<!ATTLIST toolitem name #IMPLIED - action #REQUIRED - position (top|bot) #IMPLIED > -<!ATTLIST accelerator name #IMPLIED - action #REQUIRED > - - - There are some additional restrictions beyond those specified in -the DTD, e.g. every toolitem must have a toolbar in its ancestry and every -menuitem must have a menubar or popup in its ancestry. Since a GMarkup -parser is used to parse the UI description, it must not only be valid XML, -but valid GMarkup. If a name is not specified, it defaults to the action. If -an action is not specified either, the element name is used. - - - A UI definition - - -<ui> - <menubar> - <menu name="FileMenu" action="FileMenuAction"> - <menuitem name="New" action="New2Action" /> - <placeholder name="FileMenuAdditions" /> - </menu> - <menu name="JustifyMenu" action="JustifyMenuAction"> - <menuitem name="Left" action="justify-left"/> - <menuitem name="Centre" action="justify-center"/> - <menuitem name="Right" action="justify-right"/> - <menuitem name="Fill" action="justify-fill"/> - </menu> - </menubar> - <toolbar action="toolbar1"> - <placeholder name="JustifyToolItems"> - <separator/> - <toolitem name="Left" action="justify-left"/> - <toolitem name="Centre" action="justify-center"/> - <toolitem name="Right" action="justify-right"/> - <toolitem name="Fill" action="justify-fill"/> - <separator/> - </placeholder> - </toolbar> -</ui> - - - - The constructed widget hierarchy is very similar to the element -tree of the XML, with the exception that placeholders are merged into their -parents. The correspondence of XML elements to widgets should be almost -obvious: - - - - menubar - - a gtk.MenuBar - - - - toolbar - - a gtk.Toolbar - - - - popup - - a toplevel gtk.Menu - - - - menu - - a gtk.Menu - attached to a menuitem - - - - menuitem - - a gtk.MenuItem - subclass, the exact type depends on the action - - - - toolitem - - a gtk.ToolItem - subclass, the exact type depends on the action - - - - separator - - a gtk.SeparatorMenuItem - or gtk.SeparatorToolItem - - - - accelerator - - a keyboard accelerator - - - - - The "position" attribute determines where a constructed widget -is positioned with respect to its siblings in the partially constructed -tree. If it is "top", the widget is prepended, otherwise it is -appended. - - - - - UI Merging - - The most remarkable feature of gtk.UIManager is -that it can overlay a set of menuitems and toolitems over another one, and -demerge them later. - - Merging is done based on the name of the XML elements. Each -element is identified by a path which consists of the names of its -ancestors, separated by slashes. For example, the menuitem named "Left" in -the example above has the path -/ui/menubar/JustifyMenu/Left and the toolitem with the -same name has path -/ui/toolbar1/JustifyToolItems/Left. - - - - - Accelerators - - Every action has an accelerator path. Accelerators are installed -together with menuitem proxies, but they can also be explicitly added with -<accelerator> elements in the UI definition. This makes it possible to -have accelerators for actions even if they have no visible proxies. - - - - - Smart Separators - - The separators created by gtk.UIManager are -"smart", i.e. they do not show up in the UI unless they end up between two -visible menu or tool items. Separators which are located at the very -beginning or end of the menu or toolbar containing them, or multiple -separators next to each other, are hidden. This is a useful feature, since -the merging of UI elements from multiple sources can make it hard or -impossible to determine in advance whether a separator will end up in such -an unfortunate position. - - - - - Empty Menus - - Submenus pose similar problems to separators in connection with -merging. It is impossible to know in advance whether they will end up empty -after merging. gtk.UIManager -offers two ways to treat empty submenus: - - - - make them disappear by hiding the menu item they're - attached to - - - add an insensitive "Empty" item - - - - The behavior is chosen based on the "is_important" property of -the action to which the submenu is associated. - - - - - - - Constructor - - - gtk.UIManager - - - - - Returns : - a new ui manager object. - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new gtk.UIManager -object. - - - - - Methods - - - gtk.UIManager.set_add_tearoffs - - - set_add_tearoffs - add_tearoffs - - - - add_tearoffs : - True if tearoff menu items - are added to regular menus - - - - - This method is available in PyGTK 2.4 and above. - - - The add_tearoffs() method sets the -"add_tearoffs" property to the value of -add_tearoffs. If add_tearoffs -is True regular menus generated by this gtk.UIManager -will have tearoff menu items. - - Note that this only affects regular menus. Generated popup menus -never have tearoff menu items. - - - - - gtk.UIManager.get_add_tearoffs - - - get_add_tearoffs - - - - - Returns : - True if tearoff menu items - are added - - - - - This method is available in PyGTK 2.4 and above. - - - The get_add_tearoffs() method returns -the value of the "add-tearoffs" property. If "add-tearoffs" is -True regular menus generated will have tearoff menu -items. - - - - - gtk.UIManager.insert_action_group - - - insert_action_group - action_group - pos - - - - action_group : - the action group to be - inserted - - - pos : - the position at which the group will be - inserted. If pos is negative - action_group is inserted at the end of the - list. - - - - - This method is available in PyGTK 2.4 and above. - - - The insert_action_group() method -inserts the gtk.ActionGroup -specified by action_group into the list of associated -action groups at the position specified by -pos. Actions in earlier groups hide actions with the -same name in later groups. - - - - - gtk.UIManager.remove_action_group - - - remove_action_group - action_group - - - - action_group : - the action group to be - removed - - - - - This method is available in PyGTK 2.4 and above. - - - The remove_action_group() method -removes the gtk.ActionGroup -specified by action_group from the list of -associated action groups. - - - - - gtk.UIManager.get_action_groups - - - get_action_groups - - - - - Returns : - a list of associated action - groups. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_action_groups() method returns -the list of associated gtk.ActionGroup -objects. - - - - - gtk.UIManager.get_accel_group - - - get_accel_group - - - - - Returns : - the gtk.AccelGroup. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_accel_group() method returns -the associated gtk.AccelGroup. - - - - - gtk.UIManager.get_widget - - - get_widget - path - - - - path : - a path - - - Returns : - the widget found by following the path, or - None if no widget was - found. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_widget() method looks up a -widget by following the path specified by path. The -path consists of the names specified in the XML description of the UI. -separated by '/'. Elements that don't have a name or action attribute in -the XML (e.g. <popup>) can be addressed by their XML element name -(e.g. "popup"). The root element ("/ui") can be omitted in the path. - - - - - gtk.UIManager.get_toplevels - - - get_toplevels - types - - - - types : - specifies the types of toplevel widgets to - include. Allowed types are - gtk.UI_MANAGER_MENUBAR, - gtk.UI_MANAGER_TOOLBAR and - gtk.UI_MANAGER_POPUP. - - - Returns : - a list of all toplevel widgets of the requested - types. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_toplevels() method returns a -list of all toplevel widgets of the types specified by -types. - - - - - gtk.UIManager.get_action - - - get_action - path - - - - path : - a path - - - Returns : - the action whose proxy widget is found by - following the path, or None if no widget was - found. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_action() method looks up a -gtk.Action by -following a path. See the get_widget() -method for more information about paths. - - - - - gtk.UIManager.add_ui_from_string - - - add_ui_from_string - buffer - - - - buffer : - the string to parse - - - Returns : - The merge id for the merged UI. The merge id - can be used to unmerge the UI with the remove_ui() - method. - - - - - This method is available in PyGTK 2.4 and above. - - - The add_ui_from_string() method parses -the string specified by buffer that contains a UI definition and merges it with the current -contents of the ui manager. An enclosing <ui> element is added if it -is missing. - - This method raise the GError exception if an error occurs during -the parsing of the string. - - - - - gtk.UIManager.add_ui_from_file - - - add_ui_from_file - filename - - - - filename : - the name of the file to parse - - - Returns : - The merge id for the merged UI. The merge id - can be used to unmerge the UI with the gtk.UIManager.remove_ui() - method. - - - - - This method is available in PyGTK 2.4 and above. - - - The add_ui_from_file() method parses -the file specified by filename that contains a UI definition and merges it with the current -contents of the ui manager. - - This method raise the GError exception if an error occurs during -the parsing of the file. - - - - - gtk.UIManager.add_ui - - - add_ui - merge_id - path - name - action - type - top - - - - merge_id : - the merge id for the merged UI, see new_merge_id() - - - path : - a path where the element should be - added - - - name : - the name for the added UI - element - - - action : - the name of the action to be proxied, or - None to add a separator - - - type : - the type of UI element to - add. - - - top : - if True, the UI element is - added before its siblings, otherwise it is added after its - siblings. - - - - - This method is available in PyGTK 2.4 and above. - - - The add_ui() method adds a UI element -of the type specified by type to the current contents -of the ui manager at the location specified by -path. Note that path must not start with "/ui" though -"ui" is acceptable. For example "/menubar" or "ui/menubar" is acceptable but -"/ui/menubar" is not. type must be one of: - - - - gtk.UI_MANAGER_AUTO - - The type of the UI element (menuitem, toolitem or -separator) is set according to the context. - - - - gtk.UI_MANAGER_MENUBAR - - A menubar. - - - - gtk.UI_MANAGER_MENU - - A menu. - - - - gtk.UI_MANAGER_TOOLBAR - - A toolbar. - - - - gtk.UI_MANAGER_PLACEHOLDER - - A placeholder. - - - - gtk.UI_MANAGER_POPUP - - A popup menu. - - - - gtk.UI_MANAGER_MENUITEM - - A menuitem. - - - - gtk.UI_MANAGER_TOOLITEM - - A toolitem. - - - - gtk.UI_MANAGER_SEPARATOR - - A separator. - - - - gtk.UI_MANAGER_ACCELERATOR - - An accelerator. - - - - - - - - - - gtk.UIManager.remove_ui - - - remove_ui - merge_id - - - - merge_id : - a merge id - - - - - This method is available in PyGTK 2.4 and above. - - - The remove_ui() method unmerges the -part of the ui manager content identified by -merge_id. - - - - - gtk.UIManager.get_ui - - - get_ui - - - - - Returns : - A string containing an XML representation of - the merged UI. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_ui() method creates a UI definition of the merged UI. - - - - - gtk.UIManager.ensure_update - - - ensure_update - - - - - This method is available in PyGTK 2.4 and above. - - - The ensure_update() method makes sure -that all pending updates to the UI have been completed. This may -occasionally be necessary, since gtk.UIManager -updates the UI in an idle function. A typical example where this method is -useful is to enforce that the menubar and toolbar have been added to the -main window before showing it: - - - - window.add(vbox) - merge.connect("add_widget", add_widget, vbox) - merge.add_ui_from_file("my-menus") - merge.add_ui_from_file("my-toolbars") - merge.ensure_update() - window.show() - - - - - - - gtk.UIManager.new_merge_id - - - new_merge_id - - - - - Returns : - an unused merge id. - - - - - This method is available in PyGTK 2.4 and above. - - - The new_merge_id() method returns an -unused merge id, suitable for use with the add_ui() -method. The returned merge ids are monotonically increasing integer -values. - - - - - - - Signals - - - The "actions-changed" gtk.UIManager Signal - - - callback - uimanager - user_param1 - ... - - - - - uimanager : - the uimanager that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.4 and above. - - - The "actions-changed" signal is emitted when the set of actions -changes. - - - - - The "add-widget" gtk.UIManager Signal - - - callback - uimanager - widget - user_param1 - ... - - - - - uimanager : - the uimanager that received the -signal - - - widget : - the added widget - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.4 and above. - - - The "add-widget" signal is emitted for each generated menubar -and toolbar. The added widget is specified by -widget. It is not emitted for generated popup menus, -which can be retrieved by the get_widget() -method. - - - - - The "connect-proxy" gtk.UIManager Signal - - - callback - uimanager - action - widget - user_param1 - ... - - - - - uimanager : - the uimanager that received the -signal - - - action : - the action - - - widget : - the proxy widget - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.4 and above. - - - The "connect-proxy" signal is emitted after connecting the proxy -widget specified by widget to the gtk.Action specified -by action in the group. This is intended for simple -customizations for which a custom action class would be too clumsy, -e.g. showing tooltips for menuitems in the statusbar. - - - - - The "disconnect-proxy" gtk.UIManager Signal - - - callback - uimanager - action - widget - user_param1 - ... - - - - - uimanager : - the uimanager that received the -signal - - - action : - the action - - - widget : - the proxy widget - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.4 and above. - - - The "disconnect-proxy" signal is emitted when -widget is disconnected from -action. - - - - - The "post-activate" gtk.UIManager Signal - - - callback - uimanager - action - user_param1 - ... - - - - - uimanager : - the uimanager that received the -signal - - - action : - the action - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.4 and above. - - - The "post-activate" signal is emitted after -action is activated. This signal is intended for -applications to get notification after any action is activated. - - - - - The "pre-activate" gtk.UIManager Signal - - - callback - uimanager - action - user_param1 - ... - - - - - uimanager : - the uimanager that received the -signal - - - action : - the action - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.4 and above. - - - The "pre-activate" signal is emitted before -action is activated. This signal is intended for -applications to get notification before any action is activated. - - - - - -
diff --git a/docs/reference/pygtk-gtkvbox.xml b/docs/reference/pygtk-gtkvbox.xml deleted file mode 100644 index 113f46ea..00000000 --- a/docs/reference/pygtk-gtkvbox.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - gtk.VBox - a vertical container box - - - - Synopsis - - - gtk.VBox - gtk.Box - - gtk.VBox - homogeneous - False - spacing - 0 - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Box - +-- gtk.VBox - - - - - - gtk.VBox Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Box Properties - - - - - gtk.VBox Style Properties - - gtk.Widget Style Properties - - - - - gtk.VBox Child Properties - - gtk.Box Child Properties - - - - - gtk.VBox Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - Description - - A gtk.VBox is a -container subclassed from gtk.Box that organizes -its child widgets into a single column. The gtk.Box methods are -used to manage the arrangement, spacing, height, and alignment of the gtk.VBox child widgets -though all are allocated the same width. - - - - - Constructor - - - gtk.VBox - homogeneous - False - spacing - 0 - - - - homogeneous : - if True all child widgets are given equal space -allocations. - - - spacing : - the additional vertical space between child -widgets in pixels. - - - Returns : - a new gtk.VBox -widget - - - - Creates a new gtk.VBox widget with -the spacing between child widgets specified by -spacing. If homogeneous is True -all child widgets are allocated the same space. - - - - diff --git a/docs/reference/pygtk-gtkvbuttonbox.xml b/docs/reference/pygtk-gtkvbuttonbox.xml deleted file mode 100644 index 73f77969..00000000 --- a/docs/reference/pygtk-gtkvbuttonbox.xml +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - gtk.VButtonBox - a container for arranging buttons vertically. - - - - Synopsis - - - gtk.VButtonBox - gtk.ButtonBox - - gtk.VButtonBox - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Box - +-- gtk.ButtonBox - +-- gtk.VButtonBox - - - - - - gtk.VButtonBox Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Box Properties - gtk.ButtonBox Properties - - - - - gtk.VButtonBox Style Properties - - gtk.Widget Style Properties - gtk.ButtonBox Style Properties - - - - - gtk.VButtonBox Child Properties - - gtk.Box Child Properties - gtk.ButtonBox Child Properties - - - - - gtk.VButtonBox Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - Description - - A gtk.VButtonBox -is a container subclassed from gtk.ButtonBox -that is optimized for the vertical layout of buttons. The gtk.VButtonBox -helps provide a consistent layout of buttons in an application by supplying -default values of spacing, padding and layout style (see the gtk.ButtonBox -reference for more detail). Buttons are packed into a gtk.VButtonBox -using the gtk.Container.add()) -method. The pack_start() -and pack_end() -methods can also be used but they work just like the gtk.Container.add()) -method i.e. they pack the button in a way that depends on the current layout -style and on whether the button has had the gtk.ButtonBox.set_child_secondary() -method called on it. The spacing between buttons can be set with the gtk.Box.set_spacing() -method. The arrangement and layout of the buttons can be changed with the -gtk.ButtonBox.set_layout() -method. - - - - - Constructor - - - gtk.VButtonBox - - - - Returns : - a new gtk.VButtonBox -widget - - - - Creates a new gtk.VButtonBox -widget - - - - diff --git a/docs/reference/pygtk-gtkviewport.xml b/docs/reference/pygtk-gtkviewport.xml deleted file mode 100644 index e6d79f96..00000000 --- a/docs/reference/pygtk-gtkviewport.xml +++ /dev/null @@ -1,425 +0,0 @@ - - - - - - gtk.Viewport - a widget displaying a portion of a larger -widget. - - - - Synopsis - - - gtk.Viewport - gtk.Bin - - gtk.Viewport - hadjustment - None - vadjustment - None - - - get_hadjustment - - - get_vadjustment - - - set_hadjustment - adjustment - - - set_vadjustment - adjustment - - - set_shadow_type - type - - - get_shadow_type - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Viewport - - - - - - gtk.Viewport Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - -
- - - - - - - - - "hadjustment" - Read-Write - The gtk.Adjustment -that determines the values of the horizontal position for this -viewport. - - - - "shadow-type" - Read-Write - The type of shadowed box around the viewport: -gtk.SHADOW_NONE, gtk.SHADOW_IN, -gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN -or gtk.SHADOW_ETCHED_OUT - - - - "vadjustment" - Read-Write - The gtk.Adjustment -that determines the values of the vertical position for this -viewport. - - - - - -
- -
- - - gtk.Viewport Style Properties - - gtk.Widget Style Properties - - - - - gtk.Viewport Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - "set-scroll-adjustments" - - callback - viewport - hadjustment - vadjustment - user_param1 - ... - - - - - - - - - Description - - A gtk.Viewport -widget provides a view into a portion of a larger widget. A gtk.Viewport is -usually used to provide adjustment capability for a widget to be used in a -gtk.ScrolledWindow. -For example, a label widget doesn't have any adjustments (does not support -the "set-scroll-adjustments" signal) and would need a viewport when added to -a gtk.ScrolledWindow -to make the scrollbars functional. See the gtk.ScrolledWindow.add_with_viewport() -method for more information. - - - - - Constructor - - - gtk.Viewport - hadjustment - None - vadjustment - None - - - - hadjustment : - a horizontal adjustment. - - - vadjustment : - a vertical adjustment. - - - Returns : - a new gtk.Viewport -widget - - - - Creates a new gtk.Viewport with -the horizontal and vertical adjustments specified by -hadjustment and vadjustment -respectively. If hadjustment or -vadjustment is None a new -adjustment will be created. - - - - - Methods - - - gtk.Viewport.get_hadjustment - - - get_hadjustment - - - - Returns : - the horizontal adjustment - - - - The get_hadjustment() method returns -the value of the "hadjustment" property that contains the horizontal gtk.Adjustment -of the viewport. - - - - - gtk.Viewport.get_vadjustment - - - get_vadjustment - - - - Returns : - the vertical adjustment - - - - The get_vadjustment() method returns -the value of the "vadjustment" property that contains the vertical gtk.Adjustment -of the viewport. - - - - - gtk.Viewport.set_hadjustment - - - set_hadjustment - adjustment - - - - adjustment : - a gtk.Adjustment. - - - - The set_hadjustment() method sets the -"hadjustment" property to the value of adjustment -that becomes the horizontal adjustment of the viewport. - - - - - gtk.Viewport.set_vadjustment - - - set_vadjustment - adjustment - - - - adjustment : - a gtk.Adjustment. - - - - The set_vadjustment() method sets the -"vadjustment" property to the value of adjustment -that becomes the vertical adjustment of the viewport. - - - - - gtk.Viewport.set_shadow_type - - - set_shadow_type - type - - - - type : - the new shadow type. - - - - The set_shadow_type() method sets the -"shadow-type" property to the value of type. The -value of type must be one of: - - - - gtk.SHADOW_NONE - - - gtk.SHADOW_IN - - - gtk.SHADOW_OUT - - - gtk.SHADOW_ETCHED_IN - - - gtk.SHADOW_ETCHED_OUT - - - - - - - - - gtk.Viewport.get_shadow_type - - - get_shadow_type - - - - Returns : - the shadow type - - - - The get_shadow_type() method returns -the value of the "shadow-type" property that contains the shadow type of the -gtk.Viewport. See -the set_shadow_type() -method for more information. - - - - - - - Signals - - - The "set-scroll-adjustments" gtk.Viewport Signal - - - callback - viewport - hadjustment - vadjustment - user_param1 - ... - - - - - viewport : - the viewport that received the -signal - - - hadjustment : - the horizontal gtk.Adjustment - - - vadjustment : - the vertical gtk.Adjustment - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "set-scroll-adjustments" signal is emitted when one or both -of the horizontal and vertical gtk.Adjustment -objects is changed. - - - - - -
diff --git a/docs/reference/pygtk-gtkvpaned.xml b/docs/reference/pygtk-gtkvpaned.xml deleted file mode 100644 index 9fde4ae5..00000000 --- a/docs/reference/pygtk-gtkvpaned.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - gtk.VPaned - A container with two panes arranged vertically. - - - - Synopsis - - - gtk.VPaned - gtk.Paned - - gtk.VPaned - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Paned - +-- gtk.VPaned - - - - - - gtk.VPaned Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - gtk.Paned Properties - - - - - gtk.VPaned Style Properties - - gtk.Widget Style Properties - gtk.Paned Style Properties - - - - - gtk.VPaned Child Properties - - gtk.Paned Child Properties - - - - - gtk.VPaned Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - gtk.Paned Signal Prototypes - - - - Description - - The gtk.VPaned widget is -a container widget subclassed from gtk.Paned with two -child widgets arranged vertically. The division between the two child -widgets can be adjusted by the user by dragging a handle. See the gtk.Paned description -for more details. - - - - - Constructor - - - gtk.VPaned - - - - Returns : - a new gtk.VPaned -widget - - - - Creates a new gtk.HPaned -widget. - - - - diff --git a/docs/reference/pygtk-gtkvruler.xml b/docs/reference/pygtk-gtkvruler.xml deleted file mode 100644 index d842aa67..00000000 --- a/docs/reference/pygtk-gtkvruler.xml +++ /dev/null @@ -1,108 +0,0 @@ - - - - - - gtk.VRuler - a vertical ruler. - - - - Synopsis - - - gtk.VRuler - gtk.Ruler - - gtk.VRuler - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Ruler - +-- gtk.VRuler - - - - - - gtk.VRuler Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Ruler Properties - - - - - gtk.VRuler Style Properties - - gtk.Widget Style Properties - - - - - gtk.VRuler Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - - - - Description - - - This widget is considered too specialized or little-used for -PyGTK, and will in the future be moved to some other package. If your -application needs this widget, feel free to use it, as the widget does work -and is useful in some applications; it's just not of general interest. -However, it will eventually move out of the PyGTK distribution. - - - The gtk.VRuler widget is -arranged vertically creating a ruler that is used in conjunction with 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 (the -default), gtk.INCHES and -gtk.CENTIMETERS. See the gtk.Ruler description -for more information on the methods that are used to manage a gtk.VRuler. - - - - - Constructor - - - gtk.VRuler - - - - Returns : - a new gtk.VRuler -widget - - - - Creates a new gtk.VRuler -widget. - - - - diff --git a/docs/reference/pygtk-gtkvscale.xml b/docs/reference/pygtk-gtkvscale.xml deleted file mode 100644 index 2ace18e9..00000000 --- a/docs/reference/pygtk-gtkvscale.xml +++ /dev/null @@ -1,119 +0,0 @@ - - - - - - gtk.VScale - a vertical slider widget used to select a value from a -range. - - - - Synopsis - - - gtk.VScale - gtk.Scale - - gtk.VScale - adjustment - None - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Range - +-- gtk.Scale - +-- gtk.VScale - - - - - - gtk.VScale Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Range Properties - gtk.Scale Properties - - - - - gtk.VScale Style Properties - - gtk.Widget Style Properties - gtk.Range Style Properties - gtk.Scale Style Properties - - - - - gtk.VScale Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Range Signal Prototypes - gtk.Scale Signal Prototypes - - - - Description - - The gtk.VScale is -subclassed from gtk.Scale to provide -a widget that allows a user to select a value using a horizontal slider. See -the gtk.Scale -description for more information on the methods available to manage a gtk.VScale. - - - - - Constructor - - - gtk.VScale - adjustment - None - - - - adjustment : - a gtk.Adjustment -or None - - - Returns : - a new gtk.VScale - widget - - - - Creates a new gtk.VScale widget -and associates a gtk.Adjustment -specified by adjustment with it. The default value of -adjustment is None which creates -the vscale with no gtk.Adjustment. - - - - diff --git a/docs/reference/pygtk-gtkvscrollbar.xml b/docs/reference/pygtk-gtkvscrollbar.xml deleted file mode 100644 index e58b2e4c..00000000 --- a/docs/reference/pygtk-gtkvscrollbar.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - gtk.VScrollbar - a vertical scrollbar - - - - Synopsis - - - gtk.VScrollbar - gtk.Scrollbar - - gtk.VScrollbar - adjustment - None - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Range - +-- gtk.Scrollbar - +-- gtk.VScrollbar - - - - - - gtk.VScrollbar Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Range Properties - - - - - gtk.VScrollbar Style Properties - - gtk.Widget Style Properties - gtk.Range Style Properties - gtk.Scrollbar Style Properties - - - - - gtk.VScrollbar Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Range Signal Prototypes - - - - Description - - The gtk.VScrollbar -widget is subclassed from gtk.Scrollbar to -provide a horizontal scrollbar. See the gtk.Scrollbar -reference for details on the methods available for managing vertical -scrollbars. A gtk.Adjustment -may be specified for the scrollbar at creation (or is created automatically -if None is specified) to handle the adjustment of the -scrollbar. See the gtk.Adjustment -method for more details. - - - - - Constructor - - - gtk.VScrollbar - adjustment - None - - - - adjustment : - a gtk.Adjustment -object or None - - - Returns : - a new gtk.VScrollbar -widget - - - - Creates a new gtk.VScrollbar -with an associated gtk.Adjustment -specified by adjustment. If -adjustment is None or missing a -new gtk.Adjustment -object will be created and associated with the scrollbar. - - - - diff --git a/docs/reference/pygtk-gtkvseparator.xml b/docs/reference/pygtk-gtkvseparator.xml deleted file mode 100644 index 717dbe73..00000000 --- a/docs/reference/pygtk-gtkvseparator.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - - - - gtk.VSeparator - a vertical separator. - - - - Synopsis - - - gtk.VSeparator - gtk.Separator - - gtk.VSeparator - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Separator - +-- gtk.VSeparator - - - - - - gtk.VSeparator Properties - - gtk.Object Properties - gtk.Widget Properties - - - - - gtk.VSeparator Style Properties - - gtk.Widget Style Properties - - - - - gtk.VSeparator Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - - - - Description - - The gtk.VSeparator -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. - - - - - Constructor - - - gtk.VSeparator - - - - Returns : - a new gtk.VSeparator -widget - - - - Creates a new gtk.VSeparator -widget. - - - - diff --git a/docs/reference/pygtk-gtkwidget.xml b/docs/reference/pygtk-gtkwidget.xml deleted file mode 100644 index 546e2b00..00000000 --- a/docs/reference/pygtk-gtkwidget.xml +++ /dev/null @@ -1,9737 +0,0 @@ - - - - - - gtk.Widget - the base class for all PyGTK -widgets - - - - Synopsis - - - gtk.Widget - gtk.Object - - get_allocation - - - - drag_check_threshold - start_x - start_y - current_x - current_y - - - drag_get_data - context - target - time - 0L - - - drag_highlight - - - - drag_unhighlight - - - - drag_dest_set - flags - targets - actions - - - drag_dest_set_proxy - proxy_window - protocol - use_coordinates - - - drag_dest_unset - - - - drag_dest_find_target - context - target_list - - - drag_dest_get_target_list - - - - drag_dest_set_target_list - target_list - - - drag_dest_add_image_targets - - - - drag_dest_add_text_targets - - - - drag_dest_add_uri_targets - - - - drag_source_set - start_button_mask - targets - actions - - - drag_source_unset - - - - drag_source_set_icon - colormap - pixmap - mask - - - drag_source_set_icon_pixbuf - pixbuf - - - drag_source_set_icon_stock - stock_id - - - drag_source_set_icon_name - icon_name - - - drag_source_add_text_targets - - - - drag_source_add_image_targets - - - - drag_source_add_uri_targets - - - - drag_begin - targets - actions - button - event - - - grab_add - - - - grab_remove - - - - rc_get_style - - - - selection_owner_set - selection - time - 0L - - - selection_add_target - selection - target - info - - - selection_add_targets - selection - targets - - - selection_clear_targets - selection - - - selection_convert - selection - target - time - 0L - - - selection_remove_all - - - - destroy - - - - unparent - - - - show - - - - show_now - - - - hide - - - - show_all - - - - hide_all - - - - set_no_show_all - no_show_all - - - get_no_show_all - - - - map - - - - unmap - - - - realize - - - - unrealize - - - - queue_draw - - - - queue_draw_area - x - y - width - height - - - queue_resize - - - - queue_resize_no_redraw - - - - size_request - - - - size_allocate - allocation - - - get_child_requisition - requisition - - - add_accelerator - accel_signal - accel_group - accel_key - accel_mods - accel_flags - - - remove_accelerator - accel_group - accel_key - accel_mods - - - set_accel_path - accel_path - accel_group - - - can_activate_accel - signal_id - - - - - - mnemonic_activate - group_cycling - - - event - event - - - send_expose - event - - - activate - - - - set_scroll_adjustments - hadjustment - vadjustment - - - reparent - new_parent - - - intersect - area - - - region_intersect - region - - - freeze_child_notify - - - - child_notify - child_property - - - thaw_child_notify - - - - is_focus - - - - grab_focus - - - - grab_default - - - - set_name - name - - - get_name - - - - set_state - state - - - set_sensitive - sensitive - - - set_app_paintable - app_paintable - - - set_double_buffered - double_buffered - - - set_redraw_on_allocate - redraw_on_allocate - - - set_parent - parent - - - set_parent_window - parent_window - - - set_child_visible - is_visible - - - get_child_visible - - - - get_parent - - - - get_parent_window - - - - child_focus - direction - - - set_size_request - width - height - - - get_size_request - - - set_events - events - - - add_events - events - - - set_extension_events - mode - - - get_extension_events - - - - get_toplevel - - - - get_ancestor - widget_type - - - get_colormap - - - - get_visual - - - - get_screen - - - - has_screen - - - - get_display - - - - get_root_window - - - - get_settings - - - - get_clipboard - selection - - - get_accessible - - - - set_colormap - colormap - - - get_events - - - - get_pointer - - - - is_ancestor - ancestor - - - translate_coordinates - dest_widget - src_x - src_y - - - hide_on_delete - - - - set_style - style - - - ensure_style - - - - get_style - - - - modify_style - style - - - get_modifier_style - - - - modify_fg - state - color - - - modify_bg - state - color - - - modify_text - state - color - - - modify_base - state - color - - - modify_font - font_desc - - - create_pango_context - - - - get_pango_context - - - - create_pango_layout - text - - - render_icon - stock_id - size - detailNone - - - set_composite_name - name - - - get_composite_name - - - - reset_rc_styles - - - - style_get_property - property_name - - - - - - set_direction - dir - - - get_direction - - - - shape_combine_mask - shape_mask - offset_x - offset_y - - - reset_shapes - - - - path - - - - class_path - - - - list_mnemonic_labels - - - - add_mnemonic_label - label - - - remove_mnemonic_label - label - - - menu_get_for_attach_widget - - - - set_activate_signal - signal_name - - - set_scroll_adjustments_signal - signal_name - - - get_action - - - - drag_dest_set_track_motion - track_motion - - - drag_dest_get_track_motion - - - - is_composited - - - - input_shape_combine_mask - shape_mask - offset_x - offset_y - - - get_activate_signal - - - - - -Functions - - - gtk.widget_push_colormap - cmap - - gtk.widget_push_composite_child - - - gtk.widget_pop_composite_child - - - gtk.widget_pop_colormap - - - gtk.widget_get_default_style - - - gtk.widget_set_default_colormap - colormap - - gtk.widget_get_default_colormap - - - gtk.widget_get_default_visual - - - gtk.widget_set_default_direction - dir - - gtk.widget_get_default_direction - - - gtk.widget_class_find_style_property - widget - property_name - - gtk.widget_class_list_style_properties - widget - - gtk.widget_class_install_style_property - widget - pspec - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - - - - - - gtk.Widget Properties - - gtk.Object Properties - -
- - - - - - - - - "app-paintable" - Read-Write - If True, the application will paint -directly on the widget - - - - "can-default" - Read-Write - If True, the widget can be the -default widget - - - - "can-focus" - Read-Write - If True, the widget can accept the -input focus - - - - "composite-child" - Read-Write - If True, the widget is part of a -composite widget - - - - "events" - Read-Write - The event mask that decides what kind of gtk.gdk.Event this -widget gets. - - - - "extension-events" - Read-Write - The mask that decides what kind of extension events -this widget gets. - - - - "has-default" - Read-Write - If True, the widget is the default -widget - - - - "has-focus" - Read-Write - If True, the widget has the input -focus - - - - "height-request" - Read-Write - The height request of the widget, or -1 if natural -request should be used. - - - - "is-focus" - Read-Write - If True, the widget is the focus -widget within the toplevel - - - - "name" - Read-Write - The name of the widget - - - - "no-show-all" - Read-Write - - If True show_all() -should not affect this widget. Available in GTK+ 2.4 and above. - - - - "parent" - Read-Write - The parent widget of this widget. Must be a gtk.Container -widget. - - - - "receives-default" - Read-Write - If True, the widget will receive the -default action when it is focused. - - - - "sensitive" - Read-Write - If True, the widget responds to -input - - - - "style" - Read-Write - The style of the widget, which contains information -about how it will look (colors etc). - - - - "visible" - Read-Write - If True, the widget is -visible - - - - "width-request" - Read-Write - The width request of the widget, or -1 if natural -request should be used. - - - - - -
- -
- - - gtk.Widget Style Properties - -
- - - - - - - - - "cursor-aspect-ratio" - Read - The aspect ratio with which to draw the insertion -cursor - - - - "cursor-color" - Read - The gtk.gdk.Color with -which to draw insertion cursor - - - - "draw-border" - Read - The "draw-border" property defines the size of areas - outside the widget's allocation to draw. This property is - available in GTK+ 2.8 and above. - - - - "focus-line-pattern" - Read-Write - The dash pattern used to draw the focus -indicator. - - - - "focus-line-width" - Read-Write - The width, in pixels, of the focus indicator -line. - - - - "focus-padding" - Read-Write - The width, in pixels, between the focus indicator and -the widget 'box'. - - - - "interior-focus" - Read - If True, draw the focus indicator -inside widgets. - - - - "link-color" - Read - The "link-color" property defines the color of - unvisited links. This property is available in GTK+ 2.10 and - above. - - - - "scroll-arrow-hlength" - Read - The "scroll-arrow-hlength" property defines the length - of horizontal scroll arrows. This property is available in - GTK+ 2.10 and above. - - - - "scroll-arrow-vlength" - Read - The "scroll-arrow-vlength" property defines the length - of vertical scroll arrows. This property is available in GTK+ - 2.10 and above. - - - - "secondary-cursor-color" - Read - The gtk.gdk.Color with -which to draw the secondary insertion cursor when editing mixed -right-to-left and left-to-right text. - - - - "separator-height" - Read - The "separator-height" property defines the height of - separators. This property only takes effect if - "wide-separators" is True. This property - is available in GTK+ 2.10 and above. - - - - "separator-width" - Read - The "separator-width" property defines the width of - separators. This property only takes effect if - "wide-separators" is True. This property - is available in GTK+ 2.10 and above. - - - - "visited-link-color" - Read - The "visited-link-color" property defines the color of - visited links. This property is available in GTK+ 2.10 and - above. - - - - "wide-separators" - Read - The "wide-separators" property defines whether - separators have configurable width and should be drawn using a - box instead of a line. This property is available in GTK+ - 2.10 and above. - - - - - -
- -
- - - Attributes - -
- - - - - - - - - - "allocation" - Read-Write - The gtk.gdk.Rectangle -specifying the widget's space allocation. This attribute is writeable in -PyGTK 2.4. - - - - "name" - Read - The name of the widget - - - - "parent" - Read - The parent widget of this widget. Must be a gtk.Container -widget. - - - - "saved_state" - Read - The widget's saved state. - - - - "state" - Read - The widget state: gtk.STATE_NORMAL, -gtk.STATE_ACTIVE, gtk.STATE_PRELIGHT, -gtk.STATE_SELECTED or -gtk.STATE_INSENSITIVE - - - "style" - Read - The style of the widget. - - - - "window" - Read-Write - The gtk.gdk.Window used -by the widget. This attribute is writeable in PyGTK 2.4. - - - - - -
- -
- - - gtk.Widget Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - - - - "accel-closures-changed" - - callback - widget - user_param1 - ... - - - - - "button-press-event" - - callback - widget - event - user_param1 - ... - - - - - "button-release-event" - - callback - widget - signal_id - user_param1 - ... - - - - - "can-activate-accel" - - callback - widget - event - user_param1 - ... - - - - - "child-notify" - - callback - widget - child_property - user_param1 - ... - - - - - "composited-changed - - callback - widget - user_param1 - ... - - - - - "client-event" - - callback - widget - event - user_param1 - ... - - - - - "configure-event" - - callback - widget - event - user_param1 - ... - - - - - "delete-event" - - callback - widget - event - user_param1 - ... - - - - - "destroy-event" - - callback - widget - event - user_param1 - ... - - - - - "direction-changed" - - callback - widget - direction - user_param1 - ... - - - - - "drag-begin" - - callback - widget - drag_context - user_param1 - ... - - - - - "drag-data-delete" - - callback - widget - drag_context - user_param1 - ... - - - - - "drag-data-get" - - callback - widget - drag_context - selection_data - info - timestamp - user_param1 - ... - - - - - "drag-data-received" - - callback - widget - drag_context - x - y - selection_data - info - timestamp - user_param1 - ... - - - - - "drag-drop" - - callback - widget - drag_context - x - y - timestamp - user_param1 - ... - - - - - "drag-end" - - callback - widget - drag_context - user_param1 - ... - - - - - "drag-leave" - - callback - widget - drag_context - timestamp - user_param1 - ... - - - - - "drag-motion" - - callback - widget - drag_context - x - y - timestamp - user_param1 - ... - - - - - "enter-notify-event" - - callback - widget - event - user_param1 - ... - - - - - "event" - - callback - widget - event - user_param1 - ... - - - - - "event-after" - - callback - widget - event - user_param1 - ... - - - - - "expose-event" - - callback - widget - event - user_param1 - ... - - - - - "focus" - - callback - widget - direction - user_param1 - ... - - - - - "focus-in-event" - - callback - widget - event - user_param1 - ... - - - - - "focus-out-event" - - callback - widget - event - user_param1 - ... - - - - - "grab-broken-event - - callback - widget - event - user_param1 - ... - - - - - "grab-focus" - - callback - widget - user_param1 - ... - - - - - "grab-notify" - - callback - widget - was_grabbed - user_param1 - ... - - - - - "hide" - - callback - widget - user_param1 - ... - - - - - "hierarchy-changed" - - callback - widget - previous_toplevel - user_param1 - ... - - - - - "key-press-event" - - callback - widget - event - user_param1 - ... - - - - - "key-release-event" - - callback - widget - event - user_param1 - ... - - - - - "leave-notify-event" - - callback - widget - event - user_param1 - ... - - - - - "map" - - callback - widget - user_param1 - ... - - - - - "map-event" - - callback - widget - event - user_param1 - ... - - - - - "mnemonic-activate" - - callback - widget - group_cycling - user_param1 - ... - - - - - "motion-notify-event" - - callback - widget - event - user_param1 - ... - - - - - "no-expose-event" - - callback - widget - event - user_param1 - ... - - - - - "parent-set" - - callback - widget - old_parent - user_param1 - ... - - - - - "popup-menu" - - callback - widget - user_param1 - ... - - - - - "property-notify-event" - - callback - widget - event - user_param1 - ... - - - - - "proximity-in-event" - - callback - widget - event - user_param1 - ... - - - - - "proximity-out-event" - - callback - widget - event - user_param1 - ... - - - - - "realize" - - callback - widget - user_param1 - ... - - - - - "screen-changed" - - callback - widget - screen - user_param1 - ... - - - - - "scroll-event" - - callback - widget - event - user_param1 - ... - - - - - "selection-clear-event" - - callback - widget - event - user_param1 - ... - - - - - "selection-get" - - callback - widget - selection_data - info - timestamp - user_param1 - ... - - - - - "selection-notify-event" - - callback - widget - event - user_param1 - ... - - - - - "selection-received" - - callback - widget - selection_data - timestamp - user_param1 - ... - - - - - "selection-request-event" - - callback - widget - event - user_param1 - ... - - - - - "show" - - callback - widget - user_param1 - ... - - - - - "show-help" - - callback - widget - help_type - user_param1 - ... - - - - - "size-allocate" - - callback - widget - allocation - user_param1 - ... - - - - - "size-request" - - callback - widget - requisition - user_param1 - ... - - - - - "state-changed" - - callback - widget - state - user_param1 - ... - - - - - "style-set" - - callback - widget - previous_style - user_param1 - ... - - - - - "unmap" - - callback - widget - user_param1 - ... - - - - - "unmap-event" - - callback - widget - event - user_param1 - ... - - - - - "unrealize" - - callback - widget - user_param1 - ... - - - - - "visibility-notify-event" - - callback - widget - event - user_param1 - ... - - - - - "window-state-event" - - callback - widget - event - user_param1 - ... - - - - - - - - - Description - - The gtk.Widget class is -the base class for all PyGTK widgets. It provides the common set of method and signals for the widgets including: - - - - drag and drop setting and management methods - - - selection methods - - - methods to realize, map and show widgets - - - methods to manage size allocation and requests - - - methods to initiate widget redrawing - - - methods to deal with the widget's place in the widget hierarchy - - - event management methods - - - methods to modify the style settings - - - methods to access the default resources - - - - gtk.Widget -introduces style properties - these are basically object properties that are -stored not on the object, but in the style object associated to the -widget. Style properties are set in resource files. This mechanism is used -for configuring such things as the location of the scrollbar arrows through -the theme, giving theme authors more control over the look of applications -without the need to write a theme engine in C. - - Use the gtk.widget_class_install_style_property() - function to install style properties for a widget class, the gtk.widget_class_find_style_property() - function or the gtk.widget_class_list_style_properties() - function to get information about existing style properties and the - style_get_property() - method to obtain the value of a style property. - - - - - Methods - - - gtk.Widget.get_allocation - - - get_allocation - - - - - Returns : - a gtk.gdk.Rectangle - - - - The get_allocation() method returns a -gtk.gdk.Rectangle containing the bounds of the widget's allocation. - - - - - gtk.Widget.drag_check_threshold - - - drag_check_threshold - start_x - start_y - current_x - current_y - - - - start_x : - the X coordinate of start of -drag - - - start_y : - the Y coordinate of start of -drag - - - current_x : - the current X coordinate - - - current_y : - the current Y coordinate - - - Returns : - True if the drag threshold -has been passed. - - - - The check_drag_threshold() method checks to see if a mouse drag -starting at (start_x, start_y) -and ending at (current_x, -current_y) has passed the+ drag threshhold distance, -and thus should trigger the beginning of a drag-and-drop operation. - - - - - gtk.Widget.drag_get_data - - - drag_get_data - context - target - time - 0L - - - - context : - a gtk.gdk.DragContext - - - target : - an atom - - - time : - a timestamp or 0L to specify the current -time - - - - The drag_get_data() method gets the -data associated with a drag specified by drag_context -and target. When the data is received or the -retrieval fails, a "drag_data_received" signal will be emitted. Failure of -the retrieval is indicated by the length field of the gtk.SelectionData -being negative. However, when the drag_get_data() -method is called implicitly because gtk.DRAG_DEFAULT_DROP -was set, the widget will not receive notification of failed drops. - - - - - gtk.Widget.drag_highlight - - - drag_highlight - - - - The drag_highlight() method draws a -highlight around a widget. This will attach handlers to "expose_event" and -"draw", so the highlight will continue to be displayed until the drag_unhighlight() -method is called. - - - - - gtk.Widget.drag_unhighlight - - - drag_unhighlight - - - - The drag_unhighlight() method removes -the highlight that was set by the drag_highlight() -method. - - - - - gtk.Widget.drag_dest_set - - - drag_dest_set - flags - targets - actions - - - - flags : - the flags that specify what actions should be -taken 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 sequence of target -tuples - - - actions : - a bitmask of possible actions for a drop onto -this widget. - - - - The drag_dest_set() method sets up a -widget as a potential drag drop destination. The value of -flags is a combination of the . - - targets is a sequence (list or tuple) of -3-tuples that contain information about the targets. The target data contains -a string representing the drag type, target flags (a combination of -gtk.TARGET_SAME_APP and -gtk.TARGET_SAME_WIDGET or neither) and an application -assigned integer ID used for identification purposes. - - The value of actions is one of the . - - - - - gtk.Widget.drag_dest_set_proxy - - - drag_dest_set_proxy - proxy_window - protocol - use_coordinates - - - - proxy_window : - the gtk.gdk.Window to -forward drag events to - - - protocol : - the drag protocol that -proxy_window accepts - - - use_coordinates : - if True, send the same -coordinates to the destination, because it is an embedded -subwindow. - - - - The drag_dest_set_proxy() method sets a -proxy gtk.gdk.Window -specified by proxy_window that drag events are -forwarded to on behalf of the widget. The value of -protocol is one of the . - - If use_coordinates is -True, the same coordinates are sent to the destination -because the widget's an embedded subwindow. - - - - - gtk.Widget.drag_dest_unset - - - drag_dest_unset - - - - The drag_dest_unset() method clears the -information about a drop destination set with the drag_dest_set() -method. The widget will no longer receive notification of drags. - - - - - gtk.Widget.drag_dest_find_target - - - drag_dest_find_target - context - target_list - - - - context : - the drag context - - - target_list : - a list of droppable targets, or -None. - - - Returns : - the first target that the source offers and the -dest can accept, or None - - - - The dest_find_target() method looks for -a match between the targets in the gtk.gdk.DragContext -specified by context and the -target_list, returning the first matching target, or -NONE if no match is found. The list specified by -target_list should usually be the return value from -the drag_dest_get_target_list() -method, but some widgets may have different valid targets for different -parts of the widget; in that case, they will have to implement a -"drag-motion" handler that passes the correct target list to this method. -target_list is a sequence (list or tuple) of 3-tuples -that contain information about the targets. The target data contains a -string representing the drag type, target flags (a combination of -gtk.TARGET_SAME_APP and -gtk.TARGET_SAME_WIDGET or neither) and an application -assigned integer ID used for identification purposes. - - - - - gtk.Widget.drag_dest_get_target_list - - - drag_dest_get_target_list - - - - - Returns : - the list of targets or None -if no targets are set - - - - The drag_dest_get_target_list() method -returns the list of targets this widget can accept from drag-and-drop. The -returned value is a sequence (list or tuple) of 3-tuples that contain -information about the targets. The target data contains a string -representing the drag type, target flags (a combination of -gtk.TARGET_SAME_APP and -gtk.TARGET_SAME_WIDGET or neither) and an application -assigned integer ID used for identification purposes. - - - - - gtk.Widget.drag_dest_set_target_list - - - drag_dest_set_target_list - target_list - - - - target_list : - a list of droppable targets, or -None - - - - The drag_dest_set_target_list() method -sets the target types (that this widget can accept from drag-and-drop) to -the list specified by target_list. The widget must -first be made into a drag destination with the drag_dest_set() -method. target_list is a sequence (list or tuple) of -3-tuples that contain information about the targets. The target data contains -a string representing the drag type, target flags (a combination of -gtk.TARGET_SAME_APP and -gtk.TARGET_SAME_WIDGET or neither) and an application -assigned integer ID used for identification purposes. - - - - - gtk.Widget.drag_dest_add_image_targets - - - drag_dest_add_image_targets - - - - - This method is available in PyGTK 2.6 and above. - - - The drag_dest_add_image_targets() -method adds the image targets supported by gtk.SelectionData -to the target list of the widget's drag destination using an info value of -0. - - - - - gtk.Widget.drag_dest_add_text_targets - - - drag_dest_add_text_targets - - - - - This method is available in PyGTK 2.6 and above. - - - The drag_dest_add_text_targets() method -adds the text targets supported by gtk.SelectionData -to the target list of the widget's drag destination using an info value of -0. - - - - - gtk.Widget.drag_dest_add_uri_targets - - - drag_dest_add_uri_targets - - - - - This method is available in PyGTK 2.6 and above. - - - The drag_dest_add_uri_targets() method adds the URI targets supported by gtk.SelectionData -to the target list of the widget's drag destination using an info value of -0. - - - - - gtk.Widget.drag_source_set - - - drag_source_set - start_button_mask - targets - actions - - - - start_button_mask : - the bitmask of buttons that can start the drag - - - targets : - a list of targets that the drag will support - - - actions : - the possible actions for a drag from this widget. - - - - The drag_source_set() method sets up -the widget to start a drag operation when the user clicks and drags on the -widget. The widget must have a window. The value of start_button_mask is a -combination of the . - - targets is a sequence (list or tuple) of -3-tuples that contain information about the targets. The target data contains -a string representing the drag type, target flags (a combination of -gtk.TARGET_SAME_APP and -gtk.TARGET_SAME_WIDGET or neither) and an application -assigned integer ID used for identification purposes. - - The value of actions is one of the : - - - - - gtk.Widget.drag_source_unset - - - drag_source_unset - - - - The drag_source_unset() method unsets -the drag source for the widget that was set up by the drag_source_set() -method. - - - - - gtk.Widget.drag_source_set_icon - - - drag_source_set_icon - colormap - pixmap - mask - None - - - - colormap : - the colormap of the icon - - - pixmap : - the image data for the -icon - - - mask : - the transparency mask for an -image. - - - - The drag_source_set_icon() method sets -the icon that will be used for drags from the widget using the specified -pixmap and mask. -colormap specifies the colormap to be used to create -the icon. The drag_source_set_icon_pixbuf() -method should be used instead of this method. - - - - - gtk.Widget.drag_source_set_icon_pixbuf - - - drag_source_set_icon_pixbuf - pixbuf - - - - pixbuf : - the gtk.gdk.Pixbuf for -the drag icon - - - - The drag_source_set_icon_pixbuf() -method sets the icon that will be used for drags from the widget from the -gtk.gdk.Pixbuf -specified by pixbuf. - - - - - gtk.Widget.drag_source_set_icon_stock - - - drag_source_set_icon_stock - stock_id - - - - stock_id : - the ID of the stock icon to -use - - - - The drag_source_set_icon_stock() method -sets the icon that will be used for drags from a particular source using the -stock icon specified by stock_id. - - - - - gtk.Widget.drag_source_set_icon_name - - - drag_source_set_icon_name - icon_name - - - - icon_name : - the name of a themed icon -use - - - - - This method is available in PyGTK 2.10 and above. - - - The drag_source_set_icon_name() method -sets the icon that will be used for drags from a particular source using the -themed icon specified by icon_name. See the gtk.IconTheme -docs for more information. - - - - - gtk.Widget.drag_source_get_target_list - - - drag_source_get_target_list - - - - - Returns : - the list of targets or None -if no targets are set - - - - - This method is available in PyGTK 2.6 and above. - - - The drag_source_get_target_list() method -returns the list of targets this widget can provide for drag-and-drop. The -returned value is a sequence (list or tuple) of 3-tuples that contain -information about the targets. The target data contains a string -representing the drag type, target flags (a combination of -gtk.TARGET_SAME_APP and -gtk.TARGET_SAME_WIDGET or neither) and an application -assigned integer ID used for identification purposes. - - - - - gtk.Widget.drag_source_set_target_list - - - drag_source_set_target_list - target_list - - - - target_list : - a list of droppable targets, or -None - - - - - This method is available in PyGTK 2.6 and above. - - - The drag_source_set_target_list() -method sets the target types (that this widget can provide for -drag-and-drop) to the list specified by -target_list. The widget must first be made into a -drag source with the drag_source_set() -method. target_list is a sequence (list or tuple) of -3-tuples that contain information about the targets. The target data -contains a string representing the drag type, target flags (a combination of -gtk.TARGET_SAME_APP and -gtk.TARGET_SAME_WIDGET or neither) and an application -assigned integer ID used for identification purposes. - - - - - gtk.Widget.drag_source_add_text_targets - - - drag_source_add_text_targets - - - - - This method is available in PyGTK 2.6 and above. - - - The drag_source_add_text_targets() -method adds the text targets supported by gtk.SelectionData -to the target list of the widget's drag source using an info value of 0. If -you need another value for info, use the gtk.target_list_add_text_targets() -function and the drag_source_set_target_list() -method. - - - - - gtk.Widget.drag_source_add_image_targets - - - drag_source_add_image_targets - - - - - This method is available in PyGTK 2.10 and above. - - - The drag_source_add_image_targets() -method adds the image targets supported by gtk.SelectionData -to the target list of the widget's drag source using an info value of 0. If -you need another value for info, use the gtk.target_list_add_image_targets() -function and the drag_source_set_target_list() -method. - - - - - gtk.Widget.drag_source_add_uri_targets - - - drag_source_add_uri_targets - - - - - This method is available in PyGTK 2.10 and above. - - - The drag_source_add_uri_targets() -method adds the URI targets supported by gtk.SelectionData -to the target list of the widget's drag source using an info value of 0. If -you need another value for info, use the gtk.target_list_add_image_targets() function -and the drag_source_set_target_list() -method. - - - - - gtk.Widget.drag_begin - - - drag_begin - targets - actions - button - event - - - - targets : - the list of targets supported by the widget -drag - - - actions : - the allowed drag operations for the -drag - - - button : - the button the user pressed to start the -drag - - - event : - the gtk.gdk.Event that -triggered the drag - - - Returns : - a new gtk.gdk.DragContext - - - - The drag_begin() method starts a drag -on the source side. The method only needs to be used when the application is -starting drags itself, and is not needed when the drag_source_set() -method is used. targets is a sequence (list or tuple) -of 3-tuples that contain information about the targets. The target data -contains a string representing the drag type, target flags (a combination of -gtk.TARGET_SAME_APP and -gtk.TARGET_SAME_WIDGET or neither) and an application -assigned integer ID used for identification purposes. - - The value of actions is one of the . - - button is the button that the user -pressed to start the drag operation. event is the -gtk.gdk.Event -that triggered the start of the drag operation (the button press). This -method returns the gtk.gdk.DragContext -for the drag operation. - - - - - gtk.Widget.grab_add - - - grab_add - - - - The grab_add() method makes the widget -the current grabbed widget. This means that interaction with other widgets -in the same application is blocked and mouse as well as keyboard events are -delivered to this widget. - - - - - gtk.Widget.grab_remove - - - grab_remove - - - - The grab_remove() method removes the -grab from the widget. You have to pair calls to the grab_add() -and grab_remove() methods. - - - - - gtk.Widget.rc_get_style - - - rc_get_style - - - - - Returns : - the resulting style. - - - - The rc_get_style() method finds all -matching RC styles for the widget, composites them together, and then -creates a gtk.Style -representing the composite appearance. - - - - - gtk.Widget.selection_owner_set - - - selection_owner_set - selection - time - 0L - - - - selection : - an atom representing the selection to -claim - - - time : - a timestamp or 0L to use the current -time - - - Returns : - True if -successful - - - - The selection_owner_set() method claims -the ownership of the selection specified by selection -for the widget. - - - - - gtk.Widget.selection_add_target - - - selection_add_target - selection - target - info - - - - selection : - an atom representing the -selection - - - target : - an atom representing the target for the -selection - - - info : - an integer ID that will be passed to the -application - - - - The selection_add_target() method adds -the specified target to the list of supported targets -for the specified selection. -info is an integer ID that will be passed to the -application when the "selection-get" handler is called. - - - - - gtk.Widget.selection_add_targets - - - selection_add_targets - selection - targets - - - - selection : - an atom representing the -selection - - - targets : - a sequence of 3-tuples containing target -data - - - - The selection_add_targets() method adds -the list of targets (specified by targets) to the -list of supported targets for the specified -selection. targets is a sequence (Python tuple or -list) of 3-tuples that contain information about the targets. The target data -contains a string representing the drag type, target flags (a combination of -gtk.TARGET_SAME_APP and -gtk.TARGET_SAME_WIDGET or neither) and an application -assigned integer ID used for identification purposes. - - - - - gtk.Widget.selection_clear_targets - - - selection_clear_targets - selection - - - - selection : - an atom representing a -selection - - - - The selection_clear_targets() method -remove all targets registered for the specified -selection for the widget. - - - - - gtk.Widget.selection_convert - - - selection_convert - selection - target - time - 0L - - - - selection : - an atom specifying the -selection - - - target : - an atom specifying the target -type - - - time : - a timestamp for the request or 0L to use the -current time - - - Returns : - True if the request -succeeded - - - - The selection_convert() method requests -the contents of the specified selection for the -specified target type. When received, a -"selection_received" signal will be generated. - - - - - gtk.Widget.selection_remove_all - - - selection_remove_all - - - - The selection_remove_all() method -removes all handlers and unsets ownership of all selections for a widget. -This method is called when widget is being destroyed and not usually by -applications. - - - - - gtk.Widget.destroy - - - destroy - - - - The destroy() method destroys the -widget. When a widget is destroyed, it will break any references it holds to -other objects. If the widget is inside a container, the widget will be -removed from the container. If the widget is a toplevel (derived from gtk.Window), it will -be removed from the list of toplevels, and the reference -PyGTK holds to it will be removed. Removing a widget from -its container or the list of toplevels results in the widget being -finalized. In most cases, only toplevel widgets (windows) require explicit -destruction, because when you destroy a toplevel its children will be -destroyed as well. - - - - - gtk.Widget.unparent - - - unparent - - - - The unparent() method is only for use -in widget implementations. It should be called by implementations of the -remove method on a gtk.Container, to -dissociate a child widget from the container. - - - - - gtk.Widget.show - - - show - - - - The show() method causes a widget to be -displayed as soon as practical. Any widget that isn't shown will not appear -on the screen. If you want to show all the widgets in a container, it's -easier to call the show_all() -on the container, instead of individually showing the widgets. Of course you -have to show the containers containing a widget, as well as the widget -itself, before it will appear onscreen. When a toplevel container is shown, -it is immediately realized and mapped; other shown widgets are realized and -mapped when their toplevel container is realized and mapped. - - - - - gtk.Widget.show_now - - - show_now - - - - The show_now() method is the same as -the show() -method except if the widget is an unmapped toplevel widget (i.e. a gtk.Window that has -not yet been shown), it enters the main loop and waits for the window to -actually be mapped. - - Because the main loop is running, anything can happen during -this method. - - - - - - gtk.Widget.hide - - - hide - - - - The hide() method reverses the effects -of the show() -method, causing the widget to be hidden (removed from the display) by -unmapping it. - - - - - gtk.Widget.show_all - - - show_all - - - - The show_all() method recursively shows -the widget, and any child widgets (if the widget is a container). - - - - - gtk.Widget.hide_all - - - hide_all - - - - The hide_all() method recursively hides -the widget and its child widgets (if any). - - - - - gtk.Widget.set_no_show_all - - - set_no_show_all - no_show_all - - - - no_show_all : - the new value for the "no_show_all" - property - - - - - This method is available in PyGTK 2.4 and above. - - - The set_no_show_all() method sets the -"no_show_all" property to the value of -no_show_all. If no_show_all is -True calls to the show_all() -and hide_all() -methods will not affect this widget. - - This method is mostly for use in constructing widget hierarchies -with externally controlled visibility, see the gtk.UIManager -reference for mote information. - - - - - gtk.Widget.get_no_show_all - - - get_no_show_all - - - - - Returns : - the current value of the "no_show_all" - property. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_no_show_all() method returns -the current value of the "no_show_all" property. If "no-show-all" is -True calls to the show_all() -and hide_all() -methods will not affect the widget. - - - - - gtk.Widget.map - - - map - - - - The map() method maps the widget -(causes it to be displayed). This method will also cause the widget to be -realized if it is not currently realized. This method is usually not used by -applications. - - - - - gtk.Widget.unmap - - - unmap - - - - The unmap() method unmaps the widget -(causes it to be removed from the display). This method is not usually used -by applications. - - - - - gtk.Widget.realize - - - realize - - - - The realize() method creates the -resources associated with a widget. For example, the widget gtk.gdk.Window will -be created when the widget is realized. Normally realization happens -implicitly; if you show a widget and all its parent containers, then the -widget will be realized and mapped automatically. Realizing a widget -requires all the widget's parent widgets to be realized; calling the -realize() method realizes the widget's parents in -addition to the widget itself. A widget must be inside a toplevel window -when you realize it. This method is primarily used in widget -implementations, and not in applications. Many times when you think you -might need it, a better approach is to connect to a signal that will be -called after the widget is realized automatically, such as "expose_event". -Or simply using the gobject.connect_after() -method to add a handler to the "realize" signal. - - - - - gtk.Widget.unrealize - - - unrealize - - - - The unrealize() method frees all -resources associated with the widget, such as the gtk.gdk.Window. - - - - - gtk.Widget.queue_draw - - - queue_draw - - - - The queue_draw() method is equivalent -to calling the queue_draw_area() -method for the entire area of a widget. - - - - - gtk.Widget.queue_draw_area - - - queue_draw_area - x - y - width - height - - - - x : - the x coordinate of upper-left corner of -rectangle to redraw - - - y : - the y coordinate of upper-left corner of -rectangle to redraw - - - width : - the width of rectangle to -redraw - - - height : - the height of rectangle to -redraw - - - - The queue_draw_area() method -invalidates the rectangular area of the widget specified by -x, y, -width and height by calling -the gtk.gdk.Window.invalidate_rect() -method on the widget's window and all its child windows. Once the main loop -becomes idle (after the current batch of events has been processed, -roughly), the window will receive expose events for the union of all regions -that have been invalidated. - - Normally you would only use this method in widget -implementations. But you might also use it, or the gtk.gdk.Window.invalidate_rect() -method directly, to schedule a redraw of a gtk.DrawingArea -or some portion thereof. Frequently you can just call the gtk.gdk.Window.invalidate_rect() -method instead of this method. This method will invalidate only a single -window, instead of the widget and all its children. The advantage of adding -to the invalidated region compared to simply drawing immediately is -efficiency; using an invalid region ensures that you only have to redraw one -time. - - - - - gtk.Widget.queue_resize - - - queue_resize - - - - The queue_resize() method schedules the -widget to have its size renegotiated. This method should be called when a -widget for some reason has a new size request. For example, when you change -the text in a gtk.Label, a resize -is queued to ensure there's enough space for the new text. - - - - - gtk.Widget.queue_resize_no_redraw - - - queue_resize_no_redraw - - - - - This method is available in PyGTK 2.4 and above. - - - The queue_resize_no_redraw() method -works like the queue_resize() -method, except that the widget is not invalidated. - - - - - gtk.Widget.size_request - - - size_request - - - - - Returns : - a tuple containing the widget's required width -and height. - - - - - The size_request() method returns the -preferred size of a widget as a tuple containing its required width and -height. This method is typically used when implementing a gtk.Container -subclass to arrange the container's child widgets and decide what size -allocations to give them with the size_allocate() -method. Obtaining a size request requires that the widget be associated with -a screen, because font information may be needed. - - Also remember that the size request is not necessarily the size -a widget will actually be allocated. See the get_child_requisition() -method. - - - - - gtk.Widget.size_allocate - - - size_allocate - allocation - - - - allocation : - the position and size to be allocated to the -widget - - - - The size_allocate() method sets a size -allocation for the widget using the gtk.gdk.Rectangle -specified by allocation. This method is only used by -gtk.Container -subclasses, to assign a size and position to their child widgets. - - - - - gtk.Widget.get_child_requisition - - - get_child_requisition - requisition - - - - Returns : - a tuple containing the required size of the -widget - - - - The get_child_requisition() method -returns a tuple containing the widget requisition width and height. This -method is only for use in widget container implementations since it obtains -the widget requisition directly. By comparison the size_request() -method actually computes the size request and fills in the widget -requisition before returning. Because this method does not recalculate the -size request, it can only be used when you know that the widget requisition -is up-to-date, i.e. the size_request() -method has been called since the last time a resize was queued. In general, -only container implementations have this information; applications should -use the size_request() -method instead. - - - - - gtk.Widget.add_accelerator - - - add_accelerator - accel_signal - accel_group - accel_key - accel_mods - accel_flags - - - - accel_signal : - the widget signal to emit on accelerator -activation - - - accel_group : - the accel group for this widget, added to its -toplevel - - - accel_key : - the keyval of the accelerator e.g. -ord('q') - - - accel_mods : - the modifier key combination of the -accelerator - - - accel_flags : - the flag accelerators, e.g. -gtk.ACCEL_VISIBLE - - - - The add_accelerator() method installs - an accelerator for the widget in accel_group - that causes accel_signal to be emitted if the - accelerator is activated. The accelerator key and modifiers are - specified by accel_key and - accel_mods - respectively. accel_mods should be a - combination of the . accel_flags - is a combination of gtk.ACCEL_VISIBLE and - gtk.ACCEL_LOCKED (see the ). The - accel_group needs to be added to the widget's - toplevel via the gtk.Window.add_accel_group() - method and the signal specified by accel_signal - must have signal flags that include the - gobject.SIGNAL_ACTION flag (see the GObject Signal Flag - Constants for more information). Accelerators added through - this method are not user changeable during runtime. If you want to - support accelerators that can be changed by the user, the set_accel_path() - or gtk.MenuItem.set_accel_path() - methods instead. - - - - - gtk.Widget.remove_accelerator - - - remove_accelerator - accel_group - accel_key - accel_mods - - - - accel_group : - the accel group for this -widget - - - accel_key : - the keyval of the -accelerator - - - accel_mods : - the modifier key combination of the -accelerator - - - Returns : - True if the accelerator was -removed - - - - The remove_accelerator() method removes -the accelerator specified by accel_key and -accel_mods from the widget's accelerator group -(specified by accel_group), previously installed with -the add_accelerator() -method. - - - - - gtk.Widget.set_accel_path - - - set_accel_path - accel_path - accel_group - - - - accel_path : - the path used to look up the the -accelerator - - - accel_group : - a gtk.AccelGroup. - - - - The set_accel_path() method sets an -accelerator (using the key bindings defined in -accel_path) in the accelerator group specified by -accel_group. This method removes any accelerators for -any accelerator group installed by previous calls to the -set_accel_path() method. Associating accelerators -with paths allows them to be modified by the user and the modifications to -be saved for future use. This method is a low level method that would most -likely be used by a menu creation system like gtk.ItemFactory. -If you use gtk.ItemFactory, -setting up accelerator paths will be done automatically. Even when you you -aren't using gtk.ItemFactory, -if you only want to set up accelerators on menu items the gtk.MenuItem.set_accel_path() -method provides a somewhat more convenient interface. - - - - - gtk.Widget.can_activate_accel - - - can_activate_accel - signal_id - - - - signal_id : - the ID of an installed signal - - - Returns : - True if the accelerator can - be activated. - - - - - This method is available in PyGTK 2.4 and above. - - - The can_activate_accel() method returns -True if an accelerator that activates the signal -specified by signal_id can currently be activated. -This is done by emitting the "can-activate-accel" -signal. If the signal isn't overridden by a handler or in a derived widget, -then the default check is that the widget must be sensitive, and the widget -and all its ancestors mapped. - - - - - - - gtk.Widget.mnemonic_activate - - - mnemonic_activate - group_cycling - - - - group_cycling : - if True grab the focus instead of activating -the widget - - - Returns : - True if the signal was -handled - - - - The mnemonic_activate() method emits -the "mnemonic-activate" signal on the widget and returns -True if the signal was handled. -group_cycling is True if the focus -is being shifted to the widget and False if the widget -should be activated. - - - - - gtk.Widget.event - - - event - event - - - - event : - a gtk.gdk.Event - - - Returns : - True if the event was -handled - - - - The event() method emits the event -signals on a widget (those signals should never be emitted without using -this method to do so). If you want to synthesize an event though, don't use -this method; instead, use the gtk.main_do_event() -function so the event will behave as if it were in the event queue. Don't -synthesize expose events; instead, use the gtk.gdk.Window.invalidate_rect() -method to invalidate a region of the window. - - - - - gtk.Widget.send_expose - - - send_expose - event - - - - event : - an expose gtk.gdk.Event - - - Returns : - True if the event was -handled - - - - The send_expose() method emits an -expose event signal on a widget. This method is usually used when -propagating an expose event to a child NO_WINDOW widget, -and that is normally done using the gtk.Container.propagate_expose() -method. If you want to force an area of a window to be redrawn, use the -gtk.gdk.Window.invalidate_rect() -method. To cause the redraw to be done immediately, follow that call with a -call to the gtk.gdk.Window.process_updates() -method. - - - - - gtk.Widget.activate - - - activate - - - - - Returns : - True if the widget was -activatable - - - - The activate() method emits the -"activate" signal on the widget that activates it (if it can be activated). -Activation is what happens when you press Enter on a widget -during key navigation; clicking a button, selecting a menu item, etc. If the -widget isn't activatable, the method returns -False. - - - - - gtk.Widget.set_scroll_adjustments - - - set_scroll_adjustments - hadjustment - vadjustment - - - - hadjustment : - an adjustment for horizontal scrolling, or -None - - - vadjustment : - an adjustment for vertical scrolling, or -None - - - Returns : - True if the widget supports -scrolling - - - - The set_scroll_adjustments() method -sets the horizontal and vertical scroll adjustments specified by -hadjustment and vadjustment -respectively and returns True. If the widget doesn't -support scrolling this method returns False. Widgets that -don't support scrolling can be scrolled by placing them in a gtk.Viewport, -which does support scrolling. This method emits the "set-scroll-adjustments" -signal on the widget. - - - - - gtk.Widget.reparent - - - reparent - new_parent - - - - new_parent : - a gtk.Container to -move the widget into - - - - The reparent() method moves a widget -from one gtk.Container to -another. - - - - - gtk.Widget.intersect - - - intersect - area - intersection - - - - area : - a rectangle - - - Returns : - a rectangle of the intersection of the widget -and area or -None - - - - The intersect() method computes the -intersection of a the widget's area and area, and -returns the intersection in a gtk.gdk.Rectangle. -This method returns False if there is no -intersection. - - - - - gtk.Widget.region_intersect - - - region_intersect - region - - - - region : - a gtk.gdk.Region, - in the same coordinate system as the widget.allocation. That is, - relative to the widget.window for NO_WINDOW - widgets; relative to the parent window of the widget.window for - widgets with their own window. - - - Returns : - a newly allocated gtk.gdk.Region - holding the intersection of the widget and region. The coordinates of - the returned region are relative to widget.window for NO_WINDOW - widgets, and relative to the parent window of widget.window for - widgets with their own window. - - - - - This method is available in PyGTK 2.10 and above. - - - The region_intersect() method computes - and returns as a gtk.gdk.Region - the intersection of a the widget's area and the gtk.gdk.Region - specified by region. Since the result may be - empty, use the gtk.gdk.Region.empty() - method to check. - - - - - gtk.Widget.freeze_child_notify - - - freeze_child_notify - - - - The freeze_child_notify() method -freezes the child notify queue that is used to notify child widgets of child -property changes. - - - - - gtk.Widget.child_notify - - - child_notify - child_property - - - - child_property : - a child property - - - - The child_notify() method adds a child -property to the widget's child notify queue that is used to notify child -widgets of a change to a child property. - - - - - gtk.Widget.thaw_child_notify - - - thaw_child_notify - - - - The thaw_child_notify() method reverses -the effect of a previous call to the freeze_child_notify() -method. - - - - - gtk.Widget.is_focus - - - is_focus - - - - - Returns : - True if the widget is the -focus widget. - - - - The is_focus() method returns -True if the widget is the focus widget within its -toplevel. This does not mean that the gtk.HAS_FOCUS flag -is necessarily set; gtk.HAS_FOCUS will only be set if the -toplevel widget additionally has the global input focus. - - - - - gtk.Widget.grab_focus - - - grab_focus - - - - The grab_focus() method causes the -widget to have the keyboard focus for it's enclosing gtk.Window. The -widget must be a focusable widget, such as a gtk.Entry. Also, the -widget must have the gtk.CAN_FOCUS flag set. - - - - - gtk.Widget.grab_default - - - grab_default - - - - The grab_default() method causes the -widget to become the default widget. The widget must have the -gtk.CAN_DEFAULT flag set by calling the gtk.Object.set_flags() -method. The default widget is activated when the user presses -Enter in a window. - - - - - gtk.Widget.set_name - - - set_name - name - - - - name : - the name for the widget - - - - The set_name() method sets the "name" -property of the widget to the string specified by -name. Widgets can be named, which allows you to refer -to them in a GTK resource file. - - - - - gtk.Widget.get_name - - - get_name - - - - - Returns : - the name of the widget - - - - The get_name() method returns the value -of the "name" property that contains the name of the widget or -None if the widget has no name. - - - - - gtk.Widget.set_state - - - set_state - state - - - - state : - the new state for the -widget - - - - The set_state() method sets the state of the widget to the value -specified by state. The value of state must be one of the . - - Usually you should set the state using wrapper methods such as -set_sensitive(). - - - - - gtk.Widget.set_sensitive - - - set_sensitive - sensitive - - - - sensitive : - if True make the widget -sensitive - - - - The set_sensitive() method sets the -"sensitive" property of the widget to the value specified by -sensitive. If sensitive is -True the widget will be sensitive and the user can -interact with it. An insensitive widget appears "grayed out" and the user -can't interact with it. Insensitive widgets are known as "inactive", -"disabled", or "ghosted" in some other toolkits. - - - - - gtk.Widget.set_app_paintable - - - set_app_paintable - app_paintable - - - - app_paintable : - if True the application will -paint directly on the widget - - - - The set_app_paintable() method sets the -"app-paintable" property to the value of -app_paintable. If -app_paintable is True the -application will paint directly on the widget. - - - - - gtk.Widget.set_double_buffered - - - set_double_buffered - double_buffered - - - - double_buffered : - if True double-buffer a -widget - - - - The set_double_buffered() method sets -the widget's flags according to the value of -double_buffered. If -double_buffered is True the -gtk.DOUBLE_BUFFERED flag is set; otherwise it is unset. -Widgets are double buffered by default. "Double buffered" simply means that -the gtk.gdk.Window.begin_paint_rect() -and gtk.gdk.Window.end_paint() -methods are called automatically around expose events sent to the widget. -The gtk.gdk.Window.begin_paint_rect() -method diverts all drawing to a widget's window to an off screen buffer, and -the gtk.gdk.Window.end_paint() -method draws the buffer to the screen. The result is that users see the -window update in one smooth step, and don't see individual graphics -primitives being rendered. In very simple terms, double buffered widgets -don't flicker, so you would only use this method to turn off double -buffering if you had special needs and really knew what you were -doing. - - - - - gtk.Widget.set_redraw_on_allocate - - - set_redraw_on_allocate - redraw_on_allocate - - - - redraw_on_allocate : - if True, the entire widget -will be redrawn when it is allocated to a new size. Otherwise, only the new -portion of the widget will be redrawn. - - - - The set_redraw_on_allocate() method -sets a flag that determines if the entire widget is queued for drawing when -a widget's size allocation changes. By default, this setting is -True and the entire widget is redrawn on every size -change. If your widget leaves the upper left are unchanged when made bigger, -turning this setting on will improve performance. - - - For NO_WINDOW widgets setting this flag to -False turns off all allocation on resizing: the widget -will not redraw even if its position changes; this is to allow containers -that don't draw anything to avoid excess invalidations. If you set this flag -on a NO_WINDOW widget that does draw -on the widget's gtk.gdk.Window, you -are responsible for invalidating both the old and new allocation of the -widget when the widget is moved and responsible for invalidating regions -newly when the widget increases size. - - - - - - gtk.Widget.set_parent - - - set_parent - parent - - - - parent : - a parent container - - - - The set_parent() method is useful only -when implementing subclasses of gtk.Container. -This method sets the container as the parent of the widget, and takes care -of some details such as updating the state and style of the child to reflect -its new location. The reverse method is the unparent() -method. - - - - - gtk.Widget.set_parent_window - - - set_parent_window - parent_window - - - - parent_window : - the new parent window. - - - - The set_parent_window() method sets a -non default parent window for the widget. - - - - - gtk.Widget.set_child_visible - - - set_child_visible - is_visible - - - - is_visible : - if True, the widget should -be mapped along with its parent. - - - - The set_child_visible() method -determines if the widget should be mapped along with its parent. If -is_visible is True the widget will -be mapped with its parent if it has called the show() -method. - -The child visibility can be set for widget before it is added to a container -to avoid mapping children unnecessarily. The widget's child visibility flag -will be reset to its default state of True when the -widget is removed from a container. Note that changing the child visibility -of a widget does not queue a resize on the widget. Most of the time, the -size of a widget is computed from all visible children, whether or not they -are mapped. If this is not the case, the container can queue a resize -itself. This method is only useful for container implementations and never -should be called by an application. - - - - - gtk.Widget.get_child_visible - - - get_child_visible - - - - - Returns : - True if the widget is mapped -with the parent. - - - - The get_child_visible() method returns -the value set with the set_child_visible() -method. This method is only useful for container implementations and never -should be called by an application. - - - - - gtk.Widget.get_parent - - - get_parent - - - - - Returns : - the parent container of the widget, or -None - - - - The get_parent() method returns the -parent container of the widget or None if the widget has -no parent. - - - - - gtk.Widget.get_parent_window - - - get_parent_window - - - - - Returns : - the parent gtk.gdk.Window of -the widget - - - - The get_parent_window() method returns -the widget's parent gtk.gdk.Window. - - - - - gtk.Widget.child_focus - - - child_focus - direction - - - - direction : - the direction of focus -movement - - - Returns : - True if focus ended up -inside the widget - - - - The child_focus() method is used by -custom widget implementations. If you're writing an application, use the -grab_focus() -method to move the focus to a particular widget, and the gtk.Container.set_focus_chain() -method to change the focus tab order. - - The child_focus() method is called by -containers as the user moves around the window using keyboard shortcuts. The -value of direction indicates what kind of motion is -taking place: gtk.DIR_TAB_FORWARD, -gtk.DIR_TAB_BACKWARD, gtk.DIR_UP, -gtk.DIR_DOWN, gtk.DIR_LEFT or -gtk.DIR_RIGHT - - This method emits the "focus" signal on the widget. Widgets -override the default handler for this signal in order to implement -appropriate focus behavior. The "focus" default handler for a widget should -return: - - - - True if the focus is left on a -focusable location inside the widget, and - - - False if the focus moved outside the -widget - - - - If returning True, widgets normally call the -grab_focus() -method to place the focus accordingly; if returning -False, they don't modify the current focus -location. - - - - - gtk.Widget.set_size_request - - - set_size_request - width - height - - - - width : - the width the widget should request, or -1 to -unset - - - height : - the height the widget should request, or -1 to -unset - - - - The set_size_request() method sets the -minimum size of a widget to the values specified by -width and height. You can use -this method to force a widget to be either larger or smaller than it -normally would be. In most cases, the gtk.Window.set_default_size() -is a better choice for toplevel windows than this method. Setting the -default size will still allow users to shrink the window but setting the -size request will force them to leave the window at least as large as the -size request. When dealing with window sizes, the gtk.Window.set_geometry_hints() -can be a useful method as well. - - - - There is an inherent danger when setting any fixed size - -themes, translations into other languages, different fonts, and user action -can all change the appropriate size for a given widget. So, it's basically -impossible to hard code a size that will always be correct. - - - The size request of a widget is the smallest size a widget can -accept while still functioning well and drawing itself correctly. However in -some strange cases a widget may be allocated less than its requested size, -and in many cases a widget may be allocated more space than it requested. If -the size request in a given direction is -1 (unset), then the "natural" size -request of the widget will be used instead. Widgets can't actually be -allocated a size less than 1 by 1, but you can pass 0,0 to this method to -mean "as small as possible". - - - - - gtk.Widget.get_size_request - - - get_size_request - - - - Returns : - a 2-tuple containing the requested width and - height - - - - The get_size_request() method returns a -2-tuple containing the width and height of the widget that was explicitly -set for the widget using the set_size_request(). A -value of -1 for the width or height indicates that that dimension has not -been set explicitly and the natural requisition of the widget will be used -instead. See the set_size_request() -method for more information. To get the size a widget will actually use, -call the size_request() -instead of this method. - - - - - gtk.Widget.set_events - - - set_events - events - - - - events : - the event mask - - - - The set_events() method sets the event -mask for a widget using the value specified by -events. The event mask determines which events a -widget will receive. Keep in mind that different widgets have different -default event masks, and by changing the event mask you may disrupt a -widget's functionality, so be careful. This method must be called while a -widget is unrealized. Consider using the add_events() -method for widgets that are already realized, or if you want to preserve the -existing event mask. This method can't be used with -gtk.NO_WINDOW widgets since a widget must have a gtk.gdk.Window to -receive events. To get events on gtk.NO_WINDOW widgets, -place them inside a gtk.EventBox and -receive events on the event box. - - The value of events must be a combination -of the : - - - - - gtk.Widget.add_events - - - add_events - events - - - - events : - an event mask - - - - The add_events() method adds the events -specified by events to the event mask for the widget. -See the set_events() -method for details. - - - - - gtk.Widget.set_extension_events - - - set_extension_events - mode - - - - mode : - the extension events to -receive - - - - The set_extension_events() method sets -the extension events mask to the value specified by -mode. The value of mode must be one of the . - - See the gtk.gdk.Window.input_set_extension_events() -method for more information. - - - - - gtk.Widget.get_extension_events - - - get_extension_events - - - - - Returns : - the extension events for the -widget - - - - The get_extension_events() method -returns the extension events the widget will receive. See the gtk.gdk.Window.input_set_extension_events() -method for more information. - - - - - gtk.Widget.get_toplevel - - - get_toplevel - - - - - Returns : - the topmost ancestor of the widget, or the -widget itself if there's no ancestor. - - - - The get_toplevel() method returns the -topmost widget in the container hierarchy that the widget is a part of. If -the widget has no parent widgets, it will be returned as the topmost -widget. - - Note the difference in behavior as compared to the get_ancestor() -method that returns None if the widget isn't inside a -toplevel window, and if the window is inside a widget derived from gtk.Window that is -in turn inside the toplevel gtk.Window. While -the second case may seem unlikely, it actually happens when a gtk.Plug is embedded -inside a gtk.Socket within -the same application. - - To reliably find the toplevel gtk.Window, use the -get_toplevel() -method and check if the gtk.TOPLEVEL flag is set on the -result. - - - - - gtk.Widget.get_ancestor - - - get_ancestor - widget_type - - - - widget_type : - a widget type - - - Returns : - the ancestor widget, or None -if not found - - - - The get_ancestor() method returns the -first ancestor of the widget with the type specified by -widget_type. For example: - - - widget.get_ancestor(gtk.Box) - - - returns the first gtk.Box that's an -ancestor of the widget. See the get_toplevel() -method for information about checking for a toplevel gtk.Window. - - - - - gtk.Widget.get_colormap - - - get_colormap - - - - - Returns : - the colormap used by the -widget - - - - The get_colormap() method returns the -colormap that will be used to render the widget. - - - - - gtk.Widget.get_visual - - - get_visual - - - - - Returns : - the visual for the widget - - - - The get_visual() method returns the -visual that will be used to render the widget. - - - - - gtk.Widget.get_screen - - - get_screen - - - - - Returns : - the gtk.gdk.Screen - for the toplevel for this widget. - - - - - This method is available in PyGTK 2.2 and above. - - - The get_screen() method returns the -gtk.gdk.Screen -from the toplevel window associated with the widget. This method can only be -called after the widget has been added to a widget hierarchy with a gtk.Window at the -top. - - - - - gtk.Widget.has_screen - - - has_screen - - - - - Returns : - True if there is a gtk.gdk.Screen - associated with the widget. - - - - - This method is available in PyGTK 2.2 and above. - - - The has_screen() method returns -True if a gtk.gdk.Screen is -associated with the widget. All toplevel widgets have an associated screen, -as do all widgets added into a hierarchy with a toplevel window. - - - - - gtk.Widget.get_display - - - get_display - - - - - Returns : - the gtk.gdk.Display - for the toplevel for this widget. - - - - - This method is available in PyGTK 2.2 and above. - - - The get_display() method returns the -gtk.gdk.Display for -the toplevel window associated with the widget. This method can only be -called after the widget has been added to a widget hierarchy with a toplevel -gtk.Window - - - - - gtk.Widget.get_root_window - - - get_root_window - - - - - Returns : - the gtk.gdk.Window - root window for the toplevel for this widget. - - - - - This method is available in PyGTK 2.2 and above. - - - The get_root_window() method returns -the root window containing the widget. This method should only be called -after the widget has been added to a widget hierarchy with a toplevel gtk.Window - - The root window is useful for such purposes as creating a popup -gtk.gdk.Window associated with the window. - - - - - gtk.Widget.get_settings - - - get_settings - - - - - Returns : - the associated gtk.Settings -object - - - - The get_settings() method returns the -settings object holding the settings (global property settings, RC file -information, etc) used for this widget. - - - - - gtk.Widget.get_clipboard - - - get_clipboard - selection - - - - selection : - a gtk.gdk.Atom - or string that identifies the clipboard to - use. gtk.gdk.SELECTION_CLIPBOARD gives the - default clipboard. Another common value is - gtk.gdk.SELECTION_PRIMARY, which gives the - primary X selection. - - - Returns : - the appropriate gtk.Clipboard - object. If no clipboard already exists, a new one will be - created. Once a clipboard object has been created, it is - persistent for all time. - - - - - This method is available in PyGTK 2.2 and above. - - - The get_clipboard() method returns the -gtk.Clipboard -object for the selection specified by selection. The -widget must have a gtk.gdk.Display -associated with it, and so must be attached to a toplevel window. - - - - - gtk.Widget.get_accessible - - - get_accessible - - - - - Returns : - an atk.Object - - - - The get_accessible() method returns the - Accessibility ToolKit (ATK) object for the widget as an atk.Object. - - - - - gtk.Widget.set_colormap - - - set_colormap - colormap - - - - colormap : - a gtk.gdk.Colormap - - - - The set_colormap() method sets the -gtk.gdk.Colormap -for the widget to the value specified by colormap. -Widget must not have been realized. - - - - - gtk.Widget.get_events - - - get_events - - - - - Returns : - the event mask for the -widget - - - - The get_events() method returns the -event mask for the widget that determines the events that the widget will -receive. See the set_events() -method for more detail about events. - - - - - gtk.Widget.get_pointer - - - get_pointer - - - - - Returns : - a tuple containing the X and Y coordinates of -the mouse pointer - - - - The get_pointer() method returns a -tuple containing the location of the mouse pointer in widget coordinates. -Widget coordinates are a bit odd; for historical reasons, they are defined -as: - - - - the widget gtk.gdk.Window -coordinates for widgets that are not gtk.NO_WINDOW -widgets, or - - - the coordinates relative to the widget allocation for -widgets that are gtk.NO_WINDOW widgets. - - - - - - - - - gtk.Widget.is_ancestor - - - is_ancestor - ancestor - - - - ancestor : - another gtk.Widget - - - Returns : - True if -ancestor contains the widget as a child, grandchild, -great grandchild, etc. - - - - The is_ancestor() method returns -True if the widget is somewhere inside the hierarchy of -the widget specified byancestor - - - - - gtk.Widget.translate_coordinates - - - translate_coordinates - dest_widget - src_x - src_y - - - - dest_widget : - a gtk.Widget - - - src_x : - the X position relative to the -widget - - - src_y : - the Y position relative to the -widget - - - Returns : - a tuple containing the X and Y position -relative to dest_widget - - - - The translate_coordinates() method -returns a tuple containing the translation of the widget x and y coordinates -specified by src_x and src_y -respectively to coordinates relative to dest_widget. -In order to perform this operation, both widgets must be realized, and must -share a common toplevel. - - - - - gtk.Widget.hide_on_delete - - - hide_on_delete - - - - - Returns : - True - - - - The hide_on_delete() method is a -utility method that is intended to be connected to the "delete_event" signal -on a gtk.Window. The -method calls the hide() -method on the widget, then returns True. If connected to -"delete_event", the result is that clicking the close button for a window -(on the window frame, top right corner usually) will hide but not destroy -the window. By default, PyGTK destroys windows when -"delete_event" is received. - - - - - gtk.Widget.set_style - - - set_style - style - - - - style : - a gtk.Style, or -None to revert to the default style - - - - The set_style() method sets the "style" -property to the value of style. The "style" property -contains the gtk.Style for the -widget. This method interacts badly with themes, because themes work by -replacing the gtk.Style. - - - - - gtk.Widget.ensure_style - - - ensure_style - - - - The ensure_style() method makes sure -that the widget has a style. This method is useful if applied to an -unrealized widget. Usually, if you want the style, the widget is realized, -and guaranteed to have a style. - - - - - gtk.Widget.get_style - - - get_style - - - - - Returns : - the widget's gtk.Style - - - - The get_style() method returns the -value of the "style" property. - - - - - gtk.Widget.modify_style - - - modify_style - style - - - - style : - the gtk.RcStyle holding -the style modifications - - - - The modify_style() method modifies the -style values on the widget using the values in style. -Modifications made using this technique take precedence over style values -set via an RC file, however, they will be overridden if a style is explicitly -set on the widget using the set_style() -method. The gtk.RcStyle object -is designed so each attribute can either be set or unset, so it is possible, -using this method, to modify some style values and leave the others -unchanged. - - Note that modifications made with this method are not cumulative -with previous calls to the modify_style() method or -with such methods as the modify_fg() -method. If you wish to retain previous values, you must first call the get_modifier_style() -method, make your modifications to the returned style, then call the -modify_style() method with that style. On the other -hand, if you first call the modify_style() method, -subsequent calls to such methods as the modify_fg() -method will have a cumulative effect with the initial modifications. - - - - - gtk.Widget.get_modifier_style - - - get_modifier_style - - - - - Returns : - the modifier style for the widget. This gtk.RcStyle is -owned by the widget. - - - - The get_modifier_style() method returns -the current modifier style for the widget as set by the modify_style() -method. If no style was previously set, a new gtk.RcStyle object -will be created( with all values unset), and set as the modifier style for -the widget. If you make changes to this rc style, you must call the modify_style() -method, passing in the returned rc style, to make sure that your changes -take effect. - - - Passing the style back to the modify_style() -method will normally end up destroying it, because the modify_style() -method copies the passed-in style and sets the copy as the new modifier -style, thus dropping any reference to the old modifier style. - - - - - - gtk.Widget.modify_fg - - - modify_fg - state - color - - - - state : - a widget state. - - - color : - the gtk.gdk.Color to -assign. - - - - The modify_fg() method sets the -foreground color to the gtk.gdk.Color -specified by color for the widget in the specified -state. All other style values are left untouched. The -value of state must be one of the . - - - - - gtk.Widget.modify_bg - - - modify_bg - state - color - - - - state : - a widget state. - - - color : - the gtk.gdk.Color to -assign - - - - The modify_bg() method sets the -background color to the gtk.gdk.Color -specified by color for the widget in the specified -state. All other style values are left untouched. See -modify_fg() -method for detail on the possible values of -state. - - - modify_bg() only affects widgets that -have an associated gtk.gdk.Window. Widgets -that do not have an associated window include gtk.Arrow, gtk.Bin, gtk.Box, gtk.Button, gtk.CheckButton, -gtk.Fixed, -gtk.Image, -gtk.Label, -gtk.MenuItem, -gtk.Notebook, -gtk.Paned, -gtk.RadioButton, -gtk.Range, -gtk.ScrolledWindow, -gtk.Separator, -gtk.Table, -gtk.Toolbar, -gtk.AspectFrame, -gtk.Frame, -gtk.VBox, gtk.HBox, gtk.VSeparator, -gtk.HSeparator. These -widgets can be added to a gtk.EventBox to -overcome this limitation. - - - - - - gtk.Widget.modify_text - - - modify_text - state - color - - - - state : - a widget state. - - - color : - the gtk.gdk.Color to -assign. - - - - The modify_text() method sets the text -color to the gtk.gdk.Color -specified by color for the widget in the specified -state. All other style values are left untouched. The -text color is the foreground color used along with the base color (see the -modify_base() -method) for widgets such as gtk.Entry and gtk.TextView. See -the modify_fg() -method for detail on the possible values of -state. - - - - - gtk.Widget.modify_base - - - modify_base - state - color - - - - state : - a widget state. - - - color : - the gtk.gdk.Color to -assign - - - - The modify_base() method sets the base -color to the gtk.gdk.Color -specified by color for the widget in the specified -state. All other style values are left untouched. The -base color is the background color used along with the text color (see the -modify_text() -method) for widgets such as gtk.Entry and gtk.TextView. See -modify_fg() -method for detail on the possible values of -state. - - - - - gtk.Widget.modify_font - - - modify_font - font_desc - - - - font_desc : - a font description to use - - - - The modify_font() method sets the font -to use to the value specified by font_desc for the -widget. All other style values are left untouched. - - - - - gtk.Widget.create_pango_context - - - create_pango_context - - - - - Returns : - the new pango.Context - - - - The create_pango_context() method -creates a new pango.Context -with the appropriate colormap, font description, and base direction for -drawing text for this widget. See the get_pango_context() -method. - - - - - gtk.Widget.get_pango_context - - - get_pango_context - - - - - Returns : - the pango.Context for -the widget. - - - - The get_pango_context() method returns -the pango.Context -with the appropriate colormap, font description and base direction for this -widget. Unlike the context returned by the create_pango_context() -method, this context is owned by the widget (it can be used as long as -widget exists), and will be updated to match any changes to the widget's -attributes. - - If you create and keep a pango.Layout using -this context, you must deal with changes to the context by calling the pango.Layout.context_changed() -method on the layout in response to the "style-set" and "direction-set" -signals for the widget. - - - - - gtk.Widget.create_pango_layout - - - create_pango_layout - text - - - - text : - the text to set on the -layout - - - Returns : - the new pango.Layout - - - - The create_pango_layout() method -creates a new pango.Layout with -the appropriate colormap, font description, and base direction for drawing -the specified text for this widget. If you keep a -pango.Layout -created by this method, you must call pango.Layout.context_changed() -in response to the "style-set" and "direction-set" signals for the widget to -notify the layout of changes to the base direction or font of this -widget. - - - - - gtk.Widget.render_icon - - - render_icon - stock_id - size - detailNone - - - - stock_id : - a stock ID - - - size : - a stock size - - - detail : - the render detail to pass to the theme engine or -None - - - Returns : - a new pixbuf, or None if the -stock ID wasn't known - - - - The render_icon() method is a -convenience method that uses the theme engine and RC file settings for the -widget to look up the stock icon specified by -stock_id of the specified size -and to render it to a pixbuf that is returned. -stock_id should be a stock icon ID such as -gtk.STOCK_OPEN or gtk.STOCK_OK. -size should be one of the : - - detail is an optional string that -identifies the widget or code doing the rendering, so that theme engines can -special-case rendering for that widget or code. - - - - - gtk.Widget.set_composite_name - - - set_composite_name - name - - - - name : - the name to set. - - - - The set_composite_name() method sets a -widgets composite name to the value specified by -name. The widget must be a composite child of its -parent - - - - - gtk.Widget.get_composite_name - - - get_composite_name - - - - - Returns : - the composite name of the widget or -None - - - - The get_composite_name() method returns -the composite name of a widget or None if the widget is -not a composite. - - - - - gtk.Widget.reset_rc_styles - - - reset_rc_styles - - - - The reset_rc_styles() method resets the -styles of widget and all descendants to the correct values for the currently -loaded RC file settings. This method is not useful for applications. - - - - - gtk.Widget.style_get_property - - - style_get_property - property_name - - - - property_name : - the name of a style property - - - Returns : - the property value - - - - - This method is available in PyGTK 2.4 and above. - - - The style_get_property() method returns -the value of a style property specified by -property_name. - - - - - - - - gtk.Widget.set_direction - - - set_direction - dir - - - - dir : - the new direction - - - - The set_direction() method sets the -"direction" property to the value specified by dir. -The "direction" property determines the reading direction of the widget that -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 to handle localization for languages with right-to-left -reading directions. Generally, applications will use the default reading -direction, except for containers that are arranged in an order that is -explicitly visual rather than logical (such as buttons for text -justification). The values of dir must be one of the -. - - If the direction is set to gtk.TEXT_DIR_NONE, -then the value set by the gtk.widget.set_default_direction() -function will be used. - - - - - gtk.Widget.get_direction - - - get_direction - - - - - Returns : - the reading direction for the -widget. - - - - The get_direction() method returns the -reading direction for the widget. See the set_direction() -method for more information. - - - - - gtk.Widget.shape_combine_mask - - - shape_combine_mask - shape_mask - offset_x - offset_y - - - - shape_mask : - the shape to be added. - - - offset_x : - the X position of shape mask with respect to -the widget's gtk.gdk.Window. - - - offset_y : - Y position of shape mask with respect to the -widget's gtk.gdk.Window. - - - - The shape_combine_mask() method sets a -shape for the widget's gtk.gdk.Window using -the mask specified by shape_mask at the location -specified by offset_x and -offset_y. This allows for transparent windows etc., -see the gtk.gdk.Window.shape_combine_mask() -method for more information. - - - - - gtk.Widget.reset_shapes - - - reset_shapes - - - - The reset_shapes() method recursively -resets the shapes of the widget and its descendants. - - - - - gtk.Widget.path - - - path - - - - - Returns : - the widget's path - - - - The path() method returns the full path -to the widget. The path is simply the name of a widget and all its parents -in the container hierarchy, separated by periods. The name of a widget comes -from the get_name() -method. Paths are used to apply styles to a widget in gtkrc configuration -files. Widget names are the type of the widget by default (e.g. -"GtkButton") or can be set to an application-specific value with the set_name() -method. By setting the name of a widget, you allow users or theme authors -to apply styles to that specific widget in their gtkrc file. - - - - - gtk.Widget.class_path - - - class_path - - - - - Returns : - the widget's class path - - - - The class_path() method is similar to -the path() -method, but does not use a custom name set with the set_name() -(e.g. always uses "GtkButton" even if a custom name is available). - - - - - gtk.Widget.list_mnemonic_labels - - - list_mnemonic_labels - - - - - Returns : - the list of mnemonic labels - - - - - This method is available in PyGTK 2.4 and above. - - - The list_mnemonic_labels() method -returns a list of the widgets, normally labels, for which this widget is a -the target of a mnemonic (see for example, the gtk.Label.set_mnemonic_widget() -method). - - - - - gtk.Widget.add_mnemonic_label - - - add_mnemonic_label - label - - - - label : - a gtk.Widget - that acts as a mnemonic label. - - - - - This method is available in PyGTK 2.4 and above. - - - The add_mnemonic_label() method adds -the widget specified by label to the list of mnemonic -labels for the widget.(See the list_mnemonic_labels() -method for more detail). - - - - - gtk.Widget.remove_mnemonic_label - - - remove_mnemonic_label - label - - - - label : - a gtk.Widget - that was previously set as a mnemonic label. - - - - - This method is available in PyGTK 2.4 and above. - - - The remove_mnemonic_label() method -removes the widget specified by label from the list -of mnemonic labels for the widget. (See the list_mnemonic_labels() -method). label must have previously been added to the -list with the add_mnemonic_label(). - - - - - gtk.Widget.menu_get_for_attach_widget - - - menu_get_for_attach_widget - - - - - Returns : - a list of menus attached to this widget. - - - - - This method is available in PyGTK 2.6 and above. - - - The menu_get_for_attach_widget() method -returns a list of the menus that are attached to this widget. - - - - - gtk.Widget.set_activate_signal - - - set_activate_signal - signal_name - - - - signal_name : - a signal name - - - - - This method is available in PyGTK 2.8 and above. - - - The set_activate_signal() method sets -the signal specified by signal_name as the signal to -be emitted when the widget is activated for example by a call to the activate() -method. - - - - - gtk.Widget.set_scroll_adjustments_signal - - - set_scroll_adjustments_signal - signal_name - - - - signal_name : - a signal name - - - - - This method is available in PyGTK 2.8 and above. - - - The set_scroll_adjustments_signal() -method sets the signal specified by signal_name as -the signal to be emitted when the widget has its scroll adjustments set for -example by a call to the set_scroll_adjustments() -method. - - - - - gtk.Widget.get_action - - - get_action - - - - - - Returns : - the gtk.Action - that a widget is a proxy for, or None, if it is - not attached to an action. - - - - - This method is available in PyGTK 2.10 and above. - - - The get_action() method returns the - gtk.Action - that widget is a proxy for. See also the gtk.Action.get_proxies() - method. - - - - - gtk.Widget.drag_dest_set_track_motion - - - drag_dest_set_track_motion - track_motion - - - - - track_motion : - if True accept all - targets - - - - - This method is available in PyGTK 2.10 and above. - - - The drag_dest_set_track_motion() method - tells the widget to emit "drag-motion" and "drag-leave" events - regardless of the targets and the - gtk.DEST_DEFAULT_MOTION flag. - - This may be used when a widget wants to do generic actions - regardless of the targets that the source offers. - - - - - gtk.Widget.drag_dest_get_track_motion - - - drag_dest_get_track_motion - - - - - - Returns : - True if the widget always - emits "drag-motion events" - - - - - This method is available in PyGTK 2.10 and above. - - - The drag_dest_get_track_motion() method - returns True if the widget has been configured to - always emit "drag-motion" signals. - - - - - gtk.Widget.is_composited - - - is_composited - - - - - - Returns : - True if the widget can rely - on its alpha channel being drawn correctly. - - - - - This method is available in PyGTK 2.10 and above. - - - The is_composited() method returns - True if the widget can rely on having its alpha - channel drawn correctly. On X11 this function returns whether a - compositing manager is running for the widget's screen - - - - - gtk.Widget.input_shape_combine_mask - - - input_shape_combine_mask - shape_mask - offset_x - offset_y - - - - - shape_mask : - shape to be added, or None - to remove an existing shape. - - - offset_x : - X position of shape_mask - with respect to the widget's window. - - - offset_y : - Y position of shape_mask - with respect to the widget's window. - - - - - This method is available in PyGTK 2.10 and above. - - - The input_shape_combine_mask() method - sets an input shape for this widget's gtk.gdk.Window. - This allows for windows that react to a mouse click in a - nonrectangular region, see the gtk.gdk.Window.input_shape_combine_mask() - method for more information. - - - - - gtk.Widget.get_activate_signal - - - get_activate_signal - - - - - Returns : - a signal name - - - - - This method is available in PyGTK 2.10 and above. - - - The get_activate_signal() method - returns the name of the signal that is emitted when the widget is - activated for example by a call to the activate() - method. See the set_activate_signal() - method for more information. - - - - - - - Functions - - - gtk.widget_push_colormap - - - gtk.widget_push_colormap - cmap - - - - cmap : - a gtk.gdk.Colormap - - - - The gtk.widget_push_colormap() function -pushes the gtk.gdk.Colormap -specified by cmap onto a global stack of colormaps. -The topmost colormap on the stack will be used when creating widgets. Remove -cmap with the gtk.widget_pop_colormap() -function. There's little reason to use this function. - - - - - gtk.widget_push_composite_child - - - gtk.widget_push_composite_child - - - - The gtk.widget_push_composite_child() -function creates all new widgets as composite children until the -corresponding gtk.widget_pop_composite_child() -function call. A composite child is a child that's an implementation detail -of the container it's inside and should not be visible to people using the -container. Composite children aren't treated differently (but see the gtk.Container.foreach() -method vs. the gtk.Container.forall() -method), but e.g. GUI builders might want to treat them in a different -way. - - - - - gtk.widget_pop_composite_child - - - gtk.widget_pop_composite_child - - - - The gtk.widget_pop_composite_child() -function cancels the effect of a previous call to the gtk.widget_push_composite_child() -function. - - - - - gtk.widget_pop_colormap - - - gtk.widget_pop_colormap - - - - The gtk.widget_pop_colormap() function -removes the gtk.gdk.Colormap -on the top of the global stack of colormaps. This function reverses the -effect of the gtk.widget_push_colormap() -function. - - - - - gtk.widget_get_default_style - - - gtk.widget_get_default_style - - - - - Returns : - the default gtk.Style - - - - The gtk.widget_get_default_style() function -returns the default gtk.Style used by all -newly created widgets - - - - - gtk.widget_set_default_colormap - - - gtk.widget_set_default_colormap - colormap - - - - colormap : - a gtk.gdk.Colormap -object - - - - The gtk.widget_set_default_colormap() -function sets the default gtk.gdk.Colormap -to use when creating widgets to the value specified by -colormap. The gtk.widget_push_colormap() -function is a better function to use if you only want to affect a few -widgets, rather than all widgets. - - - - - gtk.widget_get_default_colormap - - - gtk.widget_get_default_colormap - - - - - Returns : - the default gtk.gdk.Colormap -object - - - - The gtk.widget_get_default_colormap() -function returns the default gtk.gdk.Colormap -used when creating new widgets. - - - - - gtk.widget_get_default_visual - - - gtk.widget_get_default_visual - - - - - Returns : - the default gtk.gdk.Visual -object - - - - The gtk.widget_get_default_visual() -function returns the default gtk.gdk.Visual of -the default gtk.gdk.Colormap. - - - - - gtk.widget_set_default_direction - - - gtk.widget_set_default_direction - dir - - - - dir : - the new default direction - either -gtk.TEXT_DIR_RTL or -gtk.TEXT_DIR_LTR. - - - - The gtk.widget_set_default_direction() -function sets the default text direction to the value specified by -dir. The value of dir must be -either gtk.TEXT_DIR_RTL or -gtk.TEXT_DIR_LTR. The default text direction is used for -widgets that have not had a text direction set by the set_direction() -method. - - - - - gtk.widget_get_default_direction - - - gtk.widget_get_default_direction - - - - - Returns : - the default text direction - - - - The gtk.widget_get_default_direction() -function returns the default text direction as set by the gtk.widget_set_default_direction() -function. - - - - - gtk.widget_class_find_style_property - - - gtk.widget_class_find_style_property - widget - - - - widget : - a gtk.Widget - - - property_name : - a style property name - - - Returns : - the style property as a GParam - object - - - - - This function is available in PyGTK 2.4 and above. - - - The gtk.widget_class_find_style_property() - function returns the GParam object corresponding to the style - property specified by property_name of the gtk.Widget - specified by widget. - - - - - gtk.widget_class_list_style_properties - - - gtk.widget_class_list_style_properties - widget - - - - widget : - a gtk.Widget - - - Returns : - a list of style properties as GParam objects - - - - - This function is available in PyGTK 2.4 and above. - - - The gtk.widget_class_list_style_properties() -function returns a list of the style properties of the gtk.Widget specified -by widget. The list contains a GParam object for each -style property. - - - - - gtk.widget_class_install_style_property - - - gtk.widget_class_install_style_property - widget - - - - widget : - a gtk.Widget - - - pspec : - a 4-tuple containing the property spec - - - - - This function is available in PyGTK 2.4 and above. - - - The -gtk.widget_class_install_style_property() function -installs the style property specified by pspec on the -gtk.Widget -specified by widget. pspec is -a 4-tuple containing the property name, the property type, a nickname (or -None) and a description of the property (or None). - - This function raises the TypeError exception if -widget is not a gtk.Widget or if the -property is already installed. - - - - - - - Signals - - - The "accel-closures-changed" gtk.Widget Signal - - - callback - widget - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "accel-closures-changed" signal is emitted when an -accelerator is added to or removed from the gtk.AccelGroup -for widget or an accelerator path is setup. - - - - - The "button-press-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further. - - - - The "button-press-event" signal is emitted when a mouse button -is pressed. - - - - - The "button-release-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further. - - - - The "button-release-event" signal is emitted when a mouse button -is released. - - - - - The "can-activate-accel" gtk.Widget Signal - - - callback - widget - signal_id - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - signal_id : - the ID of a signal installed on - widget - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further. - - - - - This signal is available in GTK+ 2.4 and above. - - - The "can-activate-accel" signal is emitted when an accelerator -is about to activate widget. The handler determines -if the accelerator that activates the signal identified by -signal_id can currently be activated. This signal is -present to allow applications and derived widgets to override the default -GtkWidget handling for determining whether an accelerator can be -activated. - - - - - The "child-notify" gtk.Widget Signal - - - callback - widget - child_property - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - child_property : - the name of a child property - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "child-notify" signal is emitted when -child_property is changed. - - Child properties are available with objects derived from gtk.Container. Those -properties are not specific to either the container or the child widget but -to their relation. For example, the "pack-type" property of gtk.Box or the -"menu-label" property of gtk.Notebook are -child properties. - - - - - The "client-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further. - - - - The "client-event" signal is emitted when another application -has sent an event to widget. - - - - - The "composited-changed" gtk.Widget Signal - - callback - widget - user_param1 - ... - - - - - widget : - the object which received the signal. - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - - - - - - The "configure-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further. - - - - The "configure-event" signal is emitted when the widget's window -is allocated a size and width. - - - - - The "delete-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further. - - - - The "delete-event" signal is emitted when a request is made to -delete widget. - - - - - The "destroy-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further. - - - - The "destroy-event" signal is emitted when a gtk.gdk.Window is -destroyed. You rarely get this signal, because most widgets disconnect -themselves from their window before they destroy it, so no widget owns the -window at destroy time. - - - - - The "direction-changed" gtk.Widget Signal - - - callback - widget - direction - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - direction : - the previous direction: -gtk.TEXT_DIR_NONE, gtk.TEXT_DIR_LTR or -gtk.TEXT_DIR_RTL - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "direction-changed" signal is emitted when the reading -direction of widget is changed (usually with the -set_direction() -method) - - - - - The "drag-begin" gtk.Widget Signal - - - callback - widget - drag_context - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - drag_context : - the gtk.gdk.DragContext - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "drag-begin" signal is emitted when the user initiates a -drag operation on widget. A typical reason to connect -to this signal is to set up a custom drag icon with the drag_source_set_icon() -method. - - - - - The "drag-data-delete" gtk.Widget Signal - - - callback - widget - drag_context - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - drag_context : - the gtk.gdk.DragContext - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "drag-data-delete" signal is emitted when the drag completes -a move operation and requires the source data to be deleted. The signal -handler is responsible for deleting the data that has been dropped. - - - - - The "drag-data-get" gtk.Widget Signal - - - callback - widget - drag_context - selection_data - info - timestamp - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - drag_context : - the gtk.gdk.DragContext - - - selection_data : - a gtk.SelectionData object - - - info : - an integer ID for the drag - - - timestamp : - the time of the drag event - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "drag-data-get" signal is emitted when a drag operation -completes that copies data or when a drag drop occurs using the -gtk.gdk.DRAG_PROTO_ROOTWIN protocol. The drag source -revceives this signal when the drag destination requests the data using the -drag_get_data() -method. The handler needs to fill selection_data with -the data in the format specified by the target associated with -info. - - - - - The "drag-data-received" gtk.Widget Signal - - - callback - widget - drag_context - x - y - selection_data - info - timestamp - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - drag_context : - the gtk.gdk.DragContext - - - x : - the X position of the drop - - - y : - the Y position of the drop - - - selection_data : - a gtk.SelectionData -object - - - info : - an integer ID for the drag - - - timestamp : - the time of the drag event - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "drag-data-received" signal is emitted when the drag -destination receives the data from the drag operation. If the data was -received in order to determine whether the drop will be accepted, the -handler is expected to call the gtk.gdk.DragContext.drag_status() -method and not finish the drag. If the data was received in response to a -"drag-drop" signal (and this is the last target to be received), the handler -for this signal is expected to process the received data and then call the -gtk.gdk.DragContext.finish() -method, setting the success parameter to -True if the data was processed successfully. - - - - - The "drag-drop" gtk.Widget Signal - - - callback - widget - drag_context - x - y - timestamp - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - drag_context : - the gtk.gdk.DragContext - - - x : - the X position of the drop - - - y : - the Y position of the drop - - - timestamp : - the time of the drag event - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the cursor is in a - drop zone - - - - The "drag-drop" signal is emitted when the drag initiates a drop -operation on the destination widget. The signal -handler must determine whether the cursor position is in a drop zone or -not. If it is not in a drop zone, it returns False and no -further processing is necessary. Otherwise, the handler returns -True. In this case, the handler must ensure that the -gtk.gdk.DragContext.finish() -method is called to let the source know that the drop is done. The call to -the gtk.gdk.DragContext.finish() -method can be done either directly or in a "drag-data-received" handler that -gets triggered by calling the drag_get_data() -method to receive the data for one or more of the supported targets. - - - - - The "drag-end" gtk.Widget Signal - - - callback - widget - drag_context - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - drag_context : - the gtk.gdk.DragContext - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "drag-end" signal is emitted when the drag operation is -completed. A typical reason to connect to this signal is to undo things done -in a "drag-begin" handler. - - - - - The "drag-leave" gtk.Widget Signal - - - callback - widget - drag_context - timestamp - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - drag_context : - the gtk.gdk.DragContext - - - timestamp : - the time of the drag event - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "drag-leave" signal is emitted when the drag operation moves -off of a drop target widget. A typical reason to connect to this signal is -to undo things done in a "drag-motion" handler, e.g. undo highlighting with -the drag_unhighlight() -method. - - - - - The "drag-motion" gtk.Widget Signal - - - callback - widget - drag_context - x - y - timestamp - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - drag_context : - the gtk.gdk.DragContext - - - x : - the X position of the drop - - - y : - the Y position of the drop - - - timestamp : - the time of the drag event - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True if the cursor is in a - drop zone - - - - The "drag-motion" signal is emitted when the drag operation -moves over a drop target widget. The signal handler must determine if the -cursor position is in a drop zone or not. If it is not in a drop zone, it -should return False and no further processing is -necessary. Otherwise, the handler should return True. In -this case, the handler is responsible for providing the necessary -information for displaying feedback to the user, by calling the gtk.gdk.DragContext.drag_status() -method. If the decision to accept or reject the drop can't be made based -solely on the cursor position and the type of the data, the handler may -inspect the dragged data by calling the drag_get_data() -method and defer the gtk.gdk.DragContext.drag_status() -method call to the "drag-data-received" handler. - - - There is no "drag-enter" signal. The drag receiver has to keep -track of any "drag-motion" signals received since the last "drag-leave" -signal. The first "drag-motion" signal received after a "drag_leave" signal -should be treated as an "enter" signal. Upon an "enter", the handler will -typically highlight the drop site with the drag_highlight() -method. - - - - - - The "enter-notify-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further - - - - The "enter-notify-event" signal is emitted when the mouse -pointer enters widget. - - - - - The "event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further - - - - The "event" signal is emitted when any gtk.gdk.Event occurs -on widget. The "event" signal is emitted before any -of the specific gtk.gdk.Event signals -are emitted. - - - - - The "event-after" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "event-after" signal is emitted after any other event -handling has occurred for widget - - - - - The "expose-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further - - - - The "expose-event" signal is emitted when -widget needs to be repainted because it is first -displayed or has been partially or fully obscured by another window. - - - - - The "focus" gtk.Widget Signal - - - callback - widget - direction - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - direction : - the direction: -gtk.DIR_TAB_FORWARD, -gtk.DIR_TAB_BACKWARD, gtk.DIR_UP, -gtk.DIR_DOWN, gtk.DIR_LEFT or -gtk.DIR_RIGHT - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further - - - - The "focus" signal is emitted when widget -receives the focus. - - - - - The "focus-in-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further - - - - The "focus-in-event" signal is emitted when the focus changes to -widget. - - - - - The "focus-out-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further - - - - The "focus-out-event" signal is emitted when the focus leaves -widget. - - - - - The "grab-broken-event" gtk.Widget Signal - - callback - widget - event - user_param1 - ... - - - - - widget : - the object which received the - signal. - - - event : - the gtk.gdk.EventGrabBroken - event - - - user_param1 : - the first user parameter (if any) specified - with the connect() - method - - - ... : - additional user parameters (if any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further. - - - - - This signal is available in GTK+ 2.8 and above. - - - Emitted when a pointer or keyboard grab on a window belonging to - widget gets broken. - - On X11, this happens when the grab window becomes unviewable - (i.e. it or one of its ancestors is unmapped), or if the same - application grabs the pointer or keyboard again. - - - - - The "grab-focus" gtk.Widget Signal - - - callback - widget - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "grab-focus" signal is emitted when -widget grabs the focus usually by calling the grab_focus() -method or by the user using a mnemonic accelerator.. - - - - - The "grab-notify" gtk.Widget Signal - - - callback - widget - was_grabbed - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - was_grabbed : - if True -widget had grabbed the focus - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "grab-notify" signal is emitted when widget (or its -ancestor) either is grabbing the focus or has the focus grabbed from -it. - - - - - The "hide" gtk.Widget Signal - - - callback - widget - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "hide" signal is emitted when widget -is hidden usually by calling the hide() -method. - - - - - The "hierarchy-changed" gtk.Widget Signal - - - callback - widget - previous_toplevel - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - previous_toplevel : - the toplevel widget in the previous hierarchy -containing widget - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "hierarchy-changed" signal is emitted when -widget is unparented or has a new parent set. - - - - - The "key-press-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further - - - - The "key-press-event" signal is emitted when the user presses a -key on the keyboard. - - - - - The "key-release-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further - - - - The "key-release-event" signal is emitted when the user releases -a key on the keyboard. - - - - - The "leave-notify-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further - - - - The "leave-notify-event" signal is emitted when the mouse -pointer leaves the area of widget. - - - - - The "map" gtk.Widget Signal - - - callback - widget - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "map" signal is emitted when widget -requests to be mapped onto the display usually by calling the show() or -map() -methods. - - - - - The "map-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further - - - - The "map-event" signal is emitted when -widget has been mapped onto the display. - - - - - The "mnemonic-activate" gtk.Widget Signal - - - callback - widget - group_cycling - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - group_cycling : - if True shifts the focus instead of activating widget - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further - - - - The "mnemonic-activate" signal is emitted when the user uses a -mnemonic accelerator to activate widget. - - - - - The "motion-notify-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further - - - - The "motion-notify-event" signal is emitted when the mouse -pointer moves while over widget. - - - - - The "no-expose-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further - - - - The "no-expose-event" signal is emitted when a no expose event -occurs. - - - - - The "parent-set" gtk.Widget Signal - - - callback - widget - old_parent - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - old_parent : - the previous parent of -widget - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "parent-set" signal is emitted when the parent of -widget is set or unset. - - - - - The "popup-menu" gtk.Widget Signal - - - callback - widget - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further - - - Returns : - True if a menu was - activated - - - - The "popup-menu" signal is emitted when the user presses the -ShiftF10 or -Menu keys when widget has the focus -to popup a menu. - - - - - The "property-notify-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further. - - - - The "property-notify-event" signal is emitted when a window -property value has changed. This is used for selection data -retrieval. - - - - - The "proximity-in-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further. - - - - The "proximity-in-event" (available for devices like touch -screens or graphics tablets) is emitted when the pen touches the tablet or -when the user's finger touches the screen. - - - - - The "proximity-out-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further. - - - - The "proximity-out-event" (available for devices like touch -screens or graphics tablets) is emitted when the pen leaves the tablet or -when the user's finger leaves the screen. - - - - - The "realize" gtk.Widget Signal - - - callback - widget - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "realize" signal is emitted when -widget requests to be realized by calling the realize() -method. - - - - - The "screen-changed" gtk.Widget Signal - - - callback - widget - screen - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - - screen : - the new gtk.gdk.Screen - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - - This signal is available in GTK+ 2.4 and above. - - - The "screen-changed" signal is emitted when -screen becomes the new gtk.gdk.Screen for -widget. - - - - - The "scroll-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further. - - - - The "scroll-event" signal is emitted when widget receives a -scroll event. - - - - - The "selection-clear-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further. - - - - The "selection-clear-event" signal is emitted when the selection -needs to be cleared. - - - - - The "selection-get" gtk.Widget Signal - - - callback - widget - selection_data - info - timestamp - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - selection_data : - a gtk.SelectionData -object - - - info : - an integer ID for the -selection - - - timestamp : - the time the event -occurred - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "selection-get" signal is emitted when the selection data is -requested from widget. - - - - - The "selection-notify-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further. - - - - The "selection-notify-event" signal is emitted when the -selection owner has responded to the selection conversion request. - - - - - The "selection-received" gtk.Widget Signal - - - callback - widget - selection_data - timestamp - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - selection_data : - a gtk.SelectionData -object - - - timestamp : - the time the event -occurred - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "selection-received" signal is emitted when the selection -owner has responded to the request for the selection data. - - - - - The "selection-request-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further. - - - - The "selection-request-event" signal is emitted when a selection -request is made on widget. - - - - - The "show" gtk.Widget Signal - - - callback - widget - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "show" signal is emitted when widget -requests to be displayed using either the show() or -show_all() -method. - - - - - The "show-help" gtk.Widget Signal - - - callback - widget - help_type - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - help_type : - the help type; either -gtk.WIDGET_HELP_TOOLTIP or -gtk.WIDGET_HELP_WHATS_THIS - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked. - - - - The "show-help" signal is emitted when the user presses the -ControlF1 key -combination. - - - - - The "size-allocate" gtk.Widget Signal - - - callback - widget - allocation - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - allocation : - the widget's space allocation in a gtk.gdk.Rectangle - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "size-allocate" signal is emitted when widget is given a new -space allocation. - - - - - The "size-request" gtk.Widget Signal - - - callback - widget - requisition - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - requisition : - the widget's requested size as a gtk.Requisition - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "size-request" signal is emitted when a new size is -requested for widget using the set_size_request() -method. - - - - - The "state-changed" gtk.Widget Signal - - - callback - widget - state - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - state : - the previous widget state: -gtk.STATE_NORMAL, gtk.STATE_ACTIVE, -gtk.STATE_PRELIGHT, gtk.STATE_SELECTED -or gtk.STATE_INSENSITIVE - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "state-changed" signal is emitted when the state of -widget changes. - - - - - The "style-set" gtk.Widget Signal - - - callback - widget - previous_style - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - previous_style : - the previous widget gtk.Style - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "style-set" signal is emitted when the gtk.Style of -widget is set. - - - - - The "unmap" gtk.Widget Signal - - - callback - widget - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "unmap" signal is emitted when widget -requests to be unmapped from the display. - - - - - The "unmap-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further. - - - - The "unmap-event" signal is emitted when -widget has been unmapped from the display. - - - - - The "unrealize" gtk.Widget Signal - - - callback - widget - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "unrealize" signal is emitted when -widget requests to be unrealized (i.e. have all its -resources released). - - - - - The "visibility-notify-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further. - - - - The "visibility-notify-event" signal is emitted when the -visibility of widget changes i.e. it has been -obscured or unobscured. - - - - - The "window-state-event" gtk.Widget Signal - - - callback - widget - event - user_param1 - ... - - - - - widget : - the widget that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further. - - - - The "window-state-event" signal is emitted when window state of -widget changes. For example, for a toplevel window this event is signaled -when the window is iconified, deiconified, minimized, maximized, made -sticky, made not sticky, shaded or unshaded. - - - - - -
diff --git a/docs/reference/pygtk-gtkwindow.xml b/docs/reference/pygtk-gtkwindow.xml deleted file mode 100644 index 7183c4fb..00000000 --- a/docs/reference/pygtk-gtkwindow.xml +++ /dev/null @@ -1,4223 +0,0 @@ - - - - - - gtk.Window - a top-level window that holds one child widget. - - - - Synopsis - - - gtk.Window - gtk.Bin - - gtk.Window - type - gtk.WINDOW_TOPLEVEL - - - set_title - title - - - get_title - - - set_wmclass - wmclass_name - wmclass_class - - - set_role - role - - - get_role - - - add_accel_group - accel_group - - - remove_accel_group - accel_group - - - set_position - position - - - activate_focus - - - set_focus - focus - - - get_focus - - - set_default - default_widget - - - activate_default - - - set_transient_for - parent - - - get_transient_for - - - set_type_hint - hint - - - get_type_hint - - - set_destroy_with_parent - setting - - - get_destroy_with_parent - - - set_resizable - resizable - - - get_resizable - - - set_gravity - gravity - - - get_gravity - - - set_geometry_hints - geometry_widget - min_width - -1 - min_height - -1 - max_width - -1 - max_height - -1 - base_width - -1 - base_height - -1 - width_inc - -1 - height_inc - -1 - min_aspect - -1.0 - max_aspect - -1.0 - - - set_screen - screen - - - get_screen - - - - is_active - - - - has_toplevel_focus - - - - set_has_frame - setting - - - get_has_frame - - - set_frame_dimensions - left - top - right - bottom - - - get_frame_dimensions - - - - set_decorated - setting - - - get_decorated - - - set_icon_list - ... - - - get_icon_list - - - set_icon - icon - - - set_icon_from_file - filename - - - get_icon - - - set_modal - modal - - - get_modal - - - add_mnemonic - keyval - target - - - remove_mnemonic - keyval - target - - - mnemonic_activate - keyval - modifier - - - set_mnemonic_modifier - modifier - - - get_mnemonic_modifier - - - - activate_key - event - - - propagate_key_event - event - - - present - - - iconify - - - deiconify - - - stick - - - unstick - - - maximize - - - unmaximize - - - fullscreen - - - unfullscreen - - - set_keep_above - setting - - - set_keep_below - setting - - - begin_resize_drag - edge - button - root_x - root_y - timestamp - - - begin_move_drag - button - root_x - root_y - timestamp - - - set_default_size - width - height - - - get_default_size - - - - resize - width - height - - - get_size - - - - move - x - y - - - get_position - - - - parse_geometry - geometry - - - reshow_with_initial_size - - - - tooltips_get_info_from_tip_window - - - - set_focus_on_map - setting - - - get_focus_on_map - - - - set_icon_name - name - - - get_icon_name - - - - set_urgency_hint - urgency_hint - - - get_urgency_hint - - - - present_with_time - timestamp - - - set_deletable - setting - - - get_deletable - - - - get_group - - - - - -Functions - - - gtk.window_set_default_icon - icon - gtk.window_set_default_icon_from_file - filename - gtk.window_set_default_icon_list - ... - gtk.window_get_default_icon_list - - - gtk.window_set_auto_startup_notification - setting - - gtk.window_list_toplevels - - - gtk.window_set_default_icon_name - name - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.Widget - +-- gtk.Container - +-- gtk.Bin - +-- gtk.Window - - - - - - gtk.Window Properties - - gtk.Object Properties - gtk.Widget Properties - gtk.Container Properties - -
- - - - - - - - - "accept-focus" - Read-Write - If True, the window should receive -the input focus. Default value: True. Available in GTK+ -2.4 and above. - - - - "allow-grow" - Read-Write - If True, the user can expand the -window beyond its minimum size. Default value: True. - - - - "allow-shrink" - Read-Write - If True, the window has no minimum -size. Setting this to True is a bad -idea 99% of the time. Default value: False. - - - - "decorated" - Read-Write - If True, the window should be -decorated by the window manager. Default value: True. -Available in GTK+ 2.4 and above. - - - - "default-height" - Read-Write - The default height of the window, used when initially -showing the window. Allowed values: >= -1. Default value: -1 - - - - "default-width" - Read-Write - The default width of the window, used when initially -showing the window. Allowed values: >= -1. Default value: -1 - - - - "deletable" - Read-Write - If True the window frame should have - a close button. This property is available in GTK+ 2.10 and - above. - - - - "destroy-with-parent" - Read-Write - If True, the window should be -destroyed when its parent is destroyed. Default value: -False. - - - - "focus-on-map" - Read-Write - If True, the window should -receive the input focus when mapped. Default value: -True. Available in GTK+ 2.6 and above. - - - - "gravity" - Read-Write - - The window gravity of the window. See the move() -method and the for more details about window -gravity. Default value: -gtk.gdk.GRAVITY_NORTH_WEST. Available in GTK+ 2.4 and -above. - - - - "has-toplevel-focus" - Read - If True, the input focus is within -the window. Default value: False. Available in GTK+ 2.2 -and above. - - - - "icon" - Read-Write - The icon for this window - - - - "icon-name" - Read-Write - The name of the themed icon to use as the window icon. -See gtk.IconTheme -for more details. Default value: None. Available in -GTK+ 2.6 and above. - - - - "is-active" - Read - If True, the toplevel is the current -active window. Default value: False. Available in GTK+ 2.2 -and above. - - - - "modal" - Read-Write - If True, the window is modal (other -windows are not usable while this one is up). Default value: -False. - - - - "resizable" - Read-Write - If True, the user can resize the -window. Default value: True. - - - - "role" - Read-Write - Unique identifier for the window to be used when -restoring a session. Default value: None. Available in -GTK+ 2.4 - - - - "screen" - Read-Write - The screen where this window will be displayed. -Available in GTK+ 2.2 - - - - "skip-pager-hint" - Read-Write - If True, the window should not be -in the pager. Default value: False. Available in GTK+ 2.2 -and above. - - - - "skip-taskbar-hint" - Read-Write - If True, the window should not be -in the task bar. Default value: False. Available in GTK+ -2.2 and above. - - - - "title" - Read-Write - The title of the window. Default value: None. - - - - "transient-for" - Read-Write-Construct - The transient parent of the window. See gtk.Window.set_transient_for() - for more details about transient windows. This property is - available in GTK+ 2.10 and above. - - - - "type" - Read-Write - The type of the window. Default value: -gtk.WINDOW_TOPLEVEL - - - - "type-hint" - Read-Write - Hint to help the desktop environment understand what -kind of window this is and how to treat it. Default value: -gtk.gdk.WINDOW_TYPE_HINT_NORMAL. Available in GTK+ 2.2 -and above. - - - - "urgency-hint" - Read-Write - If True the window should be brought to the users -attention. Default value: False. Available in GTK+ 2.8 -and above. - - - - "window-position" - Read-Write - The initial position of the window. Default value: -gtk.WIN_POS_NONE - - - - - -
- -
- - - gtk.Window Style Properties - - gtk.Widget Style Properties - - - - - Attributes - -
- - - - - - - - - - "allow_grow" - Read - If True, users can expand the window -beyond its minimum size. - - - - "allow_shrink" - Read - If True, the window has no minimum -size. - - - - "configure_notify_received" - Read - If True a window resize -configuration event has been received. - - - - "configure_request_count" - Read - The number of outstanding configuration -requests. - - - - "decorated" - Read - If True the window will have -decorations like a titlebar, resize controls, etc. See the set_decorated() -method. - - - - "default_widget" - Read - The child widget that will be activated by default. See -the set_default() -method. - - - - "destroy_with_parent" - Read - If True the window is destroyed when -its transient parent is destroyed. - - - - "focus_widget" - Read - The child widget that has the focus. - - - - "frame" - Read - The frame gtk.gdk.Window (if -any). See the set_has_frame() -and set_frame_dimensions() -methods. - - - - "frame_bottom" - Read - The height of the bottom frame border. See the set_frame_dimensions() -and set_has_frame() -methods. - - - - "frame_left" - Read - The width of the left frame border. See the set_frame_dimensions() -and set_has_frame() -methods. - - - - "frame_right" - Read - The width of the right frame border. See the set_frame_dimensions() -and set_has_frame() -methods. - - - - "frame_top" - Read - The height of the top frame border. See the set_frame_dimensions() -and set_has_frame() -methods. - - - - "gravity" - Read - The window's gravity. See the move() and -set_gravity() -methods. - - - - "group" - Read - The gtk.WindowGroup -(if any) the window belongs to. - - - - "has_focus" - Read - If True the window has the -focus. - - - - "has_frame" - Read - If True the window has a frame -window. See the set_has_frame() -method. - - - - "has_user_ref_count" - Read - If True the window has not been -destroyed. - - - - "iconify_initially" - Read - If True the window has been -iconified by a call to the iconify() -method. - - - - "keys_changed_handler" - Read - The idle handler ID for handling accelerator group -changes. - - - - "maximize_initially" - Read - If True the window has been -maximized by a call to the maximize() -method. - - - - "mnemonic_modifier" - Read - The mnemonic modifier used with a key to activate an -accelerator. See the set_mnemonic_modifier() -method - - - - "modal" - Read - If True the window is modal. See the set_modal() -method. - - - - "need_default_position" - Read - If True the window needs an initial -position calculated. - - - - "need_default_size" - Read - If True the window needs an initial -size calculated. - - - - "position" - Read - The initial position of the window. See the set_position() -method. - - - - "stick_initially" - Read - If True the window has been made -sticky by a call to the stick() -method. - - - - "title" - Read - The title of the window. - - - - "transient_parent" - Read - The transient parent window. See the set_transient_for() -method. - - - - "type" - Read - The type of the window: gtk.WINDOW_TOPLEVEL or gtk.WINDOW_POPUP. - - - - "type_hint" - Read - The window's type hint. See the set_type_hint() -method. - - - - "wmclass_class" - Read - The window system class hint. See the set_wmclass() -method. - - - - "wmclass_name" - Read - The window system name hint. See the set_wmclass() -method. - - - - "wm_role" - Read - The unique identifier for the window. See the set_role() -method. - - - - - -
- -
- - - gtk.Window Signal Prototypes - - gobject.GObject Signal Prototypes - gtk.Object Signal Prototypes - gtk.Widget Signal Prototypes - gtk.Container Signal Prototypes - - - - "activate-default" - - callback - window - user_param1 - ... - - - - - "activate-focus" - - callback - window - user_param1 - ... - - - - - "frame-event" - - callback - window - event - user_param1 - ... - - - - - "keys-changed" - - callback - window - user_param1 - ... - - - - - "move-focus" - - callback - window - direction - user_param1 - ... - - - - - "set-focus" - - callback - window - widget - user_param1 - ... - - - - - - - - - Description - - A gtk.Window provides -a widget that users commonly think of as a window. That is, an area of the -display that is managed by the window manager and usually decorated with a -title bar, and items to allow the user to close, resize and move the -window. PyGTK provides two types of windows (see the - section for more -information): - - - - gtk.WINDOW_TOPLEVEL - - A window that has no parent and usually has a frame and -decorations supplied by a window manager. Toplevels windows are the main -application window and dialogs. - - - - gtk.WINDOW_POPUP - - A window that is ignored by the window manager and has no -frame or decorations. A popup window is used for menus and -tooltips. - - - - - Typically, applications only directly create and use toplevel -windows. - - A gtk.Window is a container (subclass of gtk.Bin) holding one child widget. - - - - - Constructor - - - gtk.Window - type - gtk.WINDOW_TOPLEVEL - - - - type : - the type of window: -gtk.WINDOW_TOPLEVEL or -gtk.WINDOW_POPUP - - - Returns : - a new gtk.Window. - - - - Creates a new gtk.Window, which is -a toplevel window that can contain other widgets. Nearly always, the type of -the window should be gtk.WINDOW_TOPLEVEL (see the for more details). -gtk.WINDOW_POPUP is used to create a pop-up menu or -pop-up tooltip. On X11, popup windows are not controlled by the window -manager. If you simply want an undecorated window (no window borders), use -the set_decorated() -method with a toplevel window, don't use a popup window. - - - - - - Methods - - - gtk.Window.set_title - - - set_title - title - - - - title : - the title of the window - - - - The set_title() method sets the "title" property -of the gtk.Window to the -value specified by title. The title of a window will -be displayed in its title bar. On the X Window System, the title bar is -rendered by the window manager, so exactly how the title appears to users -may vary according to a user's exact configuration. The title should help a -user distinguish this window from other windows they may have open. A good -title might include the application name and current document -filename. - - - - - gtk.Window.get_title - - - get_title - - - - Returns : - the title of the window, or -None. - - - - The get_title() method returns the -value of the "title" property of the window. See the set_title() -method. - - - - - gtk.Window.set_wmclass - - - set_wmclass - wmclass_name - wmclass_class - - - - wmclass_name : - the window name hint - - - wmclass_class : - the window class hint - - - - The set_wmclass() method sets the X -Window System "class" and "name" hints for a window. Applications should not -call this method. According to the ICCCM, you should always set these to the -same value for all windows in an application, and PyGTK -sets them to that value by default, so calling this method is sort of -pointless. However, you may want to call the set_role() -method on each window in your application, for the benefit of the session -manager. Setting the role allows the window manager to restore window -positions when loading a saved session. - - - - - gtk.Window.set_role - - - set_role - role - - - - role : - a unique identifier for the -window - - - - The set_role() method sets a unique -identifier (specified by role) for the window to be -used when restoring a session. This method is only useful on X11. In -combination with the window title, the window role allows a window manager -to identify "the same" window when an application is restarted. So for -example you might set the "toolbox" role on your app's toolbox window, so -that when the user restarts their session, the window manager can put the -toolbox back in the same place. If a window already has a unique title, you -don't need to set the role, since the WM can use the title to identify the -window when restoring the session.d - - - - - gtk.Window.get_role - - - get_role - - - - Returns : - the role of the window if set, or -None. - - - - The get_role() method returns the role -of the window. See the set_role() -method for further explanation. - - - - - gtk.Window.add_accel_group - - - add_accel_group - accel_group - - - - accel_group : - a gtk.AccelGroup - - - - The add_accel_group() method associates -the accelerator group specified by accel_group with -the window. - - - - - gtk.Window.remove_accel_group - - - remove_accel_group - accel_group - - - - accel_group : - a gtk.AccelGroup - - - - The remove_accel_group() method -dissociates the accelerator group specified by -accel_group from the widget. This method reverses the -effects of the add_accel_group() -method. - - - - - gtk.Window.set_position - - - set_position - position - - - - position : - a position constraint. - - - - The set_position() method sets the -"window-position" property to the value of position. -The value of position must be one of the . - - If the old or new window position constraint is -gtk.WIN_POS_CENTER_ALWAYS, this will also cause the -window to be repositioned to satisfy the new constraint. - - - - - gtk.Window.activate_focus - - - activate_focus - - - - Returns : - True if the window has a -focus widget - - - - The activate_focus() method activates -the child widget with the focus. This method returns True -if the window has a widget with the focus. - - - - - gtk.Window.set_focus - - - set_focus - focus - - - - focus : - the widget to be the new focus -widget or None to unset a focus widget - - - - The set_focus() method sets the widget -specified by focus to be the focus widget for the -window. If focus is None the -window's focus widget is unset. To set the focus to a particular widget in -the toplevel, it is usually more convenient to use the gtk.Widget.grab_focus() -method instead of this method. - - - - - gtk.Window.get_focus - - - get_focus - - - - Returns : - the currently focused -widget. - - - - The get_focus() method returns the -current focused widget within the window. The focus widget is the widget -that would have the focus if the toplevel window is focused. - - - - - gtk.Window.set_default - - - set_default - default_widget - - - - default_widget : - the widget to be the default, or -None to unset the default widget. - - - - The set_default() method sets the -window's default widget to the value specified by -default_widget. If -default_widget is None the -window's default widget is unset. The default widget is the widget that's -activated when the user presses Enter in a window. When -setting (rather than unsetting) the default widget it's generally easier to -call the gtk.Widget.grab_default() -method on the widget. Before making a widget the default widget, you must -set the gtk.CAN_DEFAULT flag on the widget you'd like to -make the default using the gtk.Object.set_flags() -method. - - - - - gtk.Window.activate_default - - - activate_default - - - - Returns : - True if the window has a -default widget or a focus widget. - - - - The activate_default() method activates -the default widget. If there is no default widget or the default widget -cannot be activated, the window's focus widget (if any) is activated. This -method returns False if no default widget could be -activated or there is no focus widget. - - - - - gtk.Window.set_transient_for - - - set_transient_for - parent - - - - parent : - the parent window or None to -remove the transient parent - - - - The set_transient_for() method sets the -window as a transient window for the window specified by -parent. Dialog windows should be set transient for -the main application window they were spawned from. This allows window -managers to keep the dialog on top of the main window, or center the dialog -over the main window. The gtk.Dialog() constructor and other -convenience functions in PyGTK will sometimes call the -set_transient_for() method on your behalf. - - -On Windows, this method will and put the child window on top of the parent, -much as the window manager would have done on X. - - - - - gtk.Window.get_transient_for - - - get_transient_for - - - - Returns : - the transient parent for this window, or -None if no transient parent has been -set. - - - - The get_transient_for() method returns -the transient parent for this window or None if no -transient window is set. See the set_transient_for() -method. - - - - - gtk.Window.set_type_hint - - - set_type_hint - hint - - - - hint : - the window type - - - - The set_type_hint() method sets the -window type hint for the window to the value specified by -hint. The value of hint must -be one of the . - - By setting the type hint for the window, you allow the window -manager to decorate and handle the window in a way which is suitable to the -method of the window in your application. This method should be called -before the window becomes visible. The gtk.Dialog() constructor and other -convenience functions in PyGTK will sometimes call this -method on your behalf. - - - - - gtk.Window.get_type_hint - - - get_type_hint - - - - Returns : - the type hint for the -window. - - - - The get_type_hint() method returns the -type hint for this window. See the set_type_hint() -method. - - - - - gtk.Window.set_destroy_with_parent - - - set_destroy_with_parent - setting - - - - setting : - if True destroy the window -with its transient parent - - - - The set_destroy_with_parent() method -sets the "destroy-with-parent" property to the value specified by -setting. If setting is -True, destroying the transient parent of the window will -also destroy the window itself. This is useful for dialogs that shouldn't -persist beyond the lifetime of the main window they're associated -with. - - - - - gtk.Window.get_destroy_with_parent - - - get_destroy_with_parent - - - - Returns : - True if the window will be -destroyed with its transient parent. - - - - The get_destroy_with_parent() method -returns the value of the "destroy-with-parent" property that determines if -the window will be destroyed with its transient parent. See the set_destroy_with_parent() -method. - - - - - gtk.Window.set_resizable - - - set_resizable - resizable - - - - resizable : - if True the user can resize -this window - - - - The set_resizable() method sets the -"resizable" property to the value of resizable. If -resizable is True the user can -resize the window. Windows are user resizable by default. - - - - - gtk.Window.get_resizable - - - get_resizable - - - - Returns : - True if the user can resize -the window - - - - The get_resizable() method returns the -value of the "resizable" property. See the set_resizable() -method. - - - - - gtk.Window.set_gravity - - - set_gravity - gravity - - - - gravity : - the window gravity - - - - - The set_gravity() method sets the -gravity of the window to the value specified by -gravity. The window gravity defines the meaning of -coordinates passed to the move() -method. The value of gravity must be one of the . - - The default window gravity is -gtk.gdk.GRAVITY_NORTH_WEST which will typically "do what -you want." - - - - - gtk.Window.get_gravity - - - get_gravity - - - - Returns : - the window gravity - - - - The get_gravity() method returns window -gravity. See the set_gravity() -method. - - - - - gtk.Window.set_geometry_hints - - - set_geometry_hints - geometry_widget - min_width - -1 - min_height - -1 - max_width - -1 - max_height - -1 - base_width - -1 - base_height - -1 - width_inc - -1 - height_inc - -1 - min_aspect - -1.0 - max_aspect - -1.0 - - - - geometry_widget : - the widget the geometry hints will be applied -to - - - min_width : - the minimum width of window (or -1 to use -requisition) - - - min_height : - the minimum height of window (or -1 to use -requisition) - - - max_width : - the maximum width of window (or -1 to use -requisition) - - - max_height : - the maximum height of window (or -1 to use -requisition) - - - base_width : - allowed window widths are base_width + -width_inc * N where N is any integer - - - base_height : - allowed window heights are base_height + -width_inc * N where N is any integer - - - width_inc : - the width resize increment - - - height_inc : - the height resize -increment - - - min_aspect : - the minimum width to height -ratio - - - max_aspect : - the maximum width to height -ratio - - - - The set_geometry_hints() method sets up -hints about how a window can be resized by the user. You can set the minimum -and maximum widths and heights, the base width and height for resizing, the -allowed width and height resize increments (e.g. for xterm, you can only -resize by the size of a character), and the minimum and maximum aspect -ratios. If geometry_widget is not -None it specifies the widget to figure the geometry -on. - - - - - gtk.Window.set_screen - - - set_screen - screen - - - - screen : - a gtk.gdk.Screen. - - - - - This method is available in PyGTK 2.2 and above. - - - The set_screen() method sets the -"screen" property to the gtk.gdk.Screen -specified by screen. The "screen" property contains -the screen that the window is displayed on. If the window is already mapped, -it will be unmapped, and then remapped on the new screen. - - - - - gtk.Window.get_screen - - - get_screen - - - - - Returns : - a gtk.gdk.Screen. - - - - - This method is available in PyGTK 2.2 and above. - - - The get_screen() method returns the -gtk.gdk.Screen -that the window is displayed on. - - - - - gtk.Window.is_active - - - is_active - - - - - Returns : - True if the window is part - of the current active window. - - - - - This method is available in PyGTK 2.4 and above. - - - The is_active() method returns -True if the window is part of the current active -toplevel, i.e., the toplevel window receiving keystrokes. The return value -is True if the window is active the toplevel itself, or -if it is, for example, a gtk.Plug embedded in -the active toplevel. You might use this method if you wanted to draw a -widget differently in an active window from a widget in an inactive window. -See the has_toplevel_focus() -method. - - - - - gtk.Window.has_toplevel_focus - - - has_toplevel_focus - - - - Returns : - True if the the input focus - is within the window - - - - - This method is available in PyGTK 2.4 and above. - - - The has_toplevel_focus() method returns -True if the input focus is within the window. For real -toplevel windows, this is identical to is_active(), -but for embedded windows, like a gtk.Plug, the results -will differ. - - - - - gtk.Window.set_has_frame - - - set_has_frame - setting - - - - setting : - if True PyGTK draws the -window border - - - - The set_has_frame() method sets the -flag that causes PyGTK to draw its own window border for -the window. - - - This is a special-purpose method for the framebuffer port. For -most applications, you want the set_decorated() -method instead,that tells the window manager whether to draw the window -border. - - - If this method is called on a window with setting of -True, before it is realized or showed, it will have a -"frame" window around the window's gtk.gdk.Window, -accessible in the window's frame. Using the signal "frame-event" you can -receive all events targeted at the frame. This method is used by the -linux-fb port to implement managed windows, but it could conceivably be used -by X-programs that want to do their own window decorations. - - - - - gtk.Window.get_has_frame - - - get_has_frame - - - - Returns : - True if a frame has been -added to the window via the set_has_frame() -method. - - - - The get_has_frame() method returns the -value of the window's "has_frame" flag that determines if the window has a -frame window exterior to its gtk.gdk.Window. See -the set_has_frame() -method for more information. - - - - - gtk.Window.set_frame_dimensions - - - set_frame_dimensions - left - top - right - bottom - - - - left : - the width of the left -border - - - top : - the height of the top -border - - - right : - the width of the right -border - - - bottom : - the height of the bottom -border - - - - The set_frame_dimensions() method sets -the size of the frame around the window to the values specified by -left, top, -bottom and right. - - - This is a special-purpose method intended for the framebuffer -port. See the set_has_frame() -method. It will have no effect on the window border drawn by the window -manager, which is the normal case when using the X Window system. - - - For windows with frames (see the set_has_frame() -method) this method can be used to change the size of the frame -border. - - - - - gtk.Window.get_frame_dimensions - - - get_frame_dimensions - - - - - Returns : - a tuple containing the frame dimensions: the -width of the frame at the left; the height of the frame at the top; the -width of the frame at the right; and, the height of the frame at the -bottom. - - - - The get_frame_dimensions() method -returns a tuple containing the frame dimensions: the width of the frame at -the left; the height of the frame at the top; the width of the frame at the -right; and, the height of the frame at the bottom. - - - This is a special-purpose method intended for the framebuffer -port See the set_has_frame() -method. It will not return the size of the window border drawn by the window -manager, which is the normal case when using a windowing system. See the -get_frame_extents() -to get the standard window border extents. - - - See the set_has_frame() -and set_frame_dimensions() -methods for more information. - - - - - gtk.Window.set_decorated - - - set_decorated - setting - - - - setting : - if True decorate the -window - - - - The set_decorated() method sets the -decorated flag to the value specified by setting. If -setting is True the window will be -decorated. By default, windows are decorated with a title bar, resize -controls, etc. Some window managers allow PyGTK to disable these -decorations, creating a borderless window. If you set the decorated property -to False using this method, PyGTK will -do its best to convince the window manager not to decorate the window. On -Windows, this method always works, since there's no window manager policy -involved. - - - - - gtk.Window.get_decorated - - - get_decorated - - - - Returns : - True if the window has been -set to have decorations - - - - The get_decorated() method returns the -value of the decorated flag that determines if the window has been set to -have decorations such as a title bar. See the set_decorated() -method. - - - - - gtk.Window.set_icon_list - - - set_icon_list - ... - - - - ... : - zero or more gtk.gdk.Pixbuf -objects - - - - The set_icon_list() method sets up the -icon representing the window using the set of gtk.gdk.Pixbuf -objects passed as arguments. If no gtk.gdk.Pixbuf -objects are passed in the icon is unset and reverts to the default icon. The -icon is used when the window is minimized (also known as iconified). Some -window managers or desktop environments may also place it in the window -frame, or display it in other contexts. This method allows you to pass in -the same icon in several hand-drawn sizes. The gtk.gdk.Pixbuf -objects should contain the natural sizes your icon is available in; i.e., -don't scale the image before passing it to PyGTK. Scaling -is postponed until the last minute, when the desired final size is known, to -allow best quality. By passing several sizes, you may improve the final -image quality of the icon, by reducing or eliminating automatic image -scaling. The recommended sizes to provide are: 16x16, 32x32, 48x48 at -minimum, and larger images (64x64, 128x128) if you have them. - - See the gtk.window_set_default_icon_list() -function to set the icon for all windows in your application in one go. Note -that transient windows (those who have been set transient for another window -using the set_transient_for() -method) will inherit their icon from their transient parent. So there's no -need to explicitly set the icon on transient windows. - - - - - gtk.Window.get_icon_list - - - get_icon_list - - - - Returns : - a copy of the window's icon -list - - - - The get_icon_list() method returns the -list of icons set by the set_icon_list() -method. - - - - - gtk.Window.set_icon - - - set_icon - icon - - - - icon : - an icon image, or -None - - - - The set_icon() method sets the "icon" -property to the value specified by icon. This icon is -used when the window is minimized (also known as iconified). Some window -managers or desktop environments may also place it in the window frame, or -display it in other contexts. The icon should be provided in whatever size -it was naturally drawn; that is, don't scale the image before passing it to -PyGTK. Scaling is postponed until the last minute, when -the desired final size is known, to allow best quality. If you have your -icon hand-drawn in multiple sizes, use the set_icon_list() -method. Then the best size will be used. - - This method is equivalent to calling the set_icon_list() -method with a 1-element list. See the gtk.window_set_default_icon_list() -function to set the icon for all windows in your application in one -go. - - - - - gtk.Window.set_icon_from_file - - - set_icon_from_file - filename - - - - filename : - the name of a file containing an icon - image - - - Returns : - True if the icon was - loaded. - - - - The set_icon_from_file() method sets -the "icon" property to the icon loaded from the file specified by -filename. The icon is used when the window is -minimized (also known as iconified). See the set_icon()) -method for more information. This method is equivalent to calling the set_icon() -method with a pixbuf created by loading the image from -filename. - - The GError exception is raised if an error occurs while loading -the pixbuf from filename. - - - - - gtk.Window.get_icon - - - get_icon - - - - Returns : - the icon for window - - - - The get_icon() method returns the value -of the "icon" property set by the set_icon() -(or if you've called the set_icon_list() -method, returns the first icon in the icon list). - - - - - gtk.Window.set_modal - - - set_modal - modal - - - - modal : - if True the window is -modal - - - - The set_modal() method sets the "modal" -property to the value of modal. If -modal is True the window becomes -modal. Modal windows prevent interaction with other windows in the same -application. Typically modal windows are used for gtk.Dialog windows -that require a user response before the application can continue. To keep -modal dialogs on top of the main application windows, use the set_transient_for() -method to make the dialog transient for the parent - most window managers -will then disallow lowering the dialog below the parent. - - - - - gtk.Window.get_modal - - - get_modal - - - - Returns : - True if the window is set to -be modal and establishes a grab when shown - - - - The get_modal() method returns the -value of the "modal" property. If "modal" is True the -window is modal. See the set_modal() -method. - - - - - gtk.Window.add_mnemonic - - - add_mnemonic - keyval - target - - - - keyval : - the mnemonic key - - - target : - the widget that gets activated by the -mnemonic - - - - The add_mnemonic() method adds a -mnemonic key specified by keyval to this window. When -the mnemonic key is pressed the widget specified by -target will be activated. - - - - - gtk.Window.remove_mnemonic - - - remove_mnemonic - keyval - target - - - - keyval : - the mnemonic key - - - target : - the widget that gets activated by the -mnemonic - - - - The remove_mnemonic() method removes -the mnemonic specified by keyval for the widget -specified by target from this window. - - - - - gtk.Window.mnemonic_activate - - - mnemonic_activate - keyval - modifier - - - - keyval : - the mnemonic key - - - modifier : - the modifiers - - - Returns : - True if the activation was -done - - - - The mnemonic_activate() method -activates the targets associated with the mnemonic specified by -keyval. The window's mnemonic modifier must match -modifier to allow the activation to proceed. See the -set_mnemonic_modifier() -method for more information. - - - - - gtk.Window.set_mnemonic_modifier - - - set_mnemonic_modifier - modifier - - - - modifier : - the modifier mask used to activate mnemonics on -this window. - - - - The set_mnemonic_modifier() method sets -the mnemonic modifier for this window to the value specified by -modifier. The value of -modifier is one of: - - - - gtk.gdk.SHIFT_MASK - - The Shift key. - - - - gtk.gdk.CONTROL_MASK - - The Control key. - - - - gtk.gdk.MOD1_MASK - - The fourth modifier key (it depends on the modifier -mapping of the X server which key is interpreted as this modifier, but -normally it is the Alt key). - - - - - - - - - - gtk.Window.get_mnemonic_modifier - - - get_mnemonic_modifier - - - - Returns : - the modifier mask used to activate mnemonics on -this window. - - - - The get_mnemonic_modifier() method -returns the mnemonic modifier for this window. See the set_mnemonic_modifier() -method for more detail. - - - - - gtk.Window.activate_key - - - activate_key - event - - - - event : - a gtk.gdk.Event - - - Returns : - True if a mnemonic or - accelerator was found and activated. - - - - - This method is available in PyGTK 2.4 and above. - - - The activate_key() method activates -mnemonics and accelerators for the window. This is normally called by the -default gtk.Widget "key-press-event" signal -handler for toplevel windows, however in some cases it may be useful to call -this directly when overriding the standard key handling for a toplevel -window. - - - - - gtk.Window.propagate_key_event - - - propagate_key_event - event - - - - event : - a gtk.gdk.Event - - - Returns : - True if a widget in the - focus chain handled the event. - - - - - This method is available in PyGTK 2.4 and above. - - - The propagate_key_event() method -propagates a key press or release event to the focus widget and up the focus -container chain until a widget handles the key event specified by -event. This is normally called by the default gtk.Widget "key-press-event" and -"key-release-event" -signal handlers for toplevel windows, however in some cases it may be useful -to call this directly when overriding the standard key handling for a -toplevel window. - - - - - gtk.Window.present - - - present - - - - The present() method presents a window -to the user. This may mean raising the window in the stacking order, -deiconifying it, moving it to the current desktop, and/or giving it the -keyboard focus, possibly dependent on the user's platform, window manager, -and preferences. If the window is hidden, this method calls the the gtk.Widget.show() -method as well. This method should be used when the user tries to open a -window that's already open. Say for example the preferences dialog is -currently open, and the user chooses Preferences -from the menu a second time; use the present() -method to move the already-open dialog where the user can see it. - - - - - gtk.Window.iconify - - - iconify - - - The iconify() method asks the window -manager to iconify (i.e. minimize) the specified the window. Note that you -shouldn't assume the window is definitely iconified afterward, because other -entities (e.g. the user or window manager) could deiconify it again, or -there may not be a window manager in which case iconification isn't -possible, etc. But normally the window will end up iconified. Just don't -write code that crashes if not. This method can be called before showing a -window, in which case the window will be iconified before it ever appears -on-screen. You can track iconification via the gtk.Widget "window-state-event" -signal. - - - - - gtk.Window.deiconify - - - deiconify - - - The deiconify() method asks the window -manager to deiconify (i.e. unminimize) the specified the window. Note that -you shouldn't assume the window is definitely deiconified afterward, because -other entities (e.g. the user or window manager) could iconify it again -before your code which assumes deiconification gets to run. You can track -iconification via the gtk.Widget "window-state-event" -signal. - - - - - gtk.Window.stick - - - stick - - - The stick() method asks the window -manager to stick the window, which means that it will appear on all user -desktops. Note that you shouldn't assume the window is definitely stuck -afterward, because other entities (e.g. the user or window manager) could -unstick it again, and some window managers do not support sticking windows. -But normally the window will end up stuck. Just don't write code that -crashes if not. This method can be called before showing a window. You can -track stickiness via the gtk.Widget "window-state-event" -signal. - - - - - gtk.Window.unstick - - - unstick - - - The unstick() method asks the window manager to unstick the -window, which means that it will appear on only one of the user's desktops. -Note that you shouldn't assume the window is definitely unstuck afterward, -because other entities (e.g. the user or window manager) could stick it -again. But normally the window will end up stuck. Just don't write code that -crashes if not. You can track stickiness via the gtk.Widget "window-state-event" -signal. - - - - - gtk.Window.maximize - - - maximize - - - The maximize() method asks the window -manager to maximize the window, so that it becomes full-screen. Note that -you shouldn't assume the window is definitely maximized afterward, because -other entities (e.g. the user or window manager) could unmaximize it again, -and not all window managers support maximization. But normally the window -will end up maximized. This method can be called before showing a window, in -which case the window will be maximized when it appears on-screen initially. -You can track maximization via the gtk.Widget "window-state-event" -signal. - - - - - gtk.Window.unmaximize - - - unmaximize - - - The unmaximize() method asks the window -manager to unmaximize the window. Note that you shouldn't assume the window -is definitely unmaximized afterward, because other entities (e.g. the user -or window manager) could maximize it again, and not all window managers -honor requests to unmaximize. But normally the window will end up -unmaximized. You can track maximization via the gtk.Widget "window-state-event" -signal. - - - - - gtk.Window.fullscreen - - - fullscreen - - - - - This method is available in PyGTK 2.2 and above. - - - The fullscreen() method requests the -window manager to place the window in the fullscreen state. Note you -shouldn't assume the window is definitely full screen afterward, because -other entities (e.g. the user or window manager) could unfullscreen it -again, and not all window managers honor requests to fullscreen windows. But -normally the window will end up fullscreen. Just don't write code that -crashes if not. - - You can track the fullscreen state via the gtk.Widget "window-state-event" -signal. - - - - - gtk.Window.unfullscreen - - - unfullscreen - - - - - This method is available in PyGTK 2.2 and above. - - - The unfullscreen() method requests the -window manager to toggle off the fullscreen state for the window. Note that -you shouldn't assume the window is definitely not full screen afterward, -because other entities (e.g. the user or window manager) could fullscreen it -again, and not all window managers honor requests to unfullscreen -windows. But normally the window will end up restored to its normal -state. Just don't write code that crashes if not. - - You can track the fullscreen state via the gtk.Widget "window_state_event" -signal. - - - gtk.Window.set_keep_above - - - set_keep_above - setting - - - - setting : - if True keep the window - above other windows - - - - - This method is available in PyGTK 2.4 and above. - - - The set_keep_above() method requests -the window manager to keep the window on top if -setting is True. Note that you -shouldn't assume the window is definitely above afterward, because other -entities (e.g. the user or window manager) could not keep it above, and not -all window managers support keeping windows above. But normally the window -will end kept above. Just don't write code that crashes if not. - - It's permitted to call this method before showing a window, so -the window will be kept above when it appears on-screen initially. - - You can track the above state via the gtk.Widget "window_state_event" -signal. - - Note that, according to the Extended -Window Manager Hints specification, the above state is mainly meant -for user preferences and should not be used by applications e.g. for drawing -attention to their dialogs. - - - - - gtk.Window.set_keep_below - - - set_keep_below - setting - - - - setting : - if True keep the window - below other windows - - - - - This method is available in PyGTK 2.4 and above. - - - The set_keep_below() method requests -the window manager to keep the window on the bottom (i.e. below all other -windows). Note that you shouldn't assume the window is definitely below -afterward, because other entities (e.g. the user or window manager) could -not keep it below, and not all window managers support putting windows -below. But normally the window will be kept below. Just don't write code -that crashes if not. - - It's permitted to call this function before showing a window, in -which case the window will be kept below when it appears on-screen -initially. - - You can track the below state via the gtk.Widget "window_state_event" -signal. - - Note that, according to the Extended -Window Manager Hints specification, the above state is mainly meant -for user preferences and should not be used by applications e.g. for drawing -attention to their dialogs. - - - - - gtk.Window.begin_resize_drag - - - begin_resize_drag - edge - button - root_x - root_y - timestamp - - - - edge : - the position of the resize -control - - - button : - the mouse button that initiated the -drag - - - root_x : - the X position where the user clicked to -initiate the drag, in root window coordinates - - - root_y : - the Y position where the user clicked to -initiate the drag - - - timestamp : - the timestamp from the click event that -initiated the drag - - - - The begin_resize_drag() method starts -resizing a window from the edge specified by edge. -The mouse button that started the resize is specified by -button; the location, by -root_x and root_y; and the -time of the event, by timestamp. The value of -edge must be one of the . - - This method is used if an application has window resizing -controls. When PyGTK can support it, the resize will be -done using the standard mechanism for the window manager or windowing -system. Otherwise, PyGTK will try to emulate window -resizing, potentially not all that well, depending on the windowing -system. - - - - - gtk.Window.begin_move_drag - - - begin_move_drag - button - root_x - root_y - timestamp - - - - button : - the mouse button that initiated the -drag - - - root_x : - the X position where the user clicked to -initiate the drag, in root window coordinates - - - root_y : - the Y position where the user clicked to -initiate the drag - - - timestamp : - the timestamp from the click event that -initiated the drag - - - - The begin_move_drag() method starts -moving a window when the user presses the mouse button specified by -button at the location specified by -root_x and root_y at the time -specified by timestamp. This method is used if an -application has window movement grips. When PyGTK can -support it, the window movement will be done using the standard mechanism -for the window manager or windowing system. Otherwise, -PyGTK will try to emulate window movement, potentially -not all that well, depending on the windowing system. - - - - - gtk.Window.set_default_size - - - set_default_size - width - height - - - - width : - the width in pixels, or -1 to unset the default -width - - - height : - the height in pixels, or -1 to unset the -default height - - - - The set_default_size() method sets the -default size of the window to the specified width and -height. If the window's "natural" size (its size -request) is larger than the default, the default will be ignored. More -generally, if the default size does not obey the geometry hints for the -window (the set_geometry_hints() -method can be used to set these explicitly), the default size will be -clamped to the nearest permitted size. - - Unlike the gtk.Widget.set_size_request() -method, which sets a size request for a widget and thus would keep users -from shrinking the window, this method only sets the initial size, just as -if the user had resized the window themselves. Users can still shrink the -window again as they normally would. Setting a default size of -1 means to -use the "natural" default size (the size request of the window). For more -control over a window's initial size and how resizing works, investigate the -set_geometry_hints() -method. - - For some uses, the resize() -method is more appropriate as it changes the current size of the window, -rather than the size to be used on initial display. The resize() -method always affects the window itself, not the geometry widget. The -default size of a window only affects the first time a window is shown; if a -window is hidden and re-shown, it will remember the size it had prior to -hiding, rather than using the default size. Windows can't actually be 0x0 in -size, they must be at least 1x1, but passing 0 for -width and height is OK, -resulting in a 1x1 default size. - - - - - gtk.Window.get_default_size - - - get_default_size - - - - - Returns : - a tuple containing the default width and height -of the window - - - - The get_default_size() method returns a -tuple containing the default width and height of the window. A value of -1 -for the returned width or height indicates that a default size has not been -explicitly set for that dimension, so the "natural" size of the window will -be used. See the set_default_size() -method for more information - - - - - gtk.Window.resize - - - resize - width - height - - - - width : - the width in pixels to resize the window -to - - - height : - the height in pixels to resize the window -to - - - - - The resize() method resizes the window -to the specified width and -height as if the user had done so, obeying geometry -constraints. The default geometry constraint is that windows may not be -smaller than their size request; to override this constraint, call the gtk.Widget.set_size_request() -method to set the window's request to a smaller value. If the -resize() method is called before showing a window -for the first time, it overrides any default size set with the set_default_size() -method. Windows may not be resized smaller than 1 by 1 pixels. - - - - - gtk.Window.get_size - - - get_size - - - - - Returns : - a tuple containing the width and height of the -window - - - - The get_size() method returns a tuple -containing the current width and height of the window. If the window is not -on-screen, it returns the size PyGTK will suggest to the -window manager for the initial window size (but this is not reliably the -same as the size the window manager will actually select). The size obtained -by the get_size() method is the last size received -in a configure event, that is, PyGTK uses its -locally-stored size, rather than querying the X server for the size. As a -result, if you call the resize() -method then immediately call the get_size() method, -the size won't have taken effect yet. After the window manager processes the -resize request, PyGTK receives notification that the size has changed via a -configure event, and the size of the window gets updated. - - - Nearly any use of this method creates a race condition, -because the size of the window may change between the time that you get the -size and the time that you perform some action assuming that size is the -current size. To avoid race conditions, connect to "configure_event" on the -window and adjust your size-dependent state to match the size delivered in -the configure event. - - The returned size does not include the -size of the window manager decorations (aka the window frame or border). -Those are not drawn by PyGTK which has no reliable method -of determining their size. - - If you are getting a window size in order to position the -window on-screen, there may be a better way. The preferred way is to simply -set the window's semantic type with the set_type_hint() -method, that allows the window manager to center dialogs, etc. Also, if you -set the transient parent of dialogs with the set_transient_for() -method, window managers will often center the dialog over its parent window. -It's much preferred to let the window manager handle these things rather -than doing it yourself, because all apps will behave consistently and -according to user prefs if the window manager handles it. Also, the window -manager can take the size of the window decorations/border into account, -while your application cannot. - - In any case, if you insist on application-specified window -positioning, there's still a better way than doing it -yourself - the set_position() -method will frequently handle the details for you. - - - - - - gtk.Window.move - - - move - x - y - - - - x : - the X coordinate to move window -to - - - y : - the Y coordinate to move window -to - - - - The move() method asks the window -manager to move the window to the position specified by -x and y. Window managers are -free to ignore this. In fact, most window managers ignore requests for -initial window positions (instead using a user-defined placement algorithm) -and honor requests after the window has already been shown. - - The position is the position of the gravity-determined -reference point for the window. The gravity determines two things: first, -the location of the reference point in root window coordinates; and second, -which point on the window is positioned at the reference point. By default -the gravity is gtk.gdk.GRAVITY_NORTH_WEST, so the -reference point is simply the x, -y supplied to the move() -method. The top-left corner of the window decorations (aka window frame or -border) will be placed at x, -y. Therefore, to position a window at the top left of -the screen, you want to use the default gravity (which is -gtk.gdk.GRAVITY_NORTH_WEST) and move the window to -0,0. - - To position a window at the bottom right corner of the screen, -you would set gtk.gdk.GRAVITY_SOUTH_EAST, which means -that the reference point is at x + the window width -and y + the window height, and the bottom-right -corner of the window border will be placed at that reference point. So, to -place a window in the bottom right corner you would first set gravity to -south east, then move the window: - - - window.set_gravity(gtk.gdk.GRAVITY_SOUTH_EAST) - width, height = window.get_size() - window.move(gtk.gdk.screen_width() - width, gtk.gdk.screen_height() - height) - - - The Extended -Window Manager Hints specification has a nice table of gravities in -the "implementation notes" section. The get_position() -method documentation may also be relevant. - - - - - gtk.Window.get_position - - - get_position - - - - - Returns : - a tuple containing the X and Y coordinates of -the gravity-determined reference point - - - - The get_position() method returns a -tuple containing the x and y coordinates of the window that you would need -to pass to the move() -method to keep the window in its current position. This means that the -meaning of the returned value varies with window gravity. See the move() -method for more details. If you haven't changed the window gravity, its -gravity will be gtk.gdk.GRAVITY_NORTH_WEST. This means -that the get_position() method gets the position of -the top-left corner of the window manager frame for the window. The move() -method sets the position of this same top-left corner. - - The get_position() method is not 100% -reliable because the X Window System does not specify a way to obtain the -geometry of the decorations placed on a window by the window manager. Thus -PyGTK is using a "best guess" that works with most window -managers. Moreover, nearly all window managers are historically broken with -respect to their handling of window gravity. So moving a window to its -current position as returned by the get_position() -method tends to result in moving the window slightly. Window managers are -slowly getting better over time. - - If a window has gravity -gtk.gdk.GRAVITY_STATIC the window manager frame is not -relevant, and thus the get_position() method will -always produce accurate results. However you can't use static gravity to do -things like place a window in a corner of the screen, because static gravity -ignores the window manager decorations. If you are saving and restoring your -application's window positions, you should know that it's impossible for -applications to do this without getting it somewhat wrong because -applications do not have sufficient knowledge of window manager state. The -correct mechanism is to support the session management protocol (see the -"GnomeClient" object in the GNOME libraries for example) and allow the -window manager to save your window sizes and positions. - - - - - gtk.Window.parse_geometry - - - parse_geometry - geometry - - - - geometry : - the geometry string - - - Returns : - True if string was parsed -successfully - - - - The parse_geometry() method parses the -standard X Window System geometry string specified by -geometry. The geometry string has the format -"WIDTHxHEIGHT+XOFFSET+YOFFSET" where WIDTH, HEIGHT, XOFFSET and YOFFSET are -specified in pixels (see the X documentation for more details). This method -works work on all PyGTK ports including Win32 but is -primarily intended for an X environment. If either a size or a position can -be extracted from the geometry string, the -parse_geometry() method returns -True and calls the set_default_size() -and move() -methods to resize and move the window. - - If the parse_geometry() method returns -True, it will also set the -gtk.gdk.HINT_USER_POS and -gtk.gdk.HINT_USER_SIZE hints indicating to the window -manager that the size and position of the window was user-specified. This -causes most window managers to honor the geometry. - - - - - gtk.Window.reshow_with_initial_size - - - reshow_with_initial_size - - - - The reshow_with_initial_size() method -hides the window, then reshows it, resetting the default size and position -of the window. Used by GUI builders only. - - - - - gtk.Window.tooltips_get_info_from_tip_window - - - tooltips_get_info_from_tip_window - - - - - Returns : - a 2-tuple containing the gtk.Tooltips - and gtk.Widget - displayed in the window or None. - - - - - This method is available in PyGTK 2.4 and above. - - - The tooltips_get_info_from_tip_window() -method returns a 2-tuple containing the gtk.Tooltips and -gtk.Widget -displayed in the window. If the window is not displaying tooltips this -method returns None. This method is mostly intended for use by accessibility -technologies - applications should have little use for it. - - - - - gtk.Window.set_focus_on_map - - - set_focus_on_map - setting - - - - setting : - If True this window would -like to receive focus when mapped. - - - - - This method is available in PyGTK 2.6 and above. - - - The set_focus_on_map() method sets the -"focus-on-map" property to the value of setting. If -setting is True a hint is set -asking the desktop environment to give focus to the window when it is -mapped. - - - - - gtk.Window.get_focus_on_map - - - get_focus_on_map - - - - - Returns : - True if the window would -like to receive focus when mapped. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_focus_on_map() method returns -the value of the "focus-on-map" property. See the set_focus_on_map() -method for more information. - - - - - gtk.Window.set_icon_name - - - set_icon_name - name - - - - name : - the name of the themed icon or -None - - - - - This method is available in PyGTK 2.6 and above. - - - The set_icon_name() method sets the -"icon-name" property to the value of name. If -name is None, then the default -themed icon will be used. The "icon-name" property contains the name of the -icon used for the window. See the gtk.IconTheme -reference for more information. - - - - - gtk.Window.get_icon_name - - - get_icon_name - - - - - Returns : - The name of the themed icon used for the -window icon or None if no icon is set. - - - - - This method is available in PyGTK 2.6 and above. - - - The get_icon_name() method returns the -name of the themed icon for the window, see the set_icon_name() -method for more information. - - - - - gtk.Window.set_urgency_hint - - - set_urgency_hint - urgency_hint - - - - urgency_hint : - if True mark this window -as needing urgent attention. - - - - - This method is available in PyGTK 2.8 and above. - - - The set_urgency_hint() method sets the -"urgency-hint" property to the value of -urgency_hint. If the "urgency-hint" property is True -the window sets a hint to the desktop environment to draw the users -attention to the window. - - - - - gtk.Window.get_urgency_hint - - - get_urgency_hint - - - - - Returns : - True if the window is marked -as needing urgent user attention. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_urgency_hint() method returns -the value of the "urgency-hint" property. See the set_urgency_hint() -method for more information. - - - - - gtk.gdk.Window.present_with_time - - - present_with_time - timestamp - - - - timestamp : - the timestamp of the user interaction (typically -a button or key press event) which triggered this call - - - - - This method is available in PyGTK 2.8 and above. - - - The present_with_time() method presents -a window to the user in response to a user interaction. If you need to -present a window without a timestamp, use the present() -method. - - - - - gtk.Window.set_deletable - - - set_deletable - setting - - - - - setting : - if True decorate the window - as deletable - - - - - This method is available in PyGTK 2.10 and above. - - - By default, windows have a close button in the window - frame. Some window managers allow GTK+ to disable this button. If you - set the deletable property to False using this - method, GTK+ will do its best to convince the window manager not to - show a close button. Depending on the system, this method may not have - any effect when called on a window that is already visible, so you - should call it before calling - gtk_window_show(). - - On Windows, this method always works, since there's no window - manager policy involved. - - - - - gtk.Window.get_deletable - - - get_deletable - - - - - - Returns : - True if the window has been - set to have a close button - - - - - This method is available in PyGTK 2.10 and above. - - - Returns whether the window has been set to have a close button - via the gtk.Window.set_deletable() - method. - - - - - gtk.Window.get_group - - - get_group - - - - - - Returns : - the gtk.WindowGroup - for a window or the default group - - - - - This method is available in PyGTK 2.10 and above. - - - Returns the gtk.WindowGroup - or the default group, if the window does not have an explicit window - group. - - - - - - - Functions - - - gtk.window_set_default_icon_list - - - gtk.window_set_default_icon_list - ... - - - - - - ... : - zero or more gtk.gdk.Pixbuf -objects - - - - The gtk.window_set_default_icon_list() -function sets an icon list to be used as fallback for windows that haven't -had the set_icon_list() -method called on them to set up a window-specific icon list. This function -allows you to set up the icon for all windows in your app at once. See the -set_icon_list() -method documentation for more details. - - - - - gtk.window_set_default_icon - - - gtk.window_set_default_icon - icon - - - - - - icon : - a gtk.gdk.Pixbuf - - - - - This function is available in PyGTK 2.4 and above. - - - The gtk.window_set_default_icon() function -sets an icon specified by icon to be used as the -fallback for windows that haven't had the set_icon() -method called on them to set up a window-specific icon. This function allows -you to set up the icon for all windows in your app at once. - - - - - gtk.window_set_default_icon_from_file - - - gtk.window_set_default_icon_from_file - filename - - - - - - filename : - an icon file name - - - - - This function is available in PyGTK 2.2 and above. - - - The gtk.window_set_default_icon_from_file() -function sets an icon contained in the file specified by -filename to be used as the fallback for windows that -haven't had the set_icon() -method called on them to set up a window-specific icon. This function allows -you to set up the icon for all windows in your app at once. - - The GError exception is raised if an error occurs while loading -the icon pixbuf from filename. - - - - - gtk.window_get_default_icon_list - - - gtk.window_get_default_icon_list - - - - - - Returns : - a copy of the applications default icon -list - - - - The gtk.window_get_default_icon_list() -function returns the application's default icon list as set by the gtk.window_set_default_icon_list() -function. See the set_icon_list() -method documentation for more details. - - - - - gtk.window_set_auto_startup_notification - - - gtk.window_set_auto_startup_notification - - - - - setting : - if True, automatically do - startup notification - - - - - This function is available in PyGTK 2.2 and above. - - - The -gtk.window_set_auto_startup_notification() function -sets the auto startup notification setting to the value of setting. If setting is True startup notification will be done automatically. - - By default, after showing the first gtk.Window for each -gtk.gdk.Screen, GTK+ -calls the gdk_notify_startup_complete() function. Call -this function to disable the automatic startup notification. You might do -this if your first window is a splash screen, and you want to delay -notification until after your real main window has been shown. In that -example, you would disable startup notification temporarily, show your -splash screen, then re-enable it so that showing the main window would -automatically result in notification. - - - - - gtk.window_list_toplevels - - - gtk.window_list_toplevels - - - - - Returns : - a list of all the toplevel gtk.Window -widgets - - - - The gtk.window_list_toplevels() function -returns a list of all the toplevel gtk.Window widgets -in the application. - - - - - gtk.window_set_default_icon_name - - - gtk.window_set_default_icon_name - - - - - setting : - if True, automatically do - startup notification - - - - - This function is available in PyGTK 2.6 and above. - - - The gtk.window_set_default_icon_name() -function sets an icon to be used as fallback for windows that haven't had -the set_icon_list() -method called on them from a named themed icon, see the set_icon_name() -method. - - - - - - - Signals - - - The "activate-default" gtk.Window Signal - - - callback - window - user_param1 - ... - - - - - window : - the window that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "activate-default" signal is emitted when the default child -widget of window is activated usually by the user -pressing the Return or Enter key. - - - - - The "activate-focus" gtk.Window Signal - - - callback - window - user_param1 - ... - - - - - window : - the window that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "activate-focus" signal is emitted when the child widget -with the focus is activated usually by the user pressing the -Space key. - - - - - The "frame-event" gtk.Window Signal - - - callback - window - event - user_param1 - ... - - - - - window : - the window that received the -signal - - - event : - the event that triggered the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - Returns : - True to stop other handlers - from being invoked for the event. False to - propagate the event further. - - - - The "frame-event" signal is emitted when an event other than key -press or release or focus change is received on the window's frame. - - - - - The "keys-changed" gtk.Window Signal - - - callback - window - user_param1 - ... - - - - - window : - the window that received the -signal - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "keys-changed" signal is emitted when a mnemonic accelerator -is added, removed or changed or the mnemonic modifier is set. - - - - - The "move-focus" gtk.Window Signal - - - callback - window - direction - user_param1 - ... - - - - - window : - the window that received the -signal - - - direction : - the move direction: -gtk.DIR_TAB_FORWARD, -gtk.DIR_TAB_BACKWARD, gtk.DIR_UP, -gtk.DIR_DOWN, gtk.DIR_LEFT or -gtk.DIR_RIGHT - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "move-focus" signal is emitted when the focus is changed -within the window's child widgets. Usually this happens when the user -presses the Tab, the ShiftTab or the -Up, Down, Left or -Right arrow keys. - - - - - The "set-focus" gtk.Window Signal - - - callback - window - widget - user_param1 - ... - - - - - window : - the window that received the -signal - - - widget : - the widget that receives the -focus - - - user_param1 : - the first user parameter (if any) specified -with the connect() -method - - - ... : - additional user parameters (if -any) - - - - The "set-focus" signal is emitted when the focus changes to widget in window. - - - - - -
diff --git a/docs/reference/pygtk-gtkwindowgroup.xml b/docs/reference/pygtk-gtkwindowgroup.xml deleted file mode 100644 index e9306c14..00000000 --- a/docs/reference/pygtk-gtkwindowgroup.xml +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - gtk.WindowGroup - a group of gtk.Window -widgets - - - - Synopsis - - - gtk.WindowGroup - gobject.GObject - - gtk.WindowGroup - - - add_window - window - - - remove_window - window - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.WindowGroup - - - - - - gtk.WindowGroup Signal Prototypes - - gobject.GObject Signal Prototypes - - - - Description - - A gtk.WindowGroup -object contains a set of gtk.Window widgets -that are managed together by some PyGTK functions and -methods. - - - - - Constructor - - - gtk.WindowGroup - - - - Returns : - a new gtk.WindowGroup. - - - - Creates a new gtk.WindowGroup -object. Grabs added with gtk.Widget.grab_add() -only affect windows within the same gtk.WindowGroup. - - - - - Methods - - - gtk.WindowGroup.add_window - - - add_window - window - - - - window : - the gtk.Window to -add - - - - The add_window() method adds the gtk.Window specified -by window to the windowgroup. - - - - - gtk.WindowGroup.remove_window - - - remove_window - window - - - - window : - the gtk.Window to -remove - - - - The remove_window() method removes the -gtk.Window -specified by window from the windowgroup. - - - - - - diff --git a/docs/reference/pygtk-hierarchy.xml b/docs/reference/pygtk-hierarchy.xml deleted file mode 100644 index 40640f87..00000000 --- a/docs/reference/pygtk-hierarchy.xml +++ /dev/null @@ -1,230 +0,0 @@ - - -gobject.GBoxed - gtk.Border - gtk.IconInfo - gtk.IconSet - gtk.IconSource - gtk.Requisition - gtk.SelectionData - gtk.TextAttributes - gtk.TextIter - gtk.TreeIter - gtk.TreeRowReference - gtk.gdk.Color - gtk.gdk.Cursor - gtk.gdk.Event - gtk.gdk.Rectangle - pango.AttrList - pango.Color - pango.FontDescription - pango.FontMetrics - pango.GlyphString - pango.Language - pango.LayoutLine - pango.TabArray -gobject.GInterface - gtk.CellEditable - gtk.CellLayout - gtk.Editable - gtk.FileChooser - gtk.TreeDragDest - gtk.TreeDragSource - gtk.TreeModel - gtk.TreeSortable -gobject.GObject - gtk.AccelGroup - gtk.Action - gtk.ToggleAction - gtk.RadioAction - gtk.ActionGroup - gtk.Clipboard - gtk.EntryCompletion (implements gtk.CellLayout) - gtk.GenericTreeModel (implements gtk.TreeModel) - gtk.IconFactory - gtk.IconTheme - gtk.ListStore (implements gtk.TreeModel, gtk.TreeDragSource, gtk.TreeDragDest, gtk.TreeSortable) - gtk.Object - gtk.Adjustment - gtk.CellRenderer - gtk.CellRendererPixbuf - gtk.CellRendererText - gtk.CellRendererCombo - gtk.CellRendererProgress - gtk.CellRendererToggle - gtk.GenericCellRenderer - gtk.FileFilter - gtk.IMContext - gtk.IMContextSimple - gtk.IMMulticontext - gtk.Tooltips - gtk.TreeViewColumn (implements gtk.CellLayout) - gtk.Widget - gtk.Calendar - gtk.CellView - gtk.Container - gtk.Bin - gtk.Alignment - gtk.Button - gtk.ColorButton - gtk.FontButton - gtk.ToggleButton - gtk.CheckButton - gtk.RadioButton - gtk.ComboBox (implements gtk.CellLayout) - gtk.ComboBoxEntry (implements gtk.CellLayout) - gtk.EventBox - gtk.Expander - gtk.Frame - gtk.AspectFrame - gtk.HandleBox - gtk.Item - gtk.MenuItem - gtk.CheckMenuItem - gtk.RadioMenuItem - gtk.ImageMenuItem - gtk.SeparatorMenuItem - gtk.TearoffMenuItem - gtk.ScrolledWindow - gtk.ToolItem - gtk.SeparatorToolItem - gtk.ToolButton - gtk.MenuToolButton - gtk.ToggleToolButton - gtk.RadioToolButton - gtk.Viewport - gtk.Window - gtk.Dialog - gtk.AboutDialog - gtk.ColorSelectionDialog - gtk.FileChooserDialog (implements gtk.FileChooser) - gtk.FileSelection - gtk.FontSelectionDialog - gtk.InputDialog - gtk.MessageDialog - gtk.Plug - gtk.Box - gtk.ButtonBox - gtk.HButtonBox - gtk.VButtonBox - gtk.HBox - gtk.FileChooserButton - gtk.Statusbar - gtk.VBox - gtk.ColorSelection - gtk.FileChooserWidget (implements gtk.FileChooser) - gtk.FontSelection - gtk.GammaCurve - gtk.Fixed - gtk.IconView - gtk.Layout - gtk.MenuShell - gtk.Menu - gtk.MenuBar - gtk.Notebook - gtk.Paned - gtk.HPaned - gtk.VPaned - gtk.Socket - gtk.Table - gtk.TextView - gtk.Toolbar - gtk.TreeView - gtk.DrawingArea - gtk.Curve - gtk.Entry (implements gtk.Editable, gtk.CellEditable) - gtk.SpinButton - gtk.Invisible - gtk.Misc - gtk.Arrow - gtk.Image - gtk.Label - gtk.AccelLabel - gtk.ProgressBar - gtk.Range - gtk.Scale - gtk.HScale - gtk.VScale - gtk.Scrollbar - gtk.HScrollbar - gtk.VScrollbar - gtk.Ruler - gtk.HRuler - gtk.VRuler - gtk.Separator - gtk.HSeparator - gtk.VSeparator - gtk.RcStyle - gtk.Settings - gtk.SizeGroup - gtk.Style - gtk.TextBuffer - gtk.TextChildAnchor - gtk.TextMark - gtk.TextTag - gtk.TextTagTable - gtk.TreeModelFilter (implements gtk.TreeModel, gtk.TreeDragSource) - gtk.TreeModelSort (implements gtk.TreeModel, gtk.TreeSortable) - gtk.TreeSelection - gtk.TreeStore (implements gtk.TreeModel, gtk.TreeDragSource, gtk.TreeDragDest, gtk.TreeSortable) - gtk.UIManager - gtk.WindowGroup - gtk.gdk.Colormap - gtk.gdk.Device - gtk.gdk.Display - gtk.gdk.DisplayManager - gtk.gdk.DragContext - gtk.gdk.Drawable - gtk.gdk.Pixmap - gtk.gdk.Window - gtk.gdk.GC - gtk.gdk.Image - gtk.gdk.Keymap - gtk.gdk.Pixbuf - gtk.gdk.PixbufAnimation - gtk.gdk.PixbufAnimationIter - gtk.gdk.PixbufLoader - gtk.gdk.Screen - gtk.gdk.Visual - pango.Context - pango.Font - pango.FontFace - pango.FontFamily - pango.FontMap - pangocairo.CairoFontMap - pango.Fontset - pango.FontsetSimple - pango.Layout - pango.Renderer - gtk.gdk.PangoRenderer -gobject.GPointer -cairo.Context - pangocairo.CairoContext - gtk.gdk.CairoContext - diff --git a/docs/reference/pygtk-introduction.xml b/docs/reference/pygtk-introduction.xml deleted file mode 100644 index 93675af7..00000000 --- a/docs/reference/pygtk-introduction.xml +++ /dev/null @@ -1,515 +0,0 @@ - - - - - Introduction - - This document describes most of the PyGTK version - 2.0 through 2.10 classes and their methods and associated - functions. Deprecated classes, functions and methods have been - specifically left out of this reference though classes that have become - deprecated since PyGTK 2.0 have been left in but annotated with a - deprecation warning. This document attempts to document as much of the - PyGTK API as possible but there are - undoubtedly errors and omissions. If you discover any of these please file - a bug report at bugzilla.gnome.org for the - pygtk project. Specific areas that have not been - documented include: - - - - The Cairo classes - - - - This reference describes the API for PyGTK as of - version 2.9.0+ and assumes that the additional API changes for version - 2.10 may not be significant. There will undoubtedly be changes that are - not reflected in this reference. The differences in the API between - version 2.0 and previous versions are denoted in this reference with a - Note that describes the availability of the object, constructor, method or - function. Any of these that do not have a notation can be assumed to be - available in all versions of PyGTK from 2.0 and up. In the case of - properties and signals the availability is dependent on the version of the - underlying GTK+, GDK or Pango libraries. These will be annotated - appropriately in a similar fashion. The source code must be consulted if - this reference and your version of PyGTK seem to - differ. You are encouraged to use the latest version of - PyGTK that is available. See the PyGTK homepage for - more information and more resources on how to use PyGTK as well as help in - its development. - - The Reference contains a chapter for each PyGTK - module (that corresponds to the underlying GTK+ - library) containing the class descriptions. The second chapter illustrates - the PyGTK class hierarchy covering the gobject, gtk, - gtk.gdk and pango modules. - - The class descriptions are arranged alphabetically within the - chapters. Currently there are five module chapters: - - - - The atk module - The classes that are included in the - atk module of PyGTK and are - accessed similar to: atk.Object. These classes are the base object - classes that provide accessibility support for the - gtk module classes. - - - - The gtk module - The classes that are included in the - gtk module of PyGTK and are - accessed similar to: gtk.Widget. These classes are the "higher" level - widget classes that provide most of the user interface widgets used - for application development. - - - - The gtk.gdk module - The classes that are included in the - gtk.gdk module of PyGTK. These - classes are "lower" level classes that provide more fundamental - capabilities that the gtk module widgets are built - upon. These classes provide an abstract interface to the underlying - window system (either X Window System or Microsoft Windows). - - - - The gtk.glade module - The classes that are included in the - gtk.glade module of PyGTK. These - classes provide access to the libglade functions that allow the - dynamic loading of user interfaces from XML descriptions. - - - - The pango module - - The classes that are included in the - pango module of PyGTK. These - classes provide access to the Pango text layout and rendering - engines. PyGTK supports a subset of the full Pango capability: - mainly the high level layout capabilities exposed by the - pango.Layout objects. The low level rendering capabilities have not - been exposed mostly because there isn't a full GObject interface to - the underlying Pango data structures. It's also likely that the - rendering capabilities require more performance that Python can - provide. - - - - - The gobject module is documented in the PyGObject Reference Manual. - - - Major Changes since Version 1.9 - - The major changes in this document since version 1.9 -include: - - - - descriptions of new GTK+ 2.2 and 2.4 classes: - - - - gobject.GBoxed - - - gobject.GPointer - - - gobject.GInterface - - - gobject.MainContext - - - gobject.MainLoop - - - gtk.Action - - - gtk.ActionGroup - - - gtk.Border - - - gtk.Clipboard - - - gtk.ColorButton - - - gtk.ComboBox - - - gtk.ComboBoxEntry - - - gtk.EntryCompletion - - - gtk.Expander - - - gtk.FileChooser - - - gtk.FileChooserDialog - - - gtk.FileChooserWidget - - - gtk.FileFilter - - - gtk.FontButton - - - gtk.IconInfo - - - gtk.IconTheme - - - gtk.RadioAction - - - gtk.RadioToolButton - - - gtk.SeparatorToolItem - - - gtk.ToggleAction - - - gtk.ToggleToolButton - - - gtk.ToolButton - - - gtk.ToolItem - - - gtk.TreeModelFilter - - - gtk.TreeRowReference - - - gtk.UIManager - - - gtk.gdk.Atom - - - gtk.gdk.Display - - - gtk.gdk.DisplayManager - - - gtk.gdk.Screen - - - pango.FontsetSimple - - - - - - Descriptions of new GTK+ 2.6 classes: - - - - gtk.AboutDialog - - - gtk.CellRendererCombo - - - gtk.CellRendererProgress - - - gtk.CellView - - - gtk.FileChooserButton - - - gtk.IconView - - - gtk.MenuToolButton - - - - - - a reference page in each module chapter containing -descriptions of or links to all of the functions defined in a module. - - - a reference page in each module chapter containing -descriptions of all of the constants defined in a module. - - - additional methods, functions, properties and signals added - for GTK+ 2.2, GTK+ 2.4, GTK+ 2.6, PyGTK 2.2, PyGTK 2.4, PyGTK 2.6, - PyGTK 2.8 and PyGTK 2.10. - - - Descriptions of new GTK+ 2.10 classes: - - - - gtk.Assistant - - - gtk.CellRendererAccel - - - gtk.CellRendererSpin - - - gtk.LinkButton - - - gtk.PageSetup - - - gtk.PaperSize - - - gtk.PrintContext - - - gtk.PrintOperation - - - gtk.PrintOperationPreview - - - gtk.PrintSettings - - - gtk.RecentChooserDialog - - - gtk.RecentChooserMenu - - - gtk.RecentChooserWidget - - - gtk.RecentChooser - - - gtk.RecentFilter - - - gtk.RecentInfo - - - gtk.RecentManager - - - gtk.StatusIcon - - - - - - new in PyGTK 2.10, the Unix print module - gtkunixprint. - - - documentation on the Accessibilty Tool Kit - atk. - - - - - - - Reference Page Format - - Each PyGTK class is described in a reference -page that has a number of sections in a fixed format. Each reference page -will have a subset of the following sections: - - - - Name - - The name and a one-line description of the -class. - - - - Synopsis - - A synopsis of the class and its methods and -optionally a list of associated functions. - - - - Ancestry - - The list of the parent classes of the class. This -section may not be present in all class descriptions. - - - - Properties - - A list of the properties (internal state) -supported by the class. This section may not be present in all classes. The -property descriptions include the name, the access operations (e.g. Read, -Write), and a brief description. Properties are accessed using the gobject.set_property() -and gobject.get_property() -methods that are available to every PyGTK object. This -section may not be present in all class descriptions. - - - - Style Properties - - A list of style properties supported by the -class. Similar to the properties (described above) the style properties hold -information about the style of a widgets e.g. border style, shadow type, -etc. Most widgets do not support style properties so this section is not -present in most class descriptions. Only PyGTK 2.4 has the ability to access -style properties. - - - - Child Properties - - A list of child properties supported by the -class. Similar to the properties (described above) the child properties hold -information about the properties of a widget's child widget. Only container -widgets support child properties so this section is not present in most -class descriptions. - - - - Attributes - - A set of internal object state data accessible as -Python attributes (e.g. object.attr). The attribute descriptions include a -name by which the attribute data is accessed, the access mode (e.g. Read, -Write), and a brief description of the attribute. Most -PyGTK classes do not support attributes so this section -is not present in most class descriptions. - - - - Signal Prototypes - - A list of the signals supported by the class -including the signal name and a synopsis of the signal handler function -prototype. This section may not be present in all class descriptions; most -gtk.gdk classes do not support signals. - - - - Description - A description of the class and possibly some of -the methods supported by the class. - - - - Constructor - - The description of the class object constructor -including the synopsis with brief parameter descriptions and a description -of th use of the constructor. There may be more than one constructor -description if the constructor supports different parameter lists. This -section may not be present in all class descriptions. - - - - Methods - - A list of methods supported by the class. Each -method description includes: a synopsis of the method and its parameters as -well as a brief description of each parameter and return value (if any); -and, a description of the use of the method. - - - - Functions - - A list of related functions. Each function -description includes a synopsis of the function and its parameters and -return value (if any), and a description of the use of the -function. - - - - Signals - - A list of signals including a synopsis of the -signal handler prototype function with its parameters and return value (if -any). The signal emission conditions are briefly described. This section is -not present in all class descriptions; specifically, the -gtk.gdk classes do not usually support signals. - - - - - The function and method synopsis parameters are displayed in -bold to denote Python keyword parameters. -Also if the parameter is optional its default value will be displayed. For -example the gtk.Button() -constructor synopsis is: - - - - gtk.Button - labelNone - stockNone - - - - The parameters label and -stock are keyword parameters that can be specified in -a call either by position or keyword (in which case position is not -important). The following calls have the same result: - - - b = gtk.Button("Cancel") - b = gtk.Button(label="Cancel") - b = gtk.Button("Cancel", None) - b = gtk.Button("Cancel", stock=None) - b = gtk.Button(stock=None, label="Cancel") - - - Parameters that are not keyword parameters are displayed in - italic and must be specified positionally but may - also be optional. - - - - diff --git a/docs/reference/pygtk-pango-classes.xml b/docs/reference/pygtk-pango-classes.xml deleted file mode 100644 index 80e0203a..00000000 --- a/docs/reference/pygtk-pango-classes.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - The pango Class Reference - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/docs/reference/pygtk-pango-constants.xml b/docs/reference/pygtk-pango-constants.xml deleted file mode 100644 index b10cafb5..00000000 --- a/docs/reference/pygtk-pango-constants.xml +++ /dev/null @@ -1,770 +0,0 @@ - - - - - - pango Constants - the built-in constants of the pango module - - - - Synopsis - - - - - - - - - - - - - - - - - - - - - - - Description - - - Pango Alignment Constants - - The Alignment constants specify how to align the lines of a -pango.Layout -within the available space. If the pango.Layout is -set to justify using the pango.Layout.set_justify() -method, then this only has an effect for partial lines. - - - - pango.ALIGN_LEFT - - Put all available space on the right - - - - pango.ALIGN_CENTER - - Center the line within the available space - - - - pango.ALIGN_RIGHT - - Put all available space on the left - - - - - - - - Pango Attribute Type Constants - - The Attribute Type constants specify the type of a pango.Attribute.Along -with the predefined values, it is possible to allocate additional values for -custom attributes using the pango.attr_type_register() -function. The predefined values are given below. The type of structure used -to store the attribute is listed in parentheses after the -description. - - - - pango.ATTR_LANGUAGE - - Specifies a pango.Language. - - - - pango.ATTR_FAMILY - - Specifies a font family name list as a string. - - - - pango.ATTR_STYLE - - Specifies a font slant style. See the pango.AttrStyle() -function for more details. - - - - pango.ATTR_WEIGHT - - Specifies a font weight. See the pango.AttrWeight() -function for more detail. - - - - pango.ATTR_VARIANT - - Specifies a font variant (normal or small caps). See the -pango.AttrVariant() -function for more detail. - - - - pango.ATTR_STRETCH - - Specifies a font stretch. See the pango.AttrStretch() -function for more details. - - - - pango.ATTR_SIZE - - Specifies a font size in thousandths of a point. - - - - pango.ATTR_FONT_DESC - - Specifies a pango.FontDescription. - - - - pango.ATTR_FOREGROUND - - Specifies a foreground pango.Color. - - - - pango.ATTR_BACKGROUND - - Specifies a background pango.Color. - - - - pango.ATTR_UNDERLINE - - Specifies an underline style. See the pango.AttrUnderline() -function for more details. - - - - pango.ATTR_STRIKETHROUGH - - If True the text is struck -through. - - - - pango.ATTR_RISE - - Specifies the displacement of the text from the -baseline. - - - - pango.ATTR_SHAPE - - Specifies a shape. See the pango.AttrShape() -function for more details. - - - - pango.ATTR_SCALE - - Specifies a font size scale factor. - - - - pango.ATTR_FALLBACK - - if True, fallback to other fonts is - enabled ( - - - - - - - - Pango Coverage Level Constants - - - - - - pango.COVERAGE_NONE - - The character is not representable with the - font. - - - - pango.COVERAGE_FALLBACK - - The character is represented in a way that may be - comprehensible but is not the correct graphical form. For - instance, a Hangul character represented as a a sequence of - Jamos, or a Latin transliteration of a Cyrillic word. - - - - pango.COVERAGE_APPROXIMATE - - The character is represented as basically the correct - graphical form, but with a stylistic variant inappropriate for - the current script. - - - - pango.COVERAGE_EXACT - - The character is represented as the correct graphical - form. - - - - - - - - Pango Direction Constants - - The pango Direction constants specify a direction in the Unicode -bidirectional algorithm. Not every value in this enumeration makes sense for -every usage of pango Direction. - - The pango.DIRECTION_TTB_LTR, -pango.DIRECTION_TTB_RTL values come from an earlier -interpretation of this enumeration as the writing direction of a block of -text and are no longer used; See the Text module of the CSS3 spec for how -vertical text is planned to be handled in a future version of Pango. The -explanation of why pango.DIRECTION_TTB_LTR is treated as -pango.DIRECTION_RTL can be found there as well. - - - - pango.DIRECTION_LTR - - A strong left-to-right direction - - - - pango.DIRECTION_RTL - - A strong right-to-left direction - - - - pango.DIRECTION_TTB_LTR - - Deprecated value; treated the same as - pango.DIRECTION_RTL. - - - - pango.DIRECTION_TTB_RTL - - Deprecated value; treated the same as - pango.DIRECTION_LTR - - - - pango.DIRECTION_WEAK_LTR - - A weak left-to-right direction - - - - pango.DIRECTION_WEAK_RTL - - A weak right-to-left direction - - - - pango.DIRECTION_NEUTRAL - - No direction specified - - - - - - - - Pango Ellipsize Mode Constants - - The Ellipsize Mode constants specify what sort of (if any) -ellipsization should be applied to a line of text. In the ellipsization -process characters are removed from the text in order to make it fit to a -given width and replaced with an ellipsis (...). - - - - pango.ELLIPSIZE_NONE - - No ellipsization. - - - - pango.ELLIPSIZE_START - - Omit characters at the start of the text. - - - - pango.ELLIPSIZE_MIDDLE - - Omit characters in the middle of the text. - - - - pango.ELLIPSIZE_END - - Omit characters at the end of the text. - - - - - - - - Pango Font Mask Flag Constants - - The Font Mask flag constants are bit-flags that correspond to -fields in a pango.FontDescription -that have been set. - - - - pango.FONT_MASK_FAMILY - - the font family is specified. - - - - pango.FONT_MASK_STYLE - - the font style is specified. - - - - pango.FONT_MASK_VARIANT - - the font variant is specified. - - - - pango.FONT_MASK_WEIGHT - - the font weight is specified. - - - - pango.FONT_MASK_STRETCH - - the font stretch is specified. - - - - pango.FONT_MASK_SIZE - - the font size is specified. - - - - - - - - Pango Render Part Constants - - - - - - pango.RENDER_PART - - The pango.RENDER_PART constants -define different items to render for purposes such as setting -colors. Available since PyGTK 2.8. - - - - pango.RENDER_PART_FOREGROUND - - The text itself. - - - - pango.RENDER_PART_BACKGROUND - - The area behind the text. - - - - pango.RENDER_PART_UNDERLINE - - The underlined areas. - - - - pango.RENDER_PART_STRIKETHROUGH - - The strikethrough areas. - - - - - - - - Pango Scale Constants - - - - - - pango.SCALE - - The pango.SCALE constant represents - the scale between dimensions used for Pango distances and device - units. (The definition of device units is dependent on the - output device; it will typically be pixels for a screen, and - points for a printer.) pango.SCALE is - currently 1024, but this may be changed in the future. When - setting font sizes, device units are always considered to be - points (as in "12 point font"), rather than pixels. - - - - pango.SCALE_XX_SMALL - - The scale factor for three shrinking steps -(1 / (1.2 * 1.2 * 1.2)). - - - - pango.SCALE_X_SMALL - - The scale factor for two shrinking steps -(1 / (1.2 * 1.2)). - - - - pango.SCALE_SMALL - - The scale factor for one shrinking step -(1 / 1.2). - - - - pango.SCALE_MEDIUM - - The scale factor for normal size (1.0). - - - - pango.SCALE_LARGE - - The scale factor for one magnification step -(1.2). - - - - pango.SCALE_X_LARGE - - he scale factor for two magnification steps -(1.2 * 1.2). - - - - pango.SCALE_XX_LARGE - - The scale factor for three magnification steps -(1.2 * 1.2 * 1.2). - - - - - - - - Pango Stretch Constants - - The Stretch constants specify the width of the font relative to -other designs within a family. - - - - pango.STRETCH_ULTRA_CONDENSED - - The most narrow width - - - - pango.STRETCH_EXTRA_CONDENSED - - - - - - pango.STRETCH_CONDENSED - - - - - - pango.STRETCH_SEMI_CONDENSED - - - - - - pango.STRETCH_NORMAL - - The normal width. - - - - pango.STRETCH_SEMI_EXPANDED - - - - - - pango.STRETCH_EXPANDED - - - - - - pango.STRETCH_EXTRA_EXPANDED - - - - - - pango.STRETCH_ULTRA_EXPANDED - - The most expanded width - - - - - - - - Pango Style Constants - - The Style constants specify the various slant styles possible -for a font. - - - - pango.STYLE_NORMAL - - The font is upright. - - - - pango.STYLE_OBLIQUE - - The font is slanted in a roman style. - - - - pango.STYLE_ITALIC - - The font is slanted in an italic style. - - - - - - - - Pango Tab Constants - - The Tab constants specify where a tab stop appears relative to -the text. - - - - pango.TAB_LEFT - - the tab stop appears to the left of the text. - - - - - - - - Pango Underline Constants - - The Underline constants specify he type of underlining (if any) -to be used. - - - - pango.UNDERLINE_NONE - - No underline should be drawn. - - - - pango.UNDERLINE_SINGLE - - A single underline should be drawn. - - - - pango.UNDERLINE_DOUBLE - - A double underline should be drawn. - - - - pango.UNDERLINE_LOW - - A single underline should be drawn at a position -beneath the ink extents of the text being underlined. This should be used -only for underlining single characters, such as for keyboard accelerators. -pango.UNDERLINE_SINGLE should be used for extended -portions of text. - - - - - - - - Pango Variant Constants - - The Variant constants specify the capitalization variant of the -font. - - - - pango.VARIANT_NORMAL - - A normal font. - - - - pango.VARIANT_SMALL_CAPS - - A font with the lower case characters replaced by -smaller variants of the capital characters. - - - - - - - - Pango Weight Constants - - The Weight constants specify the weight (boldness) of a -font. This is a numerical value ranging from 100 to 900, but there are some -predefined values: - - - - pango.WEIGHT_ULTRALIGHT - - The ultralight weight (= 200). - - - - pango.WEIGHT_LIGHT - - The light weight (=300). - - - - pango.WEIGHT_NORMAL - - The default weight (= 400). - - - - pango.WEIGHT_BOLD - - The bold weight (= 700). - - - - pango.WEIGHT_ULTRABOLD - - The ultrabold weight (= 800). - - - - pango.WEIGHT_HEAVY - - The heavy weight (= 900). - - - - - - - - Pango Wrap Mode Constants - - The Wrap Mode constants specify how to wrap the lines of a pango.Layout to -the desired width. - - - - pango.WRAP_WORD - - wrap lines at word boundaries. - - - - pango.WRAP_CHAR - - wrap lines at character boundaries. - - - - pango.WRAP_WORD_CHAR - - wrap lines at word boundaries, but fall back to - character boundaries if there is not enough space for a full - word. - - - - - - - - - diff --git a/docs/reference/pygtk-pango-functions.xml b/docs/reference/pygtk-pango-functions.xml deleted file mode 100644 index 4d8c340c..00000000 --- a/docs/reference/pygtk-pango-functions.xml +++ /dev/null @@ -1,248 +0,0 @@ - - - - - - pango Functions - a list of all the pango functions - - - - Synopsis - - - <link linkend="class-pangoattribute"><classname>pango.Attribute</classname></link> Functions - - - pango.attr_type_register - name - - pango.AttrLanguage - language - start_index - 0 - end_index - 1 - - pango.AttrFamily - family - start_index - 0 - end_index - 1 - - pango.AttrForeground - red - green - blue - start_index - 0 - end_index - 1 - - pango.AttrBackground - red - green - blue - start_index - 0 - end_index - 1 - - pango.AttrSize - size - start_index - 0 - end_index - 1 - - pango.AttrStyle - style - start_index - 0 - end_index - 1 - - pango.AttrWeight - weight - start_index - 0 - end_index - 1 - - pango.AttrVariant - variant - start_index - 0 - end_index - 1 - - pango.AttrStretch - stretch - start_index - 0 - end_index - 1 - - pango.AttrFontDesc - desc - start_index - 0 - end_index - 1 - - pango.AttrUnderline - underline - start_index - 0 - end_index - 1 - - pango.AttrStrikethrough - strikethrough - start_index - 0 - end_index - 1 - - pango.AttrRise - rise - start_index - 0 - end_index - 1 - - pango.AttrShape - ink_rect - logical_rect - start_index - 0 - end_index - 1 - - pango.AttrScale - scale - start_index - 0 - end_index - 1 - - pango.AttrFallback - fallback - start_index - 0 - end_index - 1 - - - - - - <link linkend="class-pangoattrlist"><classname>pango.AttrList</classname></link> Functions - - - pango.parse_markup - markup_text - accel_markeru'\x00' - - - - - - <link linkend="class-pangofont"><classname>pango.Font</classname></link> Functions - - - pango.PIXELS - size - - pango.ASCENT - rect - - pango.DESCENT - rect - - pango.RBEARING - rect - - pango.LBEARING - rect - - - - - - - diff --git a/docs/reference/pygtk-pango-markup.xml b/docs/reference/pygtk-pango-markup.xml deleted file mode 100644 index b7ef3c4f..00000000 --- a/docs/reference/pygtk-pango-markup.xml +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - The Pango Markup Language - a simple markup language for encoding attributes with text. - - - - Description - - The pango markup language is a very simple SGML-like language that -allows you specify attributes with the text they are applied to by using a -small set of markup tags. A simple example of a string using markup -is: - - <span foreground="blue" size="100">Blue text</span> is <i>cool</i>! - - Using the pango markup language to markup text and parsing the -result with the pango.parse_markup() -function is a convenient way to generate the pango.AttrList -and plain text that can be used in a pango.Layout. - - The root tag of a marked-up document is -<markup>, but the pango.parse_markup() -function allows you to omit this tag, so you will most likely never need to -use it. The most general markup tag is <span>. The -<span> tag has the following attributes: - - - - font_desc - - A font description string, such as "Sans Italic 12"; -note that any other span attributes will override this description. So if -you have "Sans Italic" and also a style="normal" attribute, you will get -Sans normal, not italic. - - - - font_family - - A font family name such as "normal", "sans", "serif" or -"monospace". - - - - face - - A synonym for font_family - - - - size - - The font size in thousandths of a point, or one of the -absolute sizes 'xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', -'xx-large', or one of the relative sizes 'smaller' or 'larger'. - - - - style - - The slant style - one of 'normal', 'oblique', or -'italic' - - - - weight - - The font weight - one of 'ultralight', 'light', -'normal', 'bold', 'ultrabold', 'heavy', or a numeric weight. - - - - variant - - The font variant - either 'normal' or -'smallcaps'. - - - - stretch - - The font width - one of 'ultracondensed', -'extracondensed', 'condensed', 'semicondensed', 'normal', 'semiexpanded', -'expanded', 'extraexpanded', 'ultraexpanded'. - - - - foreground - - An RGB color specification such as '#00FF00' or a color -name such as 'red'. - - - - background - - An RGB color specification such as '#00FF00' or a color -name such as 'red'. - - - - underline - - The underline style - one of 'single', 'double', 'low', -or 'none'. - - - - rise - - The vertical displacement from the baseline, in ten -thousandths of an em. Can be negative for subscript, positive for -superscript. - - - - strikethrough - - 'true' or 'false' whether to strike through the -text. - - - - fallback - - If True enable fallback to other fonts -of characters are missing from the current font. If disabled, then -characters will only be used from the closest matching font on the -system. No fallback will be done to other fonts on the system that might -contain the characters in the text. Fallback is enabled by default. Most -applications should not disable fallback. - - - lang - - A language code, indicating the text -language. - - - - - There are a number of convenience tags that encapsulate specific -span options: - - - - b - - Make the text bold. - - - - big - - Makes font relatively larger, equivalent to <span -size="larger">. - - - - i - - Make the text italic. - - - - s - - Strikethrough the text. - - - - sub - - Subscript the text. - - - - sup - - Superscript the text. - - - - small - - Makes font relatively smaller, equivalent to <span -size="smaller">. - - - - tt - - Use a monospace font. - - - - u - - Underline the text. - - - - - - - diff --git a/docs/reference/pygtk-pangoattribute.xml b/docs/reference/pygtk-pangoattribute.xml deleted file mode 100644 index f99edb50..00000000 --- a/docs/reference/pygtk-pangoattribute.xml +++ /dev/null @@ -1,1797 +0,0 @@ - - - - - - pango.Attribute - an attribute that applies to a section of text - - - - Synopsis - - - pango.Attribute - - copy - - - - - -Functions - - - pango.attr_type_register - name - - pango.AttrLanguage - language - start_index - 0 - end_index - 1 - - pango.AttrFamily - family - start_index - 0 - end_index - 1 - - pango.AttrForeground - red - green - blue - start_index - 0 - end_index - 1 - - pango.AttrBackground - red - green - blue - start_index - 0 - end_index - 1 - - pango.AttrSize - size - start_index - 0 - end_index - 1 - - pango.AttrStyle - style - start_index - 0 - end_index - 1 - - pango.AttrWeight - weight - start_index - 0 - end_index - 1 - - pango.AttrVariant - variant - start_index - 0 - end_index - 1 - - pango.AttrStretch - stretch - start_index - 0 - end_index - 1 - - pango.AttrFontDesc - desc - start_index - 0 - end_index - 1 - - pango.AttrUnderline - underline - start_index - 0 - end_index - 1 - - pango.AttrStrikethrough - strikethrough - start_index - 0 - end_index - 1 - - pango.AttrRise - rise - start_index - 0 - end_index - 1 - - pango.AttrShape - ink_rect - logical_rect - start_index - 0 - end_index - 1 - - pango.AttrScale - scale - start_index - 0 - end_index - 1 - - pango.AttrFallback - fallback - start_index - 0 - end_index - 1 - - pango.AttrSizeAbsolute - size - start_index - 0 - end_index - 1 - - pango.AttrUnderlineColor - red - green - blue - start_index - 0 - end_index - 1 - - pango.AttrStrikethroughColor - red - green - blue - start_index - 0 - end_index - 1 - - pango.AttrLetterSpacing - letter_spacing - start_index - 0 - end_index - 1 - - - - - - Attributes - - All pango.Attribute -objects support the following three attributes. - -
- - - - - - - - - - "end_index" - Read-Write - The index of the end of the application of the -attribute in the associated text. - - - - "start_index" - Read-Write - The index of the start of the application of the -attribute in the associated text. - - - - "type" - Read - The attribute type. - - - - - -
- - In addition each pango.Attribute -type supports one or more additional attributes that are specific to the -type: - -
- - - - - - - - - - - "value" - Read    - ATTR_LANGUAGE - The pango.Language. - - - - "value" - Read - ATTR_FAMILY - The string containing the font family name list (e.g. -"normal,sans,serif,monospace") - - - - "value" - Read - ATTR_STYLE - The font slant style. See the pango.AttrStyle() -function for more details. - - - - "value" - Read - ATTR_WEIGHT - The font weight. See the pango.AttrWeight() -function for more detail. - - - - "value" - Read - ATTR_VARIANT - The font variant. See the pango.AttrVariant() -function for more detail. - - - - "value" - Read - ATTR_STRETCH - The font stretch. See the pango.AttrStretch() -function for more details. - - - - "value" - Read - ATTR_SIZE - The font size in thousandths of a point. - - - - "desc" - Read - ATTR_FONT_DESC - The pango.FontDescription -object. - - - - "color" - Read - ATTR_FOREGROUND - The foreground pango.Color -object. - - - - "color" - Read - ATTR_BACKGROUND - The background pango.Color -object. - - - - "value" - Read - ATTR_UNDERLINE - The underline style. See the pango.AttrUnderline() -function for more details. - - - - "value" - Read - ATTR_STRIKETHROUGH - True if the text is struck -through. - - - - "value" - Read - ATTR_RISE - The displacement of the text from the baseline. - - - - "ink_rect" - Read - ATTR_SHAPE - The 4-tuple specifying the ink rectangle. See the pango.AttrShape() -function for more details. - - - - "logical_rect" - Read - ATTR_SHAPE - The 4-tuple specifying the logical rectangle. See the -pango.AttrShape() -function for more details. - - - - "value" - Read - ATTR_SCALE - The font size scale factor as a float. - - - - "value" Read - ATTR_FALLBACK - True if font fallback is - enabled. - - - - "value" - Read - ATTR_LETTER_SPACING - The extra space between graphemes. - - - - "color" - Read - ATTR_UNDERLINE_COLOR - The pango.Color - object used for the color of the underline. - - - - "color" - Read - ATTR_STRIKETHROUGH_COLOR - The pango.Color - object used for the color of the strikethrough. - - - - "value" - Read - ATTR_ABSOLUTE_SIZE - The font size in device units. - - - - - -
- -
- - - Description - - The pango.Attribute -object contains an attribute that applies to a section of text. The -predefined attribute types are: - - - - pango.ATTR_LANGUAGE - - Specifies a pango.Language. - - - - pango.ATTR_FAMILY - - Specifies a font family name list as a string. - - - - pango.ATTR_STYLE - - Specifies a font slant style. See the pango.AttrStyle() -function for more details. - - - - pango.ATTR_WEIGHT - - Specifies a font weight. See the pango.AttrWeight() -function for more detail. - - - - pango.ATTR_VARIANT - - Specifies a font variant (normal or small caps). See the -pango.AttrVariant() -function for more detail. - - - - pango.ATTR_STRETCH - - Specifies a font stretch. See the pango.AttrStretch() -function for more details. - - - - pango.ATTR_SIZE - - Specifies a font size in thousandths of a point. - - - - pango.ATTR_FONT_DESC - - Specifies a pango.FontDescription. - - - - pango.ATTR_FOREGROUND - - Specifies a foreground pango.Color. - - - - pango.ATTR_BACKGROUND - - Specifies a background pango.Color. - - - - pango.ATTR_UNDERLINE - - Specifies an underline style. See the pango.AttrUnderline() -function for more details. - - - - pango.ATTR_STRIKETHROUGH - - If True the text is struck -through. - - - - pango.ATTR_RISE - - Specifies the displacement of the text from the -baseline. - - - - pango.ATTR_SHAPE - - Specifies a shape. See the pango.AttrShape() -function for more details. - - - - pango.ATTR_SCALE - - Specifies a font size scale factor. - - - - pango.ATTR_FALLBACK - - if True, fallback to other fonts is - enabled. - - - - pango.ATTR_LETTER_SPACING - - Specifies the extra space between graphemes. - - - - pango.ATTR_UNDERLINE_COLOR - - Specifies the color of the underline. - - - - pango.ATTR_STRIKETHROUGH_COLOR - - Specifies the color of the strikethrough. - - - - pango.ATTR_ABSOLUTE_SIZE - - Specifies the font size in device units. - - - - - Additional attribute types can be registered with the pango.attr_type_register() -function. - - - - - Methods - - - pango.Attribute.copy - - - copy - - - - Returns : - a new pango.Attribute -object - - - - The copy() method returns a new pango.Attribute -object that is a copy of this attribute. - - - - - - - Functions - - - pango.attr_type_register - - - pango.attr_type_register - name - - - - name : - a name for the type. (Currently not -used.) - - - Returns : - the new attribute type ID -integer. - - - - The attr_type_register() function returns a -new attribute type ID integer value. - - - - - pango.AttrLanguage - - - pango.AttrLanguage - language - start_index - 0 - end_index - 1 - - - - language : - a pango.Language -object. - - - start_index : - the index of the start of the attribute -application in the text. - - - end_index : - the index of the end of the attribute -application in the text. - - - Returns : - a new pango.Attribute -object. - - - - The AttrLanguage() function creates a new -pango.Attribute -object of the type pango.ATTR_LANGUAGE with the pango.Language -specified by language and the text range specified by -start_index and -end_index. - - - - - pango.AttrFamily - - - pango.AttrFamily - family - start_index - 0 - end_index - 1 - - - - family : - the string containing a font family name -list. - - - start_index : - the index of the start of the attribute -application in the text. - - - end_index : - the index of the end of the attribute -application in the text. - - - Returns : - a new pango.Attribute -object. - - - - The AttrFamily() function creates a new -pango.Attribute -object of the type pango.ATTR_FAMILY with the font family -name list specified by the string family and the text -range specified by start_index and -end_index. - - - - - pango.AttrForeground - - - pango.AttrForeground - red - green - blue - start_index - 0 - end_index - 1 - - - - red : - the red component of the color in the range 0 -to 65535. - - - green : - the green component of the color in the range 0 -to 65535. - - - blue : - the blue component of the color in the range 0 -to 65535. - - - start_index : - the index of the start of the attribute -application in the text. - - - end_index : - the index of the end of the attribute -application in the text. - - - Returns : - a new pango.Attribute -object. - - - - The AttrForeground() function creates a new -pango.Attribute -of the type pango.ATTR_FOREGROUND with the RGB color -specified by red, green and -blue and the text range specified by -start_index and -end_index. - - - - - pango.AttrBackground - - - pango.AttrBackground - red - green - blue - start_index - 0 - end_index - 1 - - - - red : - the red component of the color in the range 0 -to 65535. - - - green : - the green component of the color in the range 0 -to 65535. - - - blue : - the blue component of the color in the range 0 -to 65535. - - - start_index : - the index of the start of the attribute -application in the text. - - - end_index : - the index of the end of the attribute -application in the text. - - - Returns : - a new pango.Attribute -object. - - - - The AttrBackground() function creates a new -pangoAttribute of the type pango.ATTR_BACKGROUND with the -RGB color specified by red, -green and blue and the text -range specified by start_index and -end_index. - - - - - pango.AttrSize - - - pango.AttrSize - size - start_index - 0 - end_index - 1 - - - - size : - the font size in thousandths of a -point. - - - start_index : - the index of the start of the attribute -application in the text. - - - end_index : - the index of the end of the attribute -application in the text. - - - Returns : - a new pango.Attribute -object - - - - The AttrSize() function creates a new pango.Attribute -object of the type pango.ATTR_SIZE with the font size -specified by size and the text range specified by -start_index and -end_index. - - - - - pango.AttrStyle - - - pango.AttrStyle - style - start_index - 0 - end_index - 1 - - - - style : - the font slant style. - - - start_index : - the index of the start of the attribute -application in the text. - - - end_index : - the index of the end of the attribute -application in the text. - - - Returns : - a new pango.Attribute -object - - - - The AttrStyle() function creates a new -pango.Attribute -object of the type pango.ATTR_STYLE with the font slant -style specified by style and the text range specified -by start_index and end_index. -The value of style must be one of: - - - - pango.STYLE_NORMAL - - The font is upright. - - - - pango.STYLE_OBLIQUE - - The font is slanted in a roman style. - - - - pango.STYLE_ITALIC - - The font is slanted in an italic style. - - - - - - - - - - pango.AttrWeight - - - pango.AttrWeight - weight - start_index - 0 - end_index - 1 - - - - weight : - the font weight. - - - start_index : - the index of the start of the attribute -application in the text. - - - end_index : - the index of the end of the attribute -application in the text. - - - Returns : - a new pango.Attribute -object - - - - The AttrWeight() function creates a new -pango.Attribute -object of the type pango.ATTR_WEIGHT with the font weight -specified by weight and the text range specified by -start_index and end_index. The -value of style must be one of: - - - - pango.WEIGHT_ULTRALIGHT - - The ultralight weight (= 200). - - - - pango.WEIGHT_LIGHT - - The light weight (=300). - - - - pango.WEIGHT_NORMAL - - The default weight (= 400). - - - - pango.WEIGHT_BOLD - - The bold weight (= 700). - - - - pango.WEIGHT_ULTRABOLD - - The ultrabold weight (= 800). - - - - pango.WEIGHT_HEAVY - - The heavy weight (= 900). - - - - - - - - - - pango.AttrVariant - - - pango.AttrVariant - variant - start_index - 0 - end_index - 1 - - - - variant : - the font variant. - - - start_index : - the index of the start of the attribute -application in the text. - - - end_index : - the index of the end of the attribute -application in the text. - - - Returns : - a new pango.Attribute -object - - - - The AttrVariant() function creates a new -pango.Attribute -object of the type pango.ATTR_VARIANT with the font -variant specified by variant and the text range -specified by start_index and -end_index. The value of -variant must be one of: - - - - pango.VARIANT_NORMAL - - A normal font. - - - - pango.VARIANT_SMALL_CAPS - - A font with the lower case characters replaced by -smaller variants of the capital characters. - - - - - - - - - - pango.AttrStretch - - - pango.AttrStretch - stretch - start_index - 0 - end_index - 1 - - - - stretch : - the font stretch style. - - - start_index : - the index of the start of the attribute -application in the text. - - - end_index : - the index of the end of the attribute -application in the text. - - - Returns : - a new pango.Attribute -object - - - - The AttrStretch() function creates a new -pango.Attribute -object of the type pango.ATTR_STRETCH with the font -stretch style specified by stretch and the text range -specified by start_index and -end_index. The value of -stretch must be one of: - - - - pango.STRETCH_ULTRA_CONDENSED - - The most narrow width - - - - pango.STRETCH_EXTRA_CONDENSED - - - - - - pango.STRETCH_CONDENSED - - - - - - pango.STRETCH_SEMI_CONDENSED - - - - - - pango.STRETCH_NORMAL - - The normal width. - - - - pango.STRETCH_SEMI_EXPANDED - - - - - - pango.STRETCH_EXPANDED - - - - - - pango.STRETCH_EXTRA_EXPANDED - - - - - - pango.STRETCH_ULTRA_EXPANDED - - The most expanded width - - - - - - - - - - pango.AttrFontDesc - - - pango.AttrFontDesc - desc - start_index - 0 - end_index - 1 - - - - desc : - a pango.FontDescription -object. - - - start_index : - the index of the start of the attribute -application in the text. - - - end_index : - the index of the end of the attribute -application in the text. - - - Returns : - a new pango.Attribute -object - - - - The AttrFontDesc() function creates a new -pango.Attribute -object of the type pango.ATTR_FONT_DESC with the pango.FontDescription -specified by desc and the text range specified by -start_index and -end_index. - - - - - pango.AttrUnderline - - - pango.AttrUnderline - underline - start_index - 0 - end_index - 1 - - - - underline : - the underline style. - - - start_index : - the index of the start of the attribute -application in the text. - - - end_index : - the index of the end of the attribute -application in the text. - - - Returns : - a new pango.Attribute -object - - - - The AttrUnderline() function creates a new -pango.Attribute -object of the type pango.ATTR_UNDERLINE with the -underline style specified by underline and the text -range specified by start_index and -end_index. The value of -underline must be one of: - - - - pango.UNDERLINE_NONE - - No underline should be drawn. - - - - pango.UNDERLINE_SINGLE - - A single underline should be drawn. - - - - pango.UNDERLINE_DOUBLE - - A double underline should be drawn. - - - - pango.UNDERLINE_LOW - - A single underline should be drawn at a position -beneath the ink extents of the text being underlined. This should be used -only for underlining single characters, such as for keyboard accelerators. -pango.UNDERLINE_SINGLE should be used for extended -portions of text. - - - - - - - - - - pango.AttrStrikethrough - - - pango.AttrStrikethrough - strikethrough - start_index - 0 - end_index - 1 - - - - strikethrough : - if True the text should be -struck through. - - - start_index : - the index of the start of the attribute -application in the text. - - - end_index : - the index of the end of the attribute -application in the text. - - - Returns : - a new pango.Attribute -object - - - - The AttrStrikethrough() function creates a -new pango.Attribute -object of the type pango.ATTR_STRIKETHROUGH with the -value specified by strikethrough and the text range -specified by start_index and -end_index. If strikethough is True -the text should be struck through. - - - - - pango.AttrRise - - - pango.AttrRise - rise - start_index - 0 - end_index - 1 - - - - rise : - the displacement of the text from the -baseline. - - - start_index : - the index of the start of the attribute -application in the text. - - - end_index : - the index of the end of the attribute -application in the text. - - - Returns : - a new pango.Attribute -object - - - - The AttrRise() function creates a new pango.Attribute -object of the type pango.ATTR_RISE with the text -displacement from the baseline specified by rise and -the text range specified by start_index and -end_index. - - - - - pango.AttrShape - - - pango.AttrShape - ink_rect - logical_rect - start_index - 0 - end_index - 1 - - - - ink_rect : - the ink rectangle of the -shape. - - - logical_rect : - the logical rectangle of the -shape. - - - start_index : - the index of the start of the attribute -application in the text. - - - end_index : - the index of the end of the attribute -application in the text. - - - Returns : - a new pango.Attribute -object - - - - The AttrShape() function creates a new -pango.Attribute -object of the type pango.ATTR_SHAPE with the shape -rectangles specified by ink_rect and -logical_rect and the text range specified by -start_index and end_index. A -shape is used to impose a particular ink and logical rect on the result of -shaping a particular glyph. This might be used, for instance, for embedding -a picture or a widget inside a pango.Layout. - - - - - pango.AttrScale - - - pango.AttrScale - scale - start_index - 0 - end_index - 1 - - - - scale : - the font size scale factor as a -float. - - - start_index : - the index of the start of the attribute -application in the text. - - - end_index : - the index of the end of the attribute -application in the text. - - - Returns : - a new pango.Attribute -object - - - - The AttrScale() function creates a new -pango.Attribute -object of the type pango.ATTR_SCALE with the font size -scale factor specified by scale and the text range -specified by start_index and -end_index. The value of scale -can also be one of the following pre-defined values: - - - - pango.SCALE_XX_SMALL - - 0.5787037037037 - the scale factor for three shrinking -steps (1 / (1.2 * 1.2 * 1.2)). - - - - pango.SCALE_X_SMALL - - 0.6444444444444 - the scale factor for two shrinking -steps (1 / (1.2 * 1.2)). - - - - pango.SCALE_SMALL - - 0.8333333333333 - the scale factor for one shrinking -step (1 / 1.2). - - - - pango.SCALE_MEDIUM - - 1.0 - The scale factor for normal size. - - - - pango.SCALE_LARGE - - 1.2 - the scale factor for one magnification -step. - - - - pango.SCALE_X_LARGE - - 1.4399999999999 - the scale factor for two -magnification steps (1.2 * 1.2). - - - - pango.SCALE_XX_LARGE - - 1.728 - the scale factor for three magnification steps -(1.2 * 1.2 * 1.2). - - - - - - - - - - pango.AttrFallback - - - pango.AttrFallback - fallback - start_index - 0 - end_index - 1 - - - - fallback : - if True, we should fall back - on other fonts for characters the active font is - missing. - - - start_index : - the index of the start of the attribute -application in the text. - - - end_index : - the index of the end of the attribute -application in the text. - - - Returns : - a new pango.Attribute -object - - - - - This function is available in PyGTK 2.4 and above. - - - The AttrFallback() function creates a new -pango.Attribute -object of the type pango.ATTR_FALLBACK. If fallback is -True other fonts on the system can be used to provide -characters missing from the current font. Otherwise, only characters from -the closest matching font can be used. - - - - - -
diff --git a/docs/reference/pygtk-pangoattriter.xml b/docs/reference/pygtk-pangoattriter.xml deleted file mode 100644 index e82b51e5..00000000 --- a/docs/reference/pygtk-pangoattriter.xml +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - pango.AttrIterator - an object pointing to a location in a pango.AttrList. - - - - Synopsis - - - pango.AttrIterator - - copy - - - range - - - - next - - - - get - type - - - get_font - - - - get_attrs - - - - - - - - - Description - - The pango.AttrIterator -object contains a pointer into a pango.AttrList. -A pango.AttrIterator -object is created using the pango.AttrList.get_iterator() -method and then can be advanced through the attribute changes in the text -using the next() -method. The pango.AttrIterator -object can access information about the current attributes applied at the -iterator location (using the get() -method) and the range of text that the current attribute change applies to -(using the range() -method). - - The pango.AttrIterator -object is only valid as long as the associated pango.AttrList -is not changed. - - - - - Methods - - - pango.AttrIterator.copy - - - copy - - - - Returns : - a new pango.AttrIterator -object - - - - The copy() method returns a new pango.AttrIterator -object that is a copy of this attribute iterator. - - - - - pango.AttrIterator.range - - - range - - - - - Returns : - a 2-tuple containing the start and end index of -the current attribute in the text. - - - - The range() method returns a 2-tuple -containing the start and end index of the application of the current -attribute change in the text. - - - - - pango.AttrIterator.next - - - next - - - - - Returns : - False if the iterator is at -the end of the pango.AttrList. - - - - The next() method advances the iterator -to the next attribute change in its pango.AttrList. -The next method returns False if -the iterator is at the end of the pango.AttrList; -otherwise, True. - - - - - pango.AttrIterator.get - - - get - type - - - - type : - the pango.Attribute -type to find. - - - Returns : - the pango.Attribute -matching type or None. - - - - The get() method returns the pango.Attribute -at the iterator location that matches the specified -type. When multiple attributes of the same type -overlap, the attribute whose range starts closest to the current location is -returned. If no attribute matches, None is -returned. - - - - - pango.AttrIterator.get_font - - - get_font - - - - - Returns : - a 3-tuple containing a pango.FontDescription, -a pango.Language -and a list of non-font pango.Attribute -objects at the current iterator location. - - - - The get_font() method returns a 3-tuple -containing a pango.FontDescription -holding the current font attributes, a pango.Language -object (if a language is set) or None and a list of -non-font pango.Attribute -objects in effect at the current iterator location. - - - - - pango.AttrIterator.get_attrs - - - get_attrs - - - - - Returns : - a tuple containing the pango.Attribute - objects in effect at the current iterator - location. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_attrs() method returns a tuple -containing the pango.Attribute -objects in effect at the current iterator location. - - - - - - diff --git a/docs/reference/pygtk-pangoattrlist.xml b/docs/reference/pygtk-pangoattrlist.xml deleted file mode 100644 index b881e399..00000000 --- a/docs/reference/pygtk-pangoattrlist.xml +++ /dev/null @@ -1,399 +0,0 @@ - - - - - - pango.AttrList - an object holding attributes that apply to a section of -text - - - - Synopsis - - - pango.AttrList - gobject.GBoxed - - pango.AttrList - - - copy - - - insert - attr - - - insert_before - attr - - - change - attr - - - splice - other - pos - len - - - get_iterator - - - - filter - func - dataNone - - - - - -Functions - - - pango.parse_markup - markup_text - accel_markeru'\x00' - - - - - - Description - - The pango.AttrList -object contains a list of attributes that apply to a section of text. The -attributes are, in general, allowed to overlap in an arbitrary fashion, -however, if the attributes are manipulated only through the change() -method, the overlap between properties will meet stricter criteria. Since -the pango.AttrList -object is stored as a linear list, it is not suitable for storing attributes -for large amounts of text. In general, you should not use a single pango.AttrList -for more than one paragraph of text. - - - - - Constructor - - - pango.AttrList - - - - Returns : - a new pango.AttrList -object. - - - - Creates a new pango.AttrList -object. - - - - - Methods - - - pango.AttrList.copy - - - copy - - - - Returns : - a new pango.AttrList -object - - - - The copy() method returns -a new pango.AttrList -object that is a copy of the attribute list - - - - - pango.AttrList.insert - - - insert - attr - - - - attr : - the pango.Attribute -to insert. - - - - The insert() method -inserts the pango.Attribute -specified by attr into the attribute list. It will be -inserted after all other attributes with a matching "start_index". - - - - - pango.AttrList.insert_before - - - insert_before - attr - - - - attr : - the pango.Attribute -to insert. - - - - The insert_before() -method inserts the pango.Attribute -specified by attr into the attribute list. It will be inserted before all -other attributes with a matching "start_index". - - - - - pango.AttrList.change - - - change - attr - - - - attr : - the pango.Attribute -to insert. - - - - The change() method -inserts the pango.Attribute -specified by attr into the attribute list. It will -replace any attributes of the same type on that segment and be merged with -any adjoining attributes that are identical. This method is slower than the -insert() -method for creating an attribute list in order (potentially much slower for -large lists). However, the insert() -method is not suitable for continually changing a set of attributes since it -never removes or combines existing attributes. - - - - - pango.AttrList.splice - - - splice - other - pos - len - - - - other : - another pango.AttrList - - - pos : - the position in this attribute list to insert -other - - - len : - the length of the spliced segment. (Note that -this must be specified since the attributes in other -may only be present at some subsection of this range) - - - - The splice() method -splices the pango.AttrList -specified by other into this attribute list. This -method stretches each attribute with a range including the position -specified by pos in the list by the amount specified -by len, and then calls the change() -method with a copy of each attribute in other in -sequence (offset in position by pos). - - - - - pango.AttrList.get_iterator - - - get_iterator - - - - Returns : - a new pango.AttrIterator. - - - - The get_iterator() method creates and -returns a pango.AttrIterator -initialized to the beginning of the attribute list. - - - - - pango.AttrList.filter - - - filter - func - dataNone - - - - func : - a callback function that returns - True if an attribute should be filtered - out. - - - data : - data to be passed to - func - - - Returns : - a new pango.AttrList - or None. - - - - - This method is available in PyGTK 2.4 and above. - - - The filter() method arranges for the -callback function specified by function to be called -on each pango.Attribute -in the attribute list with the optional user data specified by -data. The callback function signature is: - - - def func(attribute, user_data) - - - where attribute is an attribute of the -attribute list and user_data is -data. The callback function returns -True if the attribute should be filtered out of the -attribute list. The filter method returns a new -pango.AttrList -containing the attributes that were filtered out (removed from) the -attribute list. - - - - - - - Functions - - - pango.parse_markup - - - pango.parse_markup - markup_text - accel_markeru'\x00' - - - - markup_text : - a string containing the markup to -parse. - - - accel_marker : - the Unicode character that precedes an -accelerator, or u'\x00' for none - - - Returns : - a 3-tuple containing a pango.AttrList, -the plain text in markup_text, and the first -accelerator character in the text. - - - - The parse_markup() function parses the text -specified by markup_text and returns a 3-tuple -containing a pango.AttrList, -the plain text from markup_text and the first -accelerator character that is preceded by the Unicode character specified by -accel_marker. The returned accelerator character is a -Unicode character that may be u'\x00' if there is no accelerator -character. - - See the The Pango Markup -Language reference for more information. - - The GError exception is raised if an error occurs while parsing -the markup text. - - - - - - diff --git a/docs/reference/pygtk-pangocairo-classes.xml b/docs/reference/pygtk-pangocairo-classes.xml deleted file mode 100644 index 22083c77..00000000 --- a/docs/reference/pygtk-pangocairo-classes.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - The pangocairo Class Reference - - - - - - - - - diff --git a/docs/reference/pygtk-pangocairo-constants.xml b/docs/reference/pygtk-pangocairo-constants.xml deleted file mode 100644 index fe6be057..00000000 --- a/docs/reference/pygtk-pangocairo-constants.xml +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - pangocairo Constants - the built-in constants of the pangocairo module - - - - Synopsis - - - - - - - Description - - - - diff --git a/docs/reference/pygtk-pangocairo-functions.xml b/docs/reference/pygtk-pangocairo-functions.xml deleted file mode 100644 index 3e387c99..00000000 --- a/docs/reference/pygtk-pangocairo-functions.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - pangocairo Functions - a list of all the pangocairo functions - - - - Synopsis - - - <link linkend="class-pangocairocairofontmap"><classname>pangocairo.CairoFontMap</classname></link> Functions - - - pangocairo.cairo_font_map_get_default - - - - - - - - Miscellaneous Functions - - - context_get_font_options - context - - context_set_font_options - context - font_options - - - - - - - - Functions - - - pangocairo.context_get_font_options - - - pangocairo.context_get_font_options - context - - - - context : - a - pango.Context - created by the - pango.FontMap.create_context() - method. - - - Returns : - a cairo.FontOptions object or - None - - - - - This function is available in PyGTK 2.10 and above. - - - The pangocairo.context_get_font_options() - method returns the cairo.FontOptions object associated with the pango.Context - specified by context. - - - - - pangocairo.context_set_font_options - - - pangocairo.context_set_font_options - context - font_options - - - - context : - a - pango.Context - created by the - pango.FontMap.create_context() - method. - - - font_options : - a cairo.FontOptions object or - None - - - - - This function is available in PyGTK 2.10 and above. - - - The pangocairo.context_set_font_options() - function sets the font options specified by - font_options used when rendering text with the - pango.Context - specified by context. These options override - any options that pangocairo.CairoContext.update_context() - derives from the target surface. If - font_options is None any - previously set options are unset. - - - - - - diff --git a/docs/reference/pygtk-pangocairocairocontext.xml b/docs/reference/pygtk-pangocairocairocontext.xml deleted file mode 100644 index fdc90169..00000000 --- a/docs/reference/pygtk-pangocairocairocontext.xml +++ /dev/null @@ -1,408 +0,0 @@ - - - - - - pangocairo.CairoContext - object providing support for using Cairo (new in -PyGTK 2.8) - - - - Synopsis - - - pangocairo.CairoContext - pangocairo.CairoContext - - - pangocairo.CairoContext - - - update_context - context - - - create_layout - - - update_layout - layout - - - show_glyph_string - font - glyphs - - - show_layout_line - line - - - show_layout - layout - - - glyph_string_path - font - glyphs - - - layout_line_path - line - - - layout_path - layout - - - - - - - Ancestry - -+-- cairo.Context - +-- pangocairo.CairoContext - - - - - - Description - - Cairo is a graphics library that supports vector graphics and -image compositing that can be used with PyGTK. Since 2.8, GTK+ and Pango do -most of their drawing using Cairo. The Cairo drawing model and primitives -are similar to PostScript which uses an imaging model of painting on a two -dimensional surface. There is a Python module that wraps the Cairo API that -is used by PyGTK via subclassing of the cairo.Context class by the pangocairo.CairoContext -class. The cairo.Context class provides most of the drawing primitives used -for drawing on Cairo surfaces. - - PyGTK (and GTK+ and GDK) does not wrap the Cairo API, instead -pangocairo.CairoContext -objects can be used to draw on gtk.gdk.Drawable -objects. A pangocairo.CairoContext -is created using the gtk.gdk.Drawable.cairo_create() -method. See the pangocairo.CairoContext -and Python cairo module documentation for additional methods. - - - - - Methods - - - pangocairo.CairoContext.update_context - - - update_context - context - - - - context : - a pango.Context -created by the pangocairo.CairoFontMap.create_context() -method - - - - - This method is available in PyGTK 2.8 and above. - - - The update_context() method updates a -pango.Context -previously created for use with Cairo to match the current transformation -and target surface of a Cairo context. If any layouts have been created for -the context, it's necessary to call the pango.Layout.context_changed() -method on those layouts. - - - - - pangocairo.CairoContext.create_layout - - - create_layout - - - - Returns : - a new pango.Layout -object. - - - - - This method is available in PyGTK 2.8 and above. - - - The create_layout() method creates a -pango.Layout -object set up to match the current transformation and target surface of the -Cairo context. This layout can then be used for text measurement with -methods like pango.Layout.get_size() -or for drawing with methods like show_layout(). If -you change the transformation or target surface for the context, you need to -call the update_layout() -method. - - This method is the most convenient way to use Cairo with Pango, -however it is slightly inefficient since it creates a separate pango.Context -object for each layout. This might be of concern in an application laying -out large amounts of text. - - - - - pangocairo.CairoContext.update_layout - - - update_layout - layout - - - - layout : - a pango.Layout -created by the create_layout() -method - - - - - This method is available in PyGTK 2.8 and above. - - - The update_layout() method updates the -private pango.Context of -the pango.Layout -(specified by layout) that was created with the create_layout() -method to match the current transformation and target surface of a Cairo -context. - - - - - pangocairo.CairoContext.show_glyph_string - - - show_glyph_string - font - glyphs - - - - font : - a pango.Font - - - glyphs : - a pango.GlyphString - - - - - This method is available in PyGTK 2.8 and above. - - - The show_glyph_string() method draws -the pango.GlyphString -specified by glyphs in the cairo context using the -pango.Font -specified by font. The origin of the glyphs (the left -edge of the baseline) will be drawn at the current point of the cairo -context. - - - - - pangocairo.CairoContext.show_layout_line - - - show_layout_line - line - - - - line : - a pango.LayoutLine - - - - - This method is available in PyGTK 2.8 and above. - - - The show_layout_line() method draws the -pango.LayoutLine -specified by line in the cairo context. The origin of -the glyphs (the left edge of the line) will be drawn at the current point of -the cairo context. - - - - - pangocairo.CairoContext.show_layout - - - show_layout - layout - - - - layout : - a pango.Layout - - - - - This method is available in PyGTK 2.8 and above. - - - The show_layout() method draws the -pango.Layout -specified by layout in the cairo context. The -top-left corner of the pango.Layout will -be drawn at the current point of the cairo context. - - - - - pangocairo.CairoContext.glyph_string_path - - - glyph_string_path - font - glyphs - - - - font : - a pango.Font - - - glyphs : - a pango.GlyphString - - - - - This method is available in PyGTK 2.8 and above. - - - The glyph_string_path() method adds the -pango.GlyphString -specified by glyphs to the current path in the cairo -context using the pango.Font specified -by font. The origin of the added glyphs (the left edge of the baseline) will -be at the current point of the cairo context. - - - - - pangocairo.CairoContext.layout_line_path - - - layout_line_path - line - - - - line : - a pango.LayoutLine - - - - - This method is available in PyGTK 2.8 and above. - - - The layout_line_path() method adds the -text in the pango.LayoutLine -specified by line to the current path in the -specified cairo context. The origin of the glyphs (the left edge of the -line) will be at the current point of the cairo context. - - - - - pangocairo.CairoContext.layout_path - - - layout_path - layout - - - - layout : - a pango.Layout - - - - - This method is available in PyGTK 2.8 and above. - - - The layout_path() method adds the text -in the pango.Layout -specified by layout to the current path in the -specified cairo context. The top-left corner of the pango.Layout will -be at the current point of the cairo context. - - - - - - diff --git a/docs/reference/pygtk-pangocairocairofontmap.xml b/docs/reference/pygtk-pangocairocairofontmap.xml deleted file mode 100644 index e7504f6b..00000000 --- a/docs/reference/pygtk-pangocairocairofontmap.xml +++ /dev/null @@ -1,217 +0,0 @@ - - - - - - pangocairo.CairoFontMap - object providing support for using font maps with -Cairo (new in PyGTK 2.8) - - - - Synopsis - - - pangocairo.CairoFontMap - pangocairo.CairoFontMap - - - pangocairo.CairoFontMap - - - set_resolution - dpi - - - get_resolution - - - create_context - - - - -Functions - - - pangocairo.cairo_font_map_get_default - - - - - - Ancestry - -+-- gobject.GObject - +-- pango.FontMap - +-- pangocairo.CairoFontMap - - - - - - Description - - pangocairo.CairoFontMap -is an interface exported by font maps for use with Cairo. The actual type of -the font map will depend on the particular font technology Cairo was -compiled to use. - - Cairo is a graphics library that supports vector graphics and -image compositing that can be used with PyGTK. Since 2.8, GTK+ and Pango do -most of their drawing using Cairo. The Cairo drawing model and primitives -are similar to PostScript which uses an imaging model of painting on a two -dimensional surface. - - - - - Constructor - - - pangocairo.CairoFontMap - - - - Returns : - a new pangocairo.CairoFontMap object - - - - Creates a new pangocairo.CairoFontMap -object; a fontmap is used to cache information about available fonts, and -holds certain global parameters such as the resolution. In most cases, you -can use the pangocairo.cairo_font_map_get_default() -function instead. - - Note that the type of the returned object will depend on the -particular font backend Cairo was compiled to use; You generally should only -use the pango.FontMap and -pangocairo.CairoFontMap -interfaces on the returned object. - - - - - Methods - - - pangocairo.CairoFontMap.set_resolution - - - set_resolution - dpi - - - - dpi : - the resolution in "dots per inch". (Physical -inches aren't actually involved; the terminology is -conventional.) - - - - - This method is available in PyGTK 2.8 and above. - - - The set_resolution() method sets the -resolution for the fontmap to the value specified by -dpi. This is a scale factor between the points -specified in a pango.FontDescription -and Cairo units. The default value is 96, meaning that a 10 point font will -be 13 units high. (10 * 96. / 72. = 13.3). - - - - - pangocairo.CairoFontMap.get_resolution - - - get_resolution - - - - Returns : - the resolution in -"dots per inch" - - - - - This method is available in PyGTK 2.8 and above. - - - The get_resolution() method returns the -resolution for the fontmap. See the set_resolution() -method for more information. - - - - - pangocairo.CairoFontMap.create_context - - - create_context - - - - Returns : - a new pango.Context -object - - - - - This method is available in PyGTK 2.8 and above. - - - The create_context() method creates a -new pango.Context -object. - - - - - - - Functions - - - pangocairo.cairo_font_map_get_default - - - pangocairo.cairo_font_map_get_default - - - - Returns : - the default Cairo fontmap for -Pango. - - - - - This function is available in PyGTK 2.8 and above. - - - The pangocairo.cairo_font_map_get_default() -function returns the default font map to use with Cairo. - - - - - - diff --git a/docs/reference/pygtk-pangocolor.xml b/docs/reference/pygtk-pangocolor.xml deleted file mode 100644 index ec4dcaf7..00000000 --- a/docs/reference/pygtk-pangocolor.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - pango.Color - an object representing a RGB color - - - - Synopsis - - - pango.Color - gobject.GBoxed - - pango.Color - spec - - - - - - - Attributes - -
- - - - - - - - - - "red" - Read - The red component of the color with a value between 0 -and 65535. - - - - "green" - Read - The green component of the color with a value between 0 -and 65535. - - - - "blue" - Read - The blue component of the color with a value between 0 -and 65535. - - - - - -
- -
- - - Description - - A pango.Color object -is a gobject.GBoxed -type that represents a color with RGB components. Each component value -ranges from 0 to 65535. - - - - - Constructor - - - pango.Color - spec - - - - spec : - a string specifying the new -color - - - Returns : - a new pango.Color -object. - - - - Creates a new pango.Color using -the color attributes specified by the string -spec. The string in spec can -either one of a large set of standard names. (Taken from the X11 -rgb.txt file), or it can be a hex value in the form -'rgb' 'rrggbb' -'rrrgggbbb' or 'rrrrggggbbbb' where -'r', 'g' and 'b' are hex digits of the red, green, and blue components of -the color, respectively. (White in the four forms is -'fff' 'ffffff' -'fffffffff' and 'ffffffffffff') - - - -
diff --git a/docs/reference/pygtk-pangocontext.xml b/docs/reference/pygtk-pangocontext.xml deleted file mode 100644 index 1a9dbd70..00000000 --- a/docs/reference/pygtk-pangocontext.xml +++ /dev/null @@ -1,448 +0,0 @@ - - - - - - pango.Context - stores global information used to control -rendering. - - - - Synopsis - - - pango.Context - gobject.GObject - - list_families - - - - load_font - desc - - - load_fontset - desc - language - - - get_metrics - desc - language - - - set_font_description - desc - - - get_font_description - - - get_language - - - set_language - language - - - set_base_dir - direction - - - get_base_dir - - - - - - - Ancestry - -+-- gobject.GObject - +-- pango.Context - - - - - - Description - - A pango.Context - object contains global information used to control the rendering - process. The information accessible using the pango.Context - methods includes: - - - - the default pango.FontDescription - - - the default pango.Language - - - the base direction of the text - - - - A pango.Context can -be created with the gtk.Widget.create_pango_context() -method. The pango.Context -associated with a gtk.Widget is -retrieved using the gtk.Widget.get_pango_context()) -method. - - - - - Methods - - - pango.Context.list_families - - - list_families - - - - - Returns : - a tuple containing a set of pango.FontFamily -objects. - - - - The list_families() method returns a -tuple containing the list of all the pango.FontFamily -objects for a context. - - - - - pango.Context.load_font - - - load_font - desc - - - - desc : - a pango.FontDescription -describing the font to load - - - Returns : - the pango.Font loaded, -or None if no font matched. - - - - The load_font() method loads and -returns the pango.Font from one -of the fontmaps in the context that is the closest match for the pango.FontDescription -specified by desc. - - - - - pango.Context.load_fontset - - - load_fontset - desc - language - - - - desc : - a pango.FontDescription -describing the fonts to load - - - language : - a pango.Language -the fonts will be used for - - - Returns : - the pango.FontSet, or -None if no font matched. - - - - The load_fontset() method loads and -returns a set of fonts (in a pango.FontSet) -from the context that can be used to render a font matching the pango.FontDescription -specified by desc with the pango.Language -specified by language. - - - - - pango.Context.get_metrics - - - get_metrics - desc - language - - - - desc : - a pango.FontDescription -object - - - language : - the pango.Language -that determines the script to get the metrics for, or -None to get the metrics for the entire -font. - - - Returns : - a pango.FontMetrics -object. - - - - The get_metrics() method returns the -overall metric information for the font described by the pango.FontDescription -specified by desc. Since the metrics may be -substantially different for different scripts, a pango.Language -(specified by language) can be provided to indicate -that the metrics should correspond to the script(s) used by that language. -If the value of language is None, -the returned pango.FontMetrics -covers the entire font. - - The family name in the pango.FontDescription -may be a comma separated list of families. If characters from multiple of -these families would be used to render the string, then the returned fonts -would be a composite of the metrics for the fonts loaded for the individual -families. - - - - - pango.Context.set_font_description - - - set_font_description - desc - - - - desc : - a pango.FontDescription -object - - - - The set_font_description() method sets -the default pango.FontDescription -(specified by desc) for the context. - - - - - pango.Context.get_font_description - - - get_font_description - - - - Returns : - the default font description of the -context. - - - - The get_font_description() method -returns the default pango.FontDescription -for the context. - - - - - pango.Context.get_language - - - get_language - - - - Returns : - the global pango.Language. - - - - The get_language() method returns the -global pango.Language -for the context. - - - - - pango.Context.set_language - - - set_language - language - - - - language : - a pango.Language. - - - - The set_language() method sets the -global pango.Language -for the context to the value specified by -language. - - - - - pango.Context.set_base_dir - - - set_base_dir - direction - - - - direction : - the new base direction - - - - The set_base_dir() method sets the base -text direction for the context to the value specified by -direction. The value of -direction must be one of: - - - - pango.DIRECTION_LTR - - The text is written left-to-right - - - - pango.DIRECTION_RTL - - The text is written right-to-left - - - - pango.DIRECTION_TTB_LTR - - The text is written vertically top-to-bottom, with the -rows ordered from left to right. - - - - pango.DIRECTION_TTB_RTL - - The text is written vertically top-to-bottom, with the -rows ordered from right to left. - - - - - - - - - - - pango.Context.get_base_dir - - - get_base_dir - - - - Returns : - the base direction for the -context. - - - - The get_base_dir() method returns the -base text direction for the context. See the set_base_dir() -method for more information. - - - - - - diff --git a/docs/reference/pygtk-pangofont.xml b/docs/reference/pygtk-pangofont.xml deleted file mode 100644 index f1e7bf87..00000000 --- a/docs/reference/pygtk-pangofont.xml +++ /dev/null @@ -1,352 +0,0 @@ - - - - - - pango.Font - a rendering-system independent font -representation. - - - - Synopsis - - - pango.Font - gobject.GObject - - describe - - - get_metrics - language - - - get_glyph_extents - glyph - - - get_font_map - - - - - -Functions - - - pango.PIXELS - size - - pango.ASCENT - rect - - pango.DESCENT - rect - - pango.RBEARING - rect - - pango.LBEARING - rect - - - - - - Ancestry - -+-- gobject.GObject - +-- pango.Font - - - - - - Description - - A pango.Font object -represents a font in a rendering-system independent way. A pango.Font is -returned from the pango.Context.load_font(), -pango.FontSet.get_font() -and pango.FontMap.load_font()) -methods. - - - - - Methods - - - pango.Font.describe - - - describe - - - - Returns : - a pango.FontDescription -object. - - - - The describe() method returns a -description of the font in a pango.FontDescription -object. - - - - - pango.Font.get_metrics - - - get_metrics - language - - - - language : - a pango.Language -that determines the script to get the metrics for, or -None to get the metrics for the entire -font. - - - Returns : - a pango.FontMetrics -object. - - - - The get_metrics() method returns a -pango.FontMetrics -object containing the metric information for a font using the pango.Language -specified by language to limit the metrics to the -script(s) used by language. If the value of -language is None, the font metrics -for the entire font is returned. - - - - - pango.Font.get_glyph_extents - - - get_glyph_extents - glyph - - - - glyph : - the glyph index - - - Returns : - a 2-tuple containing two 4-tuples representing -the ink and logical rectangles used to store the extents of -glyph as drawn. - - - - The get_glyph_extents() method returns a -2-tuple containing two 4-tuples representing the values of the logical and -ink extent rectangles of the specified glyph within a -font. The coordinate system for each rectangle has its origin at the base -line and horizontal origin of the character with increasing coordinates -extending to the right and down. The pango.ASCENT(), -pango.DESCENT(), pango.LBEARING(), -and pango.RBEARING functions can be used to convert -from the extents rectangle to more traditional font metrics. The units of -the rectangles are in 1/pango.SCALE of a device -unit. - - - - - pango.Font.get_font_map - - - get_font_map - - - - - - Returns : - the pango.FontMap - for the font - - - - - This method is available in PyGTK 2.10 and above. - - - Gets the font map for which the font was created. - - - - - - - Functions - - - pango.PIXELS - - - pango.PIXELS - size - - - - size : - the integer value to convert to pango -pixels - - - Returns : - the pixel value - - - - The pango.PIXELS() function converts and -returns the integer value specified by size to pango -pixels. - - - - - pango.ASCENT - - - pango.ASCENT - rect - - - - rect : - a 4-tuple representing an extent rectangle's -(x, y, width, height) value - - - Returns : - the ascent value of -rect - - - - The pango.ASCENT() function returns the -ascent value of the extent rectangle specified by -rect. - - - - - pango.DESCENT - - - pango.DESCENT - rect - - - - rect : - a 4-tuple representing an extent rectangle's -(x, y, width, height) value - - - Returns : - the descent value of -rect - - - - The pango.DESCENT() function returns the -descent value of the extent rectangle specified by -rect. - - - - - pango.RBEARING - - - pango.RBEARING - rect - - - - rect : - a 4-tuple representing an extent rectangle's -(x, y, width, height) value - - - Returns : - the right bearing value of -rect - - - - The pango.RBEARING() function returns the -right bearing value of the extent rectangle specified by -rect. - - - - - pango.LBEARING - - - pango.LBEARING - rect - - - - rect : - a 4-tuple representing an extent rectangle's -(x, y, width, height) value - - - Returns : - the left bearing value of -rect - - - - The pango.LBEARING() function returns the -left bearing value of the extent rectangle specified by -rect. - - - - - - diff --git a/docs/reference/pygtk-pangofontdescription.xml b/docs/reference/pygtk-pangofontdescription.xml deleted file mode 100644 index 508b0427..00000000 --- a/docs/reference/pygtk-pangofontdescription.xml +++ /dev/null @@ -1,1154 +0,0 @@ - - - - - - pango.FontDescription - an object representing a description of a font. - - - - Synopsis - - - pango.FontDescription - gobject.GBoxed - - pango.FontDescription - str - None - - - copy - - - copy_static - - - hash - - - set_family - family - - - set_family_static - family - - - get_family - - - set_style - style - - - get_style - - - set_variant - variant - - - get_variant - - - set_weight - weight - - - get_weight - - - set_stretch - stretch - - - get_stretch - - - set_size - size - - - get_size - - - get_set_fields - - - unset_fields - to_unset - - - merge - desc_to_merge - replace_existing - - - merge_static - desc_to_merge - replace_existing - - - better_match - old_match - new_match - - - to_string - - - to_filename - - - set_absolute_size - size - - - get_size_is_absolute - - - - - - - - Description - - A pango.FontDescription -represents the description of an ideal font. They are used to both specify -the characteristics of a font to load and to list the available fonts on the -system. - - - - - Constructor - - - pango.FontDescription - - - - Returns : - a pango.FontDescription -object. - - - - Creates a new pango.FontDescription -object from the representation in the string specified by -str. The format of the string representation -is: - - - "[FAMILY-LIST] [STYLE-OPTIONS] [SIZE]" - - - where FAMILY-LIST is a comma separated list of -families optionally terminated by a comma, STYLE_OPTIONS -is a whitespace separated list of words where each WORD -describes one of style, variant, weight, or stretch, and -SIZE is an decimal number (size in points). For example -the following are all valid string representations: - - - "sans bold 12" - "serif,monospace bold italic condensed 16" - "normal 10" - - - The commonly available font families are: Normal, Sans, Serif and -Monospace. The available styles are: - - - - Normal - - the font is upright. - - - - Oblique - - the font is slanted, but in a roman style. - - - - Italic - - the font is slanted in an italic style. - - - - - The available weights are: - - - - Ultra-Light - - the ultralight weight (= 200) - - - - Light - - the light weight (=300) - - - - Normal - - the default weight (= 400) - - - - Bold - - the bold weight (= 700) - - - - Ultra-Bold - - the ultra-bold weight (= 800) - - - - Heavy - - the heavy weight (= 900) - - - - - The available variants are: - - - - Normal - - - - - - Small-Caps - - - - - - - The available stretch styles are: - - - - Ultra-Condensed - - the smallest width - - - - Extra-Condensed - - - - - - Condensed - - - - - - Semi-Condensed - - - - - - Normal - - the normal width - - - - Semi-Expanded - - - - - - Expanded - - - - - - Extra-Expanded - - - - - - Ultra-Expanded - - the widest width - - - - - - - - - - Methods - - - pango.FontDescription.copy - - - copy - - - - Returns : - a new pango.FontDescription - - - - The copy() method returns a new copy of -this font description. - - - - - pango.FontDescription.copy_static - - - copy_static - - - - Returns : - a new pango.FontDescription.. - - - - The copy_static() method is like the -copy() -method, but only a shallow copy is made of the family name and other -allocated attribute fields. The result can only be used until the original -font description is modified or freed. This is meant to be used when the -copy is only needed temporarily. - - - - - pango.FontDescription.hash - - - hash - - - - Returns : - the hash value. - - - - The hash() method computes and returns -a hash of the pango.FontDescription. - - - - - pango.FontDescription.set_family - - - set_family - family - - - - family : - a string representing the family -name. - - - - The set_family() method sets the family -name attribute field of the font description to the value specified by -family. The family name represents a family of -related font styles, and will resolve to a particular pango.FontFamily. -In some uses of pango.FontDescription, -it is also possible to use a comma separated list of family names for this -field. - - - - - pango.FontDescription.set_family_static - - - set_family_static - family - - - - family : - a string representing the family -name. - - - - The set_family_static() method is like the set_family(), -except that no copy of family is made. The caller -must make sure that the string passed in stays around until the font -description is no longer needed or the family name is set again. This method -can be used if family is only needed -temporarily. - - - - - pango.FontDescription.get_family - - - get_family - - - - Returns : - the family name or None if -not previously set. - - - - The get_family() method returns the -family name attribute field of the font description. See the set_family() -method for more information. - - - - - pango.FontDescription.set_style - - - set_style - style - - - - style : - the style for the font -description - - - - The set_style() method sets the slant -style attribute field of the pango.FontDescription -to the value specified by style. The value of -style must be either -pango.STYLE_NORMAL, -pango.STYLE_ITALIC, or -pango.STYLE_OBLIQUE. Most fonts will either have a italic -style or an oblique style, but not both, and font matching in Pango will -match italic specifications with oblique fonts and vice-versa if an exact -match is not found. - - - - - pango.FontDescription.get_style - - - get_style - - - - Returns : - the slant style for the font description. - - - - - The get_style() method returns the -slant style attribute field of the pango.FontDescription. -See the set_style() -method for more details. Use the get_set_fields() -method to find out if the field was explicitly set. - - - - - pango.FontDescription.set_variant - - - set_variant - variant - - - - variant : - the variant type for the font -description. - - - - The set_variant() method sets the -variant attribute field of a font description to the value specified by -variant. The value of variant -must be either pango.VARIANT_NORMAL or -pango.VARIANT_SMALL_CAPS. - - - - - pango.FontDescription.get_variant - - - get_variant - - - - Returns : - the variant style of the font -description. - - - - The get_variant() method returns the -variant style of a pango.FontDescription. -See the set_variant() -method for more information. Use the get_set_fields() -method to find out if the field was explicitly set. - - - - - pango.FontDescription.set_weight - - - set_weight - weight - - - - weight : - the weight for the font -description. - - - - The set_weight() method sets the weight -attribute field of a font description to the value specified by -weight. The value of weight -specifies how bold or light the font should be in a range from 100 to 900. -The predefined values of weight are: - - - - pango.WEIGHT_ULTRALIGHT - - the ultralight weight (= 200) - - - - pango.WEIGHT_LIGHT - - the light weight (=300) - - - - pango.WEIGHT_NORMAL - - the default weight (= 400) - - - - pango.WEIGHT_BOLD - - the bold weight (= 700) - - - - pango.WEIGHT_ULTRABOLD - - the ultrabold weight (= 800) - - - - pango.WEIGHT_HEAVY - - the heavy weight (= 900) - - - - - - - - - - pango.FontDescription.get_weight - - - get_weight - - - - Returns : - the weight field for the font -description. - - - - The get_weight() method returns the -value of the weight attribute of a font description. See the set_weight() -method for more information. Use the get_set_fields() -method to determine if the attribute was explicitly set. - - - - - pango.FontDescription.set_stretch - - - set_stretch - stretch - - - - stretch : - the stretch for the font -description - - - - The set_stretch() method sets the -stretch attribute field of a font description to the value specified by -stretch. The value of stretch -specifies how narrow or wide the font should be relative to the base width -of the font family: - - - - pango.STRETCH_ULTRA_CONDENSED - - the narrowest width - - - - pango.STRETCH_EXTRA_CONDENSED - - - - - - pango.STRETCH_CONDENSED - - - - - - pango.STRETCH_SEMI_CONDENSED - - - - - - pango.STRETCH_NORMAL - - the normal (base) width - - - - pango.STRETCH_SEMI_EXPANDED - - - - - - pango.STRETCH_EXPANDED - - - - - - pango.STRETCH_EXTRA_EXPANDED - - - - - - pango.STRETCH_ULTRA_EXPANDED - - the widest width - - - - - - - - - - pango.FontDescription.get_stretch - - - get_stretch - - - - Returns : - the stretch field for the font -description - - - - The get_stretch() method returns the -stretch attribute field of a font description. See the set_stretch() -method for more details. Use the get_set_fields() -method to determine if the field was explicitly set. - - - - - pango.FontDescription.set_size - - - set_size - size - - - - size : - the size for the font description in pango -units. - - - - The set_size() method sets the -size attribute field of a font description to the value specified by -size. The value of size is -specified in pango units. There are pango.SCALE (1024) -pango units in one device unit (the device unit is a point for font -sizes). - - - - - pango.FontDescription.get_size - - - get_size - - - - Returns : - the size for the font description in pango -units. - - - - The get_size() method returns the value -of the size attribute field of a font description. See the get_size() -method for more information. There are pango.SCALE pango -units in one device unit (point). If the stretch attribute field has not -previously been set, 0 is returned. Use the get_set_fields() -method to determine if the field was explicitly set. - - - - - pango.FontDescription.get_set_fields - - - get_set_fields - - - - Returns : - a bitmask with bits set corresponding to the -font description attribute fields that have been set. - - - - The get_set_fields() method returns a -value that indicates which attribute fields in a font description have been -set. The value returned is a combination of: - - - - pango.FONT_MASK_FAMILY - - the font family has been set. - - - - pango.FONT_MASK_STYLE - - the font slant style has been set. - - - - pango.FONT_MASK_VARIANT - - the font variant has been set. - - - - pango.FONT_MASK_WEIGHT - - the font weight has been set. - - - - pango.FONT_MASK_STRETCH - - the font stretch has been set. - - - - pango.FONT_MASK_SIZE - - the font size has been set. - - - - - - - - - - pango.FontDescription.unset_fields - - - unset_fields - to_unset - - - - to_unset : - a bitmask of attribute fields in the font -description to unset. - - - - The unset_fields() method unsets the -attribute fields (specified by to_unset) in the -pango.FontDescription. -Note that this merely marks the attribute fields cleared, it does not clear -the settings. - - - - - pango.FontDescription.merge - - - merge - desc_to_merge - replace_existing - - - - desc_to_merge : - the pango.FontDescription -to merge into the font description - - - replace_existing : - if True, replace attribute -fields in the font description with the corresponding values from -desc_to_merge, even if they are already -exist. - - - - The merge() method merges the attribute -fields that are set in the pango.FontDescription -specified by desc_to_merge into the attribute fields -in the font description. If replace_existing is -False, only fields in the font description that are not -already set are affected. If replace_existing is -True, attribute fields that are already set will also be -replaced. - - - - - pango.FontDescription.merge_static - - - merge_static - desc_to_merge - replace_existing - - - - desc_to_merge : - the pango.FontDescription -to merge from - - - replace_existing : - if True, replace attribute -fields in the font description with the corresponding values from -desc_to_merge, even if they are already -exist. - - - - The merge_static() method is similar to -the merge() -method, but only a shallow copy is made of the family name and other -allocated fields. The font description can only be used until -desc_to_merge is modified or freed. This is meant to -be used when the merged font description is only needed temporarily. - - - - - pango.FontDescription.better_match - - - better_match - old_match - new_match - - - - old_match : - a pango.FontDescription, -or None - - - new_match : - a pango.FontDescription - - - Returns : - True if -new_match is a better match - - - - The better_match() method determines if -the attributes of the pango.FontDescription -specified by new_match are a closer match for the -font description than the pango.FontDescription -specified by old_match. If -old_match is None, determines if -new_match is a match at all. The weight and style -attribute need only match approximately but the other attributes must match -exactly. - - - - - pango.FontDescription.to_string - - - to_string - - - - Returns : - a string representation of the font -description. - - - - The to_string() method returns a string -representation of the font description. See the pango.FontDescription() -constructor for a description of the format of the string representation. -The family list in the string description will only have a terminating comma -if the last word of the list is a valid style option. - - - - - pango.FontDescription.to_filename - - - to_filename - - - - Returns : - a string representation of the font description -as a filename. - - - - The to_filename() method returns a -filename representation of a font description. The filename is identical to -the result from calling the to_string() -method, but underscores replace characters that are not typically used in -filenames, and it is in lower case only. - - - - - pango.FontDescription.set_absolute_size - - - set_absolute_size - size - - - - - size : - the new size, in Pango units. There are - pango.SCALE Pango units in one device unit. For - an output backend where a device unit is a pixel, a - size value of 10 * pango.SCALE gives a 10 - pixel font. - - - - - This method is available in PyGTK 2.10 and above. - - - Sets the size field of a font description, in device units. This - is mutually exclusive with pango.FontDescription.set_size(). - - - - - pango.FontDescription.get_size_is_absolute - - - get_size_is_absolute - - - - - - Returns : - whether the size for the font description is in - points or device units. Use pango.FontDescription.get_set_fields() - to find out if the size field of the font description was - explicitly set or not. - - - - - This method is available in PyGTK 2.10 and above. - - - Determines whether the size of the font is in points or device - units. See pango.FontDescription.set_size() - and pango.FontDescription.set_absolute_size(). - - - - - - diff --git a/docs/reference/pygtk-pangofontface.xml b/docs/reference/pygtk-pangofontface.xml deleted file mode 100644 index ac666e76..00000000 --- a/docs/reference/pygtk-pangofontface.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - - pango.FontFace - an object representing a group of fonts varying only in -size. - - - - Synopsis - - - pango.FontFace - gobject.GObject - - describe - - - - get_face_name - - - - list_sizes - - - - - - - - Description - - A pango.FontFace -object represents a group of fonts with the same family, weight, slant, -stretch and width but varying sizes. A list of font faces can be retrieved -from a pango.FontFamily -object using the pango.FontFamily.list_faces() -method. - - - - - Ancestry - -+-- gobject.GObject - +-- pango.FontFace - - - - - - Methods - - - pango.FontFace.describe - - - describe - - - - - Returns : - a pango.FontDescription -object containing the description of the face. - - - - The describe() method returns a pango.FontDescription -object containing the family, style, variant, weight and stretch of the -pango.FontFace. -The size attribute field will be unset. - - - - - pango.FontFace.get_face_name - - - get_face_name - - - - - Returns : - the face name for the -face. - - - - The get_face_name() method returns a -string representing this font face. This name is unique among all faces in the -family and is suitable for displaying to users. - - - - - pango.FontFace.list_sizes - - - list_sizes - - - - - Returns : - a tuple containing a list of face sizes in - pango units or None - - - - - This method is available in PyGTK 2.4 and above. - - - The list_sizes() method returns a tuple -containing the available sizes for a bitmap font. If the font face is a -scalable font this method returns None. - - - - - - diff --git a/docs/reference/pygtk-pangofontfamily.xml b/docs/reference/pygtk-pangofontfamily.xml deleted file mode 100644 index e4db50a9..00000000 --- a/docs/reference/pygtk-pangofontfamily.xml +++ /dev/null @@ -1,148 +0,0 @@ - - - - - - pango.FontFamily - an object representing a family of related font -faces. - - - - Synopsis - - - pango.FontFamily - gobject.GObject - - list_faces - - - - get_name - - - - is_monospace - - - - - - - - Ancestry - -+-- gobject.GObject - +-- pango.FontFamily - - - - - - Description - - The pango.FontFamily -object is used to represent a family of related font faces. The faces in a -family share a common design, but differ in slant, weight, width and other -aspects. A list of pango.FontFamily -objects can be retrieved from a pango.Context -object using the pango.Context.list_families() -method and from a pango.FontMap -object using the pango.FontMap.list_families() -method. - - - - - Methods - - - pango.FontFamily.list_faces - - - list_faces - - - - - Returns : - a list of pango.FontFace -objects. - - - - The list_faces() method returns a list -of the different pango.FontFace -object that make up the font family>. The faces in a family share a common -design, but differ in slant, weight, width and other aspects. - - - - - pango.FontFamily.get_name - - - get_name - - - - - Returns : - the name of the family. - - - - The get_name() method returns a string -containing the name of the font family. The name is unique among all fonts -for the font backend and can be used in a pango.FontDescription -to specify that a face from this family is desired. - - - - - pango.FontFamily.is_monospace - - - is_monospace - - - - - Returns : - True if the font family is - monospace. - - - - The is_monospace() method returns - True if the font family describes a monospace - font. A monospace font is a font designed for text display where the - the characters form a regular grid. For Western languages this would - mean that the advance width of all characters are the same, but this - categorization also includes Asian fonts which include double-width - characters: characters that occupy two grid cells. The best way to - find out the grid-cell size is to call the get_approximate_digit_width() - method, since the results of the get_approximate_char_width() - - - - - - diff --git a/docs/reference/pygtk-pangofontmap.xml b/docs/reference/pygtk-pangofontmap.xml deleted file mode 100644 index a8dbeef4..00000000 --- a/docs/reference/pygtk-pangofontmap.xml +++ /dev/null @@ -1,215 +0,0 @@ - - - - - - pango.FontMap - an object that represents the set of fonts available for a -particular rendering system. - - - - Synopsis - - - pango.FontMap - gobject.GObject - - load_font - context - desc - - - load_fontset - context - desc - language - - - list_families - - - - get_shape_engine_type - - - - - - - - Ancestry - -+-- gobject.GObject - +-- pango.FontMap - - - - - - Description - - A pango.FontMap -object represents the set of fonts available for a particular rendering -system. There appears to be no way to retrieve a pango.FontMap -object in PyGTK. - - - - - Methods - - - pango.FontMap.load_font - - - load_font - context - desc - - - - context : - the pango.Context the -font will be used with - - - desc : - a pango.FontDescription -describing the font to load - - - Returns : - the loaded font , or None if -no font matched. - - - - The load_font() method loads the pango.Font in the -fontmap that is the closest match for the pango.FontDescription -specified by desc in the pango.Context -specified by context. - - - - - pango.FontMap.load_fontset - - - load_fontset - context - desc - language - - - - context : - the pango.Context the -font will be used with - - - desc : - a pango.FontDescription -describing the font to load - - - language : - a pango.Language -the fonts will be used for - - - Returns : - a pango.FontSet, or -None if no font matched. - - - - The load_fontset() method loads a set -of pango.Font -objects in the fontmap that can be used to render a font matching the pango.FontDescription -specified by desc for the pango.Language -specified by language in the pango.Context -specified by context. - - - - - pango.FontMap.list_families - - - list_families - - - - - Returns : - a list of pango.FontFamily -objects. - - - - The list_families() method returns a -list of all pango.FontFamily -objects for the fontmap. - - - - - pango.FontMap.get_shape_engine_type - - - get_shape_engine_type - - - - - Returns : - the ID string for the shape engines for the - font map. - - - - - This method is available in PyGTK 2.4 and above. - - - The get_shape_engine_type() method -returns the render ID for the shape engines for the font map - - - - - - diff --git a/docs/reference/pygtk-pangofontmetrics.xml b/docs/reference/pygtk-pangofontmetrics.xml deleted file mode 100644 index 31dd2403..00000000 --- a/docs/reference/pygtk-pangofontmetrics.xml +++ /dev/null @@ -1,164 +0,0 @@ - - - - - - pango.FontMetrics - an object containing overall metric information for a -font. - - - - Synopsis - - - pango.FontMetrics - gobject.GBoxed - - get_ascent - - - get_descent - - - get_approximate_char_width - - - get_approximate_digit_width - - - - - - - Description - - A pango.FontMetrics -object holds the overall metric information for a font. A pango.FontMetrics -object is returned from the following methods: - - - - pango.Context.get_metrics() - - - pango.Font.get_metrics() - - - pango.Fontset.get_metrics() - - - - - - - Methods - - - pango.FontMetrics.get_ascent - - - get_ascent - - - - Returns : - the ascent in pango units. (1 point == -pango.SCALE pango units.) - - - - The get_ascent() method returns the -font ascent in pango units where one font point is equal to pango.SCALE -(1024) pango units. The ascent is the distance from the baseline to the -logical top of a line of text. (The logical top may be above or below the -top of the actual drawn ink. It is necessary to lay out the text to figure -where the ink will be.) - - - - - pango.FontMetrics.get_descent - - - get_descent - - - - Returns : - the descent in pango units. (1 point == -pango.SCALE pango units.) - - - - The get_descent() method returns the -font descent in pango units where one font point is equal to pango.SCALE -(1024) pango units. The descent is the distance from the baseline to the -logical bottom of a line of text. (The logical bottom may be above or below -the bottom of the actual drawn ink. It is necessary to lay out the text to -figure where the ink will be.) - - - - - pango.FontMetrics.get_approximate_char_width - - - get_approximate_char_width - - - - Returns : - the character width in pango units. (1 point == -pango.SCALE pango units.) - - - - The get_approximate_char_width() method -returns the approximate character width for a font in pango units where one -font point is equal to pango.SCALE (1024) pango units. This is merely a -representative value that is useful, for example, for determining the -initial size for a window. Actual characters in text will be wider and -narrower than this. - - - - - pango.FontMetrics.get_approximate_digit_width - - - get_approximate_digit_width - - - - Returns : - the digit width in pango units. (1 point == -pango.SCALE pango units.) - - - - The get_approximate_digit_width() -method returns the approximate digit width for a font in pango units where -one font point is equal to pango.SCALE (1024) pango units. This is merely a -representative value that is useful, for example, for determining the -initial size for a window. Actual digits in text can be wider and narrower -than this, though this value is generally somewhat more accurate than the -result of the get_approximate_char_width() -method. - - - - - - diff --git a/docs/reference/pygtk-pangofontset.xml b/docs/reference/pygtk-pangofontset.xml deleted file mode 100644 index f17ffcd5..00000000 --- a/docs/reference/pygtk-pangofontset.xml +++ /dev/null @@ -1,172 +0,0 @@ - - - - - - pango.Fontset - an object containing a set of pango.Font -objects. - - - - Synopsis - - - pango.Fontset - gobject.GObject - - get_font - wc - - - get_metrics - - - - foreach - func - dataNone - - - - - - - Ancestry - -+-- gobject.GObject - +-- pango.Fontset - - - - - - Description - - A pango.Fontset -object holds a set of pango.Font objects. -A pango.FontSet -object is returned from the following methods: - - - - pango.Context.load_fontset() - - - pango.FontMap.load_fontset() - - - - - - - Methods - - - pango.Fontset.get_font - - - get_font - wc - - - - wc : - a unicode character - - - Returns : - a pango.Font. - - - - The get_font() method returns the pango.Font in the -fontset that contains the best glyph for the unicode character specified by -wc. - - - - - pango.Fontset.get_metrics - - - get_metrics - - - - Returns : - a pango.FontMetrics - object. - - - - The get_metrics() method returns a -pango.FontMetrics -object that contains the overall metric information for the fonts in the -fontset. - - - - - pango.Fontset.foreach - - - foreach - func - dataNone - - - - func : - a callback function - - - data : - user data to pass to - func - - - - - This method is available in PyGTK 2.4 and above. - - - The foreach() method invokes the -function specified by func on each pango.Font of the -font set passing it the optional user data specified by -data. The signature of func -is: - - - def func(fontset, font, user_data) - - - where fontset is the pango.Fontset -containing the pango.Font -font and user_data is -data - - - - - - diff --git a/docs/reference/pygtk-pangofontsetsimple.xml b/docs/reference/pygtk-pangofontsetsimple.xml deleted file mode 100644 index 352c777b..00000000 --- a/docs/reference/pygtk-pangofontsetsimple.xml +++ /dev/null @@ -1,149 +0,0 @@ - - - - - pango.FontsetSimple - a simple container for a set of fonts - - - - Synopsis - - - pango.FontsetSimple - pango.Fontset - - pango.FontsetSimple - language - - - append - font - - - size - - - - - - - Ancestry - -+-- gobject.GObject - +-- pango.Fontset - +-- pango.FontsetSimple - - - - - - Description - - - This object is available in PyGTK 2.4 and above. - - - A pango.FontsetSimple -is a subclass of pango.Fontset -that provides a simple container for storing a set of pango.Font -objects. The set of fonts in a pango.FontsetSimple -are assemble by using the append() -method. - - - - - Constructor - - - pango.FontsetSimple - language - - - - language : - a pango.Language - object - - - Returns : - a new pango.FontsetSimple - object. - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new pango.FontsetSimple -for the pango.Language -specified by language. - - - - - - Methods - - - pango.FontsetSimple.append - - - append - font - - - - font : - a pango.Font. - - - - - This method is available in PyGTK 2.4 and above. - - - The append() method adds the pango.Font specified -by font to the fontset. - - - - - pango.FontsetSimple.size - - - size - - - - - Returns : - the size of the font set. - - - - - This method is available in PyGTK 2.4 and above. - - - The size() method returns the number of -fonts in the fontset. - - - - - - diff --git a/docs/reference/pygtk-pangoglyphstring.xml b/docs/reference/pygtk-pangoglyphstring.xml deleted file mode 100644 index ab0fea58..00000000 --- a/docs/reference/pygtk-pangoglyphstring.xml +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - pango.GlyphString - an object holding strings of glyphs and glyph -information. - - - - Synopsis - - - pango.GlyphString - gobject.GBoxed - - pango.GlyphString - - - set_size - new_len - - - copy - - - extents - font - - - extents_range - start - end - font - - - get_logical_widths - text - embedding_level - - - - - - - Attributes - -
- - - - - - - - - - "num_glyphs" - Read - The number of glyphs in the glyph string. - - - - - -
- -
- - - Description - - A pango.GlyphString -object contains strings of glyphs with geometry and visual attribute -information. - - - - - Constructor - - - pango.GlyphString - - - - Returns : - a new pango.GlyphString - - - - Creates a new pango.GlyphString -containing no glyphs. - - - - - Methods - - - pango.GlyphString.set_size - - - set_size - new_len - - - - new_len : - the new length of the -string. - - - - The set_size() method resizes the glyph -string to the length specified by new_len. - - - - - pango.GlyphString.copy - - - copy - - - - Returns : - a pango.GlyphString - - - - The copy() method returns a pango.GlyphString -that is a copy of the glyph string. - - - - - pango.GlyphString.extents - - - extents - font - - - - font : - a pango.Font - - - Returns : - a 2-tuple containing two 4-tuples representing -the ink and logical extents rectangles of the glyph -string. - - - - The extents() method returns a 2-tuple -containing two 4-tuples representing the logical and ink extents rectangles -of the glyph string as rendered in the pango.Font specified -by font. See the pango.Font.get_glyph_extents() -for details about the interpretation of the rectangles. - - - - - pango.GlyphString.extents_range - - - extents_range - start - end - font - - - - start : - start index - - - end : - end index - - - font : - a pango.Font - - - Returns : - a 2-tuple containing two 4-tuples representing -the ink and logical extents rectangles of the glyph string -range. - - - - The extents_range() method returns a -2-tuple containing two 4-tuples representing the logical and ink extents -rectangles of a range (specified by start and -end) of the glyph string as rendered in the pango.Font specified -by font. The extents are relative to the start of the -glyph string range (the origin of their coordinate system is at the start of -the range, not at the start of the entire glyph string). - - - - - pango.GlyphString.get_logical_widths - - - get_logical_widths - text - embedding_level - - - - text : - the text corresponding to the -glyphs - - - embedding_level : - the embedding level of the -string - - - Returns : - a list containing the calculated character -widths. - - - - The get_logical_widths() method returns -a list of the screen width of the characters in the specified -text that corresponds to the glyph string. When -multiple characters compose a single cluster, the width of the entire -cluster is divided equally among the characters. - - - - - -
diff --git a/docs/reference/pygtk-pangolanguage.xml b/docs/reference/pygtk-pangolanguage.xml deleted file mode 100644 index a51aa717..00000000 --- a/docs/reference/pygtk-pangolanguage.xml +++ /dev/null @@ -1,277 +0,0 @@ - - - - - - pango.Language - an object that represents a language tag. - - - - Synopsis - - - pango.Language - gobject.GBoxed - - pango.Language - language - - - matches - range_list - - - to_string - - - - -Functions - - - pango.pango_language_from_string - language - - pango.pango_language_matches - language - range_list - - - - - - Description - - A pango.Language -object represents a language tag meeting the RFC-3066 standard. The pango.Language -can be retrieved from a pango.Context by -using the pango.Context.get_language() -method or created using the pango.Language() constructor. -Example RFC-3066 language tags include: "en-us", "fr", and -"sgn-us-ma". - - - - - Constructor - - - pango.Language - language> - - - - language : - a string representing a language -tag - - - Returns : - a new pango.Language -object - - - - - This constructor is available in PyGTK 2.4 and above. - - - Creates a new pango.Language -object from the RFC-3066 language tag specified by -language. This constructor first canonicalizes the -string in language by converting it to lowercase, -mapping '_' to '-', and stripping all characters other than letters and -'-'. - - - - - Methods - - - pango.Language.matches - - - matches - range_list - - - - >range_list : - a list of language ranges, separated by ';' -characters. - - - Returns : - True if a match was -found. - - - - - This method is available in PyGTK 2.4 and above. - - - The matches() method returns -True if the language matches one of the language ranges -in the list specified by range_list.A language tag is -considered to match a range in the list if - - - - the range is '*' - - - the range is exactly the same as the tag, or - - - the range is a prefix of the tag, and the character after -the matching portion of the tag is '-' - - - - each range must either be '*', or a canonicalized RFC-3066 -language range (see the pango.Language() constructor for -more information). - - - - - pango.Language.matches - - - to_string - - - - - Returns : - the string representation of the language -tag - - - - - This method is available in PyGTK 2.4 and above. - - - The to_string() method returns a string -representation of the canonicalized language tag. See the pango.Language() constructor for -more information. - - - - - - - Functions - - - pango.pango_language_from_string - - - pango.pango_language_from_string - language - - - - language : - a string representing a language - tag - - - Returns : - a new pango.Language - object - - - - - This function is deprecated in PyGTK 2.4 and above. Use the -pango.Language() -constructor instead. - - - The pango.pango_language_from_string() -function takes a RFC-3066 format language tag as a string (specified by -language) and converts it to a pango.Language -object. This function first canonicalizes the string by converting it to -lowercase, mapping '_' to '-', and stripping all characters other than -letters and '-'. - - - - - pango.pango_language_matches - - - pango.pango_language_matches - - - - - language : - a language tag (see the pango.pango_language_from_string() - function), None is allowed and matches nothing - but '*' - - - range_list : - a list of language ranges, separated by ';' - characters. each element must either be '*', or a RFC 3066 - language range canonicalized as by the pango.pango_language_from_string() - function. - - - Returns : - True if a match was - found. - - - - - This function is deprecated in PyGTK 2.4 and above. Use the -matches() -method instead. - - - The pango.pango_language_matches() function -checks if a language tag matches one of the elements in a list of language -ranges. A language tag is considered to match a range in the list if the -range is '*', the range is exactly the tag, or the range is a prefix of the -tag, and the character after the tag is '-'. - - - - - - diff --git a/docs/reference/pygtk-pangolayout.xml b/docs/reference/pygtk-pangolayout.xml deleted file mode 100644 index c6100996..00000000 --- a/docs/reference/pygtk-pangolayout.xml +++ /dev/null @@ -1,1312 +0,0 @@ - - - - - pango.Layout - an object representing a paragraph of text with -attributes. - - - - Synopsis - - - pango.Layout - gobject.GObject - - pango.Layout - context - - - copy - - - get_context - - - set_attributes - attrs - - - get_attributes - - - set_text - text - - - get_text - - - set_markup - markup - - - set_markup_with_accel - markup - accel_marker - - - set_font_description - desc - - - set_width - width - - - get_width - - - set_wrap - wrap - - - get_wrap - - - set_indent - indent - - - get_indent - - - set_spacing - spacing - - - get_spacing - - - set_justify - justify - - - get_justify - - - set_alignment - alignment - - - get_alignment - - - set_tabs - tabs - - - get_tabs - - - set_single_paragraph_mode - setting - - - get_single_paragraph_mode - - - context_changed - - - index_to_pos - index - - - get_cursor_pos - index - - - move_cursor_visually - strong - old_index - old_trailing - direction - - - xy_to_index - x - y - - - get_extents - - - - get_pixel_extents - - - - get_size - - - get_pixel_size - - - get_line_count - - - get_line - line - - - - get_iter - - - - - - - - - Ancestry - -+-- gobject.GObject - +-- pango.Layout - - - - - - Description - - A pango.Layout -object represents a paragraph of text with a pango.Context, a -UTF-8 text string and a set of attributes for that string. The set of -formatted lines can be extracted from the object, the layout can be -rendered, and conversion between logical character positions within the -layout's text, and the physical position of the resulting glyphs can be -made. Also there are a number of attributes that adjust the formatting of -the layout. - - - - - Constructor - - - pango.Layout - context - - - - context : - a pango.Context - - - Returns : - a new pango.Layout. - - - - Creates a new pango.Layout -object with attributes initialized to the default values of the pango.Context -specified by context. - - - - - Methods - - - pango.Layout.copy - - - copy - - - - Returns : - a new pango.Layout that -is a copy of the layout - - - - The copy() method returns a pango.Layout that -is a deep copy-by-value of the layout. The attribute list, tab array, and -text from the layout are all copied by value. - - - - - pango.Layout.get_context - - - get_context - - - - Returns : - the pango.Context for -the layout. - - - - The get_context() method returns the -pango.Context -used for this layout. - - - - - pango.Layout.set_attributes - - - set_attributes - attrs - - - - attrs : - a pango.AttrList - - - - The set_attributes() method sets the -pango.AttrList -for the layout object to the value specified by -attrs. - - - - - pango.Layout.get_attributes - - - get_attributes - - - - Returns : - a pango.AttrList - - - - The get_attributes() method returns the -pango.AttrList -for the layout, if any. - - - - - pango.Layout.set_text - - - set_text - text - - - - text : - a UTF8-string - - - - The set_text() method sets the text of -the layout to the value specified by text. - - - - - pango.Layout.get_text - - - get_text - - - - Returns : - the text in the layout - - - - The get_text() method returns the text -in the layout. - - - - - pango.Layout.set_markup - - - set_markup - markup - - - - markup : - marked-up text - - - - The set_markup() method is the same as -the set_markup_with_accel() -method but the markup text isn't scanned for accelerators. - - - - - pango.Layout.set_markup_with_accel - - - set_markup_with_accel - markup - accel_marker - - - - markup : - some marked-up text (see the Pango Markup Language reference -page) - - - accel_marker : - marker for accelerators in the -text - - - Returns : - the accelerator character if -any - - - - The set_markup_with_accel() method sets -the layout text and attribute list from marked-up text to the value -specified by markup_format (see the Pango Markup Language reference -page). The current text and attribute list of the layout are replaced. If -accel_marker is nonzero the markup will be parsed for -the marker and the character following the first marker becomes the -accelerator character. For example, if the accelerator marker is an -underscore, the character after the first underscore will be the accelerator -character. All characters marked as an accelerator will be displayed with a -pango.UNDERLINE_LOW attribute, and the accelerator -character will be returned in accel_char. A literal -accel_marker character can be put in the markup by -using two accel_marker characters together. - - - - - pango.Layout.set_font_description - - - set_font_description - desc - - - - desc : - the new pango.FontDescription, -or None to unset the current font -description. - - - - The set_font_description() method set -the default pango.FontDescription -for the layout to the value specified by desc. If no -font description is set on the layout, the font description from the -layout's context is used. - - - - - pango.Layout.set_width - - - set_width - width - - - - width : - the desired width, or -1 to indicate that no -wrapping should be performed. - - - - The set_width() method sets the wrap -width for the lines of the pango.Layout to -the value specified by width. If the value of -width is -1 no wrapping should be performed. - - - - - pango.Layout.get_width - - - get_width - - - - Returns : - the width - - - - The get_width() method returns the -width at which the lines of the pango.Layout -should be wrapped. - - - - - pango.Layout.set_wrap - - - set_wrap - wrap - - - - wrap : - the wrap mode - - - - The set_wrap() method sets the wrap -style to the value specified by wrap. The value of -wrap must be one of: - - - - pango.WRAP_WORD - - Wrap lines at word boundaries. - - - - pango.WRAP_CHAR - - Wrap lines at character boundaries. - - - - - The wrap style is in effect if a width is set on the layout with -the pango.Layout.set_width(). -To turn off wrapping, set the width to -1. - - - - - pango.Layout.get_wrap - - - get_wrap - - - - Returns : - Active wrap mode. - - - - The get_wrap() method returns the value -of the wrap mode for the layout. See the set_wrap() -method for more information. - - - - - pango.Layout.set_indent - - - set_indent - indent - - - - indent : - the amount by which to -indent - - - - The set_indent() method sets the -indentation of the first line of the layout to the value specified by -indent. The value of indent -may be negative to provide a hanging indent. - - - - - pango.Layout.get_indent - - - get_indent - - - - Returns : - the indent - - - - The get_indent() method returns the -amount of indentation of the first line of the layout. - - - - - pango.Layout.set_spacing - - - set_spacing - spacing - - - - spacing : - the amount of spacing (in thousandths of a -device unit) - - - - The set_spacing() method sets the -amount of spacing between the lines of the layout to the value specified by -spacing. - - - - - pango.Layout.get_spacing - - - get_spacing - - - - Returns : - the spacing (in thousandths of a device -unit) - - - - The get_spacing() method returns the -amount of spacing between the lines of the layout. - - - - - pango.Layout.set_justify - - - set_justify - justify - - - - justify : - if True the lines in the -layout should be justified. - - - - The set_justify() method sets the -justification attribute to the value of justify. If -justify is True each complete line -should be stretched to fill the entire width of the layout. This stretching -is typically done by adding whitespace, but for some scripts (such as -Arabic), the justification is done by extending the characters. - - - - - pango.Layout.get_justify - - - get_justify - - - - Returns : - True if justification will -be used - - - - The get_justify() method returns -True if each complete line should be stretched to fill -the entire width of the layout. - - - - - pango.Layout.set_alignment - - - set_alignment - alignment - - - - alignment : - the new alignment - - - - The set_alignment() method sets the -alignment (how partial lines are positioned within the -horizontal space available) for the layout to the value specified by -alignment. The value of -alignment must be one of: - - - - pango.ALIGN_LEFT - - Put all available space on the right - - - - pango.ALIGN_CENTER - - Center the line within the available space - - - - pango.ALIGN_RIGHT - - Put all available space on the left - - - - - - - - - - pango.Layout.get_alignment - - - get_alignment - - - - Returns : - the alignment value - - - - The get_alignment() method returns the -alignment (how partial lines are positioned within the -horizontal space available) for the layout. See the set_alignment() -method for more information. - - - - - pango.Layout.set_tabs - - - set_tabs - tabs - - - - tabs : - a pango.TabArray - - - - The set_tabs() method sets the tabs to -the value specified by tabs thereby overriding the -default tabs (every 8 spaces). If tabs is -None, the default tabs are reinstated. - - - - - pango.Layout.get_tabs - - - get_tabs - - - - Returns : - a copy of the tabs for this layout, or -None - - - - The get_tabs() method returns the -current pango.TabArray -used by this layout. If no pango.TabArray -has been set, then the default tabs (every 8 spaces) are in use and -None is returned - - - - - pango.Layout.set_single_paragraph_mode - - - set_single_paragraph_mode - setting - - - - setting : - if True newlines, etc. are -not treated as paragraph separators. - - - - The set_single_paragraph_mode() method -sets the single paragraph mode attribute to the value specified by -setting. If setting is -True, do not treat newlines and similar characters as -paragraph separators; instead, keep all text in a single paragraph, and -display a glyph for paragraph separator characters. Used when you want to -allow editing of newlines on a single text line. - - - - - pango.Layout.get_single_paragraph_mode - - - get_single_paragraph_mode - - - - Returns : - True if the layout does not -break paragraphs at paragraph separator characters - - - - The get_single_paragraph_mode() method -returns the value set by the set_single_paragraph_mode() -method. - - - - - pango.Layout.context_changed - - - context_changed - - - The context_changed() method forces -recomputation of any state in the pango.Layout that -might depend on the layout's context. This method should be called if you -make changes to the pango.Context -subsequent to creating the layout. - - - - - pango.Layout.index_to_pos - - - index_to_pos - index - - - - index : - byte index within the -layout - - - Returns : - a 4-tuple representing the grapheme's -position - - - - The index_to_pos() method converts from -the specified index within a pango.Layout to -the onscreen position corresponding to the grapheme at that index, which is -represented as a 4-tuple (x, y, width, height). Note that -x is always the leading edge of the grapheme and -x + width the trailing edge of the grapheme. If the -directionality of the grapheme is right-to-left, then -width will be negative. - - - - - pango.Layout.get_cursor_pos - - - get_cursor_pos - index - - - - index : - the byte index of the -cursor - - - Returns : - a 2-tuple containing two 4-tuples representing -the strong and weak cursor positions - - - - The get_cursor_pos() method returns a -2-tuple containing two 4-tuples representing the strong and weak cursor -positions of the specified index within a layout. The -position of each cursor is stored as a zero-width rectangle represented by a -4-tuple (x, y, -width, height). The strong cursor -location is the location where characters of the directionality equal to the -base direction of the layout are inserted. The weak cursor location is the -location where characters of the directionality opposite to the base -direction of the layout are inserted. - - - - - pango.Layout.move_cursor_visually - - - move_cursor_visually - strong - old_index - old_trailing - direction - - - - strong : - if True the moving cursor is -the strong cursor; otherwise, the weak cursor. The strong cursor is the -cursor corresponding to text insertion in the base direction for the -layout. - - - old_index : - the byte index of the grapheme for the old -index - - - old_trailing : - if 0, the cursor was at the trailing edge of -the grapheme indicated by old_index, if > 0, the -cursor was at the leading edge. - - - direction : - direction to move cursor. A negative value -indicates motion to the left. - - - Returns : - a 2-tuple containing: the new cursor byte index -(a value of -1 indicates that the cursor has been moved off the beginning of -the layout while a value of G_MAXINT indicates that the cursor has been -moved off the end of the layout); and, the number of characters to move -forward (from the new cursor position) to get the position where the cursor -should be displayed. - - - - The move_cursor_visually() returns a -2-tuple containing: - - - - a new cursor position calculated from an old position -(specified by old_index) and the specified -direction to move visually - - - the number of characters to move forward (from the new -cursor position) to get the position where the cursor should be displayed. -This allows distinguishing the position at the beginning of one line from -the position at the end of the preceding line. the first value is always on -the line where the cursor should be displayed. - - - - If direction is positive, then the new -strong cursor position will be one position to the right of the old cursor -position. If direction is negative then the new -strong cursor position will be one position to the left of the old cursor -position. - - In the presence of bidirectional text, the correspondence -between logical and visual order will depend on the direction of the current -run, and there may be jumps when the cursor is moved off of the end of a -run. - - Motion here is in cursor positions, not in characters, so a -single call to the move_cursor_visually() method -may move the cursor over multiple characters when multiple characters -combine to form a single grapheme. - - - - - pango.Layout.xy_to_index - - - xy_to_index - x - y - - - - x : - the X offset (in thousandths of a device unit) -from the left edge of the layout. - - - y : - the Y offset (in thousandths of a device unit) -from the top edge of the layout - - - Returns : - a 2-tuple containing the calculated byte index -and an integer indicating where in the grapheme the user clicked (it will -either be zero, or the number of characters in the grapheme - 0 represents -the trailing edge of the grapheme). - - - - The xy_to_index() method returns the -byte index of the character at the specified x and -y position within a layout. If the position is not -inside the layout, the closest position is chosen (the -(x, y) position will be -clamped inside the layout). - - - - - pango.Layout.get_extents - - - get_extents - - - - - Returns : - a 2-tuple containing two 4-tuples representing -the as drawn and logical extents rectangles of the layout - - - - - The get_extents() method returns a -2-tuple containing two 4-tuples representing the ink and logical extents -rectangles of the layout in device units (one pixel = -pango.SCALE device units). Logical extents are usually -what you want for positioning things. The extents are given in layout -coordinates which begin at the top left corner of the layout. - - - - - pango.Layout.get_pixel_extents - - - get_pixel_extents - - - - - Returns : - a 2-tuple containing two 4-tuples representing -the as drawn (ink) and logical extents rectangles of the -layout - - - - The get_pixel_extents() method returns -a 2-tuple containing two 4-tuples representing the logical and ink extents -rectangles of the layout in pixel units. See the get_extents() -method for more information. This method just calls the get_extents() -and then converts the extents to pixels (one pixel = -pango.SCALE device units). - - - - - pango.Layout.get_size - - - get_size - - - - - Returns : - a 2-tuple containing the logical width and -height of the pango.Layout - - - - The get_size() method returns a 2-tuple -containing the logical width and height of the pango.Layout in -pango device units (one pixel = pango.SCALE device -units). - - - - - pango.Layout.get_pixel_size - - - get_pixel_size - - - - - Returns : - a 2-tuple containing the logical width height -of the pango.Layout - - - - The get_pixel_size() method returns a -2-tuple containing the logical width and height of the pango.Layout in -pixels (one pixel = pango.SCALE device units). (The get_size() -returns the width and height in device units.) - - - - - pango.Layout.get_line_count - - - get_line_count - - - - Returns : - the line count - - - - The get_line_count() method returns the -count of lines in the layout. - - - - - pango.Layout.get_line - - - get_line - line - - - - line : - the index of a line, which must be between 0 and -layout.get_line_count() - 1, inclusive. - - - Returns : - the requested pango.LayoutLine, - or None if the index is out of range. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_line() method returns the line -with the index number specified by line from the -layout. The returned layout line will become invalid if changes are made to -the pango.Layout. - - - - - - - pango.Layout.get_iter - - - get_iter - - - - - Returns : - a new pango.LayoutIter -object - - - - - This method is available in PyGTK 2.6 and above. - - - The get_iter() method returns a pango.LayoutIter -object that can be used to iterate over the visual extents of the -layout. - - - - - - diff --git a/docs/reference/pygtk-pangolayoutiter.xml b/docs/reference/pygtk-pangolayoutiter.xml deleted file mode 100644 index 0c5a2862..00000000 --- a/docs/reference/pygtk-pangolayoutiter.xml +++ /dev/null @@ -1,473 +0,0 @@ - - - - - pango.LayoutIter - an object used to iterate over the visual extents of a -pango.Layout -(new in PyGTK 2.6) - - - - Synopsis - - - pango.LayoutIter - gobject.GBoxed - - free - - - - next_char - - - - next_cluster - - - - next_line - - - - next_run - - - - at_last_line - - - - get_index - - - - get_baseline - - - - get_char_extents - - - - get_cluster_extents - - - - get_layout_extents - - - - get_line_extents - - - - get_run_extents - - - - get_line_yrange - - - - get_line - - - - - - - - - Ancestry - -+-- gobject.GBoxed - +-- pango.LayoutIter - - - - - - Description - - A pango.LayoutIter -object can be used to iterate over the visual elements of a pango.Layout. A -pango.LayoutIter -is created using the pango.Layout.get_iter() -method. - - - - - Methods - - - pango.LayoutIter.free - - - free - - - - Returns : - a new pango.Layout that -is a copy of the layout - - - - - This method is deprecated and should not be used since it may -crash your application. - - - The free() method frees the pango.LayoutIter -object. - - - - - pango.LayoutIter.next_char - - - next_char - - - - - Returns : - True if the iter was -moved. - - - - The next_char() method returns -True if the pango.LayoutIter -is moved to the next character in visual order. If the iter was already at -the end of the layout this method returns False. - - - - - pango.LayoutIter.next_cluster - - - next_cluster - - - - - Returns : - True if the iter was -moved. - - - - The next_cluster() method returns -True if the pango.LayoutIter -is moved to the next cluster in visual order. If the iter was already at the -end of the layout this method returns False. - - - - - pango.LayoutIter.next_line - - - next_line - - - - - Returns : - True if the iter was -moved. - - - - The next_line() method returns -True if the pango.LayoutIter -is moved to the next line in visual order. If the iter was already at the -end of the layout this method returns False. - - - - - pango.LayoutIter.next_run - - - next_run - - - - - Returns : - True if the iter was -moved. - - - - The next_run() method returns -True if the pango.LayoutIter -is moved to the next run in visual order. If the iter was already at the end -of the layout this method returns False. - - - - - pango.LayoutIter.at_last_line - - - at_last_line - - - - - Returns : - True if the iter is in the -last line. - - - - The at_last_line() method returns -True if the pango.LayoutIter -points to a position in the last line of the layout. - - - - - pango.LayoutIter.get_index - - - get_index - - - - - Returns : - the current byte index - - - - The get_index() method returns the -current byte index. Note that iterating forward by char moves in visual -order, not logical order, so indexes may not be sequential. Also, the index -may be equal to the length of the text in the layout. - - - - - pango.LayoutIter.get_baseline - - - get_baseline - - - - - Returns : - the baseline of the current -line. - - - - The get_baseline() method returns the y -position of the current line's baseline, in layout coordinates (origin at -top left of the entire layout). - - - - - pango.LayoutIter.get_char_extents - - - get_char_extents - - - - - Returns : - a 4-tuple containing the logical extents of the -character at the iter position. - - - - The get_char_extents() method returns a -4-tuple (x, y, width, height) containing the logical extents of the current -character, in layout coordinates (origin is the top left of the entire -layout). Only logical extents can sensibly be obtained for characters; ink -extents make sense only down to the level of clusters. - - - - - pango.LayoutIter.get_cluster_extents - - - get_cluster_extents - - - - - Returns : - a 2-tuple containing containing the -ink and logical extents as 4-tuples. - - - - The get_cluster_extents() method -returns a 2-tuple containing the ink and logical extents (as 4-tuples: x, y, -width, height) of the cluster at the iter position. - - - - - pango.LayoutIter.get_layout_extents - - - get_layout_extents - - - - - Returns : - a 2-tuple containing containing the -ink and logical extents as 4-tuples. - - - - The get_layout_extents() method returns -a 2-tuple containing the ink and logical extents (as 4-tuples: x, y, width, -height) of the layout at the iter position. - - - - - pango.LayoutIter.get_line_extents - - - get_line_extents - - - - - Returns : - a 2-tuple containing containing the -ink and logical extents as 4-tuples. - - - - The get_line_extents() method returns a -2-tuple containing the ink and logical extents (as 4-tuples: x, y, width, -height) of the line at the iter position. - - - - - pango.LayoutIter.get_run_extents - - - get_run_extents - - - - - Returns : - a 2-tuple containing containing the -ink and logical extents as 4-tuples. - - - - The get_run_extents() method returns a -2-tuple containing the ink and logical extents (as 4-tuples: x, y, width, -height) of the run at the iter position. - - - - - pango.LayoutIter.get_line_yrange - - - get_line_yrange - - - - - Returns : - a 2-tuple containing the start and end of the -layout line. - - - - The get_line_yrange() method returns a -2-tuple containing the start and end y positions of the layout line. The -vertical space in the pango.Layout -associated with the iter is devided between the lines in the layout, the -space belonging to the current line is returned in the 2-tuple. A line's -range includes the line's logical extents, plus half of the spacing above -and below the line, if the pango.Layout.set_spacing() -method has been called to set the layout spacing. The y positions are in layout -coordinates (origin at top left of the entire layout). - - - - - pango.LayoutIter.get_line - - - get_line - - - - - Returns : - a pango.LayoutLine -containing the current line. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_line() method returns a pango.LayoutLine -containing the current line. - - - - - - diff --git a/docs/reference/pygtk-pangolayoutline.xml b/docs/reference/pygtk-pangolayoutline.xml deleted file mode 100644 index d6efe553..00000000 --- a/docs/reference/pygtk-pangolayoutline.xml +++ /dev/null @@ -1,262 +0,0 @@ - - - - - pango.LayoutLine - a line in a pango.Layout -(new in PyGTK 2.8) - - - - Synopsis - - - pango.LayoutLine - gobject.GBoxed - - get_extents - - - get_pixel_extents - - - index_to_x - index - trailing - - - x_to_index - x_pos - - - - - - - - Ancestry - -+-- gobject.GBoxed - +-- pango.LayoutLine - - - - - - Attributes - -
- - - - - - - - - - "is_paragraph_start" - Read - True if this is the first line of -the paragraph - - - - "length" - Read - the length of the line in bytes - - - - "resolved_dir" - Read - the resolved direction of line - - - - "runs" - Read - a list containing the runs of the line in visual -order. - - - - "start_index" - Read - the start of the line as byte index into the -layout. - - - - - -
- -
- - - Description - - A pango.LayoutLine -object represents one of the lines resulting from laying out a paragraph via -pango.Layout. pango.LayoutLine -objects are obtained by calling the pango.Layout.get_line() -method or the pango.LayoutIter.get_line() -method. pango.LayoutLine -objects are only valid until the text, attributes, or settings of the parent -pango.Layout -are modified. - - - - - Methods - - - pango.LayoutLine.get_extents - - - get_extents - - - - Returns : - a 2-tuple containing 4-tuples representing -the rectangles for the logical and ink extents in Pango -units. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_extents() method returns the -logical and ink extents rectangles of the layout line in a 2-tuple -containing two 4-tuples which represent the rectangles. See the -documentation for the pango.Font.get_glyph_extents() -method for details about the interpretation of the rectangles. The return -extents are in Pango units (1 device unit = pango.SCALE pango units). - - - - - pango.LayoutLine.get_pixel_extents - - - get_pixel_extents - - - - Returns : - a 2-tuple containing 4-tuples representing -the rectangles for the logical and ink extents in device -units. - - - - - This method is available in PyGTK 2.8 and above. - - - The get_pixel_extents() method returns -the logical and ink extents rectangles of the layout line in a 2-tuple -containing two 4-tuples which represent the rectangles. See the -documentation for the pango.Font.get_glyph_extents() -method for details about the interpretation of the rectangles. The return -extents are in device units (1 device unit = pango.SCALE pango -units). - - - - - pango.LayoutLine.index_to_x - - - index_to_x - index - trailing - - - - index : - the byte offset of a grapheme -within the layout - - - trailing : - an integer indicating the edge of the grapheme -to retrieve the position of. If 0, the trailing edge of the grapheme, -if > 0, the leading edge of the grapheme. - - - Returns : - the X position in Pango units - - - - - This method is available in PyGTK 2.8 and above. - - - The index_to_x() method returns the X -position (in Pango units) of the grapheme at the byte offset specified by -index and edge specified by -trailing. - - - - - pango.LayoutLine.x_to_index - - - x_to_index - x_pos - - - - x_pos : - the x offset (in Pango units) from the left -edge of the line. - - - Returns : - a 3-tuple containing a boolean indicating if the -x_pos is inside the line, the byte offset of the -grapheme and the location in the grapheme. - - - - - This method is available in PyGTK 2.8 and above. - - - The x_to_index() method returns a -3-tuple containing a boolean that is True if x_pos is -inside the line, the location inside the grapheme - either zero, or the -number of characters in the grapheme. 0 represents the trailing edge of the -grapheme. - - - - - -
diff --git a/docs/reference/pygtk-pangorenderer.xml b/docs/reference/pygtk-pangorenderer.xml deleted file mode 100644 index 23a2253f..00000000 --- a/docs/reference/pygtk-pangorenderer.xml +++ /dev/null @@ -1,598 +0,0 @@ - - - - - - pango.Renderer - a base class for pango rendering (new in -PyGTK 2.8) - - - - Synopsis - - - pango.Renderer - gobject.GObject - - draw_layout - layout - x - y - - - draw_layout_line - line - x - y - - - draw_glyphs - font - glyphs - x - y - - - draw_rectangle - part - x - y - width - height - - - draw_error_underline - x - y - width - height - - - draw_trapezoid - part - y1_ - x11 - x21 - y2 - x12 - x22 - - - activate - - - deactivate - - - part_changed - part - - - set_color - part - color - - - get_color - part - - - - - - - Ancestry - -+-- gobject.GObject - +-- pango.Renderer - - - - - - Description - - pango.Renderer -is a base class that contains the necessary logic for rendering a pango.Layout or -pango.LayoutLine. By -subclassing pango.Renderer -and overriding operations such as draw_glyphs() -and draw_rectangle(), -renderers for particular font backends and destinations can be -created. - - - - - Methods - - - pango.Renderer.draw_layout - - - draw_layout - layout - x - y - - - - layout : - a pango.Layout - - - x : - the x position of left edge of baseline, -in user space coordinates in Pango units. - - - y : - the y position of left edge of baseline, -in user space coordinates in Pango units. - - - - - This method is available in PyGTK 2.8 and above. - - - The draw_layout() method draws the -pango.Layout -s[ecified by layout at the position specified by -x and y. - - - - - pango.Renderer.draw_layout_line - - - draw_layout_line - line - x - y - - - - line : - a pango.LayoutLine - - - x : - the x position of left edge of baseline, -in user space coordinates in Pango units. - - - y : - the y position of left edge of baseline, -in user space coordinates in Pango units. - - - - - This method is available in PyGTK 2.8 and above. - - - The draw_layout_line() method draws the -pango.LayoutLine -specified by line at the position specified by -x and y. - - - - - pango.Renderer.draw_glyphs - - - draw_glyphs - font - glyphs - x - y - - - - font : - a pango.Font - - - glyphs : - a pango.GlyphString - - - x : - the x position of left edge of baseline, -in user space coordinates in Pango units. - - - y : - the y position of left edge of baseline, -in user space coordinates in Pango units. - - - - - This method is available in PyGTK 2.8 and above. - - - The draw_glyphs() method draws the -pango.GlyphString -specified by glyphs using the pango.Font specified -by font at the position specified by -x and y. - - - - - pango.Renderer.draw_rectangle - - - draw_rectangle - part - x - y - width - height - - - - part : - the part where the rectangle is to be -rendered - - - x : - the x position at which to draw rectangle, -in user space coordinates in Pango units - - - y : - the y position at which to draw rectangle, -in user space coordinates in Pango units - - - width : - the width of rectangle in Pango units -in user space coordinates - - - height : - the height of rectangle in Pango units -in user space coordinates - - - - - This method is available in PyGTK 2.8 and above. - - - The draw_rectangle() method draws an -axis-aligned rectangle with the size specified by -width and height at the -position specified by x and y, -all in user space coordinates. The rectangle will be drawn in the rendering -part (see the ) specified by -part. - - - - - pango.Renderer.draw_error_underline - - - draw_error_underline - x - y - width - height - - - - x : - the X coordinate of the underline, in Pango units -in the user coordinate system - - - y : - the Y coordinate of the underline, in Pango units -in the user coordinate system - - - width : - the width of the underline, in Pango units -in the user coordinate system - - - height : - the height of the underline, in Pango units -in the user coordinate system - - - - - This method is available in PyGTK 2.8 and above. - - - The draw_error_underline() method draws a -squiggly line that approximately covers the rectangle specified by -x, y, -width and height in the style -of an underline used to indicate a spelling error. (The width of the -underline is rounded to an integer number of up/down segments and the -resulting rectangle is centered in the original rectangle). - - - - - pango.Renderer.draw_trapezoid - - - draw_trapezoid - part - y1_ - x11 - x21 - y2 - x12 - x22 - - - - part : - where the trapezoid is to be -rendered - - - y1_ : - the Y coordinate of the top of the -trapezoid - - - x11 : - the X coordinate of the left end of the top of -the trapezoid - - - x21 : - the X coordinate of the right end of the top of -the trapezoid - - - y2 : - the Y coordinate of the bottom of the -trapezoid - - - x12 : - the X coordinate of the left end of the bottom of -the trapezoid - - - x22 : - the X coordinate of the left end of the bottom of -the trapezoid - - - - - This method is available in PyGTK 2.8 and above. - - - The draw_trapezoid() method draws a -trapezoid with the parallel sides aligned with the X axis using the -coordinates specified by y1_, -x11, x21, -y2, x12, -x22. The coordinates are in device space. The -trapezoid is rendered in the part specified by part -which must be one of the . - - - - - pango.Renderer.activate - - - activate - - - - This method is available in PyGTK 2.8 and above. - - - The activate() method does initial -setup before performing the rendering operations on renderer. The deactivate() -method should be called when drawing is complete. Calls to the draw_layout() -method automatically activate the layout before drawing on it. Calls to the -activate() -and deactivate() -methods can be nested and the renderer will only be initialized and -deinitialized once. - - - - - pango.Renderer.deactivate - - - deactivate - - - - This method is available in PyGTK 2.8 and above. - - - The deactivate() method cleans up after -rendering operations are completed. See the activate() -method for more information. - - - - - pango.Renderer.part_changed - - - part_changed - part - - - - part : - the part that has its rendering -changed. - - - - - This method is available in PyGTK 2.8 and above. - - - The part_changed() method informs Pango -that the way that the renderering is done for the part specified by -part has changed in a way that would prevent multiple -pieces being joined together into one drawing -call. part must be one of the . For instance, if a -subclass of pango.Renderer -was to add a stipple option for drawing underlines, it needs to call: - - -renderer.part_changed(pango.RENDER_PART_UNDERLINE) - - - when the stipple changes or underlines with different stipples -might be joined together. Pango automatically calls this for changes to -colors. (See the set_color() -method for more information). - - - - - pango.Renderer.set_color - - - set_color - part - color - - - - part : - the part to change the color - of - - - color : - a pango.Color - - - - - This method is available in PyGTK 2.8 and above. - - - The set_color() method sets the pango.Color -specified by color as the color for the part -specified by part. part must -be one of the . - - - - - pango.Renderer.get_color - - - get_color - part - - - - part : - a part - - - Returns : -  : - a pango.Color or -None - - - - - This method is available in PyGTK 2.8 and above. - - - The get_color() method returns the -current rendering pango.Color for the -part specified by part. part -must be one of the . If -None is returned, the color has not been set and should -be inherited from the environment. - - - - - - diff --git a/docs/reference/pygtk-pangotabarray.xml b/docs/reference/pygtk-pangotabarray.xml deleted file mode 100644 index b4f4ee72..00000000 --- a/docs/reference/pygtk-pangotabarray.xml +++ /dev/null @@ -1,290 +0,0 @@ - - - - - - pango.TabArray - an object containing an array of tab stops. - - - - Synopsis - - - pango.TabArray - gobject.GBoxed - - pango.TabArray - initial_size - positions_in_pixels - - - copy - - - get_size - - - resize - new_size - - - set_tab - tab_index - alignment - location - - - get_tab - tab_index - - - get_tabs - - - get_positions_in_pixels - - - - - - - Description - - A pango.TabArray -object contains an array of tab stops. Each tab stop has an alignment and a -position. - - - - - Constructor - - - pango.TabArray - initial_size - positions_in_pixels - - - - initial_size : - Initial number of tab stops to allocate, can be -0 - - - positions_in_pixels : - if True the tab positions are -in pixel units - - - Returns : - a pango.TabArray - - - - Creates a new pango.TabArray -object with the number of tab stops specified by -initial_size. If -positions_in_pixels is True, the -tab stop positions are specified in pixel units otherwise in pango units -(one pixel = pango.SCALE pango units). All tab stops are -initially at position 0. - - - - - Methods - - - pango.TabArray.copy - - - copy - - - - Returns : - a new pango.TabArray -object - - - - The copy() method returns a new pango.TabArray -that is copy of this pango.TabArray. - - - - - pango.TabArray.get_size - - - get_size - - - - Returns : - the number of tab stops in the -array. - - - - The get_size() method returns the -number of tab stops in the tab array. - - - - - pango.TabArray.resize - - - resize - new_size - - - - new_size : - the new size of the array - - - - The resize() method sets the size of -the tab array to the value specified by new_size. You -must subsequently initialize any tabs that were added to the array. - - - - - pango.TabArray.set_tab - - - set_tab - tab_index - alignment - location - - - - tab_index : - the index of a tab stop - - - alignment : - the tab alignment - - - location : - the tab location in pango -units - - - - The set_tab() method sets the specified -alignment and location of the -tab stop specified by tab_index. The value of -alignment must always be -pango.TAB_LEFT in the current implementation. - - - - - pango.TabArray.get_tab - - - get_tab - tab_index - - - - tab_index : - the tab stop index - - - Returns : - a 2-tuple containing the tab alignment and -position - - - - The get_tab() method returns a 2-tuple -containing the alignment and position of the tab stop specified by -tab_index. - - - - - pango.TabArray.get_tabs - - - get_tabs - - - - Returns : - a tuple containing a list of 2-tuples (each -holding the alignment and position of a tab stop). - - - - The get_tabs() method returns a tuple -containing a list of 2-tuples (each holding the alignment and position of a -tab stop) - - - - - pango.TabArray.get_positions_in_pixels - - - get_positions_in_pixels - - - - Returns : - True if tab stop positions -are specified in pixels - - - - The get_positions_in_pixels() method -returns True if the tab positions are specified in -pixels and False if they are in pango units. - - - - - - diff --git a/docs/reference/pygtk-pygtkgenericcellrenderer.xml b/docs/reference/pygtk-pygtkgenericcellrenderer.xml deleted file mode 100644 index 9ea092e0..00000000 --- a/docs/reference/pygtk-pygtkgenericcellrenderer.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - gtk.GenericCellRenderer - a TreeView cell renderer that helps create cell renderers -in Python - - - - Synopsis - - - gtk.GenericCellRenderer - gtk.CellRenderer - - gtk.GenericCellRenderer - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.Object - +-- gtk.CellRenderer - +-- gtk.GenericCellRenderer - - - - - - Description - - The gtk.GenericCellRenderer -helps in the creation of gtk.TreeView cell -renderers in Python. The gtk.GenericCellRenderer -is subclassed to provide a new cell renderer that provides cell renderer -behavior using methods with predefined names that are called by the gtk.GenericCellRenderer -methods as required to provide the various cell renderer operations. The -methods that need to be defined by the programmer in Python are: - - - on_get_size - widget - cell_area - - - on_render - window - widget - background_area - cell_area - expose_area - flags - - - on_activate - event - widget - path - background_area - cell_area - flags - - - on_start_editing - event - widget - path - background_area - cell_area - flags - - - See the gtk.CellRenderer -description for details of the above methods. - - - - - Constructor - - - gtk.GenericCellRenderer - - - - Returns : - a new gtk.GenericCellRenderer -object - - - - Creates a new gtk.GenericCellRenderer - - - - diff --git a/docs/reference/pygtk-pygtkgenerictreemodel.xml b/docs/reference/pygtk-pygtkgenerictreemodel.xml deleted file mode 100644 index 54677206..00000000 --- a/docs/reference/pygtk-pygtkgenerictreemodel.xml +++ /dev/null @@ -1,279 +0,0 @@ - - - - - - gtk.GenericTreeModel - a TreeView model that helps create tree models in -Python - - - - Synopsis - - - gtk.GenericTreeModel - gobject.GObject - gtk.TreeModel - - gtk.GenericTreeModel - - - invalidate_iters - - - - iter_is_valid - iter - - - - - - - Ancestry - -+-- gobject.GObject - +-- gtk.GenericTreeModel (implements gtk.TreeModel) - - - - - - Properties - -
- - - - - - - - - "leak-references" - Read-Write - - If True, creating a gtk.TreeIter will -bump the reference count of the object used as the internal row -reference. This may cause a memory leak but will prevent problems with -objects being destroyed while still in use in a gtk.TreeIter. Set -this to False only if the model saves the objects used in -tree iters. - - - - - -
- -
- - - Description - - The gtk.GenericTreeModel -helps in the creation of gtk.TreeView tree -models in Python. The gtk.GenericTreeModel -is subclassed to provide a new tree model that provides the tree model -behavior using methods with predefined names that are called by the gtk.GenericTreeModel -methods as required to provide the various tree model operations. The -methods that need to be defined by the programmer in Python are: - - - on_get_flags - self - - - on_get_n_columns - self - - - on_get_column_type - self - index - - - on_get_iter - self - path - - - on_get_path - self - rowref - - - on_get_value - self - rowref - column - - - on_iter_next - self - rowref - - - on_iter_children - self - parent - - - on_iter_has_child - self - rowref - - - on_iter_n_children - self - rowref - - - on_iter_nth_child - self - parent - n - - - on_iter_parent - self - child - - - See the gtk.TreeModel -description for details of the above methods. - - In PyGTK 2.4 and above the invalidate_iters() -and iter_is_valid() -methods are available to help manage the gtk.TreeIter -objects and their Python object references. These are particularly useful -when the "leak-references" property is set to -False. - - The tree models derived from gtk.GenericTreeModel -are protected from problems with out of date gtk.TreeIter -objects because gtk.TreeIter -objects are automatically checked for validity with the tree model. - - If a custom tree model doesn't support persistent iters -(i.e. gtk.TREE_MODEL_ITERS_PERSIST is not set in the -return from the gtk.TreeModel.get_flags() -method), it can call the invalidate_iters() -method to invalidate all its outstanding gtk.TreeIter -objects when it changes the model (e.g. after inserting a new row). The tree -model can also dispose of any Python objects that it passed references to -gtk.TreeIter -objects after calling the invalidate_iters() -method. - - Applications can use the iter_is_valid() -method to determine if a gtk.TreeIter is -still valid for the custom tree model. - - - - - Constructor - - - gtk.GenericTreeModel - - - - Returns : - a new gtk.GenericTreeModel -object - - - - Creates a new gtk.GenericTreeModel -object - - - - - Methods - - - gtk.GenericTreeModel.invalidate_iters - - - invalidate_iters - - - - - This method is available in PyGTK 2.4 and above. - - - The invalidate_iters() method -invalidates all the gtk.TreeIter -objects for the custom tree model. - - - - - gtk.GenericTreeModel.iter_is_valid - - - iter_is_valid - iter - - - - iter : - a gtk.TreeIter - - - Returns : - True if - iter is valid for the tree model; - otherwise, False is - returned. - - - - - This method is available in PyGTK 2.4 and above. - - - The iter_is_valid() method returns -True if the gtk.TreeIter -specified by iter is valid for the custom tree -model. - - - - - -
diff --git a/docs/reference/pygtk-pygtktreemodelrow.xml b/docs/reference/pygtk-pygtktreemodelrow.xml deleted file mode 100644 index b44b54b7..00000000 --- a/docs/reference/pygtk-pygtktreemodelrow.xml +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - gtk.TreeModelRow - an object representing a row in a gtk.TreeModel - - - - Synopsis - - - gtk.TreeModelRow - - iterchildren - - - - - - - - Ancestry - -+-- gobject.GBoxed - +-- gtk.TreeModelRow - - - - - - Attributes - -
- - - - - - - - - - "next" - Read - - The next gtk.TreeModelRow -or None - - - - "parent" - Read - - The parent gtk.TreeModelRow - of this row or None - - - - "model" - Read - - The gtk.TreeModel -that the row is part of. - - - - "path" - Read - The tree path of the row - - - - "iter" - Read - - A gtk.TreeIter -pointing at the row. - - - - - -
- -
- - - Description - - A gtk.TreeModelRow -object represents a row in a gtk.TreeModel. A -gtk.TreeModelRow -is created by taking the mapping of a gtk.TreeModel. For -example: - - - treemodelrow = liststore[0] - treemodelrow = liststore[(0,)] - treemodelrow = liststore['0'] - - - all create a gtk.TreeModelRow -for the first row in liststore. The gtk.TreeModelRow -implements some of the Python sequence protocol that makes the row behave -like a sequence of objects. Specifically a tree model row has the capability -of: - - - - getting and setting column values, - - - returning a tuple or list containing the column values, -and - - - getting the number of values in the row i.e. the number of -columns - - - - For example to get and set the value in the second column of a -row, you could do the following: - - - value = treemodelrow[1] - treemodelrow[1] = value - - - You can use the Python len() function to get -the number of columns in the row and you can retrieve all the column values -as a list (tuple) using the Python list() -(tuple()) function. - - The gtk.TreeModelRow -supports one method: the iterchildren() -method that returns a gtk.TreeModelRowIter -for iterating over the children of the row. - - - - - Methods - - - gtk.TreeModelRow.iterchildren - - - iterchildren - - - - - Returns : - a gtk.TreeModelRowIter - for the row's children or - None - - - - The iterchildren() method returns a -gtk.TreeModelRowIter -for iterating over the children of the row or None if the -row has no children. - - - - - -
diff --git a/docs/reference/pygtk-pygtktreemodelrowiter.xml b/docs/reference/pygtk-pygtktreemodelrowiter.xml deleted file mode 100644 index df24080b..00000000 --- a/docs/reference/pygtk-pygtktreemodelrowiter.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - gtk.TreeModelRowIter - an object for iterating over a set of gtk.TreeModelRow -objects. - - - - Synopsis - - - gtk.TreeModelRowIter - - next - - - - - - - - Ancestry - -+-- gobject.GBoxed - +-- gtk.TreeModelRowIter - - - - - - Description - - A gtk.TreeModelRowIter -is an object that implements the Python Iterator protocol. It provides the -means to iterate over a set of gtk.TreeModelRow -objects in a gtk.TreeModel. A -gtk.TreeModelRowIter -is created by calling the Python iter() function on a -gtk.TreeModel -object: - - - treemodelrowiter = iter(treestore) - - - or, calling the gtk.TreeModelRow.iterchildren() -method to iterate over its child rows. - - Each time you call the next() -method it returns the next sibling gtk.TreeModelRow -. When there are no rows left the StopIteration exception is raised. Note -that a gtk.TreeModelRowIter -does not iterate over the child rows of the rows it is iterating -over. You'll have to use the gtk.TreeModelRow.iterchildren() -method to retrieve an iterator for the child rows. - - - - - Methods - - - gtk.TreeModelRowIter.next - - - next - - - - - Returns : - the next gtk.TreeModelRow - - - - The next() method returns the next -gtk.TreeModelRow -in the set of rows it is iterating over. When there are no more rows left -the StopIteration exception is raised. - - - - - - diff --git a/docs/reference/pygtk-unixprint-classes.xml b/docs/reference/pygtk-unixprint-classes.xml deleted file mode 100644 index 9d8eeea5..00000000 --- a/docs/reference/pygtk-unixprint-classes.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - The gtkunixprint Class Reference - - - - - - - - - - - diff --git a/docs/reference/pygtk-unixprint-constants.xml b/docs/reference/pygtk-unixprint-constants.xml deleted file mode 100644 index a4abe8d9..00000000 --- a/docs/reference/pygtk-unixprint-constants.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - gtkunixprint Constants - the built-in constants of the gtkunixprint module (new in - PyGTK 2.10) - - - - Synopsis - - - - - - - - - Description - - - Unixprint Print Capabilities Flag Constants - - The Print Capabilities Flag constants specify the printing - capabilities an application supports. - - - - gtkunixprint.PRINT_CAPABILITY_PAGE_SET - - - - - - gtkunixprint.PRINT_CAPABILITY_COPIES - - - - - - gtkunixprint.PRINT_CAPABILITY_COLLATE - - - - - - gtkunixprint.PRINT_CAPABILITY_REVERSE - - - - - - gtkunixprint.PRINT_CAPABILITY_SCALE - - - - - - - - - - - diff --git a/docs/reference/pygtk-unixprint-functions.xml b/docs/reference/pygtk-unixprint-functions.xml deleted file mode 100644 index 5d38ec11..00000000 --- a/docs/reference/pygtk-unixprint-functions.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - gtkunixprint Functions - the built-in functions of the gtkunixprint - module - - - - Synopsis - - - gtkunixprint.enumerate_printers - func - dataNone - waitTrue - - - - - - Functions - - - gtkunixprint.enumerate_printers - - - gtkunixprint.enumerate_printers - func - dataNone - waitTrue - - - - - func : - a function to call for each - printer - - - data : - user data to pass to - func - - - wait : - if True, wait in a recursive - mainloop until all printers are enumerated; otherwise return - early - - - - - This function is available in PyGTK 2.10 and above. - - - Calls the function specified by func for - all gtkunixprint.Printers. - If func returns True, the - enumeration is stopped. - - The signature of func is: - - def func(printer, user_data): - - where printer is a gtkunixprint.Printer - object and user_data is - data. Note if data is - not specified user_data will not be passed to - func. - - - - - - diff --git a/docs/reference/pygtk2-ref.xml b/docs/reference/pygtk2-ref.xml deleted file mode 100644 index d29afea0..00000000 --- a/docs/reference/pygtk2-ref.xml +++ /dev/null @@ -1,42 +0,0 @@ - - -%entities; - -]> - - - - &builddate; - PyGTK 2.0 Reference Manual - PyGTK Reference Manual for PyGTK &version; - For PyGTK version &version; - - This reference describes the classes of the Python PyGTK -module. - - - - - - - - - PyGTK Class Hierarchy - - - - - - - - - - - - - - - - diff --git a/examples/Makefile.am b/examples/Makefile.am deleted file mode 100644 index 2407b296..00000000 --- a/examples/Makefile.am +++ /dev/null @@ -1,103 +0,0 @@ -pygtklibdir = $(libdir)/pygtk/2.0 -pygtklib_PYTHON = pygtk-demo/pygtk-demo.py -demodir = $(pygtklibdir)/demos -demoimgdir = $(demodir)/images - -bin_SCRIPTS = pygtk-demo/pygtk-demo -pygtk-demo/pygtk-demo: pygtk-demo/pygtk-demo.in - @mkdir -p pygtk-demo - @sed -e s!\@PYTHON\@!@PYTHON@! \ - -e s!\@libdir\@!@libdir@! \ - < $< > $@ - @chmod a+x $@ - -CLEANFILES = pygtk-demo/pygtk-demo - -EXTRA_DIST = \ - pygtk-demo/pygtk-demo.in\ - atk/atk-demo.py \ - gobject/editable-interface.py \ - gobject/properties.py \ - gobject/signal.py \ - gtk/bin.py \ - gtk/filechooser.py \ - gtk/scrollable.py \ - gtk/sizegroup.py \ - gtk/uimanager.py \ - gtk/widget.py \ - gtk/testprint.py \ - glade/README \ - glade/test.glade \ - glade/autoconnect.py \ - glade/test2.glade \ - glade/glade-demo.py \ - ide/README \ - ide/break.xpm \ - ide/browse.py \ - ide/continue.xpm \ - ide/edit.py \ - ide/edit.xpm \ - ide/gtkcons.py \ - ide/gtkdb.py \ - ide/gtkprof.py \ - ide/minibreak.xpm \ - ide/next.xpm \ - ide/pyide.py \ - ide/quit.xpm \ - ide/return.xpm \ - ide/run.xpm \ - ide/step.xpm \ - ide/dialogs.py \ - pango/utf8-demo.py \ - pango/pangocairo-simple.py \ - simple/README \ - simple/dnd.py \ - simple/dndpixmap.py \ - simple/hello.py \ - simple/scribble.py \ - simple/simple.py \ - simple/tooltip.py - - -demo_PYTHON = \ - pygtk-demo/demos/__init__.py \ - pygtk-demo/demos/appwindow.py \ - pygtk-demo/demos/buttonbox.py \ - pygtk-demo/demos/changedisplay.py \ - pygtk-demo/demos/colorsel.py \ - pygtk-demo/demos/dialogs.py \ - pygtk-demo/demos/dnd.py \ - pygtk-demo/demos/dndpixmap.py \ - pygtk-demo/demos/editable_cells.py \ - pygtk-demo/demos/entry_completion.py \ - pygtk-demo/demos/expander.py \ - pygtk-demo/demos/hypertext.py \ - pygtk-demo/demos/images.py \ - pygtk-demo/demos/list_store.py \ - pygtk-demo/demos/menu.py \ - pygtk-demo/demos/panes.py \ - pygtk-demo/demos/pixbufs.py \ - pygtk-demo/demos/print_editor.py \ - pygtk-demo/demos/sizegroup.py \ - pygtk-demo/demos/stock_browser.py \ - pygtk-demo/demos/textview.py \ - pygtk-demo/demos/tree_store.py \ - pygtk-demo/demos/treemodel.py \ - pygtk-demo/demos/statusicon.py \ - pygtk-demo/demos/ui_manager.py - -demoimg_DATA = \ - pygtk-demo/demos/images/alphatest.png \ - pygtk-demo/demos/images/apple-red.png \ - pygtk-demo/demos/images/background.jpg \ - pygtk-demo/demos/images/floppybuddy.gif \ - pygtk-demo/demos/images/gnome-applets.png \ - pygtk-demo/demos/images/gnome-calendar.png \ - pygtk-demo/demos/images/gnome-foot.png \ - pygtk-demo/demos/images/gnome-gimp.png \ - pygtk-demo/demos/images/gnome-gmush.png \ - pygtk-demo/demos/images/gnome-gsame.png \ - pygtk-demo/demos/images/gnu-keys.png \ - pygtk-demo/demos/images/gtk-logo-rgb.gif - -EXTRA_DIST += $(demoimg_DATA) diff --git a/examples/atk/atk-demo.py b/examples/atk/atk-demo.py deleted file mode 100644 index 238a00e6..00000000 --- a/examples/atk/atk-demo.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python - -import gtk -import atk - -win = gtk.Window() -win.connect('destroy', lambda win: gtk.main_quit()) - -button = gtk.Button(stock=gtk.STOCK_QUIT) -button.connect('pressed', lambda button: gtk.main_quit()) -atk_button = button.get_accessible() -atk_button.set_description('Be careful, clicking this button will exit') - -label = gtk.Label('This label describes a button') -atk_label = label.get_accessible() -atk_label.set_description('This is a useless label') -relation_set = atk_label.ref_relation_set() - -relation = atk.Relation((atk_button,), atk.RELATION_LABEL_FOR) -relation_set.add(relation) - -box = gtk.HBox() -box.pack_start(label) -box.pack_start(button) - -win.add(box) -win.show_all() - -gtk.main() diff --git a/examples/glade/README b/examples/glade/README deleted file mode 100644 index d83c582d..00000000 --- a/examples/glade/README +++ /dev/null @@ -1,12 +0,0 @@ -This directory contains examples of the use of the pyglade module, which can -be used for creating user interfaces from the .glade files created by the -GLADE UI builder. - -Just put a glade file in this directory and run: - ./glade.py filename.glade - -The pyglade module should make it even easier to prototype interfaces in -python, since you can get it to look right, and act correctly when signals -get emitted, then generate a C skeleton for the UI. - -You can find GLADE at http://www.comp.lancs.ac.uk/~damon/builder/index.html \ No newline at end of file diff --git a/examples/glade/autoconnect.py b/examples/glade/autoconnect.py deleted file mode 100644 index 72b1f2a2..00000000 --- a/examples/glade/autoconnect.py +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env python -# -# Small test to demonstrate glade.XML.signal_autoconnect on an instance -# - -import pygtk -pygtk.require('2.0') - -import gtk, gtk.glade - -class SimpleTest: - def __init__(self): - xml = gtk.glade.XML('test2.glade') - xml.signal_autoconnect(self) - - def on_button1_clicked(self, button): - print 'foo!' - -test = SimpleTest() -gtk.main() diff --git a/examples/glade/glade-demo.py b/examples/glade/glade-demo.py deleted file mode 100644 index d67a586b..00000000 --- a/examples/glade/glade-demo.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python -import sys -import gtk -import gtk.glade - -if len(sys.argv) > 1: - fname = sys.argv[1] -else: - fname = 'test.glade' - -# create widget tree ... -xml = gtk.glade.XML(fname) - -def gtk_main_quit(*args): - gtk.main_quit() - -xml.signal_autoconnect(locals()) - -gtk.main() diff --git a/examples/glade/test.glade b/examples/glade/test.glade deleted file mode 100644 index 93c37f9c..00000000 --- a/examples/glade/test.glade +++ /dev/null @@ -1,127 +0,0 @@ - - - - - - Testing - 10 - yes - - - Test Frame - - This is the first of two test windows. - - - - - - 5 - yes - - - - A label - yes - - A label - - - - - no - - - - - I am a tooltip - yes - - - Push Me Button - - This button wants to be pushed. - - - - - - - - - - - _Push me - yes - yes - - - - - - - - - - Testing2 - 10 - yes - - - Testing 2 - - This is the second of two test windows, a test dialog box. - - - - - - - - Click the button below - yes - - - - - - yes - - - - - - - yes - - - Cancel - - Another button that does the same as the first one... - - - - - - - - - - - _Cancel - yes - yes - - - - - - - - - - - diff --git a/examples/glade/test2.glade b/examples/glade/test2.glade deleted file mode 100644 index bf4d279c..00000000 --- a/examples/glade/test2.glade +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - True - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - - - - True - True - button1 - True - GTK_RELIEF_NORMAL - - - - - - diff --git a/examples/gobject/editable-interface.py b/examples/gobject/editable-interface.py deleted file mode 100644 index 70ba1dc2..00000000 --- a/examples/gobject/editable-interface.py +++ /dev/null @@ -1,30 +0,0 @@ -import gtk -import gobject - - -class EditableLabel(gtk.Entry, gtk.Editable): - - def __init__(self, text): - gtk.Entry.__init__(self, 100) - self.set_text(text) - - def do_do_delete_text(self, start_pos, end_pos): - print "do_do_delete_text", start_pos, end_pos - gtk.Entry.do_do_delete_text(self, start_pos, end_pos) - -gobject.type_register(EditableLabel) - -if __name__ == '__main__': - w = gtk.Window() - vbox = gtk.VBox() - w.add(vbox) - label = EditableLabel("Foo Bar Zbr") - vbox.add(label) - bt = gtk.Button("delete word") - def delete_word(bt): - label.delete_text(4, 7) - bt.connect("clicked", delete_word) - vbox.add(bt) - w.connect("destroy", lambda w: gtk.main_quit()) - w.show_all() - gtk.main() diff --git a/examples/gobject/properties.py b/examples/gobject/properties.py deleted file mode 100644 index 2d36afc6..00000000 --- a/examples/gobject/properties.py +++ /dev/null @@ -1,43 +0,0 @@ -import gobject - -class MyObject(gobject.GObject): - __gproperties__ = { - 'foo': (gobject.TYPE_STRING, 'foo property', 'the foo of the object', - 'bar', gobject.PARAM_READWRITE), - 'boolprop': (gobject.TYPE_BOOLEAN, 'bool prop', 'a test boolean prop', - 0, gobject.PARAM_READABLE), - } - - def __init__(self): - self.__gobject_init__() - self.foo = 'bar' - def do_set_property(self, pspec, value): - print ' do_set_property called for %s=%r' % (pspec.name, value) - if pspec.name == 'foo': - self.foo = value - else: - raise AttributeError, 'unknown property %s' % pspec.name - def do_get_property(self, pspec): - print ' do_get_property called for %s' % pspec.name - if pspec.name == 'foo': - return self.foo - elif pspec.name == 'boolprop': - return 1 - else: - raise AttributeError, 'unknown property %s' % pspec.name -gobject.type_register(MyObject) - -print "MyObject properties: ", gobject.list_properties(MyObject) -obj = MyObject() - -val = obj.get_property('foo') -print "obj.get_property('foo') == ", val - -obj.set_property('foo', 'spam') -print "obj.set_property('foo', 'spam')" - -val = obj.get_property('foo') -print "obj.get_property('foo') == ", val - -val = obj.get_property('boolprop') -print "obj.get_property('boolprop') == ", val diff --git a/examples/gobject/signal.py b/examples/gobject/signal.py deleted file mode 100644 index 26ddae93..00000000 --- a/examples/gobject/signal.py +++ /dev/null @@ -1,28 +0,0 @@ -import pygtk; pygtk.require("2.0") -import gobject - -class C(gobject.GObject): - __gsignals__ = { - 'my_signal': (gobject.SIGNAL_RUN_FIRST, gobject.TYPE_NONE, - (gobject.TYPE_INT,)) - } - def __init__(self): - self.__gobject_init__() # default constructor using our new GType - def do_my_signal(self, arg): - print "C: class closure for `my_signal' called with argument", arg - -class D(C): - def do_my_signal(self, arg): - print "D: class closure for `my_signal' called. Chaining up to C" - C.do_my_signal(self, arg) - -def my_signal_handler(object, arg, *extra): - print "handler for `my_signal' called with argument", arg, \ - "and extra args", extra - -inst = C() -inst2 = D() - -inst.connect("my_signal", my_signal_handler, 1, 2, 3) -inst.emit("my_signal", 42) -inst2.emit("my_signal", 42) diff --git a/examples/gtk/bin.py b/examples/gtk/bin.py deleted file mode 100644 index fa8d7afa..00000000 --- a/examples/gtk/bin.py +++ /dev/null @@ -1,30 +0,0 @@ -# A simple gtk.Conatiner subclassing example reimplementing gtk.Bin in python -import gtk - -class Bin(gtk.Container): - __gtype_name__ = 'PyGtkBin' - def __init__(self): - gtk.Container.__init__(self) - self.child = None - - def do_add(self, child): - child.set_parent(self) - self.child = child - - def do_remove(self, child): - widget_was_visible = child.flags() & gtk.VISIBLE - child.unparent() - self.child = None - - if widget_was_visible: - self.queue_resize() - - def do_forall(self, internal, callback, data): - if self.child: - callback(self.child, data) - -label = gtk.Label() -c = Bin() -c.add(label) -print c.get_children() -c.remove(label) diff --git a/examples/gtk/filechooser.py b/examples/gtk/filechooser.py deleted file mode 100644 index 613b4e19..00000000 --- a/examples/gtk/filechooser.py +++ /dev/null @@ -1,35 +0,0 @@ -import pygtk -pygtk.require('2.0') - -import gtk - -dialog = gtk.FileChooserDialog("Open..", - None, - gtk.FILE_CHOOSER_ACTION_OPEN, - (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, - gtk.STOCK_OPEN, gtk.RESPONSE_OK)) -dialog.set_default_response(gtk.RESPONSE_OK) - -filter = gtk.FileFilter() -filter.set_name("All files") -filter.add_pattern("*") -dialog.add_filter(filter) - -filter = gtk.FileFilter() -filter.set_name("Images") -filter.add_mime_type("image/png") -filter.add_mime_type("image/jpeg") -filter.add_mime_type("image/gif") -filter.add_pattern("*.png") -filter.add_pattern("*.jpg") -filter.add_pattern("*.gif") -filter.add_pattern("*.tif") -filter.add_pattern("*.xpm") -dialog.add_filter(filter) - -response = dialog.run() -if response == gtk.RESPONSE_OK: - print dialog.get_filename(), 'selected' -elif response == gtk.RESPONSE_CANCEL: - print 'Closed, no files selected' -dialog.destroy() diff --git a/examples/gtk/scrollable.py b/examples/gtk/scrollable.py deleted file mode 100644 index 12db08fc..00000000 --- a/examples/gtk/scrollable.py +++ /dev/null @@ -1,280 +0,0 @@ -# -# Reimplementation of gtk.Layout in python -# Example on how to implement a scrollable container in python -# -# Johan Dahlin , 2006 -# -# Requires PyGTK 2.8.0 or later - -import gobject -import gtk -from gtk import gdk - -class Child: - widget = None - x = 0 - y = 0 - -def set_adjustment_upper(adj, upper, always_emit): - changed = False - value_changed = False - - min = max(0.0, upper - adj.page_size) - - if upper != adj.upper: - adj.upper = upper - changed = True - - if adj.value > min: - adj.value = min - value_changed = True - - if changed or always_emit: - adj.changed() - if value_changed: - adj.value_changed() - -def new_adj(): - return gtk.Adjustment(0.0, 0.0, 0.0, - 0.0, 0.0, 0.0) - -class Layout(gtk.Container): - __gsignals__ = dict(set_scroll_adjustments= - (gobject.SIGNAL_RUN_LAST, None, - (gtk.Adjustment, gtk.Adjustment))) - def __init__(self): - self._children = [] - self._width = 100 - self._height = 100 - self._hadj = None - self._vadj = None - self._bin_window = None - self._hadj_changed_id = -1 - self._vadj_changed_id = -1 - gtk.Container.__init__(self) - - if not self._hadj or not self._vadj: - self._set_adjustments(self._vadj or new_adj(), - self._hadj or new_adj()) - - # Public API - - def put(self, widget, x=0, y=0): - child = Child() - child.widget = widget - child.x = x - child.y = y - self._children.append(child) - - if self.flags() & gtk.REALIZED: - widget.set_parent_window(self._bin_window) - - widget.set_parent(self) - - def set_size(self, width, height): - if self._width != width: - self._width = width - if self._height != height: - self._height = height - if self._hadj: - set_adjustment_upper(self._hadj, self._width, False) - if self._vadj: - set_adjustment_upper(self._vadj, self._height, False) - - if self.flags() & gtk.REALIZED: - self._bin_window.resize(max(width, self.allocation.width), - max(height, self.allocation.height)) - - # GtkWidget - - def do_realize(self): - self.set_flags(self.flags() | gtk.REALIZED) - - self.window = gdk.Window( - self.get_parent_window(), - window_type=gdk.WINDOW_CHILD, - x=self.allocation.x, - y=self.allocation.y, - width=self.allocation.width, - height=self.allocation.height, - wclass=gdk.INPUT_OUTPUT, - colormap=self.get_colormap(), - event_mask=gdk.VISIBILITY_NOTIFY_MASK) - self.window.set_user_data(self) - - self._bin_window = gdk.Window( - self.window, - window_type=gdk.WINDOW_CHILD, - x=int(-self._hadj.value), - y=int(-self._vadj.value), - width=max(self._width, self.allocation.width), - height=max(self._height, self.allocation.height), - colormap=self.get_colormap(), - wclass=gdk.INPUT_OUTPUT, - event_mask=(self.get_events() | gdk.EXPOSURE_MASK | - gdk.SCROLL_MASK)) - self._bin_window.set_user_data(self) - - self.set_style(self.style.attach(self.window)) - self.style.set_background(self.window, gtk.STATE_NORMAL) - self.style.set_background(self._bin_window, gtk.STATE_NORMAL) - - for child in self._children: - child.widget.set_parent_window(self._bin_window) - self.queue_resize() - - def do_unrealize(self): - self._bin_window.set_user_data(None) - self._bin_window.destroy() - self._bin_window = None - gtk.Container.do_unrealize(self) - - def _do_style_set(self, style): - gtk.Widget.do_style_set(self, style) - - if self.flags() & gtk.REALIZED: - self.style.set_background(self._bin_window, gtk.STATE_NORMAL) - - def do_expose_event(self, event): - if event.window != self._bin_window: - return False - gtk.Container.do_expose_event(self, event) - return False - - def do_map(self): - self.set_flags(self.flags() | gtk.MAPPED) - for child in self._children: - flags = child.widget.flags() - if flags & gtk.VISIBLE: - if not (flags & gtk.MAPPED): - child.widget.map() - self._bin_window.show() - self.window.show() - - def do_size_request(self, req): - req.width = 0 - req.height = 0 - for child in self._children: - child.widget.size_request() - - def do_size_allocate(self, allocation): - self.allocation = allocation - for child in self._children: - self._allocate_child(child) - - if self.flags() & gtk.REALIZED: - self.window.move_resize(*allocation) - self._bin_window.resize(max(self._width, allocation.width), - max(self._height, allocation.height)) - - self._hadj.page_size = allocation.width - self._hadj.page_increment = allocation.width * 0.9 - self._hadj.lower = 0 - set_adjustment_upper(self._hadj, - max(allocation.width, self._width), True) - - self._vadj.page_size = allocation.height - self._vadj.page_increment = allocation.height * 0.9 - self._vadj.lower = 0 - self._vadj.upper = max(allocation.height, self._height) - set_adjustment_upper(self._vadj, - max(allocation.height, self._height), True) - - def do_set_scroll_adjustments(self, hadj, vadj): - self._set_adjustments(hadj, vadj) - - # GtkContainer - - def do_forall(self, include_internals, callback, data): - for child in self._children: - callback(child.widget, data) - - def do_add(self, widget): - self.put(widget) - - def do_remove(self, widget): - child = self._get_child_from_widget(widget) - self._children.remove(child) - widget.unparent() - - # Private - - def _set_adjustments(self, hadj, vadj): - if not hadj and self._hadj: - hadj = new_adj() - - if not vadj and self._vadj: - vadj = new_adj() - - if self._hadj and self._hadj != hadj: - self._hadj.disconnect(self._hadj_changed_id) - - if self._vadj and self._vadj != vadj: - self._vadj.disconnect(self._vadj_changed_id) - - need_adjust = False - - if self._hadj != hadj: - self._hadj = hadj - set_adjustment_upper(hadj, self._width, False) - self._hadj_changed_id = hadj.connect( - "value-changed", - self._adjustment_changed) - need_adjust = True - - if self._vadj != vadj: - self._vadj = vadj - set_adjustment_upper(vadj, self._height, False) - self._vadj_changed_id = vadj.connect( - "value-changed", - self._adjustment_changed) - need_adjust = True - - if need_adjust and vadj and hadj: - self._adjustment_changed() - - def _adjustment_changed(self, adj=None): - if self.flags() & gtk.REALIZED: - self._bin_window.move(int(-self._hadj.value), - int(-self._vadj.value)) - self._bin_window.process_updates(True) - - def _get_child_from_widget(self, widget): - for child in self._children: - if child.widget == widget: - return child - else: - raise AssertionError - - def _allocate_child(self, child): - allocation = gdk.Rectangle() - allocation.x = child.x - allocation.y = child.y - req = child.widget.get_child_requisition() - allocation.width = req[0] - allocation.height = req[1] - child.widget.size_allocate(allocation) - -Layout.set_set_scroll_adjustments_signal('set-scroll-adjustments') - -def main(): - window = gtk.Window() - window.set_size_request(300, 300) - window.connect('delete-event', gtk.main_quit) - - sw = gtk.ScrolledWindow() - sw.set_policy(gtk.POLICY_ALWAYS, gtk.POLICY_ALWAYS) - window.add(sw) - - layout = Layout() - layout.set_size(1000, 1000) - sw.add(layout) - - b = gtk.Button('foobar') - layout.put(b, 100, 100) - - window.show_all() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/gtk/sizegroup.py b/examples/gtk/sizegroup.py deleted file mode 100644 index a88308d3..00000000 --- a/examples/gtk/sizegroup.py +++ /dev/null @@ -1,48 +0,0 @@ -# -# Small example of GtkSizeGroup -# -# Johan Dahlin , 2005 -# - -"""Simple example that demonstrates how to use a GtkSizeGroup. - -In this case we'll have two labels and two entries. -The labels have different width, but we'd like to have the entries -aligned vertically. We can accomplish this by adding a horizontal -sizegroup to the labels. -""" - -import gtk - -def create_label(text): - hbox = gtk.HBox(spacing=6) - label = gtk.Label(text) - hbox.pack_start(label) - entry = gtk.Entry() - hbox.pack_start(entry) - return hbox, label - -def main(): - win = gtk.Window() - win.connect('delete-event', gtk.main_quit) - win.set_border_width(6) - win.set_title('GtkSizeGroup example') - - vbox = gtk.VBox(spacing=6) - win.add(vbox) - - sg = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL) - - hbox, label = create_label('Name:') - sg.add_widget(label) - vbox.pack_start(hbox) - - hbox, label = create_label('Address:') - sg.add_widget(label) - vbox.pack_start(hbox) - - win.show_all() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/gtk/testprint.py b/examples/gtk/testprint.py deleted file mode 100644 index 06acf3f3..00000000 --- a/examples/gtk/testprint.py +++ /dev/null @@ -1,68 +0,0 @@ -## Derived from tests/testprint.c from gtk+ sources - -import sys -import math -import cairo -import pango -import gtk - -def request_page_setup(operation, context, page_nr, page_setup): - ## Make the second page landscape mode a5 - if page_nr == 1: - page_setup.set_orientation(gtk.PAGE_ORIENTATION_LANDSCAPE) - page_setup.set_paper_size(gtk.PaperSize("iso_a5")) - - -def draw_page (operation, context, page_nr): - cr = context.get_cairo() - - ## Draw a red rectangle, as wide as the paper (inside the margins) - cr.set_source_rgb(1.0, 0, 0) - cr.rectangle(0, 0, context.get_width(), 50) - - cr.fill() - - ## Draw some lines - cr.move_to(20, 10) - cr.line_to(40, 20) - cr.arc(60, 60, 20, 0, math.pi) - cr.line_to(80, 20) - - cr.set_source_rgb(0, 0, 0) - cr.set_line_width(5) - cr.set_line_cap(cairo.LINE_CAP_ROUND) - cr.set_line_join(cairo.LINE_JOIN_ROUND) - - cr.stroke() - - ## Draw some text - layout = context.create_layout() - layout.set_text("Hello World! Printing is easy") - layout.set_font_description(pango.FontDescription("sans 28")) - - cr.move_to(30, 20) - cr.layout_path(layout) - - ## Font Outline - cr.set_source_rgb(0.93, 1.0, 0.47) - cr.set_line_width(0.5) - cr.stroke_preserve() - - ## Font Fill - cr.set_source_rgb(0, 0.0, 1.0) - cr.fill() - - -def main(argv): - ## Test some random drawing, with per-page paper settings - print_ = gtk.PrintOperation() - print_.set_nr_of_pages(2) - print_.set_unit(gtk.UNIT_MM) - print_.set_pdf_target("test.pdf") - print_.connect("draw_page", draw_page) - print_.connect("request_page_setup", request_page_setup) - res = print_.run() - return 0 - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/examples/gtk/uimanager.py b/examples/gtk/uimanager.py deleted file mode 100644 index 7f731524..00000000 --- a/examples/gtk/uimanager.py +++ /dev/null @@ -1,127 +0,0 @@ -# -# Small example of the new GtkUIManager -# -# Johan Dahlin , 2004 -# - -import pygtk -pygtk.require('2.0') - -import gtk - -ui_string = """ - - - - - - - - - - - - - - - - - - -""" - -class Window(gtk.Window): - def __init__(self): - gtk.Window.__init__(self) - self.set_position(gtk.WIN_POS_CENTER) - self.set_title('GtkUIManager test app') - self.connect('delete-event', self.delete_event_cb) - self.set_size_request(400, 200) - vbox = gtk.VBox() - self.add(vbox) - - self.create_ui() - vbox.pack_start(self.ui.get_widget('/Menubar'), expand=False) - vbox.pack_start(self.ui.get_widget('/Toolbar'), expand=False) - - sw = gtk.ScrolledWindow() - sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - vbox.pack_start(sw) - - textview = gtk.TextView() - self.buffer = textview.get_buffer() - sw.add(textview) - - status = gtk.Statusbar() - vbox.pack_end(status, expand=False) - - def create_ui(self): - ag = gtk.ActionGroup('WindowActions') - actions = [ - ('FileMenu', None, '_File'), - ('New', gtk.STOCK_NEW, '_New', 'N', - 'Create a new file', self.file_new_cb), - ('Open', gtk.STOCK_OPEN, '_Open', 'O', - 'Open a file', self.file_open_cb), - ('Close', gtk.STOCK_CLOSE, '_Close', 'W', - 'Close the current window', self.file_close_cb), - ('Quit', gtk.STOCK_QUIT, '_Quit', 'Q', - 'Quit application', self.file_quit_cb), - ('HelpMenu', None, '_Help'), - ('About', None, '_About', None, 'About application', - self.help_about_cb), - ] - ag.add_actions(actions) - self.ui = gtk.UIManager() - self.ui.insert_action_group(ag, 0) - self.ui.add_ui_from_string(ui_string) - self.add_accel_group(self.ui.get_accel_group()) - - def file_new_cb(self, action): - w = Window() - w.show_all() - gtk.main() - - def file_open_cb(self, action): - dialog = gtk.FileChooserDialog("Open..", self, - gtk.FILE_CHOOSER_ACTION_OPEN, - (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, - gtk.STOCK_OPEN, gtk.RESPONSE_OK)) - dialog.set_default_response(gtk.RESPONSE_OK) - - filter = gtk.FileFilter() - filter.set_name("All files") - filter.add_pattern("*") - dialog.add_filter(filter) - - dialog.hide() - - if dialog.run() == gtk.RESPONSE_OK: - filename = dialog.get_filename() - self.buffer.set_text(file(filename).read()) - - dialog.destroy() - - def file_close_cb(self, action): - self.hide() - gtk.main_quit() - - def file_quit_cb(self, action): - raise SystemExit - - def help_about_cb(self, action): - dialog = gtk.MessageDialog(self, - (gtk.DIALOG_MODAL | - gtk.DIALOG_DESTROY_WITH_PARENT), - gtk.MESSAGE_INFO, gtk.BUTTONS_OK, - "Small example of the new GtkUIManger") - dialog.run() - dialog.destroy() - - def delete_event_cb(self, window, event): - gtk.main_quit() - -if __name__ == '__main__': - w = Window() - w.show_all() - gtk.main() diff --git a/examples/gtk/widget.py b/examples/gtk/widget.py deleted file mode 100644 index 976dc447..00000000 --- a/examples/gtk/widget.py +++ /dev/null @@ -1,133 +0,0 @@ -import sys - -import gobject -import pango -import gtk -from gtk import gdk - -if gtk.pygtk_version < (2, 8): - print "PyGtk 2.8 or later required for this example" - raise SystemExit - -try: - import cairo -except ImportError: - raise SystemExit("cairo required for this example") - -TEXT = 'A GtkWidget implemented in PyGTK' -BORDER_WIDTH = 10 - -# A quite simple gtk.Widget subclass which demonstrates how to subclass -# and do realizing, sizing and drawing. - -class PyGtkWidget(gtk.Widget): - def __init__(self, text): - gtk.Widget.__init__(self) - self._layout = self.create_pango_layout(text) - self._layout.set_font_description(pango.FontDescription("Sans Serif 16")) - - # GtkWidget - - def do_realize(self): - # The do_realize method is responsible for creating GDK (windowing system) - # resources. In this example we will create a new gdk.Window which we - # then draw on - - # First set an internal flag telling that we're realized - self.set_flags(self.flags() | gtk.REALIZED) - - # Create a new gdk.Window which we can draw on. - # Also say that we want to receive exposure events by setting - # the event_mask - self.window = gdk.Window( - self.get_parent_window(), - width=self.allocation.width, - height=self.allocation.height, - window_type=gdk.WINDOW_CHILD, - wclass=gdk.INPUT_OUTPUT, - event_mask=self.get_events() | gdk.EXPOSURE_MASK) - - # Associate the gdk.Window with ourselves, Gtk+ needs a reference - # between the widget and the gdk window - self.window.set_user_data(self) - - # Attach the style to the gdk.Window, a style contains colors and - # GC contextes used for drawing - self.style.attach(self.window) - - # The default color of the background should be what - # the style (theme engine) tells us. - self.style.set_background(self.window, gtk.STATE_NORMAL) - self.window.move_resize(*self.allocation) - - def do_unrealize(self): - # The do_unrealized method is responsible for freeing the GDK resources - - # De-associate the window we created in do_realize with ourselves - self.window.set_user_data(None) - - def do_size_request(self, requisition): - # The do_size_request method Gtk+ is calling on a widget to ask - # it the widget how large it wishes to be. It's not guaranteed - # that gtk+ will actually give this size to the widget - - # In this case, we say that we want to be as big as the - # text is, plus a little border around it. - width, height = self._layout.get_size() - requisition.width = width // pango.SCALE + BORDER_WIDTH*4 - requisition.height = height // pango.SCALE + BORDER_WIDTH*4 - - def do_size_allocate(self, allocation): - # The do_size_allocate is called by when the actual size is known - # and the widget is told how much space could actually be allocated - - # Save the allocated space - self.allocation = allocation - - # If we're realized, move and resize the window to the - # requested coordinates/positions - if self.flags() & gtk.REALIZED: - self.window.move_resize(*allocation) - - def do_expose_event(self, event): - # The do_expose_event is called when the widget is asked to draw itself - # Remember that this will be called a lot of times, so it's usually - # a good idea to write this code as optimized as it can be, don't - # Create any resources in here. - - # In this example, draw a rectangle in the foreground color - x, y, w, h = self.allocation - cr = self.window.cairo_create() - cr.set_source_color(self.style.fg[self.state]) - cr.rectangle(BORDER_WIDTH, BORDER_WIDTH, - w - 2*BORDER_WIDTH, h - 2*BORDER_WIDTH) - cr.set_line_width(5.0) - cr.set_line_join(cairo.LINE_JOIN_ROUND) - cr.stroke() - - # And draw the text in the middle of the allocated space - fontw, fonth = self._layout.get_pixel_size() - cr.move_to((w - fontw)/2, (h - fonth)/2) - cr.update_layout(self._layout) - cr.show_layout(self._layout) - -gobject.type_register(PyGtkWidget) - -def main(args): - win = gtk.Window() - win.set_border_width(5) - win.set_title('Widget test') - win.connect('delete-event', gtk.main_quit) - - frame = gtk.Frame("Example frame") - win.add(frame) - - w = PyGtkWidget(TEXT) - frame.add(w) - - win.show_all() - - gtk.main() - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/examples/ide/README b/examples/ide/README deleted file mode 100644 index 99568b0f..00000000 --- a/examples/ide/README +++ /dev/null @@ -1,7 +0,0 @@ -This directory contains some tools that can be used to help develop python -applications. There is a graphical front end to the profiler and debugger, -and a graphical python console, and a 'module browser'. - -I will probably link these together with an editor (just use emacs, or write -one in python?). - diff --git a/examples/ide/break.xpm b/examples/ide/break.xpm deleted file mode 100644 index f5221a30..00000000 --- a/examples/ide/break.xpm +++ /dev/null @@ -1,29 +0,0 @@ -/* XPM */ -static char * break_xpm[] = { -"21 22 4 1", -" c None", -". c #000000", -"X c #FFFFFF", -"o c #FF0000", -" ......... ", -" .XXXXXXXXX. ", -" .XXoooooooXX. ", -" .XXoooooooooXX. ", -" .XXoooooooooooXX. ", -" .XXoooooooooooooXX. ", -".XXoooooooooooooooXX.", -".XoooooooooooooooooX.", -".XooXXoXXXoXXooXXooX.", -".XoXooXoXoXooXoXoXoX.", -".XoXooooXoXooXoXoXoX.", -".XooXXooXoXooXoXXooX.", -".XooooXoXoXooXoXoooX.", -".XoXooXoXoXooXoXoooX.", -".XooXXooXooXXooXoooX.", -".XXoooooooooooooooXX.", -" .XXoooooooooooooXX. ", -" .XXoooooooooooXX. ", -" .XXoooooooooXX. ", -" .XXoooooooXX. ", -" .XXXXXXXXX. ", -" ......... "}; diff --git a/examples/ide/browse.py b/examples/ide/browse.py deleted file mode 100755 index 0cc85b0d..00000000 --- a/examples/ide/browse.py +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env python - -# This is an example of using dynamic trees (trees where nodes are only -# calculated as they are needed) with pygtk. This particular example -# allows for the browsing of the variables in a module, allowing the -# descent into classes and modules and other objects with a __dict__ -# attribute. - -# If this file is run straight, it will let you browse the gtk module. - -import pygtk -pygtk.require('2.0') -import gtk - -class BrowseVariables(gtk.VBox): - def __init__(self, name, obj): - gtk.VBox.__init__(self) - self.set_spacing(2) - # - self.sw = gtk.ScrolledWindow() - self.sw.set_size_request(300, 200) - self.sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - self.pack_start(self.sw) - self.sw.show() - # - self.disp = gtk.Entry() - self.disp.set_editable(False) - self.pack_start(self.disp, expand=False) - self.disp.show() - # - self.treestore = gtk.TreeStore(str, object) - self.tree = gtk.TreeView(self.treestore) - treeviewcolumn = gtk.TreeViewColumn('Variable', - gtk.CellRendererText(), - text=0) - self.tree.append_column(treeviewcolumn) - self.sw.add(self.tree) - self.tree.show() - # - riter = self.treestore.append(None, [name, obj]) - self.treestore.append(riter, ['', None]) - self.tree.connect('test-expand-row', self.expand_row_cb) - self.tree.connect('test-collapse-row', self.collapse_row_cb) - self.treeselection = self.tree.get_selection() - self.treeselection.connect('changed', self.change_selection_cb) - return - def change_selection_cb(self, treeselection): - model, iter = treeselection.get_selected() - if not iter or not self.disp: - return - key = model[iter][0] - if key == '__builtins__': - value = key - else: - value = model[iter][1] - self.disp.set_text(str(value)) - return - def expand_row_cb(self, treeview, riter, path): - model = treeview.get_model() - dict = vars(model[riter][1]) - if not dict: - return True - citer = model.iter_children(riter) - model.remove(citer) - keylist = dict.keys() - keylist.sort() - for key in keylist: - obj = dict[key] - i = model.append(riter, [key, obj]) - try: - d = vars(obj) - if d: - model.append(i, ['', d]) - except TypeError: - pass - return False - def collapse_row_cb(self, treeview, riter, path): - model = treeview.get_model() - citer = model.iter_children(riter) - if citer: - while model.remove(citer): - pass - model.append(riter, ['', None]) - return True - -class BrowseWindow(gtk.Window): - def __init__(self, name, dict): - gtk.Window.__init__(self) - self.set_title("Browse Window") - box = gtk.VBox() - self.add(box) - box.show() - browse = BrowseVariables(name, dict) - browse.set_border_width(10) - box.pack_start(browse) - browse.show() - separator = gtk.HSeparator() - box.pack_start(separator, expand=False) - separator.show() - box2 = gtk.VBox(spacing=10) - box2.set_border_width(10) - box.pack_start(box2, expand=False) - box2.show() - button = gtk.Button(stock=gtk.STOCK_CLOSE) - box2.pack_start(button) - button.set_flags(gtk.CAN_DEFAULT) - button.grab_default() - button.show() - self.close_button = button - return - -if __name__ == '__main__': - win = BrowseWindow('gtk', gtk) - win.set_title("Browse gtk") - win.connect("destroy", lambda w: gtk.main_quit()) - win.connect("delete_event", lambda w,e: gtk.main_quit()) - win.close_button.connect("clicked", lambda w: gtk.main_quit()) - win.show() - gtk.main() diff --git a/examples/ide/continue.xpm b/examples/ide/continue.xpm deleted file mode 100644 index f44f61d7..00000000 --- a/examples/ide/continue.xpm +++ /dev/null @@ -1,27 +0,0 @@ -/* XPM */ -static char * continue_xpm[] = { -"20 22 2 1", -" c None", -". c #000000", -" ", -" ", -" . . ", -" .. .. ", -" ... ... ", -" .... .... ", -" ..... ..... ", -" ...... ...... ", -" ....... ....... ", -" ........ ........ ", -" .................. ", -" .................. ", -" ........ ........ ", -" ....... ....... ", -" ...... ...... ", -" ..... ..... ", -" .... .... ", -" ... ... ", -" .. .. ", -" . . ", -" ", -" "}; diff --git a/examples/ide/dialogs.py b/examples/ide/dialogs.py deleted file mode 100644 index ac009e44..00000000 --- a/examples/ide/dialogs.py +++ /dev/null @@ -1,58 +0,0 @@ -import pygtk -pygtk.require('2.0') -import gtk - -import os - -def InputBox(title, label, parent, text=''): - dlg = gtk.Dialog(title, parent, gtk.DIALOG_DESTROY_WITH_PARENT, - (gtk.STOCK_OK, gtk.RESPONSE_OK, - gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)) - lbl = gtk.Label(label) - lbl.show() - dlg.vbox.pack_start(lbl) - entry = gtk.Entry() - if text: entry.set_text(text) - entry.show() - dlg.vbox.pack_start(entry, False) - resp = dlg.run() - text = entry.get_text() - dlg.hide() - if resp == gtk.RESPONSE_CANCEL: - return None - return text - -def OpenFile(title, parent=None, dirname=None, fname=None): - dlg = gtk.FileChooserDialog(title, parent, - buttons=(gtk.STOCK_OK, gtk.RESPONSE_OK, - gtk.STOCK_CANCEL, - gtk.RESPONSE_CANCEL)) - if fname: - dlg.set_current_folder(os.path.dirname(fname)) - elif dirname: - dlg.set_current_folder(dirname) - dlg.set_local_only(True) - resp = dlg.run() - fname = dlg.get_filename() - dlg.hide() - if resp == gtk.RESPONSE_CANCEL: - return None - return fname - -def SaveFile(title, parent=None, dirname=None, fname=None): - dlg = gtk.FileChooserDialog(title, parent, - gtk.FILE_CHOOSER_ACTION_SAVE, - buttons=(gtk.STOCK_OK, gtk.RESPONSE_OK, - gtk.STOCK_CANCEL, - gtk.RESPONSE_CANCEL)) - if fname: - dlg.set_filename(fname) - elif dirname: - dlg.set_current_folder(dirname) - dlg.set_local_only(True) - resp = dlg.run() - fname = dlg.get_filename() - dlg.hide() - if resp == gtk.RESPONSE_CANCEL: - return None - return fname diff --git a/examples/ide/edit.py b/examples/ide/edit.py deleted file mode 100644 index 6e34e8b0..00000000 --- a/examples/ide/edit.py +++ /dev/null @@ -1,284 +0,0 @@ -#!/usr/bin/env python - -# This is a sample implementation of an editor. - -import os -import dialogs - -import gtk - -BLOCK_SIZE = 2048 -RESPONSE_FORWARD = 1 - -class EditWindow(gtk.Window): - def __init__(self, quit_cb=None): - gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL) - self.set_size_request(470, 300) - self.connect("delete_event", self.file_exit) - self.quit_cb = quit_cb - self.vbox = gtk.VBox() - self.add(self.vbox) - self.vbox.show() - hdlbox = gtk.HandleBox() - self.vbox.pack_start(hdlbox, expand=False) - hdlbox.show() - self.menubar, self.toolbar = self.create_menu() - hdlbox.add(self.menubar) - self.menubar.show() - self.vbox.pack_start(self.toolbar, expand=False) - self.scrolledwin = gtk.ScrolledWindow() - self.scrolledwin.show() - self.vbox.pack_start(self.scrolledwin) - self.text = gtk.TextView() - self.text.set_editable(True) - self.scrolledwin.add(self.text) - self.text.show() - self.buffer = self.text.get_buffer() - self.dirty = 0 - self.file_new() - self.text.grab_focus() - self.clipboard = gtk.Clipboard(selection='CLIPBOARD') - self.dirname = None - self.search_string = None - self.last_search_iter = None - return - def load_file(self, fname): - try: - fd = open(fname) - self.buffer.set_text('') - buf = fd.read(BLOCK_SIZE) - while buf != '': - self.buffer.insert_at_cursor(buf) - buf = fd.read(BLOCK_SIZE) - self.text.queue_draw() - self.set_title(os.path.basename(fname)) - self.fname = fname - self.dirname = os.path.dirname(self.fname) - self.buffer.set_modified(False) - self.new = 0 - except: - dlg = gtk.MessageDialog(self, gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, - "Can't open " + fname) - resp = dlg.run() - dlg.hide() - return - def create_menu(self): - ui_string = """ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - """ - actions = [ - ('FileMenu', None, '_File'), - ('FileNew', gtk.STOCK_NEW, None, None, None, self.file_new), - ('FileOpen', gtk.STOCK_OPEN, None, None, None, self.file_open), - ('FileSave', gtk.STOCK_SAVE, None, None, None, self.file_save), - ('FileSaveAs', gtk.STOCK_SAVE_AS, None, None, None, - self.file_saveas), - ('FileExit', gtk.STOCK_QUIT, None, None, None, self.file_exit), - ('EditMenu', None, '_Edit'), - ('EditCut', gtk.STOCK_CUT, None, None, None, self.edit_cut), - ('EditCopy', gtk.STOCK_COPY, None, None, None, self.edit_copy), - ('EditPaste', gtk.STOCK_PASTE, None, None, None, self.edit_paste), - ('EditClear', gtk.STOCK_REMOVE, 'C_lear', None, None, - self.edit_clear), - ('EditFind', gtk.STOCK_FIND, None, None, None, self.edit_find), - ('EditFindNext', None, 'Find _Next', "F3", None, - self.edit_find_next), - ('HelpMenu', gtk.STOCK_HELP), - ('HelpAbout', None, 'A_bout', None, None, self.help_about), - ] - self.ag = gtk.ActionGroup('edit') - self.ag.add_actions(actions) - self.ui = gtk.UIManager() - self.ui.insert_action_group(self.ag, 0) - self.ui.add_ui_from_string(ui_string) - self.add_accel_group(self.ui.get_accel_group()) - return (self.ui.get_widget('/menubar'), self.ui.get_widget('/toolbar')) - - def chk_save(self): - if self.buffer.get_modified(): - dlg = gtk.Dialog('Unsaved File', self, - gtk.DIALOG_DESTROY_WITH_PARENT, - (gtk.STOCK_YES, gtk.RESPONSE_YES, - gtk.STOCK_NO, gtk.RESPONSE_NO, - gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)) - lbl = gtk.Label((self.fname or "Untitled")+ - " has not been saved\n" + - "Do you want to save it?") - lbl.show() - dlg.vbox.pack_start(lbl) - ret = dlg.run() - dlg.hide() - if ret == gtk.RESPONSE_NO: - return 0 - if ret == gtk.RESPONSE_YES: - if self.file_save(): - return 0 - return 1 - return 0 - - def file_new(self, mi=None): - if self.chk_save(): return - self.buffer.set_text('') - self.buffer.set_modified(False) - self.fname = None - self.set_title("Untitled") - self.new = 1 - return - def file_open(self, mi=None): - if self.chk_save(): return - fname = dialogs.OpenFile('Open File', self, self.dirname, self.fname) - if not fname: return - self.load_file(fname) - return - def file_save(self, mi=None): - if self.new: - return self.file_saveas() - ret = False - try: - start, end = self.buffer.get_bounds() - blockend = start.copy() - fd = open(self.fname, "w") - while blockend.forward_chars(BLOCK_SIZE): - buf = self.buffer.get_text(start, blockend) - fd.write(buf) - start = blockend.copy() - buf = self.buffer.get_text(start, blockend) - fd.write(buf) - fd.close() - self.buffer.set_modified(False) - ret = True - except: - dlg = gtk.MessageDialog(self, gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, - "Error saving file " + self.fname) - resp = dlg.run() - dlg.hide() - return ret - def file_saveas(self, mi=None): - fname = dialogs.SaveFile('Save File As', self, self.dirname, - self.fname) - if not fname: return False - self.fname = fname - self.dirname = os.path.dirname(self.fname) - self.set_title(os.path.basename(fname)) - self.new = 0 - return self.file_save() - def file_exit(self, mi=None, event=None): - if self.chk_save(): return True - self.hide() - self.destroy() - if self.quit_cb: self.quit_cb(self) - return False - def edit_cut(self, mi): - self.buffer.cut_clipboard(self.clipboard, True) - return - def edit_copy(self, mi): - self.buffer.copy_clipboard(self.clipboard) - return - def edit_paste(self, mi): - self.buffer.paste_clipboard(self.clipboard, None, True) - return - def edit_clear(self, mi): - self.buffer.delete_selection(True, True) - return - def _search(self, search_string, iter = None): - if iter is None: - start = self.buffer.get_start_iter() - else: - start = iter - i = 0 - if search_string: - self.search_string = search_string - res = start.forward_search(search_string, gtk.TEXT_SEARCH_TEXT_ONLY) - if res: - match_start, match_end = res - self.buffer.place_cursor(match_start) - self.buffer.select_range(match_start, match_end) - self.text.scroll_to_iter(match_start, 0.0) - self.last_search_iter = match_end - - else: - self.search_string = None - self.last_search_iter = None - - def edit_find(self, mi): - def dialog_response_callback(dialog, response_id): - if response_id == gtk.RESPONSE_CLOSE: - dialog.destroy() - return - self._search(search_text.get_text(), self.last_search_iter) - search_text = gtk.Entry() - s = self.buffer.get_selection_bounds() - if len(s) > 0: - search_text.set_text(self.buffer.get_slice(s[0], s[1])) - dialog = gtk.Dialog("Search", self, - gtk.DIALOG_DESTROY_WITH_PARENT, - (gtk.STOCK_FIND, RESPONSE_FORWARD, - gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)) - dialog.vbox.pack_end(search_text, True, True, 0) - dialog.connect("response", dialog_response_callback) - search_text.show() - search_text.grab_focus() - dialog.show_all() - response_id = dialog.run() - def edit_find_next(self, mi): - self._search(self.search_string, self.last_search_iter) - def help_about(self, mi): - dlg = gtk.MessageDialog(self, gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_INFO, gtk.BUTTONS_OK, - "Copyright (C)\n" - "1998 James Henstridge\n" - "2004 John Finlay\n" - "This program is covered by the GPL>=2") - dlg.run() - dlg.hide() - return - -def edit(fname, mainwin=False): - if mainwin: quit_cb = lambda w: gtk.main_quit() - else: quit_cb = None - w = EditWindow(quit_cb=quit_cb) - w.load_file(fname) - w.show() - w.set_size_request(0,0) - if mainwin: gtk.main() - return - -if __name__ == '__main__': - import sys - edit(sys.argv[-1], mainwin=True) diff --git a/examples/ide/edit.xpm b/examples/ide/edit.xpm deleted file mode 100644 index a2291f36..00000000 --- a/examples/ide/edit.xpm +++ /dev/null @@ -1,38 +0,0 @@ -/* XPM */ -static char *edit[] = { -/* width height num_colors chars_per_pixel */ -" 20 22 8 1", -/* colors */ -". c #ffffff", -"# c None", -"a c #9999ff", -"b c #999999", -"c c #6666cc", -"d c #663399", -"e c #333333", -"f c #000000", -/* pixels */ -"eeeeeeeeeeeee#######", -"e..........e.e######", -"e..........e..eeffff", -"e..........e.effadf#", -"e..........effacdf##", -"e.........ffaccdff##", -"e........facccdfbf##", -"e.......faccddfbbf##", -"e......faccddf..bf##", -"e.....faccddf...bf##", -"e....faccddf....bf##", -"e...eaccddf.....bf##", -"e...facddf......bf##", -"e..eacddf.......bf##", -"e..faeff........bf##", -"e.eaeb..........bf##", -"e.feb...........bf##", -"e.fb............bf##", -"e.f.............bf##", -"e...............bf##", -"eebbbbbbbbbbbbbbef##", -"##ffffffffffffffff##" -}; - diff --git a/examples/ide/gtkcons.py b/examples/ide/gtkcons.py deleted file mode 100755 index 770d5859..00000000 --- a/examples/ide/gtkcons.py +++ /dev/null @@ -1,330 +0,0 @@ -#!/usr/bin/env python - -# Interactive Python-GTK Console -# Copyright (C), -# 1998 James Henstridge -# 2004 John Finlay -# -# 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -# This module implements an interactive python session in a GTK window. To -# start the session, use the gtk_console command. Its specification is: -# gtk_console(namespace, title, copyright) -# where namespace is a dictionary representing the namespace of the session, -# title is the title on the window and -# copyright is any additional copyright info to print. -# -# As well as the starting attributes in namespace, the session will also -# have access to the list __history__, which is the command history. - -import sys, string, traceback -import pygtk -pygtk.require('2.0') -import gobject -import gtk - -stdout = sys.stdout - -if not hasattr(sys, 'ps1'): sys.ps1 = '>>> ' -if not hasattr(sys, 'ps2'): sys.ps2 = '... ' - -# some functions to help recognise breaks between commands -def remQuotStr(s): - '''Returns s with any quoted strings removed (leaving quote marks)''' - r = '' - inq = 0 - qt = '' - prev = '_' - while len(s): - s0, s = s[0], s[1:] - if inq and (s0 != qt or prev == '\\'): - prev = s0 - continue - prev = s0 - if s0 in '\'"': - if inq: - inq = 0 - else: - inq = 1 - qt = s0 - r = r + s0 - return r - -def bracketsBalanced(s): - '''Returns true iff the brackets in s are balanced''' - s = filter(lambda x: x in '()[]{}', s) - stack = [] - brackets = {'(':')', '[':']', '{':'}'} - while len(s) != 0: - if s[0] in ")]}": - if len(stack) != 0 and brackets[stack[-1]] == s[0]: - del stack[-1] - else: - return 0 - else: - stack.append(s[0]) - s = s[1:] - return len(stack) == 0 - -class gtkoutfile: - '''A fake output file object. It sends output to a GTK TextView widget, - and if asked for a file number, returns one set on instance creation''' - def __init__(self, w, fn, font): - self.__fn = fn - self.__w = w - self.__b = w.get_buffer() - self.__ins = self.__b.get_mark('insert') - self.__font = font - def close(self): pass - flush = close - def fileno(self): return self.__fn - def isatty(self): return 0 - def read(self, a): return '' - def readline(self): return '' - def readlines(self): return [] - def write(self, s): - #stdout.write(str(self.__w.get_point()) + '\n') - iter = self.__b.get_iter_at_mark(self.__ins) - self.__b.insert_with_tags(iter, s, self.__font) - self.__w.scroll_to_mark(self.__ins, 0.0) - self.__w.queue_draw() - def writelines(self, l): - iter = self.__b.get_iter_at_mark(self.__ins) - for s in l: - self.__b.insert_with_tags(iter, s, self.__font) - self.__w.scroll_to_mark(self.__ins, 0.0) - self.__w.queue_draw() - def seek(self, a): raise IOError, (29, 'Illegal seek') - def tell(self): raise IOError, (29, 'Illegal seek') - truncate = tell - -class Console(gtk.VBox): - def __init__(self, namespace={}, copyright='', quit_cb=None): - gtk.VBox.__init__(self, spacing=2) - self.set_border_width(2) - self.copyright = copyright - #self.set_size_request(475, 300) - - self.quit_cb = quit_cb - - self.inp = gtk.HBox() - self.pack_start(self.inp) - self.inp.show() - - self.scrolledwin = gtk.ScrolledWindow() - self.scrolledwin.show() - self.inp.pack_start(self.scrolledwin, padding=1) - self.text = gtk.TextView() - self.text.set_editable(False) - self.text.set_wrap_mode(gtk.WRAP_WORD) - self.text.set_size_request(500, 400) - self.scrolledwin.add(self.text) - self.text.show() - self.buffer = self.text.get_buffer() - #create the tags we will use - self.normal = self.buffer.create_tag('Normal', font='Helvetica 10', - foreground='black') - self.title = self.buffer.create_tag('Title', font='Helvetica Bold 10', - foreground='darkgreen') - self.error = self.buffer.create_tag('Error', font='Helvetica 12', - foreground='red') - self.command = self.buffer.create_tag('Command', - font='Helvetica Bold 10', - foreground='blue') - - self.inputbox = gtk.HBox(spacing=2) - self.pack_end(self.inputbox, expand=False) - self.inputbox.show() - - self.prompt = gtk.Label(sys.ps1) - self.prompt.set_padding(xpad=2, ypad=0) - self.prompt.set_size_request(26, -1) - self.inputbox.pack_start(self.prompt, fill=False, expand=False) - self.prompt.show() - - self.closer = gtk.Button(stock=gtk.STOCK_CLOSE) - self.closer.connect("clicked", self.quit) - self.inputbox.pack_end(self.closer, fill=False, expand=False) - self.closer.show() - - self.line = gtk.Entry() - self.line.set_size_request(400,-1) - self.line.connect("key_press_event", self.key_function) - self.inputbox.pack_start(self.line, padding=2) - self.line.show() - - # now let the text box be resized - self.text.set_size_request(0, 0) - self.line.set_size_request(0, -1) - - self.namespace = namespace - - self.cmd = '' - self.cmd2 = '' - - # set up hooks for standard output. - self.stdout = gtkoutfile(self.text, sys.stdout.fileno(), - self.normal) - self.stderr = gtkoutfile(self.text, sys.stderr.fileno(), - self.error) - - # set up command history - self.history = [''] - self.histpos = 0 - self.namespace['__history__'] = self.history - - def init(self): - self.text.realize() - self.insert = self.buffer.get_mark('insert') - iter = self.buffer.get_iter_at_mark(self.insert) - self.buffer.insert_with_tags(iter, 'Python %s\n%s\n\n' % - (sys.version, sys.copyright) + - 'Interactive Python-GTK Console - \n' + - 'Copyright (C)\n' \ - '1998 James Henstridge\n' \ - '2004 John Finlay\n\n' + - self.copyright + '\n', self.title) - self.text.scroll_to_mark(self.insert, 0.0) - self.line.grab_focus() - - def quit(self, *args): - self.hide() - self.destroy() - if self.quit_cb: self.quit_cb() - - def key_function(self, entry, event): - if event.keyval == gtk.keysyms.Return: - self.line.emit_stop_by_name("key_press_event") - self.eval() - if event.keyval == gtk.keysyms.Tab: - self.line.emit_stop_by_name("key_press_event") - self.line.append_text('\t') - gobject.idle_add(self.focus_text) - elif event.keyval in (gtk.keysyms.KP_Up, gtk.keysyms.Up): - self.line.emit_stop_by_name("key_press_event") - self.historyUp() - gobject.idle_add(self.focus_text) - elif event.keyval in (gtk.keysyms.KP_Down, gtk.keysyms.Down): - self.line.emit_stop_by_name("key_press_event") - self.historyDown() - gobject.idle_add(self.focus_text) - elif event.keyval in (gtk.keysyms.D, gtk.keysyms.d) and \ - event.state & gtk.gdk.CONTROL_MASK: - self.line.emit_stop_by_name("key_press_event") - self.ctrld() - - def focus_text(self): - self.line.grab_focus() - return False # don't requeue this handler - - def ctrld(self): - self.quit() - - def historyUp(self): - if self.histpos > 0: - l = self.line.get_text() - if len(l) > 0 and l[0] == '\n': l = l[1:] - if len(l) > 0 and l[-1] == '\n': l = l[:-1] - self.history[self.histpos] = l - self.histpos = self.histpos - 1 - self.line.set_text(self.history[self.histpos]) - - def historyDown(self): - if self.histpos < len(self.history) - 1: - l = self.line.get_text() - if len(l) > 0 and l[0] == '\n': l = l[1:] - if len(l) > 0 and l[-1] == '\n': l = l[:-1] - self.history[self.histpos] = l - self.histpos = self.histpos + 1 - self.line.set_text(self.history[self.histpos]) - - def eval(self): - l = self.line.get_text() + '\n' - if len(l) > 1 and l[0] == '\n': l = l[1:] - self.histpos = len(self.history) - 1 - if len(l) > 0 and l[-1] == '\n': - self.history[self.histpos] = l[:-1] - else: - self.history[self.histpos] = l - self.line.set_text('') - iter = self.buffer.get_iter_at_mark(self.insert) - self.buffer.insert_with_tags(iter, self.prompt.get() + l, self.command) - self.text.scroll_to_mark(self.insert, 0.0) - if l == '\n': - self.run(self.cmd) - self.cmd = '' - self.cmd2 = '' - return - self.histpos = self.histpos + 1 - self.history.append('') - self.cmd = self.cmd + l - self.cmd2 = self.cmd2 + remQuotStr(l) - l = string.rstrip(l) - if not bracketsBalanced(self.cmd2) or l[-1] == ':' or \ - l[-1] == '\\' or l[0] in ' \11': - self.prompt.set_text(sys.ps2) - self.prompt.queue_draw() - return - self.run(self.cmd) - self.cmd = '' - self.cmd2 = '' - - def run(self, cmd): - sys.stdout, self.stdout = self.stdout, sys.stdout - sys.stderr, self.stderr = self.stderr, sys.stderr - try: - try: - r = eval(cmd, self.namespace, self.namespace) - if r is not None: - print `r` - except SyntaxError: - exec cmd in self.namespace - except: - if hasattr(sys, 'last_type') and \ - sys.last_type == SystemExit: - self.quit() - else: - traceback.print_exc() - self.prompt.set_text(sys.ps1) - self.prompt.queue_draw() - sys.stdout, self.stdout = self.stdout, sys.stdout - sys.stderr, self.stderr = self.stderr, sys.stderr - -def gtk_console(ns, title='Python', copyright='', menu=None): - win = gtk.Window() - win.set_size_request(475, 300) - win.connect("destroy", lambda w: gtk.main_quit()) - win.connect("delete_event", lambda w,e: gtk.main_quit()) - win.set_title(title) - cons = Console(namespace=ns, copyright=copyright, - quit_cb=lambda w: gtk.main_quit()) - if menu: - box = gtk.VBox() - win.add(box) - box.show() - box.pack_start(menu, expand=False) - menu.show() - box.pack_start(cons) - else: - win.add(cons) - cons.show() - win.show() - win.set_size_request(0,0) - cons.init() - gtk.main() - -if __name__ == '__main__': - gtk_console({'__builtins__': __builtins__, '__name__': '__main__', - '__doc__': None}) diff --git a/examples/ide/gtkdb.py b/examples/ide/gtkdb.py deleted file mode 100755 index cb33d150..00000000 --- a/examples/ide/gtkdb.py +++ /dev/null @@ -1,434 +0,0 @@ -#!/usr/bin/env python - -import sys -import bdb -import repr -import string -import linecache # for linecache.getlines(filename) -import pygtk -pygtk.require('2.0') -import gtk -import dialogs - -class PyGTKDb(gtk.Window, bdb.Bdb): - ui_string = """ - - - - - - - - - - - - - - - """ - def __init__(self): - gtk.Window.__init__(self) - bdb.Bdb.__init__(self) - self.realize() - - self.set_title("PyGTKDb") - self.connect("destroy", self.do_quit) - self.connect("delete_event", self.do_quit) - - self.box = gtk.VBox() - self.add(self.box) - self.box.show() - - self.add_stock_ids() - - actions = [ - ('Next', 'pyide-next', None, None, "Next statement", self.do_next), - ('Step', 'pyide-step', None, None, "Step into function", - self.do_step), - ('Return', 'pyide-return', None, None, - "Continue execution to end of function", self.do_return), - ('Continue', 'pyide-continue', None, None, - "Continue execution to next break point", self.do_continue), - ('Break', 'pyide-break', None, None, - "Toggle break point at selected line", self.do_break), - ('Edit', 'pyide-edit', None, None, - "Edit the value of the selected variable", self.do_edit), - ('Run', 'pyide-run', None, None, - "Execute some code in the current stack context", self.do_run), - ('Quit', 'pyide-quit', None, None, "Quit the debugger", - self.do_quit), - ] - - self.ag = gtk.ActionGroup('PyIDE Actions') - self.ag.add_actions(actions) - self.ui = gtk.UIManager() - self.ui.insert_action_group(self.ag, 0) - self.ui.add_ui_from_string(self.ui_string) - self.add_accel_group(self.ui.get_accel_group()) - - self.box.pack_start(self.ui.get_widget('/Toolbar'), expand=False) - sep = gtk.HSeparator() - self.box.pack_start(sep, expand=False) - sep.show() - - vpane = gtk.VPaned() - self.box.pack_start(vpane) - vpane.show() - - hpane = gtk.HPaned() - vpane.add1(hpane) - hpane.show() - - swin = gtk.ScrolledWindow() - swin.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - hpane.add1(swin) - swin.show() - - ls = gtk.ListStore(str) - self.stackdisp = gtk.TreeView(ls) - tvc = gtk.TreeViewColumn('Stack Frame', gtk.CellRendererText(), - text=0) - self.stackdisp.append_column(tvc) - self.stackdisp.set_size_request(280, 125) - selection = self.stackdisp.get_selection() - selection.set_mode(gtk.SELECTION_BROWSE) - selection.connect("changed", self.update_curstack) - - self.stackdisp.set_border_width(2) - swin.add(self.stackdisp) - self.stackdisp.show() - - swin = gtk.ScrolledWindow() - swin.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - hpane.add2(swin) - swin.show() - - ls = gtk.ListStore(str, str, str) - self.vardisp = gtk.TreeView(ls) - titles = ['local var', 'type', 'value'] - for n in range(len(titles)): - tvc = gtk.TreeViewColumn(titles[n], gtk.CellRendererText(), - text=n) - self.vardisp.append_column(tvc) - - selection = self.vardisp.get_selection() - selection.set_mode(gtk.SELECTION_BROWSE) - selection.connect("changed", self.update_selectedvar) - self.vardisp.set_border_width(2) - - self.vardisp.set_border_width(2) - swin.add(self.vardisp) - self.vardisp.show() - self.vardisp.selected = 0 - self.vardisp.varnames = [] - - swin = gtk.ScrolledWindow() - swin.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - vpane.add2(swin) - swin.show() - - self.minibreak = gtk.Image() - self.minibreak.set_from_file("minibreak.xpm") - self.minibreak.show() - ls = gtk.ListStore(gtk.gdk.Pixbuf, str, str) - self.filedisp = gtk.TreeView(ls) - titles = ['break', 'lineno', 'line'] - cell = gtk.CellRendererPixbuf() - tvc = gtk.TreeViewColumn(None, cell, pixbuf=0) - tvc.set_min_width(14) - tvc.set_widget(self.minibreak) - self.filedisp.append_column(tvc) - cell = gtk.CellRendererText() - cell.set_property('xalign', 1.0) - tvc = gtk.TreeViewColumn(titles[1], cell, text=1) - self.filedisp.append_column(tvc) - cell = gtk.CellRendererText() - tvc = gtk.TreeViewColumn(titles[2], cell, text=2) - self.filedisp.append_column(tvc) - self.minibreak = self.minibreak.get_pixbuf() - selection = self.filedisp.get_selection() - selection.set_mode(gtk.SELECTION_BROWSE) - selection.connect("changed", self.update_selection) - self.filedisp.connect('row-activated', lambda t,p,c: self.do_break()) - self.filedisp.set_border_width(2) - self.filedisp.set_size_request(600, 200) - swin.add(self.filedisp) - self.filedisp.show() - - separator = gtk.HSeparator() - self.box.pack_start(separator, expand=False) - separator.show() - - align = gtk.Alignment(0.0, 0.5, 0.0, 0.0) - self.box.pack_start(align, expand=False) - align.show() - self.status = gtk.Label() - self.status.set_padding(4, 1) - align.add(self.status) - self.status.show() - - self.filename = None - self.selected = 0 - self.blockupdate = 0 - return - - def add_stock_ids(self): - ids = [ - ('pyide-next', '_Next', gtk.gdk.CONTROL_MASK, gtk.keysyms.N, - 'pyide'), - ('pyide-step', '_Step', gtk.gdk.CONTROL_MASK, gtk.keysyms.S, - 'pyide'), - ('pyide-return', '_Return', gtk.gdk.CONTROL_MASK, gtk.keysyms.R, - 'pyide'), - ('pyide-continue', '_Continue', gtk.gdk.CONTROL_MASK, - gtk.keysyms.C, 'pyide'), - ('pyide-break', '_Break', gtk.gdk.CONTROL_MASK, gtk.keysyms.B, - 'pyide'), - ('pyide-edit', '_Edit', gtk.gdk.CONTROL_MASK, gtk.keysyms.E, - 'pyide'), - ('pyide-run', 'R_un', gtk.gdk.CONTROL_MASK, gtk.keysyms.U, - 'pyide'), - ('pyide-quit', '_Quit', gtk.gdk.CONTROL_MASK, gtk.keysyms.Q, - 'pyide'), - ] - gtk.stock_add(ids) - names = ['next', 'step', 'return', 'continue', 'break', - 'edit', 'run', 'quit'] - self.iconfactory = gtk.IconFactory() - for name in names: - iconset = gtk.IconSet(gtk.gdk.pixbuf_new_from_file(name+'.xpm')) - self.iconfactory.add('pyide-'+name, iconset) - self.iconfactory.add_default() - return - - def set_status(self, str): - self.status.set_text(str) - return - def update_selection(self, sel): - if self.blockupdate: return - model, iter = sel.get_selected() - r = model.get_path(iter)[0] - self.selected = r + 1 - return - def update_curstack(self, sel): - if self.blockupdate: return - model, iter = sel.get_selected() - r = model.get_path(iter)[0] - self.curindex = r - self.curframe = self.stack[self.curindex][0] - self.lineno = None - self.update_code_listing() - self.update_var_listing() - return - def update_selectedvar(self, sel): - model, iter = sel.get_selected() - if iter: - r = model.get_path(iter)[0] - self.vardisp.selected = r - return - def set_quit(self): - self.hide() - self.destroy() - bdb.Bdb.set_quit(self) - - def reset(self): - bdb.Bdb.reset(self) - self.forget() - def forget(self): - self.lineno = None - self.stack = [] - self.curindex = 0 - self.curframe = None - def setup(self, f, t): - self.forget() - self.stack, self.curindex = self.get_stack(f, t) - self.curframe = self.stack[self.curindex][0] - return - # interaction functions -- overriden from bdb - def user_line(self, frame): - # called when we stop or break at this line - self.interaction(frame, None) - def user_return(self, frame, return_value): - # called when a return trap is set here - frame.f_locals['__return__'] = return_value - if frame.f_code.co_name: - func = frame.f_code.co_name - else: - func = "" - self.set_status(func + " returned " + repr.repr(return_value)) - self.interaction(frame, None) - def user_exception(self, frame, (exc_type, exc_value, exc_traceback)): - frame.f_locals['__exception__'] = exc_type, exc_value - if type(exc_type) == type(''): - exc_type_name = exc_type - else: exc_type_name = exc_type.__name__ - self.set_status(exc_type_name + ':' + repr.repr(exc_value)) - self.interaction(frame, exc_traceback) - - def interaction(self, frame, traceback): - self.setup(frame, traceback) - self.update_stack_listing(self.curindex) - gtk.main() - self.forget() - - def update_stack_listing(self, curindex): - self.blockupdate = 1 - model = self.stackdisp.get_model() - model.clear() - for i in range(len(self.stack)): - frame_lineno = self.stack[i] - row = self.format_stack_entry(frame_lineno, "##!##") - row = string.split(row, "##!##")[0] - model.append([row]) - self.blockupdate = 0 - self.stackdisp.scroll_to_cell(curindex, None, True, 1.0, 0.0) - self.stackdisp.get_selection().select_path(curindex) - return - def update_var_listing(self): - model = self.vardisp.get_model() - model.clear() - locals = self.curframe.f_locals - self.vardisp.varnames = locals.keys() - self.vardisp.varnames.sort() - for var in self.vardisp.varnames: - row = [var, type(locals[var]).__name__, repr.repr(locals[var])] - model.append(row) - self.vardisp.get_selection().select_path(0) - return - def update_code_listing(self): - frame = self.curframe - newfile = frame.f_code.co_filename - if newfile != self.filename: - lines = linecache.getlines(newfile) - self.filename = newfile - self.blockupdate = 1 - model = self.filedisp.get_model() - model.clear() - breaks = self.get_file_breaks(newfile) - for line in range(len(lines)): - if line+1 in breaks: - model.append([self.minibreak, line+1, - lines[line].rstrip()]) - else: - model.append([None, line+1, lines[line].rstrip()]) - self.blockupdate = 0 - self.selected = frame.f_lineno - lineno = self.selected - if newfile != '': - self.filedisp.scroll_to_cell(lineno - 1, None, True, 1.0, 0.0) - self.filedisp.get_selection().select_path(lineno - 1) - return - def do_next(self, _b=None): - self.set_next(self.curframe) - gtk.main_quit() - def do_step(self, _b=None): - self.set_step() - gtk.main_quit() - def do_return(self, _b=None): - self.set_return(self.curframe) - gtk.main_quit() - def do_continue(self, _b=None): - self.set_continue() - gtk.main_quit() - def do_quit(self, _b=None, _e=None): - self.set_quit() - gtk.main_quit() - def do_break(self, _b=None): - breaks = self.get_file_breaks(self.filename) - if self.selected in breaks: - err = self.clear_break(self.filename, self.selected) - if err: - self.set_status(err) - return - self.filedisp.get_model()[self.selected-1][0] = None - else: - err = self.set_break(self.filename, self.selected) - if err: - self.set_status(err) - return - self.filedisp.get_model()[self.selected-1][0] = self.minibreak - return - def do_run(self, _b=None): - line = dialogs.InputBox("Execute Code", "Enter code to execute:", self) - if line == None: return - locals = self.curframe.f_locals - globals = self.curframe.f_globals - globals['__privileged__'] = 1 - try: - code = compile(line + '\n', '', 'single') - exec code in globals, locals - except: - if type(sys.exc_type) == type(''): - exc_type_name = sys.exc_type - else: exc_type_name = sys.exc_type.__name__ - self.set_status('*** ' + exc_type_name + ': ' + - str(sys.exc_value)) - return - self.update_var_listing() - return - def do_edit(self, _b=None): - locals = self.curframe.f_locals - varname = self.vardisp.varnames[self.vardisp.selected] - val = repr.repr(locals[varname]) - value = dialogs.InputBox("Edit Variable", - "Enter new value for " + varname + ":", - self, val) - if value == None: return - globals = self.curframe.f_globals - globals['__privileged__'] = 1 - try: - val = eval(value, globals, locals) - self.curframe.f_locals[varname] = val - except: - if type(sys.exc_type) == type(''): - exc_type_name = sys.exc_type - else: exc_type_name = sys.exc_type.__name__ - self.set_status('*** ' + exc_type_name + ': ' + - str(sys.exc_value)) - return - row = self.vardisp.selected - model = self.vardisp.get_model() - model[row][1] = type(val).__name__ - model[row][2] = repr.repr(val) - -# this makes up the interface that is compatible with pdb. -def run(statement, globals=None, locals=None): - win = PyGTKDb() - win.show() - win.run(statement, globals, locals) - -def runeval(expression, globals=None, locals=None): - win = PyGTKDb() - win.show() - return win.runeval(expression, globals, locals) - -def runcall(*args): - win = PyGTKDb() - win.show() - return apply(win.runcall, args) - -def set_trace(): - win = PyGTKDb() - win.show() - win.set_trace() - -def post_mortem(traceback): - win = PyGTKDb() - win.show() - win.reset() - win.interaction(None, traceback) - -def pm(): - post_mortem(sys.last_traceback) - -if __name__ == '__main__': - import os - if not sys.argv[1:]: - print "usage: gtkdb.py scriptfile [args ...]" - sys.exit(2) - filename = sys.argv[1] - del sys.argv[0] # delete gtkdb.py - sys.path.insert(0, os.path.dirname(filename)) - - run('execfile("' + filename + '")', {'__name__': '__main__'}) diff --git a/examples/ide/gtkprof.py b/examples/ide/gtkprof.py deleted file mode 100755 index 649456f0..00000000 --- a/examples/ide/gtkprof.py +++ /dev/null @@ -1,133 +0,0 @@ -#!/usr/bin/env python - -import profile, pstats, fpformat - -import pygtk -pygtk.require('2.0') -import gtk - -class PStatWindow(gtk.Window): - def __init__(self, stats): - gtk.Window.__init__(self) - self.connect("destroy", self.quit) - self.connect("delete_event", self.quit) - self.set_title("Profile Statistics") - - self.stats = stats - - box1 = gtk.VBox() - self.add(box1) - box1.show() - - text = `stats.total_calls` + " function calls " - if stats.total_calls != stats.prim_calls: - text = text + "( " + `stats.prim_calls` + " primitive calls) " - text = text + "in " + fpformat.fix(stats.total_tt, 3) + " CPU seconds" - label = gtk.Label(text) - label.set_padding(2, 2) - box1.pack_start(label, expand=False) - label.show() - - swin = gtk.ScrolledWindow() - swin.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - box1.pack_start(swin) - swin.show() - - titles = [('ncalls', 40), ('tottime', 50), ('percall', 50), - ('cumtime', 50), ('percall', 50), - ('filename:lineno(function)', 10)] - ls = gtk.ListStore(*((str,)*len(titles))) - list = gtk.TreeView(ls) - for n in range(len(titles)): - cell = gtk.CellRendererText() - cell.set_property('xalign', 1.0) - tvc = gtk.TreeViewColumn(titles[n][0], cell, text=n) - tvc.set_min_width(titles[n][1]) - list.append_column(tvc) - list.set_size_request(500, 200) - self.list = list - list.set_border_width(10) - swin.add(list) - list.show() - - self.insert_stats() - - separator = gtk.HSeparator() - box1.pack_start(separator, expand=False) - separator.show() - - box2 = gtk.VBox(spacing=10) - box2.set_border_width(10) - box1.pack_start(box2, expand=False) - box2.show() - - button = gtk.Button("close") - button.connect("clicked", self.quit) - self.close_button = button - box2.pack_start(button) - button.set_flags(gtk.CAN_DEFAULT) - button.grab_default() - button.show() - - def quit(self, *args): - self.hide() - self.destroy() - gtk.main_quit() - - def get_stats_list(self): - if self.stats.fcn_list: - return self.stats.fcn_list[:] - else: - return self.stats.stats.keys() - - def insert_stats(self): - list = self.get_stats_list() - if list: - row = [None] * 6 - model = self.list.get_model() - for func in list: - cc,nc,tt,ct,callers = self.stats.stats[func] - row[0] = `nc` - if nc != cc: - row[0] = row[0] + '/' + `cc` - row[1] = fpformat.fix(tt, 3) - if nc == 0: - row[2] = '' - else: - row[2] = fpformat.fix(tt/nc, 3) - row[3] = fpformat.fix(ct, 3) - if cc == 0: - row[4] = '' - else: - row[4] = fpformat.fix(ct/cc, 3) - file,line,name = func - row[5] = file + ":" + `line` + "(" + name + \ - ")" - self.list.get_model().append(row) - return - -def run(cmd): - prof = profile.Profile() - try: - stats = pstats.Stats(prof.run(cmd)) - except SystemExit: - pass - stats.strip_dirs().sort_stats("time", "module", "name") - win = PStatWindow(stats) - win.show() - gtk.main() - -def run_file(file): - return run('execfile("' + file + '")') - - -if __name__ == '__main__': - import sys, os - if not sys.argv[1:]: - print "usage: gtkprof.py scriptfile [args ...]" - sys.exit(2) - filename = sys.argv[1] - del sys.argv[0] - sys.path.insert(0, os.path.dirname(filename)) - - run_file(filename) diff --git a/examples/ide/minibreak.xpm b/examples/ide/minibreak.xpm deleted file mode 100644 index 6fd11e7c..00000000 --- a/examples/ide/minibreak.xpm +++ /dev/null @@ -1,19 +0,0 @@ -/* XPM */ -static char * minibreak_xpm[] = { -"12 12 4 1", -" c None", -". c #000000", -"X c #FF0000", -"o c #FFFFFF", -" ...... ", -" .oooooo. ", -" .ooXXXXoo. ", -".ooXXXXXXoo.", -".oXXXXXXXXo.", -".oXXXXXXXXo.", -".oXXXXXXXXo.", -".oXXXXXXXXo.", -".ooXXXXXXoo.", -" .ooXXXXoo. ", -" .oooooo. ", -" ...... "}; diff --git a/examples/ide/next.xpm b/examples/ide/next.xpm deleted file mode 100644 index 6c0cf361..00000000 --- a/examples/ide/next.xpm +++ /dev/null @@ -1,32 +0,0 @@ -/* XPM */ -static char *next[] = { -/* width height num_colors chars_per_pixel */ -" 20 22 2 1", -/* colors */ -". c None", -"# c #000000", -/* pixels */ -"....................", -"....................", -"......#.............", -"......##............", -"......###...........", -"......####..........", -"......#####.........", -"......######........", -"......#######.......", -"......########......", -"......#########.....", -"......#########.....", -"......########......", -"......#######.......", -"......######........", -"......#####.........", -"......####..........", -"......###...........", -"......##............", -"......#.............", -"....................", -"...................." -}; - diff --git a/examples/ide/pyide.py b/examples/ide/pyide.py deleted file mode 100755 index 9b6ea524..00000000 --- a/examples/ide/pyide.py +++ /dev/null @@ -1,260 +0,0 @@ -#!/usr/bin/env python - -import pygtk -pygtk.require('2.0') -import gtk -import gtkcons, gtkdb, gtkprof, edit, dialogs -import os, sys, string - -# select a good VT emulator -for vt in 'Eterm', 'nxterm', 'xterm-color', 'xterm', 'rxvt': - for dirname in string.split(os.environ['PATH'], os.pathsep): - fullname = os.path.join(dirname, vt) - if os.path.exists(fullname): - VT_CMD = fullname + ' -geometry 80x6 -e ' - break - else: - continue - break -else: - VT_CMD='' # this is not ideal - -ui_string = """ - - - - - - - - - - - - - - - - - - -""" -pythonmenu_uistring = """ - - - - - - - - - - - -""" - -class Application(gtk.Window): - def __init__(self): - gtk.Window.__init__(self, gtk.WINDOW_TOPLEVEL) - self.connect("destroy", self.quit) - self.connect("delete_event", self.quit) - self.set_title("Python") - self.set_size_request(475, 325) - self.main_box = gtk.VBox() - self.add(self.main_box) - self.main_box.show() - hdlbox = gtk.HandleBox() - self.main_box.pack_start(hdlbox, expand=False) - hdlbox.show() - actions = [ - ('FileMenu', None, '_File'), - ('FileNew', gtk.STOCK_NEW, None, None, None, self.file_new), - ('FileOpen', gtk.STOCK_OPEN, None, None, None, self.file_open), - ('FileExit', gtk.STOCK_QUIT, None, None, None, self.file_exit), - ('EditMenu', None, '_Edit'), - ('EditCopy', gtk.STOCK_COPY, None, None, None, self.edit_copy), - ('EditPaste', gtk.STOCK_PASTE, None, None, None, self.edit_paste), - ('EditClear', gtk.STOCK_REMOVE, 'C_lear', None, None, - self.edit_clear), - ('HelpMenu', gtk.STOCK_HELP), - ('HelpAbout', None, 'A_bout', None, None, self.help_about), - ] - python_actions = [ - ('PythonMenu', None, '_Python'), - ('PythonReload', None, '_Reload Module...', None, None, - self.python_reload), - ('PythonRun', None, 'R_un...', None, None, self.python_run), - ('PythonDebug', None, '_Debug...', None, None, self.python_debug), - ('PythonProfile', None, 'Pro_file...', None, None, - self.python_prof), - ] - self.ag = gtk.ActionGroup('ide') - self.ag.add_actions(actions) - self.ag.add_actions(python_actions) - self.ui = gtk.UIManager() - self.ui.insert_action_group(self.ag, 0) - self.ui.add_ui_from_string(ui_string) - self.ui.add_ui_from_string(pythonmenu_uistring) - self.add_accel_group(self.ui.get_accel_group()) - hdlbox.add(self.ui.get_widget('/menubar')) - #self.ui.get_widget('/menubar').show() - self.interp = gtkcons.Console( - namespace={'__builtins__': __builtins__, - '__name__': '__main__', - '__doc__': None}, quit_cb=self.quit) - self.main_box.pack_start(self.interp) - self.interp.show() - self.interp.init() - self.editwins = [] - return - - def quit(self, *args): - for win in self.editwins: - if win.chk_save(): return - win.hide() - win.destroy() - gtk.main_quit() - return - - def reload_file(self, fname): - if not os.path.isfile(fname): - gtk.MessageDialog(self, gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, - fname + " was not found.") - return - dir = os.path.dirname(fname) - base = os.path.basename(fname) - if dir not in sys.path: sys.path.insert(0, dir) - if string.lower(base[-3:]) == '.py': base = base[:-3] - elif string.lower(base[-4:]) == '.pyc': base = base[:-4] - if not sys.modules.has_key(base): - self.interp.run('import ' + base) - else: - self.interp.run('import ' + base) - self.interp.run('reload(' + base + ')') - return - - # execute a python script normally or with the debugger or profiler - def run_script(self, fname): - if not fname or not os.path.exists(fname): - dlg = gtk.MessageDialog(self, gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, - "Invalid filename "+fname) - dlg.run() - return - args = dialogs.InputBox("Arguments", - "Enter any command line arguments", self) - if args == None: return - os.system(VT_CMD+'python "'+fname+'" ' + args + ' &') - return - def debug_script(self, fname): - if not fname or not os.path.exists(fname): - dlg = gtk.MessageDialog(self, gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, - "Invalid filename "+fname) - dlg.run() - return - args = dialogs.InputBox("Arguments", - "Enter any command line arguments", self) - if args == None: return - os.system(VT_CMD+'python '+gtkdb.__file__+' "'+fname+'" ' + - args + ' &') - return - def profile_script(self, fname): - if not fname or not os.path.exists(fname): - dlg = gtk.MessageDialog(self, gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, - "Invalid filename "+fname) - dlg.run() - return - args = dialogs.InputBox("Arguments", - "Enter any command line arguments", self) - if args == None: return - os.system(VT_CMD+'python '+gtkprof.__file__+' "'+fname+'" ' + - args + ' &') - return - - def add_py_menu(self, ew): - python_actions = [ - ('PythonMenu', None, '_Python'), - ('PythonReload', None, '_Reload Module'), - ('PythonRun', None, 'R_un...', None, None, - lambda w, ew=ew: self.run_script(ew.fname)), - ('PythonDebug', None, '_Debug...', None, None, - lambda w, ew=ew: self.debug_script(ew.fname)), - ('PythonProfile', None, 'Pro_file...', None, None, - lambda w, ew=ew: self.profile_script(ew.fname)), - ] - ew.ag.add_actions(python_actions) - ew.ui.add_ui_from_string(pythonmenu_uistring) - return - - def file_new(self, mi=None): - ew = edit.EditWindow(quit_cb=self.rem_editwin) - self.editwins.append(ew) - self.add_py_menu(ew) - ew.show() - ew.set_size_request(0,0) - return - def file_open(self, mi=None): - fname = dialogs.OpenFile('Open', self) - if fname: - ew = edit.EditWindow(quit_cb=self.rem_editwin) - ew.load_file(fname) - self.editwins.append(ew) - self.add_py_menu(ew) - ew.show() - ew.set_size_request(0,0) - return - def rem_editwin(self, win=None, event=None): - for i in range(len(self.editwins)): - if self.editwins[i] == win: - del self.editwins[i] - break - return - def file_exit(self, mi=None): - self.quit() - return - def edit_copy(self, mi=None): - self.interp.text.copy_clipboard(0) - return - def edit_paste(self, mi=None): - self.interp.line.paste_clipboard(0) - return - def edit_clear(self, mi=None): - self.interp.line.delete_selection() - return - def python_reload(self, mi=None): - print "python_reload" - return - def python_run(self, mi=None): - fname = dialogs.OpenFile("Run", self) - if fname: - self.run_script(fname) - return - def python_debug(self, mi=None): - fname = dialogs.OpenFile("Debug", self) - if fname: - self.debug_script(fname) - return - def python_prof(self, mi=None): - fname = dialogs.OpenFile("Profile", self) - if fname: - self.profile_script(fname) - return - def help_about(self, mi=None): - dlg = gtk.MessageDialog(self, gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_INFO, gtk.BUTTONS_OK, - "Copyright (C)\n" \ - "1998 James Henstridge\n" \ - "2004 John Finlay\n" \ - "This program is covered by the GPL>=2") - dlg.run() - dlg.hide() - return - -if __name__ == '__main__': - app = Application() - app.show() - app.set_size_request(0,0) - gtk.main() diff --git a/examples/ide/quit.xpm b/examples/ide/quit.xpm deleted file mode 100644 index 11d0bb01..00000000 --- a/examples/ide/quit.xpm +++ /dev/null @@ -1,36 +0,0 @@ -/* XPM */ -static char *quit[] = { -/* width height num_colors chars_per_pixel */ -" 20 22 6 1", -/* colors */ -". c #ffcc33", -"# c None", -"a c #996600", -"b c #666666", -"c c #333333", -"d c #000000", -/* pixels */ -"####################", -"####################", -"####################", -"########d####d######", -"#######dad##dd###dd#", -"#######d.addaad#dad#", -"######da......dda.d#", -"#dddddd..........ad#", -"da...............dc#", -"cda..............dc#", -"#cd..............ad#", -"##d...............ad", -"#da.............addc", -"#d.............ddcc#", -"da.............dc###", -"dddd...........ad###", -"#ccd........adaad###", -"###d..da....dcddd###", -"###dbdcda...c#ccc###", -"###cdc#ccdadc#######", -"####c###ccdc########", -"##########c#########" -}; - diff --git a/examples/ide/return.xpm b/examples/ide/return.xpm deleted file mode 100644 index a908f597..00000000 --- a/examples/ide/return.xpm +++ /dev/null @@ -1,35 +0,0 @@ -/* XPM */ -static char *return[] = { -/* width height num_colors chars_per_pixel */ -" 20 22 5 1", -/* colors */ -". c None", -"# c #999999", -"a c #666666", -"b c #333333", -"c c #000000", -/* pixels */ -"....................", -"..............c.....", -"..............cc....", -".........#bcccccc...", -".....#bccccccccccc..", -"..#bccccccccccccccc.", -".acccccccccccccccccc", -"#cccccccccccccccccc.", -"bccccccccccccccccc..", -"ccccccccccccccccc...", -"cccccccccb#...cc....", -"ccccccb#......c.....", -"cccb#..b............", -"cc..bbbbbb..........", -"c.bbbbbbbb.a........", -"bbbbbbbbbbb#........", -".bbbbbbbbb.a........", -"..bbbbbbbbb#........", -"...bbbbbbb.a........", -".....bbbbbb#........", -"........bb.a........", -"...................." -}; - diff --git a/examples/ide/run.xpm b/examples/ide/run.xpm deleted file mode 100644 index fbfb4ed8..00000000 --- a/examples/ide/run.xpm +++ /dev/null @@ -1,28 +0,0 @@ -/* XPM */ -static char * run_xpm[] = { -"20 22 3 1", -" c None", -". c #000000", -"X c #C00080", -" ", -" ", -" .... ", -" .XXXX. ", -" .XXXX. ", -" .XXXX. ", -" .XXXX. ", -" .XX. ", -" .XX. ", -" .XX. ", -" .XX. ", -" .. ", -" .. ", -" .. ", -" .. ", -" ", -" .. ", -" .XX. ", -" .XX. ", -" .. ", -" ", -" "}; diff --git a/examples/ide/step.xpm b/examples/ide/step.xpm deleted file mode 100644 index 4e5c7bb3..00000000 --- a/examples/ide/step.xpm +++ /dev/null @@ -1,35 +0,0 @@ -/* XPM */ -static char *forward[] = { -/* width height num_colors chars_per_pixel */ -" 20 22 5 1", -/* colors */ -". c None", -"# c #999999", -"a c #666666", -"b c #333333", -"c c #000000", -/* pixels */ -"....................", -"........bb.a........", -".....bbbbbb#........", -"...bbbbbbb.a........", -"..bbbbbbbbb#........", -".bbbbbbbbb.a........", -"bbbbbbbbbbb#........", -"c.bbbbbbbb.a........", -"cc..bbbbbb..........", -"cccb#..b............", -"ccccccb#......c.....", -"cccccccccb#...cc....", -"ccccccccccccccccc...", -"bccccccccccccccccc..", -"#cccccccccccccccccc.", -".acccccccccccccccccc", -"..#bccccccccccccccc.", -".....#bccccccccccc..", -".........#bcccccc...", -"..............cc....", -"..............c.....", -"...................." -}; - diff --git a/examples/pango/pangocairo-simple.py b/examples/pango/pangocairo-simple.py deleted file mode 100644 index 8cf6d46f..00000000 --- a/examples/pango/pangocairo-simple.py +++ /dev/null @@ -1,66 +0,0 @@ -#! /usr/bin/env python -import sys -import math -import pango -import cairo -import pangocairo - -RADIUS = 150 - -def draw_text(cr): - N_WORDS = 10 - FONT = "Sans Bold 27" - - # Center coordinates on the middle of the region we are drawing - cr.translate(RADIUS, RADIUS); - - # Create a PangoLayout, set the font and text */ - layout = cr.create_layout() - - layout.set_text("Text") - layout.set_font_description(pango.FontDescription(FONT)) - - # Draw the layout N_WORDS times in a circle - for i in range(N_WORDS): - angle = (360 * i) / N_WORDS; - cr.save() - - # Gradient from red at angle == 60 to blue at angle == 300 - red = (1 + math.cos((angle - 60)*math.pi/180))/2 - cr.set_source_rgb(red, 0, 1 - red) - cr.rotate(angle*math.pi/180) - - # Inform Pango to re-layout the text with the new transformation */ - cr.update_layout(layout) - - width, height = layout.get_size() - cr.move_to(-width/pango.SCALE/2, -RADIUS) - cr.show_layout(layout) - - cr.restore() - -def main(argv): - if len(argv) != 2: - print >> sys.stderr, "Usage: cairosimple OUTPUT_BASENAME\n" - return 1 - - filename = argv[1] - surface = cairo.ImageSurface(cairo.FORMAT_ARGB32, 2*RADIUS, 2*RADIUS) - cr = pangocairo.CairoContext(cairo.Context(surface)) - cr.set_source_rgb(1.0, 1.0, 1.0) - cr.rectangle(0, 0, 2*RADIUS, 2*RADIUS) - cr.fill() - draw_text(cr) - - surface.write_to_png(filename + ".png") - - ## output also a PDF file - surface = cairo.PDFSurface(filename + ".pdf", 2*RADIUS, 2*RADIUS) - cr = pangocairo.CairoContext(cairo.Context(surface)) - draw_text(cr) - cr.show_page() - surface.finish() - - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/examples/pango/utf8-demo.py b/examples/pango/utf8-demo.py deleted file mode 100644 index e22da2ba..00000000 --- a/examples/pango/utf8-demo.py +++ /dev/null @@ -1,68 +0,0 @@ -# order is important here (for now) -import gtk - -# string taken from pango examples directory and converted from utf8 -# to python unicode string escapes -hellos = u'''\u03A0\u03B1\u03BD\u8A9E -This is a list of ways to say hello in various languages. -The purpose of it is to illustrate a number of scripts. - -(Converted into UTF-8) - ---------------------------------------------------------- -Arabic\t\u0627\u0644\u0633\u0644\u0627\u0645 \u0639\u0644\u064A\u0643\u0645 -Czech\t(\u010Desky)\tDobr\375 den -Danish\t(Dansk)\tHej, Goddag -English\tHello -Esperanto\tSaluton -Estonian\tTere, Tervist -FORTRAN\tPROGRAM -Finnish\t(Suomi)\tHei -French\t(Fran\347ais)\tBonjour, Salut -German\t(Deutsch Nord)\tGuten Tag -German\t(Deutsch S\374d)\tGr\374\337 Gott -Greek\t(\u0395\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03AC)\t\u0393\u03B5\u03B9\u03AC \u03C3\u03B1\u03C2 -Hebrew\t\u05E9\u05DC\u05D5\u05DD -Hindi\t\u0928\u092E\u0938\u094D\u0924\u0947, \u0928\u092E\u0938\u094D\u0915\u093E\u0930\u0964 -Italiano\tCiao, Buon giorno -Maltese\t\u010Aaw, Sa\u0127\u0127a -Nederlands, Vlaams\tHallo, Dag -Norwegian\t(Norsk)\tHei, God dag -Polish\tDzie\u0144 dobry, Hej -Russian\t(\u0420\u0443\u0441\u0441\u043A\u0438\u0439)\t\u0417\u0434\u0440\u0430\u0432\u0441\u0442\u0432\u0443\u0439\u0442\u0435!\u200E -Slovak\tDobr\375 de\u0148 -Spanish\t(Espa\361ol)\t\u200E\241Hola!\u200E -Swedish\t(Svenska)\tHej, Goddag -Thai\t(\u0E20\u0E32\u0E29\u0E32\u0E44\u0E17\u0E22)\t\u0E2A\u0E27\u0E31\u0E2A\u0E14\u0E35\u0E04\u0E23\u0E31\u0E1A, \u0E2A\u0E27\u0E31\u0E2A\u0E14\u0E35\u0E04\u0E48\u0E30 -Turkish\t(T\374rk\347e)\tMerhaba -Vietnamese\t(Ti\u1EBFng Vi\u1EC7t)\tXin Ch\340o -Yiddish\t(\u05F2\u05B7\u05D3\u05D9\u05E9\u05E2)\t\u05D3\u05D0\u05B8\u05E1 \u05D4\u05F2\u05B7\u05D6\u05E2\u05DC\u05E2 - -Japanese\t(\u65E5\u672C\u8A9E)\t\u3053\u3093\u306B\u3061\u306F, \uFF7A\uFF9D\uFF86\uFF81\uFF8A -Chinese\t(\u4E2D\u6587,\u666E\u901A\u8BDD,\u6C49\u8BED)\t\u4F60\u597D -Cantonese\t(\u7CB5\u8A9E,\u5EE3\u6771\u8A71)\t\u65E9\u6668, \u4F60\u597D -Korean\t(\uD55C\uAE00)\t\uC548\uB155\uD558\uC138\uC694, \uC548\uB155\uD558\uC2ED\uB2C8\uAE4C - -Difference among chinese characters in GB, JIS, KSC, BIG5:\u200E - GB\t--\t\u5143\u6C14\t\u5F00\u53D1 - JIS\t--\t\u5143\u6C17\t\u958B\u767A - KSC\t--\t\u5143\u6C23\t\u958B\u767C - BIG5\t--\t\u5143\u6C23\t\u958B\u767C - -''' -win = gtk.Window() -win.connect('destroy', gtk.mainquit) -win.set_default_size(600, 400) - -swin = gtk.ScrolledWindow() -swin.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) -win.add(swin) -swin.show() - -l = gtk.Label(hellos) -swin.add_with_viewport(l) -l.show() - -win.show() - -gtk.main() diff --git a/examples/pygtk-demo/demos/__init__.py b/examples/pygtk-demo/demos/__init__.py deleted file mode 100644 index 0ca5ff54..00000000 --- a/examples/pygtk-demo/demos/__init__.py +++ /dev/null @@ -1,25 +0,0 @@ - -import os - -_file_list = [ - x for x in os.listdir(os.path.dirname(__file__)) - if len(x) > 3 and x[-3:] == '.py'] - -demo_list = [] -for _mod in _file_list: - # Leave underscored Modulnames. - if _mod.startswith('_'): - continue - _mod = _mod[:-3] - try: - _doc = '' - exec 'import ' + _mod + '\n' + \ - '_doc = ' + _mod + '.__doc__' - _description = _doc.splitlines()[0] - demo_list.append((_description, _mod)) - except (ImportError, AttributeError), msg: - # ImportError or AttributeError (if _doc is None) - #print 'failed: ', _mod - pass - -demo_list.sort() diff --git a/examples/pygtk-demo/demos/appwindow.py b/examples/pygtk-demo/demos/appwindow.py deleted file mode 100644 index b29b63ec..00000000 --- a/examples/pygtk-demo/demos/appwindow.py +++ /dev/null @@ -1,306 +0,0 @@ -#!/usr/bin/env python -'''Application main window - -Demonstrates a typical application window, with menubar, toolbar, statusbar.''' -# pygtk version: Maik Hertha - -import gobject -import gtk - -( - COLOR_RED, - COLOR_GREEN, - COLOR_BLUE -) = range(3) - -( - SHAPE_SQUARE, - SHAPE_RECTANGLE, - SHAPE_OVAL, -) = range(3) - -ui_info = \ -''' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -''' - - -# It's totally optional to do this, you could just manually insert icons -# and have them not be themeable, especially if you never expect people -# to theme your app. -def register_stock_icons(): - ''' This function registers our custom toolbar icons, so they - can be themed. - ''' - items = [('demo-gtk-logo', '_GTK!', 0, 0, '')] - # Register our stock items - gtk.stock_add(items) - - # Add our custom icon factory to the list of defaults - factory = gtk.IconFactory() - factory.add_default() - - import os - img_dir = os.path.join(os.path.dirname(__file__), 'images') - img_path = os.path.join(img_dir, 'gtk-logo-rgb.gif') - try: - pixbuf = gtk.gdk.pixbuf_new_from_file(img_path) - - # Register icon to accompany stock item - - # The gtk-logo-rgb icon has a white background, make it transparent - # the call is wrapped to (gboolean, guchar, guchar, guchar) - transparent = pixbuf.add_alpha(True, chr(255), chr(255),chr(255)) - icon_set = gtk.IconSet(transparent) - factory.add('demo-gtk-logo', icon_set) - - except gobject.GError, error: - print 'failed to load GTK logo for toolbar' - -class ApplicationMainWindowDemo(gtk.Window): - def __init__(self, parent=None): - register_stock_icons() - - # Create the toplevel window - gtk.Window.__init__(self) - try: - self.set_screen(parent.get_screen()) - except AttributeError: - self.connect('destroy', lambda *w: gtk.main_quit()) - - self.set_title(self.__class__.__name__) - self.set_default_size(200, 200) - - merge = gtk.UIManager() - self.set_data("ui-manager", merge) - merge.insert_action_group(self.__create_action_group(), 0) - self.add_accel_group(merge.get_accel_group()) - - try: - mergeid = merge.add_ui_from_string(ui_info) - except gobject.GError, msg: - print "building menus failed: %s" % msg - bar = merge.get_widget("/MenuBar") - bar.show() - - table = gtk.Table(1, 4, False) - self.add(table) - - table.attach(bar, - # X direction # # Y direction - 0, 1, 0, 1, - gtk.EXPAND | gtk.FILL, 0, - 0, 0); - - bar = merge.get_widget("/ToolBar") - bar.set_tooltips(True) - bar.show() - table.attach(bar, - # X direction # # Y direction - 0, 1, 1, 2, - gtk.EXPAND | gtk.FILL, 0, - 0, 0) - - # Create document - sw = gtk.ScrolledWindow() - sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - sw.set_shadow_type(gtk.SHADOW_IN) - - table.attach(sw, - # X direction Y direction - 0, 1, 2, 3, - gtk.EXPAND | gtk.FILL, gtk.EXPAND | gtk.FILL, - 0, 0) - - contents = gtk.TextView() - contents.grab_focus() - - sw.add (contents) - - # Create statusbar - self.statusbar = gtk.Statusbar() - table.attach(self.statusbar, - # X direction Y direction - 0, 1, 3, 4, - gtk.EXPAND | gtk.FILL, 0, - 0, 0) - - # Show text widget info in the statusbar - buffer = contents.get_buffer() - buffer.connect("changed", self.update_statusbar) - mark_set_callback = (lambda buffer, new_location, mark: - self.update_statusbar(buffer)) - - # cursor moved - buffer.connect("mark_set", mark_set_callback) - - self.connect("window_state_event", self.update_resize_grip) - self.update_statusbar(buffer) - - self.show_all() - - def __create_action_group(self): - # GtkActionEntry - entries = ( - ( "FileMenu", None, "_File" ), # name, stock id, label - ( "PreferencesMenu", None, "_Preferences" ), # name, stock id, label - ( "ColorMenu", None, "_Color" ), # name, stock id, label - ( "ShapeMenu", None, "_Shape" ), # name, stock id, label - ( "HelpMenu", None, "_Help" ), # name, stock id, label - ( "New", gtk.STOCK_NEW, # name, stock id - "_New", "N", # label, accelerator - "Create a new file", # tooltip - self.activate_action ), - ( "Open", gtk.STOCK_OPEN, # name, stock id - "_Open","O", # label, accelerator - "Open a file", # tooltip - self.activate_action ), - ( "Save", gtk.STOCK_SAVE, # name, stock id - "_Save","S", # label, accelerator - "Save current file", # tooltip - self.activate_action ), - ( "SaveAs", gtk.STOCK_SAVE, # name, stock id - "Save _As...", None, # label, accelerator - "Save to a file", # tooltip - self.activate_action ), - ( "Quit", gtk.STOCK_QUIT, # name, stock id - "_Quit", "Q", # label, accelerator - "Quit", # tooltip - self.activate_action ), - ( "About", None, # name, stock id - "_About", "A", # label, accelerator - "About", # tooltip - self.activate_about ), - ( "Logo", "demo-gtk-logo", # name, stock id - None, None, # label, accelerator - "GTK+", # tooltip - self.activate_action ), - ); - - # GtkToggleActionEntry - toggle_entries = ( - ( "Bold", gtk.STOCK_BOLD, # name, stock id - "_Bold", "B", # label, accelerator - "Bold", # tooltip - self.activate_action, - True ), # is_active - ) - - # GtkRadioActionEntry - color_entries = ( - ( "Red", None, # name, stock id - "_Red", "R", # label, accelerator - "Blood", COLOR_RED ), # tooltip, value - ( "Green", None, # name, stock id - "_Green", "G", # label, accelerator - "Grass", COLOR_GREEN ), # tooltip, value - ( "Blue", None, # name, stock id - "_Blue", "B", # label, accelerator - "Sky", COLOR_BLUE ), # tooltip, value - ) - - # GtkRadioActionEntry - shape_entries = ( - ( "Square", None, # name, stock id - "_Square", "S", # label, accelerator - "Square", SHAPE_SQUARE ), # tooltip, value - ( "Rectangle", None, # name, stock id - "_Rectangle", "R", # label, accelerator - "Rectangle", SHAPE_RECTANGLE ), # tooltip, value - ( "Oval", None, # name, stock id - "_Oval", "O", # label, accelerator - "Egg", SHAPE_OVAL ), # tooltip, value - ) - - # Create the menubar and toolbar - action_group = gtk.ActionGroup("AppWindowActions") - action_group.add_actions(entries) - action_group.add_toggle_actions(toggle_entries) - action_group.add_radio_actions(color_entries, COLOR_RED, self.activate_radio_action) - action_group.add_radio_actions(shape_entries, SHAPE_OVAL, self.activate_radio_action) - - return action_group - - def activate_about(self, action): - dialog = gtk.AboutDialog() - dialog.set_name("PyGTK Demo") - dialog.set_copyright("\302\251 Copyright 200x the PyGTK Team") - dialog.set_website("http://www.pygtk.org./") - ## Close dialog on user response - dialog.connect ("response", lambda d, r: d.destroy()) - dialog.show() - - def activate_action(self, action): - dialog = gtk.MessageDialog(self, gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_INFO, gtk.BUTTONS_CLOSE, - 'You activated action: "%s" of type "%s"' % (action.get_name(), type(action))) - # Close dialog on user response - dialog.connect ("response", lambda d, r: d.destroy()) - dialog.show() - - def activate_radio_action(self, action, current): - active = current.get_active() - value = current.get_current_value() - - if active: - dialog = gtk.MessageDialog(self, gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_INFO, gtk.BUTTONS_CLOSE, - "You activated radio action: \"%s\" of type \"%s\".\nCurrent value: %d" % - (current.get_name(), type(current), value)) - - # Close dialog on user response - dialog.connect("response", lambda d, r: d.destroy()) - dialog.show() - - def update_statusbar(self, buffer): - # clear any previous message, underflow is allowed - self.statusbar.pop(0) - count = buffer.get_char_count() - iter = buffer.get_iter_at_mark(buffer.get_insert()) - row = iter.get_line() - col = iter.get_line_offset() - self.statusbar.push(0, - 'Cursor at row %d column %d - %d chars in document' % (row, col, count)) - - def update_resize_grip(self, widget, event): - mask = gtk.gdk.WINDOW_STATE_MAXIMIZED | gtk.gdk.WINDOW_STATE_FULLSCREEN - if (event.changed_mask & mask): - self.statusbar.set_has_resize_grip(not (event.new_window_state & mask)) - -def main(): - ApplicationMainWindowDemo() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/pygtk-demo/demos/buttonbox.py b/examples/pygtk-demo/demos/buttonbox.py deleted file mode 100644 index 91b434b2..00000000 --- a/examples/pygtk-demo/demos/buttonbox.py +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env python -'''Button Box - -This demo shows various button box configurations available. It also -uses stock buttons, and use of mnemonics for navigation.''' - -import gtk - -def create_bbox(horizontal=True, title=None, spacing=0, - layout=gtk.BUTTONBOX_SPREAD): - frame = gtk.Frame(title) - - if horizontal: - bbox = gtk.HButtonBox() - else: - bbox = gtk.VButtonBox() - - bbox.set_border_width(5) - bbox.set_layout(layout) - bbox.set_spacing(spacing) - frame.add(bbox) - - button = gtk.Button(stock='gtk-ok') - bbox.add(button) - - button = gtk.Button(stock='gtk-cancel') - bbox.add(button) - - button = gtk.Button(stock='gtk-help') - bbox.add(button) - - return frame - -class ButtonBoxDemo(gtk.Window): - def __init__(self, parent=None): - # Create the toplevel window - gtk.Window.__init__(self) - try: - self.set_screen(parent.get_screen()) - except AttributeError: - self.connect('destroy', lambda *w: gtk.main_quit()) - - self.set_title(self.__class__.__name__) - self.set_border_width(10) - - main_vbox = gtk.VBox() - self.add(main_vbox) - - frame_horiz = gtk.Frame("Horizontal Button Boxes") - main_vbox.pack_start(frame_horiz, padding=10) - - vbox = gtk.VBox() - vbox.set_border_width(10) - frame_horiz.add(vbox) - - vbox.pack_start(create_bbox(True, "Spread", 40, gtk.BUTTONBOX_SPREAD), - padding=0) - vbox.pack_start(create_bbox(True, "Edge", 40, gtk.BUTTONBOX_EDGE), - padding=5) - vbox.pack_start(create_bbox(True, "Start", 40, gtk.BUTTONBOX_START), - padding=5) - vbox.pack_start(create_bbox(True, "End", 40, gtk.BUTTONBOX_END), - padding=5) - - frame_vert = gtk.Frame("Vertical Button Boxes") - main_vbox.pack_start(frame_vert, padding=10) - - hbox = gtk.HBox() - hbox.set_border_width(10) - frame_vert.add(hbox) - - hbox.pack_start(create_bbox(False, "Spread", 40, gtk.BUTTONBOX_SPREAD), - padding=0) - hbox.pack_start(create_bbox(False, "Edge", 40, gtk.BUTTONBOX_EDGE), - padding=5) - hbox.pack_start(create_bbox(False, "Start", 40, gtk.BUTTONBOX_START), - padding=5) - hbox.pack_start(create_bbox(False, "End", 40, gtk.BUTTONBOX_END), - padding=5) - - self.show_all() - -def main(): - ButtonBoxDemo() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/pygtk-demo/demos/changedisplay.py b/examples/pygtk-demo/demos/changedisplay.py deleted file mode 100644 index e10fcee7..00000000 --- a/examples/pygtk-demo/demos/changedisplay.py +++ /dev/null @@ -1,413 +0,0 @@ -#!/usr/bin/env python -'''Change Display - -Demonstrates migrating a window between different displays and -screens. A display is a mouse and keyboard with some number of -associated monitors. A screen is a set of monitors grouped -into a single physical work area. The neat thing about having -multiple displays is that they can be on a completely separate -computers, as long as there is a network connection to the -computer where the application is running. - -Only some of the windowing systems where GTK+ runs have the -concept of multiple displays and screens. (The X Window System -is the main example.) Other windowing systems can only -handle one keyboard and mouse, and combine all monitors into -a single screen. - -This is a moderately complex example, and demonstrates: - -- Tracking the currently open displays and screens -- Changing the screen for a window -- Letting the user choose a window by clicking on it -- Using GtkListStore and GtkTreeView -- Using GtkDialog -''' -import gtk -import gobject - -# These enumerations provide symbolic names for the columns -# in the two GtkListStore models. -# -( - DISPLAY_COLUMN_NAME, - DISPLAY_COLUMN_DISPLAY, - DISPLAY_NUM_COLUMNS -) = range(3) - -( - SCREEN_COLUMN_NUMBER, - SCREEN_COLUMN_SCREEN, - SCREEN_NUM_COLUMNS -) = range(3) - -def find_toplevel_at_pointer(display): - ''' Finds the toplevel window under the mouse pointer, if any. - ''' - pointer_window = display.get_window_at_pointer()[0] - - # The user data field of a GdkWindow is used to store a pointer - # to the widget that created it. - # - if pointer_window: - widget = pointer_window.get_user_data() - - return widget and widget.get_toplevel() or None - -class QueryForToplevel(gtk.Window): - ''' Asks the user to click on a window, then waits for them click - the mouse. When the mouse is released, returns the toplevel - window under the pointer, or NULL, if there is none. - ''' - - def __init__(self, screen, prompt): - gtk.Window.__init__(self, gtk.WINDOW_POPUP) - self.set_screen(screen) - self.set_modal(True) - self.set_position(gtk.WIN_POS_CENTER) - - frame = gtk.Frame() - frame.set_shadow_type(gtk.SHADOW_OUT) - self.add(frame) - - label = gtk.Label(prompt) - label.set_padding(10, 10) - frame.add(label) - - self.show_all() - - def run(self): - display = self.get_screen().get_display() - cursor = gtk.gdk.Cursor(display, gtk.gdk.CROSSHAIR) - - main_context = gobject.main_context_default() - if (gtk.gdk.pointer_grab(self.window, False, - gtk.gdk.BUTTON_RELEASE_MASK, None, cursor) == gtk.gdk.GRAB_SUCCESS): - self.query_clicked = False - self.connect("button-release-event", self.button_release_event_cb) - - # Process events until clicked is set by button_release_event_cb. - # We pass in may_block=True since we want to wait if there - # are no events currently. - # - while self.query_clicked is False: - main_context.iteration(True) - - toplevel = find_toplevel_at_pointer(display) - if (toplevel == self): - toplevel = None; - - self.destroy() - gtk.gdk.flush() # Really release the grab - - return toplevel - - def button_release_event_cb(self, winref, event): - self.query_clicked = True - return True - - -class LeftAlignButton(gtk.Button): - ''' If we have a stack of buttons, it often looks better if their contents - are left-aligned, rather than centered. This class creates a button - and left-aligns it contents. - ''' - def __init__(self, label): - gtk.Button.__init__(self, label) - child = self.get_children()[0] - child.set_alignment(0., 0.5) - - -# Main entry point. If the dialog for this demo doesn't yet exist, creates -# it. -# -class ChangeDisplayDemo(gtk.Dialog): - size_group = None - display_model = None - screen_model = None - screen_selection = None - current_display = None - current_screen = None - - def __init__(self, parent=None): - gtk.Dialog.__init__(self, "Change Screen or display", parent, - gtk.DIALOG_NO_SEPARATOR, - (gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE, - "Change", gtk.RESPONSE_OK)) - self.set_default_size(300, 400) - - try: - self.set_screen(parent.get_screen()) - except AttributeError: - self.connect('destroy', lambda *w: gtk.main_quit()) - self.connect("response", self.response_cb) - self.connect("destroy", self.destroy_cb) - - vbox = gtk.VBox(False, 5) - vbox.set_border_width(8) - - self.vbox.pack_start(vbox, True, True, 0) - - frame = self.__create_display_frame() - vbox.pack_start(frame, True, True, 0) - - frame = self.__create_screen_frame() - vbox.pack_start(frame, True, True, 0) - - self.__initialize_displays() - - self.show_all() - - def __initialize_displays(self): - ''' Adds all currently open displays to our list of displays, - and set up a signal connection so that we'll be notified - when displays are opened in the future as well. - ''' - manager = gtk.gdk.display_manager_get() - displays = manager.list_displays() - - for item in displays: - self.add_display(item) - id = manager.connect("display_opened", self.display_opened_cb) - manager.set_data('user-callback', id) - - def __create_frame(self, title): - ''' This function is used both for creating the "Display" and - "Screen" frames, since they have a similar structure. The - caller hooks up the right context for the value returned - in tree_view, and packs any relevant buttons into button_vbox. - ''' - frame = gtk.Frame(title) - - hbox = gtk.HBox(False, 8) - hbox.set_border_width(8) - frame.add(hbox) - - scrollwin = gtk.ScrolledWindow(); - scrollwin.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) - scrollwin.set_shadow_type (gtk.SHADOW_IN) - hbox.pack_start(scrollwin, True, True, 0) - - tree_view = gtk.TreeView() - tree_view.set_headers_visible(False) - scrollwin.add(tree_view) - - selection = tree_view.get_selection() - selection.set_mode(gtk.SELECTION_BROWSE) - - button_vbox = gtk.VBox(False, 5) - hbox.pack_start(button_vbox, False, False, 0) - - if self.size_group is None: - self.size_group = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL) - - self.size_group.add_widget(button_vbox) - - return (frame, tree_view, button_vbox) - - - def __create_display_frame(self): - ''' Creates the "Display" frame in the main window. - ''' - frame, tree_view, button_vbox = self.__create_frame("Display") - - button = LeftAlignButton("_Open...") - button.connect("clicked", self.open_display_cb) - button_vbox.pack_start(button, False, False, 0) - - button = LeftAlignButton("_Close") - button.connect ("clicked", self.close_display_cb) - button_vbox.pack_start(button, False, False, 0) - - self.display_model = gtk.ListStore(str, object); - tree_view.set_model(self.display_model) - - column = gtk.TreeViewColumn("Name", gtk.CellRendererText(), - text=DISPLAY_COLUMN_NAME) - tree_view.append_column(column) - - selection = tree_view.get_selection() - selection.connect("changed", self.display_changed_cb) - - return frame - - def __create_screen_frame(self): - ''' Creates the "Screen" frame in the main window. - ''' - frame, tree_view, button_vbox = self.__create_frame("Screen") - - self.screen_model = gtk.ListStore(int, object); - tree_view.set_model(self.screen_model) - - column = gtk.TreeViewColumn("Number", gtk.CellRendererText(), - text=SCREEN_COLUMN_NUMBER) - tree_view.append_column(column) - - self.screen_selection = tree_view.get_selection() - self.screen_selection.connect("changed", self.screen_changed_cb) - - return frame - - def query_change_display(self): - ''' Prompts the user for a toplevel window to move, and then moves - that window to the currently selected display - ''' - screen = self.window.get_screen() - - toplevel = QueryForToplevel(screen, - "Please select the toplevel\nto move to the new screen").run() - - if toplevel is not None: - toplevel.set_screen(self.current_screen) - else: - screen.get_display().beep() - - - def response_cb(self, dialog, response_id): - ''' Called when the user clicks on a button in our dialog or - closes the dialog through the window manager. Unless the - "Change" button was clicked, we destroy the dialog. - ''' - if response_id == gtk.RESPONSE_OK: - self.query_change_display() - else: - dialog.destroy() - - def open_display_cb(self, button): - ''' Called when the user clicks on "Open..." in the display - frame. Prompts for a new display, and then opens a connection - to that display. - ''' - dialog = gtk.Dialog("Open Display", self, gtk.DIALOG_MODAL, - (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OK, gtk.RESPONSE_OK)) - - dialog.set_default_response(gtk.RESPONSE_OK) - display_entry = gtk.Entry() - display_entry.set_activates_default(True) - dialog_label = gtk.Label("Please enter the name of\nthe new display\n") - - dialog.vbox.add(dialog_label) - dialog.vbox.add(display_entry) - - display_entry.grab_focus() - dialog.show_all() - - result = None - while result is None: - response_id = dialog.run() - if response_id != gtk.RESPONSE_OK: - break; - new_screen_name = display_entry.get_chars(0, -1) - print new_screen_name - if new_screen_name != "": - result = gtk.gdk.Display(new_screen_name) - if result is None: - error_msg = ( - "Can't open display :\n\t%s\nplease try another one\n" % - (new_screen_name,)) - dialog_label.set_text(error_msg) - - dialog.destroy() - - def close_display_cb(self, button): - ''' Called when the user clicks on the "Close" button in the - "Display" frame. Closes the selected display. - ''' - if self.current_display: - self.current_display.close() - - - def display_changed_cb(self, selection): - ''' Called when the selected row in the display list changes. - Updates info.current_display, then refills the list of - screens. - ''' - model, iter = selection.get_selected() - if iter is not None: - self.current_display = model.get_value(iter, DISPLAY_COLUMN_DISPLAY) - else: - self.current_display = None - self.fill_screens() - - def screen_changed_cb(self, selection): - ''' Called when the selected row in the sceen list changes. - Updates info->current_screen. - ''' - model, iter = selection.get_selected() - if iter: - self.current_screen = model.get(iter, SCREEN_COLUMN_SCREEN) - else: - self.current_screen = None; - - def destroy_cb(self, parent): - self.destroy_info() - if parent is None: - gtk.main_quit() - - - def fill_screens(self): - ''' Fills in the screen list based on the current display - ''' - self.screen_model.clear() - if self.current_display is not None: - n_screens = self.current_display.get_n_screens() - - for i in range(n_screens): - screen = self.current_display.get_screen(i); - iter = self.screen_model.append() - self.screen_model.set(iter, - SCREEN_COLUMN_NUMBER, i, SCREEN_COLUMN_SCREEN, screen) - if (i == 0): - self.screen_selection.select_iter(iter) - - def display_closed_cb(self, display, is_error, info): - ''' Called when one of the currently open displays is closed. - Remove it from our list of displays. - ''' - iter = self.display_model.get_iter_first() - while iter: - tmp_display = self.display_model.get_value(iter, DISPLAY_COLUMN_DISPLAY) - if (tmp_display == display): - info.display_model.remove(iter) - break; - iter = info.display_model.iter_next() - - def add_display(self, display): - ''' Adds a new display to our list of displays, and connects - to the "closed" signal so that we can remove it from the - list of displays again. - ''' - name = display.get_name() - - iter = self.display_model.append() - self.display_model.set(iter, - DISPLAY_COLUMN_NAME, name, DISPLAY_COLUMN_DISPLAY, display) - id = display.connect("closed", self.display_closed_cb) - display.set_data('user-callback', id) - - def display_opened_cb(self, manager, display): - ''' Called when a new display is opened - ''' - self.add_display(display) - - def destroy_info(self): - ''' Cleans up when the toplevel is destroyed; we remove the - connections we use to track currently open displays. - ''' - manager = gtk.gdk.display_manager_get() - displays = manager.list_displays() - - id = manager.get_data('user-callback') - manager.disconnect(id) - - for tmp_list in displays: - id = tmp_list.get_data('user-callback') - tmp_list.disconnect(id) - - -def main(): - ChangeDisplayDemo() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/pygtk-demo/demos/colorsel.py b/examples/pygtk-demo/demos/colorsel.py deleted file mode 100644 index 252d09c4..00000000 --- a/examples/pygtk-demo/demos/colorsel.py +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env python -"""Color Selector - -GtkColorSelection lets the user choose a color. GtkColorSelectionDialog is a -prebuilt dialog containing a GtkColorSelection.""" - -import gtk - -class ColorSelectorDemo(gtk.Window): - color = gtk.gdk.color_parse("blue") - - def __init__(self, parent=None): - # Create the toplevel window - gtk.Window.__init__(self) - try: - self.set_screen(parent.get_screen()) - except AttributeError: - self.connect('destroy', lambda *w: gtk.main_quit()) - - self.set_title(self.__class__.__name__) - self.set_border_width(8) - vbox = gtk.VBox() - vbox.set_border_width(8) - self.add(vbox) - - # Create the color swatch area - frame = gtk.Frame() - frame.set_shadow_type(gtk.SHADOW_IN) - vbox.pack_start(frame, True, True, 8) - - self.d_area = gtk.DrawingArea() - self.d_area.set_size_request(200, 200) - self.d_area.modify_bg(gtk.STATE_NORMAL, self.color) - frame.add(self.d_area) - - alignment = gtk.Alignment(1.0, 0.5, 0.0, 0.0) - - button = gtk.Button("_Change the above color") - alignment.add(button) - - vbox.pack_start(alignment, True, True) - - button.connect('clicked', self.on_change_color_clicked) - button.set_flags(gtk.CAN_DEFAULT) - button.grab_default() - - self.show_all() - - def on_change_color_clicked(self, button): - - dialog = gtk.ColorSelectionDialog("Changing color") - dialog.set_transient_for(self) - colorsel = dialog.colorsel - - colorsel.set_previous_color(self.color) - colorsel.set_current_color(self.color) - colorsel.set_has_palette(True) - - response = dialog.run() - - if response == gtk.RESPONSE_OK: - self.color = colorsel.get_current_color() - self.d_area.modify_bg(gtk.STATE_NORMAL, self.color) - - dialog.destroy() - return True - -def main(): - ColorSelectorDemo() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/pygtk-demo/demos/dialogs.py b/examples/pygtk-demo/demos/dialogs.py deleted file mode 100644 index edea0701..00000000 --- a/examples/pygtk-demo/demos/dialogs.py +++ /dev/null @@ -1,130 +0,0 @@ -#!/usr/bin/env python -"""Dialog and Message Boxes - -Dialog widgets are used to pop up a transient window for user feedback.""" - -import gtk - -class DialogAndMessageBoxesDemo(gtk.Window): - counter = 1 - def __init__(self, parent=None): - # Create the toplevel window - gtk.Window.__init__(self) - try: - self.set_screen(parent.get_screen()) - except AttributeError: - self.connect('destroy', lambda *w: gtk.main_quit()) - - self.set_title(self.__class__.__name__) - self.set_border_width(8) - - frame = gtk.Frame("Dialogs") - self.add(frame) - - vbox = gtk.VBox(False, 8) - vbox.set_border_width(8) - frame.add(vbox) - - # Standard message dialog - hbox = gtk.HBox(False, 8) - vbox.pack_start(hbox) - button = gtk.Button("_Message Dialog") - button.connect('clicked', self.on_message_dialog_clicked) - hbox.pack_start(button, False, False, 0) - vbox.pack_start(gtk.HSeparator(), False, False, 0) - - # Interactive dialog - hbox = gtk.HBox(False, 8) - vbox.pack_start(hbox, False, False, 0) - vbox2 = gtk.VBox() - - button = gtk.Button("_Interactive Dialog") - button.connect('clicked', self.on_interactive_dialog_clicked) - hbox.pack_start(vbox2, False, False, 0) - vbox2.pack_start(button, False, False, 0) - - table = gtk.Table(2, 2) - table.set_row_spacings(4) - table.set_col_spacings(4) - hbox.pack_start(table, False, False, 0) - - label = gtk.Label("Entry _1") - label.set_use_underline(True) - table.attach(label, 0, 1, 0, 1) - - self.entry1 = gtk.Entry() - table.attach(self.entry1, 1, 2, 0, 1) - label.set_mnemonic_widget(self.entry1) - - label = gtk.Label("Entry _2") - label.set_use_underline(True) - table.attach(label, 0, 1, 1, 2) - - self.entry2 = gtk.Entry() - table.attach(self.entry2, 1, 2, 1, 2) - label.set_mnemonic_widget(self.entry2) - - self.show_all() - - def on_message_dialog_clicked(self, button): - dialog = gtk.MessageDialog(self, - gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_INFO, gtk.BUTTONS_OK, - "This message box has been popped up %d time%s." % - (self.counter, self.counter > 1 and 's' or '')) - dialog.run() - dialog.destroy() - self.counter += 1 - - def on_interactive_dialog_clicked(self, button): - - dialog = gtk.Dialog("Interactive Dialog", self, 0, - (gtk.STOCK_OK, gtk.RESPONSE_OK, - "_Non-stock button", gtk.RESPONSE_CANCEL)) - - hbox = gtk.HBox(False, 8) - hbox.set_border_width(8) - dialog.vbox.pack_start(hbox, False, False, 0) - - stock = gtk.image_new_from_stock( - gtk.STOCK_DIALOG_QUESTION, - gtk.ICON_SIZE_DIALOG) - hbox.pack_start(stock, False, False, 0) - - table = gtk.Table(2, 2) - table.set_row_spacings(4) - table.set_col_spacings(4) - hbox.pack_start(table, True, True, 0) - - label = gtk.Label("Entry _1") - label.set_use_underline(True) - table.attach(label, 0, 1, 0, 1) - local_entry1 = gtk.Entry() - local_entry1.set_text(self.entry1.get_text()) - table.attach(local_entry1, 1, 2, 0, 1) - label.set_mnemonic_widget(local_entry1) - - label = gtk.Label("Entry _2") - label.set_use_underline(True) - table.attach(label, 0, 1, 1, 2) - local_entry2 = gtk.Entry() - local_entry2.set_text(self.entry2.get_text()) - table.attach(local_entry2, 1, 2, 1, 2) - label.set_mnemonic_widget(local_entry2) - - dialog.show_all() - - response = dialog.run() - - if response == gtk.RESPONSE_OK: - self.entry1.set_text(local_entry1.get_text()) - self.entry2.set_text(local_entry2.get_text()) - - dialog.destroy() - -def main(): - DialogAndMessageBoxesDemo() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/pygtk-demo/demos/dnd.py b/examples/pygtk-demo/demos/dnd.py deleted file mode 100644 index ad6cf99d..00000000 --- a/examples/pygtk-demo/demos/dnd.py +++ /dev/null @@ -1,205 +0,0 @@ -#!/usr/bin/env python -'''Drag and Drop - -This is a test of the drag and drop capabilities of gtk. It is a -fairly straight forward port of the example distributed with gtk. -''' - -import gtk -import gobject - -from dndpixmap import drag_icon_xpm, trashcan_open_xpm, trashcan_closed_xpm - -TARGET_STRING = 0 -TARGET_ROOTWIN = 1 - -target = [ - ('STRING', 0, TARGET_STRING), - ('text/plain', 0, TARGET_STRING), - ('application/x-rootwin-drop', 0, TARGET_ROOTWIN) -] - -def create_pixmap(widget, xpm_data): - return \ - gtk.gdk.pixmap_colormap_create_from_xpm_d( - None, widget.get_colormap(), None, xpm_data) - -class DragAndDropDemo(gtk.Window): - trashcan_open = None - trashcan_open_mask = None - trashcan_closed = None - trashcan_closed_mask = None - drag_icon = None - drag_mask = None - have_drag = False - popped_up = False - in_popup = False - popup_timer = 0 - popdown_timer = 0 - popup_win = None - - def __init__(self, parent=None): - gtk.Window.__init__(self) - try: - self.set_screen(parent.get_screen()) - except AttributeError: - self.connect('destroy', lambda *w: gtk.main_quit()) - self.set_title(self.__class__.__name__) - - table = gtk.Table(2,2) - self.add(table) - - self.drag_icon, self.drag_mask = \ - create_pixmap(self, drag_icon_xpm) - self.trashcan_open, self.trashcan_open_mask = \ - create_pixmap(self, trashcan_open_xpm) - self.trashcan_closed, self.trashcan_closed_mask = \ - create_pixmap(self, trashcan_closed_xpm) - - label = gtk.Label('Drop to Trashcan!\n') - label.drag_dest_set(gtk.DEST_DEFAULT_ALL, target[:-1], - gtk.gdk.ACTION_COPY | gtk.gdk.ACTION_MOVE) - label.connect('drag_data_received', self.label_drag_data_received) - table.attach(label, 0, 1, 0, 1) - - label = gtk.Label('Popup\n') - label.drag_dest_set(gtk.DEST_DEFAULT_ALL, target[:-1], - gtk.gdk.ACTION_COPY | gtk.gdk.ACTION_MOVE) - table.attach(label, 1, 2, 1, 2) - label.connect('drag_motion', self.popsite_motion) - label.connect('drag_leave', self.popsite_leave) - - image = gtk.Image() - image.set_from_pixmap(self.trashcan_closed, self.trashcan_closed_mask) - image.drag_dest_set(0, [], 0) - table.attach(image, 1, 2, 0, 1) - image.connect('drag_leave', self.target_drag_leave) - image.connect('drag_motion', self.target_drag_motion) - image.connect('drag_drop', self.target_drag_drop) - image.connect('drag_data_received', self.target_drag_data_received) - - b = gtk.Button('Drag from Here\n') - b.drag_source_set(gtk.gdk.BUTTON1_MASK | gtk.gdk.BUTTON3_MASK, - target, gtk.gdk.ACTION_COPY | gtk.gdk.ACTION_MOVE) - b.drag_source_set_icon(self.get_colormap(), self.drag_icon, self.drag_mask) - table.attach(b, 0, 1, 1, 2) - b.connect('drag_data_get', self.source_drag_data_get) - b.connect('drag_data_delete', self.source_drag_data_delete) - self.show_all() - - def label_drag_data_received(self, w, context, x, y, data, info, time): - if data and data.format == 8: - print 'Received "%s" in label' % data.data - context.finish(True, False, time) - else: - context.finish(False, False, time) - - def popsite_motion(self, w, context, x, y, time): - if not self.popup_timer: - self.popup_timer = gobject.timeout_add(500, self.popup_cb) - return True - - def popsite_leave(self, w, context, time): - if self.popup_timer: - gobject.source_remove(self.popup_timer) - self.popup_timer = 0 - - def popup_motion(self, w, context, x, y, time): - print 'popup_motion' - if not self.in_popup: - self.in_popup = True - if self.popdown_timer: - print 'removed popdown' - gobject.source_remove(self.popdown_timer) - self.popdown_timer = 0 - return True - - def popup_leave(self, w, context, time): - print 'popup_leave' - if self.in_popup: - self.in_popup = False - if not self.popdown_timer: - print 'added popdown' - self.popdown_timer = gobject.timeout_add(500, self.popdown_cb) - - def popup_cb(self): - if not self.popped_up: - if self.popup_win is None: - self.popup_win = gtk.Window(gtk.WINDOW_POPUP) - self.popup_win.set_position(gtk.WIN_POS_MOUSE) - table = gtk.Table(3, 3) - for k in range(9): - i, j = divmod(k, 3) - b = gtk.Button("%d,%d" % (i,j)) - b.drag_dest_set(gtk.DEST_DEFAULT_ALL, target[:-1], - gtk.gdk.ACTION_COPY | gtk.gdk.ACTION_MOVE) - b.connect('drag_motion', self.popup_motion) - b.connect('drag_leave', self.popup_leave) - table.attach(b, i, i+1, j, j+1) - table.show_all() - self.popup_win.add(table) - self.popup_win.present() - self.popped_up = True - self.popdown_timer = gobject.timeout_add(500, self.popdown_cb) - print 'added popdown' - self.popup_timer = 0 - return False - - def popdown_cb(self): - print 'popdown' - #if self.in_popup: - # return True - self.popdown_timer = 0 - self.popup_win.hide() - self.popped_up = False - return False - - def target_drag_leave(self, img, context, time): - print 'leave' - self.have_drag = False - img.set_from_pixmap(self.trashcan_closed, self.trashcan_closed_mask) - - def target_drag_motion(self, img, context, x, y, time): - if self.have_drag is False: - self.have_drag = True - img.set_from_pixmap(self.trashcan_open, self.trashcan_open_mask) - source_widget = context.get_source_widget() - print 'motion, source ', - if source_widget: - print source_widget.__class__.__name__ - else: - print 'unknown' - context.drag_status(context.suggested_action, time) - return True - - def target_drag_drop(self, img, context, x, y, time): - print 'drop' - self.have_drag = False - img.set_from_pixmap(self.trashcan_closed, self.trashcan_closed_mask) - if context.targets: - img.drag_get_data(context, context.targets[0], time) - return True - return False - - def target_drag_data_received(self, img, context, x, y, data, info, time): - if data.format == 8: - print 'Received "%s" in trashcan' % data.data - context.finish(True, False, time) - else: - context.finish(False, False, time) - - def source_drag_data_get(self, btn, context, selection_data, info, time): - if info == TARGET_ROOTWIN: - print 'I was dropped on the rootwin' - else: - selection_data.set(selection_data.target, 8, "I'm Data!") - - def source_drag_data_delete(self, btn, context, data): - print 'Delete the data!' - -def main(): - DragAndDropDemo() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/pygtk-demo/demos/dndpixmap.py b/examples/pygtk-demo/demos/dndpixmap.py deleted file mode 100644 index 781b9798..00000000 --- a/examples/pygtk-demo/demos/dndpixmap.py +++ /dev/null @@ -1,259 +0,0 @@ -drag_icon_xpm = [ -"36 48 9 1", -" c None", -". c #020204", -"+ c #8F8F90", -"@ c #D3D3D2", -"# c #AEAEAC", -"$ c #ECECEC", -"% c #A2A2A4", -"& c #FEFEFC", -"* c #BEBEBC", -" .....................", -" ..&&&&&&&&&&&&&&&&&&&.", -" ...&&&&&&&&&&&&&&&&&&&.", -" ..&.&&&&&&&&&&&&&&&&&&&.", -" ..&&.&&&&&&&&&&&&&&&&&&&.", -" ..&&&.&&&&&&&&&&&&&&&&&&&.", -" ..&&&&.&&&&&&&&&&&&&&&&&&&.", -" ..&&&&&.&&&@&&&&&&&&&&&&&&&.", -" ..&&&&&&.*$%$+$&&&&&&&&&&&&&.", -" ..&&&&&&&.%$%$+&&&&&&&&&&&&&&.", -" ..&&&&&&&&.#&#@$&&&&&&&&&&&&&&.", -" ..&&&&&&&&&.#$**#$&&&&&&&&&&&&&.", -" ..&&&&&&&&&&.&@%&%$&&&&&&&&&&&&&.", -" ..&&&&&&&&&&&.&&&&&&&&&&&&&&&&&&&.", -" ..&&&&&&&&&&&&.&&&&&&&&&&&&&&&&&&&.", -"................&$@&&&@&&&&&&&&&&&&.", -".&&&&&&&+&&#@%#+@#@*$%$+$&&&&&&&&&&.", -".&&&&&&&+&&#@#@&&@*%$%$+&&&&&&&&&&&.", -".&&&&&&&+&$%&#@&#@@#&#@$&&&&&&&&&&&.", -".&&&&&&@#@@$&*@&@#@#$**#$&&&&&&&&&&.", -".&&&&&&&&&&&&&&&&&&&@%&%$&&&&&&&&&&.", -".&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&.", -".&&&&&&&&$#@@$&&&&&&&&&&&&&&&&&&&&&.", -".&&&&&&&&&+&$+&$&@&$@&&$@&&&&&&&&&&.", -".&&&&&&&&&+&&#@%#+@#@*$%&+$&&&&&&&&.", -".&&&&&&&&&+&&#@#@&&@*%$%$+&&&&&&&&&.", -".&&&&&&&&&+&$%&#@&#@@#&#@$&&&&&&&&&.", -".&&&&&&&&@#@@$&*@&@#@#$#*#$&&&&&&&&.", -".&&&&&&&&&&&&&&&&&&&&&$%&%$&&&&&&&&.", -".&&&&&&&&&&$#@@$&&&&&&&&&&&&&&&&&&&.", -".&&&&&&&&&&&+&$%&$$@&$@&&$@&&&&&&&&.", -".&&&&&&&&&&&+&&#@%#+@#@*$%$+$&&&&&&.", -".&&&&&&&&&&&+&&#@#@&&@*#$%$+&&&&&&&.", -".&&&&&&&&&&&+&$+&*@&#@@#&#@$&&&&&&&.", -".&&&&&&&&&&$%@@&&*@&@#@#$#*#&&&&&&&.", -".&&&&&&&&&&&&&&&&&&&&&&&$%&%$&&&&&&.", -".&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&.", -".&&&&&&&&&&&&&&$#@@$&&&&&&&&&&&&&&&.", -".&&&&&&&&&&&&&&&+&$%&$$@&$@&&$@&&&&.", -".&&&&&&&&&&&&&&&+&&#@%#+@#@*$%$+$&&.", -".&&&&&&&&&&&&&&&+&&#@#@&&@*#$%$+&&&.", -".&&&&&&&&&&&&&&&+&$+&*@&#@@#&#@$&&&.", -".&&&&&&&&&&&&&&$%@@&&*@&@#@#$#*#&&&.", -".&&&&&&&&&&&&&&&&&&&&&&&&&&&$%&%$&&.", -".&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&.", -".&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&.", -".&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&.", -"...................................."] - -trashcan_closed_xpm = [ -"64 80 17 1", -" c None", -". c #030304", -"+ c #5A5A5C", -"@ c #323231", -"# c #888888", -"$ c #1E1E1F", -"% c #767677", -"& c #494949", -"* c #9E9E9C", -"= c #111111", -"- c #3C3C3D", -"; c #6B6B6B", -"> c #949494", -", c #282828", -"' c #808080", -") c #545454", -"! c #AEAEAC", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ==......=$$...=== ", -" ..$------)+++++++++++++@$$... ", -" ..=@@-------&+++++++++++++++++++-.... ", -" =.$$@@@-&&)++++)-,$$$$=@@&+++++++++++++,..$ ", -" .$$$$@@&+++++++&$$$@@@@-&,$,-++++++++++;;;&.. ", -" $$$$,@--&++++++&$$)++++++++-,$&++++++;%%'%%;;$@ ", -" .-@@-@-&++++++++-@++++++++++++,-++++++;''%;;;%*-$ ", -" +------++++++++++++++++++++++++++++++;;%%%;;##*!. ", -" =+----+++++++++++++++++++++++;;;;;;;;;;;;%'>>). ", -" .=)&+++++++++++++++++;;;;;;;;;;;;;;%''>>#>#@. ", -" =..=&++++++++++++;;;;;;;;;;;;;%###>>###+%== ", -" .&....=-+++++%;;####''''''''''##'%%%)..#. ", -" .+-++@....=,+%#####'%%%%%%%%%;@$-@-@*++!. ", -" .+-++-+++-&-@$$=$=......$,,,@;&)+!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" =+-++-+++-+++++++++!++++!++++!+++!++!+++= ", -" $.++-+++-+++++++++!++++!++++!+++!++!+.$ ", -" =.++++++++++++++!++++!++++!+++!++.= ", -" $..+++++++++++++++!++++++...$ ", -" $$=.............=$$ ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" "] - -trashcan_open_xpm = [ -"64 80 17 1", -" c None", -". c #030304", -"+ c #5A5A5C", -"@ c #323231", -"# c #888888", -"$ c #1E1E1F", -"% c #767677", -"& c #494949", -"* c #9E9E9C", -"= c #111111", -"- c #3C3C3D", -"; c #6B6B6B", -"> c #949494", -", c #282828", -"' c #808080", -") c #545454", -"! c #AEAEAC", -" ", -" ", -" ", -" ", -" ", -" ", -" .=.==.,@ ", -" ==.,@-&&&)-= ", -" .$@,&++;;;%>*- ", -" $,-+)+++%%;;'#+. ", -" =---+++++;%%%;%##@. ", -" @)++++++++;%%%%'#%$ ", -" $&++++++++++;%%;%##@= ", -" ,-++++)+++++++;;;'#%) ", -" @+++&&--&)++++;;%'#'-. ", -" ,&++-@@,,,,-)++;;;'>'+, ", -" =-++&@$@&&&&-&+;;;%##%+@ ", -" =,)+)-,@@&+++++;;;;%##%&@ ", -" @--&&,,@&)++++++;;;;'#)@ ", -" ---&)-,@)+++++++;;;%''+, ", -" $--&)+&$-+++++++;;;%%'';- ", -" .,-&+++-$&++++++;;;%''%&= ", -" $,-&)++)-@++++++;;%''%), ", -" =,@&)++++&&+++++;%'''+$@&++++++ ", -" .$@-++++++++++++;'#';,........=$@&++++ ", -" =$@@&)+++++++++++'##-.................=&++ ", -" .$$@-&)+++++++++;%#+$.....................=)+ ", -" $$,@-)+++++++++;%;@=........................,+ ", -" .$$@@-++++++++)-)@=............................ ", -" $,@---)++++&)@===............................,. ", -" $-@---&)))-$$=..............................=)!. ", -" --&-&&,,$=,==...........................=&+++!. ", -" =,=$..=$+)+++++&@$=.............=$@&+++++!++!. ", -" .)-++-+++++++++++++++++++++++++++!++!++!. ", -" .+-++-+++++++++++++++++++++++!+++!++!++!. ", -" .+-++-+++-+++++++++!+++!!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" =+-++-+++-+++++++++!++++!++++!+++!++!+++= ", -" $.++-+++-+++++++++!++++!++++!+++!++!+.$ ", -" =.++++++++++++++!++++!++++!+++!++.= ", -" $..+++++++++++++++!++++++...$ ", -" $$==...........==$$ ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" "] diff --git a/examples/pygtk-demo/demos/editable_cells.py b/examples/pygtk-demo/demos/editable_cells.py deleted file mode 100644 index a0797ad0..00000000 --- a/examples/pygtk-demo/demos/editable_cells.py +++ /dev/null @@ -1,166 +0,0 @@ -#!/usr/bin/env python -'''Tree View/Editable Cells - -This demo demonstrates the use of editable cells in a GtkTreeView. -If you're new to the GtkTreeView widgets and associates, look into the -GtkListStore example first.''' -# pygtk version: Maik Hertha - -import gobject -import gtk - -# columns -( - COLUMN_NUMBER, - COLUMN_PRODUCT, - COLUMN_EDITABLE -) = range(3) - -# data -articles = [ - [ 3, "bottles of coke", True ], - [ 5, "packages of noodles", True ], - [ 2, "packages of chocolate chip cookies", True ], - [ 1, "can vanilla ice cream", True ], - [ 6, "eggs", True ] -] - -class EditableCellsDemo(gtk.Window): - def __init__(self, parent=None): - gtk.Window.__init__(self) - try: - self.set_screen(parent.get_screen()) - except AttributeError: - self.connect('destroy', lambda *w: gtk.main_quit()) - self.set_title(self.__class__.__name__) - self.set_border_width(5) - self.set_default_size(320, 200) - - vbox = gtk.VBox(False, 5) - self.add(vbox) - - label = gtk.Label("Shopping list (you can edit the cells!)") - vbox.pack_start(label, False, False) - - sw = gtk.ScrolledWindow() - sw.set_shadow_type(gtk.SHADOW_ETCHED_IN) - sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - vbox.pack_start(sw) - - # create model - model = self.__create_model() - - # create tree view - treeview = gtk.TreeView(model) - treeview.set_rules_hint(True) - treeview.get_selection().set_mode(gtk.SELECTION_SINGLE) - - self.__add_columns(treeview) - - sw.add(treeview) - - # some buttons - hbox = gtk.HBox(True, 4) - vbox.pack_start(hbox, False, False) - - button = gtk.Button(stock=gtk.STOCK_ADD) - button.connect("clicked", self.on_add_item_clicked, model) - hbox.pack_start(button) - - button = gtk.Button(stock=gtk.STOCK_REMOVE) - button.connect("clicked", self.on_remove_item_clicked, treeview) - hbox.pack_start(button) - - self.show_all() - - def __create_model(self): - - # create list store - model = gtk.ListStore( - gobject.TYPE_INT, - gobject.TYPE_STRING, - gobject.TYPE_BOOLEAN - ) - - # add items - for item in articles: - iter = model.append() - - model.set (iter, - COLUMN_NUMBER, item[COLUMN_NUMBER], - COLUMN_PRODUCT, item[COLUMN_PRODUCT], - COLUMN_EDITABLE, item[COLUMN_EDITABLE] - ) - return model - - - def __add_columns(self, treeview): - - model = treeview.get_model() - - # number column - renderer = gtk.CellRendererText() - renderer.connect("edited", self.on_cell_edited, model) - renderer.set_data("column", COLUMN_NUMBER) - - column = gtk.TreeViewColumn("Number", renderer, text=COLUMN_NUMBER, - editable=COLUMN_EDITABLE) - treeview.append_column(column) - - # product column - renderer = gtk.CellRendererText() - renderer.connect("edited", self.on_cell_edited, model) - renderer.set_data("column", COLUMN_PRODUCT) - - column = gtk.TreeViewColumn("Product", renderer, text=COLUMN_PRODUCT, - editable=COLUMN_EDITABLE) - treeview.append_column(column) - - - def on_add_item_clicked(self, button, model): - new_item = [0, "Description here", True] - articles.append(new_item) - - iter = model.append() - model.set (iter, - COLUMN_NUMBER, new_item[COLUMN_NUMBER], - COLUMN_PRODUCT, new_item[COLUMN_PRODUCT], - COLUMN_EDITABLE, new_item[COLUMN_EDITABLE] - ) - - - def on_remove_item_clicked(self, button, treeview): - - selection = treeview.get_selection() - model, iter = selection.get_selected() - - if iter: - path = model.get_path(iter)[0] - model.remove(iter) - - del articles[ path ] - - - def on_cell_edited(self, cell, path_string, new_text, model): - - iter = model.get_iter_from_string(path_string) - path = model.get_path(iter)[0] - column = cell.get_data("column") - - if column == COLUMN_NUMBER: - articles[path][COLUMN_NUMBER] = int(new_text) - - model.set(iter, column, articles[path][COLUMN_NUMBER]) - - elif column == COLUMN_PRODUCT: - old_text = model.get_value(iter, column) - articles[path][COLUMN_PRODUCT] = new_text - - model.set(iter, column, articles[path][COLUMN_PRODUCT]) - -def main(): - EditableCellsDemo() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/pygtk-demo/demos/entry_completion.py b/examples/pygtk-demo/demos/entry_completion.py deleted file mode 100644 index 71e094e6..00000000 --- a/examples/pygtk-demo/demos/entry_completion.py +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env python -'''Entry Completion - -GtkEntryCompletion provides a mechanism for adding support for -completion in GtkEntry. -''' -# pygtk version: Maik Hertha - -import gtk - -class EntryCompletionDemo(gtk.Dialog): - - def __init__(self, parent=None): - gtk.Dialog.__init__(self, self.__class__.__name__, parent, - 0, - (gtk.STOCK_CLOSE, gtk.RESPONSE_NONE)) - try: - self.set_screen(parent.get_screen()) - except AttributeError: - self.connect('destroy', lambda *w: gtk.main_quit()) - self.connect("response", lambda d, r: d.destroy()) - self.set_resizable(False) - - vbox = gtk.VBox(False, 5) - self.vbox.pack_start(vbox, True, True, 0) - vbox.set_border_width(5) - - label = gtk.Label() - label.set_markup("Completion demo, try writing total " - "or gnome for example.") - vbox.pack_start(label, False, False, 0) - - # Create our entry - entry = gtk.Entry() - vbox.pack_start(entry, False, False, 0) - - # Create the completion object - completion = gtk.EntryCompletion() - - # Assign the completion to the entry - entry.set_completion(completion) - - # Create a tree model and use it as the completion model - completion_model = self.__create_completion_model() - completion.set_model(completion_model) - - # Use model column 0 as the text column - completion.set_text_column(0) - - self.show_all() - - def __create_completion_model(self): - ''' Creates a tree model containing the completions. - ''' - store = gtk.ListStore(str) - - # Append one word - iter = store.append() - store.set(iter, 0, "GNOME") - - # Append another word - iter = store.append() - store.set(iter, 0, "total") - - # And another word - iter = store.append() - store.set(iter, 0, "totally") - - return store - -def main(): - EntryCompletionDemo() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/pygtk-demo/demos/expander.py b/examples/pygtk-demo/demos/expander.py deleted file mode 100644 index bb02b950..00000000 --- a/examples/pygtk-demo/demos/expander.py +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env python -'''Expander - -GtkExpander allows to provide additional content that is initially hidden. -This is also known as "disclosure triangle". -''' -# pygtk version: Maik Hertha - -import gtk - -class ExpanderDemo(gtk.Dialog): - - def __init__(self, parent=None): - gtk.Dialog.__init__(self, self.__class__.__name__, parent, - 0, - (gtk.STOCK_CLOSE, gtk.RESPONSE_NONE)) - try: - self.set_screen(parent.get_screen()) - except AttributeError: - self.connect('destroy', lambda *w: gtk.main_quit()) - self.connect("response", lambda d, r: d.destroy()) - self.set_resizable(False) - - vbox = gtk.VBox(False, 5) - self.vbox.pack_start(vbox, True, True, 0) - vbox.set_border_width(5) - - label = gtk.Label() - label.set_markup("Expander demo. Click on the triangle for details.") - vbox.pack_start(label, False, False, 0) - - # Create the expander - expander = gtk.Expander("Details") - vbox.pack_start(expander, False, False, 0) - - # The Label for the expander - label = gtk.Label("Details can be shown or hidden.") - expander.add(label) - - self.show_all() - -def main(): - ExpanderDemo() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/pygtk-demo/demos/hypertext.py b/examples/pygtk-demo/demos/hypertext.py deleted file mode 100644 index 2dd0fc60..00000000 --- a/examples/pygtk-demo/demos/hypertext.py +++ /dev/null @@ -1,184 +0,0 @@ -#!/usr/bin/env python -'''Text Widget/Hypertext - -Usually, tags modify the appearance of text in the view, e.g. making it -bold or colored or underlined. But tags are not restricted to appearance. -They can also affect the behavior of mouse and key presses, as this demo -shows.''' -# pygtk version: Maik Hertha - -import gtk -import pango - -class HypertextDemo(gtk.Window): - hovering_over_link = False - hand_cursor = gtk.gdk.Cursor(gtk.gdk.HAND2) - regular_cursor = gtk.gdk.Cursor(gtk.gdk.XTERM) - - def __init__(self, parent=None): - gtk.Window.__init__(self) - try: - self.set_screen(parent.get_screen()) - except AttributeError: - self.connect('destroy', lambda *w: gtk.main_quit()) - - self.set_title(self.__class__.__name__) - self.set_default_size(450, 450) - self.set_border_width(0) - - view = gtk.TextView() - view.set_wrap_mode(gtk.WRAP_WORD) - view.connect("key-press-event", self.key_press_event) - view.connect("event-after", self.event_after) - view.connect("motion-notify-event", self.motion_notify_event) - view.connect("visibility-notify-event", self.visibility_notify_event) - - buffer = view.get_buffer() - - sw = gtk.ScrolledWindow() - sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - self.add(sw) - sw.add(view) - - self.show_page(buffer, 1) - - self.show_all() - - # Links can be activated by pressing Enter. - def key_press_event(self, text_view, event): - if (event.keyval == gtk.gdk.Return or - event.keyval == gtk.gdk.KP_Enter): - buffer = text_view.get_buffer() - iter = buffer.get_iter_at_mark(buffer.get_insert()) - self.follow_if_link(text_view, iter) - return False - - # Links can also be activated by clicking. - def event_after(self, text_view, event): - if event.type != gtk.gdk.BUTTON_RELEASE: - return False - if event.button != 1: - return False - buffer = text_view.get_buffer() - - # we shouldn't follow a link if the user has selected something - try: - start, end = buffer.get_selection_bounds() - except ValueError: - # If there is nothing selected, None is return - pass - else: - if start.get_offset() != end.get_offset(): - return False - - x, y = text_view.window_to_buffer_coords(gtk.TEXT_WINDOW_WIDGET, - int(event.x), int(event.y)) - iter = text_view.get_iter_at_location(x, y) - - self.follow_if_link(text_view, iter) - return False - - - # Looks at all tags covering the position (x, y) in the text view, - # and if one of them is a link, change the cursor to the "hands" cursor - # typically used by web browsers. - def set_cursor_if_appropriate(self, text_view, x, y): - hovering = False - - buffer = text_view.get_buffer() - iter = text_view.get_iter_at_location(x, y) - - tags = iter.get_tags() - for tag in tags: - page = tag.get_data("page") - if page != 0: - hovering = True - break - - if hovering != self.hovering_over_link: - self.hovering_over_link = hovering - - if self.hovering_over_link: - text_view.get_window(gtk.TEXT_WINDOW_TEXT).set_cursor(self.hand_cursor) - else: - text_view.get_window(gtk.TEXT_WINDOW_TEXT).set_cursor(self.regular_cursor) - - # Update the cursor image if the pointer moved. - def motion_notify_event(self, text_view, event): - x, y = text_view.window_to_buffer_coords(gtk.TEXT_WINDOW_WIDGET, - int(event.x), int(event.y)) - self.set_cursor_if_appropriate(text_view, x, y) - text_view.window.get_pointer() - return False - - # Also update the cursor image if the window becomes visible - # (e.g. when a window covering it got iconified). - def visibility_notify_event(self, text_view, event): - wx, wy, mod = text_view.window.get_pointer() - bx, by = text_view.window_to_buffer_coords(gtk.TEXT_WINDOW_WIDGET, wx, wy) - - self.set_cursor_if_appropriate (text_view, bx, by) - return False - - def insert_link(self, buffer, iter, text, page): - ''' Inserts a piece of text into the buffer, giving it the usual - appearance of a hyperlink in a web browser: blue and underlined. - Additionally, attaches some data on the tag, to make it recognizable - as a link. - ''' - tag = buffer.create_tag(None, - foreground="blue", underline=pango.UNDERLINE_SINGLE) - tag.set_data("page", page) - buffer.insert_with_tags(iter, text, tag) - - - def show_page(self, buffer, page): - ''' Fills the buffer with text and interspersed links. In any real - hypertext app, this method would parse a file to identify the links. - ''' - buffer.set_text("", 0) - iter = buffer.get_iter_at_offset(0) - if page == 1: - buffer.insert(iter, "Some text to show that simple ") - self.insert_link(buffer, iter, "hypertext", 3) - buffer.insert(iter, " can easily be realized with ") - self.insert_link(buffer, iter, "tags", 2) - buffer.insert(iter, ".") - - elif page == 2: - buffer.insert(iter, - "A tag is an attribute that can be applied to some range of text. " - "For example, a tag might be called \"bold\" and make the text inside " - "the tag bold. However, the tag concept is more general than that " - "tags don't have to affect appearance. They can instead affect the " - "behavior of mouse and key presses, \"lock\" a range of text so the " - "user can't edit it, or countless other things.\n", -1) - self.insert_link(buffer, iter, "Go back", 1) - elif page == 3: - tag = buffer.create_tag(None, weight=pango.WEIGHT_BOLD) - buffer.insert_with_tags(iter, "hypertext:\n", tag) - buffer.insert(iter, - "machine-readable text that is not sequential but is organized " - "so that related items of information are connected.\n") - self.insert_link(buffer, iter, "Go back", 1) - - - def follow_if_link(self, text_view, iter): - ''' Looks at all tags covering the position of iter in the text view, - and if one of them is a link, follow it by showing the page identified - by the data attached to it. - ''' - tags = iter.get_tags() - for tag in tags: - page = tag.get_data("page") - if page != 0: - self.show_page(text_view.get_buffer(), page) - break - - -def main(): - HypertextDemo() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/pygtk-demo/demos/images.py b/examples/pygtk-demo/demos/images.py deleted file mode 100644 index 176cfa78..00000000 --- a/examples/pygtk-demo/demos/images.py +++ /dev/null @@ -1,306 +0,0 @@ -#!/usr/bin/env python -'''Images - -GtkImage is used to display an image; the image can be in a number of formats. -Typically, you load an image into a GdkPixbuf, then display the pixbuf. -This demo code shows some of the more obscure cases, in the simple case a call -to gtk_image_new_from_file() is all you need. -If you want to put image data in your program as a C variable, use the -make-inline-pixbuf program that comes with GTK+. This way you won't need to -depend on loading external files, your application binary can be self-contained.''' -# pygtk version: Maik Hertha - -import os -import gobject -import gtk - -IMAGEDIR = os.path.join(os.path.dirname(__file__), 'images') -ALPHA_IMAGE = os.path.join(IMAGEDIR, 'alphatest.png') -GTKLOGO_IMAGE = os.path.join(IMAGEDIR, 'gtk-logo-rgb.gif') -BUDDY_IMAGE = os.path.join(IMAGEDIR, 'floppybuddy.gif') - -def progressive_prepared_callback(loader, image): - pixbuf = loader.get_pixbuf() - - # Avoid displaying random memory contents, since the pixbuf - # isn't filled in yet. - #images.c -> gdk_pixbuf_fill(pixbuf, 0xaaaaaaff) - pixbuf.fill(0) - image.set_from_pixbuf(pixbuf) - - -def progressive_updated_callback(loader, x, y, width, height, image): - ''' We know the pixbuf inside the GtkImage has changed, but the image - itself doesn't know this; so queue a redraw. If we wanted to be - really efficient, we could use a drawing area or something - instead of a GtkImage, so we could control the exact position of - the pixbuf on the display, then we could queue a draw for only - the updated area of the image. - ''' - image.queue_draw() - -class ImagesDemo(gtk.Window): - pixbuf_loader = None - load_timeout = None - image_stream = None - - def __init__(self, parent=None): - gtk.Window.__init__(self) - try: - self.set_screen(parent.get_screen()) - except AttributeError: - self.connect('destroy', lambda *w: gtk.main_quit()) - self.connect("destroy", self.cleanup_callback) - self.set_title(self.__class__.__name__) - self.set_border_width(8) - - vbox = gtk.VBox(False, 8) - vbox.set_border_width(8) - self.add(vbox) - - label = gtk.Label(); - label.set_markup("Image loaded from a file") - vbox.pack_start(label, False, False, 0) - - frame = gtk.Frame() - frame.set_shadow_type(gtk.SHADOW_IN) - - # The alignment keeps the frame from growing when users resize - # the window - align = gtk.Alignment(0.5, 0.5, 0, 0) - align.add(frame) - vbox.pack_start(align, False, False, 0) - - image = gtk.Image() - - # use the current directory for the file - try: - pixbuf = gtk.gdk.pixbuf_new_from_file(GTKLOGO_IMAGE) - image.set_from_pixbuf(pixbuf) - - except gobject.GError, error: - - # This code shows off error handling. You can just use - # gtk_image_new_from_file() instead if you don't want to report - # errors to the user. If the file doesn't load when using - # gtk_image_new_from_file(), a "missing image" icon will - # be displayed instead. - - dialog = gtk.MessageDialog(self, - gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_ERROR, - gtk.BUTTONS_CLOSE, - "Unable to open image file 'gtk-logo-rgb.gif': \n%s" % error) - - dialog.connect("response", lambda dlg, resp: dlg.destroy()) - dialog.show() - - frame.add(image) - - # Animation - - label = gtk.Label() - label.set_markup("Animation loaded from a file") - vbox.pack_start(label, False, False, 0) - - frame = gtk.Frame() - frame.set_shadow_type(gtk.SHADOW_IN) - - # The alignment keeps the frame from growing when users resize - # the window - - align = gtk.Alignment(0.5, 0.5, 0, 0) - align.add(frame) - vbox.pack_start(align, False, False, 0) - - image = gtk.Image() - image.set_from_file(BUDDY_IMAGE); - - frame.add(image) - - # Progressive - - label = gtk.Label() - label.set_markup("Progressive image loading") - vbox.pack_start(label, False, False, 0) - - frame = gtk.Frame() - frame.set_shadow_type(gtk.SHADOW_IN) - - # The alignment keeps the frame from growing when users resize - # the window - - align = gtk.Alignment(0.5, 0.5, 0, 0) - align.add(frame) - vbox.pack_start(align, False, False, 0) - - # Create an empty image for now; the progressive loader - # will create the pixbuf and fill it in. - - image = gtk.Image() - image.set_from_pixbuf(None) - frame.add(image) - - self.start_progressive_loading(image) - - # Sensitivity control - - button = gtk.ToggleButton("_Insensitive"); - vbox.pack_start(button, False, False, 0) - - button.connect("toggled", self.on_sensitivity_toggled, vbox) - - self.show_all() - - def cleanup_callback(self, win): - if self.load_timeout != 0: - gtk.timeout_remove(self.load_timeout) - self.load_timeout = 0 - - if self.pixbuf_loader is not None: - self.pixbuf_loader.close() - self.pixbuf_loader = None - - if self.image_stream is not None: - self.image_stream.close() - self.image_stream = None - - - def on_sensitivity_toggled(self, togglebutton, container): - children = container.get_children() - - for child in children: - - # don't disable our toggle - if type(child) != type(togglebutton): - child.set_sensitive(not togglebutton.get_active()) - - def start_progressive_loading(self, image): - ''' This is obviously totally contrived(we slow down loading - on purpose to show how incremental loading works). - The real purpose of incremental loading is the case where - you are reading data from a slow source such as the network. - The timeout simply simulates a slow data source by inserting - pauses in the reading process. - ''' - self.load_timeout = gtk.timeout_add(150, self.progressive_timeout, image) - - def progressive_timeout(self, image): - - # This shows off fully-paranoid error handling, so looks scary. - # You could factor out the error handling code into a nice separate - # function to make things nicer. - - if self.image_stream is not None: # file is already opened - try: - buf = self.image_stream.read(256) - bytes_read = len(buf) - - except IOError, error: - dialog = gtk.MessageDialog(self, - gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_ERROR, - gtk.BUTTONS_CLOSE, - "Failure reading image file 'alphatest.png': %s" % error) - - dialog.connect("response", lambda d, r: d.destroy()) - - self.image_stream.close() - self.image_stream = None - - dialog.show() - - self.load_timeout = 0 - - return False; # uninstall the timeout - - if not self.pixbuf_loader.write(buf, bytes_read): - - dialog = gtk.MessageDialog(self, - gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_ERROR, - gtk.BUTTONS_CLOSE, - "Failed to load image") - - dialog.connect("response", lambda d, r: d.destroy()) - - self.image_stream.close() - self.image_stream = None - - dialog.show() - - self.load_timeout = 0 - - return False # uninstall the timeout - - #if(feof(image_stream)): - if bytes_read == 0: - - self.image_stream.close() - self.image_stream = None - - # Errors can happen on close, e.g. if the image - # file was truncated we'll know on close that - # it was incomplete. - - if not self.pixbuf_loader.close(): - - dialog = gtk.MessageDialog(self, - gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_ERROR, - gtk.BUTTONS_CLOSE, - "Failed to load image") - - dialog.connect("response", lambda d, r: d.destroy()) - dialog.show() - - self.pixbuf_loader = None - - self.load_timeout = 0 - - return False # uninstall the timeout - - # if feof(image_stream) - self.pixbuf_loader = None - - else: # if(image_stream) ... - try: - self.image_stream = open(ALPHA_IMAGE, "rb") - - except IOError, error: - error_message = "Unable to open image file 'alphatest.png' : %s" - - dialog = gtk.MessageDialog(self, - gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_ERROR, - gtk.BUTTONS_CLOSE, - error_message % error) - - dialog.connect("response", lambda d, r: d.destroy()) - dialog.show() - - self.load_timeout = 0 - - return False # uninstall the timeout - - if self.pixbuf_loader is not None: - self.pixbuf_loader.close() - self.pixbuf_loader = None - - self.pixbuf_loader = gtk.gdk.PixbufLoader() - - self.pixbuf_loader.connect("area_prepared", - progressive_prepared_callback, image) - - self.pixbuf_loader.connect("area_updated", - progressive_updated_callback, image) - - # leave timeout installed - return True; - -def main(): - ImagesDemo() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/pygtk-demo/demos/images/alphatest.png b/examples/pygtk-demo/demos/images/alphatest.png deleted file mode 100644 index eb5885f8..00000000 Binary files a/examples/pygtk-demo/demos/images/alphatest.png and /dev/null differ diff --git a/examples/pygtk-demo/demos/images/apple-red.png b/examples/pygtk-demo/demos/images/apple-red.png deleted file mode 100644 index b0a24e94..00000000 Binary files a/examples/pygtk-demo/demos/images/apple-red.png and /dev/null differ diff --git a/examples/pygtk-demo/demos/images/background.jpg b/examples/pygtk-demo/demos/images/background.jpg deleted file mode 100644 index 86c006aa..00000000 Binary files a/examples/pygtk-demo/demos/images/background.jpg and /dev/null differ diff --git a/examples/pygtk-demo/demos/images/floppybuddy.gif b/examples/pygtk-demo/demos/images/floppybuddy.gif deleted file mode 100644 index ac986c8e..00000000 Binary files a/examples/pygtk-demo/demos/images/floppybuddy.gif and /dev/null differ diff --git a/examples/pygtk-demo/demos/images/gnome-applets.png b/examples/pygtk-demo/demos/images/gnome-applets.png deleted file mode 100644 index 8d3549e9..00000000 Binary files a/examples/pygtk-demo/demos/images/gnome-applets.png and /dev/null differ diff --git a/examples/pygtk-demo/demos/images/gnome-calendar.png b/examples/pygtk-demo/demos/images/gnome-calendar.png deleted file mode 100644 index 889f329a..00000000 Binary files a/examples/pygtk-demo/demos/images/gnome-calendar.png and /dev/null differ diff --git a/examples/pygtk-demo/demos/images/gnome-foot.png b/examples/pygtk-demo/demos/images/gnome-foot.png deleted file mode 100644 index 04766585..00000000 Binary files a/examples/pygtk-demo/demos/images/gnome-foot.png and /dev/null differ diff --git a/examples/pygtk-demo/demos/images/gnome-gimp.png b/examples/pygtk-demo/demos/images/gnome-gimp.png deleted file mode 100644 index f6bbc6d3..00000000 Binary files a/examples/pygtk-demo/demos/images/gnome-gimp.png and /dev/null differ diff --git a/examples/pygtk-demo/demos/images/gnome-gmush.png b/examples/pygtk-demo/demos/images/gnome-gmush.png deleted file mode 100644 index 0a4b0d04..00000000 Binary files a/examples/pygtk-demo/demos/images/gnome-gmush.png and /dev/null differ diff --git a/examples/pygtk-demo/demos/images/gnome-gsame.png b/examples/pygtk-demo/demos/images/gnome-gsame.png deleted file mode 100644 index 01c06115..00000000 Binary files a/examples/pygtk-demo/demos/images/gnome-gsame.png and /dev/null differ diff --git a/examples/pygtk-demo/demos/images/gnu-keys.png b/examples/pygtk-demo/demos/images/gnu-keys.png deleted file mode 100644 index 58a33770..00000000 Binary files a/examples/pygtk-demo/demos/images/gnu-keys.png and /dev/null differ diff --git a/examples/pygtk-demo/demos/images/gtk-logo-rgb.gif b/examples/pygtk-demo/demos/images/gtk-logo-rgb.gif deleted file mode 100644 index 63c622b9..00000000 Binary files a/examples/pygtk-demo/demos/images/gtk-logo-rgb.gif and /dev/null differ diff --git a/examples/pygtk-demo/demos/list_store.py b/examples/pygtk-demo/demos/list_store.py deleted file mode 100644 index 6273033d..00000000 --- a/examples/pygtk-demo/demos/list_store.py +++ /dev/null @@ -1,141 +0,0 @@ -#!/usr/bin/env python -'''Tree View/List Store - -The GtkListStore is used to store data in list form, to be used -later on by a GtkTreeView to display it. This demo builds a -simple GtkListStore and displays it. See the Stock Browser -demo for a more advanced example.''' - -import gobject -import gtk - -( - COLUMN_FIXED, - COLUMN_NUMBER, - COLUMN_SEVERITY, - COLUMN_DESCRIPTION -) = range(4) - -data = \ -((False, 60482, 'Normal', 'scrollable notebooks and hidden tabs'), - (False, 60620, 'Critical', - 'gdk_window_clear_area(gdkwindow-win32.c) is not thread-safe'), - (False, 50214, 'Major', 'Xft support does not clean up correctly'), - (True, 52877, 'Major', 'GtkFileSelection needs a refresh method. '), - (False, 56070, 'Normal', "Can't click button after setting in sensitive"), - (True, 56355, 'Normal', 'GtkLabel - Not all changes propagate correctly'), - (False, 50055, 'Normal', 'Rework width/height computations for TreeView'), - (False, 58278, 'Normal', "gtk_dialog_set_response_sensitive() doesn't work"), - (False, 55767, 'Normal', 'Getters for all setters'), - (False, 56925, 'Normal', 'Gtkcalender size'), - (False, 56221, 'Normal', 'Selectable label needs right-click copy menu'), - (True, 50939, 'Normal', 'Add shift clicking to GtkTextView'), - (False, 6112, 'Enhancement', 'netscape-like collapsable toolbars'), - (False, 1, 'Normal', 'First bug :=)')) - -class ListStoreDemo(gtk.Window): - def __init__(self, parent=None): - # create window, etc - gtk.Window.__init__(self) - try: - self.set_screen(parent.get_screen()) - except AttributeError: - self.connect('destroy', lambda *w: gtk.main_quit()) - self.set_title(self.__class__.__name__) - - self.set_border_width(8) - self.set_default_size(300, 250) - - vbox = gtk.VBox(False, 8) - self.add(vbox) - - label = gtk.Label('This is the bug list (note: not based on real data, ' - 'it would be nice to have a nice ODBC interface to bugzilla or so, though).') - vbox.pack_start(label, False, False) - - sw = gtk.ScrolledWindow() - sw.set_shadow_type(gtk.SHADOW_ETCHED_IN) - sw.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) - vbox.pack_start(sw) - - # create tree model - model = self.__create_model() - - # create tree view - treeview = gtk.TreeView(model) - treeview.set_rules_hint(True) - treeview.set_search_column(COLUMN_DESCRIPTION) - - sw.add(treeview) - - # add columns to the tree view - self.__add_columns(treeview) - - self.show_all() - - def __create_model(self): - lstore = gtk.ListStore( - gobject.TYPE_BOOLEAN, - gobject.TYPE_UINT, - gobject.TYPE_STRING, - gobject.TYPE_STRING) - - for item in data: - iter = lstore.append() - lstore.set(iter, - COLUMN_FIXED, item[COLUMN_FIXED], - COLUMN_NUMBER, item[COLUMN_NUMBER], - COLUMN_SEVERITY, item[COLUMN_SEVERITY], - COLUMN_DESCRIPTION, item[COLUMN_DESCRIPTION]) - return lstore - - def fixed_toggled(self, cell, path, model): - # get toggled iter - iter = model.get_iter((int(path),)) - fixed = model.get_value(iter, COLUMN_FIXED) - - # do something with the value - fixed = not fixed - - # set new value - model.set(iter, COLUMN_FIXED, fixed) - - def __add_columns(self, treeview): - model = treeview.get_model() - - # column for fixed toggles - renderer = gtk.CellRendererToggle() - renderer.connect('toggled', self.fixed_toggled, model) - - column = gtk.TreeViewColumn('Fixed', renderer, active=COLUMN_FIXED) - - # set this column to a fixed sizing(of 50 pixels) - column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) - column.set_fixed_width(50) - - treeview.append_column(column) - - # column for bug numbers - column = gtk.TreeViewColumn('Bug Number', gtk.CellRendererText(), - text=COLUMN_NUMBER) - column.set_sort_column_id(COLUMN_NUMBER) - treeview.append_column(column) - - # columns for severities - column = gtk.TreeViewColumn('Severity', gtk.CellRendererText(), - text=COLUMN_SEVERITY) - column.set_sort_column_id(COLUMN_SEVERITY) - treeview.append_column(column) - - # column for description - column = gtk.TreeViewColumn('Description', gtk.CellRendererText(), - text=COLUMN_DESCRIPTION) - column.set_sort_column_id(COLUMN_DESCRIPTION) - treeview.append_column(column) - -def main(): - ListStoreDemo() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/pygtk-demo/demos/menu.py b/examples/pygtk-demo/demos/menu.py deleted file mode 100644 index 3a61a427..00000000 --- a/examples/pygtk-demo/demos/menu.py +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env python -'''Menu - -This example demonstrates the use of various menu types in gtk. It -demonstrates the new submenu navigation and scrolling menu features of -gtk 2.0.''' - -import gtk - -def create_menu(depth, length=5): - if depth < 1: - return None - - menu = gtk.Menu() - group= None - - for i in range(length): - menuitem = gtk.RadioMenuItem(group, 'item %2d - %d' % (depth, i)) - group = menuitem - menu.add(menuitem) - menuitem.show() - if depth > 1: - submenu = create_menu(depth - 1) - menuitem.set_submenu(submenu) - return menu - -class MenuDemo(gtk.Window): - def __init__(self, parent=None): - # Create the toplevel window - gtk.Window.__init__(self) - try: - self.set_screen(parent.get_screen()) - except AttributeError: - self.connect('destroy', lambda *w: gtk.main_quit()) - - self.set_title(self.__class__.__name__) - - vbox = gtk.VBox() - self.add(vbox) - - menubar = gtk.MenuBar() - vbox.pack_start(menubar, expand=False) - - menuitem = gtk.MenuItem('test\nline2') - menuitem.set_submenu(create_menu(2, 50)) - menubar.add(menuitem) - - menuitem = gtk.MenuItem('foo') - menuitem.set_submenu(create_menu(2)) - menubar.add(menuitem) - - menuitem = gtk.MenuItem('bar') - menuitem.set_submenu(create_menu(2)) - menuitem.set_right_justified(True) - menubar.add(menuitem) - - vbox2 = gtk.VBox(spacing=10) - vbox2.set_border_width(10) - vbox.pack_start(vbox2) - - combo_box = gtk.combo_box_new_text() - combo_box.set_wrap_width(2) - for i in range(50): - combo_box.append_text('item - %d' % i) - combo_box.set_active(0) - vbox2.pack_start(combo_box) - - separator = gtk.HSeparator() - vbox.pack_start(separator, expand=False) - - vbox2 = gtk.VBox(spacing=10) - vbox2.set_border_width(10) - vbox.pack_start(vbox2, expand=False) - - button = gtk.Button('close') - button.connect('clicked', lambda button, w=self: w.destroy()) - vbox2.pack_start(button) - button.set_flags(gtk.CAN_DEFAULT) - button.grab_default() - - self.show_all() - -def main(): - MenuDemo() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/pygtk-demo/demos/panes.py b/examples/pygtk-demo/demos/panes.py deleted file mode 100644 index 007ec077..00000000 --- a/examples/pygtk-demo/demos/panes.py +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/env python -"""Paned Widgets - -The GtkHPaned and GtkVPaned Widgets divide their content area into two panes -with a divider in between that the user can adjust. A separate child is placed -into each pane. -There are a number of options that can be set for each pane. This test contains -both a horizontal(HPaned) and a vertical(VPaned) widget, and allows you to -adjust the options for each side of each widget.""" - -import gtk - -class PanedWidgetsDemo(gtk.Window): - def __init__(self, parent=None): - # Create the toplevel window - gtk.Window.__init__(self) - try: - self.set_screen(parent.get_screen()) - except AttributeError: - self.connect('destroy', lambda *w: gtk.main_quit()) - - self.set_title(self.__class__.__name__) - self.set_border_width(0) - - vbox = gtk.VBox(False, 0) - self.add(vbox) - - vpaned = gtk.VPaned() - vbox.pack_start(vpaned, True, True) - vpaned.set_border_width(5) - - hpaned = gtk.HPaned() - vpaned.add1(hpaned) - - frame = gtk.Frame() - frame.set_shadow_type(gtk.SHADOW_IN) - frame.set_size_request(60, 60) - hpaned.add1(frame) - - button = gtk.Button("_Hi there") - frame.add(button) - - frame = gtk.Frame() - frame.set_shadow_type(gtk.SHADOW_IN) - frame.set_size_request(80, 60) - hpaned.add2(frame) - - frame = gtk.Frame() - frame.set_shadow_type(gtk.SHADOW_IN) - frame.set_size_request(60, 80) - vpaned.add2(frame) - - # Now create toggle buttons to control sizing - - vbox.pack_start( - self.__create_pane_options(hpaned, "Horizontal", "Left", "Right"), - False, False, 0) - - vbox.pack_start( - self.__create_pane_options(vpaned, "Vertical", "Top", "Bottom"), - False, False, 0) - - self.show_all() - - def on_resize_toggled(self, tbutton, child): - paned = child.parent - - if child == paned.get_children()[0]: - paned.remove(child) - paned.pack1(child, tbutton.get_active(), 0) - else: - paned.remove(child) - paned.pack2(child, tbutton.get_active(), 0) - - def on_shrink_toggled(self, tbutton, child): - paned = child.parent - - if child == paned.get_children()[0]: - paned.remove(child) - paned.pack1(child, 0, tbutton.get_active()) - else: - paned.remove(child) - paned.pack2(child, 0, tbutton.get_active()) - - def __create_pane_options(self, paned, frame_label, label1, label2): - frame = gtk.Frame(frame_label) - frame.set_border_width(4) - - table = gtk.Table(3, 2, True) - frame.add(table) - - label = gtk.Label(label1) - table.attach(label, 0, 1, 0, 1) - - check_button = gtk.CheckButton("_Resize") - check_button.connect('toggled', self.on_resize_toggled, paned.get_children()[0]) - table.attach(check_button, 0, 1, 1, 2) - - check_button = gtk.CheckButton("_Shrink") - check_button.set_active(True) - check_button.connect('toggled', self.on_shrink_toggled, paned.get_children()[0]) - table.attach(check_button, 0, 1, 2, 3) - - label = gtk.Label(label2) - table.attach(label, 1, 2, 0, 1) - - check_button = gtk.CheckButton("_Resize") - check_button.set_active(True) - check_button.connect('toggled', self.on_resize_toggled, paned.get_children()[1]) - table.attach(check_button, 1, 2, 1, 2) - - check_button = gtk.CheckButton("_Shrink") - check_button.set_active(True) - check_button.connect('toggled', self.on_shrink_toggled, paned.get_children()[1]) - table.attach(check_button, 1, 2, 2, 3) - - return frame - -def main(): - PanedWidgetsDemo() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/pygtk-demo/demos/pixbufs.py b/examples/pygtk-demo/demos/pixbufs.py deleted file mode 100644 index c29d1dd8..00000000 --- a/examples/pygtk-demo/demos/pixbufs.py +++ /dev/null @@ -1,200 +0,0 @@ -#!/usr/bin/env python -'''Pixbufs - -A GdkPixbuf represents an image, normally in RGB or RGBA format. -Pixbufs are normally used to load files from disk and perform image scaling. -This demo is not all that educational, but looks cool. It was written by -Extreme Pixbuf Hacker Federico Mena Quintero. It also shows off how to use -GtkDrawingArea to do a simple animation. -Look at the Image demo for additional pixbuf usage examples.''' -# pygtk version: Maik Hertha - -import os -import math -import gobject -import gtk - -FRAME_DELAY = 50 -CYCLE_LEN = 60 -IMAGE_DIR = os.path.join(os.path.dirname(__file__), 'images') -BACKGROUND_NAME = "background.jpg" - -image_names = [ - "apple-red.png", - "gnome-applets.png", - "gnome-calendar.png", - "gnome-foot.png", - "gnome-gmush.png", - "gnome-gimp.png", - "gnome-gsame.png", - "gnu-keys.png" -] - -class PixbufsDemo(gtk.Window): - frame = None # frame of the background image - background = None # background-pixbuf - images = [] # list of pixbufs - back_width = 0 # width of background image - back_height = 0 # height of background image - timeout_id = 0 # timeout id - frame_num = 0 # number of the current frame - timeout_id = None - - def __init__(self, parent=None): - gtk.Window.__init__(self) - try: - self.set_screen(parent.get_screen()) - except AttributeError: - self.connect("destroy", lambda *w: gtk.main_quit()) - self.connect("destroy", self.cleanup_callback) - self.set_title(self.__class__.__name__) - self.set_resizable(False) - - if not self.load_pixbufs(): - dialog = gtk.MessageDialog(self, - gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_ERROR, - gtk.BUTTONS_CLOSE, - "Failed to load an image") - dialog.connect("response", lambda d, r: d.destroy()) - dialog.show() - - else: - self.set_size_request(self.back_width, self.back_height) - - self.frame = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, 8, - self.back_width, self.back_height) - - da = gtk.DrawingArea() - da.connect("expose_event", self.expose_cb) - self.add(da) - - self.timeout_id = gtk.timeout_add(FRAME_DELAY, self.timeout) - - self.show_all() - - def load_pixbufs(self): - ''' Loads the images for the demo and returns whether the - operation succeeded. - ''' - if self.background is not None: - return True # already loaded earlier - - # look in the the current directory where the file is installed - try: - self.background = gtk.gdk.pixbuf_new_from_file( - os.path.join(IMAGE_DIR, BACKGROUND_NAME)) - except gobject.GError, error: - return False - - self.back_width = self.background.get_width() - self.back_height = self.background.get_height() - - for filename in image_names: - try: - self.images.append(gtk.gdk.pixbuf_new_from_file( - os.path.join(IMAGE_DIR, filename))) - except gobject.GError, error: - return False - - return True - - def expose_cb(self, draw_area, event): - ''' Expose callback for the drawing area. ''' - rowstride = self.frame.get_rowstride() - - # FIXME: what should be the result, string guchar an integer result? - #pixels = frame.get_pixels() + rowstride * event.area.y + event.area.x * 3 - #pixels = frame.get_pixels()[len(frame.get_pixels()) + rowstride * event.area.y + event.area.x * 3] - pixels = self.frame.get_pixels() - - draw_area.window.draw_rgb_image( - draw_area.style.black_gc, - event.area.x, event.area.y, - event.area.width, event.area.height, - 'normal', - pixels, rowstride, - event.area.x, event.area.y) - - return True - - def cleanup_callback(self, win): - if self.timeout_id is not None: - gtk.timeout_remove(self.timeout_id) - self.timeout_id = None - - def timeout(self): - ''' Timeout handler to regenerate the frame. ''' - self.background.copy_area(0, 0, self.back_width, self.back_height, - self.frame, 0, 0) - - f = float(self.frame_num % CYCLE_LEN) / float(CYCLE_LEN) - - xmid = self.back_width / 2.0 - ymid = self.back_height / 2.0 - - radius = min(xmid, ymid) / 2.0 - - N_IMAGES = len(image_names) - for i_name in image_names: - i = image_names.index(i_name) - - ang = 2.0 * math.pi * i / N_IMAGES - f * 2.0 * math.pi - - iw = self.images[i].get_width() - ih = self.images[i].get_height() - - r = radius +(radius / 3.0) * math.sin(f * 2.0 * math.pi) - - xpos = math.floor(xmid + r * math.cos(ang) - iw / 2.0 + 0.5) - ypos = math.floor(ymid + r * math.sin(ang) - ih / 2.0 + 0.5) - - if i % 2 == 0: - k = math.cos(f * 2.0 * math.pi) - else: - k = math.sin(f * 2.0 * math.pi) - k = 2.0 * k * k - k = max(0.25, k) - - # satisfy the c-source - r1 = gtk.gdk.Rectangle() - r1.x = int(xpos) - r1.y = int(ypos) - r1.width = iw * k - r1.height = ih * k - - r2 = gtk.gdk.Rectangle() - r2.x = 0 - r2.y = 0 - r2.width = self.back_width - r2.height = self.back_height - - dest = r1.intersect(r2) - if dest is not None: - if i % 2 == 0: - alpha = int( - max(127, math.fabs(255 * math.cos(f * 2.0 * math.pi)))) - else: - alpha = int( - max(127, math.fabs(255 * math.sin(f * 2.0 * math.pi)))) - self.images[i].composite( - self.frame, - dest.x, dest.y, - dest.width, dest.height, - xpos, ypos, - k, k, - gtk.gdk.INTERP_NEAREST, - alpha) - - if self is not None: - self.queue_draw() - - self.frame_num += 1 - return True - -def main(): - PixbufsDemo() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/pygtk-demo/demos/print_editor.py b/examples/pygtk-demo/demos/print_editor.py deleted file mode 100644 index 7b7ae106..00000000 --- a/examples/pygtk-demo/demos/print_editor.py +++ /dev/null @@ -1,450 +0,0 @@ -"""Print Editor - -A small demo editor with printing support""" - -import sys -import gobject -import pango -import gtk - -main_window = None -filename = None -page_setup = None -settings = None -file_changed = False -buffer = None -statusbar = None -active_prints = [] - -def update_title(): - if filename is None: - basename = "Untitled" - else: - basename = os.path.basename(filename) - main_window.set_title("Simple Editor with printing - %s" % basename) - -def update_statusbar(): - statusbar.pop(0) - - iter = buffer.get_iter_at_mark(buffer.get_insert()) - - row = iter.get_line() - col = iter.get_line_offset() - - print_str = ""; - if active_prints: - op = active_prints[0] - print_str = op.get_status_string() - - msg = "%d, %d%s %s" % (row, col, (file_changed and " - Modified" or ""), - print_str) - - statusbar.push(0, msg) - -def update_ui(): - update_title() - update_statusbar() - -def get_text(): - start, end = buffer.get_bounds() - return buffer.get_text(start, end, False) - -def set_text(text): - buffer.set_text(text) - global file_changed - file_changed = False - update_ui() - - -def do_new(action): - global filename - filename = None - set_text("") - - -def load_file(open_filename): - error_dialog = None - try: - contents = file(open_filename).read() - except IOError, ex: - error_dialog = gtk.MessageDialog(main_window, - gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_ERROR, - gtk.BUTTONS_CLOSE, - "Error loading file %s:\n%s" % - (open_filename, - str(ex))) - else: - try: - contents = contents.decode("utf-8") - except UnicodeDecodeError: - error_dialog = gtk.MessageDialog(main_window, - gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_ERROR, - gtk.BUTTONS_CLOSE, - "Error loading file %s:\n%s" % - (open_filename, - "Not valid utf8")) - else: - set_text(contents) - if error_dialog is not None: - error_dialog.connect("response", gtk.Widget.destroy) - error_dialog.show() - - -def do_open(action): - dialog = gtk.FileChooserDialog("Select file", - main_window, - gtk.FILE_CHOOSER_ACTION_OPEN, - (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, - gtk.STOCK_OPEN, gtk.RESPONSE_OK)) - dialog.set_default_response(gtk.RESPONSE_OK) - response = dialog.run() - if response == gtk.RESPONSE_OK: - open_filename = dialog.get_filename() - load_file(open_filename) - dialog.destroy() - - -def save_file(save_filename): - global filename - text = get_text() - error_dialog = None - - try: - file(save_filename, "w").write(text) - except IOError, ex: - error_dialog = gtk.MessageDialog(main_window, - gtk.DIALOG_DESTROY_WITH_PARENT, - gtk.MESSAGE_ERROR, - gtk.BUTTONS_CLOSE, - "Error saving to file %s:\n%s" % - (open_filename, - str(ex))) - error_dialog.connect("response", gtk.Widget.destroy) - error_dialog.show() - else: - if save_filename != filename: - filename = save_filename - file_changed = False - update_ui() - - -def do_save_as(action): - dialog = gtk.FileChooserDialog("Select file", - main_window, - (gtk.FILE_CHOOSER_ACTION_SAVE, - gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, - gtk.STOCK_SAVE, gtk.RESPONSE_OK)) - dialog.set_default_response(gtk.RESPONSE_OK) - response = dialog.run() - - if response == gtk.RESPONSE_OK: - save_filename = dialog.get_filename() - save_file(save_filename) - - dialog.destroy() - -def do_save(action): - if filename is None: - do_save_as(action) - else: - save_file(filename) - -class PrintData: - text = None - layout = None - page_breaks = None - - -def begin_print(operation, context, print_data): - width = context.get_width() - height = context.get_height() - print_data.layout = context.create_pango_layout() - print_data.layout.set_font_description(pango.FontDescription("Sans 12")) - print_data.layout.set_width(int(width*pango.SCALE)) - print_data.layout.set_text(print_data.text) - - num_lines = print_data.layout.get_line_count() - - page_breaks = [] - page_height = 0 - - for line in xrange(num_lines): - layout_line = print_data.layout.get_line(line) - ink_rect, logical_rect = layout_line.get_extents() - lx, ly, lwidth, lheight = logical_rect - line_height = lheight / 1024.0 - if page_height + line_height > height: - page_breaks.append(line) - page_height = 0 - page_height += line_height - - operation.set_n_pages(len(page_breaks) + 1) - print_data.page_breaks = page_breaks - - -def draw_page(operation, context, page_nr, print_data): - assert isinstance(print_data.page_breaks, list) - if page_nr == 0: - start = 0 - else: - start = print_data.page_breaks[page_nr - 1] - - try: - end = print_data.page_breaks[page_nr] - except IndexError: - end = print_data.layout.get_line_count() - - cr = context.get_cairo_context() - - cr.set_source_rgb(0, 0, 0) - - i = 0 - start_pos = 0 - iter = print_data.layout.get_iter() - while 1: - if i >= start: - line = iter.get_line() - _, logical_rect = iter.get_line_extents() - lx, ly, lwidth, lheight = logical_rect - baseline = iter.get_baseline() - if i == start: - start_pos = ly / 1024.0; - cr.move_to(lx / 1024.0, baseline / 1024.0 - start_pos) - cr.show_layout_line(line) - i += 1 - if not (i < end and iter.next_line()): - break - - -def do_page_setup(action): - global settings, page_setup - if settings is None: - settings = gtk.PrintSettings() - page_setup = gtk.print_run_page_setup_dialog(main_window, - page_setup, settings) - - -def status_changed_cb(op): - if op.is_finished(): - active_prints.remove(op) - update_statusbar() - - -def do_print(action): - global settings, page_setup - print_data = PrintData() - print_data.text = get_text() - print_ = gtk.PrintOperation() - if settings is not None: - print_.set_print_settings(settings) - - if page_setup is not None: - print_.set_default_page_setup(page_setup) - - print_.connect("begin_print", begin_print, print_data) - print_.connect("draw_page", draw_page, print_data) - - try: - res = print_.run(gtk.PRINT_OPERATION_ACTION_PRINT_DIALOG, main_window) - except gobject.GError, ex: - error_dialog = gtk.MessageDialog(main_window, - gtk.DIALOG_DESTROY_WITH_PARENT, - gtk._MESSAGE_ERROR, - gtk.BUTTONS_CLOSE, - ("Error printing file:\n%s" % str(ex))) - error_dialog.connect("response", gtk.Widget.destroy) - error_dialog.show() - else: - if res == gtk.PRINT_OPERATION_RESULT_APPLY: - settings = print_.get_print_settings() - - if not print_.is_finished(): - active_prints.remove(print_) - update_statusbar() - - print_.connect("status_changed", status_changed_cb) - - -def do_about(action): - authors = [ - "Alexander Larsson (C version)", - "Gustavo Carneiro (Python translation)", - ] - about = gobject.new(gtk.AboutDialog, name="print test editor", - version="0.1", copyright="(C) Red Hat, Inc", - comments="Program to demonstrate GTK+ printing.", - authors=authors) - about.set_transient_for(main_window) - about.show() - - -def do_quit(action): - if __name__ == '__main__': - gtk.main_quit() - -entries = [ - ( "FileMenu", None, "_File" ), # name, stock id, label - ( "HelpMenu", None, "_Help" ), # name, stock id, label - ( "New", gtk.STOCK_NEW, # name, stock id - "_New", "N", # label, accelerator - "Create a new file", # tooltip - do_new ), - ( "Open", gtk.STOCK_OPEN, # name, stock id - "_Open","O", # label, accelerator - "Open a file", # tooltip - do_open ), - ( "Save", gtk.STOCK_SAVE, # name, stock id - "_Save","S", # label, accelerator - "Save current file", # tooltip - do_save ), - ( "SaveAs", gtk.STOCK_SAVE, # name, stock id - "Save _As...", None, # label, accelerator - "Save to a file", # tooltip - do_save_as ), - ( "Quit", gtk.STOCK_QUIT, # name, stock id - "_Quit", "Q", # label, accelerator - "Quit", # tooltip - do_quit ), - ( "About", None, # name, stock id - "_About", "A", # label, accelerator - "About", # tooltip - do_about ), - ( "PageSetup", None, # name, stock id - "Page _Setup", None, # label, accelerator - "Set up the page", # tooltip - do_page_setup ), - ( "Print", gtk.STOCK_PRINT, # name, stock id - None, None, # label, accelerator - "Print the document", # tooltip - do_print ), -] - -ui_info =""" - - - - - - - - - - - - - - - - - -""" - -def buffer_changed_callback(buffer): - global file_changed - file_changed = True - update_statusbar() - - -def mark_set_callback(buffer, new_location, mark): - update_statusbar() - -def update_resize_grip(widget, event, statusbar): - if event.changed_mask & (gtk.gdk.WINDOW_STATE_MAXIMIZED | - gtk.gdk.WINDOW_STATE_FULLSCREEN): - maximized = event.new_window_state & (gtk.gdk.WINDOW_STATE_MAXIMIZED | - gtk.gdk.WINDOW_STATE_FULLSCREEN) - statusbar.set_has_resize_grip(not maximized) - - -def create_window(): - global main_window, statusbar, buffer - main_window = gtk.Window() - main_window.set_default_size(400, 600) - if __name__ == '__main__': - main_window.connect("delete-event", gtk.main_quit) - actions = gtk.ActionGroup("Actions") - actions.add_actions(entries) - - ui = gtk.UIManager() - ui.insert_action_group(actions, 0) - main_window.add_accel_group(ui.get_accel_group()) - main_window.set_border_width(0) - - ui.add_ui_from_string(ui_info) - - table = gtk.Table(1, 3, False) - main_window.add(table) - - bar = ui.get_widget("/MenuBar") - bar.show() - table.attach(bar, - # /* X direction */ /* Y direction */ - 0, 1, 0, 1, - gtk.EXPAND | gtk.FILL, 0, - 0, 0) - - ## Create document - sw = gtk.ScrolledWindow() - sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - sw.set_shadow_type(gtk.SHADOW_IN) - table.attach(sw, - # /* X direction */ /* Y direction */ - 0, 1, 1, 2, - gtk.EXPAND | gtk.FILL, gtk.EXPAND | gtk.FILL, - 0, 0) - - contents = gtk.TextView() - contents.grab_focus() - sw.add(contents) - - ## Create statusbar - - statusbar = gtk.Statusbar() - table.attach(statusbar, - #/* X direction */ /* Y direction */ - 0, 1, 2, 3, - gtk.EXPAND | gtk.FILL, 0, - 0, 0); - - ## Show text widget info in the statusbar */ - buffer = contents.get_buffer() - - buffer.connect_object("changed", - buffer_changed_callback, - None) - - buffer.connect_object("mark_set", # cursor moved - mark_set_callback, - None) - - main_window.connect_object("window_state_event", - update_resize_grip, - statusbar, - 0) - - update_ui() - - main_window.show_all() - - -def main(argv): - create_window() - - try: - fname = argv[1] - except IndexError: - pass - else: - load_file(fname) - - gtk.main() - -def PrintEditorDemo(win): - create_window() - main_window.set_transient_for(win) - return main_window - -if __name__ == '__main__': - sys.exit(main(sys.argv)) diff --git a/examples/pygtk-demo/demos/sizegroup.py b/examples/pygtk-demo/demos/sizegroup.py deleted file mode 100644 index a780390e..00000000 --- a/examples/pygtk-demo/demos/sizegroup.py +++ /dev/null @@ -1,108 +0,0 @@ -#!/usr/bin/env python -"""Size Group - -GtkSizeGroup provides a mechanism for grouping a number of widgets together so -they all request the same amount of space. This is typically useful when you -want a column of widgets to have the same size, but you can't use a GtkTable -widget. - -Note that size groups only affect the amount of space requested, not the size -that the widgets finally receive. If you want the widgets in a GtkSizeGroup to -actually be the same size, you need to pack them in such a way that they get -the size they request and not more. For example, if you are packing your -widgets into a table, you would not include the GTK_FILL flag.""" - -import gtk - -class SizeGroupDemo(gtk.Dialog): - def __init__(self, parent=None): - gtk.Dialog.__init__(self, "Size Groups", parent, - 0, - (gtk.STOCK_CLOSE, gtk.RESPONSE_CLOSE)) - try: - self.set_screen(parent.get_screen()) - except AttributeError: - self.connect('destroy', lambda *w: gtk.main_quit()) - self.connect('response', lambda d, r: d.destroy()) - self.set_resizable(False) - - vbox = gtk.VBox(False, 5) - self.vbox.pack_start(vbox, True, True, 0) - vbox.set_border_width(5) - - self.size_group = gtk.SizeGroup(gtk.SIZE_GROUP_HORIZONTAL) - - # Create one frame holding color options - frame = gtk.Frame("Color options") - vbox.pack_start(frame, True, True, 0) - - table = gtk.Table(2, 2, False) - table.set_border_width(5) - table.set_row_spacings(5) - table.set_col_spacings(10) - frame.add(table) - - color_options = ("Red", "Green", "Blue") - self.__add_row(table, 0, "_Foreground", color_options) - self.__add_row(table, 1, "_Background", color_options) - - # And another frame holding line style options - frame = gtk.Frame("Line options") - vbox.pack_start(frame, False, False, 0) - - table = gtk.Table(2, 2, False) - table.set_border_width(5) - table.set_row_spacings(5) - table.set_col_spacings(10) - frame.add(table) - - dash_options = ("Solid", "Dashed", "Dotted") - end_options = ("Square", "Round", "Arrow") - self.__add_row(table, 0, "_Dashing", dash_options) - self.__add_row(table, 1, "_Line ends", end_options) - - # And a check button to turn grouping on and off - - check_button = gtk.CheckButton("_Enable grouping") - vbox.pack_start(check_button, False, False, 0) - check_button.set_active(True) - check_button.connect('toggled', self.on_toggle_grouping) - - self.show_all() - - def __create_option_menu(self, options): - - option_menu = gtk.combo_box_new_text() - for opt in options: - option_menu.append_text(opt) - - option_menu.set_active(0) - return option_menu - - def __add_row(self, table, row, label_text, options): - label = gtk.Label(label_text) - label.set_use_underline(True) - label.set_alignment(0, 1) - table.attach(label, 0, 1, row, row + 1, gtk.EXPAND | gtk.FILL, 0, 0, 0) - - option_menu = self.__create_option_menu(options) - label.set_mnemonic_widget(option_menu) - self.size_group.add_widget(option_menu) - table.attach(option_menu, 1, 2, row, row + 1, 0, 0, 0, 0) - - def on_toggle_grouping(self, check_button): - - # gtk.SIZE_GROUP_NONE is not generally useful, but is useful - # here to show the effect of gtk.SIZE_GROUP_HORIZONTAL by - # contrast. - if check_button.get_active(): - self.size_group.set_mode(gtk.SIZE_GROUP_HORIZONTAL) - else: - self.size_group.set_mode(gtk.SIZE_GROUP_NONE) - -def main(): - SizeGroupDemo() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/pygtk-demo/demos/statusicon.py b/examples/pygtk-demo/demos/statusicon.py deleted file mode 100644 index 53564a81..00000000 --- a/examples/pygtk-demo/demos/statusicon.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python -'''Status Icon - -This is a simple example that shows how to create a status icon that -will appear in the "notification area" in GNOME/KDE, or "system tray" -in Windows. -''' -## Author: Nikos Kouremenos - -import gtk - - -def make_menu(event_button, event_time, icon): - menu = gtk.Menu() - item = gtk.MenuItem('hi') - item.show() - menu.append(item) - menu.popup(None, None, - gtk.status_icon_position_menu, event_button, - event_time, icon) - -def on_right_click(icon, event_button, event_time): - make_menu(event_button, event_time, icon) - -def StatusIconDemo(parent=None): - icon = gtk.status_icon_new_from_stock(gtk.STOCK_QUIT) - icon.connect('popup-menu', on_right_click) - -if __name__ == '__main__': - StatusIconDemo() - gtk.main() diff --git a/examples/pygtk-demo/demos/stock_browser.py b/examples/pygtk-demo/demos/stock_browser.py deleted file mode 100644 index 1689230f..00000000 --- a/examples/pygtk-demo/demos/stock_browser.py +++ /dev/null @@ -1,270 +0,0 @@ -#!/usr/bin/env python -'''Stock Item and Icon Browser - -This source code for this demo doesn't demonstrate anything particularly -useful in applications. The purpose of the "demo" is just to provide a -handy place to browse the available stock icons and stock items. -''' -# pygtk version: Maik Hertha - -import gobject -import gtk -import re - -def id_to_macro(stock_id): - if stock_id == '': - return '' - if stock_id.startswith('gtk'): - # gtk-foo-bar -> gtk.STOCK_FOO_BAR - macro = 'gtk.STOCK' + \ - re.sub('-([^-]+)', lambda m:('_' + m.group(1).upper()), stock_id[3:]) - - else: - # demo-gtk-logo -> DEMO_GTK_LOGO as with custom icon-factories - macro = re.sub('([^-]+)-?', lambda m:('_' + m.group(1).upper()), stock_id) - macro = macro[1:] # there is a leading '_' always - - return macro - - -class StockItemInfo(object): - def __init__(self, stock_id=''): - self.stock_id = stock_id - self.stock_item = None - self.small_icon = None - self.macro = id_to_macro(stock_id) - self.accel_str = '' - -class StockItemDisplay(object): - def __init__(self): - self.type_label = None - self.macro_label = None - self.id_label = None - self.label_accel_label = None - self.icon_image = None - - -def get_largest_size(stockid): - ''' Finds the largest size at which the given image stock id is - available. This would not be useful for a normal application. - ''' - set = gtk.icon_factory_lookup_default(stockid) - best_size = gtk.ICON_SIZE_INVALID - best_pixels = 0 - - sizes = set.get_sizes() - n_sizes = len(sizes) - - i = 0 - while(i < n_sizes): - width, height = gtk.icon_size_lookup(sizes[i]) - - if(width * height > best_pixels): - best_size = sizes[i] - best_pixels = width * height - - i += 1 - - return best_size - - -def macro_set_func_text(tree_column, cell, model, iter): - info = model.get_value(iter, 0) - cell.set_property("text", info.macro) - -def id_set_func(tree_column, cell, model, iter): - info = model.get_value(iter, 0) - cell.set_property("text", info.stock_id) - -def accel_set_func(tree_column, cell, model, iter): - info = model.get_value(iter, 0) - cell.set_property("text", info.accel_str) - -def label_set_func(tree_column, cell, model, iter): - info = model.get_value(iter, 0) - cell.set_property("text", info.stock_item[1]) - - -class StockItemAndIconBrowserDemo(gtk.Window): - def __init__(self, parent=None): - gtk.Window.__init__(self) - try: - self.set_screen(parent.get_screen()) - except AttributeError: - self.connect('destroy', lambda *w: gtk.main_quit()) - - self.set_title(self.__class__.__name__) - self.set_default_size(-1, 500) - self.set_border_width(8) - - hbox = gtk.HBox(False, 8) - self.add(hbox) - - sw = gtk.ScrolledWindow() - sw.set_shadow_type(gtk.SHADOW_ETCHED_IN) - sw.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) - hbox.pack_start(sw, False, False, 0) - - model = self.__create_model() - treeview = gtk.TreeView(model) - sw.add(treeview) - - column = gtk.TreeViewColumn() - column.set_title("Macro") - - cell_renderer = gtk.CellRendererPixbuf() - column.pack_start(cell_renderer, False) - column.set_attributes(cell_renderer, stock_id=1) - - cell_renderer = gtk.CellRendererText() - column.pack_start(cell_renderer, True) - column.set_cell_data_func(cell_renderer, macro_set_func_text) - - treeview.append_column(column) - - cell_renderer = gtk.CellRendererText() - treeview.insert_column_with_data_func(-1, "Label", cell_renderer, label_set_func) - - cell_renderer = gtk.CellRendererText() - treeview.insert_column_with_data_func(-1, "Accel", cell_renderer, accel_set_func) - - cell_renderer = gtk.CellRendererText() - treeview.insert_column_with_data_func(-1, "ID", cell_renderer, id_set_func) - - align = gtk.Alignment(0.5, 0.0, 0.0, 0.0) - hbox.pack_end(align, False, False, 0) - - frame = gtk.Frame("Selected Item") - align.add(frame) - - vbox = gtk.VBox(False, 8) - vbox.set_border_width(4) - frame.add(vbox) - - display = StockItemDisplay() - treeview.set_data("stock-display", display) - - display.type_label = gtk.Label() - display.macro_label = gtk.Label() - display.id_label = gtk.Label() - display.label_accel_label = gtk.Label() - display.icon_image = gtk.Image(); # empty image - - vbox.pack_start(display.type_label, False, False, 0) - vbox.pack_start(display.icon_image, False, False, 0) - vbox.pack_start(display.label_accel_label, False, False, 0) - vbox.pack_start(display.macro_label, False, False, 0) - vbox.pack_start(display.id_label, False, False, 0) - - selection = treeview.get_selection() - selection.set_mode(gtk.SELECTION_SINGLE) - - selection.connect("changed", self.on_selection_changed) - - self.show_all() - - def __create_model(self): - store = gtk.ListStore( - gobject.TYPE_PYOBJECT, - gobject.TYPE_STRING) - - ids = gtk.stock_list_ids() - ids.sort() - - for data in ids: - info = StockItemInfo(stock_id=data) - stock_item = gtk.stock_lookup(data) - - if stock_item: - info.stock_item = stock_item - else: - # stock_id, label, modifier, keyval, translation_domain - info.stock_item =('', '', 0, 0, '') - - # only show icons for stock IDs that have default icons - icon_set = gtk.icon_factory_lookup_default(info.stock_id) - if icon_set is None: - info.small_icon = None - else: - # See what sizes this stock icon really exists at - sizes = icon_set.get_sizes() - n_sizes = len(sizes) - - # Use menu size if it exists, otherwise first size found - size = sizes[0]; - i = 0; - while(i < n_sizes): - if(sizes[i] == gtk.ICON_SIZE_MENU): - size = gtk.ICON_SIZE_MENU - break - i += 1 - - info.small_icon = self.render_icon(info.stock_id, size) - - if(size != gtk.ICON_SIZE_MENU): - # Make the result the proper size for our thumbnail - w, h = gtk.icon_size_lookup(gtk.ICON_SIZE_MENU) - - scaled = info.small_icon.scale_simple(w, h, 'bilinear') - info.small_icon = scaled - - if info.stock_item[3] == 0: - info.accel_str = "" - else: - info.accel_str = \ - gtk.accelerator_name(info.stock_item[3], info.stock_item[2]) - - iter = store.append() - store.set(iter, 0, info, 1, info.stock_id) - - return store - - def on_selection_changed(self, selection): - treeview = selection.get_tree_view() - display = treeview.get_data("stock-display") - - model, iter = selection.get_selected() - if iter: - info = model.get_value(iter, 0) - - if(info.small_icon and info.stock_item[1]): - display.type_label.set_text("Icon and Item") - - elif(info.small_icon): - display.type_label.set_text("Icon Only") - - elif(info.stock_item[1]): - display.type_label.set_text("Item Only") - - else: - display.type_label.set_text("???????") - - display.macro_label.set_text(info.macro) - display.id_label.set_text(info.stock_id) - - if(info.stock_item[1]): - s = "%s %s" % (info.stock_item[1], info.accel_str) - display.label_accel_label.set_text_with_mnemonic(s) - - else: - display.label_accel_label.set_text("") - - if(info.small_icon): - display.icon_image.set_from_stock(info.stock_id, - get_largest_size(info.stock_id)) - else: - display.icon_image.set_from_pixbuf(None) - - else: - display.type_label.set_text("No selected item") - display.macro_label.set_text("") - display.id_label.set_text("") - display.label_accel_label.set_text("") - display.icon_image.set_from_pixbuf(None) - -def main(): - StockItemAndIconBrowserDemo() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/pygtk-demo/demos/textview.py b/examples/pygtk-demo/demos/textview.py deleted file mode 100644 index 44166616..00000000 --- a/examples/pygtk-demo/demos/textview.py +++ /dev/null @@ -1,498 +0,0 @@ -#!/usr/bin/env python -"""Text Widget/TextView - -The GtkTextView widget displays a GtkTextBuffer. One GtkTextBuffer can be displayed -by multiple GtkTextViews. This demo has two views displaying a single buffer, and -shows off the widget's text formatting features.""" -# pygtk version: Maik Hertha - -import os -import sys - -import gobject -import gtk - -gray50_width = 2 -gray50_height = 2 -gray50_bits = '\x02\x01' -GTKLOGO_IMAGE = os.path.join(os.path.dirname(__file__), - 'images', 'gtk-logo-rgb.gif') -FLOPPYBUDDY_IMAGE = os.path.join(os.path.dirname(__file__), - 'images', 'floppybuddy.gif') - -class TextViewDemo(gtk.Window): - def __init__(self, parent=None): - # Create the toplevel window - gtk.Window.__init__(self) - try: - self.set_screen(parent.get_screen()) - except AttributeError: - self.connect('destroy', lambda *w: gtk.main_quit()) - - self.set_title(self.__class__.__name__) - self.set_default_size(450, 450) - self.set_border_width(0) - - vpaned = gtk.VPaned() - vpaned.set_border_width(5) - self.add(vpaned) - - # For convenience, we just use the autocreated buffer from - # the first text view; you could also create the buffer - # by itself with gtk.text_buffer_new(), then later create - # a view widget. - - view1 = gtk.TextView(); - buffer_1 = view1.get_buffer() - view2 = gtk.TextView(buffer_1) - - sw = gtk.ScrolledWindow() - sw.set_shadow_type(gtk.SHADOW_ETCHED_IN) - sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - - vpaned.add1(sw) - - sw.add(view1) - - sw = gtk.ScrolledWindow() - sw.set_shadow_type(gtk.SHADOW_ETCHED_IN) - sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - - vpaned.add2(sw) - - sw.add(view2) - - self.create_tags(buffer_1) - self.insert_text(buffer_1) - - self.attach_widgets(view1) - self.attach_widgets(view2) - self.win = None - self.show_all() - - def create_tags(self, text_buffer): - ''' - Create a bunch of tags. Note that it's also possible to - create tags with gtk.text_tag_new() then add them to the - tag table for the buffer, text_buffer.create_tag() is - just a convenience function. Also note that you don't have - to give tags a name; pass None for the name to create an - anonymous tag. - - In any real app, another useful optimization would be to create - a GtkTextTagTable in advance, and reuse the same tag table for - all the buffers with the same tag set, instead of creating - new copies of the same tags for every buffer. - - Tags are assigned default priorities in order of addition to the - tag table. That is, tags created later that affect the same text - property affected by an earlier tag will override the earlier - tag. You can modify tag priorities with - gtk.text_tag_set_priority(). - ''' - - import pango - text_buffer.create_tag("heading", - weight=pango.WEIGHT_BOLD, - size=15 * pango.SCALE) - - text_buffer.create_tag("italic", style=pango.STYLE_ITALIC) - - text_buffer.create_tag("bold", weight=pango.WEIGHT_BOLD) - - # points times the pango.SCALE factor - text_buffer.create_tag("big", size=20 * pango.SCALE) - - text_buffer.create_tag("xx-small", scale=pango.SCALE_XX_SMALL) - - text_buffer.create_tag("x-large", scale=pango.SCALE_X_LARGE) - - text_buffer.create_tag("monospace", family="monospace") - - text_buffer.create_tag("blue_foreground", foreground="blue") - - text_buffer.create_tag("red_background", background="red") - - stipple = gtk.gdk.bitmap_create_from_data(None, - gray50_bits, gray50_width, gray50_height) - - text_buffer.create_tag("background_stipple", background_stipple=stipple) - - text_buffer.create_tag("foreground_stipple", foreground_stipple=stipple) - - text_buffer.create_tag("big_gap_before_line", pixels_above_lines=30) - - text_buffer.create_tag("big_gap_after_line", pixels_below_lines=30) - - text_buffer.create_tag("double_spaced_line", pixels_inside_wrap=10) - - text_buffer.create_tag("not_editable", editable=False) - - text_buffer.create_tag("word_wrap", wrap_mode=gtk.WRAP_WORD) - - text_buffer.create_tag("char_wrap", wrap_mode=gtk.WRAP_CHAR) - - text_buffer.create_tag("no_wrap", wrap_mode=gtk.WRAP_NONE) - - text_buffer.create_tag("center", justification=gtk.JUSTIFY_CENTER) - - text_buffer.create_tag("right_justify", justification=gtk.JUSTIFY_RIGHT) - - text_buffer.create_tag("wide_margins", - left_margin=50, right_margin=50) - - text_buffer.create_tag("strikethrough", strikethrough=True) - - text_buffer.create_tag("underline", - underline=pango.UNDERLINE_SINGLE) - - text_buffer.create_tag("double_underline", - underline=pango.UNDERLINE_DOUBLE) - - text_buffer.create_tag("superscript", - rise=10 * pango.SCALE, # 10 pixels - size=8 * pango.SCALE) # 8 points - - text_buffer.create_tag("subscript", - rise=-10 * pango.SCALE, # 10 pixels - size=8 * pango.SCALE) # 8 points - - text_buffer.create_tag("rtl_quote", - wrap_mode=gtk.WRAP_WORD, direction=gtk.TEXT_DIR_RTL, - indent=30, left_margin=20, right_margin=20) - - def insert_text(self, text_buffer): - # use the current directory for the file - try: - pixbuf = gtk.gdk.pixbuf_new_from_file(GTKLOGO_IMAGE) - except gobject.GError, error: - sys.exit("Failed to load image file gtk-logo-rgb.gif\n") - - scaled = pixbuf.scale_simple(32, 32, 'bilinear') - pixbuf = scaled - - # get start of buffer; each insertion will revalidate the - # iterator to point to just after the inserted text. - iter = text_buffer.get_iter_at_offset(0) - - text_buffer.insert(iter, "The text widget can display text with " - "all kinds of nifty attributes. It also supports multiple views " - "of the same buffer; this demo is showing the same buffer in " - "two places.\n\n") - - text_buffer.insert_with_tags_by_name(iter, "Font styles. ", "heading") - - text_buffer.insert(iter, "For example, you can have ") - text_buffer.insert_with_tags_by_name(iter, - "italic", "italic") - text_buffer.insert(iter, ", "); - text_buffer.insert_with_tags_by_name(iter, - "bold", "bold") - text_buffer.insert(iter, ", or ", -1) - text_buffer.insert_with_tags_by_name(iter, - "monospace(typewriter)", "monospace") - text_buffer.insert(iter, ", or ") - text_buffer.insert_with_tags_by_name(iter, - "big", "big") - text_buffer.insert(iter, " text. ") - text_buffer.insert(iter, "It's best not to hardcode specific text " - "sizes; you can use relative sizes as with CSS, such as ") - text_buffer.insert_with_tags_by_name(iter, - "xx-small", "xx-small") - text_buffer.insert(iter, " or ") - text_buffer.insert_with_tags_by_name(iter, - "x-large", "x-large") - text_buffer.insert(iter, " to ensure that your program properly " - "adapts if the user changes the default font size.\n\n") - - text_buffer.insert_with_tags_by_name(iter, "Colors. ", "heading") - - text_buffer.insert(iter, "Colors such as "); - text_buffer.insert_with_tags_by_name(iter, - "a blue foreground", "blue_foreground") - text_buffer.insert(iter, " or "); - text_buffer.insert_with_tags_by_name(iter, - "a red background", - "red_background") - text_buffer.insert(iter, " or even ", -1); - text_buffer.insert_with_tags_by_name(iter, - "a stippled red background", - "red_background", - "background_stipple") - - text_buffer.insert(iter, " or ", -1); - text_buffer.insert_with_tags_by_name(iter, - "a stippled blue foreground on solid red background", - "blue_foreground", - "red_background", - "foreground_stipple") - text_buffer.insert(iter, "(select that to read it) can be used.\n\n", -1); - - text_buffer.insert_with_tags_by_name(iter, - "Underline, strikethrough, and rise. ", "heading") - - text_buffer.insert_with_tags_by_name(iter, - "Strikethrough", - "strikethrough") - text_buffer.insert(iter, ", ", -1) - text_buffer.insert_with_tags_by_name(iter, - "underline", - "underline") - text_buffer.insert(iter, ", ", -1) - text_buffer.insert_with_tags_by_name(iter, - "double underline", - "double_underline") - text_buffer.insert(iter, ", ", -1) - text_buffer.insert_with_tags_by_name(iter, - "superscript", - "superscript") - text_buffer.insert(iter, ", and ", -1) - text_buffer.insert_with_tags_by_name(iter, - "subscript", - "subscript") - text_buffer.insert(iter, " are all supported.\n\n", -1) - - text_buffer.insert_with_tags_by_name(iter, "Images. ", - "heading") - - text_buffer.insert(iter, "The buffer can have images in it: ", -1) - text_buffer.insert_pixbuf(iter, pixbuf) - text_buffer.insert_pixbuf(iter, pixbuf) - text_buffer.insert_pixbuf(iter, pixbuf) - text_buffer.insert(iter, " for example.\n\n", -1) - - text_buffer.insert_with_tags_by_name(iter, "Spacing. ", - "heading") - - text_buffer.insert(iter, - "You can adjust the amount of space before each line.\n", -1) - - text_buffer.insert_with_tags_by_name(iter, - "This line has a whole lot of space before it.\n", - "big_gap_before_line", "wide_margins") - text_buffer.insert_with_tags_by_name(iter, - "You can also adjust the amount of space after each line; " - "this line has a whole lot of space after it.\n", - "big_gap_after_line", "wide_margins") - - text_buffer.insert_with_tags_by_name(iter, - "You can also adjust the amount of space between wrapped " - "lines; this line has extra space between each wrapped line " - "in the same paragraph. To show off wrapping, some filler " - "text: the quick brown fox jumped over the lazy dog. Blah " - "blah blah blah blah blah blah blah blah.\n", - "double_spaced_line", "wide_margins") - - text_buffer.insert(iter, "Also note that those lines have " - "extra-wide margins.\n\n", -1) - - text_buffer.insert_with_tags_by_name(iter, "Editability. ", "heading") - - text_buffer.insert_with_tags_by_name(iter, - "This line is 'locked down' and can't be edited by the " - "user - just try it! You can't delete this line.\n\n", - "not_editable") - - text_buffer.insert_with_tags_by_name(iter, "Wrapping. ", "heading") - - text_buffer.insert(iter, - "This line(and most of the others in this buffer) is " - "word-wrapped, using the proper Unicode algorithm. Word " - "wrap should work in all scripts and languages that GTK+ " - "supports. Let's make this a long paragraph to demonstrate: " - "blah blah blah blah blah blah blah blah blah blah blah " - "blah blah blah blah blah blah blah blah\n\n", -1); - - text_buffer.insert_with_tags_by_name(iter, - "This line has character-based wrapping, and can wrap " - "between any two character glyphs. Let's make this a long " - "paragraph to demonstrate: blah blah blah blah blah blah " - "blah blah blah blah blah blah blah blah blah blah blah " - "blah blah\n\n", "char_wrap") - - text_buffer.insert_with_tags_by_name(iter, - "This line has all wrapping turned off, so it makes the " - "horizontal scrollbar appear.\n\n\n", "no_wrap") - - text_buffer.insert_with_tags_by_name(iter, "Justification. ", - "heading"); - - text_buffer.insert_with_tags_by_name(iter, - "\nThis line has center justification.\n", "center") - - text_buffer.insert_with_tags_by_name(iter, - "This line has right justification.\n", "right_justify") - - text_buffer.insert_with_tags_by_name(iter, - "\nThis line has big wide margins. Text text text text " - "text text text text text text text text text text text " - "text text text text text text text text text text text " - "text text text text text text text text text text.\n", - "wide_margins"); - - text_buffer.insert_with_tags_by_name(iter, - "Internationalization. ", "heading") - - text_buffer.insert(iter, - "You can put all sorts of Unicode text in the buffer.\n\n" - "German(Deutsch S\303\274d) Gr\303\274\303\237 Gott\nGreek" - "(\316\225\316\273\316\273\316\267\316\275\316\271\316\272" - "\316\254) \316\223\316\265\316\271\316\254 \317\203\316\261" - "\317\202\nHebrew \327\251\327\234\327\225\327\235\n" - "Japanese(\346\227\245\346\234\254\350\252\236)\n\nThe " - "widget properly handles bidirectional text, word wrapping, " - "DOS/UNIX/Unicode paragraph separators, grapheme boundaries, " - "and so on using the Pango internationalization framework.\n", -1) - - text_buffer.insert(iter, "Here's a word-wrapped quote in a " - "right-to-left language:\n", -1) - text_buffer.insert_with_tags_by_name(iter, - "\331\210\331\202\330\257 \330\250\330\257\330\243 " - "\330\253\331\204\330\247\330\253 \331\205\331\206 " - "\330\243\331\203\330\253\330\261 \330\247\331\204\331" - "\205\330\244\330\263\330\263\330\247\330\252 \330\252" - "\331\202\330\257\331\205\330\247 \331\201\331\212 \330" - "\264\330\250\331\203\330\251 \330\247\331\203\330\263" - "\331\212\331\210\331\206 \330\250\330\261\330\247\331" - "\205\330\254\331\207\330\247 \331\203\331\205\331\206" - "\330\270\331\205\330\247\330\252 \331\204\330\247 \330" - "\252\330\263\330\271\331\211 \331\204\331\204\330\261" - "\330\250\330\255\330\214 \330\253\331\205 \330\252\330" - "\255\331\210\331\204\330\252 \331\201\331\212 \330\247" - "\331\204\330\263\331\206\331\210\330\247\330\252 \330" - "\247\331\204\330\256\331\205\330\263 \330\247\331\204" - "\331\205\330\247\330\266\331\212\330\251 \330\245\331" - "\204\331\211 \331\205\330\244\330\263\330\263\330\247" - "\330\252 \331\205\330\247\331\204\331\212\330\251 \331" - "\205\331\206\330\270\331\205\330\251\330\214 \331\210" - "\330\250\330\247\330\252\330\252 \330\254\330\262\330\241" - "\330\247 \331\205\331\206 \330\247\331\204\331\206\330\270" - "\330\247\331\205 \330\247\331\204\331\205\330\247\331\204" - "\331\212 \331\201\331\212 \330\250\331\204\330\257\330\247" - "\331\206\331\207\330\247\330\214 \331\210\331\204\331\203" - "\331\206\331\207\330\247 \330\252\330\252\330\256\330\265" - "\330\265 \331\201\331\212 \330\256\330\257\331\205\330\251 " - "\331\202\330\267\330\247\330\271 \330\247\331\204\331\205\330" - "\264\330\261\331\210\330\271\330\247\330\252 \330\247\331\204" - "\330\265\330\272\331\212\330\261\330\251. \331\210\330\243" - "\330\255\330\257 \330\243\331\203\330\253\330\261 \331\207" - "\330\260\331\207 \330\247\331\204\331\205\330\244\330\263" - "\330\263\330\247\330\252 \331\206\330\254\330\247\330\255" - "\330\247 \331\207\331\210 \302\273\330\250\330\247\331\206" - "\331\203\331\210\330\263\331\210\331\204\302\253 \331\201" - "\331\212 \330\250\331\210\331\204\331\212\331\201\331\212" - "\330\247.\n\n", "rtl_quote") - - text_buffer.insert(iter, "You can put widgets in the buffer: " - "Here's a button: ", -1) - - anchor = text_buffer.create_child_anchor(iter) - text_buffer.insert(iter, " and a menu: ", -1) - anchor = text_buffer.create_child_anchor(iter) - text_buffer.insert(iter, " and a scale: ", -1) - anchor = text_buffer.create_child_anchor(iter) - text_buffer.insert(iter, " and an animation: ", -1) - anchor = text_buffer.create_child_anchor(iter) - text_buffer.insert(iter, " finally a text entry: ", -1) - anchor = text_buffer.create_child_anchor(iter) - text_buffer.insert(iter, ".\n", -1) - - text_buffer.insert(iter, "\n\nThis demo doesn't demonstrate all " - "the GtkTextBuffer features; it leaves out, for example: " - "invisible/hidden text(doesn't work in GTK 2, but planned), " - "tab stops, application-drawn areas on the sides of the " - "widget for displaying breakpoints and such...", -1) - - # Apply word_wrap tag to whole buffer */ - start, end = text_buffer.get_bounds() - text_buffer.apply_tag_by_name("word_wrap", start, end) - - def attach_widgets(self, text_view): - buffer = text_view.get_buffer() - iter = buffer.get_start_iter() - i = 0 - while self.find_anchor(iter): - anchor = iter.get_child_anchor() - if i == 0: - widget = gtk.Button("Click Me") - widget.connect("clicked", self.easter_egg_callback) - elif i == 1: - widget = gtk.combo_box_new_text() - widget.append_text("Option 1") - widget.append_text("Option 2") - widget.append_text("Option 3") - elif i == 2: - widget = gtk.HScale() - widget.set_range(0, 100) - widget.set_size_request(70, -1) - elif i == 3: - widget = gtk.Image() - widget.set_from_file(FLOPPYBUDDY_IMAGE) - elif i == 4: - widget = gtk.Entry() - else: - raise ValueError - - text_view.add_child_at_anchor(widget, anchor) - widget.show_all() - i += 1 - return - - def find_anchor(self, iter): - while iter.forward_char(): - if iter.get_child_anchor(): - return True - return False - - def easter_egg_callback(self, button): - if self.win: - self.win.present() - return - - buffer = gtk.TextBuffer() - iter = buffer.get_start_iter() - buffer.insert(iter, - "This buffer is shared by a set of nested text views.\n Nested view:\n") - anchor = buffer.create_child_anchor(iter) - buffer.insert(iter, - "\nDon't do this in real applications, please.\n") - - view = gtk.TextView(buffer) - - self.recursive_attach_view(0, view, anchor) - - self.win = gtk.Window() - sw = gtk.ScrolledWindow() - sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - - self.win.add(sw) - sw.add(view) - self.win.set_default_size(300, 400) - self.win.show_all() - return - - def recursive_attach_view(self, depth, view, anchor): - if depth > 4: - return - child_view = gtk.TextView(view.get_buffer()) - # Event box is needed to add a black border around each child view - event_box = gtk.EventBox() - color = gtk.gdk.color_parse("black") - event_box.modify_bg(gtk.STATE_NORMAL, color) - align = gtk.Alignment(0.5, 0.5, 1.0, 1.0) - align.set_border_width(1) - - event_box.add(align) - align.add(child_view) - - view.add_child_at_anchor(event_box, anchor) - - self.recursive_attach_view(depth + 1, child_view, anchor) - return - -def main(): - TextViewDemo() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/pygtk-demo/demos/tree_store.py b/examples/pygtk-demo/demos/tree_store.py deleted file mode 100644 index fc53644d..00000000 --- a/examples/pygtk-demo/demos/tree_store.py +++ /dev/null @@ -1,334 +0,0 @@ -#!/usr/bin/env python -'''Tree View/Tree Store - -The GtkTreeStore is used to store data in tree form, to be used -later on by a GtkTreeView to display it. This demo builds a simple -GtkTreeStore and displays it. If you're new to the GtkTreeView widgets -and associates, look into the GtkListStore example first.''' -# pygtk version: Maik Hertha - -import gobject -import gtk - -# columns -( - HOLIDAY_NAME_COLUMN, - ALEX_COLUMN, - HAVOC_COLUMN, - TIM_COLUMN, - OWEN_COLUMN, - DAVE_COLUMN, - VISIBLE_COLUMN, - WORLD_COLUMN, - NUM_COLUMNS -) = range(9) - -# tree data -january = \ -[ - ["New Years Day", True, True, True, True, False, True ], - ["Presidential Inauguration", False, True, False, True, False, False ], - ["Martin Luther King Jr. day", False, True, False, True, False, False ] -] - -february = \ -[ - [ "Presidents' Day", False, True, False, True, False, False ], - [ "Groundhog Day", False, False, False, False, False, False ], - [ "Valentine's Day", False, False, False, False, True, True ] -] - -march = \ -[ - [ "National Tree Planting Day", False, False, False, False, False, False ], - [ "St Patrick's Day", False, False, False, False, False, True ] -] -april = \ -[ - [ "April Fools' Day", False, False, False, False, False, True ], - [ "Army Day", False, False, False, False, False, False ], - [ "Earth Day", False, False, False, False, False, True ], - [ "Administrative Professionals' Day", False, False, False, False, False, False ] -] - -may = \ -[ - [ "Nurses' Day", False, False, False, False, False, False ], - [ "National Day of Prayer", False, False, False, False, False, False ], - [ "Mothers' Day", False, False, False, False, False, True ], - [ "Armed Forces Day", False, False, False, False, False, False ], - [ "Memorial Day", True, True, True, True, False, True ] -] - -june = \ -[ - [ "June Fathers' Day", False, False, False, False, False, True ], - [ "Juneteenth(Liberation of Slaves)", False, False, False, False, False, False ], - [ "Flag Day", False, True, False, True, False, False ] -] - -july = \ -[ - [ "Parents' Day", False, False, False, False, False, True ], - [ "Independence Day", False, True, False, True, False, False ] -] - -august = \ -[ - [ "Air Force Day", False, False, False, False, False, False ], - [ "Coast Guard Day", False, False, False, False, False, False ], - [ "Friendship Day", False, False, False, False, False, False ] -] - -september = \ -[ - [ "Grandparents' Day", False, False, False, False, False, True ], - [ "Citizenship Day or Constitution Day", False, False, False, False, False, False ], - [ "Labor Day", True, True, True, True, False, True ] -] - -october = \ -[ - [ "National Children's Day", False, False, False, False, False, False ], - [ "Bosses' Day", False, False, False, False, False, False ], - [ "Sweetest Day", False, False, False, False, False, False ], - [ "Mother-in-Law's Day", False, False, False, False, False, False ], - [ "Navy Day", False, False, False, False, False, False ], - [ "Columbus Day", False, True, False, True, False, False ], - [ "Halloween", False, False, False, False, False, True ] -] - -november = \ -[ - [ "Marine Corps Day", False, False, False, False, False, False ], - [ "Veterans' Day", True, True, True, True, False, True ], - [ "Thanksgiving", False, True, False, True, False, False ] -] - -december = \ -[ - [ "Pearl Harbor Remembrance Day", False, False, False, False, False, False ], - [ "Christmas", True, True, True, True, False, True ], - [ "Kwanzaa", False, False, False, False, False, False ] -] - - -toplevel = \ -[ - ["January", False, False, False, False, False, False, january], - ["February", False, False, False, False, False, False, february], - ["March", False, False, False, False, False, False, march], - ["April", False, False, False, False, False, False, april], - ["May", False, False, False, False, False, False, may], - ["June", False, False, False, False, False, False, june], - ["July", False, False, False, False, False, False, july], - ["August", False, False, False, False, False, False, august], - ["September", False, False, False, False, False, False, september], - ["October", False, False, False, False, False, False, october], - ["November", False, False, False, False, False, False, november], - ["December", False, False, False, False, False, False, december] -] - -class TreeStoreDemo(gtk.Window): - def __init__(self, parent=None): - gtk.Window.__init__(self) - try: - self.set_screen(parent.get_screen()) - except AttributeError: - self.connect('destroy', lambda *w: gtk.main_quit()) - self.set_title(self.__class__.__name__) - self.set_default_size(650, 400) - self.set_border_width(8) - - vbox = gtk.VBox(False, 8) - self.add(vbox) - - label = gtk.Label("Jonathan's Holiday Card Planning Sheet") - vbox.pack_start(label, False, False) - - sw = gtk.ScrolledWindow() - sw.set_shadow_type(gtk.SHADOW_ETCHED_IN) - sw.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - vbox.pack_start(sw) - - # create model - model = self.__create_model() - - # create treeview - treeview = gtk.TreeView(model) - treeview.set_rules_hint(True) - - self.__add_columns(treeview) - - sw.add(treeview) - - # expand all rows after the treeview widget has been realized - treeview.connect('realize', lambda tv: tv.expand_all()) - - self.show_all() - - def __create_model(self): - - # create tree store - model = gtk.TreeStore( - gobject.TYPE_STRING, - gobject.TYPE_BOOLEAN, - gobject.TYPE_BOOLEAN, - gobject.TYPE_BOOLEAN, - gobject.TYPE_BOOLEAN, - gobject.TYPE_BOOLEAN, - gobject.TYPE_BOOLEAN, - gobject.TYPE_BOOLEAN) - - # add data to the tree store - for month in toplevel: - iter = model.append(None) - model.set(iter, - HOLIDAY_NAME_COLUMN, month[HOLIDAY_NAME_COLUMN], - ALEX_COLUMN, False, - HAVOC_COLUMN, False, - TIM_COLUMN, False, - OWEN_COLUMN, False, - DAVE_COLUMN, False, - VISIBLE_COLUMN, False, - WORLD_COLUMN, False - ) - - # add children - for holiday in month[-1]: - child_iter = model.append(iter); - model.set(child_iter, - HOLIDAY_NAME_COLUMN, holiday[HOLIDAY_NAME_COLUMN], - ALEX_COLUMN, holiday[ALEX_COLUMN], - HAVOC_COLUMN, holiday[HAVOC_COLUMN], - TIM_COLUMN, holiday[TIM_COLUMN], - OWEN_COLUMN, holiday[OWEN_COLUMN], - DAVE_COLUMN, holiday[DAVE_COLUMN], - VISIBLE_COLUMN, True, - WORLD_COLUMN, holiday[WORLD_COLUMN-1] - ) - - return model - - def on_item_toggled(self, cell, path_str, model): - - # get selected column - column = cell.get_data('column') - - # get toggled iter - iter = model.get_iter_from_string(path_str) - toggle_item = model.get_value(iter, column) - - # do something with the value - toggle_item = not toggle_item - - # set new value - model.set(iter, column, toggle_item) - - - def __add_columns(self, treeview): - model = treeview.get_model() - - # column for holiday names - renderer = gtk.CellRendererText() - renderer.set_property("xalign", 0.0) - - #col_offset = gtk.TreeViewColumn("Holiday", renderer, text=HOLIDAY_NAME_COLUMN) - column = gtk.TreeViewColumn("Holiday", renderer, text=HOLIDAY_NAME_COLUMN) - #column = gtk_tree_view_get_column(GTK_TREE_VIEW(treeview), col_offset - 1); - column.set_clickable(True) - - treeview.append_column(column) - - # alex column */ - renderer = gtk.CellRendererToggle() - renderer.set_property("xalign", 0.0) - renderer.set_data("column", ALEX_COLUMN) - - renderer.connect("toggled", self.on_item_toggled, model) - - column = gtk.TreeViewColumn("Alex", renderer, active=ALEX_COLUMN, - visible=VISIBLE_COLUMN, activatable=WORLD_COLUMN) - - # set this column to a fixed sizing(of 50 pixels) - #column = gtk_tree_view_get_column(GTK_TREE_VIEW(treeview), col_offset - 1); - column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) - column.set_fixed_width(50) - column.set_clickable(True) - - treeview.append_column(column) - - # havoc column - renderer = gtk.CellRendererToggle(); - renderer.set_property("xalign", 0.0) - renderer.set_data("column", HAVOC_COLUMN) - - renderer.connect("toggled", self.on_item_toggled, model) - - column = gtk.TreeViewColumn("Havoc", renderer, active=HAVOC_COLUMN, - visible=VISIBLE_COLUMN) - - #column = treeview.get_column(col_offset - 1) - column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) - column.set_fixed_width(50) - column.set_clickable(True) - - treeview.append_column(column) - - # tim column - renderer = gtk.CellRendererToggle(); - renderer.set_property("xalign", 0.0) - renderer.set_data("column", TIM_COLUMN) - - renderer.connect("toggled", self.on_item_toggled, model) - - column = gtk.TreeViewColumn("Tim", renderer, active=TIM_COLUMN, - visible=VISIBLE_COLUMN, activatable=WORLD_COLUMN) - - #column = treeview.get_column(col_offset - 1) - column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) - column.set_fixed_width(50) - column.set_clickable(True) - - treeview.append_column(column) - - # owen column - renderer = gtk.CellRendererToggle(); - renderer.set_property("xalign", 0.0) - renderer.set_data("column", OWEN_COLUMN) - - renderer.connect("toggled", self.on_item_toggled, model) - - column = gtk.TreeViewColumn("Owen", renderer, active=OWEN_COLUMN, - visible=VISIBLE_COLUMN) - - #column = treeview.get_column(col_offset - 1) - column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) - column.set_fixed_width(50) - column.set_clickable(True) - - treeview.append_column(column) - - # dave column - renderer = gtk.CellRendererToggle(); - renderer.set_property("xalign", 0.0) - renderer.set_data("column", DAVE_COLUMN) - - renderer.connect("toggled", self.on_item_toggled, model) - - column = gtk.TreeViewColumn("Dave", renderer, active=DAVE_COLUMN, - visible=VISIBLE_COLUMN) - - #column = treeview.get_column(col_offset - 1) - column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) - column.set_fixed_width(50) - column.set_clickable(True) - - treeview.append_column(column) - -def main(): - TreeStoreDemo() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/pygtk-demo/demos/treemodel.py b/examples/pygtk-demo/demos/treemodel.py deleted file mode 100644 index 7fca9a08..00000000 --- a/examples/pygtk-demo/demos/treemodel.py +++ /dev/null @@ -1,120 +0,0 @@ -#!/usr/bin/env python -'''Tree View/Generic Tree Model - -This test is designed to demonstrate creating a new type of tree model -in python for use with the new tree widget in gtk 2.0.''' - -import gtk -import gobject - -# to create a new GtkTreeModel from python, you must derive from -# TreeModel. -class MyTreeModel(gtk.GenericTreeModel): - '''This class represents the model of a tree. The iterators used - to represent positions are converted to python objects when passed - to the on_* methods. This means you can use any python object to - represent a node in the tree. The None object represents a NULL - iterator. - - In this tree, we use simple tuples to represent nodes, which also - happen to be the tree paths for those nodes. This model is a tree - of depth 3 with 5 nodes at each level of the tree. The values in - the tree are just the string representations of the nodes.''' - - TREE_DEPTH = 4 - TREE_SIBLINGS = 5 - def __init__(self): - '''constructor for the model. Make sure you call - PyTreeModel.__init__''' - gtk.GenericTreeModel.__init__(self) - - # the implementations for TreeModel methods are prefixed with on_ - def on_get_flags(self): - '''returns the GtkTreeModelFlags for this particular type of model''' - return 0 - def on_get_n_columns(self): - '''returns the number of columns in the model''' - return 1 - def on_get_column_type(self, index): - '''returns the type of a column in the model''' - return gobject.TYPE_STRING - def on_get_path(self, node): - '''returns the tree path(a tuple of indices at the various - levels) for a particular node.''' - return node - def on_get_iter(self, path): - '''returns the node corresponding to the given path. In our - case, the node is the path''' - return path - def on_get_value(self, node, column): - '''returns the value stored in a particular column for the node''' - assert column == 0 - return `node` - def on_iter_next(self, node): - '''returns the next node at this level of the tree''' - if node != None: - if node[-1] == self.TREE_SIBLINGS - 1: # last node at level - return None - return node[:-1] +(node[-1]+1,) - def on_iter_children(self, node): - '''returns the first child of this node''' - if node == None: # top of tree - return(0,) - if len(node) >= self.TREE_DEPTH: # no more levels - return None - return node +(0,) - def on_iter_has_child(self, node): - '''returns true if this node has children''' - return node == None or len(node) < self.TREE_DEPTH - def on_iter_n_children(self, node): - '''returns the number of children of this node''' - if node == None or len(node) < self.TREE_DEPTH: - return self.TREE_SIBLINGS - else: - return 0 - def on_iter_nth_child(self, node, n): - '''returns the nth child of this node''' - if node == None: - return(n,) - if len(node) < self.TREE_DEPTH and n < self.TREE_SIBLINGS: - return node +(n,) - else: - return None - def on_iter_parent(self, node): - '''returns the parent of this node''' - assert node != None - if len(node) == 0: - return None - else: - return node[:-1] - -class GenericTreeModelDemo(gtk.Window): - def __init__(self, parent=None): - gtk.Window.__init__(self) - try: - self.set_screen(parent.get_screen()) - except AttributeError: - self.connect('destroy', lambda *w: gtk.main_quit()) - self.set_title(self.__class__.__name__) - - scrolled_window = gtk.ScrolledWindow() - scrolled_window.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - self.add(scrolled_window) - - model = MyTreeModel() - model = model.filter_new() - tree_view = gtk.TreeView(model) - cell = gtk.CellRendererText() - # the text in the column comes from column 0 - column = gtk.TreeViewColumn("tuples", cell, text=0) - tree_view.append_column(column) - - scrolled_window.add(tree_view) - self.show_all() - -def main(): - GenericTreeModelDemo() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/pygtk-demo/demos/ui_manager.py b/examples/pygtk-demo/demos/ui_manager.py deleted file mode 100644 index 02eed389..00000000 --- a/examples/pygtk-demo/demos/ui_manager.py +++ /dev/null @@ -1,191 +0,0 @@ -#!/usr/bin/env python -'''UI Manager - -The GtkUIManager object allows the easy creation of menus -from an array of actions and a description of the menu hierarchy. -''' -# pygtk version: Maik Hertha - -import gobject -import gtk - -def activate_action(action): - print 'Action "%s" activated' % action.get_name() - -def activate_radio_action(action, current): - print 'Radio action "%s" selected'% current.get_name() - -entries = ( - ( "FileMenu", None, "_File" ), # name, stock id, label - ( "PreferencesMenu", None, "_Preferences" ), # name, stock id, label - ( "ColorMenu", None, "_Color" ), # name, stock id, label - ( "ShapeMenu", None, "_Shape" ), # name, stock id, label - ( "HelpMenu", None, "_Help" ), # name, stock id, label - ( "New", gtk.STOCK_NEW, # name, stock id - "_New", "N", # label, accelerator - "Create a new file", # tooltip - activate_action ), - ( "Open", gtk.STOCK_OPEN, # name, stock id - "_Open","O", # label, accelerator - "Open a file", # tooltip - activate_action ), - ( "Save", gtk.STOCK_SAVE, # name, stock id - "_Save","S", # label, accelerator - "Save current file", # tooltip - activate_action ), - ( "SaveAs", gtk.STOCK_SAVE, # name, stock id - "Save _As...", None, # label, accelerator - "Save to a file", # tooltip - activate_action ), - ( "Quit", gtk.STOCK_QUIT, # name, stock id - "_Quit", "Q", # label, accelerator - "Quit", # tooltip - activate_action ), - ( "About", None, # name, stock id - "_About", "A", # label, accelerator - "About", # tooltip - activate_action ), - ( "Logo", "demo-gtk-logo", # name, stock id - None, None, # label, accelerator - "GTK+", # tooltip - activate_action ), -) - -toggle_entries = ( - ( "Bold", gtk.STOCK_BOLD, # name, stock id - "_Bold", "B", # label, accelerator - "Bold", # tooltip - activate_action, - True ), # is_active -) - -( - COLOR_RED, - COLOR_GREEN, - COLOR_BLUE -) = range(3) - -color_entries = ( - ( "Red", None, # name, stock id - "_Red", "R", # label, accelerator - "Blood", COLOR_RED ), # tooltip, value - ( "Green", None, # name, stock id - "_Green", "G", # label, accelerator - "Grass", COLOR_GREEN ), # tooltip, value - ( "Blue", None, # name, stock id - "_Blue", "B", # label, accelerator - "Sky", COLOR_BLUE ), # tooltip, value -) - -( - SHAPE_SQUARE, - SHAPE_RECTANGLE, - SHAPE_OVAL, -) = range(3) - -# GtkRadioActionEntry -shape_entries = ( - ( "Square", None, # name, stock id - "_Square", "S", # label, accelerator - "Square", SHAPE_SQUARE ), # tooltip, value - ( "Rectangle", None, # name, stock id - "_Rectangle", "R", # label, accelerator - "Rectangle", SHAPE_RECTANGLE ), # tooltip, value - ( "Oval", None, # name, stock id - "_Oval", "O", # label, accelerator - "Egg", SHAPE_OVAL ), # tooltip, value -) - -ui_info = \ -''' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -''' - -class UIManagerDemo(gtk.Window): - - def __init__(self, parent=None): - gtk.Window.__init__(self) - try: - self.set_screen(parent.get_screen()) - except AttributeError: - self.connect('destroy', lambda *w: gtk.main_quit()) - self.set_title(self.__class__.__name__) - self.set_border_width(0) - - actions = gtk.ActionGroup("Actions") - actions.add_actions(entries) - actions.add_toggle_actions(toggle_entries) - actions.add_radio_actions(color_entries, COLOR_RED, activate_radio_action) - actions.add_radio_actions(shape_entries, SHAPE_OVAL, activate_radio_action) - - ui = gtk.UIManager() - ui.insert_action_group(actions, 0) - self.add_accel_group(ui.get_accel_group()) - - try: - mergeid = ui.add_ui_from_string(ui_info) - except gobject.GError, msg: - print "building menus failed: %s" % msg - - box1 = gtk.VBox(False, 0) - self.add(box1) - - box1.pack_start(ui.get_widget("/MenuBar"), False, False, 0) - - label = gtk.Label("Type\n\nto start") - label.set_size_request(200, 200) - label.set_alignment(0.5, 0.5) - box1.pack_start(label, True, True, 0) - - separator = gtk.HSeparator() - box1.pack_start(separator, False, True, 0) - - box2 = gtk.VBox(False, 10) - box2.set_border_width(10) - box1.pack_start(box2, False, True, 0) - - button = gtk.Button("close") - button.connect("clicked", lambda b, w=self: w.destroy()) - box2.pack_start(button, True, True, 0) - button.set_flags(gtk.CAN_DEFAULT) - button.grab_default() - - self.show_all() - -def main(): - UIManagerDemo() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/pygtk-demo/pygtk-demo.in b/examples/pygtk-demo/pygtk-demo.in deleted file mode 100644 index fead8c54..00000000 --- a/examples/pygtk-demo/pygtk-demo.in +++ /dev/null @@ -1,7 +0,0 @@ -#! @PYTHON@ - -import sys -import os.path -pygtklibdir = os.path.join("@libdir@", "pygtk", "2.0") -sys.path.insert(0, pygtklibdir) -execfile(os.path.join(pygtklibdir, "pygtk-demo.py")) diff --git a/examples/pygtk-demo/pygtk-demo.py b/examples/pygtk-demo/pygtk-demo.py deleted file mode 100644 index 282a14d2..00000000 --- a/examples/pygtk-demo/pygtk-demo.py +++ /dev/null @@ -1,318 +0,0 @@ -#!/usr/bin/env python -''' - $Id$ - - pygtk-demo.py - 2004-07-18: Some enhancements for building the demolist like in gtk-demos of the - gtk+ distribution. - 2004-07-22: Simple syntaxhighlighting implemented, based on the tokenizer-module. -''' - -import string -import re -try: - import pygtk - pygtk.require('2.0') -except ImportError: - pass -import gobject -import gtk -import pango - -# use for simple syntax highlighting ;-) -import tokenize -import keyword - -import demos -D_TEMPL = '%sDemo' - -# Some programmatic definition for the testgtk_demos list. This avoids extra -# maintenance if the demo list grows up. The current definition requires -# a class or function with a swapped case name+'Demo' like in the doc string. -# Swapped case is build from the __doc__-string programatically. -child_demos = {} -testgtk_demos = [] -for descr, mod in demos.demo_list: - # Find some categorized demos - try: - main, child = descr.split('/') - except ValueError: - # No, only one application - demo_class = D_TEMPL % re.sub('(\S+) *', - lambda m:(m.group(1)[0].isupper() and m.group(1) or m.group(1).capitalize()), - descr) - testgtk_demos.append((descr, mod, demo_class)) - else: - # Ok. Some more testing - demo_class = D_TEMPL % re.sub('(\S+) *', - lambda m:(m.group(1)[0].isupper() and m.group(1) or m.group(1).capitalize()), - child) - try: - # Applicationgroup already defined? - child_demos[main.upper()].append((child, mod, demo_class)) - except KeyError: - # No. Start a new category - child_demos.setdefault(main.upper(), []).append((child, mod, demo_class)) - testgtk_demos.append((main, None, None, child_demos[main.upper()])) - -( - TITLE_COLUMN, - MODULE_COLUMN, - FUNC_COLUMN, - ITALIC_COLUMN -) = range(4) - -CHILDREN_COLUMN = 3 - -class InputStream(object): - ''' Simple Wrapper for File-like objects. [c]StringIO doesn't provide - a readline function for use with generate_tokens. - Using a iterator-like interface doesn't succeed, because the readline - function isn't used in such a context. (see /tokenize.py) - ''' - def __init__(self, data): - self.__data = [ '%s\n' % x for x in data.splitlines() ] - self.__lcount = 0 - def readline(self): - try: - line = self.__data[self.__lcount] - self.__lcount += 1 - except IndexError: - line = '' - self.__lcount = 0 - return line - - -class PyGtkDemo(gtk.Window): - info_buffer = None - source_buffer = None - module_cache = {} - - def __init__(self): - gtk.Window.__init__(self) - self.set_title("PyGTK+ Code Demos") - self.connect('destroy', lambda w: gtk.main_quit()) - self.set_default_size(800, 400) - - hbox = gtk.HBox(False, 3) - self.add(hbox) - - treeview = self.__create_treeview() - hbox.pack_start(treeview, False, False) - - self.notebook = gtk.Notebook() - hbox.pack_start(self.notebook, expand=True) - - scrolled_window, self.info_buffer = self.__create_text(False) - self._new_notebook_page(scrolled_window, '_Info') - tag = self.info_buffer.create_tag('title') - tag.set_property('font', 'Sans 18') - - scrolled_window, self.source_buffer = self.__create_text(True) - self._new_notebook_page(scrolled_window, '_Source') - tag = self.source_buffer.create_tag('source') - tag.set_property('font', 'monospace') - tag.set_property('pixels_above_lines', 0) - tag.set_property('pixels_below_lines', 0) - tag = self.source_buffer.create_tag('keyword', foreground='#00007F', - weight=pango.WEIGHT_BOLD) - tag = self.source_buffer.create_tag('string', foreground='#7F007F') - tag = self.source_buffer.create_tag('comment', foreground='#007F00', - style=pango.STYLE_ITALIC) - - self.show_all() - - def run(self): - gtk.main() - - def _new_notebook_page(self, widget, label): - l = gtk.Label('') - l.set_text_with_mnemonic(label) - self.notebook.append_page(widget, l) - - def __create_treeview(self): - model = gtk.TreeStore( - gobject.TYPE_STRING, - gobject.TYPE_STRING, - gobject.TYPE_STRING, - gobject.TYPE_BOOLEAN - ) - - treeview = gtk.TreeView(model) - selection = treeview.get_selection() - selection.set_mode(gtk.SELECTION_BROWSE) - treeview.set_size_request(200, -1) - - for module in testgtk_demos: - iter = model.append(None) - model.set(iter, - TITLE_COLUMN, module[TITLE_COLUMN], - MODULE_COLUMN, module[MODULE_COLUMN], - FUNC_COLUMN, module[FUNC_COLUMN], - ITALIC_COLUMN, False - ) - - try: - children = module[CHILDREN_COLUMN] - for child_module in children: - child_iter = model.append(iter) - model.set(child_iter, - TITLE_COLUMN, child_module[TITLE_COLUMN], - MODULE_COLUMN, child_module[MODULE_COLUMN], - FUNC_COLUMN, child_module[FUNC_COLUMN], - ITALIC_COLUMN, False - ) - except IndexError: - pass - - cell = gtk.CellRendererText() - cell.set_property('style', pango.STYLE_ITALIC) - - column = gtk.TreeViewColumn("Widget (double click for demo)", cell, - text=TITLE_COLUMN, style_set=ITALIC_COLUMN) - - treeview.append_column(column) - - selection.connect('changed', self.selection_changed_cb) - treeview.connect('row-activated', self.row_activated_cb) - - treeview.expand_all() - - return treeview - - def __create_text(self, is_source=False): - scrolled_window = gtk.ScrolledWindow() - scrolled_window.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC) - scrolled_window.set_shadow_type(gtk.SHADOW_IN) - - text_view = gtk.TextView() - scrolled_window.add(text_view) - - buffer = gtk.TextBuffer(None) - text_view.set_buffer(buffer) - text_view.set_editable(False) - text_view.set_cursor_visible(False) - - text_view.set_wrap_mode(not is_source) - - return scrolled_window, buffer - - def row_activated_cb(self, treeview, path, column): - model = treeview.get_model() - iter = model.get_iter(path) - module_name = model.get_value(iter, MODULE_COLUMN) - func_name = model.get_value(iter, FUNC_COLUMN) - italic_value = model.get_value(iter, ITALIC_COLUMN) - try: - self.module_cache[module_name].present() - except KeyError: - module = getattr(demos, module_name) - model.set(iter, ITALIC_COLUMN, not italic_value) - cmd = 'demos.%s.%s' % (module_name, func_name) - #print cmd - window = eval(cmd)(self) - if window: - window.connect('destroy', self.window_closed_cb, model, path) - self.module_cache[module_name] = window - - def selection_changed_cb(self, selection): - model, iter = selection.get_selected() - if not iter: - return False - - name = model.get_value(iter, MODULE_COLUMN) - self.load_module(name) - - def window_closed_cb (self, window, model, path): - iter = model.get_iter(path) - module_name = model.get_value(iter, MODULE_COLUMN) - del self.module_cache[module_name] - italic_value = model.get_value(iter, ITALIC_COLUMN) - if italic_value: - model.set(iter, ITALIC_COLUMN, not italic_value) - - - def read_module(self, module): - filename = module.__file__ - if filename[-4:] == '.pyc': - filename = filename[:-1] - fd = open(filename) - return fd.read() - - def insert_documentation(self, module): - buffer = self.info_buffer - iter = buffer.get_iter_at_offset(0) - - lines = string.split(module.__doc__ or '', '\n') - buffer.insert(iter, lines[0]) - start = buffer.get_iter_at_offset(0) - buffer.apply_tag_by_name('title', start, iter) - buffer.insert(iter, '\n') - for line in lines[1:]: - buffer.insert(iter, line) - buffer.insert(iter, '\n') - - def clear_buffers(self): - start, end = self.info_buffer.get_bounds() - self.info_buffer.delete(start, end) - - start, end = self.source_buffer.get_bounds() - self.source_buffer.delete(start, end) - - def insert_source(self, data): - source_buffer = self.source_buffer - iter = source_buffer.get_iter_at_offset(0) - - last_erow, last_ecol = 0, 0 - was_newline = False # multiline statement detection - for x in tokenize.generate_tokens(InputStream(data).readline): - # x has 5-tuples - tok_type, tok_str = x[0], x[1] - srow, scol = x[2] - erow, ecol = x[3] - - # The tokenizer 'eats' the whitespaces, so we have to insert this again - # if needed. - if srow == last_erow: - # Same line, spaces between statements - if scol != last_ecol: - source_buffer.insert_with_tags_by_name(iter, ' '*(scol-last_ecol), 'source') - else: - # New line. - # First: Detect multiline statements. There is no special in the tokenizer stream. - if was_newline is False and last_erow != 0: - source_buffer.insert_with_tags_by_name(iter, ' \\\n', 'source') - # new line check if it starts with col 0 - if scol != 0: - source_buffer.insert_with_tags_by_name(iter, ' '*scol, 'source') - last_erow = erow - last_ecol = ecol - - if tok_type == tokenize.COMMENT: - was_newline = True # newline is in tok_str included. - source_buffer.insert_with_tags_by_name(iter, tok_str, 'source', 'comment') - continue - elif tok_type == tokenize.NAME: - if tok_str in keyword.kwlist: - source_buffer.insert_with_tags_by_name(iter, tok_str, 'source', 'keyword') - continue - elif tok_type == tokenize.STRING: - source_buffer.insert_with_tags_by_name(iter, tok_str, 'source', 'string') - continue - - # No special format for use. Check for newline. - was_newline = tok_type in (tokenize.NEWLINE, tokenize.NL) - source_buffer.insert_with_tags_by_name(iter, tok_str, 'source') - - def load_module(self, name): - self.clear_buffers() - if name is None: return - module = getattr(demos, name) - if module.__doc__: - self.insert_documentation(module) - - source = self.read_module(module) - self.insert_source(source) - -if __name__ == '__main__': - PyGtkDemo().run() diff --git a/examples/simple/README b/examples/simple/README deleted file mode 100644 index 9bcb80cc..00000000 --- a/examples/simple/README +++ /dev/null @@ -1,5 +0,0 @@ -These are some of the simplest examples you can do. They are only intended -to help you see how to use pygtk. The examples ending in 1.py use the low -level C-like interface, while the ones ending in 2.py are translations that -use Gtkinter. - diff --git a/examples/simple/dnd.py b/examples/simple/dnd.py deleted file mode 100644 index 0217def7..00000000 --- a/examples/simple/dnd.py +++ /dev/null @@ -1,182 +0,0 @@ -#! /usr/bin/env python - -import gobject -import gtk - -from dndpixmap import drag_icon_xpm, trashcan_open_xpm, trashcan_closed_xpm - - -trashcan_open = None -trashcan_closed = None - -have_drag = False; -popped_up = False -in_popup = False -popup_timer = 0 -popdown_timer = 0 -popup_win = None - - -TARGET_STRING = 0 -TARGET_ROOTWIN = 1 - -target = [ - ('STRING', 0, TARGET_STRING), - ('text/plain', 0, TARGET_STRING), - ('application/x-rootwin-drop', 0, TARGET_ROOTWIN) - ] - -def target_drag_leave(w, context, time): - global trashcan_closed - global have_drag - print 'leave' - have_drag = False - w.set_from_pixbuf(trashcan_closed) -def target_drag_motion(w, context, x, y, time): - global trashcan_open - global have_drag - if not have_drag: - have_drag = True - w.set_from_pixbuf(trashcan_open) - source_widget = context.get_source_widget() - print 'motion, source ', - if source_widget: - print source_widget.__class__.__name__ - else: - print 'unknown' - context.drag_status(context.suggested_action, time) - return True -def target_drag_drop(w, context, x, y, time): - global trashcan_closed - global have_drag - print 'drop' - have_drag = False - w.set_from_pixbuf(trashcan_closed) - if context.targets: - w.drag_get_data(context, context.targets[0], time) - return True - return False -def target_drag_data_received(w, context, x, y, data, info, time): - if data.format == 8: - print 'Received "%s" in trashcan' % data.data - context.finish(True, False, time) - else: - context.finish(False, False, time) -def label_drag_data_received(w, context, x, y, data, info, time): - if data and data.format == 8: - print 'Received "%s" in label' % data.data - context.finish(True, False, time) - else: - context.finish(False, False, time) -def source_drag_data_get(w, context, selection_data, info, time): - if info == TARGET_ROOTWIN: - print 'I was dropped on the rootwin' - else: - selection_data.set(selection_data.target, 8, "I'm Data!") - -def popdown_cb(): - global popdown_timer, popped_up - global popup_win - popdown_timer = 0 - popup_win.hide() - popped_up = False - return False -def popup_motion(w, context, x, y, time): - global in_popup, popdown_timer - if not in_popup: - in_popup = True - if popdown_timer: - print 'removed popdown' - gobject.source_remove(popdown_timer) - popdown_timer = 0 - return True -def popup_leave(w, context, time): - global in_popup, popdown_timer - print 'popup_leave' - if in_popup: - in_popup = False - if not popdown_timer: - print 'added popdown' - popdown_timer = gobject.timeout_add(500, popdown_cb) -def popup_cb(): - global popped_up, popup_win - global popup_timer, popdown_timer - if not popped_up: - if not popup_win: - popup_win = gtk.Window(gtk.WINDOW_POPUP) - popup_win.set_position(gtk.WIN_POS_MOUSE) - table = gtk.Table(3,3,False) - for k in range(9): - i, j = divmod(k, 3) - b = gtk.Button("%d,%d" % (i,j)) - table.attach(b, i,i+1,j,j+1) - b.drag_dest_set(gtk.DEST_DEFAULT_ALL, target, - gtk.gdk.ACTION_COPY | gtk.gdk.ACTION_MOVE) - b.connect('drag_motion', popup_motion) - b.connect('drag_leave', popup_leave) - table.show_all() - popup_win.add(table) - popup_win.show() - popped_up = True - popdown_timer = gobject.timeout_add(500, popdown_cb) - print 'added popdown' - popup_timer = 0 - return False -def popsite_motion(w, context, x, y, time): - global popup_timer - if not popup_timer: - popup_timer = gobject.timeout_add(500, popup_cb) - return True -def popsite_leave(w, context, time): - global popup_timer - if popup_timer: - gobject.source_remove(popup_timer) - popup_timer = 0 -def source_drag_data_delete(w, context, data): - print 'Delete the data!' -def create_pixmap(w, xpm): - return gtk.gdk.pixmap_create_from_xpm_d(w.window, None, xpm) -def main(): - global trashcan_open - global trashcan_closed - global drag_icon - win = gtk.Window() - win.realize() - win.connect('destroy', lambda w: gtk.main_quit()) - table = gtk.Table(2,2) - win.add(table) - drag_icon = gtk.gdk.pixbuf_new_from_xpm_data(drag_icon_xpm) - trashcan_open = gtk.gdk.pixbuf_new_from_xpm_data(trashcan_open_xpm) - trashcan_closed = gtk.gdk.pixbuf_new_from_xpm_data(trashcan_closed_xpm) - label = gtk.Label('Drop on Trashcan!\n') - label.drag_dest_set(gtk.DEST_DEFAULT_ALL, target[:-1], - gtk.gdk.ACTION_COPY | gtk.gdk.ACTION_MOVE) - label.connect('drag_data_received', label_drag_data_received) - table.attach(label, 0, 1, 0, 1) - - label = gtk.Label('Popup\n') - label.drag_dest_set(gtk.DEST_DEFAULT_ALL, target[:-1], - gtk.gdk.ACTION_COPY | gtk.gdk.ACTION_MOVE) - table.attach(label, 1, 2, 1, 2) - label.connect('drag_motion', popsite_motion) - label.connect('drag_leave', popsite_leave) - - image = gtk.Image() - image.set_from_pixbuf(trashcan_closed) - image.drag_dest_set(0, [], 0) - table.attach(image, 1, 2, 0, 1) - image.connect('drag_leave', target_drag_leave) - image.connect('drag_motion', target_drag_motion) - image.connect('drag_drop', target_drag_drop) - image.connect('drag_data_received', target_drag_data_received) - - b = gtk.Button('Drag from Here\n') - b.drag_source_set(gtk.gdk.BUTTON1_MASK|gtk.gdk.BUTTON3_MASK, target, - gtk.gdk.ACTION_COPY|gtk.gdk.ACTION_MOVE) - b.drag_source_set_icon_pixbuf(drag_icon) - table.attach(b, 0, 1, 1, 2) - b.connect('drag_data_get', source_drag_data_get) - b.connect('drag_data_delete', source_drag_data_delete) - win.show_all() -main() -gtk.main() diff --git a/examples/simple/dndpixmap.py b/examples/simple/dndpixmap.py deleted file mode 100644 index 781b9798..00000000 --- a/examples/simple/dndpixmap.py +++ /dev/null @@ -1,259 +0,0 @@ -drag_icon_xpm = [ -"36 48 9 1", -" c None", -". c #020204", -"+ c #8F8F90", -"@ c #D3D3D2", -"# c #AEAEAC", -"$ c #ECECEC", -"% c #A2A2A4", -"& c #FEFEFC", -"* c #BEBEBC", -" .....................", -" ..&&&&&&&&&&&&&&&&&&&.", -" ...&&&&&&&&&&&&&&&&&&&.", -" ..&.&&&&&&&&&&&&&&&&&&&.", -" ..&&.&&&&&&&&&&&&&&&&&&&.", -" ..&&&.&&&&&&&&&&&&&&&&&&&.", -" ..&&&&.&&&&&&&&&&&&&&&&&&&.", -" ..&&&&&.&&&@&&&&&&&&&&&&&&&.", -" ..&&&&&&.*$%$+$&&&&&&&&&&&&&.", -" ..&&&&&&&.%$%$+&&&&&&&&&&&&&&.", -" ..&&&&&&&&.#&#@$&&&&&&&&&&&&&&.", -" ..&&&&&&&&&.#$**#$&&&&&&&&&&&&&.", -" ..&&&&&&&&&&.&@%&%$&&&&&&&&&&&&&.", -" ..&&&&&&&&&&&.&&&&&&&&&&&&&&&&&&&.", -" ..&&&&&&&&&&&&.&&&&&&&&&&&&&&&&&&&.", -"................&$@&&&@&&&&&&&&&&&&.", -".&&&&&&&+&&#@%#+@#@*$%$+$&&&&&&&&&&.", -".&&&&&&&+&&#@#@&&@*%$%$+&&&&&&&&&&&.", -".&&&&&&&+&$%&#@&#@@#&#@$&&&&&&&&&&&.", -".&&&&&&@#@@$&*@&@#@#$**#$&&&&&&&&&&.", -".&&&&&&&&&&&&&&&&&&&@%&%$&&&&&&&&&&.", -".&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&.", -".&&&&&&&&$#@@$&&&&&&&&&&&&&&&&&&&&&.", -".&&&&&&&&&+&$+&$&@&$@&&$@&&&&&&&&&&.", -".&&&&&&&&&+&&#@%#+@#@*$%&+$&&&&&&&&.", -".&&&&&&&&&+&&#@#@&&@*%$%$+&&&&&&&&&.", -".&&&&&&&&&+&$%&#@&#@@#&#@$&&&&&&&&&.", -".&&&&&&&&@#@@$&*@&@#@#$#*#$&&&&&&&&.", -".&&&&&&&&&&&&&&&&&&&&&$%&%$&&&&&&&&.", -".&&&&&&&&&&$#@@$&&&&&&&&&&&&&&&&&&&.", -".&&&&&&&&&&&+&$%&$$@&$@&&$@&&&&&&&&.", -".&&&&&&&&&&&+&&#@%#+@#@*$%$+$&&&&&&.", -".&&&&&&&&&&&+&&#@#@&&@*#$%$+&&&&&&&.", -".&&&&&&&&&&&+&$+&*@&#@@#&#@$&&&&&&&.", -".&&&&&&&&&&$%@@&&*@&@#@#$#*#&&&&&&&.", -".&&&&&&&&&&&&&&&&&&&&&&&$%&%$&&&&&&.", -".&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&.", -".&&&&&&&&&&&&&&$#@@$&&&&&&&&&&&&&&&.", -".&&&&&&&&&&&&&&&+&$%&$$@&$@&&$@&&&&.", -".&&&&&&&&&&&&&&&+&&#@%#+@#@*$%$+$&&.", -".&&&&&&&&&&&&&&&+&&#@#@&&@*#$%$+&&&.", -".&&&&&&&&&&&&&&&+&$+&*@&#@@#&#@$&&&.", -".&&&&&&&&&&&&&&$%@@&&*@&@#@#$#*#&&&.", -".&&&&&&&&&&&&&&&&&&&&&&&&&&&$%&%$&&.", -".&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&.", -".&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&.", -".&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&.", -"...................................."] - -trashcan_closed_xpm = [ -"64 80 17 1", -" c None", -". c #030304", -"+ c #5A5A5C", -"@ c #323231", -"# c #888888", -"$ c #1E1E1F", -"% c #767677", -"& c #494949", -"* c #9E9E9C", -"= c #111111", -"- c #3C3C3D", -"; c #6B6B6B", -"> c #949494", -", c #282828", -"' c #808080", -") c #545454", -"! c #AEAEAC", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ==......=$$...=== ", -" ..$------)+++++++++++++@$$... ", -" ..=@@-------&+++++++++++++++++++-.... ", -" =.$$@@@-&&)++++)-,$$$$=@@&+++++++++++++,..$ ", -" .$$$$@@&+++++++&$$$@@@@-&,$,-++++++++++;;;&.. ", -" $$$$,@--&++++++&$$)++++++++-,$&++++++;%%'%%;;$@ ", -" .-@@-@-&++++++++-@++++++++++++,-++++++;''%;;;%*-$ ", -" +------++++++++++++++++++++++++++++++;;%%%;;##*!. ", -" =+----+++++++++++++++++++++++;;;;;;;;;;;;%'>>). ", -" .=)&+++++++++++++++++;;;;;;;;;;;;;;%''>>#>#@. ", -" =..=&++++++++++++;;;;;;;;;;;;;%###>>###+%== ", -" .&....=-+++++%;;####''''''''''##'%%%)..#. ", -" .+-++@....=,+%#####'%%%%%%%%%;@$-@-@*++!. ", -" .+-++-+++-&-@$$=$=......$,,,@;&)+!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" =+-++-+++-+++++++++!++++!++++!+++!++!+++= ", -" $.++-+++-+++++++++!++++!++++!+++!++!+.$ ", -" =.++++++++++++++!++++!++++!+++!++.= ", -" $..+++++++++++++++!++++++...$ ", -" $$=.............=$$ ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" "] - -trashcan_open_xpm = [ -"64 80 17 1", -" c None", -". c #030304", -"+ c #5A5A5C", -"@ c #323231", -"# c #888888", -"$ c #1E1E1F", -"% c #767677", -"& c #494949", -"* c #9E9E9C", -"= c #111111", -"- c #3C3C3D", -"; c #6B6B6B", -"> c #949494", -", c #282828", -"' c #808080", -") c #545454", -"! c #AEAEAC", -" ", -" ", -" ", -" ", -" ", -" ", -" .=.==.,@ ", -" ==.,@-&&&)-= ", -" .$@,&++;;;%>*- ", -" $,-+)+++%%;;'#+. ", -" =---+++++;%%%;%##@. ", -" @)++++++++;%%%%'#%$ ", -" $&++++++++++;%%;%##@= ", -" ,-++++)+++++++;;;'#%) ", -" @+++&&--&)++++;;%'#'-. ", -" ,&++-@@,,,,-)++;;;'>'+, ", -" =-++&@$@&&&&-&+;;;%##%+@ ", -" =,)+)-,@@&+++++;;;;%##%&@ ", -" @--&&,,@&)++++++;;;;'#)@ ", -" ---&)-,@)+++++++;;;%''+, ", -" $--&)+&$-+++++++;;;%%'';- ", -" .,-&+++-$&++++++;;;%''%&= ", -" $,-&)++)-@++++++;;%''%), ", -" =,@&)++++&&+++++;%'''+$@&++++++ ", -" .$@-++++++++++++;'#';,........=$@&++++ ", -" =$@@&)+++++++++++'##-.................=&++ ", -" .$$@-&)+++++++++;%#+$.....................=)+ ", -" $$,@-)+++++++++;%;@=........................,+ ", -" .$$@@-++++++++)-)@=............................ ", -" $,@---)++++&)@===............................,. ", -" $-@---&)))-$$=..............................=)!. ", -" --&-&&,,$=,==...........................=&+++!. ", -" =,=$..=$+)+++++&@$=.............=$@&+++++!++!. ", -" .)-++-+++++++++++++++++++++++++++!++!++!. ", -" .+-++-+++++++++++++++++++++++!+++!++!++!. ", -" .+-++-+++-+++++++++!+++!!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" .+-++-+++-+++++++++!++++!++++!+++!++!++!. ", -" =+-++-+++-+++++++++!++++!++++!+++!++!+++= ", -" $.++-+++-+++++++++!++++!++++!+++!++!+.$ ", -" =.++++++++++++++!++++!++++!+++!++.= ", -" $..+++++++++++++++!++++++...$ ", -" $$==...........==$$ ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" ", -" "] diff --git a/examples/simple/hello.py b/examples/simple/hello.py deleted file mode 100755 index 79909b06..00000000 --- a/examples/simple/hello.py +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/env python - -""" Simple Hello World example similar to the GTK+ Tutorials one """ - -import gtk - -def hello(*args): - """ Callback function that is attached to the button """ - print "Hello World" - window.destroy() - -def destroy(*args): - """ Callback function that is activated when the program is destoyed """ - window.hide() - gtk.main_quit() - -# this block creates our main application window -window = gtk.Window(gtk.WINDOW_TOPLEVEL) -window.connect("destroy", destroy) -window.set_border_width(10) - -# this block creates our button and places it within the window -button = gtk.Button("Hello World") -# connects the 'hello' function to the clicked signal from the button -button.connect("clicked", hello) -window.add(button) -button.show() - -# as the button is within the window this also shows the window -window.show_all() -gtk.main() diff --git a/examples/simple/scribble.py b/examples/simple/scribble.py deleted file mode 100755 index 465effd2..00000000 --- a/examples/simple/scribble.py +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env python - -#this is a simple translation of the scribble example that comes with GTK+ - -import gtk - -pixmap = None - -def configure_event(widget, event): - global pixmap - win = widget.window - width, height = win.get_size() - pixmap = gtk.gdk.Pixmap(win, width, height) - pixmap.draw_rectangle(widget.get_style().white_gc, True, - 0, 0, width, height) - return True - -def expose_event(widget, event): - x, y, width, height = event.area - gc = widget.get_style().fg_gc[gtk.STATE_NORMAL] - widget.window.draw_drawable(gc, pixmap, x, y, x, y, width, height) - return False - -def draw_brush(widget, x, y): - x, y = int(x), int(y) - pixmap.draw_rectangle(widget.get_style().black_gc, True, - x-5, y-5, 10, 10) - widget.queue_draw() - -def button_press_event(widget, event): - if event.button == 1 and pixmap != None: - draw_brush(widget, event.x, event.y) - return True - -def motion_notify_event(widget, event): - if event.is_hint: - x, y, state = event.window.get_pointer() - else: - x = event.x; y = event.y - state = event.state - if state & gtk.gdk.BUTTON1_MASK and pixmap != None: - draw_brush(widget, x, y) - return True - -def main(): - win = gtk.Window() - win.set_name("Test Input") - win.connect("destroy", lambda w: gtk.main_quit()) - win.set_border_width(5) - - vbox = gtk.VBox(spacing=3) - win.add(vbox) - vbox.show() - - drawing_area = gtk.DrawingArea() - drawing_area.set_size_request(200, 200) - vbox.pack_start(drawing_area) - drawing_area.show() - - drawing_area.connect("expose_event", expose_event) - drawing_area.connect("configure_event", configure_event) - drawing_area.connect("motion_notify_event", motion_notify_event) - drawing_area.connect("button_press_event", button_press_event) - drawing_area.set_events(gtk.gdk.EXPOSURE_MASK | - gtk.gdk.LEAVE_NOTIFY_MASK | - gtk.gdk.BUTTON_PRESS_MASK | - gtk.gdk.POINTER_MOTION_MASK | - gtk.gdk.POINTER_MOTION_HINT_MASK) - - button = gtk.Button(stock=gtk.STOCK_QUIT) - vbox.pack_start(button, expand=False, fill=False) - button.connect("clicked", lambda widget, win=win: win.destroy()) - button.show() - win.show() - gtk.main() - -if __name__ == '__main__': - main() diff --git a/examples/simple/simple.py b/examples/simple/simple.py deleted file mode 100755 index 97858301..00000000 --- a/examples/simple/simple.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python - -# translation of the simple.c test in the gtk+ distribution, using the -# new() function from gobject (this is an example of creating objects -# with the properties interface). - -import gobject, gtk - -def hello(*args): - print "Hello World" - window.destroy() - -def destroy(*args): - window.hide() - gtk.main_quit() - -window = gobject.new(gtk.Window, - type=gtk.WINDOW_TOPLEVEL, - title='Hello World', - allow_grow=False, - allow_shrink=False, - border_width=10) -window.connect("destroy", destroy) - -button = gobject.new(gtk.Button, label="Hello World", parent=window) -button.connect("clicked", hello) - -window.show_all() -gtk.main() diff --git a/examples/simple/tooltip.py b/examples/simple/tooltip.py deleted file mode 100755 index 0ef1d2b8..00000000 --- a/examples/simple/tooltip.py +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env python - -""" Simple example of creating a basic window and button. - Also adds a tooltip. """ - -import gtk - -def hello_cb(widget, main_window): - """ Callback function that prints a message and destroys the window """ - print "Hello World" - main_window.destroy() - -def destroy_cb(widget, main_window): - """ Callback function to hide the main window and then terminate. """ - main_window.hide() - gtk.main_quit() - -def main(): - """ Sets up the application - Forms the widgets and connects callback functions to the signals """ - - window = gtk.Window( type=gtk.WINDOW_TOPLEVEL ) - window.set_title("Hello World") - window.set_default_size(200, 200) - window.set_border_width(10) - window.connect("destroy", destroy_cb, window) - - button = gtk.Button(label="Hello World") - window.add(button) - button.connect("clicked", hello_cb, window) - - # setup tooltips and associate them with the button - tt = gtk.Tooltips() - tt.set_tip(button, 'Prints "Hello World"', None) - tt.enable() - - # shows the window and any child objects (button in this example) - window.show_all() - gtk.main() - -# if we're being run normally then call the main function -if __name__ == '__main__': - main() diff --git a/gtk/Makefile.am b/gtk/Makefile.am deleted file mode 100644 index 2a5f19ec..00000000 --- a/gtk/Makefile.am +++ /dev/null @@ -1,191 +0,0 @@ -AUTOMAKE_OPTIONS = 1.7 - -PLATFORM_VERSION = 2.0 - -CLEANFILES = -EXTRA_DIST = -INCLUDES = \ - $(PYTHON_INCLUDES) \ - $(PYGOBJECT_CFLAGS) \ - -I$(srcdir)/gtk - -# defs files -defsdir = $(pkgdatadir)/$(PLATFORM_VERSION)/defs -defs_DATA = - -# python scripts & extension modules -pkgpythondir = $(pyexecdir)/gtk-2.0 -pkgpyexecdir = $(pyexecdir)/gtk-2.0 - -# gtk python extension modules -pygtkexecdir = $(pkgpyexecdir)/gtk -pygtkexec_LTLIBRARIES = - -# gtk python scripts -pygtkdir = $(pkgpythondir)/gtk -pygtk_PYTHON = \ - __init__.py \ - _lazyutils.py \ - compat.py \ - deprecation.py \ - keysyms.py - -# gtk headers -pkgincludedir = $(includedir)/pygtk-$(PLATFORM_VERSION)/pygtk -pkginclude_HEADERS = pygtk.h - -# linker flags -common_ldflags = -module -avoid-version -if PLATFORM_WIN32 -common_ldflags += -no-undefined -endif - -# gtk module -GTK_DEFS = gtk-base.defs -GDK_DEFS = gdk-base.defs -GTK_TYPES_DEFS = gtk-base-types.defs -GDK_TYPES_DEFS = gdk-base-types.defs - -GTK_2_10_DEFS = gdk-2.10.defs gtk-2.10.defs gtk-2.10-types.defs - -if HAVE_GTK_2_10 -GDK_DEFS += gdk-2.10.defs -GTK_DEFS += gtk-2.10.defs -GTK_TYPES_DEFS += gtk-2.10-types.defs -endif - -CREATEDEFS = $(PYTHON) $(top_srcdir)/codegen/createdefs.py - -GDK_OVERRIDES = \ - gdk.override \ - gdkcairo.override \ - gdkcolor.override \ - gdkdraw.override \ - gdkevent.override \ - gdkgc.override \ - gdkpixbuf.override \ - gdkrectangle.override \ - gdkwindow.override - -GTK_OVERRIDES = \ - gtk.override \ - gtkclist.override \ - gtkcontainer.override \ - gtkctree.override \ - gtkiconview.override \ - gtkstyle.override \ - gtktextview.override \ - gtktoolbar.override \ - gtktreeview.override \ - gtkwidget.override \ - gtkwindow.override - -CLEANFILES += \ - gtk.c \ - gdk.c \ - gtk.defs \ - gtk-types.defs \ - gdk.defs \ - gdk-types.defs - -EXTRA_DIST += \ - gtk-extrafuncs.defs \ - $(GDK_DEFS) \ - $(GDK_TYPES_DEFS) \ - $(GDK_OVERRIDES) \ - $(GTK_DEFS) \ - $(GTK_TYPES_DEFS) \ - $(GTK_2_10_DEFS) \ - $(GTK_OVERRIDES) - - -gdk.defs: $(GDK_DEFS) - $(CREATEDEFS) $@ $(GDK_DEFS) - -gtk.defs: $(GTK_DEFS) - $(CREATEDEFS) $@ $(GTK_DEFS) - -gdk-types.defs: $(GDK_TYPES_DEFS) - $(CREATEDEFS) $@ $(GDK_TYPES_DEFS) - -gtk-types.defs: $(GTK_TYPES_DEFS) - $(CREATEDEFS) $@ $(GTK_TYPES_DEFS) - -gdk.c: gdk-types.defs gdk.defs $(GDK_OVERRIDES) -gtk.c: gdk-types.defs gtk-types.defs gtk.defs gdk-types.defs $(GTK_OVERRIDES) -_gtk_la_CFLAGS = $(PYCAIRO_CFLAGS) $(GTK_CFLAGS) -_gtk_la_LDFLAGS = $(common_ldflags) -export-symbols-regex init_gtk -_gtk_la_LIBADD = $(GTK_LIBS) -_gtk_la_SOURCES = \ - gtk-types.c \ - gtkmodule.c \ - gtkobject-support.c \ - pygtk.h \ - pygtk-private.h \ - pygtkcellrenderer.h \ - pygtkcellrenderer.c \ - pygtktreemodel.h \ - pygtktreemodel.c -nodist__gtk_la_SOURCES = gtk.c gdk.c -if BUILD_GTK -pygtkexec_LTLIBRARIES += _gtk.la -defs_DATA += $(GDK_DEFS) $(GDK_TYPES_DEFS) $(GTK_DEFS) $(GTK_TYPES_DEFS) \ - gdk.defs gtk.defs gdk-types.defs gtk-types.defs -endif - -# libglade module -LIBGLADE_DEFS = libglade.defs -CLEANFILES += libglade.c -EXTRA_DIST += $(LIBGLADE_DEFS) libglade.override -libglade.c: $(LIBGLADE_DEFS) libglade.override gdk-types.defs gtk-types.defs -glade_la_CFLAGS = $(LIBGLADE_CFLAGS) -glade_la_LIBADD = $(LIBGLADE_LIBS) -glade_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initglade -glade_la_SOURCES = libglademodule.c -nodist_glade_la_SOURCES = libglade.c -if BUILD_LIBGLADE -pygtkexec_LTLIBRARIES += glade.la -defs_DATA += $(LIBGLADE_DEFS) -endif - -# gtkunixprint module -GTKUNIXPRINT_DEFS = gtkunixprint.defs -CLEANFILES += gtkunixprint.c -EXTRA_DIST += $(GTKUNIXPRINT_DEFS) gtkunixprint.override -gtkunixprint.c: $(GTKUNIXPRINT_DEFS) gtkunixprint.override gdk-types.defs \ - gtk-types.defs -gtkunixprint_la_CFLAGS = $(PYCAIRO_CFLAGS) $(GTKUNIXPRINT_CFLAGS) -gtkunixprint_la_LIBADD = $(GTKUNIXPRINT_LIBS) -gtkunixprint_la_LDFLAGS = $(common_ldflags) -export-symbols-regex initgtkunixprint -gtkunixprint_la_SOURCES = gtkunixprintmodule.c -nodist_gtkunixprint_la_SOURCES = gtkunixprint.c -if BUILD_GTKUNIXPRINT -pkgpyexec_LTLIBRARIES = gtkunixprint.la -defs_DATA += $(GTKUNIXPRINT_DEFS) -endif - -if PLATFORM_WIN32 -_gtk_la_CFLAGS += -DPLATFORM_WIN32 -endif - - -.defs.c: - ($(PYTHON) $(top_srcdir)/codegen/codegen.py \ - $(PYGTK_CODEGEN_DEFINES) \ - -I $(srcdir) \ - --py_ssize_t-clean \ - --register $(top_srcdir)/pango-types.defs \ - --register $(top_srcdir)/atk-types.defs \ - --register gdk-types.defs \ - --register gtk-types.defs \ - --override $(srcdir)/$*.override \ - --prefix py$* $<) > gen-$*.c \ - && cp gen-$*.c $*.c \ - && rm -f gen-$*.c - -# prevent the .defs.c rule from trying to generate gtk-types.c because -# there is gtk-types.defs. This is basically a hack and I really wish I -# could use pattern rules. Perhaps we should rename gtk-types.c. -gtk-types.c: - @: - diff --git a/gtk/__init__.py b/gtk/__init__.py deleted file mode 100644 index 82348c39..00000000 --- a/gtk/__init__.py +++ /dev/null @@ -1,139 +0,0 @@ -# -*- Mode: Python; py-indent-offset: 4 -*- -# pygtk - Python bindings for the GTK toolkit. -# Copyright (C) 1998-2003 James Henstridge -# 2004-2006 Johan Dahlin -# -# gtk/__init__.py: initialisation file for gtk package. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA - -import sys - -# this can go when things are a little further along -try: - import ltihooks - # pyflakes - ltihooks -except ImportError: - ltihooks = None - -# For broken embedded programs which forgot to call Sys_SetArgv -if not hasattr(sys, 'argv'): - sys.argv = [] - -# load the required modules: -import gobject as _gobject - -ver = getattr(_gobject, 'pygobject_version', ()) -if ver < (2, 11, 1): - raise ImportError( - "PyGTK requires PyGObject 2.11.1 or higher, but %s was found" % (ver,)) - -if 'gtk._gtk' in sys.modules: - _gtk = sys.modules['gtk._gtk'] -else: - from gtk import _gtk - -import gdk - -if ltihooks: - ltihooks.uninstall() - del ltihooks - -from gtk._lazyutils import LazyNamespace, LazyModule -from gtk.deprecation import _Deprecated, _DeprecatedConstant - -def _init(): - import sys - - try: - sys_path = sys.path[:] - - try: - _gtk.init_check() - except RuntimeError, e: - import warnings - warnings.warn(str(e), _gtk.Warning) - finally: - # init_check calls PySys_SetArgv which calls sys.path.insert(0, ''), - # which causes problems for pychecker, restore it if modified. - if sys.path != sys_path: - sys.path[:] = sys_path - - # install the default log handlers - _gtk.add_log_handlers() - -keysyms = LazyModule('keysyms', locals()) - -_init() - -# CAPI -_PyGtk_API = _gtk._PyGtk_API - -gdk.INPUT_READ = _gobject.IO_IN | _gobject.IO_HUP | _gobject.IO_ERR -gdk.INPUT_WRITE = _gobject.IO_OUT | _gobject.IO_HUP -gdk.INPUT_EXCEPTION = _gobject.IO_PRI - -# old names compatibility ... -idle_add = _Deprecated(_gobject, 'idle_add', 'idle_add', 'gobject') -idle_remove = _Deprecated(_gobject, 'source_remove', 'idle_remove', 'gobject') -timeout_add = _Deprecated(_gobject, 'timeout_add', 'timeout_add', 'gobject') -timeout_remove = _Deprecated(_gobject, 'source_remove', 'timeout_remove', - 'gobject') -input_add = _Deprecated(_gobject, 'io_add_watch', 'input_add', 'gobject') -input_add_full = _Deprecated(_gobject, 'io_add_watch', 'input_add_full', - 'gobject') -input_remove = _Deprecated(_gobject, 'source_remove', 'input_remove', 'gobject') - -mainloop = _Deprecated('gtk', 'main', 'mainloop') -mainquit = _Deprecated('gtk', 'main_quit', 'mainquit') -mainiteration = _Deprecated('gtk', 'main_iteration', - 'mainiteration') -load_font = _Deprecated(gdk, 'Font', 'load_font', 'gtk.gdk') -load_fontset = _Deprecated(gdk, 'fontset_load', 'load_fontset', - 'gtk.gdk') -create_pixmap = _Deprecated(gdk, 'Pixmap', 'create_pixmap', 'gtk.gdk') -create_pixmap_from_xpm = _Deprecated(gdk, 'pixmap_create_from_xpm', - 'pixmap_create_from_xpm', 'gtk.gdk') -create_pixmap_from_xpm_d = _Deprecated(gdk, 'pixmap_create_from_xpm_d', - 'pixmap_create_from_xpm_d', 'gtk.gdk') - -threads_init = _Deprecated(gdk, 'threads_init', 'threads_init', 'gtk.gdk') -threads_enter = _Deprecated(gdk, 'threads_enter', 'threads_enter', 'gtk.gdk') -threads_leave = _Deprecated(gdk, 'threads_leave', 'threads_leave', 'gtk.gdk') - -TRUE = _DeprecatedConstant(True, 'gtk.TRUE', 'True') -FALSE = _DeprecatedConstant(False, 'gtk.FALSE', 'False') - -# Can't figure out how to deprecate gdk.Warning -gdk.Warning = Warning - -# We don't want to export this -del _Deprecated, _DeprecatedConstant, _gobject, _init - -# Do this as late as possible, so programs like pyflakes can check -# everything above -from gtk._gtk import * - -# # For testing, so you can just turn of dynamicnamespace in gtk.override -# if hasattr(_gtk, '_get_symbol_names'): -# import gtk -# ns = LazyNamespace(_gtk, locals()) -# ns.add_submodule('glade', '_glade') -# ns.add_submodule('_gtk', 'gtk._gtk') -# sys.modules['gtk'] = ns -# sys.modules['gtk.glade'] = LazyModule('_glade', {}) - diff --git a/gtk/_lazyutils.py b/gtk/_lazyutils.py deleted file mode 100644 index 2a053134..00000000 --- a/gtk/_lazyutils.py +++ /dev/null @@ -1,84 +0,0 @@ -# -*- Mode: Python; py-indent-offset: 4 -*- -# pygtk - Python bindings for the GTK toolkit. -# Copyright (C) 2006 Johan Dahlin -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA - -# Private to PyGTK, do not use in applications - -import sys -from types import ModuleType - -class LazyModule(object): - def __init__(self, name, locals): - self._name = name - self._locals = locals - self._modname = '%s.%s' % (self._locals.get('__name__'), self._name) - - def __getattr__(self, attr): - module = __import__(self._name, self._locals, {}, ' ') - sys.modules[self._modname] = module - if attr == '__members__': - return dir(module) - return getattr(module, attr) - -class _NotLoadedMarker: - pass -_marker = _NotLoadedMarker() - -class LazyDict(dict): - def __init__(self, module): - self._module = module - dict.__init__(self) - - def __getitem__(self, name): - print name - return getattr(self._module, name) - -class LazyNamespace(ModuleType): - def __init__(self, module, locals): - ModuleType.__init__(self, locals['__name__']) - self._imports = {} - - ns = self.__dict__ - ns.update(locals) - ns['__module__'] = self - lazy_symbols = {} - for symbol in module._get_symbol_names(): - lazy_symbols[symbol] = ns[symbol] = _marker - - ns.update(__dict__=LazyDict(self), - __bases__=(ModuleType,), - add_submodule=self.add_submodule) - - def __getattribute__(_, name): - v = ns.get(name, _marker) - if v is not _marker: - return v - if name in lazy_symbols: - s = module._get_symbol(ns, name) - return s - elif name in self._imports: - m = __import__(self._imports[name], {}, {}, ' ') - ns[name] = m - return m - - raise AttributeError(name) - LazyNamespace.__getattribute__ = __getattribute__ - - def add_submodule(self, name, importname): - self._imports[name] = importname - diff --git a/gtk/compat.py b/gtk/compat.py deleted file mode 100644 index bbf2e350..00000000 --- a/gtk/compat.py +++ /dev/null @@ -1,71 +0,0 @@ -# -*- Mode: Python; py-indent-offset: 4 -*- -# pygtk - Python bindings for the GTK+ widget set. -# Copyright (C) 1998-2003 James Henstridge -# -# gtk/compat.py: half arsed compatibility code. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA - -__all__ = ['GTK', 'GDK', 'gtk'] - -from types import ModuleType as module - -def _find_mod(modname): - d = {} - exec 'import %s; mod = %s' % (modname, modname) in d - return d['mod'] - -class RemapModule(module): - def __init__(self, name, modulenames): - module.__init__(self) - self.__name__ = name - if isinstance(modulenames, str): - modulenames = [modulenames] - self.__modulenames = modulenames - self.__modules = None - def __getattr__(self, attr): - if not self.__modules: - self.__modules = map(_find_mod, self.__modulenames) - for mod in self.__modules: - try: - value = getattr(mod, attr) - setattr(self, attr, value) - return value - except AttributeError: - pass - raise AttributeError("module has no attribute '%s'" % attr) - -GTK = RemapModule('GTK', 'gtk') -GDK = RemapModule('GDK', ['gtk.gdk', 'gtk.keysyms']) - -class gtkModule(RemapModule): - def __init__(self): - RemapModule('gtk', ['gtk', 'gtk.gdk']) - self.__name__ = 'gtk' - def __getattr__(self, attr): - if attr[:3] == 'Gtk': - value = getattr(_find_mod('gtk'), attr[3:]) - setattr(self, attr, value) - return value - elif attr[:3] == 'Gdk': - value = getattr(_find_mod('gtk.gdk'), attr[3:]) - setattr(self, attr, value) - return value - else: - return RemapModule.__getattr__(self, attr) - -gtk = gtkModule() - diff --git a/gtk/deprecation.py b/gtk/deprecation.py deleted file mode 100644 index 38918268..00000000 --- a/gtk/deprecation.py +++ /dev/null @@ -1,83 +0,0 @@ -# -*- Mode: Python; py-indent-offset: 4 -*- -# pygtk - Python bindings for the GTK toolkit. -# Copyright (C) 2004-2006 Johan Dahlin -# -# gtk/deprecation.py: deprecation helpers for gtk -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA - -import os -import sys -import warnings - -from gtk._gtk import DeprecationWarning - -def _is_pydoc(): - if sys.argv: - name = os.path.basename(sys.argv[0]) - if 'pydoc' in name: - return True - - return False - -class _Deprecated: - def __init__(self, module, funcname, oldname, modulename=''): - self.module = module - self.funcname = funcname - self.oldname = oldname - if modulename: - self.modulename = modulename - else: - self.modulename = 'gtk' - - def __repr__(self): - return '' % (self.oldname) - - def __call__(self, *args, **kwargs): - if type(self.module) == str: - module = __import__(self.module, {}, {}, ' ') - else: - module = self.module - func = getattr(module, self.funcname) - if not _is_pydoc(): - message = 'gtk.%s is deprecated, use %s.%s instead' % ( - self.oldname, self.modulename, func.__name__) - # DeprecationWarning is imported from _gtk, so it's not the same - # as the one found in exceptions. - warnings.warn(message, DeprecationWarning, 2) - try: - return func(*args, **kwargs) - except TypeError, e: - raise TypeError(str(e).replace(func.__name__, self.oldname)) - -class _DeprecatedConstant: - def __init__(self, value, name, suggestion): - self._v = value - self._name = name - self._suggestion = suggestion - - def _deprecated(self, value): - if not _is_pydoc(): - message = '%s is deprecated, use %s instead' % (self._name, - self._suggestion) - warnings.warn(message, DeprecationWarning, 3) - return value - - __nonzero__ = lambda self: self._deprecated(self._v == True) - __int__ = lambda self: self._deprecated(int(self._v)) - __str__ = lambda self: self._deprecated(str(self._v)) - __repr__ = lambda self: self._deprecated(repr(self._v)) - __cmp__ = lambda self, other: self._deprecated(cmp(self._v, other)) diff --git a/gtk/gdk-2.10.defs b/gtk/gdk-2.10.defs deleted file mode 100644 index 5ddaa488..00000000 --- a/gtk/gdk-2.10.defs +++ /dev/null @@ -1,260 +0,0 @@ -;; From gdkalias.h - - - -;; From gdkcairo.h - -(define-function cairo_set_source_pixmap - (c-name "gdk_cairo_set_source_pixmap") - (return-type "none") - (parameters - '("cairo_t*" "cr") - '("GdkPixmap*" "pixmap") - '("double" "pixmap_x") - '("double" "pixmap_y") - ) -) - - - -;; From gdkcolor.h - - - -;; From gdkcursor.h - - - -;; From gdkdisplay.h - -(define-method supports_shapes - (of-object "GdkDisplay") - (c-name "gdk_display_supports_shapes") - (return-type "gboolean") -) - -(define-method supports_input_shapes - (of-object "GdkDisplay") - (c-name "gdk_display_supports_input_shapes") - (return-type "gboolean") -) - - - -;; From gdkdisplaymanager.h - - - -;; From gdkdnd.h - - - -;; From gdkdrawable.h - - - -;; From gdkenumtypes.h - - - -;; From gdkevents.h - - - -;; From gdkfont.h - - - -;; From gdkgc.h - - - -;; From gdk.h - - - -;; From gdki18n.h - - - -;; From gdkimage.h - - - -;; From gdkinput.h - - - -;; From gdkkeys.h - - - -;; From gdkkeysyms.h - - - -;; From gdkpango.h - - - -;; From gdkpixbuf.h - - - -;; From gdkpixmap.h - -(define-function pixmap_foreign_new_for_screen - (c-name "gdk_pixmap_foreign_new_for_screen") - (return-type "GdkPixmap*") - (parameters - '("GdkScreen*" "screen") - '("GdkNativeWindow" "anid") - '("gint" "width") - '("gint" "height") - '("gint" "depth") - ) -) - - - -;; From gdkprivate.h - - - -;; From gdkproperty.h - -(define-function atom_intern_static_string - (c-name "gdk_atom_intern_static_string") - (return-type "GdkAtom") - (parameters - '("const-gchar*" "atom_name") - ) -) - - - -;; From gdkregion.h - - - -;; From gdkrgb.h - - - -;; From gdkscreen.h - -(define-method is_composited - (of-object "GdkScreen") - (c-name "gdk_screen_is_composited") - (return-type "gboolean") -) - -(define-method set_font_options - (of-object "GdkScreen") - (c-name "gdk_screen_set_font_options") - (return-type "none") - (parameters - '("const-cairo_font_options_t*" "options") - ) -) - -(define-method get_font_options - (of-object "GdkScreen") - (c-name "gdk_screen_get_font_options") - (return-type "const-cairo_font_options_t*") -) - -(define-method set_resolution - (of-object "GdkScreen") - (c-name "gdk_screen_set_resolution") - (return-type "none") - (parameters - '("gdouble" "dpi") - ) -) - -(define-method get_resolution - (of-object "GdkScreen") - (c-name "gdk_screen_get_resolution") - (return-type "gdouble") -) - -(define-method get_active_window - (of-object "GdkScreen") - (c-name "gdk_screen_get_active_window") - (return-type "GdkWindow*") -) - -(define-method get_window_stack - (of-object "GdkScreen") - (c-name "gdk_screen_get_window_stack") - (return-type "GList*") -) - -(define-virtual composited_changed - (of-object "GdkScreen") - (return-type "none") -) - - - -;; From gdkselection.h - - - -;; From gdkspawn.h - - - -;; From gdktypes.h - - - -;; From gdkvisual.h - - - -;; From gdkwindow.h - -(define-method input_shape_combine_mask - (of-object "GdkWindow") - (c-name "gdk_window_input_shape_combine_mask") - (return-type "none") - (parameters - '("GdkBitmap*" "mask") - '("gint" "x") - '("gint" "y") - ) -) - -(define-method input_shape_combine_region - (of-object "GdkWindow") - (c-name "gdk_window_input_shape_combine_region") - (return-type "none") - (parameters - '("GdkRegion*" "shape_region") - '("gint" "offset_x") - '("gint" "offset_y") - ) -) - -(define-method set_child_input_shapes - (of-object "GdkWindow") - (c-name "gdk_window_set_child_input_shapes") - (return-type "none") -) - -(define-method merge_child_input_shapes - (of-object "GdkWindow") - (c-name "gdk_window_merge_child_input_shapes") - (return-type "none") -) - -(define-method get_type_hint - (of-object "GdkWindow") - (c-name "gdk_window_get_type_hint") - (return-type "GdkWindowTypeHint") -) - - - diff --git a/gtk/gdk-base-types.defs b/gtk/gdk-base-types.defs deleted file mode 100644 index 59776fbf..00000000 --- a/gtk/gdk-base-types.defs +++ /dev/null @@ -1,989 +0,0 @@ -;; -*- scheme -*- -; object definitions ... -(define-object Colormap - (in-module "Gdk") - (parent "GObject") - (c-name "GdkColormap") - (gtype-id "GDK_TYPE_COLORMAP") -) - -(define-object Device - (in-module "Gdk") - (parent "GObject") - (c-name "GdkDevice") - (gtype-id "GDK_TYPE_DEVICE") - (fields - '("gchar*" "name") - '("GdkInputSource" "source") - '("GdkInputMode" "mode") - '("gboolean" "has_cursor") - '("gint" "num_axes") - '("GdkDeviceAxis*" "axes") - '("gint" "num_keys") - '("GdkDeviceKey*" "keys") - ) -) - -(define-object Display - (in-module "Gdk") - (parent "GObject") - (c-name "GdkDisplay") - (gtype-id "GDK_TYPE_DISPLAY") -) - -(define-object DisplayManager - (in-module "Gdk") - (parent "GObject") - (c-name "GdkDisplayManager") - (gtype-id "GDK_TYPE_DISPLAY_MANAGER") -) - -(define-object DragContext - (in-module "Gdk") - (parent "GObject") - (c-name "GdkDragContext") - (gtype-id "GDK_TYPE_DRAG_CONTEXT") - (fields - '("GdkDragProtocol" "protocol") - '("gboolean" "is_source") - '("GdkWindow*" "source_window") - '("GdkWindow*" "dest_window") - '("GList*" "targets") - '("GdkDragAction" "actions") - '("GdkDragAction" "suggested_action") - '("GdkDragAction" "action") - '("guint32" "start_time") - ) -) - -(define-object Drawable - (in-module "Gdk") - (parent "GObject") - (c-name "GdkDrawable") - (gtype-id "GDK_TYPE_DRAWABLE") - (fields - '("guint32" "xid") - '("gulong*" "handle") - ) -) - -(define-object Window - (in-module "Gdk") - (parent "GdkDrawable") - (c-name "GdkWindow") - (gtype-id "GDK_TYPE_WINDOW") -) - -(define-object PangoRenderer - (in-module "Gdk") - (parent "PangoRenderer") - (c-name "GdkPangoRenderer") - (gtype-id "GDK_TYPE_PANGO_RENDERER") -) - -(define-object Pixmap - (in-module "Gdk") - (parent "GdkDrawable") - (c-name "GdkPixmap") - (gtype-id "GDK_TYPE_PIXMAP") -) - -(define-object GC - (in-module "Gdk") - (parent "GObject") - (c-name "GdkGC") - (gtype-id "GDK_TYPE_GC") -) - -(define-object Image - (in-module "Gdk") - (parent "GObject") - (c-name "GdkImage") - (gtype-id "GDK_TYPE_IMAGE") -) - -(define-object Keymap - (in-module "Gdk") - (parent "GObject") - (c-name "GdkKeymap") - (gtype-id "GDK_TYPE_KEYMAP") -) - -(define-object Pixbuf - (in-module "Gdk") - (parent "GObject") - (c-name "GdkPixbuf") - (gtype-id "GDK_TYPE_PIXBUF") - (fields -; XXXX this next one isn't a real field. added for Python bindings - '("guchar*" "pixel_array") - ) -) - -(define-object PixbufAnimation - (in-module "Gdk") - (parent "GObject") - (c-name "GdkPixbufAnimation") - (gtype-id "GDK_TYPE_PIXBUF_ANIMATION") -) - -(define-object PixbufAnimationIter - (in-module "Gdk") - (parent "GObject") - (c-name "GdkPixbufAnimationIter") - (gtype-id "GDK_TYPE_PIXBUF_ANIMATION_ITER") -) - -(define-object PixbufLoader - (in-module "Gdk") - (parent "GObject") - (c-name "GdkPixbufLoader") - (gtype-id "GDK_TYPE_PIXBUF_LOADER") -) - -(define-object PixbufSimpleAnim - (in-module "Gdk") - (parent "GdkPixbufAnimation") - (c-name "GdkPixbufSimpleAnim") - (gtype-id "GDK_TYPE_PIXBUF_SIMPLE_ANIM") -) - -(define-object PixbufSimpleAnimIter - (in-module "Gdk") - (parent "GdkPixbufAnimationIter") - (c-name "GdkPixbufSimpleAnimIter") - (gtype-id "GDK_TYPE_PIXBUF_SIMPLE_ANIM_ITER") -) - - -(define-object Screen - (in-module "Gdk") - (parent "GObject") - (c-name "GdkScreen") - (gtype-id "GDK_TYPE_SCREEN") -) - -(define-object Visual - (in-module "Gdk") - (parent "GObject") - (c-name "GdkVisual") - (gtype-id "GDK_TYPE_VISUAL") - (fields - '("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") - ) -) - - -;; Boxed types ... - -(define-boxed Event - (in-module "Gdk") - (c-name "GdkEvent") - (gtype-id "GDK_TYPE_EVENT") - (copy-func "gdk_event_copy") - (release-func "gdk_event_free") -) - -(define-boxed Font - (in-module "Gdk") - (c-name "GdkFont") - (gtype-id "GDK_TYPE_FONT") - (copy-func "gdk_font_ref") - (release-func "gdk_font_unref") - (fields - '("GdkFontType" "type") - '("gint" "ascent") - '("gint" "descent") - ) -) - -(define-boxed Color - (in-module "Gdk") - (c-name "GdkColor") - (gtype-id "GDK_TYPE_COLOR") - (copy-func "gdk_color_copy") - (release-func "gdk_color_free") - (fields - '("guint32" "pixel") - '("guint16" "red") - '("guint16" "green") - '("guint16" "blue") - ) -) - -(define-boxed Cursor - (in-module "Gdk") - (c-name "GdkCursor") - (gtype-id "GDK_TYPE_CURSOR") - (copy-func "gdk_cursor_ref") - (release-func "gdk_cursor_unref") - (fields - '("GdkCursorType" "type") - ) -) - -(define-boxed Rectangle - (in-module "Gdk") - (c-name "GdkRectangle") - (gtype-id "GDK_TYPE_RECTANGLE") - (fields - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-boxed Region - (in-module "Gdk") - (c-name "GdkRegion") - (gtype-id "PYGDK_TYPE_REGION") -) - -;; Enumerations and flags ... - -(define-enum CursorType - (in-module "Gdk") - (c-name "GdkCursorType") - (gtype-id "GDK_TYPE_CURSOR_TYPE") -; (value (name #include) (c-name #include)) - (values - '("gdk-cursor-is-pixmap" "GDK_CURSOR_IS_PIXMAP") - ) -) - -(define-flags DragAction - (in-module "Gdk") - (c-name "GdkDragAction") - (gtype-id "GDK_TYPE_DRAG_ACTION") - (values - '("default" "GDK_ACTION_DEFAULT") - '("copy" "GDK_ACTION_COPY") - '("move" "GDK_ACTION_MOVE") - '("link" "GDK_ACTION_LINK") - '("private" "GDK_ACTION_PRIVATE") - '("ask" "GDK_ACTION_ASK") - ) -) - -(define-enum DragProtocol - (in-module "Gdk") - (c-name "GdkDragProtocol") - (gtype-id "GDK_TYPE_DRAG_PROTOCOL") - (values - '("motif" "GDK_DRAG_PROTO_MOTIF") - '("xdnd" "GDK_DRAG_PROTO_XDND") - '("rootwin" "GDK_DRAG_PROTO_ROOTWIN") - '("none" "GDK_DRAG_PROTO_NONE") - '("win32-dropfiles" "GDK_DRAG_PROTO_WIN32_DROPFILES") - '("ole2" "GDK_DRAG_PROTO_OLE2") - '("local" "GDK_DRAG_PROTO_LOCAL") - ) -) - -(define-enum FilterReturn - (in-module "Gdk") - (c-name "GdkFilterReturn") - (gtype-id "GDK_TYPE_FILTER_RETURN") - (values - '("continue" "GDK_FILTER_CONTINUE") - '("translate" "GDK_FILTER_TRANSLATE") - '("remove" "GDK_FILTER_REMOVE") - ) -) - -(define-enum EventType - (in-module "Gdk") - (c-name "GdkEventType") - (gtype-id "GDK_TYPE_EVENT_TYPE") - (values - '("nothing" "GDK_NOTHING") - '("delete" "GDK_DELETE") - '("destroy" "GDK_DESTROY") - '("expose" "GDK_EXPOSE") - '("motion-notify" "GDK_MOTION_NOTIFY") - '("button-press" "GDK_BUTTON_PRESS") - '("2button-press" "GDK_2BUTTON_PRESS") - '("3button-press" "GDK_3BUTTON_PRESS") - '("button-release" "GDK_BUTTON_RELEASE") - '("key-press" "GDK_KEY_PRESS") - '("key-release" "GDK_KEY_RELEASE") - '("enter-notify" "GDK_ENTER_NOTIFY") - '("leave-notify" "GDK_LEAVE_NOTIFY") - '("focus-change" "GDK_FOCUS_CHANGE") - '("configure" "GDK_CONFIGURE") - '("map" "GDK_MAP") - '("unmap" "GDK_UNMAP") - '("property-notify" "GDK_PROPERTY_NOTIFY") - '("selection-clear" "GDK_SELECTION_CLEAR") - '("selection-request" "GDK_SELECTION_REQUEST") - '("selection-notify" "GDK_SELECTION_NOTIFY") - '("proximity-in" "GDK_PROXIMITY_IN") - '("proximity-out" "GDK_PROXIMITY_OUT") - '("drag-enter" "GDK_DRAG_ENTER") - '("drag-leave" "GDK_DRAG_LEAVE") - '("drag-motion" "GDK_DRAG_MOTION") - '("drag-status" "GDK_DRAG_STATUS") - '("drop-start" "GDK_DROP_START") - '("drop-finished" "GDK_DROP_FINISHED") - '("client-event" "GDK_CLIENT_EVENT") - '("visibility-notify" "GDK_VISIBILITY_NOTIFY") - '("no-expose" "GDK_NO_EXPOSE") - '("scroll" "GDK_SCROLL") - '("window-state" "GDK_WINDOW_STATE") - '("setting" "GDK_SETTING") - ) -) - -(define-flags EventMask - (in-module "Gdk") - (c-name "GdkEventMask") - (gtype-id "GDK_TYPE_EVENT_MASK") - (values - '("exposure-mask" "GDK_EXPOSURE_MASK") - '("pointer-motion-mask" "GDK_POINTER_MOTION_MASK") - '("pointer-motion-hint-mask" "GDK_POINTER_MOTION_HINT_MASK") - '("button-motion-mask" "GDK_BUTTON_MOTION_MASK") - '("button1-motion-mask" "GDK_BUTTON1_MOTION_MASK") - '("button2-motion-mask" "GDK_BUTTON2_MOTION_MASK") - '("button3-motion-mask" "GDK_BUTTON3_MOTION_MASK") - '("button-press-mask" "GDK_BUTTON_PRESS_MASK") - '("button-release-mask" "GDK_BUTTON_RELEASE_MASK") - '("key-press-mask" "GDK_KEY_PRESS_MASK") - '("key-release-mask" "GDK_KEY_RELEASE_MASK") - '("enter-notify-mask" "GDK_ENTER_NOTIFY_MASK") - '("leave-notify-mask" "GDK_LEAVE_NOTIFY_MASK") - '("focus-change-mask" "GDK_FOCUS_CHANGE_MASK") - '("structure-mask" "GDK_STRUCTURE_MASK") - '("property-change-mask" "GDK_PROPERTY_CHANGE_MASK") - '("visibility-notify-mask" "GDK_VISIBILITY_NOTIFY_MASK") - '("proximity-in-mask" "GDK_PROXIMITY_IN_MASK") - '("proximity-out-mask" "GDK_PROXIMITY_OUT_MASK") - '("substructure-mask" "GDK_SUBSTRUCTURE_MASK") - '("scroll-mask" "GDK_SCROLL_MASK") - '("all-events-mask" "GDK_ALL_EVENTS_MASK") - ) -) - -(define-enum VisibilityState - (in-module "Gdk") - (c-name "GdkVisibilityState") - (gtype-id "GDK_TYPE_VISIBILITY_STATE") - (values - '("unobscured" "GDK_VISIBILITY_UNOBSCURED") - '("partial" "GDK_VISIBILITY_PARTIAL") - '("fully-obscured" "GDK_VISIBILITY_FULLY_OBSCURED") - ) -) - -(define-enum ScrollDirection - (in-module "Gdk") - (c-name "GdkScrollDirection") - (gtype-id "GDK_TYPE_SCROLL_DIRECTION") - (values - '("up" "GDK_SCROLL_UP") - '("down" "GDK_SCROLL_DOWN") - '("left" "GDK_SCROLL_LEFT") - '("right" "GDK_SCROLL_RIGHT") - ) -) - -(define-enum NotifyType - (in-module "Gdk") - (c-name "GdkNotifyType") - (gtype-id "GDK_TYPE_NOTIFY_TYPE") - (values - '("ancestor" "GDK_NOTIFY_ANCESTOR") - '("virtual" "GDK_NOTIFY_VIRTUAL") - '("inferior" "GDK_NOTIFY_INFERIOR") - '("nonlinear" "GDK_NOTIFY_NONLINEAR") - '("nonlinear-virtual" "GDK_NOTIFY_NONLINEAR_VIRTUAL") - '("unknown" "GDK_NOTIFY_UNKNOWN") - ) -) - -(define-enum CrossingMode - (in-module "Gdk") - (c-name "GdkCrossingMode") - (gtype-id "GDK_TYPE_CROSSING_MODE") - (values - '("normal" "GDK_CROSSING_NORMAL") - '("grab" "GDK_CROSSING_GRAB") - '("ungrab" "GDK_CROSSING_UNGRAB") - ) -) - -(define-enum PropertyState - (in-module "Gdk") - (c-name "GdkPropertyState") - (gtype-id "GDK_TYPE_PROPERTY_STATE") - (values - '("new-value" "GDK_PROPERTY_NEW_VALUE") - '("delete" "GDK_PROPERTY_DELETE") - ) -) - -(define-flags WindowState - (in-module "Gdk") - (c-name "GdkWindowState") - (gtype-id "GDK_TYPE_WINDOW_STATE") - (values - '("withdrawn" "GDK_WINDOW_STATE_WITHDRAWN") - '("iconified" "GDK_WINDOW_STATE_ICONIFIED") - '("maximized" "GDK_WINDOW_STATE_MAXIMIZED") - '("sticky" "GDK_WINDOW_STATE_STICKY") - '("fullscreen" "GDK_WINDOW_STATE_FULLSCREEN") - '("above" "GDK_WINDOW_STATE_ABOVE") - '("below" "GDK_WINDOW_STATE_BELOW") - ) -) - -(define-enum SettingAction - (in-module "Gdk") - (c-name "GdkSettingAction") - (gtype-id "GDK_TYPE_SETTING_ACTION") - (values - '("new" "GDK_SETTING_ACTION_NEW") - '("changed" "GDK_SETTING_ACTION_CHANGED") - '("deleted" "GDK_SETTING_ACTION_DELETED") - ) -) - -(define-enum FontType - (in-module "Gdk") - (c-name "GdkFontType") - (gtype-id "GDK_TYPE_FONT_TYPE") - (values - '("font" "GDK_FONT_FONT") - '("fontset" "GDK_FONT_FONTSET") - ) -) - -(define-enum CapStyle - (in-module "Gdk") - (c-name "GdkCapStyle") - (gtype-id "GDK_TYPE_CAP_STYLE") - (values - '("not-last" "GDK_CAP_NOT_LAST") - '("butt" "GDK_CAP_BUTT") - '("round" "GDK_CAP_ROUND") - '("projecting" "GDK_CAP_PROJECTING") - ) -) - -(define-enum Fill - (in-module "Gdk") - (c-name "GdkFill") - (gtype-id "GDK_TYPE_FILL") - (values - '("solid" "GDK_SOLID") - '("tiled" "GDK_TILED") - '("stippled" "GDK_STIPPLED") - '("opaque-stippled" "GDK_OPAQUE_STIPPLED") - ) -) - -(define-enum Function - (in-module "Gdk") - (c-name "GdkFunction") - (gtype-id "GDK_TYPE_FUNCTION") - (values - '("copy" "GDK_COPY") - '("invert" "GDK_INVERT") - '("xor" "GDK_XOR") - '("clear" "GDK_CLEAR") - '("and" "GDK_AND") - '("and-reverse" "GDK_AND_REVERSE") - '("and-invert" "GDK_AND_INVERT") - '("noop" "GDK_NOOP") - '("or" "GDK_OR") - '("equiv" "GDK_EQUIV") - '("or-reverse" "GDK_OR_REVERSE") - '("copy-invert" "GDK_COPY_INVERT") - '("or-invert" "GDK_OR_INVERT") - '("nand" "GDK_NAND") - '("nor" "GDK_NOR") - '("set" "GDK_SET") - ) -) - -(define-enum JoinStyle - (in-module "Gdk") - (c-name "GdkJoinStyle") - (gtype-id "GDK_TYPE_JOIN_STYLE") - (values - '("miter" "GDK_JOIN_MITER") - '("round" "GDK_JOIN_ROUND") - '("bevel" "GDK_JOIN_BEVEL") - ) -) - -(define-enum LineStyle - (in-module "Gdk") - (c-name "GdkLineStyle") - (gtype-id "GDK_TYPE_LINE_STYLE") - (values - '("solid" "GDK_LINE_SOLID") - '("on-off-dash" "GDK_LINE_ON_OFF_DASH") - '("double-dash" "GDK_LINE_DOUBLE_DASH") - ) -) - -(define-enum SubwindowMode - (in-module "Gdk") - (c-name "GdkSubwindowMode") - (gtype-id "GDK_TYPE_SUBWINDOW_MODE") - (values - '("clip-by-children" "GDK_CLIP_BY_CHILDREN") - '("include-inferiors" "GDK_INCLUDE_INFERIORS") - ) -) - -(define-flags GCValuesMask - (in-module "Gdk") - (c-name "GdkGCValuesMask") - (gtype-id "GDK_TYPE_GC_VALUES_MASK") - (values - '("foreground" "GDK_GC_FOREGROUND") - '("background" "GDK_GC_BACKGROUND") - '("font" "GDK_GC_FONT") - '("function" "GDK_GC_FUNCTION") - '("fill" "GDK_GC_FILL") - '("tile" "GDK_GC_TILE") - '("stipple" "GDK_GC_STIPPLE") - '("clip-mask" "GDK_GC_CLIP_MASK") - '("subwindow" "GDK_GC_SUBWINDOW") - '("ts-x-origin" "GDK_GC_TS_X_ORIGIN") - '("ts-y-origin" "GDK_GC_TS_Y_ORIGIN") - '("clip-x-origin" "GDK_GC_CLIP_X_ORIGIN") - '("clip-y-origin" "GDK_GC_CLIP_Y_ORIGIN") - '("exposures" "GDK_GC_EXPOSURES") - '("line-width" "GDK_GC_LINE_WIDTH") - '("line-style" "GDK_GC_LINE_STYLE") - '("cap-style" "GDK_GC_CAP_STYLE") - '("join-style" "GDK_GC_JOIN_STYLE") - ) -) - -(define-enum ImageType - (in-module "Gdk") - (c-name "GdkImageType") - (gtype-id "GDK_TYPE_IMAGE_TYPE") - (values - '("normal" "GDK_IMAGE_NORMAL") - '("shared" "GDK_IMAGE_SHARED") - '("fastest" "GDK_IMAGE_FASTEST") - ) -) - -(define-enum ExtensionMode - (in-module "Gdk") - (c-name "GdkExtensionMode") - (gtype-id "GDK_TYPE_EXTENSION_MODE") - (values - '("none" "GDK_EXTENSION_EVENTS_NONE") - '("all" "GDK_EXTENSION_EVENTS_ALL") - '("cursor" "GDK_EXTENSION_EVENTS_CURSOR") - ) -) - -(define-enum InputSource - (in-module "Gdk") - (c-name "GdkInputSource") - (gtype-id "GDK_TYPE_INPUT_SOURCE") - (values - '("mouse" "GDK_SOURCE_MOUSE") - '("pen" "GDK_SOURCE_PEN") - '("eraser" "GDK_SOURCE_ERASER") - '("cursor" "GDK_SOURCE_CURSOR") - ) -) - -(define-enum InputMode - (in-module "Gdk") - (c-name "GdkInputMode") - (gtype-id "GDK_TYPE_INPUT_MODE") - (values - '("disabled" "GDK_MODE_DISABLED") - '("screen" "GDK_MODE_SCREEN") - '("window" "GDK_MODE_WINDOW") - ) -) - -(define-enum AxisUse - (in-module "Gdk") - (c-name "GdkAxisUse") - (gtype-id "GDK_TYPE_AXIS_USE") - (values - '("ignore" "GDK_AXIS_IGNORE") - '("x" "GDK_AXIS_X") - '("y" "GDK_AXIS_Y") - '("pressure" "GDK_AXIS_PRESSURE") - '("xtilt" "GDK_AXIS_XTILT") - '("ytilt" "GDK_AXIS_YTILT") - '("wheel" "GDK_AXIS_WHEEL") - '("last" "GDK_AXIS_LAST") - ) -) - -(define-enum PropMode - (in-module "Gdk") - (c-name "GdkPropMode") - (gtype-id "GDK_TYPE_PROP_MODE") - (values - '("replace" "GDK_PROP_MODE_REPLACE") - '("prepend" "GDK_PROP_MODE_PREPEND") - '("append" "GDK_PROP_MODE_APPEND") - ) -) - -(define-enum FillRule - (in-module "Gdk") - (c-name "GdkFillRule") - (gtype-id "GDK_TYPE_FILL_RULE") - (values - '("even-odd-rule" "GDK_EVEN_ODD_RULE") - '("winding-rule" "GDK_WINDING_RULE") - ) -) - -(define-enum OverlapType - (in-module "Gdk") - (c-name "GdkOverlapType") - (gtype-id "GDK_TYPE_OVERLAP_TYPE") - (values - '("in" "GDK_OVERLAP_RECTANGLE_IN") - '("out" "GDK_OVERLAP_RECTANGLE_OUT") - '("part" "GDK_OVERLAP_RECTANGLE_PART") - ) -) - -(define-enum RgbDither - (in-module "Gdk") - (c-name "GdkRgbDither") - (gtype-id "GDK_TYPE_RGB_DITHER") - (values - '("none" "GDK_RGB_DITHER_NONE") - '("normal" "GDK_RGB_DITHER_NORMAL") - '("max" "GDK_RGB_DITHER_MAX") - ) -) - -(define-enum ByteOrder - (in-module "Gdk") - (c-name "GdkByteOrder") - (gtype-id "GDK_TYPE_BYTE_ORDER") - (values - '("lsb-first" "GDK_LSB_FIRST") - '("msb-first" "GDK_MSB_FIRST") - ) -) - -(define-flags ModifierType - (in-module "Gdk") - (c-name "GdkModifierType") - (gtype-id "GDK_TYPE_MODIFIER_TYPE") - (values - '("shift-mask" "GDK_SHIFT_MASK") - '("lock-mask" "GDK_LOCK_MASK") - '("control-mask" "GDK_CONTROL_MASK") - '("mod1-mask" "GDK_MOD1_MASK") - '("mod2-mask" "GDK_MOD2_MASK") - '("mod3-mask" "GDK_MOD3_MASK") - '("mod4-mask" "GDK_MOD4_MASK") - '("mod5-mask" "GDK_MOD5_MASK") - '("button1-mask" "GDK_BUTTON1_MASK") - '("button2-mask" "GDK_BUTTON2_MASK") - '("button3-mask" "GDK_BUTTON3_MASK") - '("button4-mask" "GDK_BUTTON4_MASK") - '("button5-mask" "GDK_BUTTON5_MASK") - '("release-mask" "GDK_RELEASE_MASK") - '("modifier-mask" "GDK_MODIFIER_MASK") - ) -) - -(define-flags InputCondition - (in-module "Gdk") - (c-name "GdkInputCondition") - (gtype-id "GDK_TYPE_INPUT_CONDITION") - (values - '("read" "GDK_INPUT_READ") - '("write" "GDK_INPUT_WRITE") - '("exception" "GDK_INPUT_EXCEPTION") - ) -) - -(define-enum Status - (in-module "Gdk") - (c-name "GdkStatus") - (gtype-id "GDK_TYPE_STATUS") - (values - '("ok" "GDK_OK") - '("error" "GDK_ERROR") - '("error-param" "GDK_ERROR_PARAM") - '("error-file" "GDK_ERROR_FILE") - '("error-mem" "GDK_ERROR_MEM") - ) -) - -(define-enum GrabStatus - (in-module "Gdk") - (c-name "GdkGrabStatus") - (gtype-id "GDK_TYPE_GRAB_STATUS") - (values - '("success" "GDK_GRAB_SUCCESS") - '("already-grabbed" "GDK_GRAB_ALREADY_GRABBED") - '("invalid-time" "GDK_GRAB_INVALID_TIME") - '("not-viewable" "GDK_GRAB_NOT_VIEWABLE") - '("frozen" "GDK_GRAB_FROZEN") - ) -) - -(define-enum VisualType - (in-module "Gdk") - (c-name "GdkVisualType") - (gtype-id "GDK_TYPE_VISUAL_TYPE") - (values - '("static-gray" "GDK_VISUAL_STATIC_GRAY") - '("grayscale" "GDK_VISUAL_GRAYSCALE") - '("static-color" "GDK_VISUAL_STATIC_COLOR") - '("pseudo-color" "GDK_VISUAL_PSEUDO_COLOR") - '("true-color" "GDK_VISUAL_TRUE_COLOR") - '("direct-color" "GDK_VISUAL_DIRECT_COLOR") - ) -) - -(define-enum WindowClass - (in-module "Gdk") - (c-name "GdkWindowClass") - (gtype-id "GDK_TYPE_WINDOW_CLASS") - (values - '("utput" "GDK_INPUT_OUTPUT") - '("nly" "GDK_INPUT_ONLY") - ) -) - -(define-enum WindowType - (in-module "Gdk") - (c-name "GdkWindowType") - (gtype-id "GDK_TYPE_WINDOW_TYPE") - (values - '("root" "GDK_WINDOW_ROOT") - '("toplevel" "GDK_WINDOW_TOPLEVEL") - '("child" "GDK_WINDOW_CHILD") - '("dialog" "GDK_WINDOW_DIALOG") - '("temp" "GDK_WINDOW_TEMP") - '("foreign" "GDK_WINDOW_FOREIGN") - ) -) - -(define-flags WindowAttributesType - (in-module "Gdk") - (c-name "GdkWindowAttributesType") - (gtype-id "GDK_TYPE_WINDOW_ATTRIBUTES_TYPE") - (values - '("title" "GDK_WA_TITLE") - '("x" "GDK_WA_X") - '("y" "GDK_WA_Y") - '("cursor" "GDK_WA_CURSOR") - '("colormap" "GDK_WA_COLORMAP") - '("visual" "GDK_WA_VISUAL") - '("wmclass" "GDK_WA_WMCLASS") - '("noredir" "GDK_WA_NOREDIR") - ) -) - -(define-flags WindowHints - (in-module "Gdk") - (c-name "GdkWindowHints") - (gtype-id "GDK_TYPE_WINDOW_HINTS") - (values - '("pos" "GDK_HINT_POS") - '("min-size" "GDK_HINT_MIN_SIZE") - '("max-size" "GDK_HINT_MAX_SIZE") - '("base-size" "GDK_HINT_BASE_SIZE") - '("aspect" "GDK_HINT_ASPECT") - '("resize-inc" "GDK_HINT_RESIZE_INC") - '("win-gravity" "GDK_HINT_WIN_GRAVITY") - '("user-pos" "GDK_HINT_USER_POS") - '("user-size" "GDK_HINT_USER_SIZE") - ) -) - -(define-enum WindowTypeHint - (in-module "Gdk") - (c-name "GdkWindowTypeHint") - (gtype-id "GDK_TYPE_WINDOW_TYPE_HINT") - (values - '("normal" "GDK_WINDOW_TYPE_HINT_NORMAL") - '("dialog" "GDK_WINDOW_TYPE_HINT_DIALOG") - '("menu" "GDK_WINDOW_TYPE_HINT_MENU") - '("toolbar" "GDK_WINDOW_TYPE_HINT_TOOLBAR") - '("splashscreen" "GDK_WINDOW_TYPE_HINT_SPLASHSCREEN") - '("utility" "GDK_WINDOW_TYPE_HINT_UTILITY") - '("dock" "GDK_WINDOW_TYPE_HINT_DOCK") - '("desktop" "GDK_WINDOW_TYPE_HINT_DESKTOP") - ) -) - -(define-flags WMDecoration - (in-module "Gdk") - (c-name "GdkWMDecoration") - (gtype-id "GDK_TYPE_WM_DECORATION") - (values - '("all" "GDK_DECOR_ALL") - '("border" "GDK_DECOR_BORDER") - '("resizeh" "GDK_DECOR_RESIZEH") - '("title" "GDK_DECOR_TITLE") - '("menu" "GDK_DECOR_MENU") - '("minimize" "GDK_DECOR_MINIMIZE") - '("maximize" "GDK_DECOR_MAXIMIZE") - ) -) - -(define-flags WMFunction - (in-module "Gdk") - (c-name "GdkWMFunction") - (gtype-id "GDK_TYPE_WM_FUNCTION") - (values - '("all" "GDK_FUNC_ALL") - '("resize" "GDK_FUNC_RESIZE") - '("move" "GDK_FUNC_MOVE") - '("minimize" "GDK_FUNC_MINIMIZE") - '("maximize" "GDK_FUNC_MAXIMIZE") - '("close" "GDK_FUNC_CLOSE") - ) -) - -(define-enum Gravity - (in-module "Gdk") - (c-name "GdkGravity") - (gtype-id "GDK_TYPE_GRAVITY") - (values - '("north-west" "GDK_GRAVITY_NORTH_WEST") - '("north" "GDK_GRAVITY_NORTH") - '("north-east" "GDK_GRAVITY_NORTH_EAST") - '("west" "GDK_GRAVITY_WEST") - '("center" "GDK_GRAVITY_CENTER") - '("east" "GDK_GRAVITY_EAST") - '("south-west" "GDK_GRAVITY_SOUTH_WEST") - '("south" "GDK_GRAVITY_SOUTH") - '("south-east" "GDK_GRAVITY_SOUTH_EAST") - '("static" "GDK_GRAVITY_STATIC") - ) -) - -(define-enum WindowEdge - (in-module "Gdk") - (c-name "GdkWindowEdge") - (gtype-id "GDK_TYPE_WINDOW_EDGE") - (values - '("north-west" "GDK_WINDOW_EDGE_NORTH_WEST") - '("north" "GDK_WINDOW_EDGE_NORTH") - '("north-east" "GDK_WINDOW_EDGE_NORTH_EAST") - '("west" "GDK_WINDOW_EDGE_WEST") - '("east" "GDK_WINDOW_EDGE_EAST") - '("south-west" "GDK_WINDOW_EDGE_SOUTH_WEST") - '("south" "GDK_WINDOW_EDGE_SOUTH") - '("south-east" "GDK_WINDOW_EDGE_SOUTH_EAST") - ) -) - -(define-enum PixbufAlphaMode - (in-module "Gdk") - (c-name "GdkPixbufAlphaMode") - (gtype-id "GDK_TYPE_PIXBUF_ALPHA_MODE") - (values - '("bilevel" "GDK_PIXBUF_ALPHA_BILEVEL") - '("full" "GDK_PIXBUF_ALPHA_FULL") - ) -) - -(define-enum Colorspace - (in-module "Gdk") - (c-name "GdkColorspace") - (gtype-id "GDK_TYPE_COLORSPACE") - (values - '("b" "GDK_COLORSPACE_RGB") - ) -) - -(define-enum PixbufError - (in-module "Gdk") - (c-name "GdkPixbufError") - (gtype-id "GDK_TYPE_PIXBUF_ERROR") - (values - '("header-corrupt" "GDK_PIXBUF_ERROR_HEADER_CORRUPT") - '("pixel-corrupt" "GDK_PIXBUF_ERROR_PIXEL_CORRUPT") - '("unknown-format" "GDK_PIXBUF_ERROR_UNKNOWN_FORMAT") - '("corrupt-image" "GDK_PIXBUF_ERROR_CORRUPT_IMAGE") - '("insufficient-memory" "GDK_PIXBUF_ERROR_INSUFFICIENT_MEMORY") - '("bad-option-value" "GDK_PIXBUF_ERROR_BAD_OPTION_VALUE") - '("unknown-type" "GDK_PIXBUF_ERROR_UNKNOWN_TYPE") - '("unsupported-operation" "GDK_PIXBUF_ERROR_UNSUPPORTED_OPERATION") - '("failed" "GDK_PIXBUF_ERROR_FAILED") - ) -) - -(define-enum PixbufRotation - (in-module "Gdk") - (c-name "GdkPixbufRotation") - (gtype-id "GDK_TYPE_PIXBUF_ROTATION") - (values - '("none" "GDK_PIXBUF_ROTATE_NONE") - '("counterclockwise" "GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE") - '("upsidedown" "GDK_PIXBUF_ROTATE_UPSIDEDOWN") - '("clockwise" "GDK_PIXBUF_ROTATE_CLOCKWISE") - ) -) - -(define-enum InterpType - (in-module "Gdk") - (c-name "GdkInterpType") - (gtype-id "GDK_TYPE_INTERP_TYPE") - (values - '("nearest" "GDK_INTERP_NEAREST") - '("tiles" "GDK_INTERP_TILES") - '("bilinear" "GDK_INTERP_BILINEAR") - '("hyper" "GDK_INTERP_HYPER") - ) -) - -(define-enum OwnerChange - (in-module "Gdk") - (c-name "GdkOwnerChange") - (gtype-id "GDK_TYPE_OWNER_CHANGE") - (values - '("new-owner" "GDK_OWNER_CHANGE_NEW_OWNER") - '("destroy" "GDK_OWNER_CHANGE_DESTROY") - '("close" "GDK_OWNER_CHANGE_CLOSE") - ) -) - -(define-object PixmapObject - (in-module "Gdk") - (parent "GdkDrawable") - (c-name "GdkPixmapObject") - (gtype-id "GDK_TYPE_PIXMAP_OBJECT") -) - -(define-object WindowObject - (in-module "Gdk") - (parent "GdkDrawable") - (c-name "GdkWindowObject") - (gtype-id "GDK_TYPE_WINDOW_OBJECT") - -) diff --git a/gtk/gdk-base.defs b/gtk/gdk-base.defs deleted file mode 100644 index 26e68dce..00000000 --- a/gtk/gdk-base.defs +++ /dev/null @@ -1,6809 +0,0 @@ -;; -*- scheme -*- - -(include "gdk-base-types.defs") - -;; From /opt/gtk2/include/gtk-2.0/gdk/gdk.h - -(define-function notify_startup_complete - (c-name "gdk_notify_startup_complete") - (return-type "none") -) - -(define-function get_display_arg_name - (c-name "gdk_get_display_arg_name") - (return-type "const-gchar*") -) - -(define-function get_program_class - (c-name "gdk_get_program_class") - (return-type "const-gchar*") -) - -(define-function set_program_class - (c-name "gdk_set_program_class") - (parameters - '("const-gchar*" "program_class") - ) -) - -(define-function get_display - (c-name "gdk_get_display") - (return-type "const-gchar*") -) - -(define-function pointer_grab - (c-name "gdk_pointer_grab") - (return-type "GdkGrabStatus") - (parameters - '("GdkWindow*" "window") - '("gboolean" "owner_events" (null-ok) (default "FALSE")) - '("GdkEventMask" "event_mask" (null-ok) (default "0")) - '("GdkWindow*" "confine_to" (null-ok) (default "NULL")) - '("GdkCursor*" "cursor" (null-ok) (default "NULL")) - '("guint32" "time" (null-ok) (default "GDK_CURRENT_TIME")) - ) -) - -(define-function pointer_ungrab - (c-name "gdk_pointer_ungrab") - (return-type "none") - (parameters - '("guint32" "time" (null-ok) (default "GDK_CURRENT_TIME")) - ) -) - -(define-function keyboard_grab - (c-name "gdk_keyboard_grab") - (return-type "GdkGrabStatus") - (parameters - '("GdkWindow*" "window") - '("gboolean" "owner_events" (null-ok) (default "FALSE")) - '("guint32" "time" (null-ok) (default "GDK_CURRENT_TIME")) - ) -) - -(define-function keyboard_ungrab - (c-name "gdk_keyboard_ungrab") - (return-type "none") - (parameters - '("guint32" "time" (null-ok) (default "GDK_CURRENT_TIME")) - ) -) - -(define-function pointer_is_grabbed - (c-name "gdk_pointer_is_grabbed") - (return-type "gboolean") -) - -(define-function screen_width - (c-name "gdk_screen_width") - (return-type "gint") -) - -(define-function screen_height - (c-name "gdk_screen_height") - (return-type "gint") -) - -(define-function screen_width_mm - (c-name "gdk_screen_width_mm") - (return-type "gint") -) - -(define-function screen_height_mm - (c-name "gdk_screen_height_mm") - (return-type "gint") -) - -(define-function flush - (c-name "gdk_flush") - (return-type "none") -) - -(define-function beep - (c-name "gdk_beep") - (return-type "none") -) - -(define-function set_double_click_time - (c-name "gdk_set_double_click_time") - (return-type "none") - (parameters - '("guint" "msec") - ) -) - -(define-function threads_enter - (c-name "gdk_threads_enter") - (return-type "none") -) - -(define-function threads_leave - (c-name "gdk_threads_leave") - (return-type "none") -) - -(define-function threads_init - (c-name "gdk_threads_init") - (return-type "none") -) - -(define-function parse_args - (c-name "gdk_parse_args") - (return-type "none") - (parameters - '("gint*" "argc") - '("gchar***" "argv") - ) -) - -(define-function init - (c-name "gdk_init") - (return-type "none") - (parameters - '("gint*" "argc") - '("gchar***" "argv") - ) -) - -(define-function init_check - (c-name "gdk_init_check") - (return-type "gboolean") - (parameters - '("gint*" "argc") - '("gchar***" "argv") - ) -) - -(define-function add_option_entries_libgtk_only - (c-name "gdk_add_option_entries_libgtk_only") - (return-type "none") - (parameters - '("GOptionGroup*" "group") - ) -) - -(define-function pre_parse_libgtk_only - (c-name "gdk_pre_parse_libgtk_only") - (return-type "none") -) - -(define-function exit - (c-name "gdk_exit") - (return-type "none") - (parameters - '("gint" "error_code") - ) -) - -(define-function set_locale - (c-name "gdk_set_locale") - (return-type "gchar*") -) - -(define-function error_trap_push - (c-name "gdk_error_trap_push") - (return-type "none") -) - -(define-function error_trap_pop - (c-name "gdk_error_trap_pop") - (return-type "gint") -) - -(define-function set_use_xshm - (c-name "gdk_set_use_xshm") - (return-type "none") - (parameters - '("gboolean" "use_xshm") - ) -) - -(define-function get_use_xshm - (c-name "gdk_get_use_xshm") - (return-type "gboolean") -) - -(define-function input_add_full - (c-name "gdk_input_add_full") - (return-type "gint") - (parameters - '("gint" "source") - '("GdkInputCondition" "condition") - '("GdkInputFunction" "function") - '("gpointer" "data") - '("GdkDestroyNotify" "destroy") - ) -) - -(define-function input_add - (c-name "gdk_input_add") - (return-type "gint") - (parameters - '("gint" "source") - '("GdkInputCondition" "condition") - '("GdkInputFunction" "function") - '("gpointer" "data") - ) -) - -(define-function input_remove - (c-name "gdk_input_remove") - (return-type "none") - (parameters - '("gint" "tag") - ) -) - -(define-function pointer_grab_info_libgtk_only - (c-name "gdk_pointer_grab_info_libgtk_only") - (return-type "gboolean") - (parameters - '("GdkDisplay*" "display") - '("GdkWindow**" "grab_window") - '("gboolean*" "owner_events") - ) -) - -(define-function keyboard_grab_info_libgtk_only - (c-name "gdk_keyboard_grab_info_libgtk_only") - (return-type "gboolean") - (parameters - '("GdkDisplay*" "display") - '("GdkWindow**" "grab_window") - '("gboolean*" "owner_events") - ) -) - -(define-function rectangle_get_type - (c-name "gdk_rectangle_get_type") - (return-type "GType") -) - -(define-function wcstombs - (c-name "gdk_wcstombs") - (return-type "gchar*") - (parameters - '("const-GdkWChar*" "src") - ) -) - -(define-function mbstowcs - (c-name "gdk_mbstowcs") - (return-type "gint") - (parameters - '("GdkWChar*" "dest") - '("const-gchar*" "src") - '("gint" "dest_max") - ) -) - -(define-method send_client_message - (of-object "GdkEvent") - (c-name "gdk_event_send_client_message") - (return-type "gboolean") - (parameters - '("GdkNativeWindow" "winid") - ) -) - -(define-method send_clientmessage_toall - (of-object "GdkEvent") - (c-name "gdk_event_send_clientmessage_toall") - (return-type "none") -) - -(define-function event_send_client_message_for_display - (c-name "gdk_event_send_client_message_for_display") - (return-type "gboolean") - (parameters - '("GdkDisplay*" "display") - '("GdkEvent*" "event") - '("GdkNativeWindow" "winid") - ) -) - -(define-function threads_set_lock_functions - (c-name "gdk_threads_set_lock_functions") - (return-type "none") - (parameters - '("GCallback" "enter_fn") - '("GCallback" "leave_fn") - ) -) - -;; From /opt/gtk2/include/gtk-2.0/gdk/gdkcolor.h - -(define-method ref - (of-object "GdkColormap") - (c-name "gdk_colormap_ref") - (return-type "GdkColormap*") -) - -(define-method unref - (of-object "GdkColormap") - (c-name "gdk_colormap_unref") - (return-type "none") -) - -(define-method change - (of-object "GdkColormap") - (deprecated "deprecated") - (c-name "gdk_colormap_change") - (return-type "none") - (parameters - '("gint" "ncolors") - ) -) - -(define-method alloc_colors - (of-object "GdkColormap") - (c-name "gdk_colormap_alloc_colors") - (return-type "gint") - (parameters - '("GdkColor*" "colors") - '("gint" "ncolors") - '("gboolean" "writeable") - '("gboolean" "best_match") - '("gboolean*" "success") - ) -) - -(define-method free_colors - (of-object "GdkColormap") - (c-name "gdk_colormap_free_colors") - (return-type "none") - (parameters - '("GdkColor*" "colors") - '("gint" "ncolors") - ) -) - -(define-method copy - (of-object "GdkColor") - (c-name "gdk_color_copy") - (return-type "GdkColor*") -) - -(define-method free - (of-object "GdkColor") - (c-name "gdk_color_free") - (return-type "none") -) - -(define-method hash - (of-object "GdkColor") - (c-name "gdk_color_hash") - (return-type "guint") -) - -(define-method equal - (of-object "GdkColor") - (c-name "gdk_color_equal") - (return-type "gboolean") - (parameters - '("const-GdkColor*" "colorb") - ) -) - -(define-function color_get_type - (c-name "gdk_color_get_type") - (return-type "GType") -) - -(define-function colors_store - (c-name "gdk_colors_store") - (return-type "none") - (parameters - '("GdkColormap*" "colormap") - '("GdkColor*" "colors") - '("gint" "ncolors") - ) -) - -(define-function colors_alloc - (c-name "gdk_colors_alloc") - (return-type "gint") - (parameters - '("GdkColormap*" "colormap") - '("gboolean" "contiguous") - '("gulong*" "planes") - '("gint" "nplanes") - '("gulong*" "pixels") - '("gint" "npixels") - ) -) - -(define-function colors_free - (c-name "gdk_colors_free") - (return-type "none") - (parameters - '("GdkColormap*" "colormap") - '("gulong*" "pixels") - '("gint" "npixels") - '("gulong" "planes") - ) -) - -(define-function color_new - (c-name "gdk_color_new") - (is-constructor-of "GdkColor") - (return-type "GdkColor") -) - -(define-function colormap_get_type - (c-name "gdk_colormap_get_type") - (return-type "GType") -) - -(define-function colormap_new - (c-name "gdk_colormap_new") - (is-constructor-of GdkColormap) - (return-type "GdkColormap*") - (parameters - '("GdkVisual*" "visual") - '("gboolean" "allocate") - ) -) - -(define-function colormap_get_system - (c-name "gdk_colormap_get_system") - (return-type "GdkColormap*") -) - -(define-function colormap_get_system_size - (deprecated "deprecated") - (c-name "gdk_colormap_get_system_size") - (return-type "gint") -) - -(define-method alloc_color - (of-object "GdkColormap") - (c-name "gdk_colormap_alloc_color") - (return-type "gboolean") - (parameters - '("GdkColor*" "color") - '("gboolean" "writeable") - '("gboolean" "best_match") - ) -) - -(define-method query_color - (of-object "GdkColormap") - (c-name "gdk_colormap_query_color") - (parameters - '("gulong" "pixel") - '("GdkColor*" "color") - ) -) - -(define-method get_visual - (of-object "GdkColormap") - (c-name "gdk_colormap_get_visual") - (return-type "GdkVisual*") -) - -(define-method get_screen - (of-object "GdkColormap") - (c-name "gdk_colormap_get_screen") - (return-type "GdkScreen*") -) - -(define-function color_parse - (c-name "gdk_color_parse") - (return-type "gint") - (parameters - '("const-gchar*" "spec") - '("GdkColor*" "color") - ) -) - -(define-method white - (deprecated "deprecated") - (of-object "GdkColormap") - (c-name "gdk_color_white") - (return-type "gint") - (parameters - '("GdkColor*" "color") - ) -) - -(define-method black - (deprecated "deprecated") - (of-object "GdkColormap") - (c-name "gdk_color_black") - (return-type "gint") - (parameters - '("GdkColor*" "color") - ) -) - -(define-method alloc - (deprecated "deprecated") - (of-object "GdkColormap") - (c-name "gdk_color_alloc") - (return-type "gint") - (parameters - '("GdkColor*" "color") - ) -) - -(define-function color_change - (deprecated "deprecated") - (c-name "gdk_color_change") - (return-type "gint") - (parameters - '("GdkColormap*" "colormap") - '("GdkColor*" "color") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gdk/gdkcursor.h - -;; From gdkcursor.h - -(define-function cursor_get_type - (c-name "gdk_cursor_get_type") - (return-type "GType") -) - -(define-method ref - (of-object "GdkCursor") - (c-name "gdk_cursor_ref") - (return-type "GdkCursor*") -) - -(define-method unref - (of-object "GdkCursor") - (c-name "gdk_cursor_unref") - (return-type "none") -) - -(define-function cursor_new_from_name - (c-name "gdk_cursor_new_from_name") - (return-type "GdkCursor*") - (parameters - '("GdkDisplay*" "display") - '("const-gchar*" "name") - ) -) - -(define-method get_image - (of-object "GdkCursor") - (c-name "gdk_cursor_get_image") - (return-type "GdkPixbuf*") -) - - -(define-function cursor_new - (is-constructor-of GdkCursor) - (c-name "gdk_cursor_new") - (return-type "GdkCursor*") - (parameters - '("GdkCursorType" "cursor_type") - ) -) - -(define-function cursor_new_for_display - (is-constructor-of GdkCursor) - (c-name "gdk_cursor_new_for_display") - (return-type "GdkCursor*") - (parameters - '("GdkDisplay*" "display") - '("GdkCursorType" "cursor_type") - ) -) - -(define-function cursor_new_from_pixmap - (is-constructor-of GdkCursor) - (c-name "gdk_cursor_new_from_pixmap") - (return-type "GdkCursor*") - (parameters - '("GdkPixmap*" "source") - '("GdkPixmap*" "mask") - '("GdkColor*" "fg") - '("GdkColor*" "bg") - '("gint" "x") - '("gint" "y") - ) -) - -(define-function cursor_new_from_pixbuf - (is-constructor-of GdkCursor) - (c-name "gdk_cursor_new_from_pixbuf") - (return-type "GdkCursor*") - (parameters - '("GdkDisplay*" "display") - '("GdkPixbuf*" "source") - '("gint" "x") - '("gint" "y") - ) -) - -(define-method get_display - (of-object "GdkCursor") - (c-name "gdk_cursor_get_display") - (return-type "GdkDisplay*") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gdk/gdkdisplay.h - -(define-function gdk_display_get_type - (c-name "gdk_display_get_type") - (return-type "GType") -) - -(define-function display_open - (is-constructor-of "GdkDisplay") - (c-name "gdk_display_open") - (return-type "GdkDisplay*") - (parameters - '("const-gchar*" "display_name" (null-ok)) - ) -) - -(define-method get_name - (of-object "GdkDisplay") - (c-name "gdk_display_get_name") - (return-type "const-gchar*") -) - -(define-method get_n_screens - (of-object "GdkDisplay") - (c-name "gdk_display_get_n_screens") - (return-type "gint") -) - -(define-method get_screen - (of-object "GdkDisplay") - (c-name "gdk_display_get_screen") - (return-type "GdkScreen*") - (parameters - '("gint" "screen_num") - ) -) - -(define-method get_default_screen - (of-object "GdkDisplay") - (c-name "gdk_display_get_default_screen") - (return-type "GdkScreen*") -) - -(define-method pointer_ungrab - (of-object "GdkDisplay") - (c-name "gdk_display_pointer_ungrab") - (return-type "none") - (parameters - '("guint32" "time_" (default "GDK_CURRENT_TIME")) - ) -) - -(define-method keyboard_ungrab - (of-object "GdkDisplay") - (c-name "gdk_display_keyboard_ungrab") - (return-type "none") - (parameters - '("guint32" "time_" (default "GDK_CURRENT_TIME")) - ) -) - -(define-method pointer_is_grabbed - (of-object "GdkDisplay") - (c-name "gdk_display_pointer_is_grabbed") - (return-type "gboolean") -) - -(define-method beep - (of-object "GdkDisplay") - (c-name "gdk_display_beep") - (return-type "none") -) - -(define-method sync - (of-object "GdkDisplay") - (c-name "gdk_display_sync") - (return-type "none") -) - -(define-method close - (of-object "GdkDisplay") - (c-name "gdk_display_close") - (return-type "none") -) - -(define-method list_devices - (of-object "GdkDisplay") - (c-name "gdk_display_list_devices") - (return-type "GList*") -) - -(define-method get_event - (of-object "GdkDisplay") - (c-name "gdk_display_get_event") - (return-type "GdkEvent*") -) - -(define-method peek_event - (of-object "GdkDisplay") - (c-name "gdk_display_peek_event") - (return-type "GdkEvent*") -) - -(define-method put_event - (of-object "GdkDisplay") - (c-name "gdk_display_put_event") - (return-type "none") - (parameters - '("GdkEvent*" "event") - ) -) - -(define-method add_client_message_filter - (of-object "GdkDisplay") - (c-name "gdk_display_add_client_message_filter") - (return-type "none") - (parameters - '("GdkAtom" "message_type") - '("GdkFilterFunc" "func") - '("gpointer" "data") - ) -) - -(define-method set_double_click_time - (of-object "GdkDisplay") - (c-name "gdk_display_set_double_click_time") - (return-type "none") - (parameters - '("guint" "msec") - ) -) - -(define-function display_get_default - (c-name "gdk_display_get_default") - (return-type "GdkDisplay*") -) - -(define-method get_core_pointer - (of-object "GdkDisplay") - (c-name "gdk_display_get_core_pointer") - (return-type "GdkDevice*") -) - -(define-method get_pointer - (of-object "GdkDisplay") - (c-name "gdk_display_get_pointer") - (return-type "none") - (parameters - '("GdkScreen**" "screen") - '("gint*" "x") - '("gint*" "y") - '("GdkModifierType*" "mask") - ) -) - -(define-method get_window_at_pointer - (of-object "GdkDisplay") - (c-name "gdk_display_get_window_at_pointer") - (return-type "GdkWindow*") - (parameters - '("gint*" "win_x") - '("gint*" "win_y") - ) -) - -(define-method set_pointer_hooks - (of-object "GdkDisplay") - (c-name "gdk_display_set_pointer_hooks") - (return-type "GdkDisplayPointerHooks*") - (parameters - '("const-GdkDisplayPointerHooks*" "new_hooks") - ) -) - -(define-method store_clipboard - (of-object "GdkDisplay") - (c-name "gdk_display_store_clipboard") - (return-type "none") - (parameters - '("GdkWindow*" "clipboard_window") - '("guint32" "time_") - '("GdkAtom*" "targets") - '("gint" "n_targets") - ) -) - -(define-method supports_selection_notification - (of-object "GdkDisplay") - (c-name "gdk_display_supports_selection_notification") - (return-type "gboolean") -) - -(define-method request_selection_notification - (of-object "GdkDisplay") - (c-name "gdk_display_request_selection_notification") - (return-type "gboolean") - (parameters - '("GdkAtom" "selection") - ) -) - -(define-method supports_clipboard_persistence - (of-object "GdkDisplay") - (c-name "gdk_display_supports_clipboard_persistence") - (return-type "gboolean") -) - -(define-method flush - (of-object "GdkDisplay") - (c-name "gdk_display_flush") - (return-type "none") -) - -(define-method set_double_click_distance - (of-object "GdkDisplay") - (c-name "gdk_display_set_double_click_distance") - (return-type "none") - (parameters - '("guint" "distance") - ) -) - -(define-method supports_cursor_alpha - (of-object "GdkDisplay") - (c-name "gdk_display_supports_cursor_alpha") - (return-type "gboolean") -) - -(define-method supports_cursor_color - (of-object "GdkDisplay") - (c-name "gdk_display_supports_cursor_color") - (return-type "gboolean") -) - -(define-method get_default_cursor_size - (of-object "GdkDisplay") - (c-name "gdk_display_get_default_cursor_size") - (return-type "guint") -) - -(define-method get_maximal_cursor_size - (of-object "GdkDisplay") - (c-name "gdk_display_get_maximal_cursor_size") - (return-type "none") - (parameters - '("guint*" "width") - '("guint*" "height") - ) -) -(define-method get_default_group - (of-object "GdkDisplay") - (c-name "gdk_display_get_default_group") - (return-type "GdkWindow*") -) - -(define-method warp_pointer - (of-object "GdkDisplay") - (c-name "gdk_display_warp_pointer") - (return-type "none") - (parameters - '("GdkScreen*" "screen") - '("gint" "x") - '("gint" "y") - ) -) - -(define-virtual get_display_name - (of-object "GdkDisplay") - (return-type "const-gchar*") -) - -(define-virtual get_n_screens - (of-object "GdkDisplay") - (return-type "gint") -) - -(define-virtual get_screen - (of-object "GdkDisplay") - (return-type "GdkScreen*") - (parameters - '("gint" "screen_num") - ) -) - -(define-virtual get_default_screen - (of-object "GdkDisplay") - (return-type "GdkScreen*") -) - -(define-virtual closed - (of-object "GdkDisplay") - (return-type "none") - (parameters - '("gboolean" "is_error") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gdk/gdkdisplaymanager.h - -(define-function gdk_display_manager_get_type - (c-name "gdk_display_manager_get_type") - (return-type "GType") -) - -(define-function display_manager_get - (c-name "gdk_display_manager_get") - (return-type "GdkDisplayManager*") -) - -(define-method get_default_display - (of-object "GdkDisplayManager") - (c-name "gdk_display_manager_get_default_display") - (return-type "GdkDisplay*") -) - -(define-method set_default_display - (of-object "GdkDisplayManager") - (c-name "gdk_display_manager_set_default_display") - (return-type "none") - (parameters - '("GdkDisplay*" "display") - ) -) - -(define-method list_displays - (of-object "GdkDisplayManager") - (c-name "gdk_display_manager_list_displays") - (return-type "GSList*") -) - -(define-virtual display_opened - (of-object "GdkDisplayManager") - (return-type "none") - (parameters - '("GdkDisplay*" "display") - ) -) - -;; - -(define-function display_open_default_libgtk_only - (c-name "gdk_display_open_default_libgtk_only") - (return-type "GdkDisplay*") -) - -;; From /opt/gtk2/include/gtk-2.0/gdk/gdkdnd.h - -(define-function drag_context_get_type - (c-name "gdk_drag_context_get_type") - (return-type "GType") -) - -(define-function drag_context_new - (is-constructor-of GdkDragContext) - (c-name "gdk_drag_context_new") - (return-type "GdkDragContext*") -) - -(define-method ref - (of-object "GdkDragContext") - (c-name "gdk_drag_context_ref") - (return-type "none") -) - -(define-method unref - (of-object "GdkDragContext") - (c-name "gdk_drag_context_unref") - (return-type "none") -) - -(define-method drag_status - (of-object "GdkDragContext") - (c-name "gdk_drag_status") - (return-type "none") - (parameters - '("GdkDragAction" "action") - '("guint32" "time" (null-ok) (default "GDK_CURRENT_TIME")) - ) -) - -(define-method drop_reply - (of-object "GdkDragContext") - (c-name "gdk_drop_reply") - (return-type "none") - (parameters - '("gboolean" "ok") - '("guint32" "time" (null-ok) (default "GDK_CURRENT_TIME")) - ) -) - -(define-method drop_finish - (of-object "GdkDragContext") - (c-name "gdk_drop_finish") - (return-type "none") - (parameters - '("gboolean" "success") - '("guint32" "time" (null-ok) (default "GDK_CURRENT_TIME")) - ) -) - -(define-method drag_get_selection - (of-object "GdkDragContext") - (c-name "gdk_drag_get_selection") - (return-type "GdkAtom") -) - -(define-method drag_begin - (of-object "GdkWindow") - (c-name "gdk_drag_begin") - (return-type "GdkDragContext*") - (parameters - '("GList*" "targets") - ) -) - -(define-function drag_get_protocol - (c-name "gdk_drag_get_protocol") - (return-type "guint32") - (parameters - '("guint32" "xid") - '("GdkDragProtocol*" "protocol") - ) -) - -(define-method drag_find_window - (of-object "GdkDragContext") - (c-name "gdk_drag_find_window") - (return-type "none") - (parameters - '("GdkWindow*" "drag_window") - '("gint" "x_root") - '("gint" "y_root") - '("GdkWindow**" "dest_window") - '("GdkDragProtocol*" "protocol") - ) -) - -(define-function drag_get_protocol_for_display - (c-name "gdk_drag_get_protocol_for_display") - (return-type "guint32") - (parameters - '("GdkDisplay*" "display") - '("guint32" "xid") - '("GdkDragProtocol*" "protocol") - ) -) - -(define-method drag_find_window_for_screen - (of-object "GdkDragContext") - (c-name "gdk_drag_find_window_for_screen") - (return-type "none") - (parameters - '("GdkWindow*" "drag_window") - '("GdkScreen*" "screen") - '("gint" "x_root") - '("gint" "y_root") - '("GdkWindow**" "dest_window") - '("GdkDragProtocol*" "protocol") - ) -) - -(define-method drag_motion - (of-object "GdkDragContext") - (c-name "gdk_drag_motion") - (return-type "gboolean") - (parameters - '("GdkWindow*" "dest_window") - '("GdkDragProtocol" "protocol") - '("gint" "x_root") - '("gint" "y_root") - '("GdkDragAction" "suggested_action") - '("GdkDragAction" "possible_actions") - '("guint32" "time") - ) -) - -(define-method drag_drop - (of-object "GdkDragContext") - (c-name "gdk_drag_drop") - (return-type "none") - (parameters - '("guint32" "time") - ) -) - -(define-method drag_abort - (of-object "GdkDragContext") - (c-name "gdk_drag_abort") - (return-type "none") - (parameters - '("guint32" "time") - ) -) - -(define-method drag_drop_succeeded - (of-object "GdkDragContext") - (c-name "gdk_drag_drop_succeeded") - (return-type "gboolean") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gdk/gdkdrawable.h - -(define-function gdk_drawable_get_type - (c-name "gdk_drawable_get_type") - (return-type "GType") -) - -(define-method copy_to_image - (of-object "GdkDrawable") - (c-name "gdk_drawable_copy_to_image") - (return-type "GdkImage*") - (parameters - '("GdkImage*" "image") - '("gint" "src_x") - '("gint" "src_y") - '("gint" "dest_x") - '("gint" "dest_y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method set_data - (of-object "GdkDrawable") - (c-name "gdk_drawable_set_data") - (return-type "none") - (parameters - '("const-gchar*" "key") - '("gpointer" "data") - '("GDestroyNotify" "destroy_func") - ) -) - -(define-method get_data - (of-object "GdkDrawable") - (c-name "gdk_drawable_get_data") - (return-type "gpointer") - (parameters - '("const-gchar*" "key") - ) -) - -(define-method get_size - (of-object "GdkDrawable") - (c-name "gdk_drawable_get_size") - (return-type "none") - (parameters - '("gint*" "width") - '("gint*" "height") - ) -) - -(define-method set_colormap - (of-object "GdkDrawable") - (c-name "gdk_drawable_set_colormap") - (return-type "none") - (parameters - '("GdkColormap*" "colormap") - ) -) - -(define-method get_colormap - (of-object "GdkDrawable") - (c-name "gdk_drawable_get_colormap") - (return-type "GdkColormap*") -) - -(define-method get_visual - (of-object "GdkDrawable") - (c-name "gdk_drawable_get_visual") - (return-type "GdkVisual*") -) - -(define-method get_depth - (of-object "GdkDrawable") - (c-name "gdk_drawable_get_depth") - (return-type "gint") -) - -(define-method get_screen - (of-object "GdkDrawable") - (c-name "gdk_drawable_get_screen") - (return-type "GdkScreen*") -) - -(define-method get_display - (of-object "GdkDrawable") - (c-name "gdk_drawable_get_display") - (return-type "GdkDisplay*") -) - -(define-method ref - (of-object "GdkDrawable") - (c-name "gdk_drawable_ref") - (return-type "GdkDrawable*") -) - -(define-method unref - (of-object "GdkDrawable") - (c-name "gdk_drawable_unref") - (return-type "none") -) - -(define-method draw_point - (of-object "GdkDrawable") - (c-name "gdk_draw_point") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("gint" "x") - '("gint" "y") - ) -) - -(define-method draw_line - (of-object "GdkDrawable") - (c-name "gdk_draw_line") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("gint" "x1") - '("gint" "y1") - '("gint" "x2") - '("gint" "y2") - ) -) - -(define-method draw_rectangle - (of-object "GdkDrawable") - (c-name "gdk_draw_rectangle") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("gboolean" "filled") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method draw_arc - (of-object "GdkDrawable") - (c-name "gdk_draw_arc") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("gboolean" "filled") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("gint" "angle1") - '("gint" "angle2") - ) -) - -(define-method draw_polygon - (of-object "GdkDrawable") - (c-name "gdk_draw_polygon") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("gboolean" "filled") - '("GdkPoint*" "points") - '("gint" "npoints") - ) -) - -(define-method draw_string - (deprecated "use GdkDrawable.draw_layout") - (of-object "GdkDrawable") - (c-name "gdk_draw_string") - (return-type "none") - (parameters - '("GdkFont*" "font") - '("GdkGC*" "gc") - '("gint" "x") - '("gint" "y") - '("const-gchar*" "string") - ) -) - -(define-method draw_text - (deprecated "use GdkDrawable.draw_layout") - (of-object "GdkDrawable") - (c-name "gdk_draw_text") - (return-type "none") - (parameters - '("GdkFont*" "font") - '("GdkGC*" "gc") - '("gint" "x") - '("gint" "y") - '("const-gchar*" "text") - '("gint" "text_length") - ) -) - -(define-method draw_text_wc - (deprecated "use GdkDrawable.draw_layout") - (of-object "GdkDrawable") - (c-name "gdk_draw_text_wc") - (return-type "none") - (parameters - '("GdkFont*" "font") - '("GdkGC*" "gc") - '("gint" "x") - '("gint" "y") - '("const-GdkWChar*" "text") - '("gint" "text_length") - ) -) - -(define-method draw_drawable - (of-object "GdkDrawable") - (c-name "gdk_draw_drawable") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("GdkDrawable*" "src") - '("gint" "xsrc") - '("gint" "ysrc") - '("gint" "xdest") - '("gint" "ydest") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method draw_image - (of-object "GdkDrawable") - (c-name "gdk_draw_image") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("GdkImage*" "image") - '("gint" "xsrc") - '("gint" "ysrc") - '("gint" "xdest") - '("gint" "ydest") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method draw_points - (of-object "GdkDrawable") - (c-name "gdk_draw_points") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("GdkPoint*" "points") - '("gint" "npoints") - ) -) - -(define-method draw_segments - (of-object "GdkDrawable") - (c-name "gdk_draw_segments") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("GdkSegment*" "segs") - '("gint" "nsegs") - ) -) - -(define-method draw_lines - (of-object "GdkDrawable") - (c-name "gdk_draw_lines") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("GdkPoint*" "points") - '("gint" "npoints") - ) -) - -(define-method draw_pixbuf - (of-object "GdkDrawable") - (c-name "gdk_draw_pixbuf") - (return-type "none") - (parameters - '("GdkGC*" "gc" (null-ok)) - '("GdkPixbuf*" "pixbuf") - '("gint" "src_x") - '("gint" "src_y") - '("gint" "dest_x") - '("gint" "dest_y") - '("gint" "width" (default "-1")) - '("gint" "height" (default "-1")) - '("GdkRgbDither" "dither" (default "GDK_RGB_DITHER_NORMAL")) - '("gint" "x_dither" (default "0")) - '("gint" "y_dither" (default "0")) - ) -) - -(define-method draw_glyphs - (of-object "GdkDrawable") - (c-name "gdk_draw_glyphs") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("PangoFont*" "font") - '("gint" "x") - '("gint" "y") - '("PangoGlyphString*" "glyphs") - ) -) - -(define-method draw_layout_line - (of-object "GdkDrawable") - (c-name "gdk_draw_layout_line") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("gint" "x") - '("gint" "y") - '("PangoLayoutLine*" "line") - ) -) - -(define-method draw_layout - (of-object "GdkDrawable") - (c-name "gdk_draw_layout") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("gint" "x") - '("gint" "y") - '("PangoLayout*" "layout") - ) -) - -(define-function draw_layout_line_with_colors - (c-name "gdk_draw_layout_line_with_colors") - (return-type "none") - (parameters - '("GdkDrawable*" "drawable") - '("GdkGC*" "gc") - '("gint" "x") - '("gint" "y") - '("PangoLayoutLine*" "line") - '("GdkColor*" "foreground") - '("GdkColor*" "background") - ) -) - -(define-function draw_layout_with_colors - (deprecated "use gtk.gdk.Drawable.draw_layout instead") - (c-name "gdk_draw_layout_with_colors") - (return-type "none") - (parameters - '("GdkDrawable*" "drawable") - '("GdkGC*" "gc") - '("gint" "x") - '("gint" "y") - '("PangoLayout*" "layout") - '("GdkColor*" "foreground") - '("GdkColor*" "background") - ) -) - -(define-function draw_glyphs_transformed - (c-name "gdk_draw_glyphs_transformed") - (return-type "none") - (parameters - '("GdkDrawable*" "drawable") - '("GdkGC*" "gc") - '("PangoMatrix*" "matrix") - '("PangoFont*" "font") - '("gint" "x") - '("gint" "y") - '("PangoGlyphString*" "glyphs") - ) -) - -(define-function draw_trapezoids - (c-name "gdk_draw_trapezoids") - (return-type "none") - (parameters - '("GdkDrawable*" "drawable") - '("GdkGC*" "gc") - '("GdkTrapezoid*" "trapezoids") - '("gint" "n_trapezoids") - ) -) -(define-method get_image - (of-object "GdkDrawable") - (c-name "gdk_drawable_get_image") - (return-type "GdkImage*") - (parameters - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) - (caller-owns-return #t) -) - -(define-method get_clip_region - (of-object "GdkDrawable") - (c-name "gdk_drawable_get_clip_region") - (return-type "GdkRegion*") - (caller-owns-return #t) -) - -(define-method get_visible_region - (of-object "GdkDrawable") - (c-name "gdk_drawable_get_visible_region") - (return-type "GdkRegion*") - (caller-owns-return #t) -) - -(define-virtual create_gc - (of-object "GdkDrawable") - (return-type "GdkGC*") - (parameters - '("GdkGCValues*" "values") - '("GdkGCValuesMask" "mask") - ) -) - -(define-virtual draw_rectangle - (of-object "GdkDrawable") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("gboolean" "filled") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-virtual draw_arc - (of-object "GdkDrawable") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("gboolean" "filled") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("gint" "angle1") - '("gint" "angle2") - ) -) - -(define-virtual draw_polygon - (of-object "GdkDrawable") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("gboolean" "filled") - '("GdkPoint*" "points") - '("gint" "npoints") - ) -) - -(define-virtual draw_text - (of-object "GdkDrawable") - (return-type "none") - (parameters - '("GdkFont*" "font") - '("GdkGC*" "gc") - '("gint" "x") - '("gint" "y") - '("const-gchar*" "text") - '("gint" "text_length") - ) -) - -(define-virtual draw_text_wc - (of-object "GdkDrawable") - (return-type "none") - (parameters - '("GdkFont*" "font") - '("GdkGC*" "gc") - '("gint" "x") - '("gint" "y") - '("const-GdkWChar*" "text") - '("gint" "text_length") - ) -) - -(define-virtual draw_drawable - (of-object "GdkDrawable") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("GdkDrawable*" "src") - '("gint" "xsrc") - '("gint" "ysrc") - '("gint" "xdest") - '("gint" "ydest") - '("gint" "width") - '("gint" "height") - ) -) - -(define-virtual draw_points - (of-object "GdkDrawable") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("GdkPoint*" "points") - '("gint" "npoints") - ) -) - -(define-virtual draw_segments - (of-object "GdkDrawable") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("GdkSegment*" "segs") - '("gint" "nsegs") - ) -) - -(define-virtual draw_lines - (of-object "GdkDrawable") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("GdkPoint*" "points") - '("gint" "npoints") - ) -) - -(define-virtual draw_glyphs - (of-object "GdkDrawable") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("PangoFont*" "font") - '("gint" "x") - '("gint" "y") - '("PangoGlyphString*" "glyphs") - ) -) - -(define-virtual draw_image - (of-object "GdkDrawable") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("GdkImage*" "image") - '("gint" "xsrc") - '("gint" "ysrc") - '("gint" "xdest") - '("gint" "ydest") - '("gint" "width") - '("gint" "height") - ) -) - -(define-virtual get_depth - (of-object "GdkDrawable") - (return-type "gint") -) - -(define-virtual get_size - (of-object "GdkDrawable") - (return-type "none") - (parameters - '("gint*" "width") - '("gint*" "height") - ) -) - -(define-virtual set_colormap - (of-object "GdkDrawable") - (return-type "none") - (parameters - '("GdkColormap*" "cmap") - ) -) - -(define-virtual get_colormap - (of-object "GdkDrawable") - (return-type "GdkColormap*") -) - -(define-virtual get_visual - (of-object "GdkDrawable") - (return-type "GdkVisual*") -) - -(define-virtual get_screen - (of-object "GdkDrawable") - (return-type "GdkScreen*") -) - -(define-virtual get_image - (of-object "GdkDrawable") - (return-type "GdkImage*") - (parameters - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-virtual get_clip_region - (of-object "GdkDrawable") - (return-type "GdkRegion*") -) - -(define-virtual get_visible_region - (of-object "GdkDrawable") - (return-type "GdkRegion*") -) - -(define-virtual get_composite_drawable - (of-object "GdkDrawable") - (return-type "GdkDrawable*") - (parameters - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("gint*" "composite_x_offset") - '("gint*" "composite_y_offset") - ) -) - -(define-virtual draw_pixbuf - (of-object "GdkDrawable") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("GdkPixbuf*" "pixbuf") - '("gint" "src_x") - '("gint" "src_y") - '("gint" "dest_x") - '("gint" "dest_y") - '("gint" "width") - '("gint" "height") - '("GdkRgbDither" "dither") - '("gint" "x_dither") - '("gint" "y_dither") - ) -) - -(define-virtual draw_glyphs_transformed - (of-object "GdkDrawable") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("PangoMatrix*" "matrix") - '("PangoFont*" "font") - '("gint" "x") - '("gint" "y") - '("PangoGlyphString*" "glyphs") - ) -) - -(define-virtual draw_trapezoids - (of-object "GdkDrawable") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("GdkTrapezoid*" "trapezoids") - '("gint" "n_trapezoids") - ) -) - -(define-virtual ref_cairo_surface - (of-object "GdkDrawable") - (return-type "cairo_surface_t*") -) - - - - -;; From /opt/gtk2/include/gtk-2.0/gdk/gdkevents.h - -(define-function gdk_event_get_type - (c-name "gdk_event_get_type") - (return-type "GType") -) - -(define-function events_pending - (c-name "gdk_events_pending") - (return-type "gboolean") -) - -(define-function event_get - (c-name "gdk_event_get") - (return-type "GdkEvent*") -) - -(define-function event_peek - (c-name "gdk_event_peek") - (return-type "GdkEvent*") -) - -(define-function event_get_graphics_expose - (c-name "gdk_event_get_graphics_expose") - (return-type "GdkEvent*") - (parameters - '("GdkWindow*" "window") - ) -) - -(define-method put - (of-object "GdkEvent") - (c-name "gdk_event_put") - (return-type "none") -) - -(define-function event_new - (is-constructor-of "GdkEvent") - (c-name "gdk_event_new") - (return-type "GdkEvent*") - (parameters - '("GdkEventType" "type") - ) -) - -(define-method copy - (of-object "GdkEvent") - (c-name "gdk_event_copy") - (return-type "GdkEvent*") -) - -(define-method free - (of-object "GdkEvent") - (c-name "gdk_event_free") - (return-type "none") -) - -(define-method get_time - (of-object "GdkEvent") - (c-name "gdk_event_get_time") - (return-type "guint32") -) - -(define-method get_state - (of-object "GdkEvent") - (c-name "gdk_event_get_state") - (return-type "gboolean") - (parameters - '("GdkModifierType*" "state") - ) -) - -(define-method get_coords - (of-object "GdkEvent") - (c-name "gdk_event_get_coords") - (return-type "gboolean") - (parameters - '("gdouble*" "x_win") - '("gdouble*" "y_win") - ) -) - -(define-method get_root_coords - (of-object "GdkEvent") - (c-name "gdk_event_get_root_coords") - (return-type "gboolean") - (parameters - '("gdouble*" "x_root") - '("gdouble*" "y_root") - ) -) - -(define-method get_axis - (of-object "GdkEvent") - (c-name "gdk_event_get_axis") - (return-type "gboolean") - (parameters - '("GdkAxisUse" "axis_use") - '("gdouble*" "value") - ) -) - -(define-function event_handler_set - (c-name "gdk_event_handler_set") - (return-type "none") - (parameters - '("GdkEventFunc" "func") - '("gpointer" "data") - '("GDestroyNotify" "notify") - ) -) - -(define-method set_screen - (of-object "GdkEvent") - (c-name "gdk_event_set_screen") - (return-type "none") - (parameters - '("GdkScreen*" "screen") - ) -) - -(define-method get_screen - (of-object "GdkEvent") - (c-name "gdk_event_get_screen") - (return-type "GdkScreen*") -) - -(define-function set_show_events - (c-name "gdk_set_show_events") - (return-type "none") - (parameters - '("gboolean" "show_events") - ) -) - -(define-function get_show_events - (c-name "gdk_get_show_events") - (return-type "gboolean") -) - -(define-function add_client_message_filter - (c-name "gdk_add_client_message_filter") - (return-type "none") - (parameters - '("GdkAtom" "message_type") - '("GdkFilterFunc" "func") - '("gpointer" "data") - ) -) - -(define-function setting_get - (c-name "gdk_setting_get") - (return-type "gboolean") - (parameters - '("const-gchar*" "name") - '("GValue*" "value") - ) -) - - - - -;; From /opt/gtk2/include/gtk-2.0/gdk/gdkfont.h - -(define-function font_get_type - (c-name "gdk_font_get_type") - (return-type "GType") -) - -(define-method ref - (of-object "GdkFont") - (c-name "gdk_font_ref") - (return-type "GdkFont*") -) - -(define-method unref - (of-object "GdkFont") - (c-name "gdk_font_unref") - (return-type "none") -) - -(define-method equal - (of-object "GdkFont") - (c-name "gdk_font_equal") - (return-type "gboolean") - (parameters - '("const-GdkFont*" "fontb") - ) -) - -(define-method id - (of-object "GdkFont") - (c-name "gdk_font_id") - (return-type "gint") -) - -(define-function font_load_for_display - (c-name "gdk_font_load_for_display") - (return-type "GdkFont*") - (parameters - '("GdkDisplay*" "display") - '("const-gchar*" "font_name") - ) -) - -(define-function fontset_load_for_display - (c-name "gdk_fontset_load_for_display") - (return-type "GdkFont*") - (parameters - '("GdkDisplay*" "display") - '("const-gchar*" "fontset_name") - ) -) - -(define-function font_from_description_for_display - (c-name "gdk_font_from_description_for_display") - (return-type "GdkFont*") - (parameters - '("GdkDisplay*" "display") - '("PangoFontDescription*" "font_desc") - ) -) - -(define-function font_load - (is-constructor-of GdkFont) - (c-name "gdk_font_load") - (return-type "GdkFont*") - (parameters - '("const-gchar*" "font_name") - ) -) - -(define-function fontset_load - (c-name "gdk_fontset_load") - (return-type "GdkFont*") - (parameters - '("const-gchar*" "fontset_name") - ) -) - -(define-function font_from_description - (c-name "gdk_font_from_description") - (return-type "GdkFont*") - (parameters - '("PangoFontDescription*" "font_desc") - ) -) - -(define-method string_width - (of-object "GdkFont") - (c-name "gdk_string_width") - (return-type "gint") - (parameters - '("const-gchar*" "string") - ) -) - -(define-method width - (of-object "GdkFont") - (c-name "gdk_text_width") - (return-type "gint") - (parameters - '("const-gchar*" "text") - '("gint" "text_length" (default "-1")) - ) -) - -(define-method text_width_wc - (of-object "GdkFont") - (c-name "gdk_text_width_wc") - (return-type "gint") - (parameters - '("const-GdkWChar*" "text") - '("gint" "text_length") - ) -) - -(define-method char_width - (of-object "GdkFont") - (c-name "gdk_char_width") - (return-type "gint") - (parameters - '("gchar" "character") - ) -) - -(define-method char_width_wc - (of-object "GdkFont") - (c-name "gdk_char_width_wc") - (return-type "gint") - (parameters - '("GdkWChar" "character") - ) -) - -(define-method string_measure - (of-object "GdkFont") - (c-name "gdk_string_measure") - (return-type "gint") - (parameters - '("const-gchar*" "string") - ) -) - -(define-method measure - (of-object "GdkFont") - (c-name "gdk_text_measure") - (return-type "gint") - (parameters - '("const-gchar*" "text") - '("gint" "text_length" (default "-1")) - ) -) - -(define-method char_measure - (of-object "GdkFont") - (c-name "gdk_char_measure") - (return-type "gint") - (parameters - '("gchar" "character") - ) -) - -(define-method string_height - (of-object "GdkFont") - (c-name "gdk_string_height") - (return-type "gint") - (parameters - '("const-gchar*" "string") - ) -) - -(define-method height - (of-object "GdkFont") - (c-name "gdk_text_height") - (return-type "gint") - (parameters - '("const-gchar*" "text") - '("gint" "text_length" (default "-1")) - ) -) - -(define-method char_height - (of-object "GdkFont") - (c-name "gdk_char_height") - (return-type "gint") - (parameters - '("gchar" "character") - ) -) - -(define-method extents - (of-object "GdkFont") - (c-name "gdk_text_extents") - (return-type "none") - (parameters - '("const-gchar*" "text") - '("gint" "text_length") - '("gint*" "lbearing") - '("gint*" "rbearing") - '("gint*" "width") - '("gint*" "ascent") - '("gint*" "descent") - ) -) - -(define-method text_extents_wc - (of-object "GdkFont") - (c-name "gdk_text_extents_wc") - (return-type "none") - (parameters - '("const-GdkWChar*" "text") - '("gint" "text_length") - '("gint*" "lbearing") - '("gint*" "rbearing") - '("gint*" "width") - '("gint*" "ascent") - '("gint*" "descent") - ) -) - -(define-method string_extents - (of-object "GdkFont") - (c-name "gdk_string_extents") - (return-type "none") - (parameters - '("const-gchar*" "string") - '("gint*" "lbearing") - '("gint*" "rbearing") - '("gint*" "width") - '("gint*" "ascent") - '("gint*" "descent") - ) -) - -(define-method "get_display" - (of-object "GdkFont") - (c-name "gdk_font_get_display") - (return-type "GdkDisplay*") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gdk/gdkgc.h - -(define-method ref - (of-object "GdkGC") - (c-name "gdk_gc_ref") - (return-type "GdkGC*") -) - -(define-method unref - (of-object "GdkGC") - (c-name "gdk_gc_unref") - (return-type "none") -) - -(define-function gdk_gc_get_type - (c-name "gdk_gc_get_type") - (return-type "GType") -) - -(define-function gc_new - (c-name "gdk_gc_new") - (is-constructor-of "GdkGC") - (return-type "GdkGC*") - (parameters - '("GdkDrawable*" "drawable") - ) -) - -(define-function gc_new - (deprecated "use gdk.GC") - (c-name "gdk_gc_new2") - (return-type "GdkGC*") - (parameters - '("GdkDrawable*" "drawable") - ) -) - -(define-method new_gc - (of-object "GdkDrawable") - (c-name "gdk_gc_new_with_values") - (return-type "GdkGC*") - (parameters - '("GdkGCValues*" "values") - '("GdkGCValuesMask" "values_mask") - ) -) - -(define-method get_values - (of-object "GdkGC") - (c-name "gdk_gc_get_values") - (return-type "none") - (parameters - '("GdkGCValues*" "values") - ) -) - -(define-method set_values - (of-object "GdkGC") - (c-name "gdk_gc_set_values") - (return-type "none") - (parameters - '("GdkGCValues*" "values") - '("GdkGCValuesMask" "values_mask") - ) -) - -(define-method set_foreground - (of-object "GdkGC") - (c-name "gdk_gc_set_foreground") - (return-type "none") - (parameters - '("GdkColor*" "color") - ) -) - -(define-method set_background - (of-object "GdkGC") - (c-name "gdk_gc_set_background") - (return-type "none") - (parameters - '("GdkColor*" "color") - ) -) - -(define-method set_font - (of-object "GdkGC") - (c-name "gdk_gc_set_font") - (return-type "none") - (parameters - '("GdkFont*" "font") - ) -) - -(define-method set_function - (of-object "GdkGC") - (c-name "gdk_gc_set_function") - (return-type "none") - (parameters - '("GdkFunction" "function") - ) -) - -(define-method set_fill - (of-object "GdkGC") - (c-name "gdk_gc_set_fill") - (return-type "none") - (parameters - '("GdkFill" "fill") - ) -) - -(define-method set_tile - (of-object "GdkGC") - (c-name "gdk_gc_set_tile") - (return-type "none") - (parameters - '("GdkPixmap*" "tile") - ) -) - -(define-method set_stipple - (of-object "GdkGC") - (c-name "gdk_gc_set_stipple") - (return-type "none") - (parameters - '("GdkPixmap*" "stipple") - ) -) - -(define-method set_ts_origin - (of-object "GdkGC") - (c-name "gdk_gc_set_ts_origin") - (return-type "none") - (parameters - '("gint" "x") - '("gint" "y") - ) -) - -(define-method set_clip_origin - (of-object "GdkGC") - (c-name "gdk_gc_set_clip_origin") - (return-type "none") - (parameters - '("gint" "x") - '("gint" "y") - ) -) - -(define-method set_clip_mask - (of-object "GdkGC") - (c-name "gdk_gc_set_clip_mask") - (return-type "none") - (parameters - '("GdkBitmap*" "mask") - ) -) - -(define-method set_clip_rectangle - (of-object "GdkGC") - (c-name "gdk_gc_set_clip_rectangle") - (return-type "none") - (parameters - '("GdkRectangle*" "rectangle") - ) -) - -(define-method set_clip_region - (of-object "GdkGC") - (c-name "gdk_gc_set_clip_region") - (return-type "none") - (parameters - '("GdkRegion*" "region") - ) -) - -(define-method set_subwindow - (of-object "GdkGC") - (c-name "gdk_gc_set_subwindow") - (return-type "none") - (parameters - '("GdkSubwindowMode" "mode") - ) -) - -(define-method set_exposures - (of-object "GdkGC") - (c-name "gdk_gc_set_exposures") - (return-type "none") - (parameters - '("gboolean" "exposures") - ) -) - -(define-method set_line_attributes - (of-object "GdkGC") - (c-name "gdk_gc_set_line_attributes") - (return-type "none") - (parameters - '("gint" "line_width") - '("GdkLineStyle" "line_style") - '("GdkCapStyle" "cap_style") - '("GdkJoinStyle" "join_style") - ) -) - -(define-method set_dashes - (of-object "GdkGC") - (c-name "gdk_gc_set_dashes") - (return-type "none") - (parameters - '("gint" "dash_offset") - '("gint8[]" "dash_list") - '("gint" "n") - ) -) - -(define-method offset - (of-object "GdkGC") - (c-name "gdk_gc_offset") - (return-type "none") - (parameters - '("gint" "x_offset") - '("gint" "y_offset") - ) -) - -(define-method copy - (of-object "GdkGC") - (c-name "gdk_gc_copy") - (return-type "none") - (parameters - '("GdkGC*" "src_gc") - ) -) - -(define-method set_colormap - (of-object "GdkGC") - (c-name "gdk_gc_set_colormap") - (return-type "none") - (parameters - '("GdkColormap*" "colormap") - ) -) - -(define-method get_colormap - (of-object "GdkGC") - (c-name "gdk_gc_get_colormap") - (return-type "GdkColormap*") -) - -(define-method set_rgb_fg_color - (of-object "GdkGC") - (c-name "gdk_gc_set_rgb_fg_color") - (return-type "none") - (parameters - '("GdkColor*" "color") - ) -) - -(define-method set_rgb_bg_color - (of-object "GdkGC") - (c-name "gdk_gc_set_rgb_bg_color") - (return-type "none") - (parameters - '("GdkColor*" "color") - ) -) - -(define-method "get_screen" - (of-object "GdkGC") - (c-name "gdk_gc_get_screen") - (return-type "GdkScreen*") -) - - -(define-virtual get_values - (of-object "GdkGC") - (return-type "none") - (parameters - '("GdkGCValues*" "values") - ) -) - -(define-virtual set_values - (of-object "GdkGC") - (return-type "none") - (parameters - '("GdkGCValues*" "values") - '("GdkGCValuesMask" "mask") - ) -) - -(define-virtual set_dashes - (of-object "GdkGC") - (return-type "none") - (parameters - '("gint" "dash_offset") - '("gint8[]" "dash_list") - '("gint" "n") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gdk/gdkimage.h - -(define-function gdk_image_get_type - (c-name "gdk_image_get_type") - (return-type "GType") -) - -(define-function image_new - (is-constructor-of GdkImage) - (c-name "gdk_image_new") - (return-type "GdkImage*") - (parameters - '("GdkImageType" "type") - '("GdkVisual*" "visual") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method ref - (of-object "GdkImage") - (c-name "gdk_image_ref") - (return-type "GdkImage*") -) - -(define-method unref - (of-object "GdkImage") - (c-name "gdk_image_unref") - (return-type "none") -) - -(define-function image_new_bitmap - (c-name "gdk_image_new_bitmap") - (return-type "GdkImage*") - (parameters - '("GdkVisual*" "visual") - '("gpointer" "data") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method image_get - (of-object "GdkDrawable") - (deprecated "use GdkDrawable.get_image") - (c-name "gdk_image_get") - (return-type "GdkImage*") - (parameters - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method put_pixel - (of-object "GdkImage") - (c-name "gdk_image_put_pixel") - (return-type "none") - (parameters - '("gint" "x") - '("gint" "y") - '("guint32" "pixel") - ) -) - -(define-method get_pixel - (of-object "GdkImage") - (c-name "gdk_image_get_pixel") - (return-type "guint32") - (parameters - '("gint" "x") - '("gint" "y") - ) -) - -(define-method set_colormap - (of-object "GdkImage") - (c-name "gdk_image_set_colormap") - (return-type "none") - (parameters - '("GdkColormap*" "colormap") - ) -) - -(define-method get_colormap - (of-object "GdkImage") - (c-name "gdk_image_get_colormap") - (return-type "GdkColormap*") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gdk/gdkinput.h - -(define-function device_get_type - (c-name "gdk_device_get_type") - (return-type "GType") -) - -(define-function devices_list - (c-name "gdk_devices_list") - (return-type "GList*") -) - -(define-method set_source - (of-object "GdkDevice") - (c-name "gdk_device_set_source") - (return-type "none") - (parameters - '("GdkInputSource" "source") - ) -) - -(define-method set_mode - (of-object "GdkDevice") - (c-name "gdk_device_set_mode") - (return-type "gboolean") - (parameters - '("GdkInputMode" "mode") - ) -) - -(define-method set_key - (of-object "GdkDevice") - (c-name "gdk_device_set_key") - (return-type "none") - (parameters - '("guint" "index") - '("guint" "keyval") - '("GdkModifierType" "modifiers") - ) -) - -(define-method set_axis_use - (of-object "GdkDevice") - (c-name "gdk_device_set_axis_use") - (return-type "none") - (parameters - '("guint" "index") - '("GdkAxisUse" "use") - ) -) - -(define-method get_state - (of-object "GdkDevice") - (c-name "gdk_device_get_state") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("gdouble*" "axes") - '("GdkModifierType*" "mask") - ) -) - -(define-method get_history - (of-object "GdkDevice") - (c-name "gdk_device_get_history") - (return-type "gboolean") - (parameters - '("GdkWindow*" "window") - '("guint32" "start") - '("guint32" "stop") - '("GdkTimeCoord***" "events") - '("gint*" "n_events") - ) -) - -(define-function device_free_history - (c-name "gdk_device_free_history") - (return-type "none") - (parameters - '("GdkTimeCoord**" "events") - '("gint" "n_events") - ) -) - -(define-method get_axis - (of-object "GdkDevice") - (c-name "gdk_device_get_axis") - (return-type "gboolean") - (parameters - '("gdouble*" "axes") - '("GdkAxisUse" "use") - '("gdouble*" "value") - ) -) - -(define-method input_set_extension_events - (of-object "GdkWindow") - (c-name "gdk_input_set_extension_events") - (return-type "none") - (parameters - '("gint" "mask") - '("GdkExtensionMode" "mode") - ) -) - -(define-function device_get_core_pointer - (c-name "gdk_device_get_core_pointer") - (return-type "GdkDevice*") -) - - - -;; from /opt/gtk2/include/gtk-2.0/gdk/gdkkeys.h - -(define-function gdk_keymap_get_type - (c-name "gdk_keymap_get_type") - (return-type "GType") -) - -(define-function keymap_get_default - (c-name "gdk_keymap_get_default") - (return-type "GdkKeymap*") -) - -(define-function keymap_get_for_display - (c-name "gdk_keymap_get_for_display") - (return-type "GdkKeymap*") - (parameters - '("GdkDisplay*" "display") - ) -) - -(define-method lookup_key - (of-object "GdkKeymap") - (c-name "gdk_keymap_lookup_key") - (return-type "guint") - (parameters - '("const-GdkKeymapKey*" "key") - ) -) - -(define-method translate_keyboard_state - (of-object "GdkKeymap") - (c-name "gdk_keymap_translate_keyboard_state") - (return-type "gboolean") - (parameters - '("guint" "hardware_keycode") - '("GdkModifierType" "state") - '("gint" "group") - '("guint*" "keyval") - '("gint*" "effective_group") - '("gint*" "level") - '("GdkModifierType*" "consumed_modifiers") - ) -) - -(define-method get_entries_for_keyval - (of-object "GdkKeymap") - (c-name "gdk_keymap_get_entries_for_keyval") - (return-type "gboolean") - (parameters - '("guint" "keyval") - '("GdkKeymapKey**" "keys") - '("gint*" "n_keys") - ) -) - -(define-method get_entries_for_keycode - (of-object "GdkKeymap") - (c-name "gdk_keymap_get_entries_for_keycode") - (return-type "gboolean") - (parameters - '("guint" "hardware_keycode") - '("GdkKeymapKey**" "keys") - '("guint**" "keyvals") - '("gint*" "n_entries") - ) -) - -(define-method get_direction - (of-object "GdkKeymap") - (c-name "gdk_keymap_get_direction") - (return-type "PangoDirection") -) - -(define-function keyval_name - (c-name "gdk_keyval_name") - (return-type "gchar*") - (parameters - '("guint" "keyval") - ) - (caller-owns-return #f) -) - -(define-function keyval_from_name - (c-name "gdk_keyval_from_name") - (return-type "guint") - (parameters - '("const-gchar*" "keyval_name") - ) -) - -(define-function keyval_convert_case - (c-name "gdk_keyval_convert_case") - (return-type "none") - (parameters - '("guint" "symbol") - '("guint*" "lower") - '("guint*" "upper") - ) -) - -(define-function keyval_to_upper - (c-name "gdk_keyval_to_upper") - (return-type "guint") - (parameters - '("guint" "keyval") - ) -) - -(define-function keyval_to_lower - (c-name "gdk_keyval_to_lower") - (return-type "guint") - (parameters - '("guint" "keyval") - ) -) - -(define-function keyval_is_upper - (c-name "gdk_keyval_is_upper") - (return-type "gboolean") - (parameters - '("guint" "keyval") - ) -) - -(define-function keyval_is_lower - (c-name "gdk_keyval_is_lower") - (return-type "gboolean") - (parameters - '("guint" "keyval") - ) -) - -(define-function keyval_to_unicode - (c-name "gdk_keyval_to_unicode") - (return-type "guint32") - (parameters - '("guint" "keyval") - ) -) - -(define-function unicode_to_keyval - (c-name "gdk_unicode_to_keyval") - (return-type "guint") - (parameters - '("guint32" "wc") - ) -) - -(define-virtual direction_changed - (of-object "GdkKeymap") - (return-type "none") -) - -(define-virtual keys_changed - (of-object "GdkKeymap") - (return-type "none") -) - - - -;; From /home/jdahlin/dev/gtk-2.8/gtk+/gdk/gdkpango.h - -(define-function gdk_pango_renderer_get_type - (c-name "gdk_pango_renderer_get_type") - (return-type "GType") -) - -(define-function pango_renderer_new - (c-name "gdk_pango_renderer_new") - (is-constructor-of "GdkPangoRenderer") - (return-type "PangoRenderer*") - (parameters - '("GdkScreen*" "screen") - ) -) - -(define-function pango_renderer_get_default - (c-name "gdk_pango_renderer_get_default") - (return-type "PangoRenderer*") - (parameters - '("GdkScreen*" "screen") - ) -) - -(define-method set_drawable - (of-object "GdkPangoRenderer") - (c-name "gdk_pango_renderer_set_drawable") - (return-type "none") - (parameters - '("GdkDrawable*" "drawable" (null-ok)) - ) -) - -(define-method set_gc - (of-object "GdkPangoRenderer") - (c-name "gdk_pango_renderer_set_gc") - (return-type "none") - (parameters - '("GdkGC*" "gc"(null-ok)) - ) -) - -(define-method set_stipple - (of-object "GdkPangoRenderer") - (c-name "gdk_pango_renderer_set_stipple") - (return-type "none") - (parameters - '("PangoRenderPart" "part") - '("GdkBitmap*" "stipple"(null-ok)) - ) -) - -(define-method set_override_color - (of-object "GdkPangoRenderer") - (c-name "gdk_pango_renderer_set_override_color") - (return-type "none") - (parameters - '("PangoRenderPart" "part") - '("const-GdkColor*" "color"(null-ok)) - ) -) - -(define-function pango_context_get_for_screen - (c-name "gdk_pango_context_get_for_screen") - (return-type "PangoContext*") - (parameters - '("GdkScreen*" "screen") - ) -) - -(define-function pango_context_get - (c-name "gdk_pango_context_get") - (return-type "PangoContext*") -) - -(define-function pango_context_set_colormap - (c-name "gdk_pango_context_set_colormap") - (return-type "none") - (parameters - '("PangoContext*" "context") - '("GdkColormap*" "colormap") - ) -) - -(define-function pango_layout_line_get_clip_region - (c-name "gdk_pango_layout_line_get_clip_region") - (return-type "GdkRegion*") - (caller-owns-return #t) - (parameters - '("PangoLayoutLine*" "line") - '("gint" "x_origin") - '("gint" "y_origin") - '("gint*" "index_ranges") - '("gint" "n_ranges") - ) -) - -(define-function pango_layout_get_clip_region - (c-name "gdk_pango_layout_get_clip_region") - (return-type "GdkRegion*") - (caller-owns-return #t) - (parameters - '("PangoLayout*" "layout") - '("gint" "x_origin") - '("gint" "y_origin") - '("gint*" "index_ranges") - '("gint" "n_ranges") - ) -) - -(define-function pango_attr_stipple_new - (c-name "gdk_pango_attr_stipple_new") - (is-constructor-of "GdkPangoAttrStipple") - (return-type "PangoAttribute*") - (parameters - '("GdkBitmap*" "stipple") - ) -) - -(define-function pango_attr_embossed_new - (c-name "gdk_pango_attr_embossed_new") - (is-constructor-of "GdkPangoAttrEmbossed") - (return-type "PangoAttribute*") - (parameters - '("gboolean" "embossed") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gdk/gdkpixbuf.h - -(define-method render_threshold_alpha - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_render_threshold_alpha") - (return-type "none") - (parameters - '("GdkBitmap*" "bitmap") - '("int" "src_x") - '("int" "src_y") - '("int" "dest_x") - '("int" "dest_y") - '("int" "width") - '("int" "height") - '("int" "alpha_threshold") - ) -) - -(define-method render_pixmap_and_mask_for_colormap - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_render_pixmap_and_mask_for_colormap") - (return-type "none") - (parameters - '("GdkColormap*" "colormap") - '("GdkPixmap**" "pixmap_return") - '("GdkBitmap**" "mask_return") - '("int" "alpha_threshold") - ) -) - -(define-method render_to_drawable - (deprecated "use gtk.gdk.Drawable.draw_pixbuf") - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_render_to_drawable") - (return-type "none") - (parameters - '("GdkDrawable*" "drawable") - '("GdkGC*" "gc") - '("int" "src_x") - '("int" "src_y") - '("int" "dest_x") - '("int" "dest_y") - '("int" "width") - '("int" "height") - '("GdkRgbDither" "dither" (default "GDK_RGB_DITHER_NORMAL")) - '("gint" "x_dither" (default "0")) - '("gint" "y_dither" (default "0")) - ) -) - -(define-method render_to_drawable_alpha - (deprecated "use gtk.gdk.Drawable.draw_pixbuf") - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_render_to_drawable_alpha") - (return-type "none") - (parameters - '("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" (default "GDK_RGB_DITHER_NORMAL")) - '("gint" "x_dither" (default "0")) - '("gint" "y_dither" (default "0")) - ) -) - -(define-method render_pixmap_and_mask - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_render_pixmap_and_mask") - (return-type "none") - (parameters - '("GdkPixmap**" "pixmap_return") - '("GdkBitmap**" "mask_return") - '("int" "alpha_threshold" (default "127")) - ) -) - -(define-method get_from_drawable - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_get_from_drawable") - (return-type "GdkPixbuf*") - (parameters - '("GdkDrawable*" "src") - '("GdkColormap*" "cmap") - '("int" "src_x") - '("int" "src_y") - '("int" "dest_x") - '("int" "dest_y") - '("int" "width") - '("int" "height") - ) -) - -(define-function pixbuf_get_from_drawable - (c-name "gdk_pixbuf_get_from_drawable2") - (return-type "GdkPixbuf*") - (parameters - '("GdkPixbuf*" "pixbuf" (null-ok)) - '("GdkDrawable*" "src") - '("GdkColormap*" "cmap") - '("int" "src_x") - '("int" "src_y") - '("int" "dest_x") - '("int" "dest_y") - '("int" "width") - '("int" "height") - ) -) - -(define-method get_from_image - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_get_from_image") - (return-type "GdkPixbuf*") - (parameters - '("GdkImage*" "src") - '("GdkColormap*" "cmap") - '("int" "src_x") - '("int" "src_y") - '("int" "dest_x") - '("int" "dest_y") - '("int" "width") - '("int" "height") - ) -) - -(define-method rotate_simple - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_rotate_simple") - (return-type "GdkPixbuf*") - (parameters - '("int" "angle") - ) - (caller-owns-return #t) -) - -;; From /opt/gtk2/include/gtk-2.0/gdk/gdkpixmap.h - -(define-function gdk_pixmap_get_type - (c-name "gdk_pixmap_get_type") - (return-type "GType") -) - -(define-function pixmap_new - (is-constructor-of GdkPixmap) - (c-name "gdk_pixmap_new") - (return-type "GdkPixmap*") - (parameters - '("GdkDrawable*" "drawable" (null-ok)) - '("gint" "width") - '("gint" "height") - '("gint" "depth" (default "-1")) - ) -) - -(define-function bitmap_create_from_data - (c-name "gdk_bitmap_create_from_data") - (return-type "GdkBitmap*") - (parameters - '("GdkDrawable*" "drawable" (null-ok)) - '("const-guchar*" "data") - '("gint" "width") - '("gint" "height") - ) -) - -(define-function pixmap_create_from_data - (c-name "gdk_pixmap_create_from_data") - (return-type "GdkPixmap*") - (parameters - '("GdkDrawable*" "drawable" (null-ok)) - '("const-guchar*" "data") - '("gint" "width") - '("gint" "height") - '("gint" "depth") - '("GdkColor*" "fg") - '("GdkColor*" "bg") - ) -) - -(define-function pixmap_create_from_xpm - (c-name "gdk_pixmap_create_from_xpm") - (return-type "GdkPixmap*") - (parameters - '("GdkDrawable*" "drawable") - '("GdkBitmap**" "mask") - '("GdkColor*" "transparent_color") - '("const-gchar*" "filename") - ) -) - -(define-function pixmap_colormap_create_from_xpm - (c-name "gdk_pixmap_colormap_create_from_xpm") - (return-type "GdkPixmap*") - (parameters - '("GdkDrawable*" "drawable") - '("GdkColormap*" "colormap") - '("GdkBitmap**" "mask") - '("GdkColor*" "transparent_color") - '("const-gchar*" "filename") - ) -) - -(define-function pixmap_create_from_xpm_d - (c-name "gdk_pixmap_create_from_xpm_d") - (return-type "GdkPixmap*") - (parameters - '("GdkDrawable*" "drawable") - '("GdkBitmap**" "mask") - '("GdkColor*" "transparent_color") - '("gchar**" "data") - ) -) - -(define-function pixmap_colormap_create_from_xpm_d - (c-name "gdk_pixmap_colormap_create_from_xpm_d") - (return-type "GdkPixmap*") - (parameters - '("GdkDrawable*" "drawable") - '("GdkColormap*" "colormap") - '("GdkBitmap**" "mask") - '("GdkColor*" "transparent_color") - '("gchar**" "data") - ) -) - -(define-function pixmap_foreign_new - (c-name "gdk_pixmap_foreign_new") - (return-type "GdkPixmap*") - (caller-owns-return #t) - (parameters - '("GdkNativeWindow" "anid") - ) -) - -(define-function pixmap_lookup - (c-name "gdk_pixmap_lookup") - (return-type "GdkPixmap*") - (parameters - '("GdkNativeWindow" "anid") - ) -) - -(define-function pixmap_foreign_new_for_display - (c-name "gdk_pixmap_foreign_new_for_display") - (return-type "GdkPixmap*") - (caller-owns-return #t) - (parameters - '("GdkDisplay*" "display") - '("GdkNativeWindow" "anid") - ) -) - -(define-function pixmap_lookup_for_display - (c-name "gdk_pixmap_lookup_for_display") - (return-type "GdkPixmap*") - (parameters - '("GdkDisplay*" "display") - '("GdkNativeWindow" "anid") - ) -) - - -;; From gdkprivate.h - -(define-method destroy_notify - (of-object "GdkWindow") - (c-name "gdk_window_destroy_notify") - (return-type "none") -) - -(define-function synthesize_window_state - (c-name "gdk_synthesize_window_state") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GdkWindowState" "unset_flags") - '("GdkWindowState" "set_flags") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gdk/gdkproperty.h - -(define-function text_property_to_text_list - (c-name "gdk_text_property_to_text_list") - (return-type "gint") - (parameters - '("GdkAtom" "encoding") - '("gint" "format") - '("const-guchar*" "text") - '("gint" "length") - '("gchar***" "list") - ) -) - -(define-function text_property_to_utf8_list - (c-name "gdk_text_property_to_utf8_list") - (return-type "gint") - (parameters - '("GdkAtom" "encoding") - '("gint" "format") - '("const-guchar*" "text") - '("gint" "length") - '("gchar***" "list") - ) -) - -(define-function utf8_to_compound_text - (c-name "gdk_utf8_to_compound_text") - (return-type "gboolean") - (parameters - '("const-gchar*" "str") - '("GdkAtom*" "encoding") - '("gint*" "format") - '("guchar**" "ctext") - '("gint*" "length") - ) -) - -(define-function string_to_compound_text - (c-name "gdk_string_to_compound_text") - (return-type "gint") - (parameters - '("const-gchar*" "str") - '("GdkAtom*" "encoding") - '("gint*" "format") - '("guchar**" "ctext") - '("gint*" "length") - ) -) - -(define-function text_property_to_text_list_for_display - (c-name "gdk_text_property_to_text_list_for_display") - (return-type "gint") - (parameters - '("GdkDisplay*" "display") - '("GdkAtom" "encoding") - '("gint" "format") - '("const-guchar*" "text") - '("gint" "length") - '("gchar***" "list") - ) -) - -(define-function text_property_to_utf8_list_for_display - (c-name "gdk_text_property_to_utf8_list_for_display") - (return-type "gint") - (parameters - '("GdkDisplay*" "display") - '("GdkAtom" "encoding") - '("gint" "format") - '("const-guchar*" "text") - '("gint" "length") - '("gchar***" "list") - ) -) - -(define-function utf8_to_string_target - (c-name "gdk_utf8_to_string_target") - (return-type "gchar*") - (parameters - '("const-gchar*" "str") - ) -) - -(define-function string_to_compound_text_for_display - (c-name "gdk_string_to_compound_text_for_display") - (return-type "gint") - (parameters - '("GdkDisplay*" "display") - '("const-gchar*" "str") - '("GdkAtom*" "encoding") - '("gint*" "format") - '("guchar**" "ctext") - '("gint*" "length") - ) -) - -(define-function utf8_to_compound_text_for_display - (c-name "gdk_utf8_to_compound_text_for_display") - (return-type "gboolean") - (parameters - '("GdkDisplay*" "display") - '("const-gchar*" "str") - '("GdkAtom*" "encoding") - '("gint*" "format") - '("guchar**" "ctext") - '("gint*" "length") - ) -) - -(define-function free_text_list - (c-name "gdk_free_text_list") - (return-type "none") - (parameters - '("gchar**" "list") - ) -) - -(define-function free_compound_text - (c-name "gdk_free_compound_text") - (return-type "none") - (parameters - '("guchar*" "ctext") - ) -) - -(define-method name - (of-object "GdkAtom") - (c-name "gdk_atom_name") - (return-type "gchar*") -) - -(define-function atom_intern - (c-name "gdk_atom_intern") - (return-type "GdkAtom") - (parameters - '("gchar*" "atom_name") - '("gboolean" "only_if_exists" (default "FALSE")) - ) -) - -(define-method property_get - (of-object "GdkWindow") - (c-name "gdk_property_get") - (return-type "gboolean") - (parameters - '("GdkAtom" "property") - '("GdkAtom" "type") - '("gulong" "offset") - '("gulong" "length") - '("gint" "pdelete") - '("GdkAtom*" "actual_property_type") - '("gint*" "actual_format") - '("gint*" "actual_length") - '("guchar**" "data") - ) -) - -(define-method property_change - (of-object "GdkWindow") - (c-name "gdk_property_change") - (return-type "none") - (parameters - '("GdkAtom" "property") - '("GdkAtom" "type") - '("gint" "format") - '("GdkPropMode" "mode") - '("const-guchar*" "data") - '("gint" "nelements") - ) -) - -(define-method property_delete - (of-object "GdkWindow") - (c-name "gdk_property_delete") - (return-type "none") - (parameters - '("GdkAtom" "property") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gdk/gdkrgb.h - -(define-function rgb_xpixel_from_rgb - (c-name "gdk_rgb_xpixel_from_rgb") - (return-type "gulong") - (parameters - '("guint32" "rgb") - ) -) - -(define-function rgb_gc_set_foreground - (c-name "gdk_rgb_gc_set_foreground") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("guint32" "rgb") - ) -) - -(define-function rgb_gc_set_background - (c-name "gdk_rgb_gc_set_background") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("guint32" "rgb") - ) -) - -(define-method draw_rgb_image - (of-object "GdkDrawable") - (c-name "gdk_draw_rgb_image") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("GdkRgbDither" "dith") - '("guchar*" "rgb_buf") - '("gint" "rowstride") - ) -) - -(define-method draw_rgb_image_dithalign - (of-object "GdkDrawable") - (c-name "gdk_draw_rgb_image_dithalign") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("GdkRgbDither" "dith") - '("guchar*" "rgb_buf") - '("gint" "rowstride") - '("gint" "xdith") - '("gint" "ydith") - ) -) - -(define-method draw_rgb_32_image - (of-object "GdkDrawable") - (c-name "gdk_draw_rgb_32_image") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("GdkRgbDither" "dith") - '("guchar*" "buf") - '("gint" "rowstride") - ) -) - -(define-method draw_gray_image - (of-object "GdkDrawable") - (c-name "gdk_draw_gray_image") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("GdkRgbDither" "dith") - '("guchar*" "buf") - '("gint" "rowstride") - ) -) - -(define-function rgb_cmap_new - (c-name "gdk_rgb_cmap_new") - (return-type "GdkRgbCmap*") - (parameters - '("guint32*" "colors") - '("gint" "n_colors") - ) -) - -(define-method draw_indexed_image - (of-object "GdkDrawable") - (c-name "gdk_draw_indexed_image") - (return-type "none") - (parameters - '("GdkGC*" "gc") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("GdkRgbDither" "dith") - '("guchar*" "buf") - '("gint" "rowstride") - '("GdkRgbCmap*" "cmap") - ) -) - -(define-function rgb_ditherable - (c-name "gdk_rgb_ditherable") - (return-type "gboolean") -) - -(define-function rgb_set_verbose - (c-name "gdk_rgb_set_verbose") - (return-type "none") - (parameters - '("gboolean" "verbose") - ) -) - -(define-function rgb_set_install - (c-name "gdk_rgb_set_install") - (return-type "none") - (parameters - '("gboolean" "install") - ) -) - -(define-function rgb_set_min_colors - (c-name "gdk_rgb_set_min_colors") - (return-type "none") - (parameters - '("gint" "min_colors") - ) -) - -(define-function rgb_get_colormap - (c-name "gdk_rgb_get_colormap") - (return-type "GdkColormap*") -) - -(define-function rgb_get_cmap - (deprecated "use gtk.gdk.rgb_get_colormap instead") - (c-name "gdk_rgb_get_cmap") - (return-type "GdkColormap*") -) - -(define-function rgb_get_visual - (c-name "gdk_rgb_get_visual") - (return-type "GdkVisual*") -) - -(define-function rgb_init - (c-name "gdk_rgb_init") - (return-type "none") -) - -(define-function rgb_find_color - (c-name "gdk_rgb_find_color") - (return-type "none") - (parameters - '("GdkColormap*" "colormap") - '("GdkColor*" "color") - ) -) - -(define-function draw_rgb_32_image_dithalign - (c-name "gdk_draw_rgb_32_image_dithalign") - (return-type "none") - (parameters - '("GdkDrawable*" "drawable") - '("GdkGC*" "gc") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("GdkRgbDither" "dith") - '("guchar*" "buf") - '("gint" "rowstride") - '("gint" "xdith") - '("gint" "ydith") - ) -) - -(define-method free - (of-object "GdkRgbCmap") - (c-name "gdk_rgb_cmap_free") - (return-type "none") -) - -(define-function rgb_colormap_ditherable - (c-name "gdk_rgb_colormap_ditherable") - (return-type "gboolean") - (parameters - '("GdkColormap*" "cmap") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gdk/gdkscreen.h - -(define-function gdk_screen_get_type - (c-name "gdk_screen_get_type") - (return-type "GType") -) - -(define-method get_default_colormap - (of-object "GdkScreen") - (c-name "gdk_screen_get_default_colormap") - (return-type "GdkColormap*") -) - -(define-method set_default_colormap - (of-object "GdkScreen") - (c-name "gdk_screen_set_default_colormap") - (return-type "none") - (parameters - '("GdkColormap*" "colormap") - ) -) - -(define-method get_system_colormap - (of-object "GdkScreen") - (c-name "gdk_screen_get_system_colormap") - (return-type "GdkColormap*") -) - -(define-method get_system_visual - (of-object "GdkScreen") - (c-name "gdk_screen_get_system_visual") - (return-type "GdkVisual*") -) - -(define-method get_rgb_colormap - (of-object "GdkScreen") - (c-name "gdk_screen_get_rgb_colormap") - (return-type "GdkColormap*") -) - -(define-method get_rgba_colormap - (of-object "GdkScreen") - (c-name "gdk_screen_get_rgba_colormap") - (return-type "GdkColormap*") -) - -(define-method get_rgb_visual - (of-object "GdkScreen") - (c-name "gdk_screen_get_rgb_visual") - (return-type "GdkVisual*") -) - -(define-method get_rgba_visual - (of-object "GdkScreen") - (c-name "gdk_screen_get_rgba_visual") - (return-type "GdkVisual*") -) - -(define-method get_root_window - (of-object "GdkScreen") - (c-name "gdk_screen_get_root_window") - (return-type "GdkWindow*") -) - -(define-method get_display - (of-object "GdkScreen") - (c-name "gdk_screen_get_display") - (return-type "GdkDisplay*") -) - -(define-method get_number - (of-object "GdkScreen") - (c-name "gdk_screen_get_number") - (return-type "gint") -) - -(define-method get_width - (of-object "GdkScreen") - (c-name "gdk_screen_get_width") - (return-type "gint") -) - -(define-method get_height - (of-object "GdkScreen") - (c-name "gdk_screen_get_height") - (return-type "gint") -) - -(define-method get_width_mm - (of-object "GdkScreen") - (c-name "gdk_screen_get_width_mm") - (return-type "gint") -) - -(define-method get_height_mm - (of-object "GdkScreen") - (c-name "gdk_screen_get_height_mm") - (return-type "gint") -) - -(define-method list_visuals - (of-object "GdkScreen") - (c-name "gdk_screen_list_visuals") - (return-type "GList*") -) - -(define-method get_toplevel_windows - (of-object "GdkScreen") - (c-name "gdk_screen_get_toplevel_windows") - (return-type "GList*") -) - -(define-method make_display_name - (of-object "GdkScreen") - (c-name "gdk_screen_make_display_name") - (return-type "gchar*") -) - -(define-method get_n_monitors - (of-object "GdkScreen") - (c-name "gdk_screen_get_n_monitors") - (return-type "gint") -) - -(define-method get_monitor_geometry - (of-object "GdkScreen") - (c-name "gdk_screen_get_monitor_geometry") - (return-type "none") - (parameters - '("gint" "monitor_num") - '("GdkRectangle*" "dest") - ) -) - -(define-method get_monitor_at_point - (of-object "GdkScreen") - (c-name "gdk_screen_get_monitor_at_point") - (return-type "gint") - (parameters - '("gint" "x") - '("gint" "y") - ) -) - -(define-method get_monitor_at_window - (of-object "GdkScreen") - (c-name "gdk_screen_get_monitor_at_window") - (return-type "gint") - (parameters - '("GdkWindow*" "window") - ) -) - -(define-method broadcast_client_message - (of-object "GdkScreen") - (c-name "gdk_screen_broadcast_client_message") - (return-type "none") - (parameters - '("GdkEvent*" "event") - ) -) - -(define-function screen_get_default - (c-name "gdk_screen_get_default") - (return-type "GdkScreen*") -) - -(define-method get_setting - (of-object "GdkScreen") - (c-name "gdk_screen_get_setting") - (return-type "gboolean") - (parameters - '("const-gchar*" "name") - '("GValue*" "value") - ) -) - -(define-method alternative_dialog_button_order - (of-object "GdkScreen") - (c-name "gtk_alternative_dialog_button_order") - (return-type "gboolean") -) - - -(define-virtual size_changed - (of-object "GdkScreen") - (return-type "none") -) - -;; From /opt/gtk2/include/gtk-2.0/gdk/gdkselection.h - -(define-function selection_owner_set - (c-name "gdk_selection_owner_set") - (return-type "gboolean") - (parameters - '("GdkWindow*" "owner") - '("GdkAtom" "selection") - '("guint32" "time") - '("gboolean" "send_event") - ) -) - -(define-function selection_owner_get - (c-name "gdk_selection_owner_get") - (return-type "GdkWindow*") - (parameters - '("GdkAtom" "selection") - ) -) - -(define-function selection_owner_set_for_display - (c-name "gdk_selection_owner_set_for_display") - (return-type "gboolean") - (parameters - '("GdkDisplay*" "display") - '("GdkWindow*" "owner") - '("GdkAtom" "selection") - '("guint32" "time") - '("gboolean" "send_event") - ) -) - -(define-function selection_owner_get_for_display - (c-name "gdk_selection_owner_get_for_display") - (return-type "GdkWindow*") - (parameters - '("GdkDisplay*" "display") - '("GdkAtom" "selection") - ) -) - -(define-method selection_convert - (of-object "GdkWindow") - (c-name "gdk_selection_convert") - (return-type "none") - (parameters - '("GdkAtom" "selection") - '("GdkAtom" "target") - '("guint32" "time") - ) -) - -(define-method selection_property_get - (of-object "GdkWindow") - (c-name "gdk_selection_property_get") - (return-type "gboolean") - (parameters - '("guchar**" "data") - '("GdkAtom*" "prop_type") - '("gint*" "prop_format") - ) -) - -(define-function selection_send_notify - (c-name "gdk_selection_send_notify") - (return-type "none") - (parameters - '("guint32" "requestor") - '("GdkAtom" "selection") - '("GdkAtom" "target") - '("GdkAtom" "property") - '("guint32" "time") - ) -) - -(define-function selection_send_notify_for_display - (c-name "gdk_selection_send_notify_for_display") - (return-type "none") - (parameters - '("GdkDisplay*" "display") - '("guint32" "requestor") - '("GdkAtom" "selection") - '("GdkAtom" "target") - '("GdkAtom" "property") - '("guint32" "time") - ) -) - -;; From /mondo/local/gtk-2.10/include/gtk-2.0/gdk/gdkspawn.h - -(define-function spawn_on_screen - (c-name "gdk_spawn_on_screen") - (return-type "gboolean") - (parameters - '("GdkScreen*" "screen") - '("const-gchar*" "working_directory") - '("gchar**" "argv") - '("gchar**" "envp") - '("GSpawnFlags" "flags") - '("GSpawnChildSetupFunc" "child_setup") - '("gpointer" "user_data") - '("gint*" "child_pid") - '("GError**" "error") - ) -) - -(define-function spawn_on_screen_with_pipes - (c-name "gdk_spawn_on_screen_with_pipes") - (return-type "gboolean") - (parameters - '("GdkScreen*" "screen") - '("const-gchar*" "working_directory") - '("gchar**" "argv") - '("gchar**" "envp") - '("GSpawnFlags" "flags") - '("GSpawnChildSetupFunc" "child_setup") - '("gpointer" "user_data") - '("gint*" "child_pid") - '("gint*" "standard_input") - '("gint*" "standard_output") - '("gint*" "standard_error") - '("GError**" "error") - ) -) - -(define-function spawn_command_line_on_screen - (c-name "gdk_spawn_command_line_on_screen") - (return-type "gboolean") - (parameters - '("GdkScreen*" "screen") - '("const-gchar*" "command_line") - '("GError**" "error") - ) -) - -;; From /opt/gtk2/include/gtk-2.0/gdk/gdkvisual.h - -(define-function gdk_visual_get_type - (c-name "gdk_visual_get_type") - (return-type "GType") -) - -(define-function visual_get_best_depth - (c-name "gdk_visual_get_best_depth") - (return-type "gint") -) - -(define-function visual_get_best_type - (c-name "gdk_visual_get_best_type") - (return-type "GdkVisualType") -) - -(define-function visual_get_system - (c-name "gdk_visual_get_system") - (return-type "GdkVisual*") -) - -(define-function visual_get_best - (c-name "gdk_visual_get_best") - (return-type "GdkVisual*") -) - -(define-function visual_get_best_with_depth - (c-name "gdk_visual_get_best_with_depth") - (return-type "GdkVisual*") - (parameters - '("gint" "depth") - ) -) - -(define-function visual_get_best_with_type - (c-name "gdk_visual_get_best_with_type") - (return-type "GdkVisual*") - (parameters - '("GdkVisualType" "visual_type") - ) -) - -(define-function visual_get_best_with_both - (is-constructor-of GdkVisual) - (c-name "gdk_visual_get_best_with_both") - (return-type "GdkVisual*") - (parameters - '("gint" "depth") - '("GdkVisualType" "visual_type") - ) -) - -(define-function query_depths - (c-name "gdk_query_depths") - (return-type "none") - (parameters - '("gint**" "depths") - '("gint*" "count") - ) -) - -(define-function query_visual_types - (c-name "gdk_query_visual_types") - (return-type "none") - (parameters - '("GdkVisualType**" "visual_types") - '("gint*" "count") - ) -) - -(define-function list_visuals - (c-name "gdk_list_visuals") - (return-type "GList*") -) - -(define-method get_screen - (of-object "GdkVisual") - (c-name "gdk_visual_get_screen") - (return-type "GdkScreen*") -) - - -;; From /opt/gtk2/include/gtk-2.0/gdk/gdkwindow.h - -(define-function gdk_window_object_get_type - (c-name "gdk_window_object_get_type") - (return-type "GType") -) - -(define-function new - (is-constructor-of GdkWindow) - (c-name "gdk_window_new") - (return-type "GdkWindow*") - (parameters - '("GdkWindow*" "parent") - '("GdkWindowAttr*" "attributes") - '("gint" "attributes_mask") - ) -) - -(define-method set_keep_above - (c-name "gdk_window_set_keep_above") - (of-object "GdkWindow") - (parameters - '("gboolean" "setting") - ) -) - -(define-method set_keep_below - (c-name "gdk_window_set_keep_below") - (of-object "GdkWindow") - (parameters - '("gboolean" "setting") - ) -) - -(define-method destroy - (of-object "GdkWindow") - (c-name "gdk_window_destroy") - (return-type "none") -) - -(define-method get_window_type - (of-object "GdkWindow") - (c-name "gdk_window_get_window_type") - (return-type "GdkWindowType") -) - -(define-function window_at_pointer - (c-name "gdk_window_at_pointer") - (return-type "GdkWindow*") - (parameters - '("gint*" "win_x") - '("gint*" "win_y") - ) -) - -(define-method show - (of-object "GdkWindow") - (c-name "gdk_window_show") - (return-type "none") -) - -(define-method hide - (of-object "GdkWindow") - (c-name "gdk_window_hide") - (return-type "none") -) - -(define-method withdraw - (of-object "GdkWindow") - (c-name "gdk_window_withdraw") - (return-type "none") -) - -(define-method move - (of-object "GdkWindow") - (c-name "gdk_window_move") - (return-type "none") - (parameters - '("gint" "x") - '("gint" "y") - ) -) - -(define-method resize - (of-object "GdkWindow") - (c-name "gdk_window_resize") - (return-type "none") - (parameters - '("gint" "width") - '("gint" "height") - ) -) - -(define-method move_resize - (of-object "GdkWindow") - (c-name "gdk_window_move_resize") - (return-type "none") - (parameters - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method reparent - (of-object "GdkWindow") - (c-name "gdk_window_reparent") - (return-type "none") - (parameters - '("GdkWindow*" "new_parent") - '("gint" "x") - '("gint" "y") - ) -) - -(define-method clear - (of-object "GdkWindow") - (c-name "gdk_window_clear") - (return-type "none") -) - -(define-method clear_area - (of-object "GdkWindow") - (c-name "gdk_window_clear_area") - (return-type "none") - (parameters - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method clear_area_e - (of-object "GdkWindow") - (c-name "gdk_window_clear_area_e") - (return-type "none") - (parameters - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method raise - (of-object "GdkWindow") - (c-name "gdk_window_raise") - (return-type "none") -) - -(define-method lower - (of-object "GdkWindow") - (c-name "gdk_window_lower") - (return-type "none") -) - -(define-method focus - (of-object "GdkWindow") - (c-name "gdk_window_focus") - (return-type "none") - (parameters - '("guint32" "timestamp" (null-ok) (default "GDK_CURRENT_TIME")) - ) -) - -(define-method set_user_data - (of-object "GdkWindow") - (c-name "gdk_window_set_user_data") - (return-type "none") - (parameters - '("gpointer" "user_data") - ) -) - -(define-method get_user_data - (of-object "GdkWindow") - (c-name "gdk_window_get_user_data") - (return-type "none") - (parameters - '("gpointer*" "user_data") - ) -) - -(define-method set_override_redirect - (of-object "GdkWindow") - (c-name "gdk_window_set_override_redirect") - (return-type "none") - (parameters - '("gboolean" "override_redirect") - ) -) - -(define-method add_filter - (of-object "GdkWindow") - (c-name "gdk_window_add_filter") - (return-type "none") - (parameters - '("GdkFilterFunc" "function") - '("gpointer" "data") - ) -) - -(define-method remove_filter - (of-object "GdkWindow") - (c-name "gdk_window_remove_filter") - (return-type "none") - (parameters - '("GdkFilterFunc" "function") - '("gpointer" "data") - ) -) - -(define-method scroll - (of-object "GdkWindow") - (c-name "gdk_window_scroll") - (return-type "none") - (parameters - '("gint" "dx") - '("gint" "dy") - ) -) - -(define-method shape_combine_mask - (of-object "GdkWindow") - (c-name "gdk_window_shape_combine_mask") - (return-type "none") - (parameters - '("GdkBitmap*" "shape_mask" (null-ok)) - '("gint" "offset_x") - '("gint" "offset_y") - ) -) - -(define-method set_child_shapes - (of-object "GdkWindow") - (c-name "gdk_window_set_child_shapes") - (return-type "none") -) - -(define-method merge_child_shapes - (of-object "GdkWindow") - (c-name "gdk_window_merge_child_shapes") - (return-type "none") -) - -(define-method is_visible - (of-object "GdkWindow") - (c-name "gdk_window_is_visible") - (return-type "gboolean") -) - -(define-method is_viewable - (of-object "GdkWindow") - (c-name "gdk_window_is_viewable") - (return-type "gboolean") -) - -(define-method get_state - (of-object "GdkWindow") - (c-name "gdk_window_get_state") - (return-type "GdkWindowState") -) - -(define-method set_static_gravities - (of-object "GdkWindow") - (c-name "gdk_window_set_static_gravities") - (return-type "gboolean") - (parameters - '("gboolean" "use_static") - ) -) - -(define-function window_foreign_new - (c-name "gdk_window_foreign_new") - (return-type "GdkWindow*") - (caller-owns-return #t) - (parameters - '("GdkNativeWindow" "anid") - ) -) - -(define-function window_lookup - (c-name "gdk_window_lookup") - (return-type "GdkWindow*") - (parameters - '("GdkNativeWindow" "anid") - ) -) - -(define-function window_foreign_new_for_display - (c-name "gdk_window_foreign_new_for_display") - (return-type "GdkWindow*") - (caller-owns-return #t) - (parameters - '("GdkDisplay*" "display") - '("GdkNativeWindow" "anid") - ) -) - -(define-function window_lookup_for_display - (c-name "gdk_window_lookup_for_display") - (return-type "GdkWindow*") - (parameters - '("GdkDisplay*" "display") - '("GdkNativeWindow" "anid") - ) -) - -(define-method set_hints - (of-object "GdkWindow") - (c-name "gdk_window_set_hints") - (return-type "none") - (parameters - '("gint" "x") - '("gint" "y") - '("gint" "min_width") - '("gint" "min_height") - '("gint" "max_width") - '("gint" "max_height") - '("gint" "flags") - ) -) - -(define-method set_type_hint - (of-object "GdkWindow") - (c-name "gdk_window_set_type_hint") - (return-type "none") - (parameters - '("GdkWindowTypeHint" "hint") - ) -) - -(define-method set_modal_hint - (of-object "GdkWindow") - (c-name "gdk_window_set_modal_hint") - (return-type "none") - (parameters - '("gboolean" "modal") - ) -) - -(define-method set_skip_taskbar_hint - (of-object "GdkWindow") - (c-name "gdk_window_set_skip_taskbar_hint") - (return-type "none") - (parameters - '("gboolean" "modal") - ) -) - -(define-method set_skip_pager_hint - (of-object "GdkWindow") - (c-name "gdk_window_set_skip_pager_hint") - (return-type "none") - (parameters - '("gboolean" "modal") - ) -) - -(define-method set_geometry_hints - (of-object "GdkWindow") - (c-name "gdk_window_set_geometry_hints") - (return-type "none") - (parameters - '("GdkGeometry*" "geometry") - '("GdkWindowHints" "flags") - ) -) - -(define-function set_sm_client_id - (c-name "gdk_set_sm_client_id") - (return-type "none") - (parameters - '("const-gchar*" "sm_client_id") - ) -) - -(define-method begin_paint_rect - (of-object "GdkWindow") - (c-name "gdk_window_begin_paint_rect") - (return-type "none") - (parameters - '("GdkRectangle*" "rectangle") - ) -) - -(define-method begin_paint_region - (of-object "GdkWindow") - (c-name "gdk_window_begin_paint_region") - (return-type "none") - (parameters - '("GdkRegion*" "region") - ) -) - -(define-method end_paint - (of-object "GdkWindow") - (c-name "gdk_window_end_paint") - (return-type "none") -) - -(define-method set_title - (of-object "GdkWindow") - (c-name "gdk_window_set_title") - (return-type "none") - (parameters - '("const-gchar*" "title") - ) -) - -(define-method set_role - (of-object "GdkWindow") - (c-name "gdk_window_set_role") - (return-type "none") - (parameters - '("const-gchar*" "role") - ) -) - -(define-method set_transient_for - (of-object "GdkWindow") - (c-name "gdk_window_set_transient_for") - (return-type "none") - (parameters - '("GdkWindow*" "leader") - ) -) - -(define-method set_background - (of-object "GdkWindow") - (c-name "gdk_window_set_background") - (return-type "none") - (parameters - '("GdkColor*" "color") - ) -) - -(define-method set_back_pixmap - (of-object "GdkWindow") - (c-name "gdk_window_set_back_pixmap") - (return-type "none") - (parameters - '("GdkPixmap*" "pixmap" (null-ok)) - '("gboolean" "parent_relative") - ) -) - -(define-method set_cursor - (of-object "GdkWindow") - (c-name "gdk_window_set_cursor") - (return-type "none") - (parameters - '("GdkCursor*" "cursor" (null-ok)) - ) -) - -(define-method get_geometry - (of-object "GdkWindow") - (c-name "gdk_window_get_geometry") - (return-type "none") - (parameters - '("gint*" "x") - '("gint*" "y") - '("gint*" "width") - '("gint*" "height") - '("gint*" "depth") - ) -) - -(define-method get_position - (of-object "GdkWindow") - (c-name "gdk_window_get_position") - (return-type "none") - (parameters - '("gint*" "x") - '("gint*" "y") - ) -) - -(define-method get_origin - (of-object "GdkWindow") - (c-name "gdk_window_get_origin") - (return-type "gint") - (parameters - '("gint*" "x") - '("gint*" "y") - ) -) - -(define-method get_deskrelative_origin - (of-object "GdkWindow") - (c-name "gdk_window_get_deskrelative_origin") - (return-type "gboolean") - (parameters - '("gint*" "x") - '("gint*" "y") - ) -) - -(define-method get_root_origin - (of-object "GdkWindow") - (c-name "gdk_window_get_root_origin") - (return-type "none") - (parameters - '("gint*" "x") - '("gint*" "y") - ) -) - -(define-method get_frame_extents - (of-object "GdkWindow") - (c-name "gdk_window_get_frame_extents") - (return-type "none") - (parameters - '("GdkRectangle*" "rect") - ) -) - -(define-method get_pointer - (of-object "GdkWindow") - (c-name "gdk_window_get_pointer") - (return-type "GdkWindow*") - (parameters - '("gint*" "x") - '("gint*" "y") - '("GdkModifierType*" "mask") - ) -) - -(define-method get_parent - (of-object "GdkWindow") - (c-name "gdk_window_get_parent") - (return-type "GdkWindow*") -) - -(define-method get_toplevel - (of-object "GdkWindow") - (c-name "gdk_window_get_toplevel") - (return-type "GdkWindow*") -) - -(define-method get_children - (of-object "GdkWindow") - (c-name "gdk_window_get_children") - (return-type "GList*") -) - -(define-method peek_children - (of-object "GdkWindow") - (c-name "gdk_window_peek_children") - (return-type "GList*") -) - -(define-method get_events - (of-object "GdkWindow") - (c-name "gdk_window_get_events") - (return-type "GdkEventMask") -) - -(define-method set_events - (of-object "GdkWindow") - (c-name "gdk_window_set_events") - (return-type "none") - (parameters - '("GdkEventMask" "event_mask") - ) -) - -(define-method set_icon_list - (of-object "GdkWindow") - (c-name "gdk_window_set_icon_list") - (return-type "none") - (parameters - '("GList*" "pixbufs") - ) -) - -(define-method set_icon - (of-object "GdkWindow") - (c-name "gdk_window_set_icon") - (return-type "none") - (parameters - '("GdkWindow*" "icon_window") - '("GdkPixmap*" "pixmap") - '("GdkBitmap*" "mask") - ) -) - -(define-method set_icon_name - (of-object "GdkWindow") - (c-name "gdk_window_set_icon_name") - (return-type "none") - (parameters - '("const-gchar*" "name") - ) -) - -(define-method set_group - (of-object "GdkWindow") - (c-name "gdk_window_set_group") - (return-type "none") - (parameters - '("GdkWindow*" "leader") - ) -) - -(define-method get_group - (of-object "GdkWindow") - (c-name "gdk_window_get_group") - (return-type "GdkWindow*") -) - -(define-method set_decorations - (of-object "GdkWindow") - (c-name "gdk_window_set_decorations") - (return-type "none") - (parameters - '("GdkWMDecoration" "decorations") - ) -) - -(define-method get_decorations - (of-object "GdkWindow") - (c-name "gdk_window_get_decorations") - (return-type "gboolean") - (parameters - '("GdkWMDecoration*" "decorations") - ) -) - -(define-method set_functions - (of-object "GdkWindow") - (c-name "gdk_window_set_functions") - (return-type "none") - (parameters - '("GdkWMFunction" "functions") - ) -) - -(define-function window_get_toplevels - (c-name "gdk_window_get_toplevels") - (return-type "GList*") -) - -(define-method iconify - (of-object "GdkWindow") - (c-name "gdk_window_iconify") - (return-type "none") -) - -(define-method deiconify - (of-object "GdkWindow") - (c-name "gdk_window_deiconify") - (return-type "none") -) - -(define-method stick - (of-object "GdkWindow") - (c-name "gdk_window_stick") - (return-type "none") -) - -(define-method unstick - (of-object "GdkWindow") - (c-name "gdk_window_unstick") - (return-type "none") -) - -(define-method maximize - (of-object "GdkWindow") - (c-name "gdk_window_maximize") - (return-type "none") -) - -(define-method unmaximize - (of-object "GdkWindow") - (c-name "gdk_window_unmaximize") - (return-type "none") -) - -(define-method fullscreen - (of-object "GdkWindow") - (c-name "gdk_window_fullscreen") - (return-type "none") -) - -(define-method unfullscreen - (of-object "GdkWindow") - (c-name "gdk_window_unfullscreen") - (return-type "none") -) - -(define-method register_dnd - (of-object "GdkWindow") - (c-name "gdk_window_register_dnd") - (return-type "none") -) - -(define-method begin_resize_drag - (of-object "GdkWindow") - (c-name "gdk_window_begin_resize_drag") - (return-type "none") - (parameters - '("GdkWindowEdge" "edge") - '("gint" "button") - '("gint" "root_x") - '("gint" "root_y") - '("guint32" "timestamp") - ) -) - -(define-method begin_move_drag - (of-object "GdkWindow") - (c-name "gdk_window_begin_move_drag") - (return-type "none") - (parameters - '("gint" "button") - '("gint" "root_x") - '("gint" "root_y") - '("guint32" "timestamp") - ) -) - -(define-method invalidate_rect - (of-object "GdkWindow") - (c-name "gdk_window_invalidate_rect") - (return-type "none") - (parameters - '("GdkRectangle*" "rect" (null-ok)) - '("gboolean" "invalidate_children") - ) -) - -(define-method invalidate_region - (of-object "GdkWindow") - (c-name "gdk_window_invalidate_region") - (return-type "none") - (parameters - '("GdkRegion*" "region") - '("gboolean" "invalidate_children") - ) -) - -(define-method invalidate_maybe_recurse - (of-object "GdkWindow") - (c-name "gdk_window_invalidate_maybe_recurse") - (return-type "none") - (parameters - '("GdkRegion*" "region") - '("gboolean (*child_func)(GdkWindow *, gpointer)" "child_func") - ) -) - -(define-method get_update_area - (of-object "GdkWindow") - (c-name "gdk_window_get_update_area") - (return-type "GdkRegion*") - (caller-owns-return #t) -) - -(define-method freeze_updates - (of-object "GdkWindow") - (c-name "gdk_window_freeze_updates") - (return-type "none") -) - -(define-method thaw_updates - (of-object "GdkWindow") - (c-name "gdk_window_thaw_updates") - (return-type "none") -) - -(define-function window_process_all_updates - (c-name "gdk_window_process_all_updates") - (return-type "none") -) - -(define-method process_updates - (of-object "GdkWindow") - (c-name "gdk_window_process_updates") - (return-type "none") - (parameters - '("gboolean" "update_children") - ) -) - -(define-function window_set_debug_updates - (c-name "gdk_window_set_debug_updates") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-function window_constrain_size - (c-name "gdk_window_constrain_size") - (return-type "none") - (parameters - '("GdkGeometry*" "geometry") - '("guint" "flags") - '("gint" "width") - '("gint" "height") - '("gint*" "new_width") - '("gint*" "new_height") - ) -) - -(define-method get_internal_paint_info - (of-object "GdkWindow") - (c-name "gdk_window_get_internal_paint_info") - (return-type "none") - (parameters - '("GdkDrawable**" "real_drawable") - '("gint*" "x_offset") - '("gint*" "y_offset") - ) -) - -(define-function set_pointer_hooks - (c-name "gdk_set_pointer_hooks") - (return-type "GdkPointerHooks*") - (parameters - '("const-GdkPointerHooks*" "new_hooks") - ) -) - -(define-function get_default_root_window - (c-name "gdk_get_default_root_window") - (return-type "GdkWindow*") -) - -(define-method set_accept_focus - (of-object "GdkWindow") - (c-name "gdk_window_set_accept_focus") - (return-type "none") - (parameters - '("gboolean" "accept_focus") - ) -) - -(define-method set_focus_on_map - (of-object "GdkWindow") - (c-name "gdk_window_set_focus_on_map") - (return-type "none") - (parameters - '("gboolean" "focus_on_map") - ) -) - -(define-method enable_synchronized_configure - (of-object "GdkWindow") - (c-name "gdk_window_enable_synchronized_configure") - (return-type "none") -) - -(define-method configure_finished - (of-object "GdkWindow") - (c-name "gdk_window_configure_finished") - (return-type "none") -) - -(define-method set_urgency_hint - (of-object "GdkWindow") - (c-name "gdk_window_set_urgency_hint") - (return-type "none") - (parameters - '("gboolean" "urgent") - ) -) - -;; From /mondo/local/gtk-2.10/include/gtk-2.0/gdk/gdkwindow.h - -(define-method show_unraised - (of-object "GdkWindow") - (c-name "gdk_window_show_unraised") - (return-type "none") -) - -(define-method move_region - (of-object "GdkWindow") - (c-name "gdk_window_move_region") - (return-type "none") - (parameters - '("GdkRegion*" "region") - '("gint" "dx") - '("gint" "dy") - ) -) - -(define-method shape_combine_region - (of-object "GdkWindow") - (c-name "gdk_window_shape_combine_region") - (return-type "none") - (parameters - '("GdkRegion*" "shape_region" (null-ok)) - '("gint" "offset_x") - '("gint" "offset_y") - ) -) - - -;;; XXXX functions from GTK that extend GDK types. -(define-method finish - (of-object "GdkDragContext") - (c-name "gtk_drag_finish") - (return-type "none") - (parameters - '("gboolean" "success") - '("gboolean" "del") - '("guint32" "time" (default "GDK_CURRENT_TIME")) - ) -) - -(define-method get_source_widget - (of-object "GdkDragContext") - (c-name "gtk_drag_get_source_widget") - (return-type "GtkWidget*") -) - -(define-method set_icon_widget - (of-object "GdkDragContext") - (c-name "gtk_drag_set_icon_widget") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - '("gint" "hot_x") - '("gint" "hot_y") - ) -) - -(define-method set_icon_pixmap - (of-object "GdkDragContext") - (c-name "gtk_drag_set_icon_pixmap") - (return-type "none") - (parameters - '("GdkColormap*" "colormap") - '("GdkPixmap*" "pixmap") - '("GdkBitmap*" "mask") - '("gint" "hot_x") - '("gint" "hot_y") - ) -) - -(define-method set_icon_pixbuf - (of-object "GdkDragContext") - (c-name "gtk_drag_set_icon_pixbuf") - (return-type "none") - (parameters - '("GdkPixbuf*" "pixbuf") - '("gint" "hot_x") - '("gint" "hot_y") - ) -) - -(define-method set_icon_stock - (of-object "GdkDragContext") - (c-name "gtk_drag_set_icon_stock") - (return-type "none") - (parameters - '("const-gchar*" "stock_id") - '("gint" "hot_x") - '("gint" "hot_y") - ) -) - -(define-method set_icon_default - (of-object "GdkDragContext") - (c-name "gtk_drag_set_icon_default") - (return-type "none") -) - -(define-method set_icon_name - (of-object "GdkDragContext") - (c-name "gtk_drag_set_icon_name") - (return-type "none") - (parameters - '("const-gchar*" "icon_name") - '("gint" "hot_x") - '("gint" "hot_y") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h - -(define-method get_colorspace - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_get_colorspace") - (return-type "GdkColorspace") -) - -(define-method get_n_channels - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_get_n_channels") - (return-type "int") -) - -(define-method get_has_alpha - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_get_has_alpha") - (return-type "gboolean") -) - -(define-method get_bits_per_sample - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_get_bits_per_sample") - (return-type "int") -) - -(define-method get_pixels - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_get_pixels") - (return-type "guchar*") -) - -(define-method get_width - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_get_width") - (return-type "int") -) - -(define-method get_height - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_get_height") - (return-type "int") -) - -(define-method get_rowstride - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_get_rowstride") - (return-type "int") -) - -(define-function pixbuf_new - (is-constructor-of GdkPixbuf) - (c-name "gdk_pixbuf_new") - (return-type "GdkPixbuf*") - (parameters - '("GdkColorspace" "colorspace") - '("gboolean" "has_alpha") - '("int" "bits_per_sample") - '("int" "width") - '("int" "height") - ) -) - -(define-method copy - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_copy") - (caller-owns-return #t) - (return-type "GdkPixbuf*") -) - -(define-function pixbuf_new_from_file - (c-name "gdk_pixbuf_new_from_file") - (return-type "GdkPixbuf*") - (caller-owns-return #t) - (parameters - '("const-char*" "filename") - '("GError**" "error") - ) -) - -(define-function pixbuf_new_from_file_at_size - (c-name "gdk_pixbuf_new_from_file_at_size") - (return-type "GdkPixbuf*") - (caller-owns-return #t) - (parameters - '("const-char*" "filename") - '("int" "width") - '("int" "height") - '("GError**" "error") - ) -) - -(define-function pixbuf_new_from_data - (c-name "gdk_pixbuf_new_from_data") - (return-type "GdkPixbuf*") - (caller-owns-return #t) - (parameters - '("const-guchar*" "data") - '("GdkColorspace" "colorspace") - '("gboolean" "has_alpha") - '("int" "bits_per_sample") - '("int" "width") - '("int" "height") - '("int" "rowstride") - '("GdkPixbufDestroyNotify" "destroy_fn") - '("gpointer" "destroy_fn_data") - ) -) - -(define-function pixbuf_new_from_array - (c-name "gdk_pixbuf_new_from_array") - (return-type "GdkPixbuf*") - (caller-owns-return #t) - (parameters - '("PyArrayObject*" "array") - '("GdkColorspace" "colorspace") - '("int" "bits_per_sample") - ) -) - -(define-function pixbuf_new_from_xpm_data - (c-name "gdk_pixbuf_new_from_xpm_data") - (return-type "GdkPixbuf*") - (caller-owns-return #t) - (parameters - '("const-char**" "data") - ) -) - -(define-function pixbuf_new_from_inline - (c-name "gdk_pixbuf_new_from_inline") - (return-type "GdkPixbuf*") - (caller-owns-return #t) - (parameters - '("gint" "data_length") - '("const-guchar*" "data") - '("gboolean" "copy_pixels") - '("GError**" "error") - ) -) - -(define-method subpixbuf - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_new_subpixbuf") - (return-type "GdkPixbuf*") - (caller-owns-return #t) - (parameters - '("int" "src_x") - '("int" "src_y") - '("int" "width") - '("int" "height") - ) -) - -(define-method fill - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_fill") - (parameters - '("guint32" "pixel") - ) -) - -(define-method save - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_save") - (return-type "gboolean") - (parameters - '("const-char*" "filename") - '("const-char*" "type") - '("GError**" "error") - ) - (varargs #t) -) - -(define-method savev - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_savev") - (return-type "gboolean") - (parameters - '("const-char*" "filename") - '("const-char*" "type") - '("char**" "option_keys") - '("char**" "option_values") - '("GError**" "error") - ) -) - -(define-method save_to_callback - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_save_to_callback") - ;; overridden -) - -(define-method add_alpha - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_add_alpha") - (caller-owns-return #t) - (return-type "GdkPixbuf*") - (parameters - '("gboolean" "substitute_color") - '("guchar" "r") - '("guchar" "g") - '("guchar" "b") - ) -) - -(define-method copy_area - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_copy_area") - (return-type "none") - (parameters - '("int" "src_x") - '("int" "src_y") - '("int" "width") - '("int" "height") - '("GdkPixbuf*" "dest_pixbuf") - '("int" "dest_x") - '("int" "dest_y") - ) -) - -(define-method saturate_and_pixelate - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_saturate_and_pixelate") - (return-type "none") - (parameters - '("GdkPixbuf*" "dest") - '("gfloat" "saturation") - '("gboolean" "pixelate") - ) -) - -(define-method scale - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_scale") - (return-type "none") - (parameters - '("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") - '("GdkInterpType" "interp_type") - ) -) - -(define-method composite - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_composite") - (return-type "none") - (parameters - '("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") - '("GdkInterpType" "interp_type") - '("int" "overall_alpha") - ) -) - -(define-method composite_color - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_composite_color") - (return-type "none") - (parameters - '("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") - '("GdkInterpType" "interp_type") - '("int" "overall_alpha") - '("int" "check_x") - '("int" "check_y") - '("int" "check_size") - '("guint32" "color1") - '("guint32" "color2") - ) -) - -(define-method scale_simple - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_scale_simple") - (caller-owns-return #t) - (return-type "GdkPixbuf*") - (parameters - '("int" "dest_width") - '("int" "dest_height") - '("GdkInterpType" "interp_type") - ) -) - -(define-method composite_color_simple - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_composite_color_simple") - (caller-owns-return #t) - (return-type "GdkPixbuf*") - (parameters - '("int" "dest_width") - '("int" "dest_height") - '("GdkInterpType" "interp_type") - '("int" "overall_alpha") - '("int" "check_size") - '("guint32" "color1") - '("guint32" "color2") - ) -) - -;; From gdk-pixbuf-animation.h - -(define-function pixbuf_animation_get_type - (c-name "gdk_pixbuf_animation_get_type") - (return-type "GType") -) - -(define-function pixbuf_animation_new_from_file - (is-constructor-of GdkPixbufAnimation) - (c-name "gdk_pixbuf_animation_new_from_file") - (return-type "GdkPixbufAnimation*") - (parameters - '("const-char*" "filename") - '("GError**" "error") - ) -) - -(define-method ref - (of-object "GdkPixbufAnimation") - (c-name "gdk_pixbuf_animation_ref") - (return-type "GdkPixbufAnimation*") -) - -(define-method unref - (of-object "GdkPixbufAnimation") - (c-name "gdk_pixbuf_animation_unref") - (return-type "none") -) - -(define-method get_width - (of-object "GdkPixbufAnimation") - (c-name "gdk_pixbuf_animation_get_width") - (return-type "int") -) - -(define-method get_height - (of-object "GdkPixbufAnimation") - (c-name "gdk_pixbuf_animation_get_height") - (return-type "int") -) - -(define-method is_static_image - (of-object "GdkPixbufAnimation") - (c-name "gdk_pixbuf_animation_is_static_image") - (return-type "gboolean") -) - -(define-method get_static_image - (of-object "GdkPixbufAnimation") - (c-name "gdk_pixbuf_animation_get_static_image") - (return-type "GdkPixbuf*") -) - -(define-method get_iter - (of-object "GdkPixbufAnimation") - (c-name "gdk_pixbuf_animation_get_iter") - (return-type "GdkPixbufAnimationIter*") - (parameters - '("const-GTimeVal*" "start_time") - ) -) - -(ifdef GDK_PIXBUF_ENABLE_BACKEND - -(define-method non_anim_new - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_non_anim_new") - (return-type "GdkPixbufAnimation*") -) - -(define-virtual is_static_image - (of-object "GdkPixbufAnimation") - (return-type "gboolean") -) - -(define-virtual get_static_image - (of-object "GdkPixbufAnimation") - (return-type "GdkPixbuf*") -) - -(define-virtual get_size - (of-object "GdkPixbufAnimation") - (return-type "none") - (parameters - '("int*" "width") - '("int*" "height") - ) -) - -(define-virtual get_iter - (of-object "GdkPixbufAnimation") - (return-type "GdkPixbufAnimationIter*") - (parameters - '("const-GTimeVal*" "start_time") - ) -) -) - -(define-function pixbuf_animation_iter_get_type - (c-name "gdk_pixbuf_animation_iter_get_type") - (return-type "GType") -) - -(define-method get_delay_time - (of-object "GdkPixbufAnimationIter") - (c-name "gdk_pixbuf_animation_iter_get_delay_time") - (return-type "int") -) - -(define-method get_pixbuf - (of-object "GdkPixbufAnimationIter") - (c-name "gdk_pixbuf_animation_iter_get_pixbuf") - (return-type "GdkPixbuf*") -) - -(define-method on_currently_loading_frame - (of-object "GdkPixbufAnimationIter") - (c-name "gdk_pixbuf_animation_iter_on_currently_loading_frame") - (return-type "gboolean") -) - -(define-method advance - (of-object "GdkPixbufAnimationIter") - (c-name "gdk_pixbuf_animation_iter_advance") - (return-type "gboolean") - (parameters - '("const-GTimeVal*" "current_time") - ) -) - -(ifdef GDK_PIXBUF_ENABLE_BACKEND - -(define-virtual get_delay_time - (of-object "GdkPixbufAnimationIter") - (return-type "int") -) - -(define-virtual get_pixbuf - (of-object "GdkPixbufAnimationIter") - (return-type "GdkPixbuf*") -) - -(define-virtual on_currently_loading_frame - (of-object "GdkPixbufAnimationIter") - (return-type "gboolean") -) - -(define-virtual advance - (of-object "GdkPixbufAnimationIter") - (return-type "gboolean") - (parameters - '("const-GTimeVal*" "current_time") - ) -) -) - - -;; From gdk-pixbuf-core.h - -(define-function pixbuf_error_quark - (c-name "gdk_pixbuf_error_quark") - (return-type "GQuark") -) - -(define-function pixbuf_get_type - (c-name "gdk_pixbuf_get_type") - (return-type "GType") -) - -(define-method ref - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_ref") - (return-type "GdkPixbuf*") -) - -(define-method unref - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_unref") - (return-type "none") -) - -(define-function pixbuf_new_from_file_at_scale - (c-name "gdk_pixbuf_new_from_file_at_scale") - (return-type "GdkPixbuf*") - (parameters - '("const-char*" "filename") - '("int" "width") - '("int" "height") - '("gboolean" "preserve_aspect_ratio") - '("GError**" "error") - ) -) - -(define-method save_to_callbackv - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_save_to_callbackv") - (return-type "gboolean") - (parameters - '("GdkPixbufSaveFunc" "save_func") - '("gpointer" "user_data") - '("const-char*" "type") - '("char**" "option_keys") - '("char**" "option_values") - '("GError**" "error") - ) -) - -(define-method save_to_buffer - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_save_to_buffer") - (return-type "gboolean") - (parameters - '("gchar**" "buffer") - '("gsize*" "buffer_size") - '("const-char*" "type") - '("GError**" "error") - ) - (varargs #t) -) - -(define-method save_to_bufferv - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_save_to_bufferv") - (return-type "gboolean") - (parameters - '("gchar**" "buffer") - '("gsize*" "buffer_size") - '("const-char*" "type") - '("char**" "option_keys") - '("char**" "option_values") - '("GError**" "error") - ) -) - -(define-method get_option - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_get_option") - (return-type "const-char*") - (parameters - '("const-char*" "key") - ) -) - -;; From gdk-pixbuf-enum-types.h - -(define-function pixbuf_alpha_mode_get_type - (c-name "gdk_pixbuf_alpha_mode_get_type") - (return-type "GType") -) - -(define-function colorspace_get_type - (c-name "gdk_colorspace_get_type") - (return-type "GType") -) - -(define-function pixbuf_error_get_type - (c-name "gdk_pixbuf_error_get_type") - (return-type "GType") -) - -(define-function interp_type_get_type - (c-name "gdk_interp_type_get_type") - (return-type "GType") -) - -(define-function pixbuf_rotation_get_type - (c-name "gdk_pixbuf_rotation_get_type") - (return-type "GType") -) - - - -(define-function pixbuf_get_formats - (c-name "gdk_pixbuf_get_formats") - (return-type "GSList*") -) - -(define-function pixbuf_get_file_info - (c-name "gdk_pixbuf_get_file_info") - (return-type "GdkPixbufFormat*") - (parameters - '("gint*" "width") - '("gint*" "height") - ) -) - -(define-method get_name - (of-object "GdkPixbufFormat") - (c-name "gdk_pixbuf_format_get_name") - (return-type "gchar*") -) - -(define-method get_description - (of-object "GdkPixbufFormat") - (c-name "gdk_pixbuf_format_get_description") - (return-type "gchar*") -) - -(define-method get_mime_types - (of-object "GdkPixbufFormat") - (c-name "gdk_pixbuf_format_get_mime_types") - (return-type "gchar**") -) - -(define-method get_extensions - (of-object "GdkPixbufFormat") - (c-name "gdk_pixbuf_format_get_extensions") - (return-type "gchar**") -) - -(define-method is_writable - (of-object "GdkPixbufFormat") - (c-name "gdk_pixbuf_format_is_writable") - (return-type "gboolean") -) - -(define-method is_scalable - (of-object "GdkPixbufFormat") - (c-name "gdk_pixbuf_format_is_scalable") - (return-type "gboolean") -) - -(define-method is_disabled - (of-object "GdkPixbufFormat") - (c-name "gdk_pixbuf_format_is_disabled") - (return-type "gboolean") -) - -(define-method set_disabled - (of-object "GdkPixbufFormat") - (c-name "gdk_pixbuf_format_set_disabled") - (return-type "none") - (parameters - '("gboolean" "disabled") - ) -) - -(define-method get_license - (of-object "GdkPixbufFormat") - (c-name "gdk_pixbuf_format_get_license") - (return-type "gchar*") -) - -(ifdef GDK_PIXBUF_ENABLE_BACKEND - -(define-method set_option - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_set_option") - (return-type "gboolean") - (parameters - '("const-gchar*" "key") - '("const-gchar*" "value") - ) -) -) - - - -;; From /opt/gnome/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-loader.h - -(define-function pixbuf_loader_get_type - (c-name "gdk_pixbuf_loader_get_type") - (return-type "GType") -) - -(define-function pixbuf_loader_new - (deprecated "use gtk.gdk.PixbufLoader instead") - (c-name "gdk_pixbuf_loader_new") - (return-type "GdkPixbufLoader*") -) - -(define-function pixbuf_loader_new_with_type - (c-name "gdk_pixbuf_loader_new_with_type") - (is-constructor-of GdkPixbufLoader) - (return-type "GdkPixbufLoader*") - (parameters - '("const-char*" "image_type") - '("GError**" "error") - ) -) - -(define-function pixbuf_loader_new_with_mime_type - (c-name "gdk_pixbuf_loader_new_with_mime_type") - (return-type "GdkPixbufLoader*") - (parameters - '("const-char*" "mime_type") - '("GError**" "error") - ) - (caller-owns-return #t) -) - -(define-method write - (of-object "GdkPixbufLoader") - (c-name "gdk_pixbuf_loader_write") - (return-type "gboolean") - (parameters - '("const-guchar*" "buf") - '("gsize" "count") - '("GError**" "error") - ) -) - -(define-method get_pixbuf - (of-object "GdkPixbufLoader") - (c-name "gdk_pixbuf_loader_get_pixbuf") - (return-type "GdkPixbuf*") -) - -(define-method get_animation - (of-object "GdkPixbufLoader") - (c-name "gdk_pixbuf_loader_get_animation") - (return-type "GdkPixbufAnimation*") -) - -(define-method close - (of-object "GdkPixbufLoader") - (c-name "gdk_pixbuf_loader_close") - (return-type "gboolean") - (parameters - '("GError**" "error") - ) -) - -(define-method set_size - (of-object "GdkPixbufLoader") - (c-name "gdk_pixbuf_loader_set_size") - (return-type "none") - (parameters - '("int" "width") - '("int" "height") - ) -) - -(define-method get_format - (of-object "GdkPixbufLoader") - (c-name "gdk_pixbuf_loader_get_format") - (return-type "GdkPixbufFormat*") -) - -(define-virtual size_prepared - (of-object "GdkPixbufLoader") - (return-type "none") - (parameters - '("int" "width") - '("int" "height") - ) -) - -(define-virtual area_prepared - (of-object "GdkPixbufLoader") - (return-type "none") -) - -(define-virtual area_updated - (of-object "GdkPixbufLoader") - (return-type "none") - (parameters - '("int" "x") - '("int" "y") - '("int" "width") - '("int" "height") - ) -) - -(define-virtual closed - (of-object "GdkPixbufLoader") - (return-type "none") -) - - - -;; From gdk-pixbuf-simple-anim.h - -(define-function pixbuf_simple_anim_get_type - (c-name "gdk_pixbuf_simple_anim_get_type") - (return-type "GType") -) - -(define-function pixbuf_simple_anim_iter_get_type - (c-name "gdk_pixbuf_simple_anim_iter_get_type") - (return-type "GType") -) - -(define-function pixbuf_simple_anim_new - (c-name "gdk_pixbuf_simple_anim_new") - (is-constructor-of "GdkPixbufSimpleAnim") - (return-type "GdkPixbufSimpleAnim*") - (parameters - '("gint" "width") - '("gint" "height") - '("gfloat" "rate") - ) -) - -(define-method add_frame - (of-object "GdkPixbufSimpleAnim") - (c-name "gdk_pixbuf_simple_anim_add_frame") - (return-type "none") - (parameters - '("GdkPixbuf*" "pixbuf") - ) -) - - - -;; From gdk-pixbuf-transform.h - -(define-method flip - (of-object "GdkPixbuf") - (c-name "gdk_pixbuf_flip") - (return-type "GdkPixbuf*") - (parameters - '("gboolean" "horizontal") - ) -) - -;; From gdk-pixdata.h - -(define-method serialize - (of-object "GdkPixdata") - (c-name "gdk_pixdata_serialize") - (return-type "guint8*") - (parameters - '("guint*" "stream_length_p") - ) -) - -(define-method deserialize - (of-object "GdkPixdata") - (c-name "gdk_pixdata_deserialize") - (return-type "gboolean") - (parameters - '("guint" "stream_length") - '("const-guint8*" "stream") - '("GError**" "error") - ) -) - -(define-method from_pixbuf - (of-object "GdkPixdata") - (c-name "gdk_pixdata_from_pixbuf") - (return-type "gpointer") - (parameters - '("const-GdkPixbuf*" "pixbuf") - '("gboolean" "use_rle") - ) -) - -(define-function pixbuf_from_pixdata - (c-name "gdk_pixbuf_from_pixdata") - (return-type "GdkPixbuf*") - (parameters - '("const-GdkPixdata*" "pixdata") - '("gboolean" "copy_pixels") - '("GError**" "error") - ) -) - -(define-method to_csource - (of-object "GdkPixdata") - (c-name "gdk_pixdata_to_csource") - (return-type "GString*") - (parameters - '("const-gchar*" "name") - '("GdkPixdataDumpType" "dump_type") - ) -) - - - -;; - -(define-method intersect - (of-object "GdkRectangle") - (c-name "gdk_rectangle_intersect") - (return-type "gboolean") - (parameters - '("GdkRectangle*" "src1") - '("GdkRectangle*" "src2") - '("GdkRectangle*" "dest") - ) -) - -(define-method union - (of-object "GdkRectangle") - (c-name "gdk_rectangle_union") - (return-type "void") - (parameters - '("GdkRectangle*" "src1") - '("GdkRectangle*" "src2") - '("GdkRectangle*" "dest") - ) -) - -(define-function rectangle_new - (c-name "gdk_rectangle_new") - (is-constructor-of "GdkRectangle") - (return-type "GdkRectangle") -) - - -(define-method get_clipbox - (of-object "GdkRegion") - (c-name "gdk_region_get_clipbox") - (return-type "none") - (parameters - '("GdkRectangle*" "rect") - ) -) - -(define-method empty - (of-object "GdkRegion") - (c-name "gdk_region_empty") - (return-type "gboolean") -) - - -(define-method equal - (of-object "GdkRegion") - (c-name "gdk_region_equal") - (return-type "gboolean") - (parameters - '("GdkRegion*" "other") - ) -) - -(define-method point_in - (of-object "GdkRegion") - (c-name "gdk_region_point_in") - (return-type "gboolean") - (parameters - '("int" "x") - '("int" "y") - ) -) - -(define-method rect_in - (of-object "GdkRegion") - (c-name "gdk_region_rect_in") - (return-type "GdkOverlapType") - (parameters - '("GdkRectangle*" "rect") - ) -) - -;; From gdkenumtypes.h - -(define-function cursor_type_get_type - (c-name "gdk_cursor_type_get_type") - (return-type "GType") -) - -(define-function drag_action_get_type - (c-name "gdk_drag_action_get_type") - (return-type "GType") -) - -(define-function drag_protocol_get_type - (c-name "gdk_drag_protocol_get_type") - (return-type "GType") -) - -(define-function filter_return_get_type - (c-name "gdk_filter_return_get_type") - (return-type "GType") -) - -(define-function event_type_get_type - (c-name "gdk_event_type_get_type") - (return-type "GType") -) - -(define-function event_mask_get_type - (c-name "gdk_event_mask_get_type") - (return-type "GType") -) - -(define-function visibility_state_get_type - (c-name "gdk_visibility_state_get_type") - (return-type "GType") -) - -(define-function scroll_direction_get_type - (c-name "gdk_scroll_direction_get_type") - (return-type "GType") -) - -(define-function notify_type_get_type - (c-name "gdk_notify_type_get_type") - (return-type "GType") -) - -(define-function crossing_mode_get_type - (c-name "gdk_crossing_mode_get_type") - (return-type "GType") -) - -(define-function property_state_get_type - (c-name "gdk_property_state_get_type") - (return-type "GType") -) - -(define-function window_state_get_type - (c-name "gdk_window_state_get_type") - (return-type "GType") -) - -(define-function setting_action_get_type - (c-name "gdk_setting_action_get_type") - (return-type "GType") -) - -(define-function owner_change_get_type - (c-name "gdk_owner_change_get_type") - (return-type "GType") -) - -(define-function font_type_get_type - (c-name "gdk_font_type_get_type") - (return-type "GType") -) - -(define-function cap_style_get_type - (c-name "gdk_cap_style_get_type") - (return-type "GType") -) - -(define-function fill_get_type - (c-name "gdk_fill_get_type") - (return-type "GType") -) - -(define-function function_get_type - (c-name "gdk_function_get_type") - (return-type "GType") -) - -(define-function join_style_get_type - (c-name "gdk_join_style_get_type") - (return-type "GType") -) - -(define-function line_style_get_type - (c-name "gdk_line_style_get_type") - (return-type "GType") -) - -(define-function subwindow_mode_get_type - (c-name "gdk_subwindow_mode_get_type") - (return-type "GType") -) - -(define-function gc_values_mask_get_type - (c-name "gdk_gc_values_mask_get_type") - (return-type "GType") -) - -(define-function image_type_get_type - (c-name "gdk_image_type_get_type") - (return-type "GType") -) - -(define-function extension_mode_get_type - (c-name "gdk_extension_mode_get_type") - (return-type "GType") -) - -(define-function input_source_get_type - (c-name "gdk_input_source_get_type") - (return-type "GType") -) - -(define-function input_mode_get_type - (c-name "gdk_input_mode_get_type") - (return-type "GType") -) - -(define-function axis_use_get_type - (c-name "gdk_axis_use_get_type") - (return-type "GType") -) - -(define-function prop_mode_get_type - (c-name "gdk_prop_mode_get_type") - (return-type "GType") -) - -(define-function fill_rule_get_type - (c-name "gdk_fill_rule_get_type") - (return-type "GType") -) - -(define-function overlap_type_get_type - (c-name "gdk_overlap_type_get_type") - (return-type "GType") -) - -(define-function rgb_dither_get_type - (c-name "gdk_rgb_dither_get_type") - (return-type "GType") -) - -(define-function byte_order_get_type - (c-name "gdk_byte_order_get_type") - (return-type "GType") -) - -(define-function modifier_type_get_type - (c-name "gdk_modifier_type_get_type") - (return-type "GType") -) - -(define-function input_condition_get_type - (c-name "gdk_input_condition_get_type") - (return-type "GType") -) - -(define-function status_get_type - (c-name "gdk_status_get_type") - (return-type "GType") -) - -(define-function grab_status_get_type - (c-name "gdk_grab_status_get_type") - (return-type "GType") -) - -(define-function visual_type_get_type - (c-name "gdk_visual_type_get_type") - (return-type "GType") -) - -(define-function window_class_get_type - (c-name "gdk_window_class_get_type") - (return-type "GType") -) - -(define-function window_type_get_type - (c-name "gdk_window_type_get_type") - (return-type "GType") -) - -(define-function window_attributes_type_get_type - (c-name "gdk_window_attributes_type_get_type") - (return-type "GType") -) - -(define-function window_hints_get_type - (c-name "gdk_window_hints_get_type") - (return-type "GType") -) - -(define-function window_type_hint_get_type - (c-name "gdk_window_type_hint_get_type") - (return-type "GType") -) - -(define-function wm_decoration_get_type - (c-name "gdk_wm_decoration_get_type") - (return-type "GType") -) - -(define-function wm_function_get_type - (c-name "gdk_wm_function_get_type") - (return-type "GType") -) - -(define-function gravity_get_type - (c-name "gdk_gravity_get_type") - (return-type "GType") -) - -(define-function window_edge_get_type - (c-name "gdk_window_edge_get_type") - (return-type "GType") -) - -;; From gdkregion.h - -(define-function region_new - (c-name "gdk_region_new") - (is-constructor-of "GdkRegion") - (return-type "GdkRegion*") -) - -(define-function region_polygon - (c-name "gdk_region_polygon") - (return-type "GdkRegion*") - (parameters - '("GdkPoint*" "points") - '("gint" "npoints") - '("GdkFillRule" "fill_rule") - ) -) - -(define-method copy - (of-object "GdkRegion") - (c-name "gdk_region_copy") - (return-type "GdkRegion*") -) - -(define-function region_rectangle - (c-name "gdk_region_rectangle") - (return-type "GdkRegion*") - (parameters - '("GdkRectangle*" "rectangle") - ) -) - -(define-method destroy - (of-object "GdkRegion") - (c-name "gdk_region_destroy") - (return-type "none") -) - -(define-method get_rectangles - (of-object "GdkRegion") - (c-name "gdk_region_get_rectangles") - (return-type "none") - (parameters - '("GdkRectangle**" "rectangles") - '("gint*" "n_rectangles") - ) -) - -(define-method offset - (of-object "GdkRegion") - (c-name "gdk_region_offset") - (return-type "none") - (parameters - '("gint" "dx") - '("gint" "dy") - ) -) - -(define-method shrink - (of-object "GdkRegion") - (c-name "gdk_region_shrink") - (return-type "none") - (parameters - '("gint" "dx") - '("gint" "dy") - ) -) - -(define-method union_with_rect - (of-object "GdkRegion") - (c-name "gdk_region_union_with_rect") - (return-type "none") - (parameters - '("GdkRectangle*" "rect") - ) -) - -(define-method intersect - (of-object "GdkRegion") - (c-name "gdk_region_intersect") - (return-type "none") - (parameters - '("GdkRegion*" "source2") - ) -) - -(define-method union - (of-object "GdkRegion") - (c-name "gdk_region_union") - (return-type "none") - (parameters - '("GdkRegion*" "source2") - ) -) - -(define-method subtract - (of-object "GdkRegion") - (c-name "gdk_region_subtract") - (return-type "none") - (parameters - '("GdkRegion*" "source2") - ) -) - -(define-method xor - (of-object "GdkRegion") - (c-name "gdk_region_xor") - (return-type "none") - (parameters - '("GdkRegion*" "source2") - ) -) - -(define-method spans_intersect_foreach - (of-object "GdkRegion") - (c-name "gdk_region_spans_intersect_foreach") - (return-type "none") - (parameters - '("GdkSpan*" "spans") - '("int" "n_spans") - '("gboolean" "sorted") - '("GdkSpanFunc" "function") - '("gpointer" "data") - ) -) - -;; From /opt/gnome-devel/include/gtk-2.0/gdk/gdkcairo.h - -(define-method cairo_create - (of-object "GdkDrawable") - (c-name "gdk_cairo_create") - (return-type "cairo_t*")) - -(define-function cairo_set_source_color - (c-name "gdk_cairo_set_source_color") - (return-type "none") - (parameters - '("cairo_t*" "cr") - '("GdkColor*" "color") - ) -) - -(define-function cairo_set_source_pixbuf - (c-name "gdk_cairo_set_source_pixbuf") - (return-type "none") - (parameters - '("cairo_t*" "cr") - '("GdkPixbuf*" "pixbuf") - '("double" "pixbuf_x") - '("double" "pixbuf_y") - ) -) - -(define-function cairo_rectangle - (c-name "gdk_cairo_rectangle") - (return-type "none") - (parameters - '("cairo_t*" "cr") - '("GdkRectangle*" "rectangle") - ) -) - -(define-function cairo_region - (c-name "gdk_cairo_region") - (return-type "none") - (parameters - '("cairo_t*" "cr") - '("GdkRegion*" "region") - ) -) - - -;; gdkx.h - -(ifdef GDK_TARGET_X11 - -(define-method get_xdisplay - (of-object "GdkDrawable") - (c-name "gdk_x11_drawable_get_xdisplay") - (return-type "Display*") -) - -(define-method get_xid - (of-object "GdkDrawable") - (c-name "gdk_x11_drawable_get_xid") - (return-type "XID") -) - -(define-method get_xdisplay - (of-object "GdkImage") - (c-name "gdk_x11_image_get_xdisplay") - (return-type "Display*") -) - -(define-method get_ximage - (of-object "GdkImage") - (c-name "gdk_x11_image_get_ximage") - (return-type "XImage*") -) - -(define-method get_xdisplay - (of-object "GdkColormap") - (c-name "gdk_x11_colormap_get_xdisplay") - (return-type "Display*") -) - -(define-method get_xcolormap - (of-object "GdkColormap") - (c-name "gdk_x11_colormap_get_xcolormap") - (return-type "Colormap") -) - -(define-method get_xdisplay - (of-object "GdkCursor") - (c-name "gdk_x11_cursor_get_xdisplay") - (return-type "Display*") -) - -(define-method get_xcursor - (of-object "GdkCursor") - (c-name "gdk_x11_cursor_get_xcursor") - (return-type "Cursor") -) - -(define-method get_xdisplay - (of-object "GdkDisplay") - (c-name "gdk_x11_display_get_xdisplay") - (return-type "Display*") -) - -(define-method get_xvisual - (of-object "GdkVisual") - (c-name "gdk_x11_visual_get_xvisual") - (return-type "Visual*") -) - -(define-method get_xdisplay - (of-object "GdkGC") - (c-name "gdk_x11_gc_get_xdisplay") - (return-type "Display*") -) - -(define-method get_xgc - (of-object "GdkGC") - (c-name "gdk_x11_gc_get_xgc") - (return-type "GC") -) - -(define-method get_xscreen - (of-object "GdkScreen") - (c-name "gdk_x11_screen_get_xscreen") - (return-type "Screen*") -) - -(define-method get_screen_number - (of-object "GdkScreen") - (c-name "gdk_x11_screen_get_screen_number") - (return-type "int") -) - -(define-method set_user_time - (of-object "GdkWindow") - (c-name "gdk_x11_window_set_user_time") - (return-type "none") - (parameters - '("guint32" "timestamp") - ) -) - -(define-method move_to_current_desktop - (of-object "GdkWindow") - (c-name "gdk_x11_window_move_to_current_desktop") - (return-type "none") -) - -(define-method get_window_manager_name - (of-object "GdkScreen") - (c-name "gdk_x11_screen_get_window_manager_name") - (return-type "const-char*") -) - -(define-function x11_get_default_root_xwindow - (c-name "gdk_x11_get_default_root_xwindow") - (return-type "Window") -) - -(define-function x11_get_default_xdisplay - (c-name "gdk_x11_get_default_xdisplay") - (return-type "Display*") -) - -(define-function x11_get_default_screen - (c-name "gdk_x11_get_default_screen") - (return-type "gint") -) - -(define-method lookup_visual - (of-object "GdkScreen") - (c-name "gdk_x11_screen_lookup_visual") - (return-type "GdkVisual*") - (parameters - '("VisualID" "xvisualid") - ) -) - -(define-function gdkx_visual_get - (c-name "gdkx_visual_get") - (return-type "GdkVisual*") - (parameters - '("VisualID" "xvisualid") - ) -) - -(define-function gdkx_colormap_get - (c-name "gdkx_colormap_get") - (return-type "GdkColormap*") - (parameters - '("Colormap" "xcolormap") - ) -) - -(define-function x11_colormap_foreign_new - (c-name "gdk_x11_colormap_foreign_new") - (is-constructor-of "GdkX11ColormapForeign") - (return-type "GdkColormap*") - (parameters - '("GdkVisual*" "visual") - '("Colormap" "xcolormap") - ) -) - -(define-function xid_table_lookup_for_display - (c-name "gdk_xid_table_lookup_for_display") - (return-type "gpointer") - (parameters - '("GdkDisplay*" "display") - '("XID" "xid") - ) -) - -(define-function x11_get_server_time - (c-name "gdk_x11_get_server_time") - (return-type "guint32") - (parameters - '("GdkWindow*" "window") - ) -) - -(define-method get_user_time - (of-object "GdkDisplay") - (c-name "gdk_x11_display_get_user_time") - (return-type "guint32") -) - -(define-method set_cursor_theme - (of-object "GdkDisplay") - (c-name "gdk_x11_display_set_cursor_theme") - (return-type "none") - (parameters - '("const-gchar*" "theme") - '("const-gint" "size") - ) -) - -(define-method supports_net_wm_hint - (of-object "GdkScreen") - (c-name "gdk_x11_screen_supports_net_wm_hint") - (return-type "gboolean") - (parameters - '("GdkAtom" "property") - ) -) - -(define-function xid_table_lookup - (c-name "gdk_xid_table_lookup") - (return-type "gpointer") - (parameters - '("XID" "xid") - ) -) - -(define-function net_wm_supports - (c-name "gdk_net_wm_supports") - (return-type "gboolean") - (parameters - '("GdkAtom" "property") - ) -) - -(define-function x11_grab_server - (c-name "gdk_x11_grab_server") - (return-type "none") -) - -(define-function x11_ungrab_server - (c-name "gdk_x11_ungrab_server") - (return-type "none") -) - -(define-function x11_lookup_xdisplay - (c-name "gdk_x11_lookup_xdisplay") - (return-type "GdkDisplay*") - (parameters - '("Display*" "xdisplay") - ) -) - -(define-function x11_atom_to_xatom_for_display - (c-name "gdk_x11_atom_to_xatom_for_display") - (return-type "Atom") - (parameters - '("GdkDisplay*" "display") - '("GdkAtom" "atom") - ) -) - -(define-function x11_xatom_to_atom_for_display - (c-name "gdk_x11_xatom_to_atom_for_display") - (return-type "GdkAtom") - (parameters - '("GdkDisplay*" "display") - '("Atom" "xatom") - ) -) - -(define-function x11_get_xatom_by_name_for_display - (c-name "gdk_x11_get_xatom_by_name_for_display") - (return-type "Atom") - (parameters - '("GdkDisplay*" "display") - '("const-gchar*" "atom_name") - ) -) - -(define-function x11_get_xatom_name_for_display - (c-name "gdk_x11_get_xatom_name_for_display") - (return-type "const-gchar*") - (parameters - '("GdkDisplay*" "display") - '("Atom" "xatom") - ) -) - -(define-function x11_atom_to_xatom - (c-name "gdk_x11_atom_to_xatom") - (return-type "Atom") - (parameters - '("GdkAtom" "atom") - ) -) - -(define-function x11_xatom_to_atom - (c-name "gdk_x11_xatom_to_atom") - (return-type "GdkAtom") - (parameters - '("Atom" "xatom") - ) -) - -(define-function x11_get_xatom_by_name - (c-name "gdk_x11_get_xatom_by_name") - (return-type "Atom") - (parameters - '("const-gchar*" "atom_name") - ) -) - -(define-function x11_get_xatom_name - (c-name "gdk_x11_get_xatom_name") - (return-type "const-gchar*") - (parameters - '("Atom" "xatom") - ) -) - -(define-method grab - (of-object "GdkDisplay") - (c-name "gdk_x11_display_grab") - (return-type "none") -) - -(define-method ungrab - (of-object "GdkDisplay") - (c-name "gdk_x11_display_ungrab") - (return-type "none") -) - -(define-function x11_register_standard_event_type - (c-name "gdk_x11_register_standard_event_type") - (return-type "none") - (parameters - '("GdkDisplay*" "display") - '("gint" "event_base") - '("gint" "n_events") - ) -) - -(define-method get_xfont - (of-object "GdkFont") - (c-name "gdk_x11_font_get_xfont") - (return-type "gpointer") -) - -(define-method x11_font_get_xdisplay - (of-object "GdkFont") - (c-name "gdk_x11_font_get_xdisplay") - (return-type "Display*") -) - -(define-method get_name - (of-object "GdkFont") - (c-name "gdk_x11_font_get_name") - (return-type "const-char*") -) - - -) ; (ifdef GDK_TARGET_X11 diff --git a/gtk/gdk.override b/gtk/gdk.override deleted file mode 100644 index 2b06b2a1..00000000 --- a/gtk/gdk.override +++ /dev/null @@ -1,1493 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * gdk.override: overrides for the gtk.gdk module. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -headers -#ifdef HAVE_CONFIG_H -# include -#endif - -#define NO_IMPORT_PYGOBJECT -#include "pygobject.h" -#include -#include -#include -#include "pygtk-private.h" - -#if defined(GDK_WINDOWING_X11) -#include -#elif defined(GDK_WINDOWING_WIN32) -#include -#endif - -/* make GDK_DISPLAY() the case macro */ -#undef GDK_DISPLAY -#define GDK_DISPLAY(object) (GDK_DISPLAY_OBJECT(object)) - -#ifdef HAVE_NUMPY -# include -static int have_numpy(void); -#endif - -extern PyTypeObject PyGtkWidget_Type; - -#ifdef HAVE_PYCAIRO -# include -extern Pycairo_CAPI_t *Pycairo_CAPI; -extern PyTypeObject PyGdkCairoContext_Type; -#endif - -#ifndef GDK_TYPE_REGION -GType -pygdk_region_get_type (void) -{ - static GType our_type = 0; - - if (our_type == 0) - our_type = g_boxed_type_register_static ("GdkRegion", - (GBoxedCopyFunc)gdk_region_copy, - (GBoxedFreeFunc)gdk_region_destroy); - return our_type; -} -#endif - -#ifndef GDK_TYPE_PIXBUF_SIMPLE_ANIM_ITER -GType gtk_print_capabilites_get_type (void) G_GNUC_CONST; -#define GDK_TYPE_PIXBUF_SIMPLE_ANIM_ITER (gdk_pixbuf_simple_anim_iter_get_type()) -#endif - -%% -include - gdkcairo.override - gdkcolor.override - gdkdraw.override - gdkevent.override - gdkgc.override - gdkpixbuf.override - gdkrectangle.override - gdkwindow.override -%% -modulename gtk.gdk -%% -import gobject.GObject as PyGObject_Type -import pango.Context as PyPangoContext_Type -import pango.Font as PyPangoFont_Type -import pango.Layout as PyPangoLayout_Type -import pango.Renderer as PyPangoRenderer_Type -%% -ignore - gdk_window_set_debug_updates - gdk_region_destroy - gdk_atom_intern_static_string - gdk_pixbuf_from_pixdata -%% -ignore-glob - *_get_type - _* - *_ref - *_unref - gdk_spawn_* - *_libgtk_only - gdk_pixdata_* -%% -ignore-type - GdkPixmapObject - GdkWindowObject -%% -override gdk_threads_init noargs -static PyObject * -_wrap_gdk_threads_init(PyObject *self) -{ - if (pyg_enable_threads()) - return NULL; - gdk_threads_init(); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_threads_enter noargs -static PyObject * -_wrap_gdk_threads_enter(PyObject *self) -{ - /* must allow threads while acquiring lock, or no other python - * code will execute while we wait! */ - pyg_begin_allow_threads; - gdk_threads_enter(); - pyg_end_allow_threads; - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_fontset_load kwargs -static PyObject * -_wrap_gdk_fontset_load(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "fontset_name", NULL }; - char *fontset_name; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s:fontset_load", kwlist, - &fontset_name)) - return NULL; - - /* pyg_boxed_new handles NULL checking */ - return pyg_boxed_new(GDK_TYPE_FONT, gdk_fontset_load(fontset_name), - FALSE, TRUE); -} -%% -override gdk_text_extents kwargs -static PyObject * -_wrap_gdk_text_extents(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "text", NULL }; - gchar *text; - Py_ssize_t length; - gint lbearing, rbearing, width, ascent, descent; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#:GdkFont.extents", - kwlist, &text, &length)) - return NULL; - gdk_text_extents(pyg_boxed_get(self, GdkFont), text, length, - &lbearing, &rbearing, &width, &ascent, &descent); - return Py_BuildValue("(iiiii)", lbearing, rbearing, width, - ascent, descent); -} -%% -override gdk_pixmap_create_from_xpm kwargs -static PyObject * -_wrap_gdk_pixmap_create_from_xpm(PyObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "window", "transparent_color", "filename", NULL}; - PyGObject *window; - PyObject *py_trans_color, *ret; - GdkColor *trans_color = NULL; - gchar *filename; - GdkPixmap *pixmap; - GdkBitmap *mask; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!Os:pixmap_create_from_xpm", kwlist, - &PyGdkDrawable_Type, &window, - &py_trans_color, &filename)) - return NULL; - if (pyg_boxed_check(py_trans_color, GDK_TYPE_COLOR)) - trans_color = pyg_boxed_get(py_trans_color, GdkColor); - else if (py_trans_color != Py_None) { - PyErr_SetString(PyExc_TypeError, - "transparent_color must be a colour or None"); - return NULL; - } - pixmap = gdk_pixmap_create_from_xpm(GDK_DRAWABLE(window->obj), &mask, - trans_color, filename); - if (pixmap == NULL) { - PyErr_SetString(PyExc_IOError, "can't load pixmap"); - return NULL; - } - ret = Py_BuildValue("(NN)", - pygobject_new((GObject *)pixmap), - pygobject_new((GObject *)mask)); - gdk_pixmap_unref(pixmap); - gdk_bitmap_unref(mask); - return ret; -} -%% -override gdk_pixmap_colormap_create_from_xpm kwargs -static PyObject * -_wrap_gdk_pixmap_colormap_create_from_xpm(PyObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "window", "colormap", "transparent_color", - "filename", NULL }; - PyObject *py_window, *py_colormap, *py_trans_color, *ret; - GdkDrawable *window = NULL; - GdkColormap *colormap = NULL; - GdkColor *trans_color = NULL; - gchar *filename; - GdkPixmap *pixmap; - GdkBitmap *mask; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OOOs:pixmap_colormap_create_from_xpm", - kwlist, &py_window, &py_colormap, - &py_trans_color, &filename)) - return NULL; - if (pygobject_check(py_window, &PyGdkDrawable_Type)) - window = GDK_DRAWABLE(pygobject_get(py_window)); - else if (py_window != Py_None) { - PyErr_SetString(PyExc_TypeError, "window must be a GdkDrawable or None"); - return NULL; - } - if (pygobject_check(py_colormap, &PyGdkColormap_Type)) - colormap = GDK_COLORMAP(pygobject_get(py_colormap)); - else if (py_colormap != Py_None) { - PyErr_SetString(PyExc_TypeError, - "colormap must be a GdkColormap or None"); - return NULL; - } - if (pyg_boxed_check(py_trans_color, GDK_TYPE_COLOR)) - trans_color = pyg_boxed_get(py_trans_color, GdkColor); - else if (py_trans_color != Py_None) { - PyErr_SetString(PyExc_TypeError, - "transparent_color must be a colour or None"); - return NULL; - } - pixmap = gdk_pixmap_colormap_create_from_xpm(window, colormap, &mask, - trans_color, filename); - if (pixmap == NULL) { - PyErr_SetString(PyExc_IOError, "can't load pixmap"); - return NULL; - } - ret = Py_BuildValue("(NN)", - pygobject_new((GObject *)pixmap), - pygobject_new((GObject *)mask)); - gdk_pixmap_unref(pixmap); - gdk_bitmap_unref(mask); - return ret; -} -%% -override gdk_pixmap_create_from_xpm_d kwargs -static PyObject * -_wrap_gdk_pixmap_create_from_xpm_d(PyObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "window", "transparent_color", "data", NULL }; - PyGObject *window; - PyObject *py_trans_color, *py_data, *ret; - GdkColor *trans_color = NULL; - gchar **data; - int len, i; - GdkPixmap *pixmap; - GdkBitmap *mask; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!OO!:pixmap_create_from_xpm_d", kwlist, - &PyGdkDrawable_Type, &window, - &py_trans_color, &PyList_Type, &py_data)) - return NULL; - if (pyg_boxed_check(py_trans_color, GDK_TYPE_COLOR)) - trans_color = pyg_boxed_get(py_trans_color, GdkColor); - else if (py_trans_color != Py_None) { - PyErr_SetString(PyExc_TypeError, - "transparent_color must be a colour or None"); - return NULL; - } - len = PyList_Size(py_data); - data = g_new(gchar *, len); - for (i = 0; i < len; i ++) { - PyObject *item = PyList_GetItem(py_data, i); - if (!PyString_Check(item)) { - PyErr_SetString(PyExc_TypeError, "data items must be strings"); - g_free(data); - return NULL; - } - data[i] = PyString_AsString(item); - } - pixmap = gdk_pixmap_create_from_xpm_d(GDK_DRAWABLE(window->obj), &mask, - trans_color, data); - g_free(data); - if (pixmap == NULL) { - PyErr_SetString(PyExc_IOError, "can't load pixmap"); - return NULL; - } - ret = Py_BuildValue("(NN)", - pygobject_new((GObject *)pixmap), - pygobject_new((GObject *)mask)); - gdk_pixmap_unref(pixmap); - gdk_bitmap_unref(mask); - return ret; -} -%% -override gdk_pixmap_colormap_create_from_xpm_d kwargs -static PyObject * -_wrap_gdk_pixmap_colormap_create_from_xpm_d(PyObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "window", "colormap", "transparent_color", - "data", NULL }; - PyObject *py_window, *py_colormap, *py_trans_color, *py_data, *ret; - GdkDrawable *window = NULL; - GdkColormap *colormap = NULL; - GdkColor *trans_color = NULL; - gchar **data; - int len, i; - GdkPixmap *pixmap; - GdkBitmap *mask; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OOOO!:pixmap_colormap_create_from_xpm_d", - kwlist, &py_window, &py_colormap, - &py_trans_color, - &PyList_Type, &py_data)) - return NULL; - if (pygobject_check(py_window, &PyGdkDrawable_Type)) - window = GDK_DRAWABLE(pygobject_get(py_window)); - else if (py_window != Py_None) { - PyErr_SetString(PyExc_TypeError, "window must be a GdkDrawable or None"); - return NULL; - } - if (pygobject_check(py_colormap, &PyGdkColormap_Type)) - colormap = GDK_COLORMAP(pygobject_get(py_colormap)); - else if (py_colormap != Py_None) { - PyErr_SetString(PyExc_TypeError, - "colormap must be a GdkColormap or None"); - return NULL; - } - if (pyg_boxed_check(py_trans_color, GDK_TYPE_COLOR)) - trans_color = pyg_boxed_get(py_trans_color, GdkColor); - else if (py_trans_color != Py_None) { - PyErr_SetString(PyExc_TypeError, - "transparent_color must be a colour or None"); - return NULL; - } - len = PyList_Size(py_data); - data = g_new(gchar *, len); - for (i = 0; i < len; i ++) { - PyObject *item = PyList_GetItem(py_data, i); - if (!PyString_Check(item)) { - PyErr_SetString(PyExc_TypeError, "data items must be strings"); - g_free(data); - return NULL; - } - data[i] = PyString_AsString(item); - } - pixmap = gdk_pixmap_colormap_create_from_xpm_d(window, colormap, &mask, - trans_color, data); - g_free(data); - if (pixmap == NULL) { - PyErr_SetString(PyExc_IOError, "can't load pixmap"); - return NULL; - } - ret = Py_BuildValue("(NN)", - pygobject_new((GObject *)pixmap), - pygobject_new((GObject *)mask)); - gdk_pixmap_unref(pixmap); - gdk_bitmap_unref(mask); - return ret; -} -%% -ignore gdk_cursor_new_from_pixmap -%% -override gdk_cursor_new kwargs -static int -_wrap_gdk_cursor_new(PyGBoxed *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist1[] = { "cursor_type", NULL }; - static char *kwlist2[] = { "display", "cursor_type", NULL }; - static char *kwlist3[] = { "display", "pixbuf", "x", "y", NULL }; - static char *kwlist4[] = { "source", "mask", "fg", "bg", "x", "y", NULL }; - PyObject *py_cursor_type; - PyGObject *py_display; - PyGObject *source, *mask, *pixbuf; - PyObject *fg, *bg; - gint x, y; - - self->gtype = GDK_TYPE_CURSOR; - self->free_on_dealloc = FALSE; - self->boxed = NULL; - - if (PyArg_ParseTupleAndKeywords(args, kwargs, "O:GdkCursor.__init__", - kwlist1, &py_cursor_type)) { - GdkCursorType cursor_type; - - if (pyg_enum_get_value(GDK_TYPE_CURSOR_TYPE, py_cursor_type, - (gint *)&cursor_type)) - return -1; - self->boxed = gdk_cursor_new(cursor_type); - goto done; - } - - PyErr_Clear(); - - if (PyArg_ParseTupleAndKeywords(args, kwargs, "OO:GdkCursor.__init__", - kwlist2, &py_display, &py_cursor_type)) { - - GdkCursorType cursor_type; - - if (!pygobject_check(py_display, &PyGdkDisplay_Type)) { - PyErr_SetString(PyExc_TypeError, - "display should be a GdkDisplay"); - return -1; - } - if (pyg_enum_get_value(GDK_TYPE_CURSOR_TYPE, py_cursor_type, - (gint *)&cursor_type)) - return -1; - self->boxed = gdk_cursor_new_for_display(GDK_DISPLAY(py_display->obj), - cursor_type); - goto done; - } - - PyErr_Clear(); - - if (PyArg_ParseTupleAndKeywords(args, kwargs, - "OOii:GdkCursor.__init__", kwlist3, - &py_display, &pixbuf, &x, &y)) { - - if (!pygobject_check(py_display, &PyGdkDisplay_Type)) { - PyErr_SetString(PyExc_TypeError, - "display should be a GdkDisplay"); - return -1; - } - if (!pygobject_check(pixbuf, &PyGdkPixbuf_Type)) { - PyErr_SetString(PyExc_TypeError, - "pixbuf should be a GdkPixbuf"); - return -1; - } - self->boxed = gdk_cursor_new_from_pixbuf(GDK_DISPLAY(py_display->obj), - GDK_PIXBUF(pixbuf->obj), - x, y); - goto done; - } - - PyErr_Clear(); - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OOOOii:GdkCursor.__init__", kwlist4, - &source, &mask, &fg, &bg, &x, &y)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, "Usage:\n" - " gtk.gdk.Cursor(cursor_type)\n" - " gtk.gdk.Cursor(display, cursor_type)\n" - " gtk.gdk.Cursor(display, pixbuf, x, y)\n" - " gtk.gdk.Cursor(source, mask, fg, bg, x, y)"); - return -1; - } - - if (!pygobject_check(source, &PyGdkPixmap_Type)) { - PyErr_SetString(PyExc_TypeError, "source should be a GdkPixmap"); - return -1; - } - if (!pygobject_check(mask, &PyGdkPixmap_Type)) { - PyErr_SetString(PyExc_TypeError, "mask should be a GdkPixmap"); - return -1; - } - if (!pyg_boxed_check(fg, GDK_TYPE_COLOR)) { - PyErr_SetString(PyExc_TypeError, "fg should be a GdkColor"); - return -1; - } - if (!pyg_boxed_check(bg, GDK_TYPE_COLOR)) { - PyErr_SetString(PyExc_TypeError, "bg should be a GdkColor"); - return -1; - } - self->boxed = gdk_cursor_new_from_pixmap(GDK_PIXMAP(source->obj), - GDK_PIXMAP(mask->obj), - pyg_boxed_get(fg, GdkColor), - pyg_boxed_get(bg, GdkColor), - x, y); - done: - if (!self->boxed) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GdkCursor object"); - return -1; - } - self->free_on_dealloc = TRUE; - return 0; -} -%% -override gdk_region_get_clipbox noargs -static PyObject * -_wrap_gdk_region_get_clipbox(PyGObject *self) -{ - GdkRectangle rect = {0, 0, 0, 0}; - - gdk_region_get_clipbox(pyg_boxed_get(self, GdkRegion), &rect); - - return pyg_boxed_new(GDK_TYPE_RECTANGLE, &rect, TRUE, TRUE); -} -%% -override-attr GdkDevice.axes -static PyObject * -_wrap_gdk_device__get_axes(PyGObject *self, void *closure) -{ - GdkDevice *device = GDK_DEVICE(self->obj); - PyObject *ret; - gint i; - - ret = PyTuple_New(device->num_axes); - for (i = 0; i < device->num_axes; i++) - PyTuple_SetItem(ret, i, Py_BuildValue("(idd)", - device->axes[i].use, - device->axes[i].min, - device->axes[i].max)); - return ret; -} -%% -override-attr GdkDevice.keys -static PyObject * -_wrap_gdk_device__get_keys(PyGObject *self, void *closure) -{ - GdkDevice *device = GDK_DEVICE(self->obj); - PyObject *ret; - gint i; - - ret = PyTuple_New(device->num_keys); - for (i = 0; i < device->num_keys; i++) - PyTuple_SetItem(ret, i, - Py_BuildValue("(iN)", device->keys[i].keyval, - pyg_flags_from_gtype(GDK_TYPE_MODIFIER_TYPE, - device->keys[i].modifiers))); - return ret; -} -%% -override gdk_device_get_state kwargs -static PyObject * -_wrap_gdk_device_get_state(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "window", NULL }; - GdkDevice *device = GDK_DEVICE(self->obj); - PyGObject *window; - gdouble *axes; - GdkModifierType mask; - PyObject *py_axes; - guint i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GdkDevice.get_state", - kwlist, &window)) - return NULL; - if (!pygobject_check(window, &PyGdkWindow_Type)) { - PyErr_SetString(PyExc_TypeError, "window should be a GdkWindow"); - return NULL; - } - axes = g_new0(gdouble, device->num_axes); - gdk_device_get_state(device, GDK_WINDOW(window->obj), axes, &mask); - py_axes = PyTuple_New(device->num_axes); - for (i = 0; i < device->num_axes; i++) - PyTuple_SetItem(py_axes, i, PyFloat_FromDouble(axes[i])); - g_free(axes); - return Py_BuildValue("(NN)", py_axes, - pyg_flags_from_gtype(GDK_TYPE_MODIFIER_TYPE, mask)); -} -%% -ignore gdk_device_free_history -%% -override gdk_device_get_history kwargs -static PyObject * -_wrap_gdk_device_get_history(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "window", "start", "stop", NULL }; - GdkDevice *device = GDK_DEVICE(self->obj); - PyGObject *window; - guint start, stop; - GdkTimeCoord **events; - gint n_events; - PyObject *pyevents; - guint i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "Oii:GdkDevice.get_history", kwlist, - &window, &start, &stop)) - return NULL; - if (!pygobject_check(window, &PyGdkWindow_Type)) { - PyErr_SetString(PyExc_TypeError, "window should be a GdkWindow"); - return NULL; - } - gdk_device_get_history(device, GDK_WINDOW(window->obj), start, stop, - &events, &n_events); - pyevents = PyTuple_New(n_events); - for (i = 0; i < n_events; i++) { - PyObject *axes; - gint j; - - axes = PyTuple_New(device->num_axes); - for (j = 0; j < device->num_axes; j++) - PyTuple_SetItem(axes, j, PyFloat_FromDouble(events[i]->axes[j])); - PyTuple_SetItem(pyevents, i, Py_BuildValue("(iN)", events[i]->time, - axes)); - } - gdk_device_free_history(events, n_events); - return pyevents; -} -%% -override gdk_device_get_axis kwargs -static PyObject * -_wrap_gdk_device_get_axis(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "axes", "use", NULL }; - GdkDevice *device = GDK_DEVICE(self->obj); - PyObject *py_axes; - gdouble *axes, value; - GdkAxisUse use; - gboolean ret; - gint i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Oi:GdkDevice.get_axis", - kwlist, &py_axes, &use)) - return NULL; - if (!PySequence_Check(py_axes)) { - PyErr_SetString(PyExc_TypeError, "axes must be a sequence"); - return NULL; - } - if (PySequence_Length(py_axes) != device->num_axes) { - PyErr_SetString(PyExc_TypeError, "axes has the wrong length"); - return NULL; - } - axes = g_new(gdouble, device->num_axes); - for (i = 0; i < device->num_axes; i++) { - PyObject *item = PySequence_GetItem(py_axes, i); - - axes[i] = PyFloat_AsDouble(item); - Py_DECREF(item); - if (PyErr_Occurred()) { - g_free(axes); - return NULL; - } - } - ret = gdk_device_get_axis(device, axes, use, &value); - g_free(axes); - if (ret) - return PyFloat_FromDouble(value); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_drag_find_window kwargs -static PyObject * -_wrap_gdk_drag_find_window(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "drag_window", "x_root", "y_root", NULL }; - PyGObject *drag_window; - gint x_root, y_root; - GdkWindow *dest_window; - GdkDragProtocol protocol; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "Oii:GdkDragContext.drag_find_window", - kwlist, &drag_window, &x_root, &y_root)) - return NULL; - if (!pygobject_check(drag_window, &PyGdkWindow_Type)) { - PyErr_SetString(PyExc_TypeError, "drag_window must be a GdkWindow"); - return NULL; - } - gdk_drag_find_window(GDK_DRAG_CONTEXT(self->obj), - GDK_WINDOW(drag_window->obj), x_root, y_root, - &dest_window, &protocol); - return Py_BuildValue("(Ni)", pygobject_new((GObject *)dest_window), - protocol); -} -%% -override gdk_drag_find_window_for_screen kwargs -static PyObject * -_wrap_gdk_drag_find_window_for_screen(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "drag_window", "screen", "x_root", "y_root", NULL }; - PyGObject *drag_window, *screen; - gint x_root, y_root; - GdkWindow *dest_window; - GdkDragProtocol protocol; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!O!ii:GdkDragContext.drag_find_window_for_screen", - kwlist, &PyGdkWindow_Type, &drag_window, - &PyGdkScreen_Type, &screen, - &x_root, &y_root)) - return NULL; - gdk_drag_find_window_for_screen(GDK_DRAG_CONTEXT(self->obj), - GDK_WINDOW(drag_window->obj), - GDK_SCREEN(screen->obj), - x_root, y_root, - &dest_window, &protocol); - return Py_BuildValue("(Ni)", pygobject_new((GObject *)dest_window), - protocol); -} -%% -override-attr GdkDragContext.targets -static PyObject * -_wrap_gdk_drag_context__get_targets(PyGObject *self, void *closure) -{ - PyObject *atom, *ret = PyList_New(0); - GList *tmp; - if (ret == NULL) - return NULL; - for (tmp = GDK_DRAG_CONTEXT(self->obj)->targets; tmp; tmp = tmp->next) { - gchar *name; - - name = gdk_atom_name(GDK_POINTER_TO_ATOM(tmp->data)); - if ((atom = PyString_FromString(name)) == NULL) { - g_free(name); - Py_DECREF(ret); - return NULL; - } - PyList_Append(ret, atom); - g_free(name); - Py_DECREF(atom); - } - return ret; -} -%% -override gdk_drawable_get_size noargs -static PyObject * -_wrap_gdk_drawable_get_size(PyGObject *self) -{ - gint width; - gint height; - - gdk_drawable_get_size(GDK_DRAWABLE(self->obj), &width, &height); - return Py_BuildValue("(ii)", width, height); -} -%% -override gdk_drag_begin kwargs -static PyObject * -_wrap_gdk_drag_begin(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "targets", NULL }; - PyObject *py_targets; - GList *targets = NULL; - guint i, len; - GdkDragContext *context; - PyObject *py_context; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GdkWindow.drag_begin", - kwlist, &py_targets)) - return NULL; - if (!PySequence_Check(py_targets)) { - PyErr_SetString(PyExc_TypeError, "targets must be a list of ints"); - return NULL; - } - len = PySequence_Length(py_targets); - for (i = 0; i < len; i++) { - PyObject *item = PySequence_GetItem(py_targets, i); - - if (PyInt_Check(item)) { - targets = g_list_append(targets, - GUINT_TO_POINTER(PyInt_AsLong(item))); - Py_DECREF(item); - } else { - PyErr_SetString(PyExc_TypeError, "targets must be a list of ints"); - Py_DECREF(item); - g_list_free(targets); - return NULL; - } - } - context = gdk_drag_begin(GDK_WINDOW(self->obj), targets); - g_list_free(targets); - py_context = pygobject_new((GObject *)context); - gdk_drag_context_unref(context); - return py_context; -} -%% -override gdk_devices_list noargs -static PyObject * -_wrap_gdk_devices_list(PyObject *self) -{ - GList * devlist, *tmp; - PyObject *list; - - devlist = gdk_devices_list(); - list = PyList_New(0); - for (tmp = devlist; tmp != NULL; tmp = tmp->next) { - PyObject *item = pygobject_new((GObject *)tmp->data); - PyList_Append(list, item); - Py_DECREF(item); - } - - return list; -} -%% -override-attr GdkDrawable.handle -static PyObject * -_wrap_gdk_drawable__get_handle(PyGObject *self, void *closure) -{ -#if defined(GDK_WINDOWING_WIN32) - GdkDrawable *drawable = GDK_DRAWABLE(self->obj); - return PyLong_FromVoidPtr(GDK_WINDOW_HWND(drawable)); -#else - PyErr_SetString(PyExc_AttributeError, "handle attribute not supported"); - return NULL; -#endif -} -%% -override-attr GdkDrawable.xid -static PyObject * -_wrap_gdk_drawable__get_xid(PyGObject *self, void *closure) -{ -#if defined(GDK_WINDOWING_X11) - GdkDrawable *drawable = GDK_DRAWABLE(self->obj); - return PyLong_FromUnsignedLong(GDK_DRAWABLE_XID(drawable)); -#else - PyErr_SetString(PyExc_AttributeError, "xid attribute not supported"); - return NULL; -#endif -} -%% -override gdk_list_visuals noargs -static PyObject * -_wrap_gdk_list_visuals(PyGObject *self) -{ - GList *visl; - guint nvisl; - int i; - PyObject *list; - - visl = gdk_list_visuals(); - nvisl = g_list_length(visl); - - if ((list = PyList_New(nvisl)) == NULL) - return NULL; - - for (i = 0; i < nvisl; i++) { - PyObject *item; - - item = pygobject_new((GObject *)g_list_nth_data(visl, i)); - PyList_SetItem(list, i, item); - } - - g_list_free(visl); - - return list; -} -%% -override gdk_display_list_devices noargs -static PyObject * -_wrap_gdk_display_list_devices(PyGObject *self) -{ - GList * devlist, *tmp; - PyObject *list; - - devlist = gdk_display_list_devices(GDK_DISPLAY_OBJECT(self->obj)); - list = PyList_New(0); - for (tmp = devlist; tmp != NULL; tmp = tmp->next) { - PyObject *item = pygobject_new((GObject *)tmp->data); - PyList_Append(list, item); - Py_DECREF(item); - } - - return list; -} -%% -override gdk_display_get_pointer noargs -static PyObject * -_wrap_gdk_display_get_pointer(PyGObject *self) -{ - GdkScreen *screen = NULL; - gint x, y; - GdkModifierType mask; - - gdk_display_get_pointer(GDK_DISPLAY_OBJECT(self->obj), &screen, &x, &y, &mask); - return Py_BuildValue("(NiiN)", pygobject_new((GObject *)screen), - x, y, - pyg_flags_from_gtype(GDK_TYPE_MODIFIER_TYPE, mask)); -} -%% -override gdk_display_get_window_at_pointer noargs -static PyObject * -_wrap_gdk_display_get_window_at_pointer(PyGObject *self) -{ - GdkWindow *window; - gint win_x, win_y; - - window = gdk_display_get_window_at_pointer(GDK_DISPLAY_OBJECT(self->obj), - &win_x, &win_y); - if (window) - return Py_BuildValue("(Nii)", pygobject_new((GObject *)window), - win_x, win_y); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_display_manager_list_displays noargs -static PyObject * -_wrap_gdk_display_manager_list_displays(PyGObject *self) -{ - GSList *list, *tmp; - PyObject *py_list; - - list = gdk_display_manager_list_displays(GDK_DISPLAY_MANAGER(self->obj)); - py_list = PyList_New(0); - for (tmp = list; tmp != NULL; tmp = tmp->next) { - PyObject *item = pygobject_new((GObject *)tmp->data); - PyList_Append(py_list, item); - Py_DECREF(item); - } - g_slist_free(list); - - return py_list; -} -%% -override gdk_screen_list_visuals noargs -static PyObject * -_wrap_gdk_screen_list_visuals(PyGObject *self) -{ - GList *visl; - guint nvisl; - int i; - PyObject *list; - - visl = gdk_screen_list_visuals(GDK_SCREEN(self->obj)); - nvisl = g_list_length(visl); - - if ((list = PyList_New(nvisl)) == NULL) - return NULL; - - for (i = 0; i < nvisl; i++) { - PyObject *item; - - item = pygobject_new((GObject *)g_list_nth_data(visl, i)); - PyList_SetItem(list, i, item); - } - - g_list_free(visl); - - return list; -} -%% -override gdk_screen_get_toplevel_windows noargs -static PyObject * -_wrap_gdk_screen_get_toplevel_windows(PyGObject *self) -{ - GList *topl; - guint ntopl; - int i; - PyObject *list; - - topl = gdk_screen_get_toplevel_windows(GDK_SCREEN(self->obj)); - ntopl = g_list_length(topl); - - if ((list = PyList_New(ntopl)) == NULL) - return NULL; - - for (i = 0; i < ntopl; i++) { - PyObject *item; - - item = pygobject_new((GObject *)g_list_nth_data(topl, i)); - PyList_SetItem(list, i, item); - } - - g_list_free(topl); - - return list; -} -%% -override gdk_screen_get_monitor_geometry kwargs -static PyObject * -_wrap_gdk_screen_get_monitor_geometry(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "monitor_num", NULL }; - int monitor_num; - GdkRectangle dest = { 0, 0, 0, 0 }; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "i:GdkScreen.get_monitor_geometry", - kwlist, &monitor_num)) - return NULL; - - gdk_screen_get_monitor_geometry(GDK_SCREEN(self->obj), monitor_num, &dest); - - return pyg_boxed_new(GDK_TYPE_RECTANGLE, &dest, TRUE, TRUE); -} -%% -override gdk_screen_get_setting kwargs -static PyObject * -_wrap_gdk_screen_get_setting(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "name", NULL }; - char *name; - GValue value = { 0, }; - PyObject *ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s:GdkScreen.get_setting", - kwlist, &name)) - return NULL; - - /* this is a bit of a hack. We don't know what type of setting it is */ - g_value_init(&value, GDK_TYPE_COLOR); - if (gdk_screen_get_setting(GDK_SCREEN(self->obj), name, &value)) - goto got_setting; - g_value_unset(&value); - g_value_init(&value, G_TYPE_INT); - if (gdk_screen_get_setting(GDK_SCREEN(self->obj), name, &value)) - goto got_setting; - g_value_unset(&value); - g_value_init(&value, G_TYPE_STRING); - if (gdk_screen_get_setting(GDK_SCREEN(self->obj), name, &value)) - goto got_setting; - g_value_unset(&value); - /* setting not found */ - PyErr_SetString(PyExc_ValueError, "could not find setting"); - return NULL; - - got_setting: - ret = pyg_value_as_pyobject(&value, TRUE); - g_value_unset(&value); - return ret; -} -%% -override gdk_atom_intern kwargs -static PyObject * -_wrap_gdk_atom_intern(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "atom_name", "only_if_exists", NULL }; - char *atom_name; - int only_if_exists = FALSE; - GdkAtom ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|i:atom_intern", - kwlist, &atom_name, &only_if_exists)) - return NULL; - ret = gdk_atom_intern(atom_name, only_if_exists); - if (ret == GDK_NONE) { - Py_INCREF(Py_None); - return Py_None; - } - return PyGdkAtom_New(ret); -} -%% -override gdk_display_get_maximal_cursor_size noargs -static PyObject * -_wrap_gdk_display_get_maximal_cursor_size(PyGObject *self) -{ - guint width, height; - - gdk_display_get_maximal_cursor_size(GDK_DISPLAY(self->obj), - &width, &height); - - return Py_BuildValue("(ii)", width, height); -} -%% -override gdk_keyval_convert_case kwargs -static PyObject * -_wrap_gdk_keyval_convert_case(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "symbol", NULL }; - guint symbol, upper, lower; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:keyval_convert_case", - kwlist, &symbol)) - return NULL; - - gdk_keyval_convert_case(symbol, &lower, &upper); - - return Py_BuildValue("(ii)", lower, upper); -} -%% -override gdk_keymap_get_entries_for_keyval kwargs -static PyObject * -_wrap_gdk_keymap_get_entries_for_keyval(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "keyval", NULL }; - guint keyval; - GdkKeymapKey *keys; - gint n_keys; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "i:gtk.gdk.Keymap.get_entries_for_keyval", - kwlist, &keyval)) - return NULL; - - if (gdk_keymap_get_entries_for_keyval(GDK_KEYMAP(self->obj), keyval, - &keys, &n_keys)) { - int i; - PyObject * list = PyTuple_New(n_keys); - - for (i = 0; i < n_keys; i++) { - PyTuple_SetItem(list, i, - Py_BuildValue("(iii)", keys[i].keycode, - keys[i].group, keys[i].level)); - } - g_free(keys); - - return list; - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_keymap_get_entries_for_keycode kwargs -static PyObject * -_wrap_gdk_keymap_get_entries_for_keycode(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "hardware_keycode", NULL }; - guint keycode; - GdkKeymapKey *keys; - guint *keyvals; - gint n_keys; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "i:gtk.gdk.Keymap.get_entries_for_keycode", - kwlist, &keycode)) - return NULL; - - if (gdk_keymap_get_entries_for_keycode(GDK_KEYMAP(self->obj), keycode, - &keys, &keyvals, &n_keys)) { - int i; - PyObject * list = PyTuple_New(n_keys); - - for (i = 0; i < n_keys; i++) { - PyTuple_SetItem(list, i, - Py_BuildValue("(iiii)", keyvals[i], - keys[i].keycode, - keys[i].group, keys[i].level)); - } - g_free(keys); - - return list; - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_keymap_lookup_key kwargs -static PyObject * -_wrap_gdk_keymap_lookup_key(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "keycode", "group", "level", NULL }; - GdkKeymapKey key; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "iii:gtk.gdk.Keymap.lookup_key", - kwlist, &key.keycode, &key.group, - &key.level)) - return NULL; - - return PyInt_FromLong(gdk_keymap_lookup_key(GDK_KEYMAP(self->obj), &key)); -} -%% -override gdk_keymap_translate_keyboard_state kwargs -static PyObject * -_wrap_gdk_keymap_translate_keyboard_state(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "keycode", "state", "group", NULL }; - guint keycode, keyval; - gint group, effective_group, level; - GdkModifierType state, modifiers; - PyObject *py_state; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "iOi:gtk.gdk.Keymap.translate_keyboard_state", - kwlist, &keycode, &py_state, - &group)) - return NULL; - - if (pyg_flags_get_value(GDK_TYPE_MODIFIER_TYPE, py_state, - (gint *)&state)) - return NULL; - - if (gdk_keymap_translate_keyboard_state(GDK_KEYMAP(self->obj), keycode, - state, group, &keyval, - &effective_group, &level, - &modifiers)) - return Py_BuildValue("(iiiN)", keyval, effective_group, level, - pyg_flags_from_gtype(GDK_TYPE_MODIFIER_TYPE, - modifiers)); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_query_depths noargs -static PyObject * -_wrap_gdk_query_depths(PyObject *self) -{ - gint count, i; - gint *depths; - PyObject *py_depths; - - gdk_query_depths(&depths, &count); - - py_depths = PyTuple_New(count); - - for (i = 0; i < count; i++) - PyTuple_SetItem(py_depths, i, PyInt_FromLong(depths[i])); - - return py_depths; -} -%% -override gdk_query_visual_types noargs -static PyObject * -_wrap_gdk_query_visual_types(PyObject *self) -{ - gint count, i; - GdkVisualType *types; - PyObject *py_types; - - gdk_query_visual_types(&types, &count); - - py_types = PyTuple_New(count); - - for (i = 0; i < count; i++) - PyTuple_SetItem(py_types, i, PyInt_FromLong(types[i])); - - return py_types; -} -%% -override gdk_window_at_pointer noargs -static PyObject * -_wrap_gdk_window_at_pointer(PyObject *self) -{ - GdkWindow *window; - gint x, y; - - window = gdk_window_at_pointer(&x, &y); - - if (window) - return Py_BuildValue("(Nii)", pygobject_new((GObject *)window), x, y); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_display_store_clipboard kwargs -static PyObject * -_wrap_gdk_display_store_clipboard(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "clipboard_window", "time_", "targets", NULL }; - PyGObject *pyclipboard_window; - guint32 time_; - PyObject *pytargets; - GdkAtom *targets; - int tlen, i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!iO:GdkDIsplay.store_clipboard", kwlist, - &PyGdkWindow_Type, &pyclipboard_window, - &time_, &pytargets)) - return NULL; - - if (!pytargets || pytargets == Py_None) { - tlen = 0; - targets = NULL; - } else { - if (!PySequence_Check(pytargets)) { - PyErr_SetString(PyExc_TypeError, - "targets must be a sequence of target strings" - "or GdkAtoms or None"); - return NULL; - } - tlen = PySequence_Size(pytargets); - targets = g_new0(GdkAtom, tlen); - for (i = 0; i < tlen; i++) { - PyObject *item = PySequence_GetItem(pytargets, i); - targets[i] = pygdk_atom_from_pyobject(item); - if (PyErr_Occurred()) { - Py_DECREF(item); - g_free(targets); - return NULL; - } - Py_DECREF(item); - } - g_free(targets); - } - gdk_display_store_clipboard(GDK_DISPLAY(self->obj), - GDK_WINDOW(pyclipboard_window->obj), - time_, targets, tlen); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_event_handler_set args -static void -pygdk_event_handler_marshal(GdkEvent *event, gpointer data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = data; - PyObject *retobj; - PyObject *pyevent; - - g_assert (cunote->func); - - state = pyg_gil_state_ensure(); - - pyevent = pyg_boxed_new(GDK_TYPE_EVENT, event, TRUE, TRUE); - if (cunote->data) - retobj = PyEval_CallFunction(cunote->func, "(NO)", - pyevent, cunote->data); - else - retobj = PyEval_CallFunction(cunote->func, "(N)", pyevent); - - if (retobj == NULL) { - PyErr_Print(); - } else - Py_DECREF(retobj); - - pyg_gil_state_release(state); -} - -static PyObject * -_wrap_gdk_event_handler_set(PyObject *self, PyObject *args, PyObject *kwargs) -{ - PyObject *pyfunc, *pyarg = NULL; - PyGtkCustomNotify *cunote; - - if (!PyArg_ParseTuple(args, "O|O:event_handler_set", - &pyfunc, &pyarg)) - return NULL; - - if (pyfunc == Py_None) { - gdk_event_handler_set(NULL, NULL, NULL); - } else { - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = pyfunc; - cunote->data = pyarg; - Py_INCREF(cunote->func); - Py_XINCREF(cunote->data); - - gdk_event_handler_set(pygdk_event_handler_marshal, - cunote, - pygtk_custom_destroy_notify); - } - - Py_INCREF(Py_None); - return Py_None; -} - -%% -override gdk_bitmap_create_from_data kwargs -static PyObject * -_wrap_gdk_bitmap_create_from_data(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "drawable", "data", "width", "height", NULL }; - PyGObject *py_drawable; - GdkDrawable *drawable = NULL; - gchar *data; - GdkBitmap *ret; - Py_ssize_t data_len; - int width, height, rowstride; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs,"Os#ii:bitmap_create_from_data", kwlist, &py_drawable, &data, &data_len, &width, &height)) - return NULL; - if (py_drawable && pygobject_check(py_drawable, &PyGdkDrawable_Type)) - drawable = GDK_DRAWABLE(py_drawable->obj); - else if ((PyObject *)py_drawable != Py_None) { - PyErr_SetString(PyExc_TypeError, "drawable should be a GdkDrawable or None"); - return NULL; - } - - rowstride = (width&(~7))/8 + 1; - if (data_len*8 < rowstride*height) { - PyErr_SetString(PyExc_ValueError, "data size is insufficient for the given width, height, and depth"); - return NULL; - } - - ret = gdk_bitmap_create_from_data((GdkDrawable *) drawable, data, width, height); - - /* pygobject_new handles NULL checking */ - return pygobject_new((GObject *)ret); -} - -%% -override gdk_pixmap_create_from_data kwargs -static PyObject * -_wrap_gdk_pixmap_create_from_data(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "drawable", "data", "width", "height", "depth", "fg", "bg", NULL }; - Py_ssize_t data_len; - int width, height, depth; - GdkPixmap *ret; - PyObject *py_fg, *py_bg; - GdkColor *fg = NULL, *bg = NULL; - GdkDrawable *drawable = NULL; - gchar *data; - PyGObject *py_drawable; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs,"Os#iiiOO:pixmap_create_from_data", kwlist, &py_drawable, &data, &data_len, &width, &height, &depth, &py_fg, &py_bg)) - return NULL; - if (py_drawable && pygobject_check(py_drawable, &PyGdkDrawable_Type)) - drawable = GDK_DRAWABLE(py_drawable->obj); - else if ((PyObject *)py_drawable != Py_None) { - PyErr_SetString(PyExc_TypeError, "drawable should be a GdkDrawable or None"); - return NULL; - } - if (pyg_boxed_check(py_fg, GDK_TYPE_COLOR)) - fg = pyg_boxed_get(py_fg, GdkColor); - else { - PyErr_SetString(PyExc_TypeError, "fg should be a GdkColor"); - return NULL; - } - if (pyg_boxed_check(py_bg, GDK_TYPE_COLOR)) - bg = pyg_boxed_get(py_bg, GdkColor); - else { - PyErr_SetString(PyExc_TypeError, "bg should be a GdkColor"); - return NULL; - } - - if (data_len < width*height*(depth>>3)) { - PyErr_SetString(PyExc_ValueError, "data size is insufficient for the given width, height, and depth"); - return NULL; - } - - ret = gdk_pixmap_create_from_data((GdkDrawable *) drawable, data, width, height, depth, fg, bg); - - /* pygobject_new handles NULL checking */ - return pygobject_new((GObject *)ret); -} -%% -override gdk_screen_get_font_options noargs -static PyObject * -_wrap_gdk_screen_get_font_options(PyGObject *self) -{ - const cairo_font_options_t *options; - - options = gdk_screen_get_font_options(GDK_SCREEN(self->obj)); - if (!options) { - Py_INCREF(Py_None); - return Py_None; - } - return PycairoFontOptions_FromFontOptions(cairo_font_options_copy(options)); -} -%% -override gdk_screen_set_font_options kwargs -static PyObject * -_wrap_gdk_screen_set_font_options(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "options", NULL }; - PyGObject *py_options; - const cairo_font_options_t *options; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GdkScreen.set_font_options", - kwlist, &py_options)) - return NULL; - if ((PyObject*)py_options == Py_None) - options = NULL; - else if (pygobject_check(py_options, &PycairoFontOptions_Type)) - options = ((PycairoFontOptions *)py_options)->font_options; - else { - PyErr_SetString(PyExc_TypeError, - "options must be a cairo.FontOptions or None"); - return NULL; - } - - gdk_screen_set_font_options(GDK_SCREEN(self->obj), options); - Py_INCREF(Py_None); - return Py_None; -} - -%% -override gdk_display_close noargs -static PyObject * -_wrap_gdk_display_close(PyGObject *self) -{ - GdkDisplay *display = GDK_DISPLAY(self->obj); - if (self->obj && !display->closed) { - g_object_ref(self->obj); - gdk_display_close(display); - } - Py_INCREF(Py_None); - return Py_None; -} diff --git a/gtk/gdkcairo.override b/gtk/gdkcairo.override deleted file mode 100644 index b231c651..00000000 --- a/gtk/gdkcairo.override +++ /dev/null @@ -1,249 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 2005 Gustavo Carneiro - * - * gdkcairo.override: GdkCairo overrides - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -body - -#ifdef HAVE_PYCAIRO - - -static PyTypeObject *_PyPangoCairoContext_Type; -#define PyPangoCairoContext_Type (*_PyPangoCairoContext_Type) - -static PyObject * -_wrap_gdk_cairo_set_source_color(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "color", NULL }; - PyObject *py_color; - GdkColor *color = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:gtk.gdk.CairoContext.set_source_color", kwlist, &py_color)) - return NULL; - if (pyg_boxed_check(py_color, GDK_TYPE_COLOR)) - color = pyg_boxed_get(py_color, GdkColor); - else { - PyErr_SetString(PyExc_TypeError, "color should be a GdkColor"); - return NULL; - } - gdk_cairo_set_source_color(PycairoContext_GET(self), color); - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -_wrap_gdk_cairo_set_source_pixbuf(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "pixbuf", "pixbuf_x", "pixbuf_y", NULL }; - PyGObject *pixbuf; - double pixbuf_x, pixbuf_y; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!dd:gtk.gdk.CairoContext.set_source_pixbuf", kwlist, - &PyGdkPixbuf_Type, &pixbuf, &pixbuf_x, &pixbuf_y)) - return NULL; - gdk_cairo_set_source_pixbuf(PycairoContext_GET(self), GDK_PIXBUF(pixbuf->obj), - pixbuf_x, pixbuf_y); - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -_wrap_gdk_cairo_rectangle(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "rectangle", NULL }; - PyObject *py_rectangle; - GdkRectangle rectangle; - double x, y, width, height; - - if (PyArg_ParseTuple (args, "dddd:Context.rectangle", - &x, &y, &width, &height)) - { - cairo_rectangle(PycairoContext_GET(self), x, y, width, height); - } else { - PyErr_Clear(); - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:gtk.gdk.CairoContext.rectangle", kwlist, - &py_rectangle)) { - PyErr_SetString(PyExc_TypeError, "gtk.gdk.CairoContext.rectangle accepts either" - " (x, y, width, height) or a single gtk.gdk.Rectangle parameter"); - return NULL; - } - if (!pyg_boxed_check(py_rectangle, GDK_TYPE_RECTANGLE)) { - if (!pygdk_rectangle_from_pyobject(py_rectangle, &rectangle)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "rectangle must be a GdkRectangle or 4-tuple"); - return NULL; - } - } else { - rectangle = *pyg_boxed_get(py_rectangle, GdkRectangle); - } - - gdk_cairo_rectangle(PycairoContext_GET(self), &rectangle); - } - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -_wrap_gdk_cairo_region(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "region", NULL }; - PyGObject *py_region; - GdkRegion *region; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:gtk.gdk.CairoContext.region", kwlist, - &py_region)) - return NULL; - - if (pyg_boxed_check(py_region, PYGDK_TYPE_REGION)) - region = pyg_boxed_get(py_region, GdkRegion); - else { - PyErr_SetString(PyExc_TypeError, "region should be a gtk.gdk.Region"); - return NULL; - } - - gdk_cairo_region(PycairoContext_GET(self), region); - - Py_INCREF(Py_None); - return Py_None; -} - -#if GTK_CHECK_VERSION(2, 9, 3) -static PyObject * -_wrap_gdk_cairo_set_source_pixmap(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "pixmap", "pixmap_x", "pixmap_y", NULL }; - PyGObject *pixmap; - double pixmap_x, pixmap_y; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!dd:cairo_set_source_pixmap", kwlist, - &PyGdkPixmap_Type, &pixmap, &pixmap_x, &pixmap_y)) - return NULL; - gdk_cairo_set_source_pixmap(PycairoContext_GET(self), GDK_PIXMAP(pixmap->obj), - pixmap_x, pixmap_y); - Py_INCREF(Py_None); - return Py_None; -} -#endif - -static PyMethodDef _PyGdkCairoContext_methods[] = { - { "set_source_pixbuf", (PyCFunction)_wrap_gdk_cairo_set_source_pixbuf, METH_VARARGS|METH_KEYWORDS }, - { "set_source_color", (PyCFunction)_wrap_gdk_cairo_set_source_color, METH_VARARGS|METH_KEYWORDS }, - { "rectangle", (PyCFunction)_wrap_gdk_cairo_rectangle, METH_VARARGS|METH_KEYWORDS }, - { "region", (PyCFunction)_wrap_gdk_cairo_region, METH_VARARGS|METH_KEYWORDS }, -#if GTK_CHECK_VERSION(2, 9, 3) - { "set_source_pixmap", (PyCFunction)_wrap_gdk_cairo_set_source_pixmap, METH_VARARGS|METH_KEYWORDS }, -#endif - { NULL, NULL, 0 } -}; - - -PyTypeObject PyGdkCairoContext_Type = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ - "gtk.gdk.CairoContext", /* tp_name */ - 0, /* tp_basicsize */ - 0, /* tp_itemsize */ - /* methods */ - (destructor)0, /* tp_dealloc */ - (printfunc)0, /* tp_print */ - (getattrfunc)0, /* tp_getattr */ - (setattrfunc)0, /* tp_setattr */ - (cmpfunc)0, /* tp_compare */ - (reprfunc)0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - (reprfunc)0, /* tp_str */ - (getattrofunc)0, /* tp_getattro */ - (setattrofunc)0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - "A pangocairo.CairoContext enhanced with some additional gdk methods", /* Documentation string */ - (traverseproc)0, /* tp_traverse */ - (inquiry)0, /* tp_clear */ - (richcmpfunc)0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc)0, /* tp_iter */ - (iternextfunc)0, /* tp_iternext */ - _PyGdkCairoContext_methods, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - (PyTypeObject *)0, /* tp_base */ - (PyObject *)0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)0, /* tp_init */ - 0, /* tp_alloc */ - 0, /* tp_new */ - 0, /* tp_free */ - (inquiry)0, /* tp_is_gc */ - (PyObject *)0, /* tp_bases */ -}; - -#endif /* #ifdef HAVE_PYCAIRO */ - -%% -ignore - gdk_cairo_set_source_color - gdk_cairo_set_source_pixbuf - gdk_cairo_rectangle - gdk_cairo_region - gdk_cairo_set_source_pixmap - -%% -init -#ifdef HAVE_PYCAIRO - if ((module = PyImport_ImportModule("pangocairo")) != NULL) { - PyObject *moddict = PyModule_GetDict(module); - - _PyPangoCairoContext_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "CairoContext"); - if (_PyPangoCairoContext_Type == NULL) { - PyErr_SetString(PyExc_ImportError, - "cannot import name CairoContext from pangocairo"); - return; - } - } else { - return; - } - - PyGdkCairoContext_Type.tp_base = &PyPangoCairoContext_Type; - if (PyType_Ready(&PyGdkCairoContext_Type) < 0) { - g_return_if_reached(); - } - if (PyDict_SetItemString(d, "CairoContext", (PyObject *)&PyGdkCairoContext_Type) < 0) { - g_return_if_reached(); - } -#endif - -%% -override gdk_cairo_create noargs -static PyObject * -_wrap_gdk_cairo_create(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - cairo_t *ret; - - ret = gdk_cairo_create(GDK_DRAWABLE(self->obj)); - return PycairoContext_FromContext(ret, &PyGdkCairoContext_Type, NULL); -} - diff --git a/gtk/gdkcolor.override b/gtk/gdkcolor.override deleted file mode 100644 index c3490fd0..00000000 --- a/gtk/gdkcolor.override +++ /dev/null @@ -1,201 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * gdkcolor.override: gtk.gdk.Color and gtk.gdk.ColorMap overrides - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -ignore - gdk_color_copy gdk_color_free - gdk_color_hash gdk_color_equal -%% -override gdk_color_new kwargs -static int -_wrap_gdk_color_new(PyGBoxed *self, - PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = {"red", "green", "blue", "pixel", NULL }; - int red = 0, green = 0, blue = 0; - unsigned int pixel = 0; - GdkColor colour; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iiik:gdk.Color", kwlist, - &red, &green, &blue, &pixel)) { - return -1; - } - colour.red = red; - colour.green = green; - colour.blue = blue; - colour.pixel = pixel; - - self->boxed = g_boxed_copy(GDK_TYPE_COLOR, &colour); - self->free_on_dealloc = TRUE; - self->gtype = GDK_TYPE_COLOR; - - return 0; -} -%% -override-slot GdkColor.tp_setattr -static int -_wrap_gdk_color_tp_setattr(PyGBoxed *self, char *attr, PyObject *value) -{ - if (value == NULL) { - PyErr_SetString(PyExc_TypeError, "can't delete attributes"); - return -1; - } - - if (PyInt_Check(value)) { - int i = PyInt_AsLong(value); - if (!strcmp(attr, "red")) { - pyg_boxed_get(self, GdkColor)->red = i; - return 0; - } else if (!strcmp(attr, "green")) { - pyg_boxed_get(self, GdkColor)->green = i; - return 0; - } else if (!strcmp(attr, "blue")) { - pyg_boxed_get(self, GdkColor)->blue = i; - return 0; - } else if (!strcmp(attr, "pixel")) { - pyg_boxed_get(self, GdkColor)->pixel = i; - return 0; - } - } - - PyErr_SetString(PyExc_AttributeError, "could not write attribute"); - return -1; -} -%% -override gdk_color_parse kwargs -static PyObject * -_wrap_gdk_color_parse(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "spec", NULL }; - const char *spec; - GdkColor colour = { 0, }; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s:color_parse", kwlist, - &spec)) - return NULL; - - if (!gdk_color_parse(spec, &colour)) { - PyErr_SetString(PyExc_ValueError, - "unable to parse colour specification"); - return NULL; - } - - /* pyg_boxed_new handles NULL checking */ - return pyg_boxed_new (GDK_TYPE_COLOR, &colour, TRUE, TRUE); -} -%% -override gdk_colormap_alloc_color kwargs -static PyObject * -_wrap_gdk_colormap_alloc_color(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist1[] = { "red", "green", "blue", "writeable", "best_match", NULL }; - static char *kwlist2[] = { "spec", "writeable", "best_match", NULL }; - static char *kwlist3[] = { "color", "writeable", "best_match", NULL }; - GdkColor colour = { 0, 0, 0, 0 }; - gboolean writeable = FALSE; - gboolean best_match = TRUE; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "HHH|ii:GdkColormap.alloc_color", kwlist1, - &colour.red, &colour.green, &colour.blue, - &writeable, &best_match)) { - - PyObject *pycolour; - - PyErr_Clear(); - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|ii:GdkColormap.alloc_color", - kwlist3, &pycolour, - &writeable, &best_match)) { - return NULL; - } - - if (!pyg_boxed_check(pycolour, GDK_TYPE_COLOR)) { - gchar *color_name; - - PyErr_Clear(); - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s|ii:GdkColormap.alloc_color", - kwlist2, &color_name, &writeable, - &best_match)) { - return NULL; - } - - if (!gdk_color_parse(color_name, &colour)) { - PyErr_SetString(PyExc_ValueError, - "unable to parse colour specification"); - return NULL; - } - } else { - colour = *pyg_boxed_get(pycolour, GdkColor); - } - } - - if (!gdk_colormap_alloc_color(GDK_COLORMAP(self->obj), - &colour, writeable, best_match)) { - PyErr_SetString(PyExc_RuntimeError, "couldn't allocate colour"); - return NULL; - } - return pyg_boxed_new(GDK_TYPE_COLOR, &colour, TRUE, TRUE); -} -%% -override gdk_color_alloc kwargs -static PyObject * -_wrap_gdk_color_alloc(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - if (!PyErr_Warn(PyExc_DeprecationWarning, "use GdkColormap.alloc_color")<0) - return NULL; - return _wrap_gdk_colormap_alloc_color(self, args, kwargs); -} -%% -override gdk_colormap_query_color kwargs -static PyObject * -_wrap_gdk_colormap_query_color(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "pixel", NULL }; - GdkColor colour = { 0, 0, 0, 0 }; - PyObject *py_pixel; - gulong pixel; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GdkColormap.query_color", kwlist, - &py_pixel)) - return NULL; - - if (PyLong_Check(py_pixel)) { - pixel = PyLong_AsUnsignedLong(py_pixel); - if (PyErr_Occurred()) - return NULL; - } else if (PyInt_Check(py_pixel)) - pixel = PyInt_AS_LONG(py_pixel); - else { - PyErr_SetString(PyExc_TypeError, "GdkColormap.query_color: pixel must be" - " either int or long"); - return NULL; - } - - gdk_colormap_query_color(GDK_COLORMAP(self->obj), pixel, &colour); - - return pyg_boxed_new(GDK_TYPE_COLOR, &colour, TRUE, TRUE); -} diff --git a/gtk/gdkdraw.override b/gtk/gdkdraw.override deleted file mode 100644 index 1b5bab87..00000000 --- a/gtk/gdkdraw.override +++ /dev/null @@ -1,464 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * gdkdraw.override: gtk.gdk.draw_* overrides - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -ignore - gdk_draw_layout_line_with_colors - -%% -override gdk_draw_polygon kwargs -static PyObject * -_wrap_gdk_draw_polygon(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "gc", "filled", "points", NULL }; - PyGObject *gc; - PyObject *py_points; - gint filled, npoints, i; - GdkPoint *points; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!iO:GdkDrawable.draw_polygon", kwlist, - &PyGdkGC_Type, &gc, &filled, &py_points)) - return NULL; - if (!PySequence_Check(py_points)) { - PyErr_SetString(PyExc_TypeError, "points must be a sequence"); - return NULL; - } - npoints = PySequence_Length(py_points); - points = g_new(GdkPoint, npoints); - for (i = 0; i < npoints; i++) { - PyObject *item = PySequence_GetItem(py_points, i); - Py_DECREF(item); - if (!PyArg_ParseTuple(item, "ii", &points[i].x, &points[i].y)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "sequence members must be 2-tuples"); - g_free(points); - return NULL; - } - } - gdk_draw_polygon(GDK_DRAWABLE(self->obj), GDK_GC(gc->obj), filled, - points, npoints); - g_free(points); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_draw_text kwargs -static PyObject * -_wrap_gdk_draw_text(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "font", "gc", "x", "y", "text",NULL}; - PyGObject *gc; - PyObject *font; - int x, y; - Py_ssize_t len; - char *text; - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OO!iis#:GdkDrawable.draw_text", kwlist, - &font, &PyGdkGC_Type, &gc, - &x, &y, &text, &len)) - return NULL; - if (!pyg_boxed_check(font, GDK_TYPE_FONT)) { - PyErr_SetString(PyExc_TypeError, "font must be a GdkFont"); - return NULL; - } - gdk_draw_text(GDK_DRAWABLE(self->obj), pyg_boxed_get(font, GdkFont), - GDK_GC(gc->obj), x, y, text, len); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_draw_points kwargs -static PyObject * -_wrap_gdk_draw_points(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "gc", "points", NULL }; - PyGObject *gc; - PyObject *py_points; - gint npoints, i; - GdkPoint *points; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!O:GdkDrawable.draw_points", kwlist, - &PyGdkGC_Type, &gc, &py_points)) - return NULL; - if (!PySequence_Check(py_points)) { - PyErr_SetString(PyExc_TypeError, "points must be a sequence"); - return NULL; - } - npoints = PySequence_Length(py_points); - points = g_new(GdkPoint, npoints); - for (i = 0; i < npoints; i++) { - PyObject *item = PySequence_GetItem(py_points, i); - Py_DECREF(item); - if (!PyArg_ParseTuple(item, "ii", &points[i].x, &points[i].y)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "sequence members must be 2-tuples"); - g_free(points); - return NULL; - } - } - gdk_draw_points(GDK_DRAWABLE(self->obj), GDK_GC(gc->obj), points, npoints); - g_free(points); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_draw_segments kwargs -static PyObject * -_wrap_gdk_draw_segments(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "gc", "segs", NULL }; - PyGObject *gc; - PyObject *py_segs; - gint nsegs, i; - GdkSegment *segs; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!O:GdkDrawable.draw_segments", kwlist, - &PyGdkGC_Type, &gc, &py_segs)) - return NULL; - if (!PySequence_Check(py_segs)) { - PyErr_SetString(PyExc_TypeError, "segs must be a sequence"); - return NULL; - } - nsegs = PySequence_Length(py_segs); - segs = g_new(GdkSegment, nsegs); - for (i = 0; i < nsegs; i++) { - PyObject *item = PySequence_GetItem(py_segs, i); - Py_DECREF(item); - if (!PyArg_ParseTuple(item, "iiii", &segs[i].x1, &segs[i].y1, - &segs[i].x2, &segs[i].y2)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "sequence members must be 4-tuples"); - g_free(segs); - return NULL; - } - } - gdk_draw_segments(GDK_DRAWABLE(self->obj), GDK_GC(gc->obj), segs, nsegs); - g_free(segs); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_draw_lines kwargs -static PyObject * -_wrap_gdk_draw_lines(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "gc", "points", NULL }; - PyGObject *gc; - PyObject *py_points; - gint npoints, i; - GdkPoint *points; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!O:GdkDrawable.draw_lines", kwlist, - &PyGdkGC_Type, &gc, &py_points)) - return NULL; - if (!PySequence_Check(py_points)) { - PyErr_SetString(PyExc_TypeError, "points must be a sequence"); - return NULL; - } - npoints = PySequence_Length(py_points); - points = g_new(GdkPoint, npoints); - for (i = 0; i < npoints; i++) { - PyObject *item = PySequence_GetItem(py_points, i); - Py_DECREF(item); - if (!PyArg_ParseTuple(item, "ii", &points[i].x, &points[i].y)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "sequence members must be 2-tuples"); - g_free(points); - return NULL; - } - } - gdk_draw_lines(GDK_DRAWABLE(self->obj), GDK_GC(gc->obj), points, npoints); - g_free(points); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_draw_rgb_image kwargs -static PyObject * -_wrap_gdk_draw_rgb_image(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "gc", "x", "y", "width", "height", "dith", - "rgb_buf", "rowstride", "xdith", "ydith", NULL }; - PyGObject *gc; - PyObject *py_dith; - gint x, y, width, height, rowstride = -1, xdith = 0, ydith = 0; - Py_ssize_t len; - GdkRgbDither dith; - guchar *rgb_buf; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!iiiiOs#|iii:GdkDrawable.draw_rgb_image", - kwlist, &PyGdkGC_Type, &gc, &x, &y, - &width, &height, &py_dith, - &rgb_buf, &len, &rowstride, - &xdith, &ydith)) - return NULL; - - if (pyg_enum_get_value(GDK_TYPE_RGB_DITHER, py_dith, (gint *)&dith)) - return NULL; - if (!(width > 0 && height > 0)) { - PyErr_SetString(PyExc_ValueError, - "height and width must be greater than zero"); - return NULL; - } - if (rowstride == -1) rowstride = width * 3; - if (len < rowstride * (height - 1) + width*3) { - PyErr_SetString(PyExc_IndexError, "rgb_buf is not large enough"); - return NULL; - } - /* We always call gdk_draw_rgb_image_dithalign instead of - * gdk_draw_rgb_image, since gdk_draw_rgb_image is strictly - * equivalent to calling gdk_draw_rgb_image_dithalign with - * xdith=0 and ydith=0, which are their default values. */ - gdk_draw_rgb_image_dithalign(GDK_DRAWABLE(self->obj), GDK_GC(gc->obj), - x, y, width, height, dith, rgb_buf, - rowstride, xdith, ydith); - Py_INCREF(Py_None); - return Py_None; -} -%% -ignore gdk_draw_rgb_image_dithalign -%% -override gdk_draw_rgb_32_image kwargs -static PyObject * -_wrap_gdk_draw_rgb_32_image(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "gc", "x", "y", "width", "height", "dith", - "rgb_buf", "rowstride", "xdith", "ydith", NULL }; - PyGObject *gc; - PyObject *py_dith; - gint x, y, width, height, rowstride = -1, xdith = 0, ydith = 0; - Py_ssize_t len; - GdkRgbDither dith; - guchar *rgb_buf; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!iiiiOs#|iii:GdkDrawable.draw_rgb_32_image", - kwlist, &PyGdkGC_Type, &gc, &x, &y, - &width, &height, &py_dith, - &rgb_buf, &len, &rowstride, - &xdith, &ydith)) - return NULL; - - if (pyg_enum_get_value(GDK_TYPE_RGB_DITHER, py_dith, (gint *)&dith)) - return NULL; - if (!(width > 0 && height > 0)) { - PyErr_SetString(PyExc_ValueError, - "height and width must be greater than zero"); - return NULL; - } - if (rowstride == -1) rowstride = width * 4; - if (len < rowstride * (height - 1) + width*4) { - PyErr_SetString(PyExc_IndexError, "rgb_buf is not large enough"); - return NULL; - } - /* We always call gdk_draw_rgb_32_image_dithalign instead of - * gdk_draw_rgb_32_image, since gdk_draw_rgb_32_image is strictly - * equivalent to calling gdk_draw_rgb_32_image_dithalign with - * xdith=0 and ydith=0, which are their default values. */ - gdk_draw_rgb_32_image_dithalign(GDK_DRAWABLE(self->obj), GDK_GC(gc->obj), - x, y, width, height, dith, rgb_buf, - rowstride, xdith, ydith); - Py_INCREF(Py_None); - return Py_None; -} -%% -ignore gdk_draw_rgb_32_image_dithalign -%% -override gdk_draw_gray_image kwargs -static PyObject * -_wrap_gdk_draw_gray_image(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "gc", "x", "y", "width", "height", "dith", - "buf", "rowstride", NULL }; - PyGObject *gc; - PyObject *py_dith; - gint x, y, width, height, rowstride = -1; - Py_ssize_t len; - GdkRgbDither dith; - guchar *buf; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!iiiiOs#|i:GdkDrawable.draw_gray_image", - kwlist, &PyGdkGC_Type, &gc, &x, &y, - &width, &height, &py_dith, - &buf, &len, &rowstride)) - return NULL; - - if (pyg_enum_get_value(GDK_TYPE_RGB_DITHER, py_dith, (gint *)&dith)) - return NULL; - if (!(width > 0 && height > 0)) { - PyErr_SetString(PyExc_ValueError, - "height and width must be greater than zero"); - return NULL; - } - if (rowstride == -1) rowstride = width; - if (len < rowstride * (height - 1) + width) { - PyErr_SetString(PyExc_IndexError, "buf is not large enough"); - return NULL; - } - gdk_draw_gray_image(GDK_DRAWABLE(self->obj), GDK_GC(gc->obj), x, y, - width, height, dith, buf, rowstride); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_draw_indexed_image kwargs -static PyObject * -_wrap_gdk_draw_indexed_image(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "gc", "x", "y", "width", "height", "dith", - "buf", "rowstride", "colors", NULL }; - PyGObject *gc; - PyObject *py_dith; - gint x, y, width, height, rowstride = -1; - Py_ssize_t len; - GdkRgbDither dith; - guchar *buf; - PyObject *pycolors; - GdkRgbCmap *cmap; - guint32 *colors; - int i, n_colors; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!iiiiOs#iO:GdkDrawable.draw_indexed_image", - kwlist, &PyGdkGC_Type, &gc, &x, &y, - &width, &height, &py_dith, - &buf, &len, &rowstride, - &pycolors)) - return NULL; - - if (pyg_enum_get_value(GDK_TYPE_RGB_DITHER, py_dith, (gint *)&dith)) - return NULL; - if (!(width > 0 && height > 0)) { - PyErr_SetString(PyExc_ValueError, - "height and width must be greater than zero"); - return NULL; - } - if (rowstride == -1) rowstride = width; - if (len < rowstride * (height - 1) + width) { - PyErr_SetString(PyExc_IndexError, "buf is not large enough"); - return NULL; - } - if (!PyList_Check(pycolors)) { - PyErr_SetString(PyExc_TypeError, "colors must be a list"); - return NULL; - } - n_colors = PyList_Size(pycolors); - colors = g_new0(guint32, n_colors); - for (i = 0; i < n_colors; i++) - colors[i] = PyInt_AsLong(PyList_GetItem(pycolors, i)); - cmap = gdk_rgb_cmap_new(colors, n_colors); - gdk_draw_indexed_image(GDK_DRAWABLE(self->obj), GDK_GC(gc->obj), x, y, - width, height, dith, buf, rowstride, - cmap); - gdk_rgb_cmap_free(cmap); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_draw_layout kwargs -static PyObject * -_wrap_gdk_draw_layout(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "gc", "x", "y", "layout", "foreground", - "background", NULL }; - PyGObject *gc, *layout; - int x, y; - GdkColor *foreground = NULL, *background = NULL; - PyObject *py_foreground = Py_None, *py_background = Py_None; - - if (!PyArg_ParseTupleAndKeywords( - args, kwargs, "O!iiO!|OO:GdkDrawable.draw_layout", - kwlist, &PyGdkGC_Type, &gc, &x, &y, &PyPangoLayout_Type, &layout, - &py_foreground, &py_background)) - return NULL; - if (pyg_boxed_check(py_foreground, GDK_TYPE_COLOR)) - foreground = pyg_boxed_get(py_foreground, GdkColor); - else if (py_foreground != Py_None) { - PyErr_SetString(PyExc_TypeError, - "foreground should be a GdkColor or None"); - return NULL; - } - if (pyg_boxed_check(py_background, GDK_TYPE_COLOR)) - background = pyg_boxed_get(py_background, GdkColor); - else if (py_background != Py_None) { - PyErr_SetString(PyExc_TypeError, - "background should be a GdkColor or None"); - return NULL; - } - gdk_draw_layout_with_colors(GDK_DRAWABLE(self->obj), GDK_GC(gc->obj), x, y, - PANGO_LAYOUT(layout->obj), foreground, - background); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_draw_layout_line kwargs -static PyObject * -_wrap_gdk_draw_layout_line(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "gc", "x", "y", "line", "foreground", - "background", NULL }; - PyGObject *gc, *py_line; - int x, y; - GdkColor *foreground = NULL, *background = NULL; - PyObject *py_foreground = Py_None, *py_background = Py_None; - PangoLayoutLine *line; - - if (!PyArg_ParseTupleAndKeywords( - args, kwargs, "O!iiO|OO:GdkDrawable.draw_layout_line", - kwlist, &PyGdkGC_Type, &gc, &x, &y, &py_line, - &py_foreground, &py_background)) - return NULL; - if (pyg_boxed_check(py_line, PANGO_TYPE_LAYOUT_LINE)) - line = pyg_boxed_get(py_line, PangoLayoutLine); - else { - PyErr_SetString(PyExc_TypeError, "line should be a PangoLayoutLine"); - return NULL; - } - if (pyg_boxed_check(py_foreground, GDK_TYPE_COLOR)) - foreground = pyg_boxed_get(py_foreground, GdkColor); - else if (py_foreground != Py_None) { - PyErr_SetString(PyExc_TypeError, - "foreground should be a GdkColor or None"); - return NULL; - } - if (pyg_boxed_check(py_background, GDK_TYPE_COLOR)) - background = pyg_boxed_get(py_background, GdkColor); - else if (py_background != Py_None) { - PyErr_SetString(PyExc_TypeError, - "background should be a GdkColor or None"); - return NULL; - } - gdk_draw_layout_line_with_colors(GDK_DRAWABLE(self->obj), GDK_GC(gc->obj), - x, y, line, foreground, background); - Py_INCREF(Py_None); - return Py_None; -} diff --git a/gtk/gdkevent.override b/gtk/gdkevent.override deleted file mode 100644 index 6f18ca0a..00000000 --- a/gtk/gdkevent.override +++ /dev/null @@ -1,909 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * gdkevent.override: gtk.gdk.Event overrides - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -override-slot GdkEvent.tp_setattr -#define INT_CHECK() \ - if (!PyInt_Check(value)) { \ - PyErr_Format(PyExc_TypeError, "%s must be an int", attr); \ - return -1; \ - } -#define FLOAT_CHECK() \ - if (!PyFloat_Check(value)) { \ - PyErr_Format(PyExc_TypeError, "%s must be a float", attr); \ - return -1; \ - } -#define STRING_CHECK() \ - if (!PyString_Check(value)) { \ - PyErr_Format(PyExc_TypeError, "%s must be a string", attr); \ - return -1; \ - } -static int -_wrap_gdk_event_tp_setattr(PyObject *self, char *attr, PyObject *value) -{ - GdkEvent *event; - - if (value == NULL) { - PyErr_SetString(PyExc_TypeError, "can't delete attributes"); - return -1; - } - - event = pyg_boxed_get(self, GdkEvent); - - /* Common members */ - if (attr[0] == 't' && !strcmp(attr, "type")) { - PyErr_SetString(PyExc_AttributeError, "type is not writable"); - return -1; - } else if (attr[0] == 'w' && !strcmp(attr, "window")) { - if (!pygobject_check(value, &PyGdkWindow_Type)) { - PyErr_SetString(PyExc_TypeError, "window must be a GdkWindow"); - return -1; - } - if (event->any.window) - g_object_unref(event->any.window); - event->any.window = g_object_ref(GDK_WINDOW(((PyGObject*)value)->obj)); - return 0; - } else if (attr[0] == 's' && !strcmp(attr, "send_event")) { - INT_CHECK(); - event->any.send_event = PyInt_AsLong(value); - return 0; - } - - switch(event->type) { - case GDK_NOTHING: break; - case GDK_DELETE: break; - case GDK_DESTROY: break; - case GDK_EXPOSE: /*GdkEventExpose expose*/ - if (!strcmp(attr, "area")) { - if (!pygdk_rectangle_from_pyobject(value, &event->expose.area)) - return -1; - return 0; - } else if (!strcmp(attr, "count")) { - INT_CHECK(); - event->expose.count = PyInt_AsLong(value); - return 0; - } - break; - case GDK_MOTION_NOTIFY: /*GdkEventMotion motion*/ - if (!strcmp(attr, "time")) { - INT_CHECK(); - event->motion.time = PyInt_AsLong(value); - return 0; - } else if (attr[0] == 'x' && attr[1] == '\0') { - FLOAT_CHECK(); - event->motion.x = PyFloat_AsDouble(value); - return 0; - } else if (attr[0] == 'y' && attr[1] == '\0') { - FLOAT_CHECK(); - event->motion.y = PyFloat_AsDouble(value); - return 0; - } else if (!strcmp(attr, "axes")) { - PyErr_SetString(PyExc_TypeError, "axes is not writable"); - return -1; - } else if (!strcmp(attr, "state")) { - INT_CHECK(); - event->motion.state = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "is_hint")) { - INT_CHECK(); - event->motion.is_hint = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "device")) { - PyErr_SetString(PyExc_TypeError, "device is not writable"); - return -1; - } else if (!strcmp(attr, "x_root")) { - FLOAT_CHECK() - event->motion.x_root = PyFloat_AsDouble(value); - return 0; - } else if (!strcmp(attr, "y_root")) { - FLOAT_CHECK() - event->motion.x_root = PyFloat_AsDouble(value); - return 0; - } - break; - case GDK_BUTTON_PRESS: /*GdkEventButton button*/ - case GDK_2BUTTON_PRESS: /*GdkEventButton button*/ - case GDK_3BUTTON_PRESS: /*GdkEventButton button*/ - case GDK_BUTTON_RELEASE: /*GdkEventButton button*/ - if (!strcmp(attr, "time")) { - INT_CHECK(); - event->button.time = PyInt_AsLong(value); - return 0; - } else if (attr[0] == 'x' && attr[1] == '\0') { - FLOAT_CHECK(); - event->button.x = PyFloat_AsDouble(value); - return 0; - } else if (attr[0] == 'y' && attr[1] == '\0') { - FLOAT_CHECK(); - event->button.y = PyFloat_AsDouble(value); - return 0; - } else if (!strcmp(attr, "axes")) { - PyErr_SetString(PyExc_TypeError, "axes is not writable"); - return -1; - } else if (!strcmp(attr, "state")) { - INT_CHECK(); - event->button.state = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "button")) { - INT_CHECK(); - event->button.button = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "device")) { - PyErr_SetString(PyExc_TypeError, "device is not writable"); - return -1; - } else if (!strcmp(attr, "x_root")) { - FLOAT_CHECK(); - event->button.x_root = PyFloat_AsDouble(value); - return 0; - } else if (!strcmp(attr, "y_root")) { - FLOAT_CHECK(); - event->button.x_root = PyFloat_AsDouble(value); - return 0; - } - break; - case GDK_KEY_PRESS: /*GdkEventKey key*/ - case GDK_KEY_RELEASE: /*GdkEventKey key*/ - if (!strcmp(attr, "time")) { - INT_CHECK(); - event->key.time = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "state")) { - INT_CHECK(); - event->key.state = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "keyval")) { - INT_CHECK(); - event->key.keyval = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "string")) { - STRING_CHECK(); - g_free(event->key.string); - event->key.string = g_strdup(PyString_AsString(value)); - return 0; - } else if (!strcmp(attr, "hardware_keycode")) { - INT_CHECK(); - event->key.hardware_keycode = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "group")) { - INT_CHECK(); - event->key.group = PyInt_AsLong(value); - return 0; - } - break; - case GDK_ENTER_NOTIFY: /*GdkEventCrossing crossing*/ - case GDK_LEAVE_NOTIFY: /*GdkEventCrossing crossing*/ - if (!strcmp(attr, "subwindow")) { - if (!pygobject_check(value, &PyGdkWindow_Type)) { - PyErr_SetString(PyExc_TypeError, "subwindow must be a GdkWindow"); - return -1; - } - if (event->crossing.subwindow) - g_object_unref(event->crossing.subwindow); - event->crossing.subwindow = g_object_ref(GDK_WINDOW(((PyGObject*)value)->obj)); - return 0; - } else if (!strcmp(attr, "time")) { - INT_CHECK(); - event->crossing.time = PyInt_AsLong(value); - return 0; - } else if (attr[0] == 'x' && attr[1] == '\0') { - FLOAT_CHECK(); - event->crossing.x = PyFloat_AsDouble(value); - return 0; - } else if (attr[0] == 'y' && attr[1] == '\0') { - FLOAT_CHECK(); - event->crossing.y = PyFloat_AsDouble(value); - return 0; - } else if (!strcmp(attr, "x_root")) { - FLOAT_CHECK(); - event->crossing.x_root = PyFloat_AsDouble(value); - return 0; - } else if (!strcmp(attr, "y_root")) { - FLOAT_CHECK(); - event->crossing.x_root = PyFloat_AsDouble(value); - return 0; - } else if (!strcmp(attr, "mode")) { - INT_CHECK(); - event->crossing.mode = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "detail")) { - INT_CHECK(); - event->crossing.detail = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "focus")) { - INT_CHECK(); - event->crossing.focus = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "state")) { - INT_CHECK(); - event->crossing.state = PyInt_AsLong(value); - return 0; - } - break; - case GDK_FOCUS_CHANGE: /*GdkEventFocus focus_change*/ - if (!strcmp(attr, "in_")) { - INT_CHECK(); - event->focus_change.in = PyInt_AsLong(value); - return 0; - } - break; - case GDK_CONFIGURE: - if (!strcmp(attr, "x")) { - INT_CHECK(); - event->configure.x = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "y")) { - INT_CHECK(); - event->configure.y = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "width")) { - INT_CHECK(); - event->configure.width = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "height")) { - INT_CHECK(); - event->configure.height = PyInt_AsLong(value); - return 0; - } - case GDK_MAP: break; - case GDK_UNMAP: break; - case GDK_PROPERTY_NOTIFY: /*GdkEventProperty property*/ - if (!strcmp(attr, "atom")) { - PyErr_SetString(PyExc_TypeError, "atom is not writable"); - return -1; - } else if (!strcmp(attr, "time")) { - INT_CHECK(); - event->property.time = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "state")) { - INT_CHECK(); - event->property.state = PyInt_AsLong(value); - return 0; - } - break; - case GDK_SELECTION_CLEAR: /*GdkEventSelection selection*/ - case GDK_SELECTION_REQUEST: /*GdkEventSelection selection*/ - case GDK_SELECTION_NOTIFY: /*GdkEventSelection selection*/ - if (!strcmp(attr, "selection")) { - PyErr_SetString(PyExc_TypeError, "selection is not writable"); - return -1; - } else if (!strcmp(attr, "target")) { - PyErr_SetString(PyExc_TypeError, "target is not writable"); - return -1; - } else if (!strcmp(attr, "property")) { - PyErr_SetString(PyExc_TypeError, "property is not writable"); - return -1; - } else if (!strcmp(attr, "requestor")) { - INT_CHECK(); - event->selection.requestor = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "time")) { - INT_CHECK(); - event->selection.time = PyInt_AsLong(value); - return 0; - } - - break; - case GDK_PROXIMITY_IN: /*GdkEventProximity proximity*/ - case GDK_PROXIMITY_OUT: /*GdkEventProximity proximity*/ - if (!strcmp(attr, "time")) { - INT_CHECK(); - event->proximity.time = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "device")) { - PyErr_SetString(PyExc_TypeError, "device is not writable"); - return -1; - } - break; - case GDK_DRAG_ENTER: /*GdkEventDND dnd*/ - case GDK_DRAG_LEAVE: /*GdkEventDND dnd*/ - case GDK_DRAG_MOTION: /*GdkEventDND dnd*/ - case GDK_DRAG_STATUS: /*GdkEventDND dnd*/ - case GDK_DROP_START: /*GdkEventDND dnd*/ - case GDK_DROP_FINISHED: /*GdkEventDND dnd*/ - if (!strcmp(attr, "context")) { - PyErr_SetString(PyExc_TypeError, "context is not writable"); - return -1; - } else if (!strcmp(attr, "time")) { - INT_CHECK(); - event->dnd.time = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "x_root")) { - FLOAT_CHECK(); - event->dnd.x_root = PyFloat_AsDouble(value); - return 0; - } else if (!strcmp(attr, "y_root")) { - FLOAT_CHECK(); - event->dnd.x_root = PyFloat_AsDouble(value); - return 0; - } - break; - case GDK_CLIENT_EVENT: /*GdkEventClient client*/ - if (!strcmp(attr, "message_type")) { - GdkAtom message_type = pygdk_atom_from_pyobject(value); - if (PyErr_Occurred()) - return -1; - event->client.message_type = message_type; - return 0; - } else if (!strcmp(attr, "data_format")) { - INT_CHECK(); - event->client.data_format = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "data")) { - char *tmp; - STRING_CHECK(); - tmp = PyString_AsString(value); - strncpy(event->client.data.b, tmp, 20); - return 0; - } - break; - case GDK_VISIBILITY_NOTIFY: /*GdkEventVisibility visibility*/ - if (!strcmp(attr, "state")) { - INT_CHECK(); - event->visibility.state = PyInt_AsLong(value); - return 0; - } - break; - case GDK_NO_EXPOSE: /*GdkEventNoExpose no_expose*/ - break; - case GDK_SCROLL: /*GdkEventScroll scroll*/ - if (!strcmp(attr, "time")) { - INT_CHECK(); - event->scroll.time = PyInt_AsLong(value); - return 0; - } else if (attr[0] == 'x' && attr[1] == '\0') { - FLOAT_CHECK(); - event->scroll.x = PyFloat_AsDouble(value); - return 0; - } else if (attr[0] == 'y' && attr[1] == '\0') { - FLOAT_CHECK(); - event->scroll.y = PyFloat_AsDouble(value); - return 0; - } else if (!strcmp(attr, "state")) { - INT_CHECK(); - event->scroll.state = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "direction")) { - INT_CHECK(); /* XXX: ENUM */ - event->scroll.direction = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "device")) { - PyErr_SetString(PyExc_TypeError, "device is not writable"); - return -1; - } else if (!strcmp(attr, "x_root")) { - FLOAT_CHECK(); - event->scroll.x_root = PyFloat_AsDouble(value); - return 0; - } else if (!strcmp(attr, "y_root")) { - FLOAT_CHECK(); - event->scroll.x_root = PyFloat_AsDouble(value); - return 0; - } - break; - case GDK_WINDOW_STATE: /*GdkEventWindowState window_state*/ - if (!strcmp(attr, "changed_mask")) { - INT_CHECK(); - event->window_state.changed_mask = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "new_window_state")) { - INT_CHECK(); - event->window_state.new_window_state = PyInt_AsLong(value); - return 0; - } - break; - case GDK_SETTING: /*GdkEventSetting setting*/ - if (!strcmp(attr, "action")) { - INT_CHECK(); - event->setting.action = PyInt_AsLong(value); - return 0; - } else if (!strcmp(attr, "name")) { - STRING_CHECK(); - event->setting.name = PyString_AsString(value); - return 0; - } - break; - case GDK_OWNER_CHANGE: - if (!strcmp(attr, "owner")) { - INT_CHECK(); - event->owner_change.owner = PyInt_AsLong(value); - } else if (!strcmp(attr, "reason")) { - INT_CHECK(); - event->owner_change.reason = PyInt_AsLong(value); - } else if (!strcmp(attr, "selection")) { - PyErr_SetString(PyExc_TypeError, "selection is not writable"); - return -1; - } else if (!strcmp(attr, "time")) { - INT_CHECK(); - event->owner_change.time = PyInt_AsLong(value); - } else if (!strcmp(attr, "selection_time")) { - INT_CHECK(); - event->owner_change.selection_time = PyInt_AsLong(value); - } - break; - case GDK_GRAB_BROKEN: - if (!strcmp(attr, "keyboard")) { - INT_CHECK(); - event->grab_broken.keyboard = PyInt_AsLong(value); - } else if (!strcmp(attr, "implicit")) { - INT_CHECK(); - event->grab_broken.keyboard = PyInt_AsLong(value); - } else if (!strcmp(attr, "grab_window")) { - PyErr_SetString(PyExc_TypeError, "grab_window is not writable"); - return -1; - } - break; - default: - break; - } - - PyErr_SetString(PyExc_AttributeError, "could not write attribute"); - return -1; -} -#undef INT_CHECK -#undef FLOAT_CHECK -#undef STRING_CHECK -%% -override-slot GdkEvent.tp_getattr -static PyObject * -_wrap_gdk_event_tp_getattr(PyObject *self, char *attr) -{ - GdkEvent *event = pyg_boxed_get(self, GdkEvent); - guint i; - gchar *name; - PyObject *ret; - - switch(event->type) { - case GDK_NOTHING: break; - case GDK_DELETE: break; - case GDK_DESTROY: break; - case GDK_EXPOSE: /*GdkEventExpose expose*/ - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[sssss]", - "type", "window", "send_event", - "area", "count"); - if (!strcmp(attr, "area")) - return pyg_boxed_new(GDK_TYPE_RECTANGLE, &event->expose.area, - TRUE, TRUE); - if (!strcmp(attr, "count")) - return PyInt_FromLong(event->expose.count); - break; - case GDK_MOTION_NOTIFY: /*GdkEventMotion motion*/ - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[ssssssssssss]", - "type", "window", "send_event", - "time", "x", "y", "axes", "state", - "is_hint", "device", "x_root", "y_root"); - if (!strcmp(attr, "time")) - return PyInt_FromLong(event->motion.time); - if (!strcmp(attr, "x")) - return PyFloat_FromDouble(event->motion.x); - if (!strcmp(attr, "y")) - return PyFloat_FromDouble(event->motion.y); - if (!strcmp(attr, "axes")) { - if (event->motion.axes) { - PyObject *v = PyTuple_New(event->motion.device->num_axes); - if (!v) return NULL; - for (i = 0; i < event->motion.device->num_axes; i++) - PyTuple_SetItem(v, i,PyFloat_FromDouble( - event->motion.axes[i])); - return v; - } else { - Py_INCREF(Py_None); - return Py_None; - } - } - if (!strcmp(attr, "state")) - return pyg_flags_from_gtype(GDK_TYPE_MODIFIER_TYPE, - event->motion.state); - if (!strcmp(attr, "is_hint")) - return PyInt_FromLong(event->motion.is_hint); - if (!strcmp(attr, "device")) - return pygobject_new((GObject *)event->motion.device); - if (!strcmp(attr, "x_root")) - return PyFloat_FromDouble(event->motion.x_root); - if (!strcmp(attr, "y_root")) - return PyFloat_FromDouble(event->motion.y_root); - break; - case GDK_BUTTON_PRESS: /*GdkEventButton button*/ - case GDK_2BUTTON_PRESS: /*GdkEventButton button*/ - case GDK_3BUTTON_PRESS: /*GdkEventButton button*/ - case GDK_BUTTON_RELEASE: /*GdkEventButton button*/ - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[ssssssssssss]", - "type", "window", "send_event", - "time", "x", "y", "axes", "state", - "button", "device", "x_root", "y_root"); - if (!strcmp(attr, "time")) - return PyInt_FromLong(event->button.time); - if (!strcmp(attr, "x")) - return PyFloat_FromDouble(event->button.x); - if (!strcmp(attr, "y")) - return PyFloat_FromDouble(event->button.y); - if (!strcmp(attr, "axes")) { - if (event->button.axes) { - PyObject *v = PyTuple_New(event->button.device->num_axes); - if (!v) return NULL; - for (i = 0; i < event->button.device->num_axes; i++) - PyTuple_SetItem(v, i,PyFloat_FromDouble( - event->button.axes[i])); - return v; - } else { - Py_INCREF(Py_None); - return Py_None; - } - } - if (!strcmp(attr, "state")) - return pyg_flags_from_gtype(GDK_TYPE_MODIFIER_TYPE, - event->button.state); - if (!strcmp(attr, "button")) - return PyInt_FromLong(event->button.button); - if (!strcmp(attr, "device")) - return pygobject_new((GObject *)event->button.device); - if (!strcmp(attr, "x_root")) - return PyFloat_FromDouble(event->button.x_root); - if (!strcmp(attr, "y_root")) - return PyFloat_FromDouble(event->button.y_root); - break; - case GDK_KEY_PRESS: /*GdkEventKey key*/ - case GDK_KEY_RELEASE: /*GdkEventKey key*/ - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[sssssssss]", - "type", "window", "send_event", - "time", "state", "keyval", "string", - "hardware_keycode", "group"); - if (!strcmp(attr, "time")) - return PyInt_FromLong(event->key.time); - if (!strcmp(attr, "state")) - return pyg_flags_from_gtype(GDK_TYPE_MODIFIER_TYPE, - event->key.state); - if (!strcmp(attr, "keyval")) - return PyInt_FromLong(event->key.keyval); - if (!strcmp(attr, "string")) - return PyString_FromStringAndSize(event->key.string, - event->key.length); - if (!strcmp(attr, "hardware_keycode")) - return PyInt_FromLong(event->key.hardware_keycode); - if (!strcmp(attr, "group")) - return PyInt_FromLong(event->key.group); - break; - case GDK_ENTER_NOTIFY: /*GdkEventCrossing crossing*/ - case GDK_LEAVE_NOTIFY: /*GdkEventCrossing crossing*/ - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[sssssssssssss]", - "type", "window", "send_event", - "subwindow", "time", "x", "y", - "x_root", "y_root", "mode", "detail", - "focus", "state"); - if (!strcmp(attr, "subwindow")) - return pygobject_new((GObject *)event->crossing.subwindow); - if (!strcmp(attr, "time")) - return PyInt_FromLong(event->crossing.time); - if (!strcmp(attr, "x")) - return PyFloat_FromDouble(event->crossing.x); - if (!strcmp(attr, "y")) - return PyFloat_FromDouble(event->crossing.y); - if (!strcmp(attr, "x_root")) - return PyFloat_FromDouble(event->crossing.x_root); - if (!strcmp(attr, "y_root")) - return PyFloat_FromDouble(event->crossing.y_root); - if (!strcmp(attr, "mode")) - return pyg_enum_from_gtype(GDK_TYPE_CROSSING_MODE, - event->crossing.mode); - if (!strcmp(attr, "detail")) - return pyg_enum_from_gtype(GDK_TYPE_NOTIFY_TYPE, - event->crossing.detail); - if (!strcmp(attr, "focus")) - return PyInt_FromLong(event->crossing.focus); - if (!strcmp(attr, "state")) - return pyg_flags_from_gtype(GDK_TYPE_MODIFIER_TYPE, - event->crossing.state); - break; - case GDK_FOCUS_CHANGE: /*GdkEventFocus focus_change*/ - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[ssss]", - "type", "window", "send_event", - "in_"); - if (!strcmp(attr, "in_")) - return PyInt_FromLong(event->focus_change.in); - break; - case GDK_CONFIGURE: /*GdkEventConfigure configure*/ - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[sssssss]", - "type", "window", "send_event", - "x", "y", "width", "height"); - if (!strcmp(attr, "x")) - return PyInt_FromLong(event->configure.x); - if (!strcmp(attr, "y")) - return PyInt_FromLong(event->configure.y); - if (!strcmp(attr, "width")) - return PyInt_FromLong(event->configure.width); - if (!strcmp(attr, "height")) - return PyInt_FromLong(event->configure.height); - break; - case GDK_MAP: break; - case GDK_UNMAP: break; - case GDK_PROPERTY_NOTIFY: /*GdkEventProperty property*/ - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[ssssss]", - "type", "window", "send_event", - "atom", "time", "state"); - if (!strcmp(attr, "atom")) { - name = gdk_atom_name(event->property.atom); - ret = PyString_FromString(name); - g_free(name); - return ret; - } - if (!strcmp(attr, "time")) - return PyInt_FromLong(event->property.time); - if (!strcmp(attr, "state")) - return pyg_enum_from_gtype(GDK_TYPE_PROPERTY_STATE, event->property.state); - break; - case GDK_SELECTION_CLEAR: /*GdkEventSelection selection*/ - case GDK_SELECTION_REQUEST: /*GdkEventSelection selection*/ - case GDK_SELECTION_NOTIFY: /*GdkEventSelection selection*/ - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[ssssssss]", - "type", "window", "send_event", - "selection", "target", "property", - "requestor", "time"); - if (!strcmp(attr, "selection")) { - name = gdk_atom_name(event->selection.selection); - ret = PyString_FromString(name); - g_free(name); - return ret; - } - if (!strcmp(attr, "target")) { - name = gdk_atom_name(event->selection.target); - ret = PyString_FromString(name); - g_free(name); - return ret; - } - if (!strcmp(attr, "property")) { - name = gdk_atom_name(event->selection.property); - ret = PyString_FromString(name); - g_free(name); - return ret; - } - if (!strcmp(attr, "requestor")) - return PyInt_FromLong(event->selection.requestor); - if (!strcmp(attr, "time")) - return PyInt_FromLong(event->selection.time); - break; - case GDK_PROXIMITY_IN: /*GdkEventProximity proximity*/ - case GDK_PROXIMITY_OUT: /*GdkEventProximity proximity*/ - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[sssss]", - "type", "window", "send_event", - "time", "device"); - if (!strcmp(attr, "time")) - return PyInt_FromLong(event->proximity.time); - if (!strcmp(attr, "device")) - return pygobject_new((GObject *)event->proximity.device); - break; - case GDK_DRAG_ENTER: /*GdkEventDND dnd*/ - case GDK_DRAG_LEAVE: /*GdkEventDND dnd*/ - case GDK_DRAG_MOTION: /*GdkEventDND dnd*/ - case GDK_DRAG_STATUS: /*GdkEventDND dnd*/ - case GDK_DROP_START: /*GdkEventDND dnd*/ - case GDK_DROP_FINISHED: /*GdkEventDND dnd*/ - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[sssssss]", - "type", "window", "send_event", - "context", "time", "x_root", "y_root"); - if (!strcmp(attr, "context")) - return pygobject_new((GObject *)event->dnd.context); - if (!strcmp(attr, "time")) - return PyInt_FromLong(event->dnd.time); - if (!strcmp(attr, "x_root")) - return PyFloat_FromDouble(event->dnd.x_root); - if (!strcmp(attr, "y_root")) - return PyFloat_FromDouble(event->dnd.y_root); - break; - case GDK_CLIENT_EVENT: /*GdkEventClient client*/ - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[ssssss]", - "type", "window", "send_event", - "message_type", "data_format", "data"); - if (!strcmp(attr, "message_type")) { - name = gdk_atom_name(event->client.message_type); - ret = PyString_FromString(name); - g_free(name); - return ret; - } - if (!strcmp(attr, "data_format")) - return PyInt_FromLong(event->client.data_format); - if (!strcmp(attr, "data")) - return PyString_FromStringAndSize(event->client.data.b, 20); - break; - case GDK_VISIBILITY_NOTIFY: /*GdkEventVisibility visibility*/ - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[ssss]", - "type", "window", "send_event", - "state"); - if (!strcmp(attr, "state")) - return pyg_enum_from_gtype(GDK_TYPE_VISIBILITY_STATE, event->visibility.state); - break; - case GDK_NO_EXPOSE: /*GdkEventNoExpose no_expose*/ - break; - case GDK_SCROLL: /*GdkEventScroll scroll*/ - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[sssssssssss]", - "type", "window", "send_event", - "time", "x", "y", "state", "direction", - "device", "x_root", "y_root"); - if (!strcmp(attr, "time")) - return PyInt_FromLong(event->scroll.time); - if (!strcmp(attr, "x")) - return PyFloat_FromDouble(event->scroll.x); - if (!strcmp(attr, "y")) - return PyFloat_FromDouble(event->scroll.y); - if (!strcmp(attr, "state")) - return pyg_flags_from_gtype(GDK_TYPE_MODIFIER_TYPE, - event->scroll.state); - if (!strcmp(attr, "direction")) - return pyg_enum_from_gtype(GDK_TYPE_SCROLL_DIRECTION, event->scroll.direction); - if (!strcmp(attr, "device")) - return pygobject_new((GObject *)event->scroll.device); - if (!strcmp(attr, "x_root")) - return PyFloat_FromDouble(event->scroll.x_root); - if (!strcmp(attr, "y_root")) - return PyFloat_FromDouble(event->scroll.y_root); - break; - case GDK_WINDOW_STATE: /*GdkEventWindowState window_state*/ - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[sssss]", - "type", "window", "send_event", - "changed_mask", "new_window_state"); - if (!strcmp(attr, "changed_mask")) - return pyg_flags_from_gtype(GDK_TYPE_WINDOW_STATE, - event->window_state.changed_mask); - if (!strcmp(attr, "new_window_state")) - return pyg_flags_from_gtype(GDK_TYPE_WINDOW_STATE, - event->window_state.new_window_state); - break; - case GDK_SETTING: /*GdkEventSetting setting*/ - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[sssss]", - "type", "window", "send_event", - "action", "name"); - if (!strcmp(attr, "action")) - return pyg_enum_from_gtype(GDK_TYPE_SETTING_ACTION, event->setting.action); - if (!strcmp(attr, "name")) - return PyString_FromString(event->setting.name); - break; - /* New in 2.8 */ - case GDK_OWNER_CHANGE: - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[ssssssss]", - "type", "window", "send_event", "owner", - "reason", "selection", "time", - "selection_time"); - if (!strcmp(attr, "owner")) - return PyInt_FromLong(event->owner_change.owner); - if (!strcmp(attr, "reason")) - return pyg_enum_from_gtype(GDK_TYPE_OWNER_CHANGE, - event->owner_change.reason); - if (!strcmp(attr, "selection")) { - name = gdk_atom_name(event->owner_change.selection); - ret = PyString_FromString(name); - g_free(name); - return ret; - } - if (!strcmp(attr, "time")) - return PyInt_FromLong(event->owner_change.time); - if (!strcmp(attr, "selection_time")) - return PyInt_FromLong(event->owner_change.selection_time); - break; - case GDK_GRAB_BROKEN: - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[ssssss]", - "type", "window", "send_event", - "keyboard", "implicit", - "grab_window"); - if (!strcmp(attr, "keyboard")) - return PyBool_FromLong(event->grab_broken.keyboard); - if (!strcmp(attr, "implicit")) - return PyBool_FromLong(event->grab_broken.implicit); - if (!strcmp(attr, "grab_window")) - return pygobject_new((GObject *)event->grab_broken.grab_window); - break; - - default: - break; - } - - if (!strcmp(attr, "type")) - return pyg_enum_from_gtype(GDK_TYPE_EVENT_TYPE, event->type); - if (!strcmp(attr, "window")) - return pygobject_new((GObject *)event->any.window); - if (!strcmp(attr, "send_event")) - return PyInt_FromLong(event->any.send_event); - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[sss]", "type", "window", "send_event"); - - return Py_FindMethod((PyMethodDef*)_PyGdkEvent_methods, self, attr); -} -%% -override gdk_event_get_axis args -static PyObject * -_wrap_gdk_event_get_axis(PyGObject *self, PyObject *args) -{ - GdkEvent *event = pyg_boxed_get(self, GdkEvent); - gint axis_use; - gdouble value; - - if (!PyArg_ParseTuple(args, "i:gdk.event_get_axis", - &axis_use)) - return NULL; - - if (gdk_event_get_axis(event, axis_use, &value)) { - return PyFloat_FromDouble(value); - } else { - Py_INCREF(Py_None); - return Py_None; - } -} -%% -override gdk_event_get_coords noargs -static PyObject * -_wrap_gdk_event_get_coords(PyGObject *self) -{ - GdkEvent *event = pyg_boxed_get(self, GdkEvent); - gdouble x, y; - - if (gdk_event_get_coords(event, &x, &y)) - return Py_BuildValue("(dd)", x, y); - else - return Py_BuildValue("()"); -} -%% -override gdk_event_get_root_coords noargs -static PyObject * -_wrap_gdk_event_get_root_coords(PyGObject *self) -{ - GdkEvent *event = pyg_boxed_get(self, GdkEvent); - gdouble x, y; - - if (gdk_event_get_root_coords(event, &x, &y)) - return Py_BuildValue("(dd)", x, y); - else - return Py_BuildValue("()"); -} -%% -override gdk_event_get_state noargs -static PyObject * -_wrap_gdk_event_get_state(PyGObject *self) -{ - GdkEvent *event = pyg_boxed_get(self, GdkEvent); - GdkModifierType state = 0; - - gdk_event_get_state(event, &state); - return pyg_flags_from_gtype(GDK_TYPE_MODIFIER_TYPE, state); -} -%% -override gdk_event_free noargs -static PyObject * -_wrap_gdk_event_free(PyObject *self) -{ - if (PyErr_Warn(PyExc_DeprecationWarning, "gtk.gdk.Event.free should not be used") < 0) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} diff --git a/gtk/gdkgc.override b/gtk/gdkgc.override deleted file mode 100644 index dd23f431..00000000 --- a/gtk/gdkgc.override +++ /dev/null @@ -1,625 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * gdkgc.override: gtk.gdk.GC override - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -override gdk_gc_new kwargs -static int -_wrap_gdk_gc_new(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "drawable", "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", NULL }; - PyGObject *drawable; - PyObject *foreground = Py_None, *background = Py_None; - PyObject *font = Py_None; - PyObject *tile = Py_None, *stipple = Py_None, *clip_mask = Py_None; - gint function = -1, fill = -1; - gint subwindow_mode = -1, ts_x_origin = -1, ts_y_origin = -1; - gint clip_x_origin = -1, clip_y_origin = -1, graphics_exposures = -1; - gint line_width = -1, line_style = -1, cap_style = -1, join_style = -1; - GdkGCValues values; - GdkGCValuesMask mask = 0; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!|OOOiiOOOiiiiiiiiii:GdkGC.__init__", - kwlist, &PyGdkDrawable_Type, &drawable, - &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)) - return -1; - if (pyg_boxed_check(foreground, GDK_TYPE_COLOR)) { - mask |= GDK_GC_FOREGROUND; - values.foreground = *pyg_boxed_get(foreground, GdkColor); - } else if (foreground != Py_None) { - PyErr_SetString(PyExc_TypeError, "foreground must be a GdkColor"); - return -1; - } - if (pyg_boxed_check(background, GDK_TYPE_COLOR)) { - mask |= GDK_GC_BACKGROUND; - values.background = *pyg_boxed_get(background, GdkColor); - } else if (background != Py_None) { - PyErr_SetString(PyExc_TypeError, "background must be a GdkColor"); - return -1; - } - if (pyg_boxed_check(font, GDK_TYPE_FONT)) { - mask |= GDK_GC_FONT; - values.font = pyg_boxed_get(font, GdkFont); - } else if (font != Py_None) { - PyErr_SetString(PyExc_TypeError, "font must be a GdkFont"); - return -1; - } - if (function != -1) { - mask |= GDK_GC_FUNCTION; - values.function = function; - } - if (fill != -1) { - mask |= GDK_GC_FILL; - values.fill = fill; - } - if (pygobject_check(tile, &PyGdkPixmap_Type)) { - mask |= GDK_GC_TILE; - values.tile = GDK_PIXMAP(pygobject_get(tile)); - } else if (tile != Py_None) { - PyErr_SetString(PyExc_TypeError, "tile must be a GdkPixmap"); - return -1; - } - if (pygobject_check(stipple, &PyGdkPixmap_Type)) { - mask |= GDK_GC_STIPPLE; - values.stipple = GDK_PIXMAP(pygobject_get(stipple)); - } else if (stipple != Py_None) { - PyErr_SetString(PyExc_TypeError, "stipple must be a GdkPixmap"); - return -1; - } - if (pygobject_check(clip_mask, &PyGdkPixmap_Type)) { - mask |= GDK_GC_CLIP_MASK; - values.clip_mask = GDK_PIXMAP(pygobject_get(clip_mask)); - } else if (clip_mask != Py_None) { - PyErr_SetString(PyExc_TypeError, "clip_mask must be a GdkPixmap"); - return -1; - } - if (subwindow_mode != -1) { - mask |= GDK_GC_SUBWINDOW; - values.subwindow_mode = subwindow_mode; - } - if (ts_x_origin != -1) { - mask |= GDK_GC_TS_X_ORIGIN; - values.ts_x_origin = ts_x_origin; - } - if (ts_y_origin != -1) { - mask |= GDK_GC_TS_Y_ORIGIN; - values.ts_y_origin = ts_y_origin; - } - if (clip_x_origin != -1) { - mask |= GDK_GC_CLIP_X_ORIGIN; - values.clip_x_origin = clip_x_origin; - } - if (clip_y_origin != -1) { - mask |= GDK_GC_CLIP_Y_ORIGIN; - values.clip_y_origin = clip_y_origin; - } - if (graphics_exposures != -1) { - mask |= GDK_GC_EXPOSURES; - values.graphics_exposures = graphics_exposures; - } - if (line_width != -1) { - mask |= GDK_GC_LINE_WIDTH; - values.line_width = line_width; - } - if (line_style != -1) { - mask |= GDK_GC_LINE_STYLE; - values.line_style = line_style; - } - if (cap_style != -1) { - mask |= GDK_GC_CAP_STYLE; - values.cap_style = cap_style; - } - if (join_style != -1) { - mask |= GDK_GC_JOIN_STYLE; - values.join_style = join_style; - } - self->obj = (GObject *)gdk_gc_new_with_values(GDK_DRAWABLE(drawable->obj), - &values, mask); - - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, "could not create GdkGC object"); - return -1; - } - pygobject_register_wrapper((PyObject *)self); - return 0; -} -%% -override gdk_gc_new_with_values kwargs -static PyObject * -_wrap_gdk_gc_new_with_values(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "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", NULL }; - PyObject *foreground = Py_None, *background = Py_None; - PyObject *font = Py_None; - gint function = -1, fill = -1; - PyObject *tile = Py_None, *stipple = Py_None, *clip_mask = Py_None; - gint subwindow_mode = -1, ts_x_origin = -1, ts_y_origin = -1; - gint clip_x_origin = -1, clip_y_origin = -1, graphics_exposures = -1; - gint line_width = -1, line_style = -1, cap_style = -1, join_style = -1; - GdkGCValues values; - GdkGCValuesMask mask = 0; - GdkGC *gc; - PyObject *pygc; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|OOOiiOOOiiiiiiiiii:GdkDrawable.new_gc", - kwlist, &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)) - return NULL; - if (pyg_boxed_check(foreground, GDK_TYPE_COLOR)) { - mask |= GDK_GC_FOREGROUND; - values.foreground = *pyg_boxed_get(foreground, GdkColor); - } else if (foreground != Py_None) { - PyErr_SetString(PyExc_TypeError, "foreground must be a GdkColor"); - return NULL; - } - if (pyg_boxed_check(background, GDK_TYPE_COLOR)) { - mask |= GDK_GC_BACKGROUND; - values.background = *pyg_boxed_get(background, GdkColor); - } else if (background != Py_None) { - PyErr_SetString(PyExc_TypeError, "background must be a GdkColor"); - return NULL; - } - if (pyg_boxed_check(font, GDK_TYPE_FONT)) { - mask |= GDK_GC_FONT; - values.font = pyg_boxed_get(font, GdkFont); - } else if (font != Py_None) { - PyErr_SetString(PyExc_TypeError, "font must be a GdkFont"); - return NULL; - } - if (function != -1) { - mask |= GDK_GC_FUNCTION; - values.function = function; - } - if (fill != -1) { - mask |= GDK_GC_FILL; - values.fill = fill; - } - if (pygobject_check(tile, &PyGdkPixmap_Type)) { - mask |= GDK_GC_TILE; - values.tile = GDK_PIXMAP(pygobject_get(tile)); - } else if (tile != Py_None) { - PyErr_SetString(PyExc_TypeError, "tile must be a GdkPixmap"); - return NULL; - } - if (pygobject_check(stipple, &PyGdkPixmap_Type)) { - mask |= GDK_GC_STIPPLE; - values.stipple = GDK_PIXMAP(pygobject_get(stipple)); - } else if (stipple != Py_None) { - PyErr_SetString(PyExc_TypeError, "stipple must be a GdkPixmap"); - return NULL; - } - if (pygobject_check(clip_mask, &PyGdkPixmap_Type)) { - mask |= GDK_GC_CLIP_MASK; - values.clip_mask = GDK_PIXMAP(pygobject_get(clip_mask)); - } else if (clip_mask != Py_None) { - PyErr_SetString(PyExc_TypeError, "clip_mask must be a GdkPixmap"); - return NULL; - } - if (subwindow_mode != -1) { - mask |= GDK_GC_SUBWINDOW; - values.subwindow_mode = subwindow_mode; - } - if (ts_x_origin != -1) { - mask |= GDK_GC_TS_X_ORIGIN; - values.ts_x_origin = ts_x_origin; - } - if (ts_y_origin != -1) { - mask |= GDK_GC_TS_Y_ORIGIN; - values.ts_y_origin = ts_y_origin; - } - if (clip_x_origin != -1) { - mask |= GDK_GC_CLIP_X_ORIGIN; - values.clip_x_origin = clip_x_origin; - } - if (clip_y_origin != -1) { - mask |= GDK_GC_CLIP_Y_ORIGIN; - values.clip_y_origin = clip_y_origin; - } - if (graphics_exposures != -1) { - mask |= GDK_GC_EXPOSURES; - values.graphics_exposures = graphics_exposures; - } - if (line_width != -1) { - mask |= GDK_GC_LINE_WIDTH; - values.line_width = line_width; - } - if (line_style != -1) { - mask |= GDK_GC_LINE_STYLE; - values.line_style = line_style; - } - if (cap_style != -1) { - mask |= GDK_GC_CAP_STYLE; - values.cap_style = cap_style; - } - if (join_style != -1) { - mask |= GDK_GC_JOIN_STYLE; - values.join_style = join_style; - } - gc = gdk_gc_new_with_values(GDK_DRAWABLE(self->obj), &values, mask); - pygc = pygobject_new((GObject *)gc); - gdk_gc_unref(gc); - return pygc; -} -%% -override gdk_gc_new2 kwargs -static PyObject * -_wrap_gdk_gc_new2(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "drawable", NULL }; - PyGObject *drawable; - GdkGC *ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:gc_new", kwlist, &PyGdkDrawable_Type, &drawable)) - return NULL; - if (PyErr_Warn(PyExc_DeprecationWarning, "use gdk.GC or drawable.new_gc") < 0) - return NULL; - ret = gdk_gc_new(GDK_DRAWABLE(drawable->obj)); - /* pygobject_new handles NULL checking */ - return pygobject_new((GObject *)ret); -} -%% -override gdk_gc_set_values kwargs -static PyObject * -_wrap_gdk_gc_set_values(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "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", NULL }; - PyObject *foreground = Py_None, *background = Py_None; - PyObject *font = Py_None; - gint function = -1, fill = -1; - PyObject *tile = Py_None, *stipple = Py_None, *clip_mask = Py_None; - gint subwindow_mode = -1, ts_x_origin = -1, ts_y_origin = -1; - gint clip_x_origin = -1, clip_y_origin = -1, graphics_exposures = -1; - gint line_width = -1, line_style = -1, cap_style = -1, join_style = -1; - GdkGCValues values; - GdkGCValuesMask mask = 0; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|OOOiiOOOiiiiiiiiii:GdkGC.set_values", - kwlist, &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)) - return NULL; - if (pyg_boxed_check(foreground, GDK_TYPE_COLOR)) { - mask |= GDK_GC_FOREGROUND; - values.foreground = *pyg_boxed_get(foreground, GdkColor); - } else if (foreground != Py_None) { - PyErr_SetString(PyExc_TypeError, "foreground must be a GdkColor"); - return NULL; - } - if (pyg_boxed_check(background, GDK_TYPE_COLOR)) { - mask |= GDK_GC_BACKGROUND; - values.background = *pyg_boxed_get(background, GdkColor); - } else if (background != Py_None) { - PyErr_SetString(PyExc_TypeError, "background must be a GdkColor"); - return NULL; - } - if (pyg_boxed_check(font, GDK_TYPE_FONT)) { - mask |= GDK_GC_FONT; - values.font = pyg_boxed_get(font, GdkFont); - } else if (font != Py_None) { - PyErr_SetString(PyExc_TypeError, "font must be a GdkFont"); - return NULL; - } - if (function != -1) { - mask |= GDK_GC_FUNCTION; - values.function = function; - } - if (fill != -1) { - mask |= GDK_GC_FILL; - values.fill = fill; - } - if (pygobject_check(tile, &PyGdkPixmap_Type)) { - mask |= GDK_GC_TILE; - values.tile = GDK_PIXMAP(pygobject_get(tile)); - } else if (tile != Py_None) { - PyErr_SetString(PyExc_TypeError, "tile must be a GdkPixmap"); - return NULL; - } - if (pygobject_check(stipple, &PyGdkPixmap_Type)) { - mask |= GDK_GC_STIPPLE; - values.stipple = GDK_PIXMAP(pygobject_get(stipple)); - } else if (stipple != Py_None) { - PyErr_SetString(PyExc_TypeError, "stipple must be a GdkPixmap"); - return NULL; - } - if (pygobject_check(clip_mask, &PyGdkPixmap_Type)) { - mask |= GDK_GC_CLIP_MASK; - values.clip_mask = GDK_PIXMAP(pygobject_get(clip_mask)); - } else if (clip_mask != Py_None) { - PyErr_SetString(PyExc_TypeError, "clip_mask must be a GdkPixmap"); - return NULL; - } - if (subwindow_mode != -1) { - mask |= GDK_GC_SUBWINDOW; - values.subwindow_mode = subwindow_mode; - } - if (ts_x_origin != -1) { - mask |= GDK_GC_TS_X_ORIGIN; - values.ts_x_origin = ts_x_origin; - } - if (ts_y_origin != -1) { - mask |= GDK_GC_TS_Y_ORIGIN; - values.ts_y_origin = ts_y_origin; - } - if (clip_x_origin != -1) { - mask |= GDK_GC_CLIP_X_ORIGIN; - values.clip_x_origin = clip_x_origin; - } - if (clip_y_origin != -1) { - mask |= GDK_GC_CLIP_Y_ORIGIN; - values.clip_y_origin = clip_y_origin; - } - if (graphics_exposures != -1) { - mask |= GDK_GC_EXPOSURES; - values.graphics_exposures = graphics_exposures; - } - if (line_width != -1) { - mask |= GDK_GC_LINE_WIDTH; - values.line_width = line_width; - } - if (line_style != -1) { - mask |= GDK_GC_LINE_STYLE; - values.line_style = line_style; - } - if (cap_style != -1) { - mask |= GDK_GC_CAP_STYLE; - values.cap_style = cap_style; - } - if (join_style != -1) { - mask |= GDK_GC_JOIN_STYLE; - values.join_style = join_style; - } - gdk_gc_set_values(GDK_GC(self->obj), &values, mask); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override-slot GdkGC.tp_getattro -static PyObject * -_wrap_gdk_gc_tp_getattro(PyGObject *self, PyObject *py_attr) -{ - GdkGCValues gc; - char *attr; - - if (PyString_Check(py_attr)) - attr = PyString_AsString(py_attr); - else - return PyObject_GenericGetAttr((PyObject *)self, py_attr); - - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[ssssssssssssssssss]", "background", "cap_style", - "clip_mask", "clip_x_origin", "clip_y_origin", - "fill", "font", "foreground", "function", - "graphics_exposures", "join_style", "line_style", - "line_width", "stipple", "sub_window", "tile", - "ts_x_origin", "ts_y_origin"); - gdk_gc_get_values(GDK_GC(self->obj), &gc); - if (!strcmp(attr, "foreground")) - return pyg_boxed_new(GDK_TYPE_COLOR, &(gc.foreground), TRUE, TRUE); - if (!strcmp(attr, "background")) - return pyg_boxed_new(GDK_TYPE_COLOR, &(gc.background), TRUE, TRUE); - if (!strcmp(attr, "font")) - return pyg_boxed_new(GDK_TYPE_FONT, gc.font, TRUE, TRUE); - if (!strcmp(attr, "function")) - return PyInt_FromLong(gc.function); - if (!strcmp(attr, "fill")) - return PyInt_FromLong(gc.fill); - if (!strcmp(attr, "tile")) - return pygobject_new((GObject *)gc.tile); - if (!strcmp(attr, "stipple")) - return pygobject_new((GObject *)gc.stipple); - if (!strcmp(attr, "clip_mask")) - return pygobject_new((GObject *)gc.clip_mask); - if (!strcmp(attr, "subwindow_mode")) - return pyg_enum_from_gtype(GDK_TYPE_SUBWINDOW_MODE, gc.subwindow_mode); - if (!strcmp(attr, "ts_x_origin")) - return PyInt_FromLong(gc.ts_x_origin); - if (!strcmp(attr, "ts_y_origin")) - return PyInt_FromLong(gc.ts_y_origin); - if (!strcmp(attr, "clip_x_origin")) - return PyInt_FromLong(gc.clip_x_origin); - if (!strcmp(attr, "clip_y_origin")) - return PyInt_FromLong(gc.clip_y_origin); - if (!strcmp(attr, "graphics_exposures")) - return PyInt_FromLong(gc.graphics_exposures); - if (!strcmp(attr, "line_width")) - return PyInt_FromLong(gc.line_width); - if (!strcmp(attr, "line_style")) - return pyg_enum_from_gtype(GDK_TYPE_LINE_STYLE, gc.line_style); - if (!strcmp(attr, "cap_style")) - return pyg_enum_from_gtype(GDK_TYPE_CAP_STYLE, gc.cap_style); - if (!strcmp(attr, "join_style")) - return pyg_enum_from_gtype(GDK_TYPE_JOIN_STYLE, gc.join_style); - - { - PyObject *name = PyString_FromString(attr); - PyObject *ret = PyObject_GenericGetAttr((PyObject *)self, name); - Py_DECREF(name); - return ret; - } -} -%% -override-slot GdkGC.tp_setattro -static int -_wrap_gdk_gc_tp_setattro(PyGObject *self, PyObject *py_attr, PyObject *value) -{ - GdkGC *gc = GDK_GC(self->obj); - char *attr; - - if (value == NULL) { - PyErr_SetString(PyExc_TypeError, "can't delete attributes"); - return -1; - } - - if (PyString_Check(py_attr)) - attr = PyString_AsString(py_attr); - else { - PyErr_SetString(PyExc_AttributeError, "could not write attribute"); - return -1; - } - - if (PyInt_Check(value)) { - int i = PyInt_AsLong(value); - GdkGCValues v; - gdk_gc_get_values(gc, &v); - if (!strcmp(attr, "function")) { - gdk_gc_set_function(gc, i); - return 0; - } else if (!strcmp(attr, "fill")) { - gdk_gc_set_fill(gc, i); - return 0; - } else if (!strcmp(attr, "subwindow_mode")) { - gdk_gc_set_subwindow(gc, i); - return 0; - } else if (!strcmp(attr, "ts_x_origin")) { - gdk_gc_set_ts_origin(gc, i, v.ts_y_origin); - return 0; - } else if (!strcmp(attr, "ts_y_origin")) { - gdk_gc_set_ts_origin(gc, v.ts_x_origin, i); - return 0; - } else if (!strcmp(attr, "clip_x_origin")) { - gdk_gc_set_clip_origin(gc, i, v.clip_y_origin); - return 0; - } else if (!strcmp(attr, "clip_y_origin")) { - gdk_gc_set_clip_origin(gc, v.clip_x_origin, i); - return 0; - } else if (!strcmp(attr, "graphics_exposures")) { - gdk_gc_set_exposures(gc, i); - return 0; - } else if (!strcmp(attr, "line_width")) { - gdk_gc_set_line_attributes(gc, i, v.line_style, - v.cap_style, v.join_style); - return 0; - } else if (!strcmp(attr, "line_style")) { - gdk_gc_set_line_attributes(gc, v.line_width, i, - v.cap_style, v.join_style); - return 0; - } else if (!strcmp(attr, "cap_style")) { - gdk_gc_set_line_attributes(gc, v.line_width, v.line_style, - i, v.join_style); - return 0; - } else if (!strcmp(attr, "join_style")) { - gdk_gc_set_line_attributes(gc, v.line_width, v.line_style, - v.cap_style, i); - return 0; - } - } else if (pyg_boxed_check(value, GDK_TYPE_COLOR)) { - GdkColor *c = pyg_boxed_get(value, GdkColor); - if (!strcmp(attr, "foreground")) { - gdk_gc_set_foreground(gc, c); - return 0; - } else if (!strcmp(attr, "background")) { - gdk_gc_set_background(gc, c); - return 0; - } - } else if (pyg_boxed_check(value, GDK_TYPE_FONT)) { - if (!strcmp(attr, "font")) { - gdk_gc_set_font(gc, pyg_boxed_get(value, GdkFont)); - return 0; - } - } else if (pygobject_check(value, &PyGdkWindow_Type) || value == Py_None) { - PyGObject *window = (PyGObject *)value; - GdkWindow *w = (value==Py_None)?NULL:GDK_WINDOW(window->obj); - if (!strcmp(attr, "tile")) { - gdk_gc_set_tile(gc, w); - return 0; - } else if (!strcmp(attr, "stipple")) { - gdk_gc_set_stipple(gc, w); - return 0; - } else if (!strcmp(attr, "clip_mask")) { - gdk_gc_set_clip_mask(gc, w); - return 0; - } - } - - PyErr_SetString(PyExc_AttributeError, "could not write attribute"); - return -1; -} -%% -override gdk_gc_set_dashes -static PyObject * -_wrap_gdk_gc_set_dashes(PyGObject *self, PyObject *args) -{ - gint dash_offset, n, i; - PyObject *list; - gint8 *dash_list; - - if (!PyArg_ParseTuple(args, "iO:GdkGC.set_dashes", &dash_offset, &list)) - return NULL; - if (!PySequence_Check(list)) { - PyErr_SetString(PyExc_TypeError, "second argument must be a sequence"); - return NULL; - } - n = PySequence_Length(list); - dash_list = g_new(gint8, n); - for (i = 0; i < n; i++) { - PyObject *item = PySequence_GetItem(list, i); - Py_DECREF(item); - - if (!PyInt_Check(item)) { - PyErr_SetString(PyExc_TypeError, "sequence member must be an int"); - g_free(dash_list); - return NULL; - } - dash_list[i] = (gint8)PyInt_AsLong(item); - if (dash_list[i] == 0) { - PyErr_SetString(PyExc_TypeError, "sequence member must not be 0"); - g_free(dash_list); - return NULL; - } - } - gdk_gc_set_dashes(GDK_GC(self->obj), dash_offset, dash_list, n); - g_free(dash_list); - Py_INCREF(Py_None); - return Py_None; -} diff --git a/gtk/gdkpixbuf.override b/gtk/gdkpixbuf.override deleted file mode 100644 index 91323a68..00000000 --- a/gtk/gdkpixbuf.override +++ /dev/null @@ -1,767 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * gdkpixbuf.override: gtk.gdk.Pixbuf and gtk.gdk.PixbufLoader overrides - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -override gdk_pixbuf_render_pixmap_and_mask kwargs -static PyObject * -_wrap_gdk_pixbuf_render_pixmap_and_mask(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "alpha_threshold", NULL}; - int alpha_threshold = 127; - GdkPixmap *pixmap; - GdkBitmap *mask; - PyObject *pypixmap, *pymask, *ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|i:GdkPixbuf.render_pixmap_and_mask", kwlist, - &alpha_threshold)) - return NULL; - gdk_pixbuf_render_pixmap_and_mask(GDK_PIXBUF(self->obj), &pixmap, &mask, - alpha_threshold); - - if (pixmap) { - pypixmap = pygobject_new((GObject *) pixmap); - gdk_pixmap_unref(pixmap); - } else { - Py_INCREF(Py_None); - pypixmap = Py_None; - } - - if (mask) { - pymask = pygobject_new((GObject *) mask); - gdk_bitmap_unref(mask); - } else { - Py_INCREF(Py_None); - pymask = Py_None; - } - - ret = Py_BuildValue("(NN)", pypixmap, pymask); - return ret; -} -%% -override-attr GdkPixbuf.pixel_array -#ifdef HAVE_NUMPY -static int -have_numpy(void) -{ - /* Return 1 if Numeric is available, - return 0 and set and exception if it is not. */ - static int import_done = 0; - static PyObject *exc_type=NULL, *exc_value=NULL; - PyObject *exc_tb=NULL; - - if (exc_type != NULL) { - PyErr_Restore(exc_type, exc_value, NULL); - return 0; - } - if (!import_done) { - import_done = 1; - import_array(); - if (PyErr_Occurred()) { - PyErr_Fetch(&exc_type, &exc_value, &exc_tb); - Py_INCREF(exc_type); - Py_XINCREF(exc_value); - PyErr_Restore(exc_type, exc_value, exc_tb); - return 0; - } - } - return 1; -} -#endif -static PyObject * -_wrap_gdk_pixbuf__get_pixel_array(PyGObject *self, void *closure) -{ - PyErr_Warn(PyExc_DeprecationWarning, "use pixbuf.get_pixels_array() instead of the pixbuf.pixel_array attribute"); - return _wrap_gdk_pixbuf_get_pixels_array(self); -} -%% -define GdkPixbuf.get_pixels_array noargs -static PyObject * -_wrap_gdk_pixbuf_get_pixels_array(PyGObject *self) -{ - - -#ifdef HAVE_NUMPY - GdkPixbuf *pixbuf = GDK_PIXBUF(self->obj); - PyArrayObject *array; - int dims[3] = { 0, 0, 3 }; - - if (!have_numpy()) - return NULL; - - dims[0] = gdk_pixbuf_get_height(pixbuf); - dims[1] = gdk_pixbuf_get_width(pixbuf); - if (gdk_pixbuf_get_has_alpha(pixbuf)) - dims[2] = 4; - array = (PyArrayObject *)PyArray_FromDimsAndData(3, dims, PyArray_UBYTE, - (char *)gdk_pixbuf_get_pixels(pixbuf)); - if (array == NULL) - return NULL; - - array->strides[0] = gdk_pixbuf_get_rowstride(pixbuf); - /* the array holds a ref to the pixbuf pixels through this wrapper*/ - Py_INCREF(self); - array->base = (PyObject *)self; - return PyArray_Return(array); -#else - PyErr_SetString(PyExc_RuntimeError, "pygtk was not compiled with Numeric Python support"); - return NULL; -#endif -} -%% -override gdk_pixbuf_get_pixels noargs -static PyObject * -_wrap_gdk_pixbuf_get_pixels(PyGObject *self) -{ - GdkPixbuf *pixbuf; - guchar *pixels; - gint rowstride, height; - - pixbuf = GDK_PIXBUF(self->obj); - pixels = gdk_pixbuf_get_pixels(pixbuf); - rowstride = gdk_pixbuf_get_rowstride(pixbuf); - height = gdk_pixbuf_get_height(pixbuf); - - if (pixels == NULL) { - PyErr_SetString(PyExc_ValueError, "could not get pixel data"); - return NULL; - } - - return PyString_FromStringAndSize((char*)pixels, rowstride*height); -} -%% -override gdk_pixbuf_save kwargs -static PyObject * -_wrap_gdk_pixbuf_save(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = {"filename", "type", "options", NULL}; - gchar *filename, *type, **option_keys = NULL, **option_values = NULL; - PyObject *py_options = NULL; - GError *error = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "ss|O!:GdkPixbuf.save", kwlist, - &filename, &type, - &PyDict_Type, &py_options)) - return NULL; - - if (py_options != NULL) { - guint len; - Py_ssize_t pos = 0, i = 0; - PyObject *key, *value; - - len = PyDict_Size(py_options); - option_keys = g_new(gchar *, len + 1); - option_values = g_new(gchar *, len + 1); - - while (PyDict_Next(py_options, &pos, &key, &value)) { - if (!PyString_Check(key) || !PyString_Check(value)) { - g_free(option_keys); - g_free(option_values); - PyErr_SetString(PyExc_TypeError, - "keys and values must be strings"); - return NULL; - } - - option_keys[i] = PyString_AsString(key); - option_values[i] = PyString_AsString(value); - i++; - } - - option_keys[len] = NULL; - option_values[len] = NULL; - } - gdk_pixbuf_savev(GDK_PIXBUF(self->obj), filename, type, - option_keys, option_values, &error); - - g_free(option_keys); - g_free(option_values); - - if (pyg_error_check(&error)) - return NULL; - - Py_INCREF(Py_None); - return Py_None; -} - -%% -override gdk_pixbuf_save_to_callback kwargs - -typedef struct { - PyObject *callback; - PyObject *user_data; -} py_pixbuf_save_callback_data_t; - -static gboolean -pixbuf_save_func(const gchar *buf, - gsize count, - GError **error, - py_pixbuf_save_callback_data_t *data) -{ - PyObject *ret; - - if (data->user_data) - ret = PyObject_CallFunction(data->callback, "s#O", buf, (Py_ssize_t) count, data->user_data); - - else - ret = PyObject_CallFunction(data->callback, "s#", buf, (Py_ssize_t) count); - - if (ret == NULL) { - PyErr_Print(); - return FALSE; - } - Py_DECREF(ret); - return TRUE; -} - -static PyObject * -_wrap_gdk_pixbuf_save_to_callback(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = {"save_func", "type", "options", "user_data", NULL}; - gchar *type, **option_keys = NULL, **option_values = NULL; - PyObject *py_options = NULL; - GError *error = NULL; - py_pixbuf_save_callback_data_t data = { NULL, NULL }; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "Os|O!O:GdkPixbuf.save", kwlist, - &data.callback, &type, - &PyDict_Type, &py_options, &data.user_data)) - return NULL; - - if (!PyCallable_Check(data.callback)) { - PyErr_SetString(PyExc_TypeError, "first argument must be callable"); - return NULL; - } - - if (py_options != NULL) { - Py_ssize_t len; - Py_ssize_t pos = 0, i = 0; - PyObject *key, *value; - - len = PyDict_Size(py_options); - option_keys = g_new(gchar *, len + 1); - option_values = g_new(gchar *, len + 1); - - while (PyDict_Next(py_options, &pos, &key, &value)) { - if (!PyString_Check(key) || !PyString_Check(value)) { - g_free(option_keys); - g_free(option_values); - PyErr_SetString(PyExc_TypeError, - "keys and values must be strings"); - return NULL; - } - - option_keys[i] = PyString_AsString(key); - option_values[i] = PyString_AsString(value); - i++; - } - - option_keys[len] = NULL; - option_values[len] = NULL; - } - gdk_pixbuf_save_to_callbackv(GDK_PIXBUF(self->obj), - (GdkPixbufSaveFunc) pixbuf_save_func, &data, - type, option_keys, option_values, &error); - g_free(option_keys); - g_free(option_values); - - if (pyg_error_check(&error)) - return NULL; - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_pixbuf_new_from_data kwargs -static PyObject * -_wrap_gdk_pixbuf_new_from_data(PyObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "data", "colorspace", "has_alpha", - "bits_per_sample", "width", "height", - "rowstride", NULL }; - const gchar *data; - GdkColorspace colorspace; - gboolean has_alpha; - Py_ssize_t data_len; - gint bits_per_sample, width, height, rowstride; - Py_ssize_t required_len; - guchar *data_copy; - GdkPixbuf *pixbuf; - PyObject *ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s#iiiiii:pixbuf_new_from_data", kwlist, - &data, &data_len, &colorspace, - &has_alpha, &bits_per_sample, - &width, &height, &rowstride)) - return NULL; - required_len = height*rowstride; - if (data_len < required_len) { - PyErr_Format(PyExc_ValueError, - "data length (%ld) is less then required by the other parameters (%ld)", - (long int) data_len, (long int) required_len); - return NULL; - } - data_copy = g_try_malloc(required_len); - if (!data_copy) - return PyErr_NoMemory(); - memcpy(data_copy, data, required_len); - pixbuf = gdk_pixbuf_new_from_data(data_copy, colorspace, has_alpha, - bits_per_sample, width, height, - rowstride, - (GdkPixbufDestroyNotify )g_free, NULL); - ret = pygobject_new((GObject *)pixbuf); - g_object_unref(pixbuf); - return ret; -} -%% -override gdk_pixbuf_new_from_array kwargs -static PyObject * -_wrap_gdk_pixbuf_new_from_array(PyObject *self, PyObject *args, - PyObject *kwargs) -{ -#ifdef HAVE_NUMPY - static char *kwlist[] = { "array", "colorspace", "bits_per_sample", NULL }; - PyArrayObject *array; - GdkColorspace colorspace; - gint bits_per_sample ; - GdkPixbuf *pixbuf; - PyObject *ret; - gboolean has_alpha; - gint width, height; - gint i, j, nc, rs, st0, st1, st2; - guchar *src, *dst; - - if (!have_numpy()) - return NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!ii:pixbuf_new_from_array", kwlist, - &PyArray_Type, &array, &colorspace, - &bits_per_sample)) - return NULL; - if (array->descr->type_num != PyArray_CHAR - && array->descr->type_num != PyArray_UBYTE) { - PyErr_SetString(PyExc_TypeError, "array type must be 'c' or 'b'"); - return NULL; - } - if (array->nd != 3 || array->dimensions[2] < 3 || array->dimensions[2] > 4) { - PyErr_SetString(PyExc_TypeError, "array shape must be (n,m,3) or (n,m,4)"); - return NULL; - } - height = array->dimensions[0]; - width = array->dimensions[1]; - has_alpha = array->dimensions[2] == 4; - pixbuf = gdk_pixbuf_new(colorspace, has_alpha, bits_per_sample, - width, height); - src = (guchar*) array->data; - dst = gdk_pixbuf_get_pixels(pixbuf); - nc = gdk_pixbuf_get_n_channels(pixbuf); - rs = gdk_pixbuf_get_rowstride(pixbuf); - st0 = array->strides[0]; - st1 = array->strides[1]; - st2 = array->strides[2]; - if (has_alpha) { - for (j = 0; j < height; j++) { - for (i = 0; i < width; i++) { - dst[j*rs + i*4 + 0] = src[j*st0 + i*st1 + 0*st2]; - dst[j*rs + i*4 + 1] = src[j*st0 + i*st1 + 1*st2]; - dst[j*rs + i*4 + 2] = src[j*st0 + i*st1 + 2*st2]; - dst[j*rs + i*4 + 3] = src[j*st0 + i*st1 + 3*st2]; - } - } - } else { - for (j = 0; j < height; j++) { - for (i = 0; i < width; i++) { - dst[j*rs + i*3 + 0] = src[j*st0 + i*st1 + 0*st2]; - dst[j*rs + i*3 + 1] = src[j*st0 + i*st1 + 1*st2]; - dst[j*rs + i*3 + 2] = src[j*st0 + i*st1 + 2*st2]; - } - } - } - ret = pygobject_new((GObject *)pixbuf); - g_object_unref(pixbuf); - return ret; - -#else - PyErr_SetString(PyExc_RuntimeError, "pygtk was not compiled with Numeric Python support"); - return NULL; -#endif -} -%% -override gdk_pixbuf_new_from_xpm_data kwargs -static PyObject * -_wrap_gdk_pixbuf_new_from_xpm_data(PyObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "data", NULL }; - PyObject *py_data, *ret; - gchar **data; - int len, i; - GdkPixbuf *pixbuf; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!:pixbuf_new_from_xpm_data", kwlist, - &PyList_Type, &py_data)) - return NULL; - len = PyList_Size(py_data); - data = g_new(gchar *, len); - for (i = 0; i < len; i ++) { - PyObject *item = PyList_GetItem(py_data, i); - if (!PyString_Check(item)) { - PyErr_SetString(PyExc_TypeError, "data items must be strings"); - g_free(data); - return NULL; - } - data[i] = PyString_AsString(item); - } - pixbuf = gdk_pixbuf_new_from_xpm_data((const char**)data); - g_free(data); - if (pixbuf == NULL) { - PyErr_SetString(PyExc_IOError, "can't load pixbuf"); - return NULL; - } - ret = pygobject_new((GObject *)pixbuf); - g_object_unref(pixbuf); - return ret; -} -%% -override gdk_pixbuf_loader_new_with_type kwargs -static int -_wrap_gdk_pixbuf_loader_new_with_type(PyGObject *self, - PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "image_type", NULL }; - char *image_type = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|s:GdkPixbufLoader.__init__", - kwlist, &image_type)) - return -1; - - if (image_type == NULL) { - self->obj = (GObject *)gdk_pixbuf_loader_new(); - } else { - GError *error = NULL; - self->obj = (GObject *)gdk_pixbuf_loader_new_with_type(image_type, - &error); - if (pyg_error_check(&error)) - return -1; - } - - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GdkPixbufLoader object"); - return -1; - } - pygobject_register_wrapper((PyObject *)self); - return 0; -} -%% -override gdk_pixbuf_loader_write kwargs -static PyObject * -_wrap_gdk_pixbuf_loader_write(PyGObject *self, - PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "buf", "count", NULL }; - Py_ssize_t buf_len; - int count = -1, ret; - guchar *buf; - GError *error = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s#|i:GdkPixbufLoader.write", - kwlist, &buf, &buf_len, &count)) - return NULL; - - if (count < 0 || count > buf_len) { - count = buf_len; - } - - ret = gdk_pixbuf_loader_write(GDK_PIXBUF_LOADER(self->obj), - buf, count, &error); - - if (pyg_error_check(&error)) - return NULL; - - return PyBool_FromLong(ret); -} -%% -override gdk_pixbuf_animation_get_iter kwargs -static PyObject * -_wrap_gdk_pixbuf_animation_get_iter(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "start_time", NULL }; - GdkPixbufAnimationIter *ret; - double start_time = 0.0; - GTimeVal starttime, *starttimep; - PyObject *pyretval; - - if (!PyArg_ParseTupleAndKeywords( - args, kwargs, "|d:GdkPixbufAnimation.get_iter", - kwlist, &start_time)) - return NULL; - - if (start_time > 0.0) { - starttime.tv_sec = (glong) start_time; - starttime.tv_usec = (glong)((start_time - starttime.tv_sec) - * G_USEC_PER_SEC); - starttimep = &starttime; - } else if (start_time == 0.0) { - starttimep = NULL; - } else { - PyErr_SetString(PyExc_ValueError, "start_time must be >= 0.0"); - return NULL; - } - - ret = gdk_pixbuf_animation_get_iter(GDK_PIXBUF_ANIMATION(self->obj), - starttimep); - /* pygobject_new handles NULL checking */ - pyretval = pygobject_new((GObject *)ret); - if (ret) - g_object_unref(ret); - return pyretval; -} -%% -override gdk_pixbuf_animation_iter_advance kwargs -static PyObject * -_wrap_gdk_pixbuf_animation_iter_advance(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "current_time", NULL }; - gboolean ret; - double current_time = 0.0; - GTimeVal currenttime, *currenttimep; - - if (!PyArg_ParseTupleAndKeywords( - args, kwargs, "|d:GdkPixbufAnimationIter.advance", - kwlist, ¤t_time)) - return NULL; - - if (current_time > 0.0) { - currenttime.tv_sec = (glong) current_time; - currenttime.tv_usec = (glong)((current_time - currenttime.tv_sec) - * G_USEC_PER_SEC); - currenttimep = ¤ttime; - } else if (current_time == 0.0) { - currenttimep = NULL; - } else { - PyErr_SetString(PyExc_ValueError, "current_time must be >= 0.0"); - return NULL; - } - - ret = gdk_pixbuf_animation_iter_advance(GDK_PIXBUF_ANIMATION_ITER(self->obj), - currenttimep); - - return PyBool_FromLong(ret); -} -%% -override gdk_pixbuf_get_formats noargs -static PyObject * -pygtk_make_pixbuf_format_dict(GdkPixbufFormat *format) -{ - PyObject *item, *value; - gchar *sval, **aval; - gint i; - - item = PyDict_New(); - - sval = gdk_pixbuf_format_get_name(format); - value = PyString_FromString(sval); - PyDict_SetItemString(item, "name", value); - Py_DECREF(value); - g_free(sval); - - sval = gdk_pixbuf_format_get_description(format); - value = PyString_FromString(sval); - PyDict_SetItemString(item, "description", value); - Py_DECREF(value); - g_free(sval); - - aval = gdk_pixbuf_format_get_mime_types(format); - value = PyList_New(0); - for (i = 0; aval[i] != NULL; i++) { - PyObject *string_item = PyString_FromString(aval[i]); - - PyList_Append(value, string_item); - Py_DECREF(string_item); - } - PyDict_SetItemString(item, "mime_types", value); - Py_DECREF(value); - g_strfreev(aval); - - aval = gdk_pixbuf_format_get_extensions(format); - value = PyList_New(0); - for (i = 0; aval[i] != NULL; i++) { - PyObject *string_item = PyString_FromString(aval[i]); - - PyList_Append(value, string_item); - Py_DECREF(string_item); - } - PyDict_SetItemString(item, "extensions", value); - Py_DECREF(value); - g_strfreev(aval); - - PyDict_SetItemString(item, "is_writable", - PyBool_FromLong(gdk_pixbuf_format_is_writable(format))); - - return item; -} -static PyObject * -_wrap_gdk_pixbuf_get_formats(PyObject *self) -{ - GSList *list, *tmp; - PyObject *ret; - - list = gdk_pixbuf_get_formats(); - ret = PyList_New(0); - for (tmp = list; tmp != NULL; tmp = tmp->next) { - PyObject *item; - item = pygtk_make_pixbuf_format_dict((GdkPixbufFormat *)(tmp->data)); - - PyList_Append(ret, item); - Py_DECREF(item); - } - - g_slist_free(list); - - return ret; -} -%% -override gdk_pixbuf_fill kwargs -static PyObject * -_wrap_gdk_pixbuf_fill(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "pixel", NULL }; - PyObject *py_pixel = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GdkPixbuf.fill", kwlist, &py_pixel)) - return NULL; - - if (PyInt_Check(py_pixel)) - gdk_pixbuf_fill(GDK_PIXBUF(self->obj), PyInt_AsLong(py_pixel)); - else if (PyLong_Check(py_pixel)) - gdk_pixbuf_fill(GDK_PIXBUF(self->obj), PyLong_AsUnsignedLong(py_pixel)); - else { - PyErr_SetString(PyExc_TypeError, "pixel must be an int or a long"); - return NULL; - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_pixbuf_get_file_info kwargs -static PyObject * -_wrap_gdk_pixbuf_get_file_info(PyObject *self, PyObject *args, - PyObject *kwargs) -{ - PyObject *pygtk_make_pixbuf_format_dict(GdkPixbufFormat *format); - static char *kwlist[] = { "filename", NULL }; - gint width, height; - GdkPixbufFormat *format; - gchar *filename; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s:gtk.gdk.pixbuf_get_file_info", kwlist, - &filename)) - return NULL; - - format = gdk_pixbuf_get_file_info(filename, &width, &height); - - if (format) { - PyObject *py_format; - - py_format = pygtk_make_pixbuf_format_dict(format); - return Py_BuildValue("(Nii)", py_format, width, height); - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_pixbuf_loader_get_format noargs -static PyObject *pygtk_make_pixbuf_format_dict(GdkPixbufFormat *format); -static PyObject * -_wrap_gdk_pixbuf_loader_get_format(PyGObject *self) -{ - GdkPixbufFormat *format; - - format = gdk_pixbuf_loader_get_format(GDK_PIXBUF_LOADER(self->obj)); - - if (format) - return pygtk_make_pixbuf_format_dict(format); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_pixbuf_get_from_drawable2 kwargs -static PyObject * -_wrap_gdk_pixbuf_get_from_drawable2(PyObject *self, - PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "pixbuf", "src", "cmap", - "src_x", "src_y", - "dest_x", "dest_y", - "width", "height", NULL }; - PyGObject *py_pixbuf, *src, *cmap; - int src_x, src_y, dest_x, dest_y, width, height; - GdkPixbuf *pixbuf = NULL, *ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OO!O!iiiiii:pixbuf_get_from_drawable", - kwlist, - &py_pixbuf, - &PyGdkDrawable_Type, &src, - &PyGdkColormap_Type, &cmap, - &src_x, &src_y, - &dest_x, &dest_y, - &width, &height)) - return NULL; - - if (py_pixbuf && pygobject_check(py_pixbuf, &PyGdkPixbuf_Type)) - pixbuf = GDK_PIXBUF(py_pixbuf->obj); - else if ((PyObject *)py_pixbuf != Py_None) { - PyErr_SetString(PyExc_TypeError, - "pixbuf should be a GdkPixbuf or None"); - return NULL; - } - - ret = gdk_pixbuf_get_from_drawable(pixbuf, - GDK_DRAWABLE(src->obj), - GDK_COLORMAP(cmap->obj), - src_x, src_y, - dest_x, dest_y, - width, height); - - /* pygobject_new handles NULL checking */ - return pygobject_new((GObject *)ret); -} diff --git a/gtk/gdkrectangle.override b/gtk/gdkrectangle.override deleted file mode 100644 index e1a0fcf0..00000000 --- a/gtk/gdkrectangle.override +++ /dev/null @@ -1,216 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * gdkrectangle.override: gtk.gdk.Rectangle overrides - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -override gdk_rectangle_new kwargs -static int -_wrap_gdk_rectangle_new(PyGBoxed *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "x", "y", "width", "height", NULL }; - GdkRectangle rect = {0, 0, 0, 0}; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|iiii:GdkRectangle.__init__", - kwlist, &(rect.x), &(rect.y), - &(rect.width), &(rect.height))) - return -1; - - self->boxed = g_boxed_copy(GDK_TYPE_RECTANGLE, &rect); - self->free_on_dealloc = TRUE; - self->gtype = GDK_TYPE_RECTANGLE; - - return 0; -} -%% -override-slot GdkRectangle.tp_as_sequence -static Py_ssize_t -_wrap_gdk_rectangle_length(PyGBoxed *self) -{ - return 4; -} -static PyObject * -_wrap_gdk_rectangle_getitem(PyGBoxed *self, Py_ssize_t pos) -{ - GdkRectangle *rect; - - if (pos < 0) pos += 4; - if (pos < 0 || pos >= 4) { - PyErr_SetString(PyExc_IndexError, "index out of range"); - return NULL; - } - rect = pyg_boxed_get(self, GdkRectangle); - switch (pos) { - case 0: return PyInt_FromLong(rect->x); - case 1: return PyInt_FromLong(rect->y); - case 2: return PyInt_FromLong(rect->width); - case 3: return PyInt_FromLong(rect->height); - default: - g_assert_not_reached(); - return NULL; - } -} -static int -_wrap_gdk_rectangle_setitem(PyGBoxed *self, Py_ssize_t pos, PyObject *value) -{ - GdkRectangle *rect; - gint val; - - if (pos < 0) pos += 4; - if (pos < 0 || pos >= 4) { - PyErr_SetString(PyExc_IndexError, "index out of range"); - return -1; - } - rect = pyg_boxed_get(self, GdkRectangle); - val = PyInt_AsLong(value); - if (PyErr_Occurred()) - return -1; - switch(pos) { - case 0: rect->x = val; break; - case 1: rect->y = val; break; - case 2: rect->width = val; break; - case 3: rect->height = val; break; - default: - g_assert_not_reached(); - return -1; - } - return 0; -} -static PySequenceMethods _wrap_gdk_rectangle_tp_as_sequence = { - (lenfunc)_wrap_gdk_rectangle_length, - 0, - 0, - (ssizeargfunc)_wrap_gdk_rectangle_getitem, - 0, - (ssizeobjargproc)_wrap_gdk_rectangle_setitem, - 0, -}; -%% -override-attr GdkRectangle.x -static int -_wrap_gdk_rectangle__set_x(PyGBoxed *self, PyObject *value, void *closure) -{ - gint val; - - val = PyInt_AsLong(value); - if (PyErr_Occurred()) - return -1; - pyg_boxed_get(self, GdkRectangle)->x = val; - return 0; -} -%% -override-attr GdkRectangle.y -static int -_wrap_gdk_rectangle__set_y(PyGBoxed *self, PyObject *value, void *closure) -{ - gint val; - - val = PyInt_AsLong(value); - if (PyErr_Occurred()) - return -1; - pyg_boxed_get(self, GdkRectangle)->y = val; - return 0; -} -%% -override-attr GdkRectangle.width -static int -_wrap_gdk_rectangle__set_width(PyGBoxed *self, PyObject *value, void *closure) -{ - gint val; - - val = PyInt_AsLong(value); - if (PyErr_Occurred()) - return -1; - pyg_boxed_get(self, GdkRectangle)->width = val; - return 0; -} -%% -override-attr GdkRectangle.height -static int -_wrap_gdk_rectangle__set_height(PyGBoxed *self, PyObject *value, void *closure) -{ - gint val; - - val = PyInt_AsLong(value); - if (PyErr_Occurred()) - return -1; - pyg_boxed_get(self, GdkRectangle)->height = val; - return 0; -} -%% -override gdk_rectangle_intersect kwargs -static PyObject * -_wrap_gdk_rectangle_intersect(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "src", NULL }; - PyObject *py_src; - GdkRectangle src, dest = {0, 0, 0, 0}; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GdkRectangle.intersect", - kwlist, &py_src)) { - return NULL; - } - - if (!pyg_boxed_check(py_src, GDK_TYPE_RECTANGLE)) { - if (!pygdk_rectangle_from_pyobject(py_src, &src)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "src must be a GdkRectangle or 4-tuple"); - return NULL; - } - } else { - src = *pyg_boxed_get(py_src, GdkRectangle); - } - - gdk_rectangle_intersect(pyg_boxed_get(self, GdkRectangle), &src, &dest); - - return pyg_boxed_new(GDK_TYPE_RECTANGLE, &dest, TRUE, TRUE); -} -%% -override gdk_rectangle_union kwargs -static PyObject * -_wrap_gdk_rectangle_union(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "src", NULL }; - PyObject *py_src; - GdkRectangle src, dest; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GdkRectangle.union", - kwlist, &py_src)) { - return NULL; - } - - if (!pyg_boxed_check(py_src, GDK_TYPE_RECTANGLE)) { - if (!pygdk_rectangle_from_pyobject(py_src, &src)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "src must be a GdkRectangle or 4-tuple"); - return NULL; - } - } else { - src = *pyg_boxed_get(py_src, GdkRectangle); - } - - gdk_rectangle_union(pyg_boxed_get(self, GdkRectangle), &src, &dest); - - return pyg_boxed_new(GDK_TYPE_RECTANGLE, &dest, TRUE, TRUE); -} diff --git a/gtk/gdkwindow.override b/gtk/gdkwindow.override deleted file mode 100644 index 8544fa17..00000000 --- a/gtk/gdkwindow.override +++ /dev/null @@ -1,704 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * - * gdkwindow.override: gtk.gdk.Window overrides - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -override gdk_window_new kwargs -static int -_wrap_gdk_window_new(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "parent", "width", "height", "window_type", - "event_mask", "wclass", "title", "x", "y", - "visual", "colormap", "cursor", "wmclass_name", - "wmclass_class", "override_redirect", NULL }; - GdkWindowAttr attr = { NULL, 0, -1, -1, 0, 0, -1, NULL, NULL, 0, NULL, - NULL, NULL, -1 }; - guint attr_mask = 0; - GdkWindow *parent = NULL; - PyGObject *py_parent = NULL; - PyObject *py_window_type = NULL; - PyObject *py_wclass = NULL; - PyGObject *py_visual = NULL; - PyGObject *py_colormap = NULL; - PyGObject *py_cursor = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OiiOiO|siiO!O!Ossb:GdkWindow.__init__", - kwlist, &py_parent, &attr.width, - &attr.height, &py_window_type, - &attr.event_mask, &py_wclass, - &attr.title, &attr.x, &attr.y, - &PyGdkVisual_Type, &py_visual, - &PyGdkColormap_Type, &py_colormap, - &py_cursor, - &attr.wmclass_name, - &attr.wmclass_class, - &attr.override_redirect)) - return -1; - - if (py_parent && pygobject_check(py_parent, &PyGdkWindow_Type)) - parent = GDK_WINDOW(py_parent->obj); - else if ((PyObject *)py_parent != Py_None) { - PyErr_SetString(PyExc_TypeError, "parent must be a GdkWindow or None"); - return -1; - } - - if (pyg_enum_get_value(GDK_TYPE_WINDOW_CLASS, - py_wclass, (gint *)&attr.wclass)) - return -1; - if (pyg_enum_get_value(GDK_TYPE_WINDOW_TYPE, - py_window_type, (gint *)&attr.window_type)) - return -1; - - if (attr.title) - attr_mask |= GDK_WA_TITLE; - if (attr.x != -1) - attr_mask |= GDK_WA_X; - if (attr.y != -1) - attr_mask |= GDK_WA_Y; - if (py_visual) { - attr.visual = GDK_VISUAL(py_visual->obj); - attr_mask |= GDK_WA_VISUAL; - } - if (py_colormap) { - attr.colormap = GDK_COLORMAP(py_colormap->obj); - attr_mask |= GDK_WA_COLORMAP; - } - if (py_cursor) { - if (!pyg_boxed_check(py_cursor, GDK_TYPE_CURSOR)) { - PyErr_SetString(PyExc_TypeError, "cursor should be a GdkCursor"); - return -1; - } - attr.cursor = pyg_boxed_get(py_cursor, GdkCursor); - attr_mask |= GDK_WA_CURSOR; - } - if (attr.wmclass_name && attr.wmclass_class) - attr_mask |= GDK_WA_WMCLASS; - if (attr.override_redirect != -1) - attr_mask |= GDK_WA_NOREDIR; - - self->obj = (GObject *)gdk_window_new(parent, &attr, attr_mask); - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GdkWindow object"); - return -1; - } - - g_object_ref(self->obj); - - pygobject_register_wrapper((PyObject *)self); - return 0; -} -%% -override gdk_property_get kwargs - -static GdkAtom atom_type = GDK_NONE, atom_pair_type = GDK_NONE; - -static PyObject * -_wrap_gdk_property_get(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "property", "type", "pdelete", NULL }; - PyObject *py_property, *py_type = NULL; - GdkAtom property, type; - gint pdelete = FALSE; - - GdkAtom atype; - gint aformat, alength; - guchar *data; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|Oi:GdkWindow.property_get", kwlist, - &py_property, &py_type, - &pdelete)) { - return NULL; - } - property = pygdk_atom_from_pyobject(py_property); - if (PyErr_Occurred()) - return NULL; - - type = pygdk_atom_from_pyobject(py_type); - if (PyErr_Occurred()) - return NULL; - - if (gdk_property_get(GDK_WINDOW(self->obj), property, type, 0, 9999, - pdelete, &atype, &aformat, &alength, &data)) { - /* success */ - PyObject *pdata = NULL; - gint nelements, i; - gchar *aname; - PyObject *ret; - - switch (aformat) { - case 8: - if ((pdata = PyString_FromStringAndSize((char*)data, - alength)) == NULL) - return NULL; - break; - case 16: { - short *data16; - - data16 = (short *)data; - nelements = alength / sizeof(short); - if ((pdata = PyList_New(nelements)) == NULL) - return NULL; - for (i = 0; i < nelements; i++) - PyList_SetItem(pdata, i, PyInt_FromLong(data16[i])); - break; - } - case 32: { - if (atom_type == GDK_NONE) { - atom_type = gdk_atom_intern("ATOM", TRUE); - atom_pair_type = gdk_atom_intern("ATOM_PAIR", TRUE); - } - - /* special handling for atom types */ - if (atype == atom_type || atype == atom_pair_type) { - GdkAtom *data32; - - data32 = (GdkAtom *)data; - nelements = alength / sizeof(GdkAtom); - if ((pdata = PyList_New(nelements)) == NULL) - return NULL; - for (i = 0; i < nelements; i++) { - aname = gdk_atom_name(data32[i]); - PyList_SetItem(pdata, i, PyString_FromString(aname)); - g_free(aname); - } - } else { - long *data32; - - data32 = (long *)data; - nelements = alength / sizeof(long); - if ((pdata = PyList_New(nelements)) == NULL) - return NULL; - for (i = 0; i < nelements; i++) - PyList_SetItem(pdata, i, PyInt_FromLong(data32[i])); - } - break; - } - default: - g_warning("got a property format != 8, 16 or 32"); - g_assert_not_reached(); - } - g_free(data); - aname = gdk_atom_name(atype); - ret = Py_BuildValue("(NiN)", PyString_FromString(aname), aformat, - pdata); - g_free(aname); - return ret; - } else { - Py_INCREF(Py_None); - return Py_None; - } -} -%% -override gdk_property_change kwargs -static PyObject * -_wrap_gdk_property_change(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "property","type","format","mode","data",NULL }; - PyObject *py_property, *py_type; - GdkAtom property, type; - gint format; - PyObject *py_mode, *pdata; - GdkPropMode mode; - guchar *data = NULL; - gint nelements; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OOiOO:GdkWindow.property_change", kwlist, - &py_property, &py_type, &format, &py_mode, - &pdata)) { - return NULL; - } - property = pygdk_atom_from_pyobject(py_property); - if (PyErr_Occurred()) - return NULL; - - type = pygdk_atom_from_pyobject(py_type); - if (PyErr_Occurred()) - return NULL; - - if (pyg_enum_get_value(GDK_TYPE_PROP_MODE, py_mode, (gint *)&mode)) - return NULL; - switch (format) { - case 8: - if (!PyString_Check(pdata)) { - PyErr_SetString(PyExc_TypeError, "data not a string and format=8"); - return NULL; - } - data = (guchar*)PyString_AsString(pdata); - nelements = PyString_Size(pdata); - break; - case 16: { - short *data16; - gint i; - - if (!PySequence_Check(pdata)) { - PyErr_SetString(PyExc_TypeError, - "data not a sequence and format=16"); - return NULL; - } - nelements = PySequence_Length(pdata); - data16 = g_new(short, nelements); - data = (guchar *)data16; - for (i = 0; i < nelements; i++) { - PyObject *item = PySequence_GetItem(pdata, i); - - if (item) data16[i] = PyInt_AsLong(item); - if (!item || PyErr_Occurred()) { - Py_XDECREF(item); - g_free(data16); - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError,"data element not an int"); - return NULL; - } - Py_DECREF(item); - } - break; - } - case 32: { - gint i; - - if (!PySequence_Check(pdata)) { - PyErr_SetString(PyExc_TypeError, - "data not a sequence and format=32"); - return NULL; - } - nelements = PySequence_Length(pdata); - - if (atom_type == GDK_NONE) { - atom_type = gdk_atom_intern("ATOM", TRUE); - atom_pair_type = gdk_atom_intern("ATOM_PAIR", TRUE); - } - - /* special handling for atom types */ - if (type == atom_type || type == atom_pair_type) { - GdkAtom *data32 = g_new(GdkAtom, nelements); - - data = (guchar *)data32; - for (i = 0; i < nelements; i++) { - PyObject *item = PySequence_GetItem(pdata, i); - - if (item) data32[i] = pygdk_atom_from_pyobject(item); - if (!item || PyErr_Occurred()) { - Py_XDECREF(item); - g_free(data32); - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError,"data element not an atom"); - return NULL; - } - Py_DECREF(item); - } - } else { - long *data32 = g_new(long, nelements); - - data = (guchar *)data32; - for (i = 0; i < nelements; i++) { - PyObject *item = PySequence_GetItem(pdata, i); - - if (item) data32[i] = PyInt_AsLong(item); - if (!item || PyErr_Occurred()) { - Py_XDECREF(item); - g_free(data32); - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError,"data element not an int"); - return NULL; - } - Py_DECREF(item); - } - } - break; - } - default: - PyErr_SetString(PyExc_TypeError, "format must be 8, 16 or 32"); - return NULL; - break; - } - gdk_property_change(GDK_WINDOW(self->obj), property, type, format, mode, - data, nelements); - if (format != 8) - g_free(data); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_window_set_geometry_hints kwargs -static PyObject * -_wrap_gdk_window_set_geometry_hints(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "min_width", "min_height", - "max_width", "max_height", "base_width", - "base_height", "width_inc", "height_inc", - "min_aspect", "max_aspect", NULL }; - gint min_width = -1, min_height = -1, max_width = -1, max_height = -1; - gint base_width = -1, base_height = -1, width_inc = -1, height_inc = -1; - gdouble min_aspect = -1.0, max_aspect = -1.0; - GdkGeometry geometry = { 0 }; - GdkWindowHints geom_mask = 0; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|iiiiiiiidd:GdkWindow.set_geometry_hints", - kwlist, &min_width, &min_height, - &max_width, &max_height, - &base_width, &base_height, &width_inc, - &height_inc, &min_aspect, &max_aspect)) - return NULL; - if (min_width >= 0 || min_height >= 0) { - geometry.min_width = MAX(min_width, 0); - geometry.min_height = MAX(min_height, 0); - geom_mask |= GDK_HINT_MIN_SIZE; - } - if (max_width >= 0 || max_height >= 0) { - geometry.max_width = MAX(max_width, 0); - geometry.max_height = MAX(max_height, 0); - geom_mask |= GDK_HINT_MAX_SIZE; - } - if (base_width >= 0 || base_height >= 0) { - geometry.base_width = MAX(base_width, 0); - geometry.base_height = MAX(base_height, 0); - geom_mask |= GDK_HINT_BASE_SIZE; - } - if (width_inc >= 0 || height_inc >= 0) { - geometry.width_inc = MAX(width_inc, 0); - geometry.height_inc = MAX(height_inc, 0); - geom_mask |= GDK_HINT_RESIZE_INC; - } - if (min_aspect >= 0.0 || max_aspect >= 0.0) { - if (min_aspect <= 0.0 || max_aspect <= 0.0) { - PyErr_SetString(PyExc_TypeError, "aspect ratios must be positive"); - return NULL; - } - geometry.min_aspect = min_aspect; - geometry.max_aspect = max_aspect; - geom_mask |= GDK_HINT_ASPECT; - } - gdk_window_set_geometry_hints(GDK_WINDOW(self->obj), &geometry, geom_mask); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_window_get_geometry noargs -static PyObject * -_wrap_gdk_window_get_geometry(PyGObject *self) -{ - gint x, y, width, height, depth; - - gdk_window_get_geometry(GDK_WINDOW(self->obj), &x, &y, &width, &height, - &depth); - return Py_BuildValue("(iiiii)", x, y, width, height, depth); -} -%% -override gdk_window_get_position noargs -static PyObject * -_wrap_gdk_window_get_position(PyGObject *self) -{ - gint x, y; - - gdk_window_get_position(GDK_WINDOW(self->obj), &x, &y); - return Py_BuildValue("(ii)", x, y); -} -%% -override gdk_window_get_origin noargs -static PyObject * -_wrap_gdk_window_get_origin(PyGObject *self) -{ - gint x, y; - - gdk_window_get_origin(GDK_WINDOW(self->obj), &x, &y); - return Py_BuildValue("(ii)", x, y); -} -%% -override gdk_window_get_deskrelative_origin noargs -static PyObject * -_wrap_gdk_window_get_deskrelative_origin(PyGObject *self) -{ - gint x, y; - - gdk_window_get_deskrelative_origin(GDK_WINDOW(self->obj), &x, &y); - return Py_BuildValue("(ii)", x, y); -} -%% -override gdk_window_get_root_origin noargs -static PyObject * -_wrap_gdk_window_get_root_origin(PyGObject *self) -{ - gint x, y; - - gdk_window_get_root_origin(GDK_WINDOW(self->obj), &x, &y); - return Py_BuildValue("(ii)", x, y); -} -%% -override gdk_window_get_pointer noargs -static PyObject * -_wrap_gdk_window_get_pointer(PyGObject *self) -{ - gint x, y; - GdkModifierType mask; - - gdk_window_get_pointer(GDK_WINDOW(self->obj), &x, &y, &mask); - return Py_BuildValue("(iiN)", x, y, - pyg_flags_from_gtype(GDK_TYPE_MODIFIER_TYPE, mask)); -} -%% -ignore gdk_window_peek_children -%% -override gdk_window_get_children noargs -static PyObject * -_wrap_gdk_window_get_children(PyGObject *self) -{ - GList *children, *tmp; - PyObject *list; - - children = gdk_window_get_children(GDK_WINDOW(self->obj)); - list = PyList_New(0); - for (tmp = children; tmp != NULL; tmp = tmp->next) { - PyObject *item = pygobject_new((GObject *)tmp->data); - - PyList_Append(list, item); - Py_DECREF(item); - } - g_list_free(children); - return list; -} -%% -override gdk_window_set_icon_list kwargs -static PyObject * -_wrap_gdk_window_set_icon_list(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "pixbufs", NULL }; - PyObject *py_pixbufs; - gint length, i; - GList *pixbufs = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GdkWindow.set_icon_list", - kwlist, &py_pixbufs)) - return NULL; - if (!(py_pixbufs = PySequence_Fast(py_pixbufs, - "pixbufs must be a sequence of pixbufs"))) - return NULL; - length = PySequence_Fast_GET_SIZE(py_pixbufs); - for (i = length - 1; i >= 0; i--) { - PyObject *item = PySequence_Fast_GET_ITEM(py_pixbufs, i); - - if (!pygobject_check(item, &PyGdkPixbuf_Type)) { - g_list_free(pixbufs); - Py_DECREF(py_pixbufs); - PyErr_SetString(PyExc_TypeError, - "pixbufs must be a sequence of pixbufs"); - return NULL; - } - pixbufs = g_list_prepend(pixbufs, GDK_PIXBUF(pygobject_get(item))); - } - gdk_window_set_icon_list(GDK_WINDOW(self->obj), pixbufs); - g_list_free(pixbufs); - Py_DECREF(py_pixbufs); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_window_get_frame_extents noargs -static PyObject * -_wrap_gdk_window_get_frame_extents(PyGObject *self) -{ - GdkRectangle rect = {0, 0, 0, 0}; - - gdk_window_get_frame_extents(GDK_WINDOW(self->obj), &rect); - - return pyg_boxed_new(GDK_TYPE_RECTANGLE, &rect, TRUE, TRUE); -} -%% -override gdk_window_get_decorations noargs -static PyObject * -_wrap_gdk_window_get_decorations(PyGObject *self) -{ - GdkWMDecoration decor = 0; - - gdk_window_get_decorations(GDK_WINDOW(self->obj), &decor); - - return pyg_flags_from_gtype(GDK_TYPE_WM_DECORATION, decor); -} -%% -override gdk_window_get_toplevels noargs -static PyObject * -_wrap_gdk_window_get_toplevels(PyGObject *self) -{ - GList *topl; - guint ntopl; - int i; - PyObject *list; - - topl = gdk_window_get_toplevels(); - ntopl = g_list_length(topl); - - if ((list = PyList_New(ntopl)) == NULL) - return NULL; - - for (i = 0; i < ntopl; i++) { - PyObject *item; - - item = pygobject_new((GObject *)g_list_nth_data(topl, i)); - PyList_SetItem(list, i, item); - } - - g_list_free(topl); - - return list; -} -%% -override gdk_window_set_user_data kwargs - -static void __gdk_window_set_user_data_window_destroyed(gpointer widget, - GObject *window); - -static void -__gdk_window_set_user_data_widget_destroyed(gpointer window, - GObject *widget) -{ - gpointer old_user_data = NULL; - gdk_window_get_user_data(GDK_WINDOW(window), &old_user_data); - gdk_window_set_user_data(GDK_WINDOW(window), NULL); - g_object_weak_unref(G_OBJECT(window), __gdk_window_set_user_data_window_destroyed, - widget); -} - -static void -__gdk_window_set_user_data_window_destroyed(gpointer widget, - GObject *window) -{ - g_object_weak_unref(G_OBJECT(widget), __gdk_window_set_user_data_widget_destroyed, - window); -} - -static PyObject * -_wrap_gdk_window_set_user_data(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "user_data", NULL }; - PyGObject *user_data; - gpointer old_user_data = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GdkWindow.set_user_data", - kwlist, &user_data)) - return NULL; - - if ((PyObject *)user_data != Py_None && - !pygobject_check(user_data, &PyGtkWidget_Type)) { - PyErr_SetString(PyExc_TypeError, "Only GtkWidgets are allowed as user data." - " Maybe you want to use GObject.set_data()"); - return NULL; - } - /* Remove any existing weak references */ - gdk_window_get_user_data(GDK_WINDOW(self->obj), &old_user_data); - if (old_user_data) { - g_object_weak_unref(old_user_data, __gdk_window_set_user_data_widget_destroyed, self->obj); - g_object_weak_unref(self->obj, __gdk_window_set_user_data_window_destroyed, old_user_data); - } - - if ((PyObject *)user_data != Py_None) { - /* Add new weak references */ - gdk_window_set_user_data(GDK_WINDOW(self->obj), GTK_WIDGET(user_data->obj)); - g_object_weak_ref(user_data->obj, __gdk_window_set_user_data_widget_destroyed, self->obj); - g_object_weak_ref(self->obj, __gdk_window_set_user_data_window_destroyed, user_data->obj); - } else { - gdk_window_set_user_data(GDK_WINDOW(self->obj), NULL); - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gdk_window_get_user_data noargs -static PyObject * -_wrap_gdk_window_get_user_data(PyGObject *self) -{ - gpointer user_data = NULL; - gdk_window_get_user_data(GDK_WINDOW(self->obj), &user_data); - if (GTK_IS_WIDGET(user_data)) { - return pygobject_new(G_OBJECT(user_data)); - } else { - PyErr_SetString(PyExc_ValueError, "could not convert the user data"); - return NULL; - } -} -%% -override gdk_window_add_filter kwargs -static int -pygdk_filter_func_marshal(GdkXEvent *xevent, - GdkEvent *event, - PyGtkCustomNotify *cunote) -{ - PyGILState_STATE state; - PyObject *ret; - PyObject *pyevent; - int retval; - - state = pyg_gil_state_ensure(); - - pyevent = pyg_boxed_new(GDK_TYPE_EVENT, event, TRUE, TRUE); - - if (cunote->data) - ret = PyObject_CallFunction(cunote->func, "OO", pyevent, cunote->data); - - else - ret = PyObject_CallFunction(cunote->func, "O", pyevent); - - if (ret == NULL) { - PyErr_Print(); - retval = GDK_FILTER_CONTINUE; - } else { - retval = PyInt_AsLong(ret); - } - - pyg_gil_state_release(state); - - return retval; -} -static PyObject* -_wrap_gdk_window_add_filter(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "entries", "callback_data", NULL }; - PyGtkCustomNotify *cunote; - PyObject *pyfunc, *pydata = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:GdkWindow.add_filter", kwlist, - &pyfunc, &pydata)) - return NULL; - - - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = pyfunc; - cunote->data = pydata; - Py_INCREF(cunote->func); - Py_XINCREF(cunote->data); - - g_object_weak_ref(G_OBJECT(self->obj), - (GWeakNotify) pygtk_custom_destroy_notify, - cunote); - - gdk_window_add_filter (GDK_WINDOW(self->obj), - (GdkFilterFunc)pygdk_filter_func_marshal, - cunote); - - Py_INCREF(Py_None); - return Py_None; -} diff --git a/gtk/gtk-2.10-types.defs b/gtk/gtk-2.10-types.defs deleted file mode 100644 index 5d00e049..00000000 --- a/gtk/gtk-2.10-types.defs +++ /dev/null @@ -1,376 +0,0 @@ -;; -*- scheme -*- -; boxed definitions ... - -(define-boxed PaperSize - (in-module "Gtk") - (c-name "GtkPaperSize") - (gtype-id "GTK_TYPE_PAPER_SIZE") -) - -(define-boxed RecentInfo - (in-module "Gtk") - (c-name "GtkRecentInfo") - (gtype-id "GTK_TYPE_RECENT_INFO") -) - -(define-boxed TargetList - (in-module "Gtk") - (c-name "GtkTargetList") - (gtype-id "GTK_TYPE_TARGET_LIST") -) - -; interface definitions ... - -(define-interface PrintOperationPreview - (in-module "Gtk") - (c-name "GtkPrintOperationPreview") - (gtype-id "GTK_TYPE_PRINT_OPERATION_PREVIEW") - (prerequisite "GObject") -) - -(define-interface RecentChooser - (in-module "Gtk") - (c-name "GtkRecentChooser") - (gtype-id "GTK_TYPE_RECENT_CHOOSER") - (prerequisite "GtkObject") -) - -; object definitions ... - -(define-object Assistant - (in-module "Gtk") - (parent "GtkWindow") - (c-name "GtkAssistant") - (gtype-id "GTK_TYPE_ASSISTANT") -) - -(define-object CellRendererAccel - (in-module "Gtk") - (parent "GtkCellRendererText") - (c-name "GtkCellRendererAccel") - (gtype-id "GTK_TYPE_CELL_RENDERER_ACCEL") -) - -(define-object CellRendererSpin - (in-module "Gtk") - (parent "GtkCellRendererText") - (c-name "GtkCellRendererSpin") - (gtype-id "GTK_TYPE_CELL_RENDERER_SPIN") -) - -(define-object LinkButton - (in-module "Gtk") - (parent "GtkButton") - (c-name "GtkLinkButton") - (gtype-id "GTK_TYPE_LINK_BUTTON") -) - -(define-object PageSetup - (in-module "Gtk") - (parent "GObject") - (c-name "GtkPageSetup") - (gtype-id "GTK_TYPE_PAGE_SETUP") -) - -(define-object PrintContext - (in-module "Gtk") - (parent "GObject") - (c-name "GtkPrintContext") - (gtype-id "GTK_TYPE_PRINT_CONTEXT") -) - -(define-object PrintOperation - (in-module "Gtk") - (parent "GObject") - (c-name "GtkPrintOperation") - (gtype-id "GTK_TYPE_PRINT_OPERATION") - (implements "GtkPrintOperationPreview") -) - -(define-object PrintSettings - (in-module "Gtk") - (parent "GObject") - (c-name "GtkPrintSettings") - (gtype-id "GTK_TYPE_PRINT_SETTINGS") -) - -(define-object RecentChooserDialog - (in-module "Gtk") - (parent "GtkDialog") - (c-name "GtkRecentChooserDialog") - (gtype-id "GTK_TYPE_RECENT_CHOOSER_DIALOG") - (implements "GtkRecentChooser") -) - -(define-object RecentChooserMenu - (in-module "Gtk") - (parent "GtkMenu") - (c-name "GtkRecentChooserMenu") - (gtype-id "GTK_TYPE_RECENT_CHOOSER_MENU") - (implements "GtkRecentChooser") -) - -(define-object RecentChooserWidget - (in-module "Gtk") - (parent "GtkVBox") - (c-name "GtkRecentChooserWidget") - (gtype-id "GTK_TYPE_RECENT_CHOOSER_WIDGET") - (implements "GtkRecentChooser") -) - -(define-object RecentFilter - (in-module "Gtk") - (parent "GtkObject") - (c-name "GtkRecentFilter") - (gtype-id "GTK_TYPE_RECENT_FILTER") -) - -(define-object RecentManager - (in-module "Gtk") - (parent "GObject") - (c-name "GtkRecentManager") - (gtype-id "GTK_TYPE_RECENT_MANAGER") -) - -(define-object StatusIcon - (in-module "Gtk") - (parent "GObject") - (c-name "GtkStatusIcon") - (gtype-id "GTK_TYPE_STATUS_ICON") -) - -; pointer definitions ... - -;; Enumerations ... - -(define-enum AssistantPageType - (in-module "Gtk") - (c-name "GtkAssistantPageType") - (gtype-id "GTK_TYPE_ASSISTANT_PAGE_TYPE") - (values - '("content" "GTK_ASSISTANT_PAGE_CONTENT") - '("intro" "GTK_ASSISTANT_PAGE_INTRO") - '("confirm" "GTK_ASSISTANT_PAGE_CONFIRM") - '("summary" "GTK_ASSISTANT_PAGE_SUMMARY") - '("progress" "GTK_ASSISTANT_PAGE_PROGRESS") - ) -) - -(define-enum CellRendererAccelMode - (in-module "Gtk") - (c-name "GtkCellRendererAccelMode") - (gtype-id "GTK_TYPE_CELL_RENDERER_ACCEL_MODE") - (values - '("gtk" "GTK_CELL_RENDERER_ACCEL_MODE_GTK") - '("other" "GTK_CELL_RENDERER_ACCEL_MODE_OTHER") - ) -) - -(define-enum PageOrientation - (in-module "Gtk") - (c-name "GtkPageOrientation") - (gtype-id "GTK_TYPE_PAGE_ORIENTATION") - (values - '("portrait" "GTK_PAGE_ORIENTATION_PORTRAIT") - '("landscape" "GTK_PAGE_ORIENTATION_LANDSCAPE") - '("reverse-portrait" "GTK_PAGE_ORIENTATION_REVERSE_PORTRAIT") - '("reverse-landscape" "GTK_PAGE_ORIENTATION_REVERSE_LANDSCAPE") - ) -) - -(define-enum PageSet - (in-module "Gtk") - (c-name "GtkPageSet") - (gtype-id "GTK_TYPE_PAGE_SET") - (values - '("all" "GTK_PAGE_SET_ALL") - '("even" "GTK_PAGE_SET_EVEN") - '("odd" "GTK_PAGE_SET_ODD") - ) -) - -(define-enum PrintDuplex - (in-module "Gtk") - (c-name "GtkPrintDuplex") - (gtype-id "GTK_TYPE_PRINT_DUPLEX") - (values - '("simplex" "GTK_PRINT_DUPLEX_SIMPLEX") - '("horizontal" "GTK_PRINT_DUPLEX_HORIZONTAL") - '("vertical" "GTK_PRINT_DUPLEX_VERTICAL") - ) -) - -(define-enum PrintError - (in-module "Gtk") - (c-name "GtkPrintError") - (gtype-id "GTK_TYPE_PRINT_ERROR") - (values - '("general" "GTK_PRINT_ERROR_GENERAL") - '("internal-error" "GTK_PRINT_ERROR_INTERNAL_ERROR") - '("nomem" "GTK_PRINT_ERROR_NOMEM") - ) -) - -(define-enum PrintOperationAction - (in-module "Gtk") - (c-name "GtkPrintOperationAction") - (gtype-id "GTK_TYPE_PRINT_OPERATION_ACTION") - (values - '("print-dialog" "GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG") - '("print" "GTK_PRINT_OPERATION_ACTION_PRINT") - '("preview" "GTK_PRINT_OPERATION_ACTION_PREVIEW") - '("export" "GTK_PRINT_OPERATION_ACTION_EXPORT") - ) -) - -(define-enum PrintOperationResult - (in-module "Gtk") - (c-name "GtkPrintOperationResult") - (gtype-id "GTK_TYPE_PRINT_OPERATION_RESULT") - (values - '("error" "GTK_PRINT_OPERATION_RESULT_ERROR") - '("apply" "GTK_PRINT_OPERATION_RESULT_APPLY") - '("cancel" "GTK_PRINT_OPERATION_RESULT_CANCEL") - '("in-progress" "GTK_PRINT_OPERATION_RESULT_IN_PROGRESS") - ) -) - -(define-enum PrintPages - (in-module "Gtk") - (c-name "GtkPrintPages") - (gtype-id "GTK_TYPE_PRINT_PAGES") - (values - '("all" "GTK_PRINT_PAGES_ALL") - '("current" "GTK_PRINT_PAGES_CURRENT") - '("ranges" "GTK_PRINT_PAGES_RANGES") - ) -) - -(define-enum PrintQuality - (in-module "Gtk") - (c-name "GtkPrintQuality") - (gtype-id "GTK_TYPE_PRINT_QUALITY") - (values - '("low" "GTK_PRINT_QUALITY_LOW") - '("normal" "GTK_PRINT_QUALITY_NORMAL") - '("high" "GTK_PRINT_QUALITY_HIGH") - '("draft" "GTK_PRINT_QUALITY_DRAFT") - ) -) - -(define-enum PrintStatus - (in-module "Gtk") - (c-name "GtkPrintStatus") - (gtype-id "GTK_TYPE_PRINT_STATUS") - (values - '("initial" "GTK_PRINT_STATUS_INITIAL") - '("preparing" "GTK_PRINT_STATUS_PREPARING") - '("generating-data" "GTK_PRINT_STATUS_GENERATING_DATA") - '("sending-data" "GTK_PRINT_STATUS_SENDING_DATA") - '("pending" "GTK_PRINT_STATUS_PENDING") - '("pending-issue" "GTK_PRINT_STATUS_PENDING_ISSUE") - '("printing" "GTK_PRINT_STATUS_PRINTING") - '("finished" "GTK_PRINT_STATUS_FINISHED") - '("finished-aborted" "GTK_PRINT_STATUS_FINISHED_ABORTED") - ) -) - -(define-enum RecentChooserError - (in-module "Gtk") - (c-name "GtkRecentChooserError") - (gtype-id "GTK_TYPE_RECENT_CHOOSER_ERROR") - (values - '("not-found" "GTK_RECENT_CHOOSER_ERROR_NOT_FOUND") - '("invalid-uri" "GTK_RECENT_CHOOSER_ERROR_INVALID_URI") - ) -) - -(define-enum RecentManagerError - (in-module "Gtk") - (c-name "GtkRecentManagerError") - (gtype-id "GTK_TYPE_RECENT_MANAGER_ERROR") - (values - '("not-found" "GTK_RECENT_MANAGER_ERROR_NOT_FOUND") - '("invalid-uri" "GTK_RECENT_MANAGER_ERROR_INVALID_URI") - '("invalid-encoding" "GTK_RECENT_MANAGER_ERROR_INVALID_ENCODING") - '("not-registered" "GTK_RECENT_MANAGER_ERROR_NOT_REGISTERED") - '("read" "GTK_RECENT_MANAGER_ERROR_READ") - '("write" "GTK_RECENT_MANAGER_ERROR_WRITE") - '("unknown" "GTK_RECENT_MANAGER_ERROR_UNKNOWN") - ) -) - -(define-enum RecentSortType - (in-module "Gtk") - (c-name "GtkRecentSortType") - (gtype-id "GTK_TYPE_RECENT_SORT_TYPE") - (values - '("none" "GTK_RECENT_SORT_NONE") - '("mru" "GTK_RECENT_SORT_MRU") - '("lru" "GTK_RECENT_SORT_LRU") - '("custom" "GTK_RECENT_SORT_CUSTOM") - ) -) - -(define-enum SensitivityType - (in-module "Gtk") - (c-name "GtkSensitivityType") - (gtype-id "GTK_TYPE_SENSITIVITY_TYPE") - (values - '("auto" "GTK_SENSITIVITY_AUTO") - '("on" "GTK_SENSITIVITY_ON") - '("off" "GTK_SENSITIVITY_OFF") - ) -) - -(define-enum TextBufferTargetInfo - (in-module "Gtk") - (c-name "GtkTextBufferTargetInfo") - (gtype-id "GTK_TYPE_TEXT_BUFFER_TARGET_INFO") - (values - '("buffer-contents" "GTK_TEXT_BUFFER_TARGET_INFO_BUFFER_CONTENTS") - '("rich-text" "GTK_TEXT_BUFFER_TARGET_INFO_RICH_TEXT") - '("text" "GTK_TEXT_BUFFER_TARGET_INFO_TEXT") - ) -) - -(define-enum TreeViewGridLines - (in-module "Gtk") - (c-name "GtkTreeViewGridLines") - (gtype-id "GTK_TYPE_TREE_VIEW_GRID_LINES") - (values - '("none" "GTK_TREE_VIEW_GRID_LINES_NONE") - '("horizontal" "GTK_TREE_VIEW_GRID_LINES_HORIZONTAL") - '("vertical" "GTK_TREE_VIEW_GRID_LINES_VERTICAL") - '("both" "GTK_TREE_VIEW_GRID_LINES_BOTH") - ) -) - -(define-enum Unit - (in-module "Gtk") - (c-name "GtkUnit") - (gtype-id "GTK_TYPE_UNIT") - (values - '("pixel" "GTK_UNIT_PIXEL") - '("points" "GTK_UNIT_POINTS") - '("inch" "GTK_UNIT_INCH") - '("mm" "GTK_UNIT_MM") - ) -) - -;; Flags ... - -(define-flags RecentFilterFlags - (in-module "Gtk") - (c-name "GtkRecentFilterFlags") - (gtype-id "GTK_TYPE_RECENT_FILTER_FLAGS") - (values - '("uri" "GTK_RECENT_FILTER_URI") - '("display-name" "GTK_RECENT_FILTER_DISPLAY_NAME") - '("mime-type" "GTK_RECENT_FILTER_MIME_TYPE") - '("application" "GTK_RECENT_FILTER_APPLICATION") - '("group" "GTK_RECENT_FILTER_GROUP") - '("age" "GTK_RECENT_FILTER_AGE") - ) -) - diff --git a/gtk/gtk-2.10.defs b/gtk/gtk-2.10.defs deleted file mode 100644 index 00dbbe03..00000000 --- a/gtk/gtk-2.10.defs +++ /dev/null @@ -1,4122 +0,0 @@ -;; -*- scheme -*- - -(include "gtk-2.10-types.defs") - -;; From gtkaboutdialog.h - - - -;; From gtkaccelgroup.h - - - -;; From gtkaccellabel.h - - - -;; From gtkaccelmap.h - - - -;; From gtkaccessible.h - - - -;; From gtkactiongroup.h - - - -;; From gtkaction.h - -(define-method get_action - (of-object "GtkWidget") - (c-name "gtk_widget_get_action") - (return-type "GtkAction*") -) - -(define-method get_accel_closure - (of-object "GtkAction") - (c-name "gtk_action_get_accel_closure") - (return-type "GClosure*") -) - - - -;; From gtkadjustment.h - - - -;; From gtkalignment.h - - - -;; From gtkarrow.h - - - -;; From gtkaspectframe.h - - - -;; From gtkassistant.h - -(define-function assistant_get_type - (c-name "gtk_assistant_get_type") - (return-type "GType") -) - -(define-function assistant_new - (c-name "gtk_assistant_new") - (is-constructor-of "GtkAssistant") - (return-type "GtkWidget*") -) - -(define-method get_current_page - (of-object "GtkAssistant") - (c-name "gtk_assistant_get_current_page") - (return-type "gint") -) - -(define-method set_current_page - (of-object "GtkAssistant") - (c-name "gtk_assistant_set_current_page") - (return-type "none") - (parameters - '("gint" "page_num") - ) -) - -(define-method get_n_pages - (of-object "GtkAssistant") - (c-name "gtk_assistant_get_n_pages") - (return-type "gint") -) - -(define-method get_nth_page - (of-object "GtkAssistant") - (c-name "gtk_assistant_get_nth_page") - (return-type "GtkWidget*") - (parameters - '("gint" "page_num") - ) -) - -(define-method prepend_page - (of-object "GtkAssistant") - (c-name "gtk_assistant_prepend_page") - (return-type "gint") - (parameters - '("GtkWidget*" "page") - ) -) - -(define-method append_page - (of-object "GtkAssistant") - (c-name "gtk_assistant_append_page") - (return-type "gint") - (parameters - '("GtkWidget*" "page") - ) -) - -(define-method insert_page - (of-object "GtkAssistant") - (c-name "gtk_assistant_insert_page") - (return-type "gint") - (parameters - '("GtkWidget*" "page") - '("gint" "position") - ) -) - -(define-method set_forward_page_func - (of-object "GtkAssistant") - (c-name "gtk_assistant_set_forward_page_func") - (return-type "none") - (parameters - '("GtkAssistantPageFunc" "page_func") - '("gpointer" "data") - '("GDestroyNotify" "destroy") - ) -) - -(define-method set_page_type - (of-object "GtkAssistant") - (c-name "gtk_assistant_set_page_type") - (return-type "none") - (parameters - '("GtkWidget*" "page") - '("GtkAssistantPageType" "type") - ) -) - -(define-method get_page_type - (of-object "GtkAssistant") - (c-name "gtk_assistant_get_page_type") - (return-type "GtkAssistantPageType") - (parameters - '("GtkWidget*" "page") - ) -) - -(define-method set_page_title - (of-object "GtkAssistant") - (c-name "gtk_assistant_set_page_title") - (return-type "none") - (parameters - '("GtkWidget*" "page") - '("const-gchar*" "title") - ) -) - -(define-method get_page_title - (of-object "GtkAssistant") - (c-name "gtk_assistant_get_page_title") - (return-type "const-gchar*") - (parameters - '("GtkWidget*" "page") - ) -) - -(define-method set_page_header_image - (of-object "GtkAssistant") - (c-name "gtk_assistant_set_page_header_image") - (return-type "none") - (parameters - '("GtkWidget*" "page") - '("GdkPixbuf*" "pixbuf" (null-ok) (default "NULL")) - ) -) - -(define-method get_page_header_image - (of-object "GtkAssistant") - (c-name "gtk_assistant_get_page_header_image") - (return-type "GdkPixbuf*") - (parameters - '("GtkWidget*" "page") - ) -) - -(define-method set_page_side_image - (of-object "GtkAssistant") - (c-name "gtk_assistant_set_page_side_image") - (return-type "none") - (parameters - '("GtkWidget*" "page") - '("GdkPixbuf*" "pixbuf" (null-ok) (default "NULL")) - ) -) - -(define-method get_page_side_image - (of-object "GtkAssistant") - (c-name "gtk_assistant_get_page_side_image") - (return-type "GdkPixbuf*") - (parameters - '("GtkWidget*" "page") - ) -) - -(define-method set_page_complete - (of-object "GtkAssistant") - (c-name "gtk_assistant_set_page_complete") - (return-type "none") - (parameters - '("GtkWidget*" "page") - '("gboolean" "complete") - ) -) - -(define-method get_page_complete - (of-object "GtkAssistant") - (c-name "gtk_assistant_get_page_complete") - (return-type "gboolean") - (parameters - '("GtkWidget*" "page") - ) -) - -(define-method add_action_widget - (of-object "GtkAssistant") - (c-name "gtk_assistant_add_action_widget") - (return-type "none") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-method remove_action_widget - (of-object "GtkAssistant") - (c-name "gtk_assistant_remove_action_widget") - (return-type "none") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-method update_buttons_state - (of-object "GtkAssistant") - (c-name "gtk_assistant_update_buttons_state") - (return-type "none") -) - -(define-virtual prepare - (of-object "GtkAssistant") - (return-type "none") - (parameters - '("GtkWidget*" "page") - ) -) - -(define-virtual apply - (of-object "GtkAssistant") - (return-type "none") -) - -(define-virtual close - (of-object "GtkAssistant") - (return-type "none") -) - -(define-virtual cancel - (of-object "GtkAssistant") - (return-type "none") -) - - - - -;; From gtkbbox.h - - - -;; From gtkbindings.h - - - -;; From gtkbin.h - - - -;; From gtkbox.h - - - -;; From gtkbutton.h - -(define-method set_image_position - (of-object "GtkButton") - (c-name "gtk_button_set_image_position") - (return-type "none") - (parameters - '("GtkPositionType" "position") - ) -) - -(define-method get_image_position - (of-object "GtkButton") - (c-name "gtk_button_get_image_position") - (return-type "GtkPositionType") -) - - -;; From gtkcalendar.h - - - -;; From gtkcelleditable.h - - - -;; From gtkcelllayout.h - - - -;; From gtkcellrendereraccel.h - -(define-function cell_renderer_accel_get_type - (c-name "gtk_cell_renderer_accel_get_type") - (return-type "GType") -) - -(define-function cell_renderer_accel_new - (c-name "gtk_cell_renderer_accel_new") - (is-constructor-of "GtkCellRendererAccel") - (return-type "GtkCellRenderer*") -) - -(define-virtual accel_edited - (of-object "GtkCellRendererAccel") - (return-type "none") - (parameters - '("const-gchar*" "path_string") - '("guint" "accel_key") - '("GdkModifierType" "accel_mods") - '("guint" "hardware_keycode") - ) -) - -(define-virtual accel_cleared - (of-object "GtkCellRendererAccel") - (return-type "none") - (parameters - '("const-gchar*" "path_string") - ) -) - - - -;; From gtkcellrenderercombo.h - - - -;; From gtkcellrenderer.h - - - -;; From gtkcellrendererpixbuf.h - - - -;; From gtkcellrendererprogress.h - - - -;; From gtkcellrendererspin.h - -(define-function cell_renderer_spin_get_type - (c-name "gtk_cell_renderer_spin_get_type") - (return-type "GType") -) - -(define-function cell_renderer_spin_new - (c-name "gtk_cell_renderer_spin_new") - (is-constructor-of "GtkCellRendererSpin") - (return-type "GtkCellRenderer*") -) - - - -;; From gtkcellrenderertext.h - - - -;; From gtkcellrenderertoggle.h - - - -;; From gtkcellview.h - - - -;; From gtkcheckbutton.h - - - -;; From gtkcheckmenuitem.h - - - -;; From gtkclipboard.h - -(define-method request_rich_text - (of-object "GtkClipboard") - (c-name "gtk_clipboard_request_rich_text") - (return-type "none") - (parameters - '("GtkTextBuffer*" "buffer") - '("GtkClipboardRichTextReceivedFunc" "callback") - '("gpointer" "user_data") - ) -) - -(define-method wait_for_rich_text - (of-object "GtkClipboard") - (c-name "gtk_clipboard_wait_for_rich_text") - (return-type "guint8*") - (parameters - '("GtkTextBuffer*" "buffer") - '("GdkAtom*" "format") - '("gsize*" "length") - ) -) - -(define-method wait_is_rich_text_available - (of-object "GtkClipboard") - (c-name "gtk_clipboard_wait_is_rich_text_available") - (return-type "gboolean") - (parameters - '("GtkTextBuffer*" "buffer") - ) -) - - - -;; From gtkclist.h - - - -;; From gtkcolorbutton.h - - - -;; From gtkcolorseldialog.h - - - -;; From gtkcolorsel.h - - - -;; From gtkcomboboxentry.h - - - -;; From gtkcombobox.h - -(define-method get_title - (of-object "GtkComboBox") - (c-name "gtk_combo_box_get_title") - (return-type "const-gchar*") -) - -(define-method set_title - (of-object "GtkComboBox") - (c-name "gtk_combo_box_set_title") - (return-type "none") - (parameters - '("const-gchar*" "title") - ) -) - - - -;; From gtkcombo.h - - - -;; From gtkcontainer.h - - - -;; From gtkctree.h - - - -;; From gtkcurve.h - - - -;; From gtkdebug.h - - - -;; From gtkdialog.h - - - -;; From gtkdnd.h - -(define-method drag_dest_set_track_motion - (of-object "GtkWidget") - (c-name "gtk_drag_dest_set_track_motion") - (return-type "none") - (parameters - '("gboolean" "track_motion") - ) -) - -(define-method drag_dest_get_track_motion - (of-object "GtkWidget") - (c-name "gtk_drag_dest_get_track_motion") - (return-type "gboolean") -) - - - -;; From gtkdrawingarea.h - - - -;; From gtkeditable.h - - - -;; From gtkentrycompletion.h - - - -;; From gtkentry.h - -(define-method set_inner_border - (of-object "GtkEntry") - (c-name "gtk_entry_set_inner_border") - (return-type "none") - (parameters - '("const-GtkBorder*" "border" (null-ok)) - ) -) - -(define-method get_inner_border - (of-object "GtkEntry") - (c-name "gtk_entry_get_inner_border") - (return-type "const-GtkBorder*") -) - - - -;; From gtkenums.h - - - -;; From gtkeventbox.h - - - -;; From gtkexpander.h - - - -;; From gtkfilechooserbutton.h - -(define-method get_focus_on_click - (of-object "GtkFileChooserButton") - (c-name "gtk_file_chooser_button_get_focus_on_click") - (return-type "gboolean") -) - -(define-method set_focus_on_click - (of-object "GtkFileChooserButton") - (c-name "gtk_file_chooser_button_set_focus_on_click") - (return-type "none") - (parameters - '("gboolean" "focus_on_click") - ) -) - - - -;; From gtkfilechooserdialog.h - - - -;; From gtkfilechooser.h - - - -;; From gtkfilechooserwidget.h - - - -;; From gtkfilefilter.h - - - -;; From gtkfilesel.h - - - -;; From gtkfilesystem.h - -(define-virtual get_info - (of-object "GtkFileSystem") - (return-type "GtkFileSystemHandle*") - (parameters - '("const-GtkFilePath*" "path") - '("GtkFileInfoType" "types") - '("GtkFileSystemGetInfoCallback" "callback") - '("gpointer" "data") - ) -) - -(define-virtual cancel_operation - (of-object "GtkFileSystem") - (return-type "none") -) - - - -;; From gtkfixed.h - - - -;; From gtkfontbutton.h - - - -;; From gtkfontsel.h - - - -;; From gtkframe.h - - - -;; From gtkgamma.h - - - -;; From gtkgc.h - - - -;; From gtk.h - - - -;; From gtkhandlebox.h - - - -;; From gtkhbbox.h - - - -;; From gtkhbox.h - - - -;; From gtkhpaned.h - - - -;; From gtkhruler.h - - - -;; From gtkhscale.h - - - -;; From gtkhscrollbar.h - - - -;; From gtkhseparator.h - - - -;; From gtkiconfactory.h - - - -;; From gtkicontheme.h - - - -;; From gtkiconview.h - - - -;; From gtkimage.h - - - -;; From gtkimagemenuitem.h - - - -;; From gtkimcontext.h - - - -;; From gtkimcontextsimple.h - - - -;; From gtkimmodule.h - - - -;; From gtkimmulticontext.h - - - -;; From gtkinputdialog.h - - - -;; From gtkinvisible.h - - - -;; From gtkitemfactory.h - - - -;; From gtkitem.h - - - -;; From gtklabel.h - -(define-method set_line_wrap_mode - (of-object "GtkLabel") - (c-name "gtk_label_set_line_wrap_mode") - (return-type "none") - (parameters - '("PangoWrapMode" "wrap_mode") - ) -) - -(define-method get_line_wrap_mode - (of-object "GtkLabel") - (c-name "gtk_label_get_line_wrap_mode") - (return-type "PangoWrapMode") -) - - - -;; From gtklayout.h - - - -;; From gtklinkbutton.h - -(define-function link_button_get_type - (c-name "gtk_link_button_get_type") - (return-type "GType") -) - -(define-function link_button_new - (c-name "gtk_link_button_new") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "uri") - ) -) - -(define-function link_button_new_with_label - (c-name "gtk_link_button_new_with_label") - (is-constructor-of "GtkLinkButton") - (return-type "GtkWidget*") - (parameters - '("gchar*" "uri") - '("gchar*" "label" (null-ok) (default "NULL")) - ) -) - -(define-method get_uri - (of-object "GtkLinkButton") - (c-name "gtk_link_button_get_uri") - (return-type "const-gchar*") -) - -(define-method set_uri - (of-object "GtkLinkButton") - (c-name "gtk_link_button_set_uri") - (return-type "none") - (parameters - '("const-gchar*" "uri") - ) -) - -(define-function link_button_set_uri_hook - (c-name "gtk_link_button_set_uri_hook") - (return-type "GtkLinkButtonUriFunc") - (parameters - '("GtkLinkButtonUriFunc" "func") - '("gpointer" "data") - '("GDestroyNotify" "destroy") - ) -) - - - -;; From gtklist.h - - - -;; From gtklistitem.h - - - -;; From gtkliststore.h - - - -;; From gtkmain.h - - - -;; From gtkmarshal.h - - - -;; From gtkmenubar.h - - - -;; From gtkmenu.h - - - -;; From gtkmenuitem.h - - - -;; From gtkmenushell.h - - - -;; From gtkmenutoolbutton.h - - - -;; From gtkmessagedialog.h - -(define-method set_image - (of-object "GtkMessageDialog") - (c-name "gtk_message_dialog_set_image") - (return-type "none") - (parameters - '("GtkWidget*" "image") - ) -) - - -;; From gtkmisc.h - - - -;; From gtkmodules.h - - - -;; From gtknotebook.h - -(define-function notebook_set_window_creation_hook - (c-name "gtk_notebook_set_window_creation_hook") - (return-type "none") - (parameters - '("GtkNotebookWindowCreationFunc" "func") - '("gpointer" "data") - '("GDestroyNotify" "destroy") - ) -) - -(define-method set_group_id - (of-object "GtkNotebook") - (c-name "gtk_notebook_set_group_id") - (return-type "none") - (parameters - '("gint" "group_id") - ) -) - -(define-method get_group_id - (of-object "GtkNotebook") - (c-name "gtk_notebook_get_group_id") - (return-type "gint") -) - -(define-method get_tab_reorderable - (of-object "GtkNotebook") - (c-name "gtk_notebook_get_tab_reorderable") - (return-type "gboolean") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-method set_tab_reorderable - (of-object "GtkNotebook") - (c-name "gtk_notebook_set_tab_reorderable") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("gboolean" "reorderable") - ) -) - -(define-method get_tab_detachable - (of-object "GtkNotebook") - (c-name "gtk_notebook_get_tab_detachable") - (return-type "gboolean") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-method set_tab_detachable - (of-object "GtkNotebook") - (c-name "gtk_notebook_set_tab_detachable") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("gboolean" "detachable") - ) -) - -(define-virtual reorder_tab - (of-object "GtkNotebook") - (return-type "none") - (parameters - '("GtkDirectionType" "direction") - '("gboolean" "move_to_last") - ) -) - -(define-virtual insert_page - (of-object "GtkNotebook") - (return-type "gint") - (parameters - '("GtkWidget*" "child") - '("GtkWidget*" "tab_label") - '("GtkWidget*" "menu_label") - '("gint" "position") - ) -) - - - -;; From gtkobject.h - - - -;; From gtkoldeditable.h - - - -;; From gtkoptionmenu.h - - - -;; From gtkpagesetup.h - -(define-function page_setup_get_type - (c-name "gtk_page_setup_get_type") - (return-type "GType") -) - -(define-function page_setup_new - (c-name "gtk_page_setup_new") - (is-constructor-of "GtkPageSetup") - (return-type "GtkPageSetup*") -) - -(define-method copy - (of-object "GtkPageSetup") - (c-name "gtk_page_setup_copy") - (return-type "GtkPageSetup*") -) - -(define-method get_orientation - (of-object "GtkPageSetup") - (c-name "gtk_page_setup_get_orientation") - (return-type "GtkPageOrientation") -) - -(define-method set_orientation - (of-object "GtkPageSetup") - (c-name "gtk_page_setup_set_orientation") - (return-type "none") - (parameters - '("GtkPageOrientation" "orientation") - ) -) - -(define-method get_paper_size - (of-object "GtkPageSetup") - (c-name "gtk_page_setup_get_paper_size") - (return-type "GtkPaperSize*") -) - -(define-method set_paper_size - (of-object "GtkPageSetup") - (c-name "gtk_page_setup_set_paper_size") - (return-type "none") - (parameters - '("GtkPaperSize*" "size") - ) -) - -(define-method get_top_margin - (of-object "GtkPageSetup") - (c-name "gtk_page_setup_get_top_margin") - (return-type "gdouble") - (parameters - '("GtkUnit" "unit") - ) -) - -(define-method set_top_margin - (of-object "GtkPageSetup") - (c-name "gtk_page_setup_set_top_margin") - (return-type "none") - (parameters - '("gdouble" "margin") - '("GtkUnit" "unit") - ) -) - -(define-method get_bottom_margin - (of-object "GtkPageSetup") - (c-name "gtk_page_setup_get_bottom_margin") - (return-type "gdouble") - (parameters - '("GtkUnit" "unit") - ) -) - -(define-method set_bottom_margin - (of-object "GtkPageSetup") - (c-name "gtk_page_setup_set_bottom_margin") - (return-type "none") - (parameters - '("gdouble" "margin") - '("GtkUnit" "unit") - ) -) - -(define-method get_left_margin - (of-object "GtkPageSetup") - (c-name "gtk_page_setup_get_left_margin") - (return-type "gdouble") - (parameters - '("GtkUnit" "unit") - ) -) - -(define-method set_left_margin - (of-object "GtkPageSetup") - (c-name "gtk_page_setup_set_left_margin") - (return-type "none") - (parameters - '("gdouble" "margin") - '("GtkUnit" "unit") - ) -) - -(define-method get_right_margin - (of-object "GtkPageSetup") - (c-name "gtk_page_setup_get_right_margin") - (return-type "gdouble") - (parameters - '("GtkUnit" "unit") - ) -) - -(define-method set_right_margin - (of-object "GtkPageSetup") - (c-name "gtk_page_setup_set_right_margin") - (return-type "none") - (parameters - '("gdouble" "margin") - '("GtkUnit" "unit") - ) -) - -(define-method set_paper_size_and_default_margins - (of-object "GtkPageSetup") - (c-name "gtk_page_setup_set_paper_size_and_default_margins") - (return-type "none") - (parameters - '("GtkPaperSize*" "size") - ) -) - -(define-method get_paper_width - (of-object "GtkPageSetup") - (c-name "gtk_page_setup_get_paper_width") - (return-type "gdouble") - (parameters - '("GtkUnit" "unit") - ) -) - -(define-method get_paper_height - (of-object "GtkPageSetup") - (c-name "gtk_page_setup_get_paper_height") - (return-type "gdouble") - (parameters - '("GtkUnit" "unit") - ) -) - -(define-method get_page_width - (of-object "GtkPageSetup") - (c-name "gtk_page_setup_get_page_width") - (return-type "gdouble") - (parameters - '("GtkUnit" "unit") - ) -) - -(define-method get_page_height - (of-object "GtkPageSetup") - (c-name "gtk_page_setup_get_page_height") - (return-type "gdouble") - (parameters - '("GtkUnit" "unit") - ) -) - - - -;; From gtkpaned.h - - - -;; From gtkpapersize.h - -(define-function paper_size_get_type - (c-name "gtk_paper_size_get_type") - (return-type "GType") -) - -(define-function paper_size_new - (c-name "gtk_paper_size_new") - (is-constructor-of "GtkPaperSize") - (return-type "GtkPaperSize*") - (parameters - '("const-gchar*" "name" (null-ok) (default "NULL")) - ) -) - -(define-function paper_size_new_from_ppd - (c-name "gtk_paper_size_new_from_ppd") - (return-type "GtkPaperSize*") - (parameters - '("const-gchar*" "ppd_name") - '("const-gchar*" "ppd_display_name") - '("gdouble" "width") - '("gdouble" "height") - ) -) - -(define-function paper_size_new_custom - (c-name "gtk_paper_size_new_custom") - (return-type "GtkPaperSize*") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "display_name") - '("gdouble" "width") - '("gdouble" "height") - '("GtkUnit" "unit") - ) -) - -(define-method copy - (of-object "GtkPaperSize") - (c-name "gtk_paper_size_copy") - (return-type "GtkPaperSize*") -) - -(define-method free - (of-object "GtkPaperSize") - (c-name "gtk_paper_size_free") - (return-type "none") -) - -(define-method is_equal - (of-object "GtkPaperSize") - (c-name "gtk_paper_size_is_equal") - (return-type "gboolean") - (parameters - '("GtkPaperSize*" "size2") - ) -) - -(define-method get_name - (of-object "GtkPaperSize") - (c-name "gtk_paper_size_get_name") - (return-type "const-gchar*") -) - -(define-method get_display_name - (of-object "GtkPaperSize") - (c-name "gtk_paper_size_get_display_name") - (return-type "const-gchar*") -) - -(define-method get_ppd_name - (of-object "GtkPaperSize") - (c-name "gtk_paper_size_get_ppd_name") - (return-type "const-gchar*") -) - -(define-method get_width - (of-object "GtkPaperSize") - (c-name "gtk_paper_size_get_width") - (return-type "gdouble") - (parameters - '("GtkUnit" "unit") - ) -) - -(define-method get_height - (of-object "GtkPaperSize") - (c-name "gtk_paper_size_get_height") - (return-type "gdouble") - (parameters - '("GtkUnit" "unit") - ) -) - -(define-method is_custom - (of-object "GtkPaperSize") - (c-name "gtk_paper_size_is_custom") - (return-type "gboolean") -) - -(define-method set_size - (of-object "GtkPaperSize") - (c-name "gtk_paper_size_set_size") - (return-type "none") - (parameters - '("gdouble" "width") - '("gdouble" "height") - '("GtkUnit" "unit") - ) -) - -(define-method get_default_top_margin - (of-object "GtkPaperSize") - (c-name "gtk_paper_size_get_default_top_margin") - (return-type "gdouble") - (parameters - '("GtkUnit" "unit") - ) -) - -(define-method get_default_bottom_margin - (of-object "GtkPaperSize") - (c-name "gtk_paper_size_get_default_bottom_margin") - (return-type "gdouble") - (parameters - '("GtkUnit" "unit") - ) -) - -(define-method get_default_left_margin - (of-object "GtkPaperSize") - (c-name "gtk_paper_size_get_default_left_margin") - (return-type "gdouble") - (parameters - '("GtkUnit" "unit") - ) -) - -(define-method get_default_right_margin - (of-object "GtkPaperSize") - (c-name "gtk_paper_size_get_default_right_margin") - (return-type "gdouble") - (parameters - '("GtkUnit" "unit") - ) -) - -(define-function paper_size_get_default - (c-name "gtk_paper_size_get_default") - (return-type "const-gchar*") -) - - - -;; From gtkpixmap.h - - - -;; From gtkplug.h - - - -;; From gtkpreview.h - - - -;; From gtkprintcontext.h - -(define-function print_context_get_type - (c-name "gtk_print_context_get_type") - (return-type "GType") -) - -(define-method get_cairo_context - (of-object "GtkPrintContext") - (c-name "gtk_print_context_get_cairo_context") - (return-type "cairo_t*") -) - -(define-method get_page_setup - (of-object "GtkPrintContext") - (c-name "gtk_print_context_get_page_setup") - (return-type "GtkPageSetup*") -) - -(define-method get_width - (of-object "GtkPrintContext") - (c-name "gtk_print_context_get_width") - (return-type "gdouble") -) - -(define-method get_height - (of-object "GtkPrintContext") - (c-name "gtk_print_context_get_height") - (return-type "gdouble") -) - -(define-method get_dpi_x - (of-object "GtkPrintContext") - (c-name "gtk_print_context_get_dpi_x") - (return-type "gdouble") -) - -(define-method get_dpi_y - (of-object "GtkPrintContext") - (c-name "gtk_print_context_get_dpi_y") - (return-type "gdouble") -) - -(define-method get_pango_fontmap - (of-object "GtkPrintContext") - (c-name "gtk_print_context_get_pango_fontmap") - (return-type "PangoFontMap*") -) - -(define-method create_pango_context - (of-object "GtkPrintContext") - (c-name "gtk_print_context_create_pango_context") - (return-type "PangoContext*") -) - -(define-method create_pango_layout - (of-object "GtkPrintContext") - (c-name "gtk_print_context_create_pango_layout") - (return-type "PangoLayout*") -) - -(define-method set_cairo_context - (of-object "GtkPrintContext") - (c-name "gtk_print_context_set_cairo_context") - (return-type "none") - (parameters - '("cairo_t*" "cr") - '("double" "dpi_x") - '("double" "dpi_y") - ) -) - - - -;; From gtkprintoperation.h - -(define-function print_error_quark - (c-name "gtk_print_error_quark") - (return-type "GQuark") -) - -(define-function print_operation_get_type - (c-name "gtk_print_operation_get_type") - (return-type "GType") -) - -(define-function print_operation_new - (c-name "gtk_print_operation_new") - (is-constructor-of "GtkPrintOperation") - (return-type "GtkPrintOperation*") -) - -(define-method set_default_page_setup - (of-object "GtkPrintOperation") - (c-name "gtk_print_operation_set_default_page_setup") - (return-type "none") - (parameters - '("GtkPageSetup*" "default_page_setup" (null-ok) (default "NULL")) - ) -) - -(define-method get_default_page_setup - (of-object "GtkPrintOperation") - (c-name "gtk_print_operation_get_default_page_setup") - (return-type "GtkPageSetup*") -) - -(define-method set_print_settings - (of-object "GtkPrintOperation") - (c-name "gtk_print_operation_set_print_settings") - (return-type "none") - (parameters - '("GtkPrintSettings*" "print_settings" (null-ok) (default "NULL")) - ) -) - -(define-method get_print_settings - (of-object "GtkPrintOperation") - (c-name "gtk_print_operation_get_print_settings") - (return-type "GtkPrintSettings*") -) - -(define-method set_job_name - (of-object "GtkPrintOperation") - (c-name "gtk_print_operation_set_job_name") - (return-type "none") - (parameters - '("const-gchar*" "job_name") - ) -) - -(define-method set_n_pages - (of-object "GtkPrintOperation") - (c-name "gtk_print_operation_set_n_pages") - (return-type "none") - (parameters - '("gint" "n_pages") - ) -) - -(define-method set_current_page - (of-object "GtkPrintOperation") - (c-name "gtk_print_operation_set_current_page") - (return-type "none") - (parameters - '("gint" "current_page") - ) -) - -(define-method set_use_full_page - (of-object "GtkPrintOperation") - (c-name "gtk_print_operation_set_use_full_page") - (return-type "none") - (parameters - '("gboolean" "full_page") - ) -) - -(define-method set_unit - (of-object "GtkPrintOperation") - (c-name "gtk_print_operation_set_unit") - (return-type "none") - (parameters - '("GtkUnit" "unit") - ) -) - -(define-method set_export_filename - (of-object "GtkPrintOperation") - (c-name "gtk_print_operation_set_export_filename") - (return-type "none") - (parameters - '("const-gchar*" "filename") - ) -) - -(define-method set_track_print_status - (of-object "GtkPrintOperation") - (c-name "gtk_print_operation_set_track_print_status") - (return-type "none") - (parameters - '("gboolean" "track_status") - ) -) - -(define-method set_show_progress - (of-object "GtkPrintOperation") - (c-name "gtk_print_operation_set_show_progress") - (return-type "none") - (parameters - '("gboolean" "show_progress") - ) -) - -(define-method set_allow_async - (of-object "GtkPrintOperation") - (c-name "gtk_print_operation_set_allow_async") - (return-type "none") - (parameters - '("gboolean" "allow_async") - ) -) - -(define-method set_custom_tab_label - (of-object "GtkPrintOperation") - (c-name "gtk_print_operation_set_custom_tab_label") - (return-type "none") - (parameters - '("const-gchar*" "label") - ) -) - -(define-method run - (of-object "GtkPrintOperation") - (c-name "gtk_print_operation_run") - (return-type "GtkPrintOperationResult") - (parameters - '("GtkPrintOperationAction" "action") - '("GtkWindow*" "parent" (null-ok) (default "NULL")) - '("GError**" "error") - ) -) - -(define-method get_error - (of-object "GtkPrintOperation") - (c-name "gtk_print_operation_get_error") - (return-type "none") - (parameters - '("GError**" "error") - ) -) - -(define-method get_status - (of-object "GtkPrintOperation") - (c-name "gtk_print_operation_get_status") - (return-type "GtkPrintStatus") -) - -(define-method get_status_string - (of-object "GtkPrintOperation") - (c-name "gtk_print_operation_get_status_string") - (return-type "const-gchar*") -) - -(define-method is_finished - (of-object "GtkPrintOperation") - (c-name "gtk_print_operation_is_finished") - (return-type "gboolean") -) - -(define-method cancel - (of-object "GtkPrintOperation") - (c-name "gtk_print_operation_cancel") - (return-type "none") -) - -(define-function print_run_page_setup_dialog - (c-name "gtk_print_run_page_setup_dialog") - (return-type "GtkPageSetup*") - (parameters - '("GtkWindow*" "parent" (null-ok)) - '("GtkPageSetup*" "page_setup" (null-ok)) - '("GtkPrintSettings*" "settings") - ) -) - -(define-function print_run_page_setup_dialog_async - (c-name "gtk_print_run_page_setup_dialog_async") - (return-type "none") - (parameters - '("GtkWindow*" "parent") - '("GtkPageSetup*" "page_setup") - '("GtkPrintSettings*" "settings") - '("GtkPageSetupDoneFunc" "done_cb") - '("gpointer" "data") - ) -) - -(define-virtual done - (of-object "GtkPrintOperation") - (return-type "none") - (parameters - '("GtkPrintOperationResult" "result") - ) -) - -(define-virtual begin_print - (of-object "GtkPrintOperation") - (return-type "none") - (parameters - '("GtkPrintContext*" "context") - ) -) - -(define-virtual paginate - (of-object "GtkPrintOperation") - (return-type "gboolean") - (parameters - '("GtkPrintContext*" "context") - ) -) - -(define-virtual request_page_setup - (of-object "GtkPrintOperation") - (return-type "none") - (parameters - '("GtkPrintContext*" "context") - '("gint" "page_nr") - '("GtkPageSetup*" "setup") - ) -) - -(define-virtual draw_page - (of-object "GtkPrintOperation") - (return-type "none") - (parameters - '("GtkPrintContext*" "context") - '("gint" "page_nr") - ) -) - -(define-virtual end_print - (of-object "GtkPrintOperation") - (return-type "none") - (parameters - '("GtkPrintContext*" "context") - ) -) - -(define-virtual status_changed - (of-object "GtkPrintOperation") - (return-type "none") -) - -(define-virtual create_custom_widget - (of-object "GtkPrintOperation") - (return-type "GtkWidget*") -) - -(define-virtual custom_widget_apply - (of-object "GtkPrintOperation") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - ) -) - -(define-virtual preview - (of-object "GtkPrintOperation") - (return-type "gboolean") - (parameters - '("GtkPrintOperationPreview*" "preview") - '("GtkPrintContext*" "context") - '("GtkWindow*" "parent") - ) -) - - - -;; From gtkprintoperationpreview.h - -(define-function print_operation_preview_get_type - (c-name "gtk_print_operation_preview_get_type") - (return-type "GType") -) - -(define-method render_page - (of-object "GtkPrintOperationPreview") - (c-name "gtk_print_operation_preview_render_page") - (return-type "none") - (parameters - '("gint" "page_nr") - ) -) - -(define-method end_preview - (of-object "GtkPrintOperationPreview") - (c-name "gtk_print_operation_preview_end_preview") - (return-type "none") -) - -(define-method is_selected - (of-object "GtkPrintOperationPreview") - (c-name "gtk_print_operation_preview_is_selected") - (return-type "gboolean") - (parameters - '("gint" "page_nr") - ) -) - -(define-virtual ready - (of-object "GtkPrintOperationPreview") - (return-type "none") - (parameters - '("GtkPrintContext*" "context") - ) -) -(define-virtual got_page_size - (of-object "GtkPrintOperationPreview") - (return-type "none") - (parameters - '("GtkPrintContext*" "context") - '("GtkPageSetup*" "page_setup") - ) -) -(define-virtual render_page - (of-object "GtkPrintOperationPreview") - (return-type "none") - (parameters - '("gint" "page_nr") - ) -) -(define-virtual is_selected - (of-object "GtkPrintOperationPreview") - (return-type "gboolean") - (parameters - '("gint" "page_nr") - ) -) -(define-virtual end_preview - (of-object "GtkPrintOperationPreview") - (return-type "none") -) - - -;; From gtkprintsettings.h - -(define-function print_settings_get_type - (c-name "gtk_print_settings_get_type") - (return-type "GType") -) - -(define-function print_settings_new - (c-name "gtk_print_settings_new") - (is-constructor-of "GtkPrintSettings") - (return-type "GtkPrintSettings*") -) - -(define-method copy - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_copy") - (return-type "GtkPrintSettings*") -) - -(define-method has_key - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_has_key") - (return-type "gboolean") - (parameters - '("const-gchar*" "key") - ) -) - -(define-method get - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get") - (return-type "const-gchar*") - (parameters - '("const-gchar*" "key") - ) -) - -(define-method set - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set") - (return-type "none") - (parameters - '("const-gchar*" "key") - '("const-gchar*" "value" (null-ok)) - ) -) - -(define-method unset - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_unset") - (return-type "none") - (parameters - '("const-gchar*" "key") - ) -) - -(define-method foreach - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_foreach") - (return-type "none") - (parameters - '("GtkPrintSettingsFunc" "func") - '("gpointer" "user_data" (null-ok) (default "NULL")) - ) -) - -(define-method get_bool - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_bool") - (return-type "gboolean") - (parameters - '("const-gchar*" "key") - ) -) - -(define-method set_bool - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_bool") - (return-type "none") - (parameters - '("const-gchar*" "key") - '("gboolean" "value") - ) -) - -(define-method get_double - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_double") - (return-type "gdouble") - (parameters - '("const-gchar*" "key") - ) -) - -(define-method get_double_with_default - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_double_with_default") - (return-type "gdouble") - (parameters - '("const-gchar*" "key") - '("gdouble" "def") - ) -) - -(define-method set_double - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_double") - (return-type "none") - (parameters - '("const-gchar*" "key") - '("gdouble" "value") - ) -) - -(define-method get_length - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_length") - (return-type "gdouble") - (parameters - '("const-gchar*" "key") - '("GtkUnit" "unit") - ) -) - -(define-method set_length - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_length") - (return-type "none") - (parameters - '("const-gchar*" "key") - '("gdouble" "value") - '("GtkUnit" "unit") - ) -) - -(define-method get_int - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_int") - (return-type "gint") - (parameters - '("const-gchar*" "key") - ) -) - -(define-method get_int_with_default - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_int_with_default") - (return-type "gint") - (parameters - '("const-gchar*" "key") - '("gint" "def") - ) -) - -(define-method set_int - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_int") - (return-type "none") - (parameters - '("const-gchar*" "key") - '("gint" "value") - ) -) - -(define-method get_printer - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_printer") - (return-type "const-gchar*") -) - -(define-method set_printer - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_printer") - (return-type "none") - (parameters - '("const-gchar*" "printer") - ) -) - -(define-method get_orientation - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_orientation") - (return-type "GtkPageOrientation") -) - -(define-method set_orientation - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_orientation") - (return-type "none") - (parameters - '("GtkPageOrientation" "orientation") - ) -) - -(define-method get_paper_size - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_paper_size") - (return-type "GtkPaperSize*") -) - -(define-method set_paper_size - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_paper_size") - (return-type "none") - (parameters - '("GtkPaperSize*" "paper_size") - ) -) - -(define-method get_paper_width - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_paper_width") - (return-type "gdouble") - (parameters - '("GtkUnit" "unit") - ) -) - -(define-method set_paper_width - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_paper_width") - (return-type "none") - (parameters - '("gdouble" "width") - '("GtkUnit" "unit") - ) -) - -(define-method get_paper_height - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_paper_height") - (return-type "gdouble") - (parameters - '("GtkUnit" "unit") - ) -) - -(define-method set_paper_height - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_paper_height") - (return-type "none") - (parameters - '("gdouble" "height") - '("GtkUnit" "unit") - ) -) - -(define-method get_use_color - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_use_color") - (return-type "gboolean") -) - -(define-method set_use_color - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_use_color") - (return-type "none") - (parameters - '("gboolean" "use_color") - ) -) - -(define-method get_collate - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_collate") - (return-type "gboolean") -) - -(define-method set_collate - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_collate") - (return-type "none") - (parameters - '("gboolean" "collate") - ) -) - -(define-method get_reverse - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_reverse") - (return-type "gboolean") -) - -(define-method set_reverse - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_reverse") - (return-type "none") - (parameters - '("gboolean" "reverse") - ) -) - -(define-method get_duplex - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_duplex") - (return-type "GtkPrintDuplex") -) - -(define-method set_duplex - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_duplex") - (return-type "none") - (parameters - '("GtkPrintDuplex" "duplex") - ) -) - -(define-method get_quality - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_quality") - (return-type "GtkPrintQuality") -) - -(define-method set_quality - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_quality") - (return-type "none") - (parameters - '("GtkPrintQuality" "quality") - ) -) - -(define-method get_n_copies - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_n_copies") - (return-type "gint") -) - -(define-method set_n_copies - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_n_copies") - (return-type "none") - (parameters - '("gint" "num_copies") - ) -) - -(define-method get_number_up - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_number_up") - (return-type "gint") -) - -(define-method set_number_up - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_number_up") - (return-type "none") - (parameters - '("gint" "number_up") - ) -) - -(define-method get_resolution - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_resolution") - (return-type "gint") -) - -(define-method set_resolution - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_resolution") - (return-type "none") - (parameters - '("gint" "resolution") - ) -) - -(define-method get_scale - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_scale") - (return-type "gdouble") -) - -(define-method set_scale - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_scale") - (return-type "none") - (parameters - '("gdouble" "scale") - ) -) - -(define-method get_print_pages - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_print_pages") - (return-type "GtkPrintPages") -) - -(define-method set_print_pages - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_print_pages") - (return-type "none") - (parameters - '("GtkPrintPages" "pages") - ) -) - -(define-method get_page_ranges - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_page_ranges") - (return-type "GtkPageRange*") - (parameters - '("gint*" "num_ranges") - ) -) - -(define-method set_page_ranges - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_page_ranges") - (return-type "none") - (parameters - '("GtkPageRange*" "page_ranges") - '("gint" "num_ranges") - ) -) - -(define-method get_page_set - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_page_set") - (return-type "GtkPageSet") -) - -(define-method set_page_set - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_page_set") - (return-type "none") - (parameters - '("GtkPageSet" "page_set") - ) -) - -(define-method get_default_source - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_default_source") - (return-type "const-gchar*") -) - -(define-method set_default_source - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_default_source") - (return-type "none") - (parameters - '("const-gchar*" "default_source") - ) -) - -(define-method get_media_type - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_media_type") - (return-type "const-gchar*") -) - -(define-method set_media_type - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_media_type") - (return-type "none") - (parameters - '("const-gchar*" "media_type") - ) -) - -(define-method get_dither - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_dither") - (return-type "const-gchar*") -) - -(define-method set_dither - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_dither") - (return-type "none") - (parameters - '("const-gchar*" "dither") - ) -) - -(define-method get_finishings - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_finishings") - (return-type "const-gchar*") -) - -(define-method set_finishings - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_finishings") - (return-type "none") - (parameters - '("const-gchar*" "finishings") - ) -) - -(define-method get_output_bin - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_get_output_bin") - (return-type "const-gchar*") -) - -(define-method set_output_bin - (of-object "GtkPrintSettings") - (c-name "gtk_print_settings_set_output_bin") - (return-type "none") - (parameters - '("const-gchar*" "output_bin") - ) -) - - - -;; From gtkprivate.h - - - -;; From gtkprogressbar.h - - - -;; From gtkprogress.h - - - -;; From gtkradioaction.h - -(define-method set_current_value - (of-object "GtkRadioAction") - (c-name "gtk_radio_action_set_current_value") - (return-type "none") - (parameters - '("gint" "current_value") - ) -) - - - -;; From gtkradiobutton.h - - - -;; From gtkradiomenuitem.h - - - -;; From gtkradiotoolbutton.h - - - -;; From gtkrange.h - -(define-method set_lower_stepper_sensitivity - (of-object "GtkRange") - (c-name "gtk_range_set_lower_stepper_sensitivity") - (return-type "none") - (parameters - '("GtkSensitivityType" "sensitivity") - ) -) - -(define-method get_lower_stepper_sensitivity - (of-object "GtkRange") - (c-name "gtk_range_get_lower_stepper_sensitivity") - (return-type "GtkSensitivityType") -) - -(define-method set_upper_stepper_sensitivity - (of-object "GtkRange") - (c-name "gtk_range_set_upper_stepper_sensitivity") - (return-type "none") - (parameters - '("GtkSensitivityType" "sensitivity") - ) -) - -(define-method get_upper_stepper_sensitivity - (of-object "GtkRange") - (c-name "gtk_range_get_upper_stepper_sensitivity") - (return-type "GtkSensitivityType") -) - - - -;; From gtkrc.h - - - -;; From gtkrecentchooserdialog.h - -(define-function recent_chooser_dialog_get_type - (c-name "gtk_recent_chooser_dialog_get_type") - (return-type "GType") -) - -(define-function recent_chooser_dialog_new - (c-name "gtk_recent_chooser_dialog_new") - (is-constructor-of "GtkRecentChooserDialog") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "title") - '("GtkWindow*" "parent") - '("const-gchar*" "first_button_text") - ) - (varargs #t) -) - -(define-function recent_chooser_dialog_new_for_manager - (c-name "gtk_recent_chooser_dialog_new_for_manager") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "title") - '("GtkWindow*" "parent") - '("GtkRecentManager*" "manager") - '("const-gchar*" "first_button_text") - ) - (varargs #t) -) - - - -;; From gtkrecentchooser.h - -(define-function recent_chooser_error_quark - (c-name "gtk_recent_chooser_error_quark") - (return-type "GQuark") -) - -(define-function recent_chooser_get_type - (c-name "gtk_recent_chooser_get_type") - (return-type "GType") -) - -(define-method set_show_private - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_set_show_private") - (return-type "none") - (parameters - '("gboolean" "show_private") - ) -) - -(define-method get_show_private - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_get_show_private") - (return-type "gboolean") -) - -(define-method set_show_not_found - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_set_show_not_found") - (return-type "none") - (parameters - '("gboolean" "show_not_found") - ) -) - -(define-method get_show_not_found - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_get_show_not_found") - (return-type "gboolean") -) - -(define-method set_select_multiple - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_set_select_multiple") - (return-type "none") - (parameters - '("gboolean" "select_multiple") - ) -) - -(define-method get_select_multiple - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_get_select_multiple") - (return-type "gboolean") -) - -(define-method set_limit - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_set_limit") - (return-type "none") - (parameters - '("gint" "limit") - ) -) - -(define-method get_limit - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_get_limit") - (return-type "gint") -) - -(define-method set_local_only - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_set_local_only") - (return-type "none") - (parameters - '("gboolean" "local_only") - ) -) - -(define-method get_local_only - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_get_local_only") - (return-type "gboolean") -) - -(define-method set_show_tips - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_set_show_tips") - (return-type "none") - (parameters - '("gboolean" "show_tips") - ) -) - -(define-method get_show_tips - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_get_show_tips") - (return-type "gboolean") -) - -(define-method set_show_numbers - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_set_show_numbers") - (return-type "none") - (parameters - '("gboolean" "show_numbers") - ) -) - -(define-method get_show_numbers - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_get_show_numbers") - (return-type "gboolean") -) - -(define-method set_show_icons - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_set_show_icons") - (return-type "none") - (parameters - '("gboolean" "show_icons") - ) -) - -(define-method get_show_icons - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_get_show_icons") - (return-type "gboolean") -) - -(define-method set_sort_type - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_set_sort_type") - (return-type "none") - (parameters - '("GtkRecentSortType" "sort_type") - ) -) - -(define-method get_sort_type - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_get_sort_type") - (return-type "GtkRecentSortType") -) - -(define-method set_sort_func - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_set_sort_func") - (return-type "none") - (parameters - '("GtkRecentSortFunc" "sort_func") - '("gpointer" "sort_data") - '("GDestroyNotify" "data_destroy") - ) -) - -(define-method set_current_uri - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_set_current_uri") - (return-type "gboolean") - (parameters - '("const-gchar*" "uri") - '("GError**" "error") - ) -) - -(define-method get_current_uri - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_get_current_uri") - (return-type "gchar*") -) - -(define-method get_current_item - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_get_current_item") - (return-type "GtkRecentInfo*") -) - -(define-method select_uri - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_select_uri") - (return-type "gboolean") - (parameters - '("const-gchar*" "uri") - '("GError**" "error") - ) -) - -(define-method unselect_uri - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_unselect_uri") - (return-type "none") - (parameters - '("const-gchar*" "uri") - ) -) - -(define-method select_all - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_select_all") - (return-type "none") -) - -(define-method unselect_all - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_unselect_all") - (return-type "none") -) - -(define-method get_items - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_get_items") - (return-type "GList*") -) - -(define-method get_uris - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_get_uris") - (return-type "gchar**") - (parameters - '("gsize*" "length") - ) -) - -(define-method add_filter - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_add_filter") - (return-type "none") - (parameters - '("GtkRecentFilter*" "filter") - ) -) - -(define-method remove_filter - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_remove_filter") - (return-type "none") - (parameters - '("GtkRecentFilter*" "filter") - ) -) - -(define-method list_filters - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_list_filters") - (return-type "GSList*") -) - -(define-method set_filter - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_set_filter") - (return-type "none") - (parameters - '("GtkRecentFilter*" "filter") - ) -) - -(define-method get_filter - (of-object "GtkRecentChooser") - (c-name "gtk_recent_chooser_get_filter") - (return-type "GtkRecentFilter*") -) - -(define-virtual set_current_uri - (of-object "GtkRecentChooser") - (return-type "gboolean") - (parameters - '("const-gchar*" "uri") - '("GError**" "error") - ) -) -(define-virtual get_current_uri - (of-object "GtkRecentChooser") - (return-type "gchar*") -) -(define-virtual select_uri - (of-object "GtkRecentChooser") - (return-type "gboolean") - (parameters - '("const-gchar*" "uri") - '("GError**" "error") - ) -) -(define-virtual unselect_uri - (of-object "GtkRecentChooser") - (return-type "none") - (parameters - '("const-gchar*" "uri") - ) -) -(define-virtual select_all - (of-object "GtkRecentChooser") - (return-type "none") -) -(define-virtual unselect_all - (of-object "GtkRecentChooser") - (return-type "none") -) -(define-virtual get_items - (of-object "GtkRecentChooser") - (return-type "GList*") -) -(define-virtual get_recent_manager - (of-object "GtkRecentChooser") - (return-type "GtkRecentManager*") -) -(define-virtual add_filter - (of-object "GtkRecentChooser") - (return-type "none") - (parameters - '("GtkRecentFilter*" "filter") - ) -) -(define-virtual remove_filter - (of-object "GtkRecentChooser") - (return-type "none") - (parameters - '("GtkRecentFilter*" "filter") - ) -) -(define-virtual list_filters - (of-object "GtkRecentChooser") - (return-type "GSList*") -) -(define-virtual set_sort_func - (of-object "GtkRecentChooser") - (return-type "none") - (parameters - '("GtkRecentSortFunc" "sort_func") - '("gpointer" "data") - '("GDestroyNotify" "destroy") - ) -) -(define-virtual item_activated - (of-object "GtkRecentChooser") - (return-type "none") -) -(define-virtual selection_changed - (of-object "GtkRecentChooser") - (return-type "none") -) - - -;; From gtkrecentchoosermenu.h - -(define-function recent_chooser_menu_get_type - (c-name "gtk_recent_chooser_menu_get_type") - (return-type "GType") -) - -(define-function recent_chooser_menu_new - (c-name "gtk_recent_chooser_menu_new") - (return-type "GtkWidget*") -) - -(define-function recent_chooser_menu_new_for_manager - (c-name "gtk_recent_chooser_menu_new_for_manager") - (is-constructor-of "GtkRecentChooserMenu") - (return-type "GtkWidget*") - (properties - '("recent-manager" (argname "manager") (optional)) - ) -) - -(define-method get_show_numbers - (of-object "GtkRecentChooserMenu") - (c-name "gtk_recent_chooser_menu_get_show_numbers") - (return-type "gboolean") -) - -(define-method set_show_numbers - (of-object "GtkRecentChooserMenu") - (c-name "gtk_recent_chooser_menu_set_show_numbers") - (return-type "none") - (parameters - '("gboolean" "show_numbers") - ) -) - - - -;; From gtkrecentchooserwidget.h - -(define-function recent_chooser_widget_get_type - (c-name "gtk_recent_chooser_widget_get_type") - (return-type "GType") -) - -(define-function recent_chooser_widget_new - (c-name "gtk_recent_chooser_widget_new") - (return-type "GtkWidget*") -) - -(define-function recent_chooser_widget_new_for_manager - (c-name "gtk_recent_chooser_widget_new_for_manager") - (is-constructor-of "GtkRecentChooserWidget") - (return-type "GtkWidget*") - (properties - '("recent-manager" (argname "manager") (optional)) - ) -) - - - -;; From gtkrecentfilter.h - -(define-function recent_filter_get_type - (c-name "gtk_recent_filter_get_type") - (return-type "GType") -) - -(define-function recent_filter_new - (c-name "gtk_recent_filter_new") - (is-constructor-of "GtkRecentFilter") - (return-type "GtkRecentFilter*") -) - -(define-method set_name - (of-object "GtkRecentFilter") - (c-name "gtk_recent_filter_set_name") - (return-type "none") - (parameters - '("const-gchar*" "name") - ) -) - -(define-method get_name - (of-object "GtkRecentFilter") - (c-name "gtk_recent_filter_get_name") - (return-type "const-gchar*") -) - -(define-method add_mime_type - (of-object "GtkRecentFilter") - (c-name "gtk_recent_filter_add_mime_type") - (return-type "none") - (parameters - '("const-gchar*" "mime_type") - ) -) - -(define-method add_pattern - (of-object "GtkRecentFilter") - (c-name "gtk_recent_filter_add_pattern") - (return-type "none") - (parameters - '("const-gchar*" "pattern") - ) -) - -(define-method add_pixbuf_formats - (of-object "GtkRecentFilter") - (c-name "gtk_recent_filter_add_pixbuf_formats") - (return-type "none") -) - -(define-method add_application - (of-object "GtkRecentFilter") - (c-name "gtk_recent_filter_add_application") - (return-type "none") - (parameters - '("const-gchar*" "application") - ) -) - -(define-method add_group - (of-object "GtkRecentFilter") - (c-name "gtk_recent_filter_add_group") - (return-type "none") - (parameters - '("const-gchar*" "group") - ) -) - -(define-method add_age - (of-object "GtkRecentFilter") - (c-name "gtk_recent_filter_add_age") - (return-type "none") - (parameters - '("gint" "days") - ) -) - -(define-method add_custom - (of-object "GtkRecentFilter") - (c-name "gtk_recent_filter_add_custom") - (return-type "none") - (parameters - '("GtkRecentFilterFlags" "needed") - '("GtkRecentFilterFunc" "func") - '("gpointer" "data") - '("GDestroyNotify" "data_destroy") - ) -) - -(define-method get_needed - (of-object "GtkRecentFilter") - (c-name "gtk_recent_filter_get_needed") - (return-type "GtkRecentFilterFlags") -) - -(define-method filter - (of-object "GtkRecentFilter") - (c-name "gtk_recent_filter_filter") - (return-type "gboolean") - (parameters - '("const-GtkRecentFilterInfo*" "filter_info") - ) -) - - - -;; From gtkrecentmanager.h - -(define-function recent_manager_error_quark - (c-name "gtk_recent_manager_error_quark") - (return-type "GQuark") -) - -(define-function recent_manager_get_type - (c-name "gtk_recent_manager_get_type") - (return-type "GType") -) - -(define-function recent_manager_new - (c-name "gtk_recent_manager_new") - (is-constructor-of "GtkRecentManager") - (return-type "GtkRecentManager*") -) - -(define-function recent_manager_get_default - (c-name "gtk_recent_manager_get_default") - (return-type "GtkRecentManager*") -) - -(define-function recent_manager_get_for_screen - (c-name "gtk_recent_manager_get_for_screen") - (return-type "GtkRecentManager*") - (parameters - '("GdkScreen*" "screen") - ) -) - -(define-method set_screen - (of-object "GtkRecentManager") - (c-name "gtk_recent_manager_set_screen") - (return-type "none") - (parameters - '("GdkScreen*" "screen") - ) -) - -(define-method add_item - (of-object "GtkRecentManager") - (c-name "gtk_recent_manager_add_item") - (return-type "gboolean") - (parameters - '("const-gchar*" "uri") - ) -) - -(define-method add_full - (of-object "GtkRecentManager") - (c-name "gtk_recent_manager_add_full") - (return-type "gboolean") - (parameters - '("const-gchar*" "uri") - '("const-GtkRecentData*" "recent_data") - ) -) - -(define-method remove_item - (of-object "GtkRecentManager") - (c-name "gtk_recent_manager_remove_item") - (return-type "gboolean") - (parameters - '("const-gchar*" "uri") - '("GError**" "error") - ) -) - -(define-method lookup_item - (of-object "GtkRecentManager") - (c-name "gtk_recent_manager_lookup_item") - (return-type "GtkRecentInfo*") - (parameters - '("const-gchar*" "uri") - '("GError**" "error") - ) -) - -(define-method has_item - (of-object "GtkRecentManager") - (c-name "gtk_recent_manager_has_item") - (return-type "gboolean") - (parameters - '("const-gchar*" "uri") - ) -) - -(define-method move_item - (of-object "GtkRecentManager") - (c-name "gtk_recent_manager_move_item") - (return-type "gboolean") - (parameters - '("const-gchar*" "uri") - '("const-gchar*" "new_uri") - '("GError**" "error") - ) -) - -(define-method set_limit - (of-object "GtkRecentManager") - (c-name "gtk_recent_manager_set_limit") - (return-type "none") - (parameters - '("gint" "limit") - ) -) - -(define-method get_limit - (of-object "GtkRecentManager") - (c-name "gtk_recent_manager_get_limit") - (return-type "gint") -) - -(define-method get_items - (of-object "GtkRecentManager") - (c-name "gtk_recent_manager_get_items") - (return-type "GList*") -) - -(define-method purge_items - (of-object "GtkRecentManager") - (c-name "gtk_recent_manager_purge_items") - (return-type "gint") - (parameters - '("GError**" "error") - ) -) - -(define-function recent_info_get_type - (c-name "gtk_recent_info_get_type") - (return-type "GType") -) - -(define-method ref - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_ref") - (return-type "GtkRecentInfo*") -) - -(define-method unref - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_unref") - (return-type "none") -) - -(define-method get_uri - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_get_uri") - (return-type "const-gchar*") -) - -(define-method get_display_name - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_get_display_name") - (return-type "const-gchar*") -) - -(define-method get_description - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_get_description") - (return-type "const-gchar*") -) - -(define-method get_mime_type - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_get_mime_type") - (return-type "const-gchar*") -) - -(define-method get_added - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_get_added") - (return-type "time_t") -) - -(define-method get_modified - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_get_modified") - (return-type "time_t") -) - -(define-method get_visited - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_get_visited") - (return-type "time_t") -) - -(define-method get_private_hint - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_get_private_hint") - (return-type "gboolean") -) - -(define-method get_application_info - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_get_application_info") - (return-type "gboolean") - (parameters - '("const-gchar*" "app_name") - '("gchar**" "app_exec") - '("guint*" "count") - '("time_t*" "time_") - ) -) - -(define-method get_applications - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_get_applications") - (return-type "gchar**") - (parameters - '("gsize*" "length") - ) -) - -(define-method last_application - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_last_application") - (return-type "gchar*") -) - -(define-method has_application - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_has_application") - (return-type "gboolean") - (parameters - '("const-gchar*" "app_name") - ) -) - -(define-method get_groups - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_get_groups") - (return-type "gchar**") - (parameters - '("gsize*" "length") - ) -) - -(define-method has_group - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_has_group") - (return-type "gboolean") - (parameters - '("const-gchar*" "group_name") - ) -) - -(define-method get_icon - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_get_icon") - (return-type "GdkPixbuf*") - (parameters - '("gint" "size") - ) -) - -(define-method get_short_name - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_get_short_name") - (return-type "gchar*") -) - -(define-method get_uri_display - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_get_uri_display") - (return-type "gchar*") -) - -(define-method get_age - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_get_age") - (return-type "gint") -) - -(define-method is_local - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_is_local") - (return-type "gboolean") -) - -(define-method exists - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_exists") - (return-type "gboolean") -) - -(define-method match - (of-object "GtkRecentInfo") - (c-name "gtk_recent_info_match") - (return-type "gboolean") - (parameters - '("GtkRecentInfo*" "info_b") - ) -) - -(define-virtual changed - (of-object "GtkRecentManager") - (return-type "none") -) - - - -;; From gtkruler.h - - - -;; From gtkscale.h - - - -;; From gtkscrollbar.h - - - -;; From gtkscrolledwindow.h - -(define-method unset_placement - (of-object "GtkScrolledWindow") - (c-name "gtk_scrolled_window_unset_placement") - (return-type "none") -) - - - -;; From gtkselection.h - -(define-function target_list_add_rich_text_targets - (c-name "gtk_target_list_add_rich_text_targets") - (return-type "none") - (parameters - '("guint" "info") - '("gboolean" "deserializable") - '("GtkTextBuffer*" "buffer") - ) -) - -(define-function target_table_new_from_list - (c-name "gtk_target_table_new_from_list") - (return-type "GtkTargetEntry*") - (parameters - '("GtkTargetList*" "list") - '("gint*" "n_targets") - ) -) - -(define-function target_table_free - (c-name "gtk_target_table_free") - (return-type "none") - (parameters - '("GtkTargetEntry*" "targets") - '("gint" "n_targets") - ) -) - -(define-method targets_include_rich_text - (of-object "GtkSelectionData") - (c-name "gtk_selection_data_targets_include_rich_text") - (return-type "gboolean") - (parameters - '("GtkTextBuffer*" "buffer") - ) -) - -(define-method targets_include_uri - (of-object "GtkSelectionData") - (c-name "gtk_selection_data_targets_include_uri") - (return-type "gboolean") -) - -(define-function targets_include_text - (c-name "gtk_targets_include_text") - (return-type "gboolean") - (parameters - '("GdkAtom*" "targets") - '("gint" "n_targets") - ) -) - -(define-function targets_include_rich_text - (c-name "gtk_targets_include_rich_text") - (return-type "gboolean") - (parameters - '("GdkAtom*" "targets") - '("gint" "n_targets") - '("GtkTextBuffer*" "buffer") - ) -) - -(define-function targets_include_image - (c-name "gtk_targets_include_image") - (return-type "gboolean") - (parameters - '("GdkAtom*" "targets") - '("gint" "n_targets") - '("gboolean" "writable") - ) -) - -(define-function targets_include_uri - (c-name "gtk_targets_include_uri") - (return-type "gboolean") - (parameters - '("GdkAtom*" "targets") - '("gint" "n_targets") - ) -) - -(define-function target_list_get_type - (c-name "gtk_target_list_get_type") - (return-type "GType") -) - - - -;; From gtkseparator.h - - - -;; From gtkseparatormenuitem.h - - - -;; From gtkseparatortoolitem.h - - - -;; From gtksettings.h - - - -;; From gtksignal.h - - - -;; From gtksizegroup.h - -(define-method get_widgets - (of-object "GtkSizeGroup") - (c-name "gtk_size_group_get_widgets") - (return-type "GSList*") -) - - - -;; From gtksocket.h - - - -;; From gtkspinbutton.h - -(define-virtual wrapped - (of-object "GtkSpinButton") - (return-type "none") -) - - - -;; From gtkstatusbar.h - - - -;; From gtkstatusicon.h - -(define-function status_icon_get_type - (c-name "gtk_status_icon_get_type") - (return-type "GType") -) - -(define-function status_icon_new - (c-name "gtk_status_icon_new") - (is-constructor-of "GtkStatusIcon") - (return-type "GtkStatusIcon*") -) - -(define-function status_icon_new_from_pixbuf - (c-name "gtk_status_icon_new_from_pixbuf") - (return-type "GtkStatusIcon*") - (parameters - '("GdkPixbuf*" "pixbuf") - ) -) - -(define-function status_icon_new_from_file - (c-name "gtk_status_icon_new_from_file") - (return-type "GtkStatusIcon*") - (parameters - '("const-gchar*" "filename") - ) -) - -(define-function status_icon_new_from_stock - (c-name "gtk_status_icon_new_from_stock") - (return-type "GtkStatusIcon*") - (parameters - '("const-gchar*" "stock_id") - ) -) - -(define-function status_icon_new_from_icon_name - (c-name "gtk_status_icon_new_from_icon_name") - (return-type "GtkStatusIcon*") - (parameters - '("const-gchar*" "icon_name") - ) -) - -(define-method set_from_pixbuf - (of-object "GtkStatusIcon") - (c-name "gtk_status_icon_set_from_pixbuf") - (return-type "none") - (parameters - '("GdkPixbuf*" "pixbuf" (null-ok)) - ) -) - -(define-method set_from_file - (of-object "GtkStatusIcon") - (c-name "gtk_status_icon_set_from_file") - (return-type "none") - (parameters - '("const-gchar*" "filename") - ) -) - -(define-method set_from_stock - (of-object "GtkStatusIcon") - (c-name "gtk_status_icon_set_from_stock") - (return-type "none") - (parameters - '("const-gchar*" "stock_id") - ) -) - -(define-method set_from_icon_name - (of-object "GtkStatusIcon") - (c-name "gtk_status_icon_set_from_icon_name") - (return-type "none") - (parameters - '("const-gchar*" "icon_name") - ) -) - -(define-method get_storage_type - (of-object "GtkStatusIcon") - (c-name "gtk_status_icon_get_storage_type") - (return-type "GtkImageType") -) - -(define-method get_pixbuf - (of-object "GtkStatusIcon") - (c-name "gtk_status_icon_get_pixbuf") - (return-type "GdkPixbuf*") -) - -(define-method get_stock - (of-object "GtkStatusIcon") - (c-name "gtk_status_icon_get_stock") - (return-type "const-gchar*") -) - -(define-method get_icon_name - (of-object "GtkStatusIcon") - (c-name "gtk_status_icon_get_icon_name") - (return-type "const-gchar*") -) - -(define-method get_size - (of-object "GtkStatusIcon") - (c-name "gtk_status_icon_get_size") - (return-type "gint") -) - -(define-method set_tooltip - (of-object "GtkStatusIcon") - (c-name "gtk_status_icon_set_tooltip") - (return-type "none") - (parameters - '("const-gchar*" "tooltip_text" (null-ok)) - ) -) - -(define-method set_visible - (of-object "GtkStatusIcon") - (c-name "gtk_status_icon_set_visible") - (return-type "none") - (parameters - '("gboolean" "visible") - ) -) - -(define-method get_visible - (of-object "GtkStatusIcon") - (c-name "gtk_status_icon_get_visible") - (return-type "gboolean") -) - -(define-method set_blinking - (of-object "GtkStatusIcon") - (c-name "gtk_status_icon_set_blinking") - (return-type "none") - (parameters - '("gboolean" "blinking") - ) -) - -(define-method get_blinking - (of-object "GtkStatusIcon") - (c-name "gtk_status_icon_get_blinking") - (return-type "gboolean") -) - -(define-method is_embedded - (of-object "GtkStatusIcon") - (c-name "gtk_status_icon_is_embedded") - (return-type "gboolean") -) - -(define-function status_icon_position_menu - (c-name "gtk_status_icon_position_menu") - (return-type "none") - (parameters - '("GtkMenu*" "menu") - '("gint*" "x") - '("gint*" "y") - '("gboolean*" "push_in") - '("gpointer" "user_data") - ) -) - -(define-method get_geometry - (of-object "GtkStatusIcon") - (c-name "gtk_status_icon_get_geometry") - (return-type "gboolean") - (parameters - '("GdkScreen**" "screen") - '("GdkRectangle*" "area") - '("GtkOrientation*" "orientation") - ) -) - -(define-virtual activate - (of-object "GtkStatusIcon") - (return-type "none") -) - -(define-virtual popup_menu - (of-object "GtkStatusIcon") - (return-type "none") - (parameters - '("guint" "button") - '("guint32" "activate_time") - ) -) - -(define-virtual size_changed - (of-object "GtkStatusIcon") - (return-type "gboolean") - (parameters - '("gint" "size") - ) -) - - - -;; From gtkstock.h - - - -;; From gtkstyle.h - -(define-method lookup_color - (of-object "GtkStyle") - (c-name "gtk_style_lookup_color") - (return-type "gboolean") - (parameters - '("const-gchar*" "color_name") - '("GdkColor*" "color") - ) -) - - - -;; From gtktable.h - - - -;; From gtktearoffmenuitem.h - - - -;; From gtktextbuffer.h - -(define-method get_has_selection - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_has_selection") - (return-type "gboolean") -) - -(define-method get_copy_target_list - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_copy_target_list") - (return-type "GtkTargetList*") -) - -(define-method get_paste_target_list - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_paste_target_list") - (return-type "GtkTargetList*") -) - - - -;; From gtktextbufferrichtext.h - -(define-method register_serialize_format - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_register_serialize_format") - (return-type "GdkAtom") - (parameters - '("const-gchar*" "mime_type") - '("GtkTextBufferSerializeFunc" "function") - '("gpointer" "user_data") - '("GDestroyNotify" "user_data_destroy") - ) -) - -(define-method register_serialize_tagset - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_register_serialize_tagset") - (return-type "GdkAtom") - (parameters - '("const-gchar*" "tagset_name" (null-ok) (default "NULL")) - ) -) - -(define-method register_deserialize_format - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_register_deserialize_format") - (return-type "GdkAtom") - (parameters - '("const-gchar*" "mime_type") - '("GtkTextBufferDeserializeFunc" "function") - '("gpointer" "user_data") - '("GDestroyNotify" "user_data_destroy") - ) -) - -(define-method register_deserialize_tagset - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_register_deserialize_tagset") - (return-type "GdkAtom") - (parameters - '("const-gchar*" "tagset_name" (null-ok) (default "NULL")) - ) -) - -(define-method unregister_serialize_format - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_unregister_serialize_format") - (return-type "none") - (parameters - '("GdkAtom" "format") - ) -) - -(define-method unregister_deserialize_format - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_unregister_deserialize_format") - (return-type "none") - (parameters - '("GdkAtom" "format") - ) -) - -(define-method deserialize_set_can_create_tags - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_deserialize_set_can_create_tags") - (return-type "none") - (parameters - '("GdkAtom" "format") - '("gboolean" "can_create_tags") - ) -) - -(define-method deserialize_get_can_create_tags - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_deserialize_get_can_create_tags") - (return-type "gboolean") - (parameters - '("GdkAtom" "format") - ) -) - -(define-method get_serialize_formats - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_serialize_formats") - (return-type "GdkAtom*") - (parameters - '("gint*" "n_formats") - ) -) - -(define-method get_deserialize_formats - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_deserialize_formats") - (return-type "GdkAtom*") - (parameters - '("gint*" "n_formats") - ) -) - -(define-method serialize - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_serialize") - (return-type "guint8*") - (parameters - '("GtkTextBuffer*" "content_buffer") - '("GdkAtom" "format") - '("const-GtkTextIter*" "start") - '("const-GtkTextIter*" "end") - '("gsize*" "length") - ) -) - -(define-method deserialize - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_deserialize") - (return-type "gboolean") - (parameters - '("GtkTextBuffer*" "content_buffer") - '("GdkAtom" "format") - '("GtkTextIter*" "iter") - '("const-guint8*" "data") - '("gsize" "length") - '("GError**" "error") - ) -) - - - -;; From gtktextchild.h - - - -;; From gtktextdisplay.h - - - -;; From gtktext.h - - - -;; From gtktextiter.h - - - -;; From gtktextlayout.h - - - -;; From gtktextmark.h - - - -;; From gtktexttag.h - - - -;; From gtktexttagtable.h - - - -;; From gtktextview.h - - - -;; From gtktipsquery.h - - - -;; From gtktoggleaction.h - - - -;; From gtktogglebutton.h - - - -;; From gtktoggletoolbutton.h - - - -;; From gtktoolbar.h - - - -;; From gtktoolbutton.h - - - -;; From gtktoolitem.h - - - -;; From gtktooltips.h - - - -;; From gtktreednd.h - - - -;; From gtktree.h - - - -;; From gtktreeitem.h - - - -;; From gtktreemodelfilter.h - - - -;; From gtktreemodel.h - - - -;; From gtktreemodelsort.h - - - -;; From gtktreeselection.h - - - -;; From gtktreesortable.h - - - -;; From gtktreestore.h - -(define-method insert_with_values - (of-object "GtkTreeStore") - (c-name "gtk_tree_store_insert_with_values") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreeIter*" "parent") - '("gint" "position") - ) - (varargs #t) -) - -(define-method insert_with_valuesv - (of-object "GtkTreeStore") - (c-name "gtk_tree_store_insert_with_valuesv") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreeIter*" "parent") - '("gint" "position") - '("gint*" "columns") - '("GValue*" "values") - '("gint" "n_values") - ) -) - - - -;; From gtktreeviewcolumn.h - - - -;; From gtktreeview.h - -(define-method get_headers_clickable - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_headers_clickable") - (return-type "gboolean") -) - -(define-method get_search_entry - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_search_entry") - (return-type "GtkEntry*") -) - -(define-method set_search_entry - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_search_entry") - (return-type "none") - (parameters - '("GtkEntry*" "entry" (null-ok) (default "NULL")) - ) -) - -(define-method get_search_position_func - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_search_position_func") - (return-type "GtkTreeViewSearchPositionFunc") -) - -(define-method set_search_position_func - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_search_position_func") - (return-type "none") - (parameters - '("GtkTreeViewSearchPositionFunc" "func") - '("gpointer" "data") - '("GDestroyNotify" "destroy") - ) -) - -(define-method set_rubber_banding - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_rubber_banding") - (return-type "none") - (parameters - '("gboolean" "enable") - ) -) - -(define-method get_rubber_banding - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_rubber_banding") - (return-type "gboolean") -) - -(define-method get_grid_lines - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_grid_lines") - (return-type "GtkTreeViewGridLines") -) - -(define-method set_grid_lines - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_grid_lines") - (return-type "none") - (parameters - '("GtkTreeViewGridLines" "grid_lines") - ) -) - -(define-method get_enable_tree_lines - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_enable_tree_lines") - (return-type "gboolean") -) - -(define-method set_enable_tree_lines - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_enable_tree_lines") - (return-type "none") - (parameters - '("gboolean" "enabled") - ) -) - - - -;; From gtktypebuiltins.h - -(define-function assistant_page_type_get_type - (c-name "gtk_assistant_page_type_get_type") - (return-type "GType") -) - -(define-function cell_renderer_accel_mode_get_type - (c-name "gtk_cell_renderer_accel_mode_get_type") - (return-type "GType") -) - -(define-function sensitivity_type_get_type - (c-name "gtk_sensitivity_type_get_type") - (return-type "GType") -) - -(define-function print_pages_get_type - (c-name "gtk_print_pages_get_type") - (return-type "GType") -) - -(define-function page_set_get_type - (c-name "gtk_page_set_get_type") - (return-type "GType") -) - -(define-function page_orientation_get_type - (c-name "gtk_page_orientation_get_type") - (return-type "GType") -) - -(define-function print_quality_get_type - (c-name "gtk_print_quality_get_type") - (return-type "GType") -) - -(define-function print_duplex_get_type - (c-name "gtk_print_duplex_get_type") - (return-type "GType") -) - -(define-function unit_get_type - (c-name "gtk_unit_get_type") - (return-type "GType") -) - -(define-function tree_view_grid_lines_get_type - (c-name "gtk_tree_view_grid_lines_get_type") - (return-type "GType") -) - -(define-function print_operation_action_get_type - (c-name "gtk_print_operation_action_get_type") - (return-type "GType") -) - -(define-function recent_sort_type_get_type - (c-name "gtk_recent_sort_type_get_type") - (return-type "GType") -) - -(define-function recent_chooser_error_get_type - (c-name "gtk_recent_chooser_error_get_type") - (return-type "GType") -) - -(define-function recent_filter_flags_get_type - (c-name "gtk_recent_filter_flags_get_type") - (return-type "GType") -) - -(define-function recent_manager_error_get_type - (c-name "gtk_recent_manager_error_get_type") - (return-type "GType") -) - -(define-function text_buffer_target_info_get_type - (c-name "gtk_text_buffer_target_info_get_type") - (return-type "GType") -) - - - -;; From gtktypeutils.h - - - -;; From gtkuimanager.h - - - -;; From gtkvbbox.h - - - -;; From gtkvbox.h - - - -;; From gtkversion.h - - - -;; From gtkviewport.h - - - -;; From gtkvpaned.h - - - -;; From gtkvruler.h - - - -;; From gtkvscale.h - - - -;; From gtkvscrollbar.h - - - -;; From gtkvseparator.h - - - -;; From gtkwidget.h - -(define-method is_composited - (of-object "GtkWidget") - (c-name "gtk_widget_is_composited") - (return-type "gboolean") -) - -(define-method input_shape_combine_mask - (of-object "GtkWidget") - (c-name "gtk_widget_input_shape_combine_mask") - (return-type "none") - (parameters - '("GdkBitmap*" "shape_mask" (null-ok)) - '("gint" "offset_x") - '("gint" "offset_y") - ) -) - -(define-virtual composited_changed - (of-object "GtkWidget") - (return-type "none") -) - - - -;; From gtkwindow.h - -(define-method set_deletable - (of-object "GtkWindow") - (c-name "gtk_window_set_deletable") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_deletable - (of-object "GtkWindow") - (c-name "gtk_window_get_deletable") - (return-type "gboolean") -) - -(define-method get_group - (of-object "GtkWindow") - (c-name "gtk_window_get_group") - (return-type "GtkWindowGroup*") -) - - diff --git a/gtk/gtk-base-types.defs b/gtk/gtk-base-types.defs deleted file mode 100644 index 73aac81d..00000000 --- a/gtk/gtk-base-types.defs +++ /dev/null @@ -1,2735 +0,0 @@ -;; -*- scheme -*- -;; -;; Note, everything should be sorted in here. - -;; Boxed types ... - -(define-boxed Border - (in-module "Gtk") - (c-name "GtkBorder") - (gtype-id "GTK_TYPE_BORDER") - (copy-func "gtk_border_copy") - (release-func "gtk_border_free") -) - -(define-boxed IconInfo - (in-module "Gtk") - (c-name "GtkIconInfo") - (gtype-id "GTK_TYPE_ICON_INFO") - (copy-func "gtk_icon_info_copy") - (release-func "gtk_icon_info_free") -) - -(define-boxed IconSet - (in-module "Gtk") - (c-name "GtkIconSet") - (gtype-id "GTK_TYPE_ICON_SET") -) - -(define-boxed IconSource - (in-module "Gtk") - (c-name "GtkIconSource") - (gtype-id "GTK_TYPE_ICON_SOURCE") - (copy-func "gtk_icon_source_copy") - (release-func "gtk_icon_source_free") -) - -(define-boxed Requisition - (in-module "Gtk") - (c-name "GtkRequisition") - (gtype-id "GTK_TYPE_REQUISITION") - (fields - '("gint" "width") - '("gint" "height") - ) -) - -(define-boxed SelectionData - (in-module "Gtk") - (c-name "GtkSelectionData") - (gtype-id "GTK_TYPE_SELECTION_DATA") - (copy-func "gtk_selection_data_copy") - (release-func "gtk_selection_data_free") - (fields - '("GdkAtom" "selection") - '("GdkAtom" "target") - '("GdkAtom" "type") - '("gint" "format") - '("guchar*" "data") - ) -) - -(define-boxed TextAttributes - (in-module "Gtk") - (c-name "GtkTextAttributes") - (gtype-id "GTK_TYPE_TEXT_ATTRIBUTES") - (fields - '("GdkColor" "bg_color") - '("GdkColor" "fg_color") - '("GdkBitmap" "bg_stipple") - '("GdkBitmap" "fg_stipple") - '("gint" "rise") - '("guint" "underline") - '("guint" "strikethrough") - '("guint" "draw_bg") - '("GtkJustification" "justification") - '("GtkTextDirection" "direction") - '("PangoFontDescription*" "font") - '("gdouble" "font_scale") - '("gint" "left_margin") - '("gint" "indent") - '("gint" "right_margin") - '("gint" "pixels_above_lines") - '("gint" "pixels_below_lines") - '("gint" "pixels_inside_wrap") - '("PangoTabArray*" "tabs") - '("GtkWrapMode" "wrap_mode") - '("PangoLanguage*" "language") - '("guint" "invisible") - '("guint" "bg_full_height") - '("guint" "editable") - '("guint" "realized") - '("guint" "pad1") - '("guint" "pad2") - '("guint" "pad3") - '("guint" "pad4") - ) -) - -(define-boxed TextIter - (in-module "Gtk") - (c-name "GtkTextIter") - (gtype-id "GTK_TYPE_TEXT_ITER") - (copy-func "gtk_text_iter_copy") - (release-func "gtk_text_iter_free") -) - -(define-boxed TreeIter - (in-module "Gtk") - (c-name "GtkTreeIter") - (gtype-id "GTK_TYPE_TREE_ITER") - (copy-func "gtk_tree_iter_copy") - (release-func "gtk_tree_iter_free") -) - -(define-boxed TreeRowReference - (in-module "Gtk") - (c-name "GtkTreeRowReference") - (gtype-id "GTK_TYPE_TREE_ROW_REFERENCE") - (copy-func "gtk_tree_row_reference_copy") - (release-func "gtk_tree_row_reference_free") -) - -;; Enumerations ... - -(define-enum AnchorType - (in-module "Gtk") - (c-name "GtkAnchorType") - (gtype-id "GTK_TYPE_ANCHOR_TYPE") - (values - '("center" "GTK_ANCHOR_CENTER") - '("north" "GTK_ANCHOR_NORTH") - '("north-west" "GTK_ANCHOR_NORTH_WEST") - '("north-east" "GTK_ANCHOR_NORTH_EAST") - '("south" "GTK_ANCHOR_SOUTH") - '("south-west" "GTK_ANCHOR_SOUTH_WEST") - '("south-east" "GTK_ANCHOR_SOUTH_EAST") - '("west" "GTK_ANCHOR_WEST") - '("east" "GTK_ANCHOR_EAST") - '("n" "GTK_ANCHOR_N") - '("nw" "GTK_ANCHOR_NW") - '("ne" "GTK_ANCHOR_NE") - '("s" "GTK_ANCHOR_S") - '("sw" "GTK_ANCHOR_SW") - '("se" "GTK_ANCHOR_SE") - '("w" "GTK_ANCHOR_W") - '("e" "GTK_ANCHOR_E") - ) -) - -(define-enum ArrowType - (in-module "Gtk") - (c-name "GtkArrowType") - (gtype-id "GTK_TYPE_ARROW_TYPE") - (values - '("up" "GTK_ARROW_UP") - '("down" "GTK_ARROW_DOWN") - '("left" "GTK_ARROW_LEFT") - '("right" "GTK_ARROW_RIGHT") - ) -) - -(define-enum ButtonBoxStyle - (in-module "Gtk") - (c-name "GtkButtonBoxStyle") - (gtype-id "GTK_TYPE_BUTTON_BOX_STYLE") - (values - '("default-style" "GTK_BUTTONBOX_DEFAULT_STYLE") - '("spread" "GTK_BUTTONBOX_SPREAD") - '("edge" "GTK_BUTTONBOX_EDGE") - '("start" "GTK_BUTTONBOX_START") - '("end" "GTK_BUTTONBOX_END") - ) -) - -(define-enum ButtonsType - (in-module "Gtk") - (c-name "GtkButtonsType") - (gtype-id "GTK_TYPE_BUTTONS_TYPE") - (values - '("none" "GTK_BUTTONS_NONE") - '("ok" "GTK_BUTTONS_OK") - '("close" "GTK_BUTTONS_CLOSE") - '("cancel" "GTK_BUTTONS_CANCEL") - '("yes-no" "GTK_BUTTONS_YES_NO") - '("ok-cancel" "GTK_BUTTONS_OK_CANCEL") - ) -) - -(define-enum CellRendererMode - (in-module "Gtk") - (c-name "GtkCellRendererMode") - (gtype-id "GTK_TYPE_CELL_RENDERER_MODE") - (values - '("inert" "GTK_CELL_RENDERER_MODE_INERT") - '("activatable" "GTK_CELL_RENDERER_MODE_ACTIVATABLE") - '("editable" "GTK_CELL_RENDERER_MODE_EDITABLE") - ) -) - -(define-enum CellType - (in-module "Gtk") - (c-name "GtkCellType") - (gtype-id "GTK_TYPE_CELL_TYPE") - (values - '("empty" "GTK_CELL_EMPTY") - '("text" "GTK_CELL_TEXT") - '("pixmap" "GTK_CELL_PIXMAP") - '("pixtext" "GTK_CELL_PIXTEXT") - '("widget" "GTK_CELL_WIDGET") - ) -) - -(define-enum CListDragPos - (in-module "Gtk") - (c-name "GtkCListDragPos") - (gtype-id "GTK_TYPE_CLIST_DRAG_POS") - (values - '("none" "GTK_CLIST_DRAG_NONE") - '("before" "GTK_CLIST_DRAG_BEFORE") - '("into" "GTK_CLIST_DRAG_INTO") - '("after" "GTK_CLIST_DRAG_AFTER") - ) -) - -(define-enum CornerType - (in-module "Gtk") - (c-name "GtkCornerType") - (gtype-id "GTK_TYPE_CORNER_TYPE") - (values - '("top-left" "GTK_CORNER_TOP_LEFT") - '("bottom-left" "GTK_CORNER_BOTTOM_LEFT") - '("top-right" "GTK_CORNER_TOP_RIGHT") - '("bottom-right" "GTK_CORNER_BOTTOM_RIGHT") - ) -) - -(define-enum CTreeExpanderStyle - (in-module "Gtk") - (c-name "GtkCTreeExpanderStyle") - (gtype-id "GTK_TYPE_CTREE_EXPANDER_STYLE") - (values - '("none" "GTK_CTREE_EXPANDER_NONE") - '("square" "GTK_CTREE_EXPANDER_SQUARE") - '("triangle" "GTK_CTREE_EXPANDER_TRIANGLE") - '("circular" "GTK_CTREE_EXPANDER_CIRCULAR") - ) -) - -(define-enum CTreeExpansionType - (in-module "Gtk") - (c-name "GtkCTreeExpansionType") - (gtype-id "GTK_TYPE_CTREE_EXPANSION_TYPE") - (values - '("expand" "GTK_CTREE_EXPANSION_EXPAND") - '("expand-recursive" "GTK_CTREE_EXPANSION_EXPAND_RECURSIVE") - '("collapse" "GTK_CTREE_EXPANSION_COLLAPSE") - '("collapse-recursive" "GTK_CTREE_EXPANSION_COLLAPSE_RECURSIVE") - '("toggle" "GTK_CTREE_EXPANSION_TOGGLE") - '("toggle-recursive" "GTK_CTREE_EXPANSION_TOGGLE_RECURSIVE") - ) -) - -(define-enum CTreeLineStyle - (in-module "Gtk") - (c-name "GtkCTreeLineStyle") - (gtype-id "GTK_TYPE_CTREE_LINE_STYLE") - (values - '("none" "GTK_CTREE_LINES_NONE") - '("solid" "GTK_CTREE_LINES_SOLID") - '("dotted" "GTK_CTREE_LINES_DOTTED") - '("tabbed" "GTK_CTREE_LINES_TABBED") - ) -) - -(define-enum CTreePos - (in-module "Gtk") - (c-name "GtkCTreePos") - (gtype-id "GTK_TYPE_CTREE_POS") - (values - '("before" "GTK_CTREE_POS_BEFORE") - '("as-child" "GTK_CTREE_POS_AS_CHILD") - '("after" "GTK_CTREE_POS_AFTER") - ) -) - -(define-enum CurveType - (in-module "Gtk") - (c-name "GtkCurveType") - (gtype-id "GTK_TYPE_CURVE_TYPE") - (values - '("linear" "GTK_CURVE_TYPE_LINEAR") - '("spline" "GTK_CURVE_TYPE_SPLINE") - '("free" "GTK_CURVE_TYPE_FREE") - ) -) - -(define-enum DeleteType - (in-module "Gtk") - (c-name "GtkDeleteType") - (gtype-id "GTK_TYPE_DELETE_TYPE") - (values - '("chars" "GTK_DELETE_CHARS") - '("word-ends" "GTK_DELETE_WORD_ENDS") - '("words" "GTK_DELETE_WORDS") - '("display-lines" "GTK_DELETE_DISPLAY_LINES") - '("display-line-ends" "GTK_DELETE_DISPLAY_LINE_ENDS") - '("paragraph-ends" "GTK_DELETE_PARAGRAPH_ENDS") - '("paragraphs" "GTK_DELETE_PARAGRAPHS") - '("whitespace" "GTK_DELETE_WHITESPACE") - ) -) - -(define-enum DirectionType - (in-module "Gtk") - (c-name "GtkDirectionType") - (gtype-id "GTK_TYPE_DIRECTION_TYPE") - (values - '("tab-forward" "GTK_DIR_TAB_FORWARD") - '("tab-backward" "GTK_DIR_TAB_BACKWARD") - '("up" "GTK_DIR_UP") - '("down" "GTK_DIR_DOWN") - '("left" "GTK_DIR_LEFT") - '("right" "GTK_DIR_RIGHT") - ) -) - -(define-enum ExpanderStyle - (in-module "Gtk") - (c-name "GtkExpanderStyle") - (gtype-id "GTK_TYPE_EXPANDER_STYLE") - (values - '("collapsed" "GTK_EXPANDER_COLLAPSED") - '("semi-collapsed" "GTK_EXPANDER_SEMI_COLLAPSED") - '("semi-expanded" "GTK_EXPANDER_SEMI_EXPANDED") - '("expanded" "GTK_EXPANDER_EXPANDED") - ) -) - -(define-enum FileChooserAction - (in-module "Gtk") - (c-name "GtkFileChooserAction") - (gtype-id "GTK_TYPE_FILE_CHOOSER_ACTION") - (values - '("open" "GTK_FILE_CHOOSER_ACTION_OPEN") - '("save" "GTK_FILE_CHOOSER_ACTION_SAVE") - '("select-folder" "GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER") - '("create-folder" "GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER") - ) -) - -(define-enum FileChooserConfirmation - (in-module "Gtk") - (c-name "GtkFileChooserConfirmation") - (gtype-id "GTK_TYPE_FILE_CHOOSER_CONFIRMATION") - (values - '("confirm" "GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM") - '("accept-filename" "GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME") - '("select-again" "GTK_FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN") - ) -) - -(define-enum FileChooserError - (in-module "Gtk") - (c-name "GtkFileChooserError") - (gtype-id "GTK_TYPE_FILE_CHOOSER_ERROR") - (values - '("nonexistent" "GTK_FILE_CHOOSER_ERROR_NONEXISTENT") - '("bad-filename" "GTK_FILE_CHOOSER_ERROR_BAD_FILENAME") - ) -) - -(define-enum IconSize - (in-module "Gtk") - (c-name "GtkIconSize") - (gtype-id "GTK_TYPE_ICON_SIZE") - (values - '("invalid" "GTK_ICON_SIZE_INVALID") - '("menu" "GTK_ICON_SIZE_MENU") - '("small-toolbar" "GTK_ICON_SIZE_SMALL_TOOLBAR") - '("large-toolbar" "GTK_ICON_SIZE_LARGE_TOOLBAR") - '("button" "GTK_ICON_SIZE_BUTTON") - '("dnd" "GTK_ICON_SIZE_DND") - '("dialog" "GTK_ICON_SIZE_DIALOG") - ) -) - -(define-enum IconThemeError - (in-module "Gtk") - (c-name "GtkIconThemeError") - (gtype-id "GTK_TYPE_ICON_THEME_ERROR") - (values - '("not-found" "GTK_ICON_THEME_NOT_FOUND") - '("failed" "GTK_ICON_THEME_FAILED") - ) -) - -(define-enum IconViewDropPosition - (in-module "Gtk") - (c-name "GtkIconViewDropPosition") - (gtype-id "GTK_TYPE_ICON_VIEW_DROP_POSITION") - (values - '("no-drop" "GTK_ICON_VIEW_NO_DROP") - '("drop-into" "GTK_ICON_VIEW_DROP_INTO") - '("drop-left" "GTK_ICON_VIEW_DROP_LEFT") - '("drop-right" "GTK_ICON_VIEW_DROP_RIGHT") - '("drop-above" "GTK_ICON_VIEW_DROP_ABOVE") - '("drop-below" "GTK_ICON_VIEW_DROP_BELOW") - ) -) - -(define-enum ImageType - (in-module "Gtk") - (c-name "GtkImageType") - (gtype-id "GTK_TYPE_IMAGE_TYPE") - (values - '("empty" "GTK_IMAGE_EMPTY") - '("pixmap" "GTK_IMAGE_PIXMAP") - '("image" "GTK_IMAGE_IMAGE") - '("pixbuf" "GTK_IMAGE_PIXBUF") - '("stock" "GTK_IMAGE_STOCK") - '("icon-set" "GTK_IMAGE_ICON_SET") - '("animation" "GTK_IMAGE_ANIMATION") - ) -) - -(define-enum IMPreeditStyle - (in-module "Gtk") - (c-name "GtkIMPreeditStyle") - (gtype-id "GTK_TYPE_IM_PREEDIT_STYLE") - (values - '("nothing" "GTK_IM_PREEDIT_NOTHING") - '("callback" "GTK_IM_PREEDIT_CALLBACK") - '("none" "GTK_IM_PREEDIT_NONE") - ) -) - -(define-enum IMStatusStyle - (in-module "Gtk") - (c-name "GtkIMStatusStyle") - (gtype-id "GTK_TYPE_IM_STATUS_STYLE") - (values - '("nothing" "GTK_IM_STATUS_NOTHING") - '("callback" "GTK_IM_STATUS_CALLBACK") - ) -) - -(define-enum PackDirection - (in-module "Gtk") - (c-name "GtkPackDirection") - (gtype-id "GTK_TYPE_PACK_DIRECTION") - (values - '("ltr" "GTK_PACK_DIRECTION_LTR") - '("rtl" "GTK_PACK_DIRECTION_RTL") - '("ttb" "GTK_PACK_DIRECTION_TTB") - '("btt" "GTK_PACK_DIRECTION_BTT") - ) -) - -(define-enum Justification - (in-module "Gtk") - (c-name "GtkJustification") - (gtype-id "GTK_TYPE_JUSTIFICATION") - (values - '("left" "GTK_JUSTIFY_LEFT") - '("right" "GTK_JUSTIFY_RIGHT") - '("center" "GTK_JUSTIFY_CENTER") - '("fill" "GTK_JUSTIFY_FILL") - ) -) - -(define-enum MatchType - (in-module "Gtk") - (c-name "GtkMatchType") - (gtype-id "GTK_TYPE_MATCH_TYPE") - (values - '("all" "GTK_MATCH_ALL") - '("all-tail" "GTK_MATCH_ALL_TAIL") - '("head" "GTK_MATCH_HEAD") - '("tail" "GTK_MATCH_TAIL") - '("exact" "GTK_MATCH_EXACT") - '("last" "GTK_MATCH_LAST") - ) -) - -(define-enum MenuDirectionType - (in-module "Gtk") - (c-name "GtkMenuDirectionType") - (gtype-id "GTK_TYPE_MENU_DIRECTION_TYPE") - (values - '("parent" "GTK_MENU_DIR_PARENT") - '("child" "GTK_MENU_DIR_CHILD") - '("next" "GTK_MENU_DIR_NEXT") - '("prev" "GTK_MENU_DIR_PREV") - ) -) - -(define-enum MessageType - (in-module "Gtk") - (c-name "GtkMessageType") - (gtype-id "GTK_TYPE_MESSAGE_TYPE") - (values - '("info" "GTK_MESSAGE_INFO") - '("warning" "GTK_MESSAGE_WARNING") - '("question" "GTK_MESSAGE_QUESTION") - '("error" "GTK_MESSAGE_ERROR") - ) -) - -(define-enum MetricType - (in-module "Gtk") - (c-name "GtkMetricType") - (gtype-id "GTK_TYPE_METRIC_TYPE") - (values - '("pixels" "GTK_PIXELS") - '("inches" "GTK_INCHES") - '("centimeters" "GTK_CENTIMETERS") - ) -) - -(define-enum MovementStep - (in-module "Gtk") - (c-name "GtkMovementStep") - (gtype-id "GTK_TYPE_MOVEMENT_STEP") - (values - '("logical-positions" "GTK_MOVEMENT_LOGICAL_POSITIONS") - '("visual-positions" "GTK_MOVEMENT_VISUAL_POSITIONS") - '("words" "GTK_MOVEMENT_WORDS") - '("display-lines" "GTK_MOVEMENT_DISPLAY_LINES") - '("display-line-ends" "GTK_MOVEMENT_DISPLAY_LINE_ENDS") - '("paragraphs" "GTK_MOVEMENT_PARAGRAPHS") - '("paragraph-ends" "GTK_MOVEMENT_PARAGRAPH_ENDS") - '("pages" "GTK_MOVEMENT_PAGES") - '("buffer-ends" "GTK_MOVEMENT_BUFFER_ENDS") - '("horizontal-pages" "GTK_MOVEMENT_HORIZONTAL_PAGES") - ) -) - -(define-enum NotebookTab - (in-module "Gtk") - (c-name "GtkNotebookTab") - (gtype-id "GTK_TYPE_NOTEBOOK_TAB") - (values - '("first" "GTK_NOTEBOOK_TAB_FIRST") - '("last" "GTK_NOTEBOOK_TAB_LAST") - ) -) - -(define-enum Orientation - (in-module "Gtk") - (c-name "GtkOrientation") - (gtype-id "GTK_TYPE_ORIENTATION") - (values - '("horizontal" "GTK_ORIENTATION_HORIZONTAL") - '("vertical" "GTK_ORIENTATION_VERTICAL") - ) -) - -(define-enum PackType - (in-module "Gtk") - (c-name "GtkPackType") - (gtype-id "GTK_TYPE_PACK_TYPE") - (values - '("start" "GTK_PACK_START") - '("end" "GTK_PACK_END") - ) -) - -(define-enum PathPriorityType - (in-module "Gtk") - (c-name "GtkPathPriorityType") - (gtype-id "GTK_TYPE_PATH_PRIORITY_TYPE") - (values - '("lowest" "GTK_PATH_PRIO_LOWEST") - '("gtk" "GTK_PATH_PRIO_GTK") - '("application" "GTK_PATH_PRIO_APPLICATION") - '("theme" "GTK_PATH_PRIO_THEME") - '("rc" "GTK_PATH_PRIO_RC") - '("highest" "GTK_PATH_PRIO_HIGHEST") - ) -) - -(define-enum PathType - (in-module "Gtk") - (c-name "GtkPathType") - (gtype-id "GTK_TYPE_PATH_TYPE") - (values - '("widget" "GTK_PATH_WIDGET") - '("widget-class" "GTK_PATH_WIDGET_CLASS") - '("class" "GTK_PATH_CLASS") - ) -) - -(define-enum PolicyType - (in-module "Gtk") - (c-name "GtkPolicyType") - (gtype-id "GTK_TYPE_POLICY_TYPE") - (values - '("always" "GTK_POLICY_ALWAYS") - '("automatic" "GTK_POLICY_AUTOMATIC") - '("never" "GTK_POLICY_NEVER") - ) -) - -(define-enum PositionType - (in-module "Gtk") - (c-name "GtkPositionType") - (gtype-id "GTK_TYPE_POSITION_TYPE") - (values - '("left" "GTK_POS_LEFT") - '("right" "GTK_POS_RIGHT") - '("top" "GTK_POS_TOP") - '("bottom" "GTK_POS_BOTTOM") - ) -) - -(define-enum PreviewType - (in-module "Gtk") - (c-name "GtkPreviewType") - (gtype-id "GTK_TYPE_PREVIEW_TYPE") - (values - '("color" "GTK_PREVIEW_COLOR") - '("grayscale" "GTK_PREVIEW_GRAYSCALE") - ) -) - -(define-enum ProgressBarOrientation - (in-module "Gtk") - (c-name "GtkProgressBarOrientation") - (gtype-id "GTK_TYPE_PROGRESS_BAR_ORIENTATION") - (values - '("left-to-right" "GTK_PROGRESS_LEFT_TO_RIGHT") - '("right-to-left" "GTK_PROGRESS_RIGHT_TO_LEFT") - '("bottom-to-top" "GTK_PROGRESS_BOTTOM_TO_TOP") - '("top-to-bottom" "GTK_PROGRESS_TOP_TO_BOTTOM") - ) -) - -(define-enum ProgressBarStyle - (in-module "Gtk") - (c-name "GtkProgressBarStyle") - (gtype-id "GTK_TYPE_PROGRESS_BAR_STYLE") - (values - '("continuous" "GTK_PROGRESS_CONTINUOUS") - '("discrete" "GTK_PROGRESS_DISCRETE") - ) -) - -(define-enum RcTokenType - (in-module "Gtk") - (c-name "GtkRcTokenType") - (gtype-id "GTK_TYPE_RC_TOKEN_TYPE") - (values - '("invalid" "GTK_RC_TOKEN_INVALID") - '("include" "GTK_RC_TOKEN_INCLUDE") - '("normal" "GTK_RC_TOKEN_NORMAL") - '("active" "GTK_RC_TOKEN_ACTIVE") - '("prelight" "GTK_RC_TOKEN_PRELIGHT") - '("selected" "GTK_RC_TOKEN_SELECTED") - '("insensitive" "GTK_RC_TOKEN_INSENSITIVE") - '("fg" "GTK_RC_TOKEN_FG") - '("bg" "GTK_RC_TOKEN_BG") - '("text" "GTK_RC_TOKEN_TEXT") - '("base" "GTK_RC_TOKEN_BASE") - '("xthickness" "GTK_RC_TOKEN_XTHICKNESS") - '("ythickness" "GTK_RC_TOKEN_YTHICKNESS") - '("font" "GTK_RC_TOKEN_FONT") - '("fontset" "GTK_RC_TOKEN_FONTSET") - '("font-name" "GTK_RC_TOKEN_FONT_NAME") - '("bg-pixmap" "GTK_RC_TOKEN_BG_PIXMAP") - '("pixmap-path" "GTK_RC_TOKEN_PIXMAP_PATH") - '("style" "GTK_RC_TOKEN_STYLE") - '("binding" "GTK_RC_TOKEN_BINDING") - '("bind" "GTK_RC_TOKEN_BIND") - '("widget" "GTK_RC_TOKEN_WIDGET") - '("widget-class" "GTK_RC_TOKEN_WIDGET_CLASS") - '("class" "GTK_RC_TOKEN_CLASS") - '("lowest" "GTK_RC_TOKEN_LOWEST") - '("gtk" "GTK_RC_TOKEN_GTK") - '("application" "GTK_RC_TOKEN_APPLICATION") - '("theme" "GTK_RC_TOKEN_THEME") - '("rc" "GTK_RC_TOKEN_RC") - '("highest" "GTK_RC_TOKEN_HIGHEST") - '("engine" "GTK_RC_TOKEN_ENGINE") - '("module-path" "GTK_RC_TOKEN_MODULE_PATH") - '("im-module-path" "GTK_RC_TOKEN_IM_MODULE_PATH") - '("im-module-file" "GTK_RC_TOKEN_IM_MODULE_FILE") - '("stock" "GTK_RC_TOKEN_STOCK") - '("ltr" "GTK_RC_TOKEN_LTR") - '("rtl" "GTK_RC_TOKEN_RTL") - '("last" "GTK_RC_TOKEN_LAST") - ) -) - -(define-enum ReliefStyle - (in-module "Gtk") - (c-name "GtkReliefStyle") - (gtype-id "GTK_TYPE_RELIEF_STYLE") - (values - '("normal" "GTK_RELIEF_NORMAL") - '("half" "GTK_RELIEF_HALF") - '("none" "GTK_RELIEF_NONE") - ) -) - -(define-enum ResizeMode - (in-module "Gtk") - (c-name "GtkResizeMode") - (gtype-id "GTK_TYPE_RESIZE_MODE") - (values - '("parent" "GTK_RESIZE_PARENT") - '("queue" "GTK_RESIZE_QUEUE") - '("immediate" "GTK_RESIZE_IMMEDIATE") - ) -) - -(define-enum ResponseType - (in-module "Gtk") - (c-name "GtkResponseType") - (gtype-id "GTK_TYPE_RESPONSE_TYPE") - (values - '("none" "GTK_RESPONSE_NONE") - '("reject" "GTK_RESPONSE_REJECT") - '("accept" "GTK_RESPONSE_ACCEPT") - '("delete-event" "GTK_RESPONSE_DELETE_EVENT") - '("ok" "GTK_RESPONSE_OK") - '("cancel" "GTK_RESPONSE_CANCEL") - '("close" "GTK_RESPONSE_CLOSE") - '("yes" "GTK_RESPONSE_YES") - '("no" "GTK_RESPONSE_NO") - '("apply" "GTK_RESPONSE_APPLY") - '("help" "GTK_RESPONSE_HELP") - ) -) - -(define-enum ScrollStep - (in-module "Gtk") - (c-name "GtkScrollStep") - (gtype-id "GTK_TYPE_SCROLL_STEP") - (values - '("steps" "GTK_SCROLL_STEPS") - '("pages" "GTK_SCROLL_PAGES") - '("ends" "GTK_SCROLL_ENDS") - '("horizontal-steps" "GTK_SCROLL_HORIZONTAL_STEPS") - '("horizontal-pages" "GTK_SCROLL_HORIZONTAL_PAGES") - '("horizontal-ends" "GTK_SCROLL_HORIZONTAL_ENDS") - ) - ) - -(define-enum ScrollType - (in-module "Gtk") - (c-name "GtkScrollType") - (gtype-id "GTK_TYPE_SCROLL_TYPE") - (values - '("none" "GTK_SCROLL_NONE") - '("jump" "GTK_SCROLL_JUMP") - '("step-backward" "GTK_SCROLL_STEP_BACKWARD") - '("step-forward" "GTK_SCROLL_STEP_FORWARD") - '("page-backward" "GTK_SCROLL_PAGE_BACKWARD") - '("page-forward" "GTK_SCROLL_PAGE_FORWARD") - '("step-up" "GTK_SCROLL_STEP_UP") - '("step-down" "GTK_SCROLL_STEP_DOWN") - '("page-up" "GTK_SCROLL_PAGE_UP") - '("page-down" "GTK_SCROLL_PAGE_DOWN") - '("step-left" "GTK_SCROLL_STEP_LEFT") - '("step-right" "GTK_SCROLL_STEP_RIGHT") - '("page-left" "GTK_SCROLL_PAGE_LEFT") - '("page-right" "GTK_SCROLL_PAGE_RIGHT") - '("start" "GTK_SCROLL_START") - '("end" "GTK_SCROLL_END") - ) -) - -(define-enum SelectionMode - (in-module "Gtk") - (c-name "GtkSelectionMode") - (gtype-id "GTK_TYPE_SELECTION_MODE") - (values - '("none" "GTK_SELECTION_NONE") - '("single" "GTK_SELECTION_SINGLE") - '("browse" "GTK_SELECTION_BROWSE") - '("multiple" "GTK_SELECTION_MULTIPLE") - '("extended" "GTK_SELECTION_EXTENDED") - ) -) - -(define-enum ShadowType - (in-module "Gtk") - (c-name "GtkShadowType") - (gtype-id "GTK_TYPE_SHADOW_TYPE") - (values - '("none" "GTK_SHADOW_NONE") - '("in" "GTK_SHADOW_IN") - '("out" "GTK_SHADOW_OUT") - '("etched-in" "GTK_SHADOW_ETCHED_IN") - '("etched-out" "GTK_SHADOW_ETCHED_OUT") - ) -) - -(define-enum SideType - (in-module "Gtk") - (c-name "GtkSideType") - (gtype-id "GTK_TYPE_SIDE_TYPE") - (values - '("top" "GTK_SIDE_TOP") - '("bottom" "GTK_SIDE_BOTTOM") - '("left" "GTK_SIDE_LEFT") - '("right" "GTK_SIDE_RIGHT") - ) -) - -(define-enum SignalRunType - (in-module "Gtk") - (c-name "GtkSignalRunType") - (gtype-id "GTK_TYPE_SIGNAL_RUN_TYPE") - (values - '("first" "GTK_RUN_FIRST") - '("last" "GTK_RUN_LAST") - '("both" "GTK_RUN_BOTH") - '("no-recurse" "GTK_RUN_NO_RECURSE") - '("action" "GTK_RUN_ACTION") - '("no-hooks" "GTK_RUN_NO_HOOKS") - ) -) - -(define-enum SizeGroupMode - (in-module "Gtk") - (c-name "GtkSizeGroupMode") - (gtype-id "GTK_TYPE_SIZE_GROUP_MODE") - (values - '("none" "GTK_SIZE_GROUP_NONE") - '("horizontal" "GTK_SIZE_GROUP_HORIZONTAL") - '("vertical" "GTK_SIZE_GROUP_VERTICAL") - '("both" "GTK_SIZE_GROUP_BOTH") - ) -) - -(define-enum SortType - (in-module "Gtk") - (c-name "GtkSortType") - (gtype-id "GTK_TYPE_SORT_TYPE") - (values - '("ascending" "GTK_SORT_ASCENDING") - '("descending" "GTK_SORT_DESCENDING") - ) -) - -(define-enum SpinButtonUpdatePolicy - (in-module "Gtk") - (c-name "GtkSpinButtonUpdatePolicy") - (gtype-id "GTK_TYPE_SPIN_BUTTON_UPDATE_POLICY") - (values - '("always" "GTK_UPDATE_ALWAYS") - '("if-valid" "GTK_UPDATE_IF_VALID") - ) -) - -(define-enum SpinType - (in-module "Gtk") - (c-name "GtkSpinType") - (gtype-id "GTK_TYPE_SPIN_TYPE") - (values - '("step-forward" "GTK_SPIN_STEP_FORWARD") - '("step-backward" "GTK_SPIN_STEP_BACKWARD") - '("page-forward" "GTK_SPIN_PAGE_FORWARD") - '("page-backward" "GTK_SPIN_PAGE_BACKWARD") - '("home" "GTK_SPIN_HOME") - '("end" "GTK_SPIN_END") - '("user-defined" "GTK_SPIN_USER_DEFINED") - ) -) - -(define-enum StateType - (in-module "Gtk") - (c-name "GtkStateType") - (gtype-id "GTK_TYPE_STATE_TYPE") - (values - '("normal" "GTK_STATE_NORMAL") - '("active" "GTK_STATE_ACTIVE") - '("prelight" "GTK_STATE_PRELIGHT") - '("selected" "GTK_STATE_SELECTED") - '("insensitive" "GTK_STATE_INSENSITIVE") - ) -) - -(define-enum SubmenuDirection - (in-module "Gtk") - (c-name "GtkSubmenuDirection") - (gtype-id "GTK_TYPE_SUBMENU_DIRECTION") - (values - '("left" "GTK_DIRECTION_LEFT") - '("right" "GTK_DIRECTION_RIGHT") - ) -) - -(define-enum SubmenuPlacement - (in-module "Gtk") - (c-name "GtkSubmenuPlacement") - (gtype-id "GTK_TYPE_SUBMENU_PLACEMENT") - (values - '("top-bottom" "GTK_TOP_BOTTOM") - '("left-right" "GTK_LEFT_RIGHT") - ) -) - -(define-enum TextDirection - (in-module "Gtk") - (c-name "GtkTextDirection") - (gtype-id "GTK_TYPE_TEXT_DIRECTION") - (values - '("none" "GTK_TEXT_DIR_NONE") - '("ltr" "GTK_TEXT_DIR_LTR") - '("rtl" "GTK_TEXT_DIR_RTL") - ) -) - -(define-enum TextWindowType - (in-module "Gtk") - (c-name "GtkTextWindowType") - (gtype-id "GTK_TYPE_TEXT_WINDOW_TYPE") - (values - '("private" "GTK_TEXT_WINDOW_PRIVATE") - '("widget" "GTK_TEXT_WINDOW_WIDGET") - '("text" "GTK_TEXT_WINDOW_TEXT") - '("left" "GTK_TEXT_WINDOW_LEFT") - '("right" "GTK_TEXT_WINDOW_RIGHT") - '("top" "GTK_TEXT_WINDOW_TOP") - '("bottom" "GTK_TEXT_WINDOW_BOTTOM") - ) -) - -(define-enum ToolbarChildType - (in-module "Gtk") - (c-name "GtkToolbarChildType") - (gtype-id "GTK_TYPE_TOOLBAR_CHILD_TYPE") - (values - '("space" "GTK_TOOLBAR_CHILD_SPACE") - '("button" "GTK_TOOLBAR_CHILD_BUTTON") - '("togglebutton" "GTK_TOOLBAR_CHILD_TOGGLEBUTTON") - '("radiobutton" "GTK_TOOLBAR_CHILD_RADIOBUTTON") - '("widget" "GTK_TOOLBAR_CHILD_WIDGET") - ) -) - -(define-enum ToolbarSpaceStyle - (in-module "Gtk") - (c-name "GtkToolbarSpaceStyle") - (gtype-id "GTK_TYPE_TOOLBAR_SPACE_STYLE") - (values - '("empty" "GTK_TOOLBAR_SPACE_EMPTY") - '("line" "GTK_TOOLBAR_SPACE_LINE") - ) -) - -(define-enum ToolbarStyle - (in-module "Gtk") - (c-name "GtkToolbarStyle") - (gtype-id "GTK_TYPE_TOOLBAR_STYLE") - (values - '("icons" "GTK_TOOLBAR_ICONS") - '("text" "GTK_TOOLBAR_TEXT") - '("both" "GTK_TOOLBAR_BOTH") - '("both-horiz" "GTK_TOOLBAR_BOTH_HORIZ") - ) -) - -(define-enum TreeViewColumnSizing - (in-module "Gtk") - (c-name "GtkTreeViewColumnSizing") - (gtype-id "GTK_TYPE_TREE_VIEW_COLUMN_SIZING") - (values - '("grow-only" "GTK_TREE_VIEW_COLUMN_GROW_ONLY") - '("autosize" "GTK_TREE_VIEW_COLUMN_AUTOSIZE") - '("fixed" "GTK_TREE_VIEW_COLUMN_FIXED") - ) -) - -(define-enum TreeViewDropPosition - (in-module "Gtk") - (c-name "GtkTreeViewDropPosition") - (gtype-id "GTK_TYPE_TREE_VIEW_DROP_POSITION") - (values - '("before" "GTK_TREE_VIEW_DROP_BEFORE") - '("after" "GTK_TREE_VIEW_DROP_AFTER") - '("into-or-before" "GTK_TREE_VIEW_DROP_INTO_OR_BEFORE") - '("into-or-after" "GTK_TREE_VIEW_DROP_INTO_OR_AFTER") - ) -) - -(define-enum TreeViewMode - (in-module "Gtk") - (c-name "GtkTreeViewMode") - (gtype-id "GTK_TYPE_TREE_VIEW_MODE") - (values - '("line" "GTK_TREE_VIEW_LINE") - '("item" "GTK_TREE_VIEW_ITEM") - ) -) - -(define-enum UpdateType - (in-module "Gtk") - (c-name "GtkUpdateType") - (gtype-id "GTK_TYPE_UPDATE_TYPE") - (values - '("continuous" "GTK_UPDATE_CONTINUOUS") - '("discontinuous" "GTK_UPDATE_DISCONTINUOUS") - '("delayed" "GTK_UPDATE_DELAYED") - ) -) - -(define-enum Visibility - (in-module "Gtk") - (c-name "GtkVisibility") - (gtype-id "GTK_TYPE_VISIBILITY") - (values - '("none" "GTK_VISIBILITY_NONE") - '("partial" "GTK_VISIBILITY_PARTIAL") - '("full" "GTK_VISIBILITY_FULL") - ) -) - -(define-enum WidgetHelpType - (in-module "Gtk") - (c-name "GtkWidgetHelpType") - (gtype-id "GTK_TYPE_WIDGET_HELP_TYPE") - (values - '("tooltip" "GTK_WIDGET_HELP_TOOLTIP") - '("whats-this" "GTK_WIDGET_HELP_WHATS_THIS") - ) -) - -(define-enum WindowPosition - (in-module "Gtk") - (c-name "GtkWindowPosition") - (gtype-id "GTK_TYPE_WINDOW_POSITION") - (values - '("none" "GTK_WIN_POS_NONE") - '("center" "GTK_WIN_POS_CENTER") - '("mouse" "GTK_WIN_POS_MOUSE") - '("center-always" "GTK_WIN_POS_CENTER_ALWAYS") - '("center-on-parent" "GTK_WIN_POS_CENTER_ON_PARENT") - ) -) - -(define-enum WindowType - (in-module "Gtk") - (c-name "GtkWindowType") - (gtype-id "GTK_TYPE_WINDOW_TYPE") - (values - '("toplevel" "GTK_WINDOW_TOPLEVEL") - '("popup" "GTK_WINDOW_POPUP") - ) -) - -(define-enum WrapMode - (in-module "Gtk") - (c-name "GtkWrapMode") - (gtype-id "GTK_TYPE_WRAP_MODE") - (values - '("none" "GTK_WRAP_NONE") - '("char" "GTK_WRAP_CHAR") - '("word" "GTK_WRAP_WORD") - '("word_char" "GTK_WRAP_WORD_CHAR") - ) -) - -;; Flags ... - -(define-flags AccelFlags - (in-module "Gtk") - (c-name "GtkAccelFlags") - (gtype-id "GTK_TYPE_ACCEL_FLAGS") - (values - '("visible" "GTK_ACCEL_VISIBLE") - '("locked" "GTK_ACCEL_LOCKED") - '("mask" "GTK_ACCEL_MASK") - ) -) - -(define-flags ArgFlags - (in-module "Gtk") - (c-name "GtkArgFlags") - (gtype-id "GTK_TYPE_ARG_FLAGS") - (values - '("readable" "GTK_ARG_READABLE") - '("writable" "GTK_ARG_WRITABLE") - '("construct" "GTK_ARG_CONSTRUCT") - '("construct-only" "GTK_ARG_CONSTRUCT_ONLY") - '("child-arg" "GTK_ARG_CHILD_ARG") - ) -) - -(define-flags AttachOptions - (in-module "Gtk") - (c-name "GtkAttachOptions") - (gtype-id "GTK_TYPE_ATTACH_OPTIONS") - (values - '("expand" "GTK_EXPAND") - '("shrink" "GTK_SHRINK") - '("fill" "GTK_FILL") - ) -) - -(define-flags ButtonAction - (in-module "Gtk") - (c-name "GtkButtonAction") - (gtype-id "GTK_TYPE_BUTTON_ACTION") - (values - '("ignored" "GTK_BUTTON_IGNORED") - '("selects" "GTK_BUTTON_SELECTS") - '("drags" "GTK_BUTTON_DRAGS") - '("expands" "GTK_BUTTON_EXPANDS") - ) -) - -(define-flags CalendarDisplayOptions - (in-module "Gtk") - (c-name "GtkCalendarDisplayOptions") - (gtype-id "GTK_TYPE_CALENDAR_DISPLAY_OPTIONS") - (values - '("show-heading" "GTK_CALENDAR_SHOW_HEADING") - '("show-day-names" "GTK_CALENDAR_SHOW_DAY_NAMES") - '("no-month-change" "GTK_CALENDAR_NO_MONTH_CHANGE") - '("show-week-numbers" "GTK_CALENDAR_SHOW_WEEK_NUMBERS") - '("week-start-monday" "GTK_CALENDAR_WEEK_START_MONDAY") - ) -) - -(define-flags CellRendererState - (in-module "Gtk") - (c-name "GtkCellRendererState") - (gtype-id "GTK_TYPE_CELL_RENDERER_STATE") - (values - '("selected" "GTK_CELL_RENDERER_SELECTED") - '("prelit" "GTK_CELL_RENDERER_PRELIT") - '("insensitive" "GTK_CELL_RENDERER_INSENSITIVE") - '("sorted" "GTK_CELL_RENDERER_SORTED") - '("focused" "GTK_CELL_RENDERER_FOCUSED") - ) -) - -(define-flags DebugFlag - (in-module "Gtk") - (c-name "GtkDebugFlag") - (gtype-id "GTK_TYPE_DEBUG_FLAG") - (values - '("misc" "GTK_DEBUG_MISC") - '("plugsocket" "GTK_DEBUG_PLUGSOCKET") - '("text" "GTK_DEBUG_TEXT") - '("tree" "GTK_DEBUG_TREE") - '("updates" "GTK_DEBUG_UPDATES") - '("keybindings" "GTK_DEBUG_KEYBINDINGS") - '("multihead" "GTK_DEBUG_MULTIHEAD") - ) -) - -(define-flags DestDefaults - (in-module "Gtk") - (c-name "GtkDestDefaults") - (gtype-id "GTK_TYPE_DEST_DEFAULTS") - (values - '("motion" "GTK_DEST_DEFAULT_MOTION") - '("highlight" "GTK_DEST_DEFAULT_HIGHLIGHT") - '("drop" "GTK_DEST_DEFAULT_DROP") - '("all" "GTK_DEST_DEFAULT_ALL") - ) -) - -(define-flags DialogFlags - (in-module "Gtk") - (c-name "GtkDialogFlags") - (gtype-id "GTK_TYPE_DIALOG_FLAGS") - (values - '("modal" "GTK_DIALOG_MODAL") - '("destroy-with-parent" "GTK_DIALOG_DESTROY_WITH_PARENT") - '("no-separator" "GTK_DIALOG_NO_SEPARATOR") - ) -) - -(define-flags FileFilterFlags - (in-module "Gtk") - (c-name "GtkFileFilterFlags") - (gtype-id "GTK_TYPE_FILE_FILTER_FLAGS") - (values - '("filename" "GTK_FILE_FILTER_FILENAME") - '("uri" "GTK_FILE_FILTER_URI") - '("display-name" "GTK_FILE_FILTER_DISPLAY_NAME") - '("mime-type" "GTK_FILE_FILTER_MIME_TYPE") - ) -) - -(define-flags IconLookupFlags - (in-module "Gtk") - (c-name "GtkIconLookupFlags") - (gtype-id "GTK_TYPE_ICON_LOOKUP_FLAGS") - (values - '("no-svg" "GTK_ICON_LOOKUP_NO_SVG") - '("force-svg" "GTK_ICON_LOOKUP_FORCE_SVG") - '("use-builtin" "GTK_ICON_LOOKUP_USE_BUILTIN") - ) -) - -(define-flags ObjectFlags - (in-module "Gtk") - (c-name "GtkObjectFlags") - (gtype-id "GTK_TYPE_OBJECT_FLAGS") - (values - '("in-destruction" "GTK_IN_DESTRUCTION") - '("floating" "GTK_FLOATING") - '("reserved-1" "GTK_RESERVED_1") - '("reserved-2" "GTK_RESERVED_2") - ) -) - -(define-flags PrivateFlags - (in-module "Gtk") - (c-name "GtkPrivateFlags") - (gtype-id "GTK_TYPE_PRIVATE_FLAGS") - (values - '("user-style" "PRIVATE_GTK_USER_STYLE") - '("resize-pending" "PRIVATE_GTK_RESIZE_PENDING") - '("leave-pending" "PRIVATE_GTK_LEAVE_PENDING") - '("has-shape-mask" "PRIVATE_GTK_HAS_SHAPE_MASK") - '("in-reparent" "PRIVATE_GTK_IN_REPARENT") - '("direction-set" "PRIVATE_GTK_DIRECTION_SET") - '("direction-ltr" "PRIVATE_GTK_DIRECTION_LTR") - '("anchored" "PRIVATE_GTK_ANCHORED") - '("child-visible" "PRIVATE_GTK_CHILD_VISIBLE") - '("redraw-on-alloc" "PRIVATE_GTK_REDRAW_ON_ALLOC") - '("alloc-needed" "PRIVATE_GTK_ALLOC_NEEDED") - '("request-needed" "PRIVATE_GTK_REQUEST_NEEDED") - ) -) - -(define-flags RcFlags - (in-module "Gtk") - (c-name "GtkRcFlags") - (gtype-id "GTK_TYPE_RC_FLAGS") - (values - '("fg" "GTK_RC_FG") - '("bg" "GTK_RC_BG") - '("text" "GTK_RC_TEXT") - '("base" "GTK_RC_BASE") - ) -) - -(define-flags TargetFlags - (in-module "Gtk") - (c-name "GtkTargetFlags") - (gtype-id "GTK_TYPE_TARGET_FLAGS") - (values - '("app" "GTK_TARGET_SAME_APP") - '("widget" "GTK_TARGET_SAME_WIDGET") - ) -) - -(define-flags TextSearchFlags - (in-module "Gtk") - (c-name "GtkTextSearchFlags") - (gtype-id "GTK_TYPE_TEXT_SEARCH_FLAGS") - (values - '("visible-only" "GTK_TEXT_SEARCH_VISIBLE_ONLY") - '("text-only" "GTK_TEXT_SEARCH_TEXT_ONLY") - ) - ) - -(define-flags TreeModelFlags - (in-module "Gtk") - (c-name "GtkTreeModelFlags") - (gtype-id "GTK_TYPE_TREE_MODEL_FLAGS") - (values - '("iters-persist" "GTK_TREE_MODEL_ITERS_PERSIST") - '("list-only" "GTK_TREE_MODEL_LIST_ONLY") - ) -) - -(define-flags UIManagerItemType - (in-module "Gtk") - (c-name "GtkUIManagerItemType") - (gtype-id "GTK_TYPE_UI_MANAGER_ITEM_TYPE") - (values - '("auto" "GTK_UI_MANAGER_AUTO") - '("menubar" "GTK_UI_MANAGER_MENUBAR") - '("menu" "GTK_UI_MANAGER_MENU") - '("toolbar" "GTK_UI_MANAGER_TOOLBAR") - '("placeholder" "GTK_UI_MANAGER_PLACEHOLDER") - '("popup" "GTK_UI_MANAGER_POPUP") - '("menuitem" "GTK_UI_MANAGER_MENUITEM") - '("toolitem" "GTK_UI_MANAGER_TOOLITEM") - '("separator" "GTK_UI_MANAGER_SEPARATOR") - '("accelerator" "GTK_UI_MANAGER_ACCELERATOR") - ) -) - -(define-flags WidgetFlags - (in-module "Gtk") - (c-name "GtkWidgetFlags") - (gtype-id "GTK_TYPE_WIDGET_FLAGS") - (values - '("toplevel" "GTK_TOPLEVEL") - '("no-window" "GTK_NO_WINDOW") - '("realized" "GTK_REALIZED") - '("mapped" "GTK_MAPPED") - '("visible" "GTK_VISIBLE") - '("sensitive" "GTK_SENSITIVE") - '("parent-sensitive" "GTK_PARENT_SENSITIVE") - '("can-focus" "GTK_CAN_FOCUS") - '("has-focus" "GTK_HAS_FOCUS") - '("can-default" "GTK_CAN_DEFAULT") - '("has-default" "GTK_HAS_DEFAULT") - '("has-grab" "GTK_HAS_GRAB") - '("rc-style" "GTK_RC_STYLE") - '("composite-child" "GTK_COMPOSITE_CHILD") - '("no-reparent" "GTK_NO_REPARENT") - '("app-paintable" "GTK_APP_PAINTABLE") - '("receives-default" "GTK_RECEIVES_DEFAULT") - '("double-buffered" "GTK_DOUBLE_BUFFERED") - '("no-show-all" "GTK_NO_SHOW_ALL") - ) -) - -;; Interfaces ... - -(define-interface CellEditable - (in-module "Gtk") - (c-name "GtkCellEditable") - (gtype-id "GTK_TYPE_CELL_EDITABLE") - (prerequisite "GtkWidget") -) - -(define-interface CellLayout - (in-module "Gtk") - (c-name "GtkCellLayout") - (gtype-id "GTK_TYPE_CELL_LAYOUT") - (prerequisite "GObject") -) - -(define-interface Editable - (in-module "Gtk") - (c-name "GtkEditable") - (gtype-id "GTK_TYPE_EDITABLE") - (vtable "GtkEditableClass") - (prerequisite "GtkWidget") -) - -(define-interface FileChooser - (in-module "Gtk") - (c-name "GtkFileChooser") - (gtype-id "GTK_TYPE_FILE_CHOOSER") - (prerequisite "GtkWidget") -) - -(define-interface TreeDragDest - (in-module "Gtk") - (c-name "GtkTreeDragDest") - (gtype-id "GTK_TYPE_TREE_DRAG_DEST") -) - -(define-interface TreeDragSource - (in-module "Gtk") - (c-name "GtkTreeDragSource") - (gtype-id "GTK_TYPE_TREE_DRAG_SOURCE") -) - -(define-interface TreeModel - (in-module "Gtk") - (c-name "GtkTreeModel") - (gtype-id "GTK_TYPE_TREE_MODEL") - (prerequisite "GObject") -) - -(define-interface TreeSortable - (in-module "Gtk") - (c-name "GtkTreeSortable") - (gtype-id "GTK_TYPE_TREE_SORTABLE") - (prerequisite "GtkTreeModel") - (prerequisite "GObject") -) - -;; Objects ... - -(define-object AboutDialog - (in-module "Gtk") - (parent "GtkDialog") - (c-name "GtkAboutDialog") - (gtype-id "GTK_TYPE_ABOUT_DIALOG") -) - -(define-object AccelGroup - (in-module "Gtk") - (parent "GObject") - (c-name "GtkAccelGroup") - (gtype-id "GTK_TYPE_ACCEL_GROUP") -) - -(define-object AccelLabel - (in-module "Gtk") - (parent "GtkLabel") - (c-name "GtkAccelLabel") - (gtype-id "GTK_TYPE_ACCEL_LABEL") -) - -(define-object AccelMap - (in-module "Gtk") - (parent "GObject") - (c-name "GtkAccelMap") - (gtype-id "GTK_TYPE_ACCEL_MAP") -) - -(define-object Accessible - (in-module "Gtk") - (parent "AtkObject") - (c-name "GtkAccessible") - (gtype-id "GTK_TYPE_ACCESSIBLE") -) - -(define-object Action - (in-module "Gtk") - (parent "GObject") - (c-name "GtkAction") - (gtype-id "GTK_TYPE_ACTION") -) - -(define-object ActionGroup - (in-module "Gtk") - (parent "GObject") - (c-name "GtkActionGroup") - (gtype-id "GTK_TYPE_ACTION_GROUP") -) - -(define-object Adjustment - (in-module "Gtk") - (parent "GtkObject") - (c-name "GtkAdjustment") - (gtype-id "GTK_TYPE_ADJUSTMENT") - (fields - '("gfloat" "value") - '("gfloat" "lower") - '("gfloat" "upper") - '("gfloat" "step_increment") - '("gfloat" "page_increment") - '("gfloat" "page_size") - ) -) - -(define-object Alignment - (in-module "Gtk") - (parent "GtkBin") - (c-name "GtkAlignment") - (gtype-id "GTK_TYPE_ALIGNMENT") -) - -(define-object Arrow - (in-module "Gtk") - (parent "GtkMisc") - (c-name "GtkArrow") - (gtype-id "GTK_TYPE_ARROW") -) - -(define-object AspectFrame - (in-module "Gtk") - (parent "GtkFrame") - (c-name "GtkAspectFrame") - (gtype-id "GTK_TYPE_ASPECT_FRAME") -) - -(define-object Bin - (in-module "Gtk") - (parent "GtkContainer") - (c-name "GtkBin") - (gtype-id "GTK_TYPE_BIN") - (fields - '("GtkWidget*" "child") - ) -) - -(define-object Box - (in-module "Gtk") - (parent "GtkContainer") - (c-name "GtkBox") - (gtype-id "GTK_TYPE_BOX") -) - -(define-object Button - (in-module "Gtk") - (parent "GtkBin") - (c-name "GtkButton") - (gtype-id "GTK_TYPE_BUTTON") -) - -(define-object ButtonBox - (in-module "Gtk") - (parent "GtkBox") - (c-name "GtkButtonBox") - (gtype-id "GTK_TYPE_BUTTON_BOX") -) - -(define-object Calendar - (in-module "Gtk") - (parent "GtkWidget") - (c-name "GtkCalendar") - (gtype-id "GTK_TYPE_CALENDAR") -) - -(define-object CellRenderer - (in-module "Gtk") - (parent "GtkObject") - (c-name "GtkCellRenderer") - (gtype-id "GTK_TYPE_CELL_RENDERER") -) - -(define-object CellRendererCombo - (in-module "Gtk") - (parent "GtkCellRendererText") - (c-name "GtkCellRendererCombo") - (gtype-id "GTK_TYPE_CELL_RENDERER_COMBO") -) - -(define-object CellRendererPixbuf - (in-module "Gtk") - (parent "GtkCellRenderer") - (c-name "GtkCellRendererPixbuf") - (gtype-id "GTK_TYPE_CELL_RENDERER_PIXBUF") -) - -(define-object CellRendererProgress - (in-module "Gtk") - (parent "GtkCellRenderer") - (c-name "GtkCellRendererProgress") - (gtype-id "GTK_TYPE_CELL_RENDERER_PROGRESS") -) - -(define-object CellRendererText - (in-module "Gtk") - (parent "GtkCellRenderer") - (c-name "GtkCellRendererText") - (gtype-id "GTK_TYPE_CELL_RENDERER_TEXT") -) - -(define-object CellRendererToggle - (in-module "Gtk") - (parent "GtkCellRenderer") - (c-name "GtkCellRendererToggle") - (gtype-id "GTK_TYPE_CELL_RENDERER_TOGGLE") -) - -(define-object CellView - (in-module "Gtk") - (parent "GtkWidget") - (c-name "GtkCellView") - (gtype-id "GTK_TYPE_CELL_VIEW") - (implements "GtkCellLayout") -) - -(define-object CheckButton - (in-module "Gtk") - (parent "GtkToggleButton") - (c-name "GtkCheckButton") - (gtype-id "GTK_TYPE_CHECK_BUTTON") -) - -(define-object CheckMenuItem - (in-module "Gtk") - (parent "GtkMenuItem") - (c-name "GtkCheckMenuItem") - (gtype-id "GTK_TYPE_CHECK_MENU_ITEM") - (fields - '("gboolean" "active") - ) -) - -(define-object Clipboard - (in-module "Gtk") - (parent "GObject") - (c-name "GtkClipboard") - (gtype-id "GTK_TYPE_CLIPBOARD") -) - -(define-object CList - (in-module "Gtk") - (parent "GtkContainer") - (c-name "GtkCList") - (gtype-id "GTK_TYPE_CLIST") - (fields - '("GList*" "selection") - '("gint" "focus_row") - '("gint" "rows") - '("gint" "columns") - ) -) - -(define-object ColorButton - (in-module "Gtk") - (parent "GtkButton") - (c-name "GtkColorButton") - (gtype-id "GTK_TYPE_COLOR_BUTTON") -) - -(define-object ColorSelection - (in-module "Gtk") - (parent "GtkVBox") - (c-name "GtkColorSelection") - (gtype-id "GTK_TYPE_COLOR_SELECTION") -) - -(define-object ColorSelectionDialog - (in-module "Gtk") - (parent "GtkDialog") - (c-name "GtkColorSelectionDialog") - (gtype-id "GTK_TYPE_COLOR_SELECTION_DIALOG") - (fields - '("GtkWidget*" "colorsel") - '("GtkWidget*" "ok_button") - '("GtkWidget*" "cancel_button") - '("GtkWidget*" "help_button") - ) -) - -(define-object Combo - (in-module "Gtk") - (parent "GtkHBox") - (c-name "GtkCombo") - (gtype-id "GTK_TYPE_COMBO") - (fields - '("GtkWidget*" "entry") - '("GtkWidget*" "list") - ) -) - -(define-object ComboBox - (in-module "Gtk") - (parent "GtkBin") - (c-name "GtkComboBox") - (gtype-id "GTK_TYPE_COMBO_BOX") - (implements "GtkCellEditable") - (implements "GtkCellLayout") -) - -(define-object ComboBoxEntry - (in-module "Gtk") - (parent "GtkComboBox") - (c-name "GtkComboBoxEntry") - (gtype-id "GTK_TYPE_COMBO_BOX_ENTRY") - (implements "GtkCellEditable") - (implements "GtkCellLayout") -) - -(define-object Container - (in-module "Gtk") - (parent "GtkWidget") - (c-name "GtkContainer") - (gtype-id "GTK_TYPE_CONTAINER") - (fields - '("GtkWidget*" "focus_child") - '("guint" "border_width") - '("guint" "need_resize") - '("guint" "resize_mode") - '("guint" "reallocate_redraws") - '("guint" "has_focus_chain") - ) -) - - -(define-object CTree - (in-module "Gtk") - (parent "GtkCList") - (c-name "GtkCTree") - (gtype-id "GTK_TYPE_CTREE") - (fields - '("GList*" "selection") - ) -) - -(define-object Curve - (in-module "Gtk") - (parent "GtkDrawingArea") - (c-name "GtkCurve") - (gtype-id "GTK_TYPE_CURVE") -) - -(define-object Dialog - (in-module "Gtk") - (parent "GtkWindow") - (c-name "GtkDialog") - (gtype-id "GTK_TYPE_DIALOG") - (fields - '("GtkWidget*" "vbox") - '("GtkWidget*" "action_area") - ) -) - -(define-object DrawingArea - (in-module "Gtk") - (parent "GtkWidget") - (c-name "GtkDrawingArea") - (gtype-id "GTK_TYPE_DRAWING_AREA") -) - -(define-object Entry - (in-module "Gtk") - (parent "GtkWidget") - (c-name "GtkEntry") - (gtype-id "GTK_TYPE_ENTRY") - (implements "GtkEditable") - (implements "GtkCellEditable") -) - -(define-object EntryCompletion - (in-module "Gtk") - (parent "GObject") - (c-name "GtkEntryCompletion") - (gtype-id "GTK_TYPE_ENTRY_COMPLETION") - (implements "GtkCellLayout") -) - -(define-object EventBox - (in-module "Gtk") - (parent "GtkBin") - (c-name "GtkEventBox") - (gtype-id "GTK_TYPE_EVENT_BOX") -) - -(define-object Expander - (in-module "Gtk") - (parent "GtkBin") - (c-name "GtkExpander") - (gtype-id "GTK_TYPE_EXPANDER") -) - -(define-object FileChooserButton - (in-module "Gtk") - (parent "GtkHBox") - (c-name "GtkFileChooserButton") - (gtype-id "GTK_TYPE_FILE_CHOOSER_BUTTON") - (implements "GtkFileChooser") -) - -(define-object FileChooserDialog - (in-module "Gtk") - (parent "GtkDialog") - (c-name "GtkFileChooserDialog") - (gtype-id "GTK_TYPE_FILE_CHOOSER_DIALOG") - (implements "GtkFileChooser") -) - -(define-object FileChooserWidget - (in-module "Gtk") - (parent "GtkVBox") - (c-name "GtkFileChooserWidget") - (gtype-id "GTK_TYPE_FILE_CHOOSER_WIDGET") - (implements "GtkFileChooser") -) - -(define-object FileFilter - (in-module "Gtk") - (parent "GtkObject") - (c-name "GtkFileFilter") - (gtype-id "GTK_TYPE_FILE_FILTER") -) - -(define-object FileSelection - (in-module "Gtk") - (parent "GtkDialog") - (c-name "GtkFileSelection") - (gtype-id "GTK_TYPE_FILE_SELECTION") - (fields - '("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") - '("GtkWidget*" "fileop_dialog") - '("GtkWidget*" "fileop_entry") - '("gchar*" "fileop_file") - '("GtkWidget*" "fileop_c_dir") - '("GtkWidget*" "fileop_del_file") - '("GtkWidget*" "fileop_ren_file") - '("GtkWidget*" "button_area") - '("GtkWidget*" "action_area") - ) -) - -(define-object Fixed - (in-module "Gtk") - (parent "GtkContainer") - (c-name "GtkFixed") - (gtype-id "GTK_TYPE_FIXED") -) - -(define-object FontButton - (in-module "Gtk") - (parent "GtkButton") - (c-name "GtkFontButton") - (gtype-id "GTK_TYPE_FONT_BUTTON") -) - -(define-object FontSelection - (in-module "Gtk") - (parent "GtkVBox") - (c-name "GtkFontSelection") - (gtype-id "GTK_TYPE_FONT_SELECTION") -) - -(define-object FontSelectionDialog - (in-module "Gtk") - (parent "GtkDialog") - (c-name "GtkFontSelectionDialog") - (gtype-id "GTK_TYPE_FONT_SELECTION_DIALOG") - (fields - '("GtkWidget*" "fontsel") - '("GtkWidget*" "main_vbox") - '("GtkWidget*" "action_area") - '("GtkWidget*" "ok_button") - '("GtkWidget*" "apply_button") - '("GtkWidget*" "cancel_button") - ) -) - -(define-object Frame - (in-module "Gtk") - (parent "GtkBin") - (c-name "GtkFrame") - (gtype-id "GTK_TYPE_FRAME") -) - -(define-object GammaCurve - (in-module "Gtk") - (parent "GtkVBox") - (c-name "GtkGammaCurve") - (gtype-id "GTK_TYPE_GAMMA_CURVE") - (fields - '("GtkWidget*" "table") - '("GtkWidget*" "curve") - '("gfloat" "gamma") - '("GtkWidget*" "gamma_dialog") - '("GtkWidget*" "gamma_text") - ) -) - -(define-object HandleBox - (in-module "Gtk") - (parent "GtkBin") - (c-name "GtkHandleBox") - (gtype-id "GTK_TYPE_HANDLE_BOX") -) - -(define-object HBox - (in-module "Gtk") - (parent "GtkBox") - (c-name "GtkHBox") - (gtype-id "GTK_TYPE_HBOX") -) - -(define-object HButtonBox - (in-module "Gtk") - (parent "GtkButtonBox") - (c-name "GtkHButtonBox") - (gtype-id "GTK_TYPE_HBUTTON_BOX") -) - -(define-object HPaned - (in-module "Gtk") - (parent "GtkPaned") - (c-name "GtkHPaned") - (gtype-id "GTK_TYPE_HPANED") -) - -(define-object HRuler - (in-module "Gtk") - (parent "GtkRuler") - (c-name "GtkHRuler") - (gtype-id "GTK_TYPE_HRULER") -) - -(define-object HScale - (in-module "Gtk") - (parent "GtkScale") - (c-name "GtkHScale") - (gtype-id "GTK_TYPE_HSCALE") -) - -(define-object HScrollbar - (in-module "Gtk") - (parent "GtkScrollbar") - (c-name "GtkHScrollbar") - (gtype-id "GTK_TYPE_HSCROLLBAR") -) - -(define-object HSeparator - (in-module "Gtk") - (parent "GtkSeparator") - (c-name "GtkHSeparator") - (gtype-id "GTK_TYPE_HSEPARATOR") -) - -(define-object IconFactory - (in-module "Gtk") - (parent "GObject") - (c-name "GtkIconFactory") - (gtype-id "GTK_TYPE_ICON_FACTORY") -) - -(define-object IconTheme - (in-module "Gtk") - (parent "GObject") - (c-name "GtkIconTheme") - (gtype-id "GTK_TYPE_ICON_THEME") -) - -(define-object IconView - (in-module "Gtk") - (parent "GtkContainer") - (c-name "GtkIconView") - (gtype-id "GTK_TYPE_ICON_VIEW") - (implements "GtkCellLayout") -) - -(define-object Image - (in-module "Gtk") - (parent "GtkMisc") - (c-name "GtkImage") - (gtype-id "GTK_TYPE_IMAGE") -) - -(define-object ImageMenuItem - (in-module "Gtk") - (parent "GtkMenuItem") - (c-name "GtkImageMenuItem") - (gtype-id "GTK_TYPE_IMAGE_MENU_ITEM") -) - -(define-object IMContext - (in-module "Gtk") - (parent "GtkObject") - (c-name "GtkIMContext") - (gtype-id "GTK_TYPE_IM_CONTEXT") -) - -(define-object IMContextSimple - (in-module "Gtk") - (parent "GtkIMContext") - (c-name "GtkIMContextSimple") - (gtype-id "GTK_TYPE_IM_CONTEXT_SIMPLE") -) - -(define-object IMMulticontext - (in-module "Gtk") - (parent "GtkIMContext") - (c-name "GtkIMMulticontext") - (gtype-id "GTK_TYPE_IM_MULTICONTEXT") -) - -(define-object InputDialog - (in-module "Gtk") - (parent "GtkDialog") - (c-name "GtkInputDialog") - (gtype-id "GTK_TYPE_INPUT_DIALOG") -) - -(define-object Invisible - (in-module "Gtk") - (parent "GtkWidget") - (c-name "GtkInvisible") - (gtype-id "GTK_TYPE_INVISIBLE") -) - -(define-object Item - (in-module "Gtk") - (parent "GtkBin") - (c-name "GtkItem") - (gtype-id "GTK_TYPE_ITEM") -) - -(define-object ItemFactory - (in-module "Gtk") - (parent "GtkObject") - (c-name "GtkItemFactory") - (gtype-id "GTK_TYPE_ITEM_FACTORY") -) - -(define-object Label - (in-module "Gtk") - (parent "GtkMisc") - (c-name "GtkLabel") - (gtype-id "GTK_TYPE_LABEL") -) - -(define-object Layout - (in-module "Gtk") - (parent "GtkContainer") - (c-name "GtkLayout") - (gtype-id "GTK_TYPE_LAYOUT") - (fields - '("GdkWindow*" "bin_window") - ) -) - -(define-object List - (in-module "Gtk") - (parent "GtkContainer") - (c-name "GtkList") - (gtype-id "GTK_TYPE_LIST") - (fields - '("GList*" "selection") - ) -) - -(define-object ListItem - (in-module "Gtk") - (parent "GtkItem") - (c-name "GtkListItem") - (gtype-id "GTK_TYPE_LIST_ITEM") -) - -(define-object ListStore - (in-module "Gtk") - (parent "GObject") - (c-name "GtkListStore") - (gtype-id "GTK_TYPE_LIST_STORE") - (implements "GtkTreeModel") - (implements "GtkTreeDragSource") - (implements "GtkTreeDragDest") - (implements "GtkTreeSortable") -) - -(define-object Menu - (in-module "Gtk") - (parent "GtkMenuShell") - (c-name "GtkMenu") - (gtype-id "GTK_TYPE_MENU") -) - -(define-object MenuBar - (in-module "Gtk") - (parent "GtkMenuShell") - (c-name "GtkMenuBar") - (gtype-id "GTK_TYPE_MENU_BAR") -) - -(define-object MenuItem - (in-module "Gtk") - (parent "GtkItem") - (c-name "GtkMenuItem") - (gtype-id "GTK_TYPE_MENU_ITEM") -) - -(define-object MenuShell - (in-module "Gtk") - (parent "GtkContainer") - (c-name "GtkMenuShell") - (gtype-id "GTK_TYPE_MENU_SHELL") -) - -(define-object MenuToolButton - (in-module "Gtk") - (parent "GtkToolButton") - (c-name "GtkMenuToolButton") - (gtype-id "GTK_TYPE_MENU_TOOL_BUTTON") -) - -(define-object MessageDialog - (in-module "Gtk") - (parent "GtkDialog") - (c-name "GtkMessageDialog") - (gtype-id "GTK_TYPE_MESSAGE_DIALOG") - (fields - '("GtkWidget*" "image") - '("GtkWidget*" "label") - ) -) - -(define-object Misc - (in-module "Gtk") - (parent "GtkWidget") - (c-name "GtkMisc") - (gtype-id "GTK_TYPE_MISC") -) - -(define-object Notebook - (in-module "Gtk") - (parent "GtkContainer") - (c-name "GtkNotebook") - (gtype-id "GTK_TYPE_NOTEBOOK") - (fields - '("GtkPositionType" "tab_pos") - ) -) - -(define-object Object - (in-module "Gtk") - (parent "GObject") - (c-name "GtkObject") - (gtype-id "GTK_TYPE_OBJECT") -) - -(define-object OldEditable - (in-module "Gtk") - (parent "GtkWidget") - (c-name "GtkOldEditable") - (gtype-id "GTK_TYPE_OLD_EDITABLE") - (implements "GtkEditable") -) - -(define-object OptionMenu - (in-module "Gtk") - (parent "GtkButton") - (c-name "GtkOptionMenu") - (gtype-id "GTK_TYPE_OPTION_MENU") -) - -(define-object Paned - (in-module "Gtk") - (parent "GtkContainer") - (c-name "GtkPaned") - (gtype-id "GTK_TYPE_PANED") -) - -(define-object Pixmap - (in-module "Gtk") - (parent "GtkMisc") - (c-name "GtkPixmap") - (gtype-id "GTK_TYPE_PIXMAP") -) - -(define-object Plug - (in-module "Gtk") - (parent "GtkWindow") - (c-name "GtkPlug") - (gtype-id "GTK_TYPE_PLUG") -) - -(define-object Preview - (in-module "Gtk") - (parent "GtkWidget") - (c-name "GtkPreview") - (gtype-id "GTK_TYPE_PREVIEW") -) - -(define-object Progress - (in-module "Gtk") - (parent "GtkWidget") - (c-name "GtkProgress") - (gtype-id "GTK_TYPE_PROGRESS") -) - -(define-object ProgressBar - (in-module "Gtk") - (parent "GtkProgress") - (c-name "GtkProgressBar") - (gtype-id "GTK_TYPE_PROGRESS_BAR") -) - -(define-object RadioAction - (in-module "Gtk") - (parent "GtkToggleAction") - (c-name "GtkRadioAction") - (gtype-id "GTK_TYPE_RADIO_ACTION") -) - -(define-object RadioButton - (in-module "Gtk") - (parent "GtkCheckButton") - (c-name "GtkRadioButton") - (gtype-id "GTK_TYPE_RADIO_BUTTON") -) - -(define-object RadioMenuItem - (in-module "Gtk") - (parent "GtkCheckMenuItem") - (c-name "GtkRadioMenuItem") - (gtype-id "GTK_TYPE_RADIO_MENU_ITEM") -) - -(define-object RadioToolButton - (in-module "Gtk") - (parent "GtkToggleToolButton") - (c-name "GtkRadioToolButton") - (gtype-id "GTK_TYPE_RADIO_TOOL_BUTTON") -) - -(define-object Range - (in-module "Gtk") - (parent "GtkWidget") - (c-name "GtkRange") - (gtype-id "GTK_TYPE_RANGE") -) - -(define-object RcStyle - (in-module "Gtk") - (parent "GObject") - (c-name "GtkRcStyle") - (gtype-id "GTK_TYPE_RC_STYLE") -) - -(define-object Ruler - (in-module "Gtk") - (parent "GtkWidget") - (c-name "GtkRuler") - (gtype-id "GTK_TYPE_RULER") -) - -(define-object Scale - (in-module "Gtk") - (parent "GtkRange") - (c-name "GtkScale") - (gtype-id "GTK_TYPE_SCALE") -) - -(define-object Scrollbar - (in-module "Gtk") - (parent "GtkRange") - (c-name "GtkScrollbar") - (gtype-id "GTK_TYPE_SCROLLBAR") -) - -(define-object ScrolledWindow - (in-module "Gtk") - (parent "GtkBin") - (c-name "GtkScrolledWindow") - (gtype-id "GTK_TYPE_SCROLLED_WINDOW") -) - -(define-object Separator - (in-module "Gtk") - (parent "GtkWidget") - (c-name "GtkSeparator") - (gtype-id "GTK_TYPE_SEPARATOR") -) - -(define-object SeparatorMenuItem - (in-module "Gtk") - (parent "GtkMenuItem") - (c-name "GtkSeparatorMenuItem") - (gtype-id "GTK_TYPE_SEPARATOR_MENU_ITEM") -) - -(define-object SeparatorToolItem - (in-module "Gtk") - (parent "GtkToolItem") - (c-name "GtkSeparatorToolItem") - (gtype-id "GTK_TYPE_SEPARATOR_TOOL_ITEM") -) - -(define-object Settings - (in-module "Gtk") - (parent "GObject") - (c-name "GtkSettings") - (gtype-id "GTK_TYPE_SETTINGS") -) - -(define-object SizeGroup - (in-module "Gtk") - (parent "GObject") - (c-name "GtkSizeGroup") - (gtype-id "GTK_TYPE_SIZE_GROUP") -) - -(define-object Socket - (in-module "Gtk") - (parent "GtkContainer") - (c-name "GtkSocket") - (gtype-id "GTK_TYPE_SOCKET") -) - -(define-object SpinButton - (in-module "Gtk") - (parent "GtkEntry") - (c-name "GtkSpinButton") - (gtype-id "GTK_TYPE_SPIN_BUTTON") - (implements "GtkEditable") - (implements "GtkCellEditable") -) - -(define-object Statusbar - (in-module "Gtk") - (parent "GtkHBox") - (c-name "GtkStatusbar") - (gtype-id "GTK_TYPE_STATUSBAR") -) - -(define-object Style - (in-module "Gtk") - (parent "GObject") - (c-name "GtkStyle") - (fields - '("GdkColor*" "fg") - '("GdkColor*" "bg") - '("GdkColor*" "light") - '("GdkColor*" "dark") - '("GdkColor*" "mid") - '("GdkColor*" "text") - '("GdkColor*" "base") - '("GdkColor*" "text_aa") - '("GdkColor" "white") - '("GdkColor" "black") - '("PangoFontDescription*" "font_desc") - '("gint" "xthickness") - '("gint" "ythickness") - '("GdkGC**" "fg_gc") - '("GdkGC**" "bg_gc") - '("GdkGC**" "light_gc") - '("GdkGC**" "dark_gc") - '("GdkGC**" "mid_gc") - '("GdkGC**" "text_gc") - '("GdkGC**" "base_gc") - '("GdkGC**" "text_aa_gc") - '("GdkGC*" "white_gc") - '("GdkGC*" "black_gc") - '("GdkPixmap**" "bg_pixmap") - ) - (gtype-id "GTK_TYPE_STYLE") -) - -(define-object Table - (in-module "Gtk") - (parent "GtkContainer") - (c-name "GtkTable") - (gtype-id "GTK_TYPE_TABLE") -) - -(define-object TearoffMenuItem - (in-module "Gtk") - (parent "GtkMenuItem") - (c-name "GtkTearoffMenuItem") - (gtype-id "GTK_TYPE_TEAROFF_MENU_ITEM") -) - - -(define-object TextBuffer - (in-module "Gtk") - (parent "GObject") - (c-name "GtkTextBuffer") - (gtype-id "GTK_TYPE_TEXT_BUFFER") - (fields - '("GtkTextTagTable*" "tag_table") - ) -) - -(define-object TextChildAnchor - (in-module "Gtk") - (parent "GObject") - (c-name "GtkTextChildAnchor") - (gtype-id "GTK_TYPE_TEXT_CHILD_ANCHOR") -) - -(define-object TextMark - (in-module "Gtk") - (parent "GObject") - (c-name "GtkTextMark") - (gtype-id "GTK_TYPE_TEXT_MARK") -) - -(define-object TextTag - (in-module "Gtk") - (parent "GObject") - (c-name "GtkTextTag") - (gtype-id "GTK_TYPE_TEXT_TAG") -) - -(define-object TextTagTable - (in-module "Gtk") - (parent "GObject") - (c-name "GtkTextTagTable") - (gtype-id "GTK_TYPE_TEXT_TAG_TABLE") -) - -(define-object TextView - (in-module "Gtk") - (parent "GtkContainer") - (c-name "GtkTextView") - (gtype-id "GTK_TYPE_TEXT_VIEW") -) - -(define-object ToggleAction - (in-module "Gtk") - (parent "GtkAction") - (c-name "GtkToggleAction") - (gtype-id "GTK_TYPE_TOGGLE_ACTION") -) - -(define-object ToggleButton - (in-module "Gtk") - (parent "GtkButton") - (c-name "GtkToggleButton") - (gtype-id "GTK_TYPE_TOGGLE_BUTTON") - (fields - '("gboolean" "draw_indicator") - ) -) - -(define-object ToggleToolButton - (in-module "Gtk") - (parent "GtkToolButton") - (c-name "GtkToggleToolButton") - (gtype-id "GTK_TYPE_TOGGLE_TOOL_BUTTON") -) - -(define-object Toolbar - (in-module "Gtk") - (parent "GtkContainer") - (c-name "GtkToolbar") - (gtype-id "GTK_TYPE_TOOLBAR") -) - -(define-object ToolButton - (in-module "Gtk") - (parent "GtkToolItem") - (c-name "GtkToolButton") - (gtype-id "GTK_TYPE_TOOL_BUTTON") -) - -(define-object ToolItem - (in-module "Gtk") - (parent "GtkBin") - (c-name "GtkToolItem") - (gtype-id "GTK_TYPE_TOOL_ITEM") -) - -(define-object Tooltips - (in-module "Gtk") - (parent "GtkObject") - (c-name "GtkTooltips") - (fields - '("GtkWidget*" "tip_window") - '("GtkWidget*" "tip_label") - '("GtkTooltipsData*" "active_tips_data") - '("GList*" "tips_data_list") - '("guint" "delay") - '("guint" "enabled") - '("guint" "use_sticky_delay") - '("gint" "timer_tag") - ) - (gtype-id "GTK_TYPE_TOOLTIPS") -) - -(define-object TreeModelFilter - (in-module "Gtk") - (parent "GObject") - (c-name "GtkTreeModelFilter") - (gtype-id "GTK_TYPE_TREE_MODEL_FILTER") - (implements "GtkTreeModel") - (implements "GtkTreeDragSource") -) - -(define-object TreeModelSort - (in-module "Gtk") - (parent "GObject") - (c-name "GtkTreeModelSort") - (gtype-id "GTK_TYPE_TREE_MODEL_SORT") - (implements "GtkTreeModel") - (implements "GtkTreeDragSource") - (implements "GtkTreeSortable") -) - -(define-object TreeSelection - (in-module "Gtk") - (parent "GObject") - (c-name "GtkTreeSelection") - (gtype-id "GTK_TYPE_TREE_SELECTION") -) - -(define-object TreeStore - (in-module "Gtk") - (parent "GObject") - (c-name "GtkTreeStore") - (gtype-id "GTK_TYPE_TREE_STORE") - (implements "GtkTreeModel") - (implements "GtkTreeDragSource") - (implements "GtkTreeDragDest") - (implements "GtkTreeSortable") -) - -(define-object TreeView - (in-module "Gtk") - (parent "GtkContainer") - (c-name "GtkTreeView") - (gtype-id "GTK_TYPE_TREE_VIEW") -) - -(define-object TreeViewColumn - (in-module "Gtk") - (parent "GtkObject") - (c-name "GtkTreeViewColumn") - (gtype-id "GTK_TYPE_TREE_VIEW_COLUMN") - (implements "GtkCellLayout") -) - -(define-object UIManager - (in-module "Gtk") - (parent "GObject") - (c-name "GtkUIManager") - (gtype-id "GTK_TYPE_UI_MANAGER") -) - -(define-object VBox - (in-module "Gtk") - (parent "GtkBox") - (c-name "GtkVBox") - (gtype-id "GTK_TYPE_VBOX") -) - -(define-object VButtonBox - (in-module "Gtk") - (parent "GtkButtonBox") - (c-name "GtkVButtonBox") - (gtype-id "GTK_TYPE_VBUTTON_BOX") -) - -(define-object Viewport - (in-module "Gtk") - (parent "GtkBin") - (c-name "GtkViewport") - (gtype-id "GTK_TYPE_VIEWPORT") -) - -(define-object VPaned - (in-module "Gtk") - (parent "GtkPaned") - (c-name "GtkVPaned") - (gtype-id "GTK_TYPE_VPANED") -) - -(define-object VRuler - (in-module "Gtk") - (parent "GtkRuler") - (c-name "GtkVRuler") - (gtype-id "GTK_TYPE_VRULER") -) - -(define-object VScale - (in-module "Gtk") - (parent "GtkScale") - (c-name "GtkVScale") - (gtype-id "GTK_TYPE_VSCALE") -) - -(define-object VScrollbar - (in-module "Gtk") - (parent "GtkScrollbar") - (c-name "GtkVScrollbar") - (gtype-id "GTK_TYPE_VSCROLLBAR") -) - -(define-object VSeparator - (in-module "Gtk") - (parent "GtkSeparator") - (c-name "GtkVSeparator") - (gtype-id "GTK_TYPE_VSEPARATOR") -) - -(define-object Widget - (in-module "Gtk") - (parent "GtkObject") - (c-name "GtkWidget") - (gtype-id "GTK_TYPE_WIDGET") - (fields - '("guint8" "state") - '("guint8" "saved_state") - '("gchar*" "name") - '("GtkStyle*" "style") - '("GdkRectangle" "allocation") - '("GdkWindow*" "window") - '("GtkWidget*" "parent") - ) -) - -(define-object Window - (in-module "Gtk") - (parent "GtkBin") - (c-name "GtkWindow") - (gtype-id "GTK_TYPE_WINDOW") - (fields - '("gchar*" "title") - '("gchar*" "wmclass_name") - '("gchar*" "wmclass_class") - '("gchar*" "wm_role") - '("GtkWidget*" "focus_widget") - '("GtkWidget*" "default_widget") - '("GtkWindow*" "transient_parent") -; '("GtkWindowGeometryInfo* "geometry_info") - '("GdkWindow*" "frame") - '("GtkWindowGroup*" "group") - '("guint16" "configure_request_count") - '("guint" "allow_shrink") - '("guint" "allow_grow") - '("guint" "configure_notify_received") - '("guint" "need_default_position") - '("guint" "need_default_size") - '("guint" "position") - '("guint" "type") - '("guint" "has_user_ref_count") - '("guint" "has_focus") - '("guint" "modal") - '("guint" "destroy_with_parent") - '("guint" "has_frame") - '("guint" "iconify_initially") - '("guint" "stick_initially") - '("guint" "maximize_initially") - '("guint" "decorated") - '("guint" "type_hint") - '("guint" "gravity") - '("guint" "frame_left") - '("guint" "frame_top") - '("guint" "frame_right") - '("guint" "frame_bottom") - '("guint" "keys_changed_handler") - '("GdkModifierType" "mnemonic_modifier") - ) -) - -(define-object WindowGroup - (in-module "Gtk") - (parent "GObject") - (c-name "GtkWindowGroup") - (gtype-id "GTK_TYPE_WINDOW_GROUP") -) - -;; Pointers ... - -(define-pointer CTreeNode - (in-module "Gtk") - (c-name "GtkCTreeNode") - (gtype-id "GTK_TYPE_CTREE_NODE") -) - -;; Unsupported - -(define-boxed FileInfo - (in-module "Gtk") - (c-name "GtkFileInfo") - (gtype-id "GTK_TYPE_FILE_INFO") -) - -(define-boxed FilePath - (in-module "Gtk") - (c-name "GtkFilePath") - (gtype-id "GTK_TYPE_FILE_PATH") -) - -(define-boxed TreePath - (in-module "Gtk") - (c-name "GtkTreePath") - (gtype-id "GTK_TYPE_TREE_PATH") -) - -(define-interface FileFolder - (in-module "Gtk") - (c-name "GtkFileFolder") - (gtype-id "GTK_TYPE_FILE_FOLDER") - (prerequisite "GObject") -) - -(define-interface FileSystem - (in-module "Gtk") - (c-name "GtkFileSystem") - (gtype-id "GTK_TYPE_FILE_SYSTEM") - (prerequisite "GObject") -) - -(define-object FileSystemHandle - (in-module "Gtk") - (parent "GObject") - (c-name "GtkFileSystemHandle") - (gtype-id "GTK_TYPE_FILE_SYSTEM_HANDLE") -) - -(define-object TextLayout - (in-module "Gtk") - (parent "GObject") - (c-name "GtkTextLayout") - (gtype-id "GTK_TYPE_TEXT_LAYOUT") -) - -(define-object Text - (in-module "Gtk") - (parent "GtkOldEditable") - (c-name "GtkText") - (gtype-id "GTK_TYPE_TEXT") - (implements "GtkEditable") -) - -(define-object Tree - (in-module "Gtk") - (parent "GtkContainer") - (c-name "GtkTree") - (gtype-id "GTK_TYPE_TREE") -) - -(define-object TreeItem - (in-module "Gtk") - (parent "GtkItem") - (c-name "GtkTreeItem") - (gtype-id "GTK_TYPE_TREE_ITEM") -) - -(define-object TipsQuery - (in-module "Gtk") - (parent "GtkLabel") - (c-name "GtkTipsQuery") - (gtype-id "GTK_TYPE_TIPS_QUERY") -) - -(define-flags FileInfoType - (in-module "Gtk") - (c-name "GtkFileInfoType") - (gtype-id "GTK_TYPE_FILE_INFO_TYPE") - (values - '("display-name" "GTK_FILE_INFO_DISPLAY_NAME") - '("is-folder" "GTK_FILE_INFO_IS_FOLDER") - '("is-hidden" "GTK_FILE_INFO_IS_HIDDEN") - '("mime-type" "GTK_FILE_INFO_MIME_TYPE") - '("modification-time" "GTK_FILE_INFO_MODIFICATION_TIME") - '("size" "GTK_FILE_INFO_SIZE") - '("icon" "GTK_FILE_INFO_ICON") - '("all" "GTK_FILE_INFO_ALL") - ) -) - -(define-enum FileSystemError - (in-module "Gtk") - (c-name "GtkFileSystemError") - (gtype-id "GTK_TYPE_FILE_SYSTEM_ERROR") - (values - '("nonexistent" "GTK_FILE_SYSTEM_ERROR_NONEXISTENT") - '("not-folder" "GTK_FILE_SYSTEM_ERROR_NOT_FOLDER") - '("invalid-uri" "GTK_FILE_SYSTEM_ERROR_INVALID_URI") - '("bad-filename" "GTK_FILE_SYSTEM_ERROR_BAD_FILENAME") - '("failed" "GTK_FILE_SYSTEM_ERROR_FAILED") - '("already-exists" "GTK_FILE_SYSTEM_ERROR_ALREADY_EXISTS") - ) -) diff --git a/gtk/gtk-base.defs b/gtk/gtk-base.defs deleted file mode 100644 index 583ea5a8..00000000 --- a/gtk/gtk-base.defs +++ /dev/null @@ -1,28041 +0,0 @@ -;; -*- scheme -*- - -(include "gtk-extrafuncs.defs") -(include "gtk-base-types.defs") - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtk.h - -;; From /opt/gnome-2.10/include/gtk-2.0/gtk/gtkaboutdialog.h - -(define-function gtk_about_dialog_get_type - (c-name "gtk_about_dialog_get_type") - (return-type "GType") -) - -(define-function gtk_about_dialog_new - (c-name "gtk_about_dialog_new") - (is-constructor-of "GtkAboutDialog") - (return-type "GtkWidget*") -) - -(define-method get_name - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_get_name") - (return-type "const-gchar*") -) - -(define-method set_name - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_set_name") - (return-type "none") - (parameters - '("const-gchar*" "name" (null-ok)) - ) -) - -(define-method get_version - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_get_version") - (return-type "const-gchar*") -) - -(define-method set_version - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_set_version") - (return-type "none") - (parameters - '("const-gchar*" "version" (null-ok)) - ) -) - -(define-method get_copyright - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_get_copyright") - (return-type "const-gchar*") -) - -(define-method set_copyright - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_set_copyright") - (return-type "none") - (parameters - '("const-gchar*" "copyright" (null-ok)) - ) -) - -(define-method get_comments - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_get_comments") - (return-type "const-gchar*") -) - -(define-method set_comments - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_set_comments") - (return-type "none") - (parameters - '("const-gchar*" "comments" (null-ok)) - ) -) - -(define-method get_license - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_get_license") - (return-type "const-gchar*") -) - -(define-method set_license - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_set_license") - (return-type "none") - (parameters - '("const-gchar*" "license" (null-ok)) - ) -) - -(define-method get_wrap_license - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_get_wrap_license") - (return-type "gboolean") -) - -(define-method set_wrap_license - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_set_wrap_license") - (return-type "none") - (parameters - '("gboolean" "wrap_license") - ) -) - -(define-method get_website - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_get_website") - (return-type "const-gchar*") -) - -(define-method set_website - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_set_website") - (return-type "none") - (parameters - '("const-gchar*" "website" (null-ok)) - ) -) - -(define-method get_website_label - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_get_website_label") - (return-type "const-gchar*") -) - -(define-method set_website_label - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_set_website_label") - (return-type "none") - (parameters - '("const-gchar*" "website_label" (null-ok)) - ) -) - -(define-method get_authors - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_get_authors") - (return-type "gchar**") -) - -(define-method set_authors - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_set_authors") - (return-type "none") - (parameters - '("gchar**" "authors") - ) -) - -(define-method get_documenters - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_get_documenters") - (return-type "gchar**") -) - -(define-method set_documenters - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_set_documenters") - (return-type "none") - (parameters - '("gchar**" "documenters") - ) -) - -(define-method get_artists - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_get_artists") - (return-type "gchar**") -) - -(define-method set_artists - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_set_artists") - (return-type "none") - (parameters - '("gchar**" "artists") - ) -) - -(define-method get_translator_credits - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_get_translator_credits") - (return-type "const-gchar*") -) - -(define-method set_translator_credits - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_set_translator_credits") - (return-type "none") - (parameters - '("const-gchar*" "translator_credits" (null-ok)) - ) -) - -(define-method get_logo - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_get_logo") - (return-type "GdkPixbuf*") -) - -(define-method set_logo - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_set_logo") - (return-type "none") - (parameters - '("GdkPixbuf*" "logo" (null-ok)) - ) -) - -(define-method get_logo_icon_name - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_get_logo_icon_name") - (return-type "const-gchar*") -) - -(define-method set_logo_icon_name - (of-object "GtkAboutDialog") - (c-name "gtk_about_dialog_set_logo_icon_name") - (return-type "none") - (parameters - '("const-gchar*" "icon_name" (null-ok)) - ) -) - -(define-function about_dialog_set_email_hook - (c-name "gtk_about_dialog_set_email_hook") - (return-type "GtkAboutDialogActivateLinkFunc") - (parameters - '("GtkAboutDialogActivateLinkFunc" "func") - '("gpointer" "data") - '("GDestroyNotify" "destroy") - ) -) - -(define-function about_dialog_set_url_hook - (c-name "gtk_about_dialog_set_url_hook") - (return-type "GtkAboutDialogActivateLinkFunc") - (parameters - '("GtkAboutDialogActivateLinkFunc" "func") - '("gpointer" "data") - '("GDestroyNotify" "destroy") - ) -) - -(define-function show_about_dialog - (c-name "gtk_show_about_dialog") - (return-type "none") - (parameters - '("GtkWindow*" "parent") - '("const-gchar*" "first_property_name") - ) - (varargs #t) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkaccelgroup.h - -(define-function gtk_accel_group_get_type - (c-name "gtk_accel_group_get_type") - (return-type "GType") -) - -(define-function gtk_accel_group_new - (c-name "gtk_accel_group_new") - (is-constructor-of "GtkAccelGroup") - (return-type "GtkAccelGroup*") -) - -(define-method lock - (of-object "GtkAccelGroup") - (c-name "gtk_accel_group_lock") - (return-type "none") -) - -(define-method unlock - (of-object "GtkAccelGroup") - (c-name "gtk_accel_group_unlock") - (return-type "none") -) - -(define-method connect - (of-object "GtkAccelGroup") - (c-name "gtk_accel_group_connect") - (return-type "none") - (parameters - '("guint" "accel_key") - '("GdkModifierType" "accel_mods") - '("GtkAccelFlags" "accel_flags") - '("GClosure*" "closure") - ) -) - -(define-method connect_by_path - (of-object "GtkAccelGroup") - (c-name "gtk_accel_group_connect_by_path") - (return-type "none") - (parameters - '("const-gchar*" "accel_path") - '("GClosure*" "closure") - ) -) - -(define-method disconnect - (of-object "GtkAccelGroup") - (c-name "gtk_accel_group_disconnect") - (return-type "gboolean") - (parameters - '("GClosure*" "closure") - ) -) - -(define-method disconnect_key - (of-object "GtkAccelGroup") - (c-name "gtk_accel_group_disconnect_key") - (return-type "gboolean") - (parameters - '("guint" "accel_key") - '("GdkModifierType" "accel_mods") - ) -) - -(define-method activate - (of-object "GtkAccelGroup") - (c-name "gtk_accel_group_activate") - (return-type "gboolean") - (parameters - '("GQuark" "accel_quark") - '("GObject*" "acceleratable") - '("guint" "accel_key") - '("GdkModifierType" "accel_mods") - ) -) - -(define-function accel_groups_activate - (c-name "gtk_accel_groups_activate") - (return-type "gboolean") - (parameters - '("GObject*" "object") - '("guint" "accel_key") - '("GdkModifierType" "accel_mods") - ) -) - -(define-function accel_groups_from_object - (c-name "gtk_accel_groups_from_object") - (return-type "GSList*") - (parameters - '("GObject*" "object") - ) -) - -(define-method find - (of-object "GtkAccelGroup") - (c-name "gtk_accel_group_find") - (return-type "GtkAccelKey*") - (parameters - '("gboolean" "(*find_func") - ) - ) - -(define-function accel_group_from_accel_closure - (c-name "gtk_accel_group_from_accel_closure") - (return-type "GtkAccelGroup*") - (parameters - '("GClosure*" "closure") - ) -) - -(define-virtual accel_changed - (of-object "GtkAccelGroup") - (return-type "none") - (parameters - '("guint" "keyval") - '("GdkModifierType" "modifier") - '("GClosure*" "accel_closure") - ) -) - -(define-function accelerator_valid - (c-name "gtk_accelerator_valid") - (return-type "gboolean") - (parameters - '("guint" "keyval") - '("GdkModifierType" "modifiers") - ) -) - -(define-function accelerator_parse - (c-name "gtk_accelerator_parse") - (return-type "none") - (parameters - '("const-gchar*" "accelerator") - '("guint*" "accelerator_key") - '("GdkModifierType*" "accelerator_mods") - ) -) - -(define-function accelerator_name - (c-name "gtk_accelerator_name") - (return-type "gchar*") - (parameters - '("guint" "accelerator_key") - '("GdkModifierType" "accelerator_mods") - ) -) - -(define-function accelerator_set_default_mod_mask - (c-name "gtk_accelerator_set_default_mod_mask") - (return-type "none") - (parameters - '("GdkModifierType" "default_mod_mask") - ) -) - -(define-function accelerator_get_default_mod_mask - (c-name "gtk_accelerator_get_default_mod_mask") - (return-type "GdkModifierType") -) - -(define-method query - (of-object "GtkAccelGroup") - (c-name "gtk_accel_group_query") - (return-type "GtkAccelGroupEntry*") - (parameters - '("guint" "accel_key") - '("GdkModifierType" "accel_mods") - '("guint*" "n_entries") - ) -) - -(define-function accelerator_get_label - (c-name "gtk_accelerator_get_label") - (return-type "gchar*") - (parameters - '("guint" "accelerator_key") - '("GdkModifierType" "accelerator_mods") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkaccellabel.h - -(define-function gtk_accel_label_get_type - (c-name "gtk_accel_label_get_type") - (return-type "GType") -) - -(define-function gtk_accel_label_new - (c-name "gtk_accel_label_new") - (is-constructor-of "GtkAccelLabel") - (return-type "GtkWidget*") - (properties - '("label" (argname "string")) - ) -) - -(define-method accelerator_width - (of-object "GtkAccelLabel") - (c-name "gtk_accel_label_accelerator_width") - (deprecated "use AtkAccelLabel.get_accel_width") - (return-type "guint") - (deprecated "use GtkAccelLabel.get_accel_width") -) - -(define-method get_accel_widget - (of-object "GtkAccelLabel") - (c-name "gtk_accel_label_get_accel_widget") - (return-type "GtkWidget*") -) - -(define-method get_accel_width - (of-object "GtkAccelLabel") - (c-name "gtk_accel_label_get_accel_width") - (return-type "guint") -) - -(define-method set_accel_widget - (of-object "GtkAccelLabel") - (c-name "gtk_accel_label_set_accel_widget") - (return-type "none") - (parameters - '("GtkWidget*" "accel_widget") - ) -) - -(define-method set_accel_closure - (of-object "GtkAccelLabel") - (c-name "gtk_accel_label_set_accel_closure") - (return-type "none") - (parameters - '("GClosure*" "accel_closure") - ) -) - -(define-method refetch - (of-object "GtkAccelLabel") - (c-name "gtk_accel_label_refetch") - (return-type "gboolean") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkaccelmap.h - -(define-function accel_map_add_entry - (c-name "gtk_accel_map_add_entry") - (return-type "none") - (parameters - '("const-gchar*" "accel_path") - '("guint" "accel_key") - '("GdkModifierType" "accel_mods") - ) -) - -(define-function accel_map_lookup_entry - (c-name "gtk_accel_map_lookup_entry") - (return-type "gboolean") - (parameters - '("const-gchar*" "accel_path") - '("GtkAccelKey*" "key") - ) -) - -(define-function accel_map_change_entry - (c-name "gtk_accel_map_change_entry") - (return-type "gboolean") - (parameters - '("const-gchar*" "accel_path") - '("guint" "accel_key") - '("GdkModifierType" "accel_mods") - '("gboolean" "replace") - ) -) - -(define-function accel_map_load - (c-name "gtk_accel_map_load") - (return-type "none") - (parameters - '("const-gchar*" "file_name") - ) -) - -(define-function accel_map_save - (c-name "gtk_accel_map_save") - (return-type "none") - (parameters - '("const-gchar*" "file_name") - ) -) - -(define-function accel_map_foreach - (c-name "gtk_accel_map_foreach") - (return-type "none") - (parameters - '("gpointer" "data") - '("GtkAccelMapForeach" "foreach_func") - ) -) - -(define-function accel_map_load_fd - (c-name "gtk_accel_map_load_fd") - (return-type "none") - (parameters - '("gint" "fd") - ) -) - -(define-function accel_map_load_scanner - (c-name "gtk_accel_map_load_scanner") - (return-type "none") - (parameters - '("GScanner*" "scanner") - ) -) - -(define-function accel_map_save_fd - (c-name "gtk_accel_map_save_fd") - (return-type "none") - (parameters - '("gint" "fd") - ) -) - -(define-function accel_map_lock_path - (c-name "gtk_accel_map_lock_path") - (return-type "none") - (parameters - '("const-gchar*" "accel_path") - ) -) - -(define-function accel_map_unlock_path - (c-name "gtk_accel_map_unlock_path") - (return-type "none") - (parameters - '("const-gchar*" "accel_path") - ) -) - -(define-function accel_map_add_filter - (c-name "gtk_accel_map_add_filter") - (return-type "none") - (parameters - '("const-gchar*" "filter_pattern") - ) -) - -(define-function accel_map_foreach_unfiltered - (c-name "gtk_accel_map_foreach_unfiltered") - (return-type "none") - (parameters - '("gpointer" "data") - '("GtkAccelMapForeach" "foreach_func") - ) -) - -(define-function accel_map_get_type - (c-name "gtk_accel_map_get_type") - (return-type "GType") -) - -(define-function accel_map_get - (c-name "gtk_accel_map_get") - (return-type "GtkAccelMap*") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkaccessible.h - -(define-function gtk_accessible_get_type - (c-name "gtk_accessible_get_type") - (return-type "GType") -) - -(define-method connect_widget_destroyed - (of-object "GtkAccessible") - (c-name "gtk_accessible_connect_widget_destroyed") - (return-type "none") -) - -(define-virtual connect_widget_destroyed - (of-object "GtkAccessible") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkaction.h - -(define-function gtk_action_get_type - (c-name "gtk_action_get_type") - (return-type "GType") -) - -(define-function gtk_action_new - (c-name "gtk_action_new") - (is-constructor-of "GtkAction") - (return-type "GtkAction*") - (properties - '("name") - '("label") - '("tooltip") - '("stock_id") - ) -) - -(define-method get_name - (of-object "GtkAction") - (c-name "gtk_action_get_name") - (return-type "const-gchar*") -) - -(define-method is_sensitive - (of-object "GtkAction") - (c-name "gtk_action_is_sensitive") - (return-type "gboolean") -) - -(define-method get_sensitive - (of-object "GtkAction") - (c-name "gtk_action_get_sensitive") - (return-type "gboolean") -) - -(define-method is_visible - (of-object "GtkAction") - (c-name "gtk_action_is_visible") - (return-type "gboolean") -) - -(define-method get_visible - (of-object "GtkAction") - (c-name "gtk_action_get_visible") - (return-type "gboolean") -) - -(define-method activate - (of-object "GtkAction") - (c-name "gtk_action_activate") - (return-type "none") -) - -(define-method create_icon - (of-object "GtkAction") - (c-name "gtk_action_create_icon") - (return-type "GtkWidget*") - (parameters - '("GtkIconSize" "icon_size") - ) -) - -(define-method create_menu_item - (of-object "GtkAction") - (c-name "gtk_action_create_menu_item") - (return-type "GtkWidget*") -) - -(define-method create_tool_item - (of-object "GtkAction") - (c-name "gtk_action_create_tool_item") - (return-type "GtkWidget*") -) - -(define-method connect_proxy - (of-object "GtkAction") - (c-name "gtk_action_connect_proxy") - (return-type "none") - (parameters - '("GtkWidget*" "proxy") - ) -) - -(define-method disconnect_proxy - (of-object "GtkAction") - (c-name "gtk_action_disconnect_proxy") - (return-type "none") - (parameters - '("GtkWidget*" "proxy") - ) -) - -(define-method get_proxies - (of-object "GtkAction") - (c-name "gtk_action_get_proxies") - (return-type "GSList*") -) - -(define-method connect_accelerator - (of-object "GtkAction") - (c-name "gtk_action_connect_accelerator") - (return-type "none") -) - -(define-method disconnect_accelerator - (of-object "GtkAction") - (c-name "gtk_action_disconnect_accelerator") - (return-type "none") -) - -(define-method get_accel_path - (of-object "GtkAction") - (c-name "gtk_action_get_accel_path") - (return-type "const-gchar*") -) - -(define-method block_activate_from - (of-object "GtkAction") - (c-name "gtk_action_block_activate_from") - (return-type "none") - (parameters - '("GtkWidget*" "proxy") - ) -) - -(define-method unblock_activate_from - (of-object "GtkAction") - (c-name "gtk_action_unblock_activate_from") - (return-type "none") - (parameters - '("GtkWidget*" "proxy") - ) -) - -(define-method set_accel_path - (of-object "GtkAction") - (c-name "gtk_action_set_accel_path") - (return-type "none") - (parameters - '("const-gchar*" "accel_path") - ) -) - -(define-method set_accel_group - (of-object "GtkAction") - (c-name "gtk_action_set_accel_group") - (return-type "none") - (parameters - '("GtkAccelGroup*" "accel_group") - ) -) - -(define-method set_sensitive - (of-object "GtkAction") - (c-name "gtk_action_set_sensitive") - (return-type "none") - (parameters - '("gboolean" "sensitive") - ) -) - -(define-method set_visible - (of-object "GtkAction") - (c-name "gtk_action_set_visible") - (return-type "none") - (parameters - '("gboolean" "visible") - ) -) - -(define-virtual activate - (of-object "GtkAction") - (return-type "none") -) -(define-virtual connect_proxy - (of-object "GtkAction") - (return-type "none") - (parameters - '("GtkWidget*" "proxy") - ) -) -(define-virtual create_menu_item - (of-object "GtkAction") - (return-type "GtkWidget*") -) -(define-virtual create_tool_item - (of-object "GtkAction") - (return-type "GtkWidget*") -) -(define-virtual disconnect_proxy - (of-object "GtkAction") - (return-type "none") - (parameters - '("GtkWidget*" "proxy") - ) -) - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkactiongroup.h - -(define-function gtk_action_group_get_type - (c-name "gtk_action_group_get_type") - (return-type "GType") -) - -(define-function gtk_action_group_new - (c-name "gtk_action_group_new") - (is-constructor-of "GtkActionGroup") - (return-type "GtkActionGroup*") - (properties - '("name") - ) -) - -(define-method get_name - (of-object "GtkActionGroup") - (c-name "gtk_action_group_get_name") - (return-type "const-gchar*") -) - -(define-method get_sensitive - (of-object "GtkActionGroup") - (c-name "gtk_action_group_get_sensitive") - (return-type "gboolean") -) - -(define-method set_sensitive - (of-object "GtkActionGroup") - (c-name "gtk_action_group_set_sensitive") - (return-type "none") - (parameters - '("gboolean" "sensitive") - ) -) - -(define-method get_visible - (of-object "GtkActionGroup") - (c-name "gtk_action_group_get_visible") - (return-type "gboolean") -) - -(define-method set_visible - (of-object "GtkActionGroup") - (c-name "gtk_action_group_set_visible") - (return-type "none") - (parameters - '("gboolean" "visible") - ) -) - -(define-method get_action - (of-object "GtkActionGroup") - (c-name "gtk_action_group_get_action") - (return-type "GtkAction*") - (parameters - '("const-gchar*" "action_name") - ) -) - -(define-method list_actions - (of-object "GtkActionGroup") - (c-name "gtk_action_group_list_actions") - (return-type "GList*") -) - -(define-method add_action - (of-object "GtkActionGroup") - (c-name "gtk_action_group_add_action") - (return-type "none") - (parameters - '("GtkAction*" "action") - ) -) - -(define-method add_action_with_accel - (of-object "GtkActionGroup") - (c-name "gtk_action_group_add_action_with_accel") - (return-type "none") - (parameters - '("GtkAction*" "action") - '("const-gchar*" "accelerator" (null-ok)) - ) -) - -(define-method remove_action - (of-object "GtkActionGroup") - (c-name "gtk_action_group_remove_action") - (return-type "none") - (parameters - '("GtkAction*" "action") - ) -) - -(define-method add_actions - (of-object "GtkActionGroup") - (c-name "gtk_action_group_add_actions") - (return-type "none") - (parameters - '("GtkActionEntry*" "entries") - '("guint" "n_entries") - '("gpointer" "user_data") - ) -) - -(define-method add_toggle_actions - (of-object "GtkActionGroup") - (c-name "gtk_action_group_add_toggle_actions") - (return-type "none") - (parameters - '("GtkToggleActionEntry*" "entries") - '("guint" "n_entries") - '("gpointer" "user_data") - ) -) - -(define-method add_radio_actions - (of-object "GtkActionGroup") - (c-name "gtk_action_group_add_radio_actions") - (return-type "none") - (parameters - '("GtkRadioActionEntry*" "entries") - '("guint" "n_entries") - '("gint" "value") - '("GCallback" "on_change") - '("gpointer" "user_data") - ) -) - -(define-method add_actions_full - (of-object "GtkActionGroup") - (c-name "gtk_action_group_add_actions_full") - (return-type "none") - (parameters - '("GtkActionEntry*" "entries") - '("guint" "n_entries") - '("gpointer" "user_data") - '("GDestroyNotify" "destroy") - ) -) - -(define-method add_toggle_actions_full - (of-object "GtkActionGroup") - (c-name "gtk_action_group_add_toggle_actions_full") - (return-type "none") - (parameters - '("GtkToggleActionEntry*" "entries") - '("guint" "n_entries") - '("gpointer" "user_data") - '("GDestroyNotify" "destroy") - ) -) - -(define-method add_radio_actions_full - (of-object "GtkActionGroup") - (c-name "gtk_action_group_add_radio_actions_full") - (return-type "none") - (parameters - '("GtkRadioActionEntry*" "entries") - '("guint" "n_entries") - '("gint" "value") - '("GCallback" "on_change") - '("gpointer" "user_data") - '("GDestroyNotify" "destroy") - ) -) - -(define-method set_translate_func - (of-object "GtkActionGroup") - (c-name "gtk_action_group_set_translate_func") - (return-type "none") - (parameters - '("GtkTranslateFunc" "func") - '("gpointer" "data") - '("GtkDestroyNotify" "notify") - ) -) - -(define-method set_translation_domain - (of-object "GtkActionGroup") - (c-name "gtk_action_group_set_translation_domain") - (return-type "none") - (parameters - '("const-gchar*" "domain") - ) -) - -(define-method translate_string - (of-object "GtkActionGroup") - (c-name "gtk_action_group_translate_string") - (return-type "const-gchar*") - (parameters - '("const-gchar*" "string") - ) -) - -(define-virtual get_action - (of-object "GtkActionGroup") - (return-type "GtkAction*") - (parameters - '("const-gchar*" "action_name") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkadjustment.h - -(define-function gtk_adjustment_get_type - (c-name "gtk_adjustment_get_type") - (return-type "GType") -) - -(define-function gtk_adjustment_new - (c-name "gtk_adjustment_new") - (is-constructor-of "GtkAdjustment") - (return-type "GtkObject*") - (properties - '("value" (optional)) - '("lower" (optional)) - '("upper" (optional)) - '("step_increment" (argname "step_incr") (optional)) - '("page_increment" (argname "page_incr") (optional)) - '("page_size" (optional)) - ) -) - -(define-method changed - (of-object "GtkAdjustment") - (c-name "gtk_adjustment_changed") - (return-type "none") -) - -(define-method value_changed - (of-object "GtkAdjustment") - (c-name "gtk_adjustment_value_changed") - (return-type "none") -) - -(define-method clamp_page - (of-object "GtkAdjustment") - (c-name "gtk_adjustment_clamp_page") - (return-type "none") - (parameters - '("gdouble" "lower") - '("gdouble" "upper") - ) -) - -(define-method get_value - (of-object "GtkAdjustment") - (c-name "gtk_adjustment_get_value") - (return-type "gdouble") -) - -(define-method set_value - (of-object "GtkAdjustment") - (c-name "gtk_adjustment_set_value") - (return-type "none") - (parameters - '("gdouble" "value") - ) -) - -(define-virtual changed - (of-object "GtkAdjustment") - (return-type "none") -) -(define-virtual value_changed - (of-object "GtkAdjustment") - (return-type "none") -) - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkalignment.h - -(define-function gtk_alignment_get_type - (c-name "gtk_alignment_get_type") - (return-type "GType") -) - -(define-function gtk_alignment_new - (c-name "gtk_alignment_new") - (is-constructor-of "GtkAlignment") - (return-type "GtkWidget*") - (properties - '("xalign" (optional)) - '("yalign" (optional)) - '("xscale" (optional)) - '("yscale" (optional)) - ) -) - -(define-method set - (of-object "GtkAlignment") - (c-name "gtk_alignment_set") - (return-type "none") - (parameters - '("gfloat" "xalign") - '("gfloat" "yalign") - '("gfloat" "xscale") - '("gfloat" "yscale") - ) -) - -(define-method set_padding - (of-object "GtkAlignment") - (c-name "gtk_alignment_set_padding") - (return-type "none") - (parameters - '("guint" "padding_top") - '("guint" "padding_bottom") - '("guint" "padding_left") - '("guint" "padding_right") - ) -) - -(define-method get_padding - (of-object "GtkAlignment") - (c-name "gtk_alignment_get_padding") - (return-type "none") - (parameters - '("guint*" "padding_top") - '("guint*" "padding_bottom") - '("guint*" "padding_left") - '("guint*" "padding_right") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkarrow.h - -(define-function gtk_arrow_get_type - (c-name "gtk_arrow_get_type") - (return-type "GType") -) - -(define-function gtk_arrow_new - (c-name "gtk_arrow_new") - (is-constructor-of "GtkArrow") - (return-type "GtkWidget*") - (properties - '("arrow_type") - '("shadow_type") - ) -) - -(define-method set - (of-object "GtkArrow") - (c-name "gtk_arrow_set") - (return-type "none") - (parameters - '("GtkArrowType" "arrow_type") - '("GtkShadowType" "shadow_type") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkaspectframe.h - -(define-function gtk_aspect_frame_get_type - (c-name "gtk_aspect_frame_get_type") - (return-type "GType") -) - -(define-function gtk_aspect_frame_new - (c-name "gtk_aspect_frame_new") - (is-constructor-of "GtkAspectFrame") - (return-type "GtkWidget*") - (properties - '("label" (optional)) - '("xalign" (optional)) - '("yalign" (optional)) - '("ratio" (optional)) - '("obey_child" (optional)) - ) -) - -(define-method set - (of-object "GtkAspectFrame") - (c-name "gtk_aspect_frame_set") - (return-type "none") - (parameters - '("gfloat" "xalign" (default "0.0")) - '("gfloat" "yalign" (default "0.0")) - '("gfloat" "ratio" (default "1.0")) - '("gboolean" "obey_child" (default "1")) - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkbbox.h - -(define-function gtk_button_box_get_type - (c-name "gtk_button_box_get_type") - (return-type "GType") -) - -(define-method get_layout - (of-object "GtkButtonBox") - (c-name "gtk_button_box_get_layout") - (return-type "GtkButtonBoxStyle") -) - -(define-method set_layout - (of-object "GtkButtonBox") - (c-name "gtk_button_box_set_layout") - (return-type "none") - (parameters - '("GtkButtonBoxStyle" "layout_style") - ) -) - -(define-method get_child_secondary - (of-object "GtkButtonBox") - (c-name "gtk_button_box_get_child_secondary") - (return-type "gboolean") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-method set_child_secondary - (of-object "GtkButtonBox") - (c-name "gtk_button_box_set_child_secondary") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("gboolean" "is_secondary") - ) -) - -(define-method set_child_size - (of-object "GtkButtonBox") - (c-name "gtk_button_box_set_child_size") - (return-type "none") - (parameters - '("gint" "min_width") - '("gint" "min_height") - ) - (deprecated "don't use this") -) - -(define-method set_child_ipadding - (of-object "GtkButtonBox") - (c-name "gtk_button_box_set_child_ipadding") - (return-type "none") - (parameters - '("gint" "ipad_x") - '("gint" "ipad_y") - ) - (deprecated "don't use this") -) - -(define-method get_child_size - (of-object "GtkButtonBox") - (c-name "gtk_button_box_get_child_size") - (return-type "none") - (parameters - '("gint*" "min_width") - '("gint*" "min_height") - ) - (deprecated "don't use this") -) - -(define-method get_child_ipadding - (of-object "GtkButtonBox") - (c-name "gtk_button_box_get_child_ipadding") - (return-type "none") - (parameters - '("gint*" "ipad_x") - '("gint*" "ipad_y") - ) - (deprecated "don't use this") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkbin.h - -(define-function gtk_bin_get_type - (c-name "gtk_bin_get_type") - (return-type "GType") -) - -(define-method get_child - (of-object "GtkBin") - (c-name "gtk_bin_get_child") - (return-type "GtkWidget*") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkbindings.h - -(define-function gtk_binding_set_new - (c-name "gtk_binding_set_new") - (return-type "GtkBindingSet*") - (parameters - '("const-gchar*" "set_name") - ) - (deprecated "use binding_set_new") -) - -(define-function binding_set_new - (c-name "gtk_binding_set_new") - (is-constructor-of "GtkBindingSet") - (return-type "GtkBindingSet*") - (parameters - '("const-gchar*" "set_name") - ) -) - -(define-function gtk_binding_set_by_class - (c-name "gtk_binding_set_by_class") - (return-type "GtkBindingSet*") - (parameters - '("gpointer" "object_class") - ) - (deprecated "use binding_set_by_class") -) - -(define-function binding_set_by_class - (c-name "gtk_binding_set_by_class") - (return-type "GtkBindingSet*") - (parameters - '("gpointer" "object_class") - ) -) - -(define-function gtk_binding_set_find - (c-name "gtk_binding_set_find") - (return-type "GtkBindingSet*") - (parameters - '("const-gchar*" "set_name") - ) - (deprecated "use binding_set_find") -) - -(define-function binding_set_find - (c-name "gtk_binding_set_find") - (is-constructor-of "GtkBindingSet") - (return-type "GtkBindingSet*") - (parameters - '("const-gchar*" "set_name") - ) -) - -(define-function bindings_activate - (c-name "gtk_bindings_activate") - (return-type "gboolean") - (parameters - '("GtkObject*" "object") - '("guint" "keyval") - '("GdkModifierType" "modifiers") - ) -) - -(define-function bindings_activate_event - (c-name "gtk_bindings_activate_event") - (return-type "gboolean") - (parameters - '("GtkObject*" "object") - '("GdkEventKey*" "event") - ) -) - -(define-method activate - (of-object "GtkBindingSet") - (c-name "gtk_binding_set_activate") - (return-type "gboolean") - (parameters - '("guint" "keyval") - '("GdkModifierType" "modifiers") - '("GtkObject*" "object") - ) -) - -(define-function binding_entry_clear - (c-name "gtk_binding_entry_clear") - (return-type "none") - (parameters - '("GtkBindingSet*" "binding_set") - '("guint" "keyval") - '("GdkModifierType" "modifiers") - ) -) - -(define-function binding_entry_add_signal - (c-name "gtk_binding_entry_add_signal") - (return-type "none") - (parameters - '("GtkBindingSet*" "binding_set") - '("guint" "keyval") - '("GdkModifierType" "modifiers") - '("const-gchar*" "signal_name") - '("guint" "n_args") - ) - (varargs #t) -) - -(define-method add_path - (of-object "GtkBindingSet") - (c-name "gtk_binding_set_add_path") - (return-type "none") - (parameters - '("GtkPathType" "path_type") - '("const-gchar*" "path_pattern") - '("GtkPathPriorityType" "priority") - ) -) - -(define-function binding_entry_remove - (c-name "gtk_binding_entry_remove") - (return-type "none") - (parameters - '("GtkBindingSet*" "binding_set") - '("guint" "keyval") - '("GdkModifierType" "modifiers") - ) -) - -(define-function binding_entry_add_signall - (c-name "gtk_binding_entry_add_signall") - (return-type "none") - (parameters - '("GtkBindingSet*" "binding_set") - '("guint" "keyval") - '("GdkModifierType" "modifiers") - '("const-gchar*" "signal_name") - '("GSList*" "binding_args") - ) -) - -(define-function binding_parse_binding - (c-name "gtk_binding_parse_binding") - (return-type "guint") - (parameters - '("GScanner*" "scanner") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkbox.h - -(define-function gtk_box_get_type - (c-name "gtk_box_get_type") - (return-type "GType") -) - -(define-method pack_start - (of-object "GtkBox") - (c-name "gtk_box_pack_start") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("gboolean" "expand" (default "TRUE")) - '("gboolean" "fill" (default "TRUE")) - '("guint" "padding" (default "0")) - ) -) - -(define-method pack_end - (of-object "GtkBox") - (c-name "gtk_box_pack_end") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("gboolean" "expand" (default "TRUE")) - '("gboolean" "fill" (default "TRUE")) - '("guint" "padding" (default "0")) - ) -) - -(define-method pack_start_defaults - (of-object "GtkBox") - (c-name "gtk_box_pack_start_defaults") - (deprecated "use pack_start instead") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - ) -) - -(define-method pack_end_defaults - (of-object "GtkBox") - (c-name "gtk_box_pack_end_defaults") - (deprecated "use pack_end instead") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - ) -) - -(define-method set_homogeneous - (of-object "GtkBox") - (c-name "gtk_box_set_homogeneous") - (return-type "none") - (parameters - '("gboolean" "homogeneous") - ) -) - -(define-method get_homogeneous - (of-object "GtkBox") - (c-name "gtk_box_get_homogeneous") - (return-type "gboolean") -) - -(define-method set_spacing - (of-object "GtkBox") - (c-name "gtk_box_set_spacing") - (return-type "none") - (parameters - '("gint" "spacing") - ) -) - -(define-method get_spacing - (of-object "GtkBox") - (c-name "gtk_box_get_spacing") - (return-type "gint") -) - -(define-method reorder_child - (of-object "GtkBox") - (c-name "gtk_box_reorder_child") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("gint" "position") - ) -) - -(define-method query_child_packing - (of-object "GtkBox") - (c-name "gtk_box_query_child_packing") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("gboolean*" "expand") - '("gboolean*" "fill") - '("guint*" "padding") - '("GtkPackType*" "pack_type") - ) -) - -(define-method set_child_packing - (of-object "GtkBox") - (c-name "gtk_box_set_child_packing") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("gboolean" "expand") - '("gboolean" "fill") - '("guint" "padding") - '("GtkPackType" "pack_type") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkbutton.h - -(define-function gtk_button_get_type - (c-name "gtk_button_get_type") - (return-type "GType") -) - -(define-function gtk_button_new - (c-name "gtk_button_new") - (is-constructor-of "GtkButton") - (return-type "GtkWidget*") -) - -(define-function gtk_button_new_with_label - (c-name "gtk_button_new_with_label") - (is-constructor-of "GtkButton") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "label") - ) -) - -(define-function gtk_button_new_from_stock - (c-name "gtk_button_new_from_stock") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "stock_id") - ) -) - -(define-function gtk_button_new_with_mnemonic - (c-name "gtk_button_new_with_mnemonic") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "label") - ) -) - -(define-method pressed - (of-object "GtkButton") - (c-name "gtk_button_pressed") - (return-type "none") -) - -(define-method released - (of-object "GtkButton") - (c-name "gtk_button_released") - (return-type "none") -) - -(define-method clicked - (of-object "GtkButton") - (c-name "gtk_button_clicked") - (return-type "none") -) - -(define-method enter - (of-object "GtkButton") - (c-name "gtk_button_enter") - (return-type "none") -) - -(define-method leave - (of-object "GtkButton") - (c-name "gtk_button_leave") - (return-type "none") -) - -(define-method set_relief - (of-object "GtkButton") - (c-name "gtk_button_set_relief") - (return-type "none") - (parameters - '("GtkReliefStyle" "newstyle") - ) -) - -(define-method get_relief - (of-object "GtkButton") - (c-name "gtk_button_get_relief") - (return-type "GtkReliefStyle") -) - -(define-method set_label - (of-object "GtkButton") - (c-name "gtk_button_set_label") - (return-type "none") - (parameters - '("const-gchar*" "label") - ) -) - -(define-method get_label - (of-object "GtkButton") - (c-name "gtk_button_get_label") - (return-type "const-gchar*") -) - -(define-method set_use_underline - (of-object "GtkButton") - (c-name "gtk_button_set_use_underline") - (return-type "none") - (parameters - '("gboolean" "use_underline") - ) -) - -(define-method get_use_underline - (of-object "GtkButton") - (c-name "gtk_button_get_use_underline") - (return-type "gboolean") -) - -(define-method set_use_stock - (of-object "GtkButton") - (c-name "gtk_button_set_use_stock") - (return-type "none") - (parameters - '("gboolean" "use_stock") - ) -) - -(define-method get_use_stock - (of-object "GtkButton") - (c-name "gtk_button_get_use_stock") - (return-type "gboolean") -) - -(define-method set_focus_on_click - (of-object "GtkButton") - (c-name "gtk_button_set_focus_on_click") - (return-type "none") - (parameters - '("gboolean" "focus_on_click") - ) -) - -(define-method get_focus_on_click - (of-object "GtkButton") - (c-name "gtk_button_get_focus_on_click") - (return-type "gboolean") -) - -(define-method set_alignment - (of-object "GtkButton") - (c-name "gtk_button_set_alignment") - (return-type "none") - (parameters - '("gfloat" "xalign") - '("gfloat" "yalign") - ) -) - -(define-method get_alignment - (of-object "GtkButton") - (c-name "gtk_button_get_alignment") - (return-type "none") - (parameters - '("gfloat*" "xalign") - '("gfloat*" "yalign") - ) -) - -(define-method set_image - (of-object "GtkButton") - (c-name "gtk_button_set_image") - (return-type "none") - (parameters - '("GtkWidget*" "image") - ) -) - -(define-method get_image - (of-object "GtkButton") - (c-name "gtk_button_get_image") - (return-type "GtkWidget*") -) - -(define-virtual pressed - (of-object "GtkButton") - (return-type "none") -) -(define-virtual released - (of-object "GtkButton") - (return-type "none") -) -(define-virtual clicked - (of-object "GtkButton") - (return-type "none") -) -(define-virtual enter - (of-object "GtkButton") - (return-type "none") -) -(define-virtual leave - (of-object "GtkButton") - (return-type "none") -) -(define-virtual activate - (of-object "GtkButton") - (return-type "none") -) - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkcalendar.h - -(define-function gtk_calendar_get_type - (c-name "gtk_calendar_get_type") - (return-type "GType") -) - -(define-function gtk_calendar_new - (c-name "gtk_calendar_new") - (is-constructor-of "GtkCalendar") - (return-type "GtkWidget*") -) - -(define-method select_month - (of-object "GtkCalendar") - (c-name "gtk_calendar_select_month") - (return-type "gboolean") - (parameters - '("guint" "month") - '("guint" "year") - ) -) - -(define-method select_day - (of-object "GtkCalendar") - (c-name "gtk_calendar_select_day") - (return-type "none") - (parameters - '("guint" "day") - ) -) - -(define-method mark_day - (of-object "GtkCalendar") - (c-name "gtk_calendar_mark_day") - (return-type "gboolean") - (parameters - '("guint" "day") - ) -) - -(define-method unmark_day - (of-object "GtkCalendar") - (c-name "gtk_calendar_unmark_day") - (return-type "gboolean") - (parameters - '("guint" "day") - ) -) - -(define-method clear_marks - (of-object "GtkCalendar") - (c-name "gtk_calendar_clear_marks") - (return-type "none") -) - -(define-method set_display_options - (of-object "GtkCalendar") - (c-name "gtk_calendar_set_display_options") - (return-type "none") - (parameters - '("GtkCalendarDisplayOptions" "flags") - ) -) - -(define-method get_display_options - (of-object "GtkCalendar") - (c-name "gtk_calendar_get_display_options") - (return-type "GtkCalendarDisplayOptions") -) - -(define-method display_options - (of-object "GtkCalendar") - (c-name "gtk_calendar_display_options") - (return-type "none") - (parameters - '("GtkCalendarDisplayOptions" "flags") - ) -) - -(define-method get_date - (of-object "GtkCalendar") - (c-name "gtk_calendar_get_date") - (return-type "none") - (parameters - '("guint*" "year") - '("guint*" "month") - '("guint*" "day") - ) -) - -(define-method freeze - (of-object "GtkCalendar") - (c-name "gtk_calendar_freeze") - (return-type "none") -) - -(define-method thaw - (of-object "GtkCalendar") - (c-name "gtk_calendar_thaw") - (return-type "none") -) - -(define-virtual month_changed - (of-object "GtkCalendar") - (return-type "none") -) -(define-virtual day_selected - (of-object "GtkCalendar") - (return-type "none") -) -(define-virtual day_selected_double_click - (of-object "GtkCalendar") - (return-type "none") -) -(define-virtual prev_month - (of-object "GtkCalendar") - (return-type "none") -) -(define-virtual next_month - (of-object "GtkCalendar") - (return-type "none") -) -(define-virtual prev_year - (of-object "GtkCalendar") - (return-type "none") -) -(define-virtual next_year - (of-object "GtkCalendar") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkcelleditable.h - -(define-function gtk_cell_editable_get_type - (c-name "gtk_cell_editable_get_type") - (return-type "GType") -) - -(define-method start_editing - (of-object "GtkCellEditable") - (c-name "gtk_cell_editable_start_editing") - (return-type "none") - (parameters - '("GdkEvent*" "event") - ) -) - -(define-method editing_done - (of-object "GtkCellEditable") - (c-name "gtk_cell_editable_editing_done") - (return-type "none") -) - -(define-method remove_widget - (of-object "GtkCellEditable") - (c-name "gtk_cell_editable_remove_widget") - (return-type "none") -) - -(define-virtual editing_done - (of-object "GtkCellEditable") - (return-type "none") -) -(define-virtual remove_widget - (of-object "GtkCellEditable") - (return-type "none") -) -(define-virtual start_editing - (of-object "GtkCellEditable") - (return-type "none") - (parameters - '("GdkEvent*" "event") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkcelllayout.h - -(define-function gtk_cell_layout_get_type - (c-name "gtk_cell_layout_get_type") - (return-type "GType") -) - -(define-method pack_start - (of-object "GtkCellLayout") - (c-name "gtk_cell_layout_pack_start") - (return-type "none") - (parameters - '("GtkCellRenderer*" "cell") - '("gboolean" "expand" (default "TRUE")) - ) -) - -(define-method pack_end - (of-object "GtkCellLayout") - (c-name "gtk_cell_layout_pack_end") - (return-type "none") - (parameters - '("GtkCellRenderer*" "cell") - '("gboolean" "expand" (default "TRUE")) - ) -) - -(define-method clear - (of-object "GtkCellLayout") - (c-name "gtk_cell_layout_clear") - (return-type "none") -) - -(define-method set_attributes - (of-object "GtkCellLayout") - (c-name "gtk_cell_layout_set_attributes") - (return-type "none") - (parameters - '("GtkCellRenderer*" "cell") - ) - (varargs #t) -) - -(define-method add_attribute - (of-object "GtkCellLayout") - (c-name "gtk_cell_layout_add_attribute") - (return-type "none") - (parameters - '("GtkCellRenderer*" "cell") - '("const-gchar*" "attribute") - '("gint" "column") - ) -) - -(define-method set_cell_data_func - (of-object "GtkCellLayout") - (c-name "gtk_cell_layout_set_cell_data_func") - (return-type "none") - (parameters - '("GtkCellRenderer*" "cell") - '("GtkCellLayoutDataFunc" "func") - '("gpointer" "func_data") - '("GDestroyNotify" "destroy") - ) -) - -(define-method clear_attributes - (of-object "GtkCellLayout") - (c-name "gtk_cell_layout_clear_attributes") - (return-type "none") - (parameters - '("GtkCellRenderer*" "cell") - ) -) - -(define-method reorder - (of-object "GtkCellLayout") - (c-name "gtk_cell_layout_reorder") - (return-type "none") - (parameters - '("GtkCellRenderer*" "cell") - '("gint" "position") - ) -) - -(define-virtual pack_start - (of-object "GtkCellLayout") - (return-type "none") - (parameters - '("GtkCellRenderer*" "cell") - '("gboolean" "expand") - ) -) -(define-virtual pack_end - (of-object "GtkCellLayout") - (return-type "none") - (parameters - '("GtkCellRenderer*" "cell") - '("gboolean" "expand") - ) -) -(define-virtual clear - (of-object "GtkCellLayout") - (return-type "none") -) -(define-virtual add_attribute - (of-object "GtkCellLayout") - (return-type "none") - (parameters - '("GtkCellRenderer*" "cell") - '("const-gchar*" "attribute") - '("gint" "column") - ) -) -(define-virtual set_cell_data_func - (of-object "GtkCellLayout") - (return-type "none") - (parameters - '("GtkCellRenderer*" "cell") - '("GtkCellLayoutDataFunc" "func") - '("gpointer" "func_data") - '("GDestroyNotify" "destroy") - ) -) -(define-virtual clear_attributes - (of-object "GtkCellLayout") - (return-type "none") - (parameters - '("GtkCellRenderer*" "cell") - ) -) -(define-virtual reorder - (of-object "GtkCellLayout") - (return-type "none") - (parameters - '("GtkCellRenderer*" "cell") - '("gint" "position") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkcellrenderer.h - -(define-function gtk_cell_renderer_get_type - (c-name "gtk_cell_renderer_get_type") - (return-type "GType") -) - -(define-method get_size - (of-object "GtkCellRenderer") - (c-name "gtk_cell_renderer_get_size") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - '("GdkRectangle*" "cell_area") - '("gint*" "x_offset") - '("gint*" "y_offset") - '("gint*" "width") - '("gint*" "height") - ) -) - -(define-method render - (of-object "GtkCellRenderer") - (c-name "gtk_cell_renderer_render") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkWidget*" "widget") - '("GdkRectangle*" "background_area") - '("GdkRectangle*" "cell_area") - '("GdkRectangle*" "expose_area") - '("GtkCellRendererState" "flags") - ) -) - -(define-method activate - (of-object "GtkCellRenderer") - (c-name "gtk_cell_renderer_activate") - (return-type "gboolean") - (parameters - '("GdkEvent*" "event") - '("GtkWidget*" "widget") - '("const-gchar*" "path") - '("GdkRectangle*" "background_area") - '("GdkRectangle*" "cell_area") - '("GtkCellRendererState" "flags") - ) -) - -(define-method start_editing - (of-object "GtkCellRenderer") - (c-name "gtk_cell_renderer_start_editing") - (return-type "GtkCellEditable*") - (parameters - '("GdkEvent*" "event") - '("GtkWidget*" "widget") - '("const-gchar*" "path") - '("GdkRectangle*" "background_area") - '("GdkRectangle*" "cell_area") - '("GtkCellRendererState" "flags") - ) -) - -(define-method set_fixed_size - (of-object "GtkCellRenderer") - (c-name "gtk_cell_renderer_set_fixed_size") - (return-type "none") - (parameters - '("gint" "width") - '("gint" "height") - ) -) - -(define-method get_fixed_size - (of-object "GtkCellRenderer") - (c-name "gtk_cell_renderer_get_fixed_size") - (return-type "none") - (parameters - '("gint*" "width") - '("gint*" "height") - ) -) - -(define-method editing_canceled - (of-object "GtkCellRenderer") - (c-name "gtk_cell_renderer_editing_canceled") - (return-type "none") -) - -(define-method stop_editing - (of-object "GtkCellRenderer") - (c-name "gtk_cell_renderer_stop_editing") - (return-type "none") - (parameters - '("gboolean" "canceled") - ) -) - -(define-virtual get_size - (of-object "GtkCellRenderer") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - '("GdkRectangle*" "cell_area") - '("gint*" "x_offset") - '("gint*" "y_offset") - '("gint*" "width") - '("gint*" "height") - ) -) -(define-virtual render - (of-object "GtkCellRenderer") - (return-type "none") - (parameters - '("GdkDrawable*" "window") - '("GtkWidget*" "widget") - '("GdkRectangle*" "background_area") - '("GdkRectangle*" "cell_area") - '("GdkRectangle*" "expose_area") - '("GtkCellRendererState" "flags") - ) -) -(define-virtual activate - (of-object "GtkCellRenderer") - (return-type "gboolean") - (parameters - '("GdkEvent*" "event") - '("GtkWidget*" "widget") - '("const-gchar*" "path") - '("GdkRectangle*" "background_area") - '("GdkRectangle*" "cell_area") - '("GtkCellRendererState" "flags") - ) -) -(define-virtual editing_canceled - (of-object "GtkCellRenderer") - (return-type "none") -) -(define-virtual editing_started - (of-object "GtkCellRenderer") - (return-type "none") - (parameters - '("GtkCellEditable*" "editable") - '("const-gchar*" "path") - ) -) -(define-virtual start_editing - (of-object "GtkCellRenderer") - (return-type "GtkCellEditable*") - (parameters - '("GdkEvent*" "event") - '("GtkWidget*" "widget") - '("const-gchar*" "path") - '("GdkRectangle*" "background_area") - '("GdkRectangle*" "cell_area") - '("GtkCellRendererState" "flags") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkcellrenderercombo.h - -(define-function gtk_cell_renderer_combo_get_type - (c-name "gtk_cell_renderer_combo_get_type") - (return-type "GType") -) - -(define-function gtk_cell_renderer_combo_new - (c-name "gtk_cell_renderer_combo_new") - (is-constructor-of "GtkCellRendererCombo") - (return-type "GtkCellRenderer*") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkcellrendererpixbuf.h - -(define-function gtk_cell_renderer_pixbuf_get_type - (c-name "gtk_cell_renderer_pixbuf_get_type") - (return-type "GType") -) - -(define-function gtk_cell_renderer_pixbuf_new - (c-name "gtk_cell_renderer_pixbuf_new") - (is-constructor-of "GtkCellRendererPixbuf") - (return-type "GtkCellRenderer*") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkcellrendererprogress.h - -(define-function gtk_cell_renderer_progress_get_type - (c-name "gtk_cell_renderer_progress_get_type") - (return-type "GType") -) - -(define-function gtk_cell_renderer_progress_new - (c-name "gtk_cell_renderer_progress_new") - (is-constructor-of "GtkCellRendererProgress") - (return-type "GtkCellRenderer*") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkcellrenderertext.h - -(define-function gtk_cell_renderer_text_get_type - (c-name "gtk_cell_renderer_text_get_type") - (return-type "GType") -) - -(define-function gtk_cell_renderer_text_new - (c-name "gtk_cell_renderer_text_new") - (is-constructor-of "GtkCellRendererText") - (return-type "GtkCellRenderer*") -) - -(define-method set_fixed_height_from_font - (of-object "GtkCellRendererText") - (c-name "gtk_cell_renderer_text_set_fixed_height_from_font") - (return-type "none") - (parameters - '("gint" "number_of_rows") - ) -) - -(define-virtual edited - (of-object "GtkCellRendererText") - (return-type "none") - (parameters - '("const-gchar*" "path") - '("const-gchar*" "new_text") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkcellrenderertoggle.h - -(define-function gtk_cell_renderer_toggle_get_type - (c-name "gtk_cell_renderer_toggle_get_type") - (return-type "GType") -) - -(define-function gtk_cell_renderer_toggle_new - (c-name "gtk_cell_renderer_toggle_new") - (is-constructor-of "GtkCellRendererToggle") - (return-type "GtkCellRenderer*") -) - -(define-method get_radio - (of-object "GtkCellRendererToggle") - (c-name "gtk_cell_renderer_toggle_get_radio") - (return-type "gboolean") -) - -(define-method set_radio - (of-object "GtkCellRendererToggle") - (c-name "gtk_cell_renderer_toggle_set_radio") - (return-type "none") - (parameters - '("gboolean" "radio") - ) -) - -(define-method get_active - (of-object "GtkCellRendererToggle") - (c-name "gtk_cell_renderer_toggle_get_active") - (return-type "gboolean") -) - -(define-method set_active - (of-object "GtkCellRendererToggle") - (c-name "gtk_cell_renderer_toggle_set_active") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-virtual toggled - (of-object "GtkCellRendererToggle") - (return-type "none") - (parameters - '("const-gchar*" "path") - ) -) - - -;; From /opt/gnome-2.10/include/gtk-2.0/gtk/gtkcellview.h - -(define-function gtk_cell_view_get_type - (c-name "gtk_cell_view_get_type") - (return-type "GType") -) - -(define-function gtk_cell_view_new - (c-name "gtk_cell_view_new") - (is-constructor-of "GtkCellView") - (return-type "GtkWidget*") -) - -(define-function cell_view_new_with_text - (c-name "gtk_cell_view_new_with_text") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "text") - ) - (caller-owns-return #t) -) - -(define-function cell_view_new_with_markup - (c-name "gtk_cell_view_new_with_markup") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "markup") - ) - (caller-owns-return #t) -) - -(define-function cell_view_new_with_pixbuf - (c-name "gtk_cell_view_new_with_pixbuf") - (return-type "GtkWidget*") - (parameters - '("GdkPixbuf*" "pixbuf") - ) - (caller-owns-return #t) -) - -(define-method set_model - (of-object "GtkCellView") - (c-name "gtk_cell_view_set_model") - (return-type "none") - (parameters - '("GtkTreeModel*" "model" (null-ok)) - ) -) - -(define-method set_displayed_row - (of-object "GtkCellView") - (c-name "gtk_cell_view_set_displayed_row") - (return-type "none") - (parameters - '("GtkTreePath*" "path" (null-ok)) - ) -) - -(define-method get_displayed_row - (of-object "GtkCellView") - (c-name "gtk_cell_view_get_displayed_row") - (return-type "GtkTreePath*") -) - -(define-method get_size_of_row - (of-object "GtkCellView") - (c-name "gtk_cell_view_get_size_of_row") - (return-type "gboolean") - (parameters - '("GtkTreePath*" "path") - '("GtkRequisition*" "requisition") - ) -) - -(define-method set_background_color - (of-object "GtkCellView") - (c-name "gtk_cell_view_set_background_color") - (return-type "none") - (parameters - '("const-GdkColor*" "color") - ) -) - -(define-method get_cell_renderers - (of-object "GtkCellView") - (c-name "gtk_cell_view_get_cell_renderers") - (return-type "GList*") -) - -;; From /opt/gnome-2.10/include/gtk-2.0/gtk/gtkclipboard.h - - -(define-method wait_is_target_available - (of-object "GtkClipboard") - (c-name "gtk_clipboard_wait_is_target_available") - (return-type "gboolean") - (parameters - '("GdkAtom" "target") - ) -) - -(define-method set_can_store - (of-object "GtkClipboard") - (c-name "gtk_clipboard_set_can_store") - (return-type "none") - (parameters - '("const-GtkTargetEntry*" "targets") - '("gint" "n_targets") - ) -) - -(define-method store - (of-object "GtkClipboard") - (c-name "gtk_clipboard_store") - (return-type "none") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkcheckbutton.h - -(define-function gtk_check_button_get_type - (c-name "gtk_check_button_get_type") - (return-type "GType") -) - -(define-function gtk_check_button_new - (c-name "gtk_check_button_new") - (is-constructor-of "GtkCheckButton") - (return-type "GtkWidget*") -) - -(define-function gtk_check_button_new_with_label - (c-name "gtk_check_button_new_with_label") - (is-constructor-of "GtkCheckButton") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "label") - ) -) - -(define-function gtk_check_button_new_with_mnemonic - (c-name "gtk_check_button_new_with_mnemonic") - (is-constructor-of "GtkCheckButton") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "label") - ) -) - -(define-virtual draw_indicator - (of-object "GtkCheckButton") - (return-type "none") - (parameters - '("GdkRectangle*" "area") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkcheckmenuitem.h - -(define-function gtk_check_menu_item_get_type - (c-name "gtk_check_menu_item_get_type") - (return-type "GType") -) - -(define-function gtk_check_menu_item_new - (c-name "gtk_check_menu_item_new") - (is-constructor-of "GtkCheckMenuItem") - (return-type "GtkWidget*") -) - -(define-function gtk_check_menu_item_new_with_label - (c-name "gtk_check_menu_item_new_with_label") - (is-constructor-of "GtkCheckMenuItem") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "label") - ) -) - -(define-function gtk_check_menu_item_new_with_mnemonic - (c-name "gtk_check_menu_item_new_with_mnemonic") - (is-constructor-of "GtkCheckMenuItem") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "label") - ) -) - -(define-method set_active - (of-object "GtkCheckMenuItem") - (c-name "gtk_check_menu_item_set_active") - (return-type "none") - (parameters - '("gboolean" "is_active") - ) -) - -(define-method get_active - (of-object "GtkCheckMenuItem") - (c-name "gtk_check_menu_item_get_active") - (return-type "gboolean") -) - -(define-method toggled - (of-object "GtkCheckMenuItem") - (c-name "gtk_check_menu_item_toggled") - (return-type "none") -) - -(define-method set_inconsistent - (of-object "GtkCheckMenuItem") - (c-name "gtk_check_menu_item_set_inconsistent") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_inconsistent - (of-object "GtkCheckMenuItem") - (c-name "gtk_check_menu_item_get_inconsistent") - (return-type "gboolean") -) - -(define-method set_draw_as_radio - (of-object "GtkCheckMenuItem") - (c-name "gtk_check_menu_item_set_draw_as_radio") - (return-type "none") - (parameters - '("gboolean" "draw_as_radio") - ) -) - -(define-method get_draw_as_radio - (of-object "GtkCheckMenuItem") - (c-name "gtk_check_menu_item_get_draw_as_radio") - (return-type "gboolean") -) - -(define-method set_show_toggle - (of-object "GtkCheckMenuItem") - (c-name "gtk_check_menu_item_set_show_toggle") - (return-type "none") - (parameters - '("gboolean" "always") - ) - (deprecated "don't use this method") -) - -(define-method set_state - (of-object "GtkCheckMenuItem") - (c-name "gtk_check_menu_item_set_state") - (return-type "none") - (parameters - '("gboolean" "is_active") - ) - (deprecated "use GtkCheckMenuItem.set_active") -) - -(define-virtual toggled - (of-object "GtkCheckMenuItem") - (return-type "none") -) -(define-virtual draw_indicator - (of-object "GtkCheckMenuItem") - (return-type "none") - (parameters - '("GdkRectangle*" "area") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkclipboard.h - -(define-function gtk_clipboard_get_type - (c-name "gtk_clipboard_get_type") - (return-type "GType") -) - -(define-function clipboard_get_for_display - (c-name "gtk_clipboard_get_for_display") - (is-constructor-of "GtkClipboard") - (caller-owns-return nil) - (return-type "GtkClipboard*") - (parameters - '("GdkDisplay*" "display" (default "gdk_display_get_default()")) - '("GdkAtom" "selection" (default "GDK_SELECTION_CLIPBOARD")) - ) -) - -(define-function clipboard_get - (c-name "gtk_clipboard_get") - (return-type "GtkClipboard*") - (parameters - '("GdkAtom" "selection" (default "GDK_SELECTION_CLIPBOARD")) - ) -) - -(define-method get_display - (of-object "GtkClipboard") - (c-name "gtk_clipboard_get_display") - (return-type "GdkDisplay*") -) - -(define-method set_with_data - (of-object "GtkClipboard") - (c-name "gtk_clipboard_set_with_data") - (return-type "gboolean") - (parameters - '("const-GtkTargetEntry*" "targets") - '("guint" "n_targets") - '("GtkClipboardGetFunc" "get_func") - '("GtkClipboardClearFunc" "clear_func") - '("gpointer" "user_data") - ) -) - -(define-method set_with_owner - (of-object "GtkClipboard") - (c-name "gtk_clipboard_set_with_owner") - (return-type "gboolean") - (parameters - '("const-GtkTargetEntry*" "targets") - '("guint" "n_targets") - '("GtkClipboardGetFunc" "get_func") - '("GtkClipboardClearFunc" "clear_func") - '("GObject*" "owner") - ) -) - -(define-method get_owner - (of-object "GtkClipboard") - (c-name "gtk_clipboard_get_owner") - (return-type "GObject*") -) - -(define-method clear - (of-object "GtkClipboard") - (c-name "gtk_clipboard_clear") - (return-type "none") -) - -(define-method set_text - (of-object "GtkClipboard") - (c-name "gtk_clipboard_set_text") - (return-type "none") - (parameters - '("const-gchar*" "text") - '("gint" "len" (default "-1")) - ) -) - -(define-method request_contents - (of-object "GtkClipboard") - (c-name "gtk_clipboard_request_contents") - (return-type "none") - (parameters - '("GdkAtom" "target") - '("GtkClipboardReceivedFunc" "callback") - '("gpointer" "user_data") - ) -) - -(define-method request_text - (of-object "GtkClipboard") - (c-name "gtk_clipboard_request_text") - (return-type "none") - (parameters - '("GtkClipboardTextReceivedFunc" "callback") - '("gpointer" "user_data") - ) -) - -(define-method request_targets - (of-object "GtkClipboard") - (c-name "gtk_clipboard_request_targets") - (return-type "none") - (parameters - '("GtkClipboardTargetsReceivedFunc" "callback") - '("gpointer" "user_data") - ) -) - -(define-method wait_for_contents - (of-object "GtkClipboard") - (c-name "gtk_clipboard_wait_for_contents") - (return-type "GtkSelectionData*") - (parameters - '("GdkAtom" "target") - ) -) - -(define-method wait_for_text - (of-object "GtkClipboard") - (c-name "gtk_clipboard_wait_for_text") - (return-type "gchar*") -) - -(define-method wait_is_text_available - (of-object "GtkClipboard") - (c-name "gtk_clipboard_wait_is_text_available") - (return-type "gboolean") -) - -(define-method wait_for_targets - (of-object "GtkClipboard") - (c-name "gtk_clipboard_wait_for_targets") - (return-type "gboolean") - (parameters - '("GdkAtom**" "targets") - '("gint*" "n_targets") - ) -) - -(define-method request_image - (of-object "GtkClipboard") - (c-name "gtk_clipboard_request_image") - (return-type "none") - (parameters - '("GtkClipboardImageReceivedFunc" "callback") - '("gpointer" "user_data") - ) -) - -(define-method wait_for_image - (of-object "GtkClipboard") - (c-name "gtk_clipboard_wait_for_image") - (return-type "GdkPixbuf*") -) - -(define-method set_image - (of-object "GtkClipboard") - (c-name "gtk_clipboard_set_image") - (return-type "none") - (parameters - '("GdkPixbuf*" "pixbuf") - ) -) - -(define-method wait_is_image_available - (of-object "GtkClipboard") - (c-name "gtk_clipboard_wait_is_image_available") - (return-type "gboolean") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkclist.h - -(define-function gtk_clist_get_type - (c-name "gtk_clist_get_type") - (return-type "GType") -) - -(define-function gtk_clist_new - (c-name "gtk_clist_new") - (is-constructor-of "GtkCList") - (return-type "GtkWidget*") - (parameters - '("gint" "columns" (default "1")) - ) - (deprecated "use GtkListStore/GtkTreeView") -) - -(define-function gtk_clist_new_with_titles - (c-name "gtk_clist_new_with_titles") - (is-constructor-of "GtkCList") - (return-type "GtkWidget*") - (parameters - '("gint" "columns" (default "1")) - '("gchar*[]" "titles") - ) - (deprecated "use GtkListStore/GtkTreeView") -) - -(define-method set_hadjustment - (of-object "GtkCList") - (c-name "gtk_clist_set_hadjustment") - (return-type "none") - (parameters - '("GtkAdjustment*" "adjustment") - ) -) - -(define-method set_vadjustment - (of-object "GtkCList") - (c-name "gtk_clist_set_vadjustment") - (return-type "none") - (parameters - '("GtkAdjustment*" "adjustment") - ) -) - -(define-method get_hadjustment - (of-object "GtkCList") - (c-name "gtk_clist_get_hadjustment") - (return-type "GtkAdjustment*") -) - -(define-method get_vadjustment - (of-object "GtkCList") - (c-name "gtk_clist_get_vadjustment") - (return-type "GtkAdjustment*") -) - -(define-method set_shadow_type - (of-object "GtkCList") - (c-name "gtk_clist_set_shadow_type") - (return-type "none") - (parameters - '("GtkShadowType" "type") - ) -) - -(define-method set_selection_mode - (of-object "GtkCList") - (c-name "gtk_clist_set_selection_mode") - (return-type "none") - (parameters - '("GtkSelectionMode" "mode") - ) -) - -(define-method set_reorderable - (of-object "GtkCList") - (c-name "gtk_clist_set_reorderable") - (return-type "none") - (parameters - '("gboolean" "reorderable") - ) -) - -(define-method set_use_drag_icons - (of-object "GtkCList") - (c-name "gtk_clist_set_use_drag_icons") - (return-type "none") - (parameters - '("gboolean" "use_icons") - ) -) - -(define-method set_button_actions - (of-object "GtkCList") - (c-name "gtk_clist_set_button_actions") - (return-type "none") - (parameters - '("guint" "button") - '("guint8" "button_actions") - ) -) - -(define-method freeze - (of-object "GtkCList") - (c-name "gtk_clist_freeze") - (return-type "none") -) - -(define-method thaw - (of-object "GtkCList") - (c-name "gtk_clist_thaw") - (return-type "none") -) - -(define-method column_titles_show - (of-object "GtkCList") - (c-name "gtk_clist_column_titles_show") - (return-type "none") -) - -(define-method column_titles_hide - (of-object "GtkCList") - (c-name "gtk_clist_column_titles_hide") - (return-type "none") -) - -(define-method column_title_active - (of-object "GtkCList") - (c-name "gtk_clist_column_title_active") - (return-type "none") - (parameters - '("gint" "column") - ) -) - -(define-method column_title_passive - (of-object "GtkCList") - (c-name "gtk_clist_column_title_passive") - (return-type "none") - (parameters - '("gint" "column") - ) -) - -(define-method column_titles_active - (of-object "GtkCList") - (c-name "gtk_clist_column_titles_active") - (return-type "none") -) - -(define-method column_titles_passive - (of-object "GtkCList") - (c-name "gtk_clist_column_titles_passive") - (return-type "none") -) - -(define-method set_column_title - (of-object "GtkCList") - (c-name "gtk_clist_set_column_title") - (return-type "none") - (parameters - '("gint" "column") - '("const-gchar*" "title") - ) -) - -(define-method get_column_title - (of-object "GtkCList") - (c-name "gtk_clist_get_column_title") - (return-type "gchar*") - (parameters - '("gint" "column") - ) -) - -(define-method set_column_widget - (of-object "GtkCList") - (c-name "gtk_clist_set_column_widget") - (return-type "none") - (parameters - '("gint" "column") - '("GtkWidget*" "widget") - ) -) - -(define-method get_column_widget - (of-object "GtkCList") - (c-name "gtk_clist_get_column_widget") - (return-type "GtkWidget*") - (parameters - '("gint" "column") - ) -) - -(define-method set_column_justification - (of-object "GtkCList") - (c-name "gtk_clist_set_column_justification") - (return-type "none") - (parameters - '("gint" "column") - '("GtkJustification" "justification") - ) -) - -(define-method set_column_visibility - (of-object "GtkCList") - (c-name "gtk_clist_set_column_visibility") - (return-type "none") - (parameters - '("gint" "column") - '("gboolean" "visible") - ) -) - -(define-method set_column_resizeable - (of-object "GtkCList") - (c-name "gtk_clist_set_column_resizeable") - (return-type "none") - (parameters - '("gint" "column") - '("gboolean" "resizeable") - ) -) - -(define-method set_column_auto_resize - (of-object "GtkCList") - (c-name "gtk_clist_set_column_auto_resize") - (return-type "none") - (parameters - '("gint" "column") - '("gboolean" "auto_resize") - ) -) - -(define-method columns_autosize - (of-object "GtkCList") - (c-name "gtk_clist_columns_autosize") - (return-type "gint") -) - -(define-method optimal_column_width - (of-object "GtkCList") - (c-name "gtk_clist_optimal_column_width") - (return-type "gint") - (parameters - '("gint" "column") - ) -) - -(define-method set_column_width - (of-object "GtkCList") - (c-name "gtk_clist_set_column_width") - (return-type "none") - (parameters - '("gint" "column") - '("gint" "width") - ) -) - -(define-method set_column_min_width - (of-object "GtkCList") - (c-name "gtk_clist_set_column_min_width") - (return-type "none") - (parameters - '("gint" "column") - '("gint" "min_width") - ) -) - -(define-method set_column_max_width - (of-object "GtkCList") - (c-name "gtk_clist_set_column_max_width") - (return-type "none") - (parameters - '("gint" "column") - '("gint" "max_width") - ) -) - -(define-method set_row_height - (of-object "GtkCList") - (c-name "gtk_clist_set_row_height") - (return-type "none") - (parameters - '("guint" "height") - ) -) - -(define-method moveto - (of-object "GtkCList") - (c-name "gtk_clist_moveto") - (return-type "none") - (parameters - '("gint" "row") - '("gint" "column") - '("gfloat" "row_align") - '("gfloat" "col_align") - ) -) - -(define-method row_is_visible - (of-object "GtkCList") - (c-name "gtk_clist_row_is_visible") - (return-type "GtkVisibility") - (parameters - '("gint" "row") - ) -) - -(define-method get_cell_type - (of-object "GtkCList") - (c-name "gtk_clist_get_cell_type") - (return-type "GtkCellType") - (parameters - '("gint" "row") - '("gint" "column") - ) -) - -(define-method set_text - (of-object "GtkCList") - (c-name "gtk_clist_set_text") - (return-type "none") - (parameters - '("gint" "row") - '("gint" "column") - '("const-gchar*" "text") - ) -) - -(define-method get_text - (of-object "GtkCList") - (c-name "gtk_clist_get_text") - (return-type "gint") - (parameters - '("gint" "row") - '("gint" "column") - '("gchar**" "text") - ) -) - -(define-method set_pixmap - (of-object "GtkCList") - (c-name "gtk_clist_set_pixmap") - (return-type "none") - (parameters - '("gint" "row") - '("gint" "column") - '("GdkPixmap*" "pixmap") - '("GdkBitmap*" "mask" (null-ok) (default "NULL")) - ) -) - -(define-method get_pixmap - (of-object "GtkCList") - (c-name "gtk_clist_get_pixmap") - (return-type "gint") - (parameters - '("gint" "row") - '("gint" "column") - '("GdkPixmap**" "pixmap") - '("GdkBitmap**" "mask") - ) -) - -(define-method set_pixtext - (of-object "GtkCList") - (c-name "gtk_clist_set_pixtext") - (return-type "none") - (parameters - '("gint" "row") - '("gint" "column") - '("const-gchar*" "text") - '("guint8" "spacing") - '("GdkPixmap*" "pixmap") - '("GdkBitmap*" "mask") - ) -) - -(define-method get_pixtext - (of-object "GtkCList") - (c-name "gtk_clist_get_pixtext") - (return-type "gint") - (parameters - '("gint" "row") - '("gint" "column") - '("gchar**" "text") - '("guint8*" "spacing") - '("GdkPixmap**" "pixmap") - '("GdkBitmap**" "mask") - ) -) - -(define-method set_foreground - (of-object "GtkCList") - (c-name "gtk_clist_set_foreground") - (return-type "none") - (parameters - '("gint" "row") - '("GdkColor*" "color") - ) -) - -(define-method set_background - (of-object "GtkCList") - (c-name "gtk_clist_set_background") - (return-type "none") - (parameters - '("gint" "row") - '("GdkColor*" "color") - ) -) - -(define-method set_cell_style - (of-object "GtkCList") - (c-name "gtk_clist_set_cell_style") - (return-type "none") - (parameters - '("gint" "row") - '("gint" "column") - '("GtkStyle*" "style") - ) -) - -(define-method get_cell_style - (of-object "GtkCList") - (c-name "gtk_clist_get_cell_style") - (return-type "GtkStyle*") - (parameters - '("gint" "row") - '("gint" "column") - ) -) - -(define-method set_row_style - (of-object "GtkCList") - (c-name "gtk_clist_set_row_style") - (return-type "none") - (parameters - '("gint" "row") - '("GtkStyle*" "style") - ) -) - -(define-method get_row_style - (of-object "GtkCList") - (c-name "gtk_clist_get_row_style") - (return-type "GtkStyle*") - (parameters - '("gint" "row") - ) -) - -(define-method set_shift - (of-object "GtkCList") - (c-name "gtk_clist_set_shift") - (return-type "none") - (parameters - '("gint" "row") - '("gint" "column") - '("gint" "vertical") - '("gint" "horizontal") - ) -) - -(define-method set_selectable - (of-object "GtkCList") - (c-name "gtk_clist_set_selectable") - (return-type "none") - (parameters - '("gint" "row") - '("gboolean" "selectable") - ) -) - -(define-method get_selectable - (of-object "GtkCList") - (c-name "gtk_clist_get_selectable") - (return-type "gboolean") - (parameters - '("gint" "row") - ) -) - -(define-method prepend - (of-object "GtkCList") - (c-name "gtk_clist_prepend") - (return-type "gint") - (parameters - '("gchar*[]" "text") - ) -) - -(define-method append - (of-object "GtkCList") - (c-name "gtk_clist_append") - (return-type "gint") - (parameters - '("gchar*[]" "text") - ) -) - -(define-method insert - (of-object "GtkCList") - (c-name "gtk_clist_insert") - (return-type "gint") - (parameters - '("gint" "row") - '("gchar*[]" "text") - ) -) - -(define-method remove - (of-object "GtkCList") - (c-name "gtk_clist_remove") - (return-type "none") - (parameters - '("gint" "row") - ) -) - -(define-method set_row_data - (of-object "GtkCList") - (c-name "gtk_clist_set_row_data") - (return-type "none") - (parameters - '("gint" "row") - '("gpointer" "data") - ) -) - -(define-method set_row_data_full - (of-object "GtkCList") - (c-name "gtk_clist_set_row_data_full") - (return-type "none") - (parameters - '("gint" "row") - '("gpointer" "data") - '("GtkDestroyNotify" "destroy") - ) -) - -(define-method get_row_data - (of-object "GtkCList") - (c-name "gtk_clist_get_row_data") - (return-type "gpointer") - (parameters - '("gint" "row") - ) -) - -(define-method find_row_from_data - (of-object "GtkCList") - (c-name "gtk_clist_find_row_from_data") - (return-type "gint") - (parameters - '("gpointer" "data") - ) -) - -(define-method select_row - (of-object "GtkCList") - (c-name "gtk_clist_select_row") - (return-type "none") - (parameters - '("gint" "row") - '("gint" "column") - ) -) - -(define-method unselect_row - (of-object "GtkCList") - (c-name "gtk_clist_unselect_row") - (return-type "none") - (parameters - '("gint" "row") - '("gint" "column") - ) -) - -(define-method undo_selection - (of-object "GtkCList") - (c-name "gtk_clist_undo_selection") - (return-type "none") -) - -(define-method clear - (of-object "GtkCList") - (c-name "gtk_clist_clear") - (return-type "none") -) - -(define-method get_selection_info - (of-object "GtkCList") - (c-name "gtk_clist_get_selection_info") - (return-type "gint") - (parameters - '("gint" "x") - '("gint" "y") - '("gint*" "row") - '("gint*" "column") - ) -) - -(define-method select_all - (of-object "GtkCList") - (c-name "gtk_clist_select_all") - (return-type "none") -) - -(define-method unselect_all - (of-object "GtkCList") - (c-name "gtk_clist_unselect_all") - (return-type "none") -) - -(define-method swap_rows - (of-object "GtkCList") - (c-name "gtk_clist_swap_rows") - (return-type "none") - (parameters - '("gint" "row1") - '("gint" "row2") - ) -) - -(define-method row_move - (of-object "GtkCList") - (c-name "gtk_clist_row_move") - (return-type "none") - (parameters - '("gint" "source_row") - '("gint" "dest_row") - ) -) - -(define-method set_compare_func - (of-object "GtkCList") - (c-name "gtk_clist_set_compare_func") - (return-type "none") - (parameters - '("GtkCListCompareFunc" "cmp_func") - ) -) - -(define-method set_sort_column - (of-object "GtkCList") - (c-name "gtk_clist_set_sort_column") - (return-type "none") - (parameters - '("gint" "column") - ) -) - -(define-method set_sort_type - (of-object "GtkCList") - (c-name "gtk_clist_set_sort_type") - (return-type "none") - (parameters - '("GtkSortType" "sort_type") - ) -) - -(define-method sort - (of-object "GtkCList") - (c-name "gtk_clist_sort") - (return-type "none") -) - -(define-method set_auto_sort - (of-object "GtkCList") - (c-name "gtk_clist_set_auto_sort") - (return-type "none") - (parameters - '("gboolean" "auto_sort") - ) -) - -(define-virtual set_scroll_adjustments - (of-object "GtkCList") - (return-type "none") - (parameters - '("GtkAdjustment*" "hadjustment") - '("GtkAdjustment*" "vadjustment") - ) -) - -(define-virtual refresh - (of-object "GtkCList") - (return-type "none") -) - -(define-virtual select_row - (of-object "GtkCList") - (return-type "none") - (parameters - '("gint" "row") - '("gint" "column") - '("GdkEvent*" "event") - ) -) - -(define-virtual unselect_row - (of-object "GtkCList") - (return-type "none") - (parameters - '("gint" "row") - '("gint" "column") - '("GdkEvent*" "event") - ) -) - -(define-virtual row_move - (of-object "GtkCList") - (return-type "none") - (parameters - '("gint" "source_row") - '("gint" "dest_row") - ) -) - -(define-virtual click_column - (of-object "GtkCList") - (return-type "none") - (parameters - '("gint" "column") - ) -) - -(define-virtual resize_column - (of-object "GtkCList") - (return-type "none") - (parameters - '("gint" "column") - '("gint" "width") - ) -) - -(define-virtual toggle_focus_row - (of-object "GtkCList") - (return-type "none") -) - -(define-virtual select_all - (of-object "GtkCList") - (return-type "none") -) - -(define-virtual unselect_all - (of-object "GtkCList") - (return-type "none") -) - -(define-virtual undo_selection - (of-object "GtkCList") - (return-type "none") -) - -(define-virtual start_selection - (of-object "GtkCList") - (return-type "none") -) - -(define-virtual end_selection - (of-object "GtkCList") - (return-type "none") -) - -(define-virtual extend_selection - (of-object "GtkCList") - (return-type "none") - (parameters - '("GtkScrollType" "scroll_type") - '("gfloat" "position") - '("gboolean" "auto_start_selection") - ) -) - -(define-virtual scroll_horizontal - (of-object "GtkCList") - (return-type "none") - (parameters - '("GtkScrollType" "scroll_type") - '("gfloat" "position") - ) -) - -(define-virtual scroll_vertical - (of-object "GtkCList") - (return-type "none") - (parameters - '("GtkScrollType" "scroll_type") - '("gfloat" "position") - ) -) - -(define-virtual toggle_add_mode - (of-object "GtkCList") - (return-type "none") -) - -(define-virtual abort_column_resize - (of-object "GtkCList") - (return-type "none") -) - -(define-virtual resync_selection - (of-object "GtkCList") - (return-type "none") - (parameters - '("GdkEvent*" "event") - ) -) - -(define-virtual selection_find - (of-object "GtkCList") - (return-type "GList*") - (parameters - '("gint" "row_number") - '("GList*" "row_list_element") - ) -) - -(define-virtual draw_row - (of-object "GtkCList") - (return-type "none") - (parameters - '("GdkRectangle*" "area") - '("gint" "row") - '("GtkCListRow*" "clist_row") - ) -) - -(define-virtual draw_drag_highlight - (of-object "GtkCList") - (return-type "none") - (parameters - '("GtkCListRow*" "target_row") - '("gint" "target_row_number") - '("GtkCListDragPos" "drag_pos") - ) -) - -(define-virtual clear - (of-object "GtkCList") - (return-type "none") -) - -(define-virtual fake_unselect_all - (of-object "GtkCList") - (return-type "none") - (parameters - '("gint" "row") - ) -) - -(define-virtual sort_list - (of-object "GtkCList") - (return-type "none") -) - -(define-virtual insert_row - (of-object "GtkCList") - (return-type "gint") - (parameters - '("gint" "row") - '("gchar*[]" "text") - ) -) - -(define-virtual remove_row - (of-object "GtkCList") - (return-type "none") - (parameters - '("gint" "row") - ) -) - -(define-virtual set_cell_contents - (of-object "GtkCList") - (return-type "none") - (parameters - '("GtkCListRow*" "clist_row") - '("gint" "column") - '("GtkCellType" "type") - '("const-gchar*" "text") - '("guint8" "spacing") - '("GdkPixmap*" "pixmap") - '("GdkBitmap*" "mask") - ) -) - -(define-virtual cell_size_request - (of-object "GtkCList") - (return-type "none") - (parameters - '("GtkCListRow*" "clist_row") - '("gint" "column") - '("GtkRequisition*" "requisition") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkcolorbutton.h - -(define-function gtk_color_button_get_type - (c-name "gtk_color_button_get_type") - (return-type "GType") -) - -(define-function color_button_new - (c-name "gtk_color_button_new") - (is-constructor-of "GtkColorButton") - (return-type "GtkWidget*") -) - -(define-function color_button_new_with_color - (c-name "gtk_color_button_new_with_color") - (is-constructor-of "GtkColorButton") - (return-type "GtkWidget*") - (parameters - '("const-GdkColor*" "color") - ) -) - -(define-method set_color - (of-object "GtkColorButton") - (c-name "gtk_color_button_set_color") - (return-type "none") - (parameters - '("const-GdkColor*" "color") - ) -) - -(define-method set_alpha - (of-object "GtkColorButton") - (c-name "gtk_color_button_set_alpha") - (return-type "none") - (parameters - '("guint16" "alpha") - ) -) - -(define-method get_color - (of-object "GtkColorButton") - (c-name "gtk_color_button_get_color") - (return-type "none") - (parameters - '("GdkColor*" "color") - ) -) - -(define-method get_alpha - (of-object "GtkColorButton") - (c-name "gtk_color_button_get_alpha") - (return-type "guint16") -) - -(define-method set_use_alpha - (of-object "GtkColorButton") - (c-name "gtk_color_button_set_use_alpha") - (return-type "none") - (parameters - '("gboolean" "use_alpha") - ) -) - -(define-method get_use_alpha - (of-object "GtkColorButton") - (c-name "gtk_color_button_get_use_alpha") - (return-type "gboolean") -) - -(define-method set_title - (of-object "GtkColorButton") - (c-name "gtk_color_button_set_title") - (return-type "none") - (parameters - '("const-gchar*" "title") - ) -) - -(define-method get_title - (of-object "GtkColorButton") - (c-name "gtk_color_button_get_title") - (return-type "const-gchar*") -) - -(define-virtual color_set - (of-object "GtkColorButton") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkcolorsel.h - -(define-function gtk_color_selection_get_type - (c-name "gtk_color_selection_get_type") - (return-type "GType") -) - -(define-function gtk_color_selection_new - (c-name "gtk_color_selection_new") - (is-constructor-of "GtkColorSelection") - (return-type "GtkWidget*") -) - -(define-method get_has_opacity_control - (of-object "GtkColorSelection") - (c-name "gtk_color_selection_get_has_opacity_control") - (return-type "gboolean") -) - -(define-method set_has_opacity_control - (of-object "GtkColorSelection") - (c-name "gtk_color_selection_set_has_opacity_control") - (return-type "none") - (parameters - '("gboolean" "has_opacity") - ) -) - -(define-method get_has_palette - (of-object "GtkColorSelection") - (c-name "gtk_color_selection_get_has_palette") - (return-type "gboolean") -) - -(define-method set_has_palette - (of-object "GtkColorSelection") - (c-name "gtk_color_selection_set_has_palette") - (return-type "none") - (parameters - '("gboolean" "has_palette") - ) -) - -(define-method set_current_color - (of-object "GtkColorSelection") - (c-name "gtk_color_selection_set_current_color") - (return-type "none") - (parameters - '("GdkColor*" "color") - ) -) - -(define-method set_current_alpha - (of-object "GtkColorSelection") - (c-name "gtk_color_selection_set_current_alpha") - (return-type "none") - (parameters - '("guint16" "alpha") - ) -) - -(define-method get_current_color - (of-object "GtkColorSelection") - (c-name "gtk_color_selection_get_current_color") - (return-type "none") - (parameters - '("GdkColor*" "color") - ) -) - -(define-method get_current_alpha - (of-object "GtkColorSelection") - (c-name "gtk_color_selection_get_current_alpha") - (return-type "guint16") -) - -(define-method set_previous_color - (of-object "GtkColorSelection") - (c-name "gtk_color_selection_set_previous_color") - (return-type "none") - (parameters - '("GdkColor*" "color") - ) -) - -(define-method set_previous_alpha - (of-object "GtkColorSelection") - (c-name "gtk_color_selection_set_previous_alpha") - (return-type "none") - (parameters - '("guint16" "alpha") - ) -) - -(define-method get_previous_color - (of-object "GtkColorSelection") - (c-name "gtk_color_selection_get_previous_color") - (return-type "none") - (parameters - '("GdkColor*" "color") - ) -) - -(define-method get_previous_alpha - (of-object "GtkColorSelection") - (c-name "gtk_color_selection_get_previous_alpha") - (return-type "guint16") -) - -(define-method is_adjusting - (of-object "GtkColorSelection") - (c-name "gtk_color_selection_is_adjusting") - (return-type "gboolean") -) - -(define-function color_selection_palette_from_string - (c-name "gtk_color_selection_palette_from_string") - (return-type "gboolean") - (parameters - '("const-gchar*" "str") - '("GdkColor**" "colors") - '("gint*" "n_colors") - ) -) - -(define-function color_selection_palette_to_string - (c-name "gtk_color_selection_palette_to_string") - (return-type "gchar*") - (parameters - '("const-GdkColor*" "colors") - '("gint" "n_colors") - ) -) - -(define-function color_selection_set_change_palette_hook - (c-name "gtk_color_selection_set_change_palette_hook") - (return-type "GtkColorSelectionChangePaletteFunc") - (parameters - '("GtkColorSelectionChangePaletteFunc" "func") - ) -) - -(define-function color_selection_set_change_palette_with_screen_hook - (c-name "gtk_color_selection_set_change_palette_with_screen_hook") - (return-type "GtkColorSelectionChangePaletteWithScreenFunc") - (parameters - '("GtkColorSelectionChangePaletteWithScreenFunc" "func") - ) -) - -(define-method set_color - (of-object "GtkColorSelection") - (c-name "gtk_color_selection_set_color") - (return-type "none") - (parameters - '("gdouble*" "color") - ) - (deprecated "use GtkColorSelection.set_current_color") -) - -(define-method get_color - (of-object "GtkColorSelection") - (c-name "gtk_color_selection_get_color") - (return-type "none") - (parameters - '("gdouble*" "color") - ) - (deprecated "use GtkColorSelection.get_current_color") -) - -(define-method set_update_policy - (of-object "GtkColorSelection") - (c-name "gtk_color_selection_set_update_policy") - (return-type "none") - (parameters - '("GtkUpdateType" "policy") - ) - (deprecated "") -) - -(define-virtual color_changed - (of-object "GtkColorSelection") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkcolorseldialog.h - -(define-function gtk_color_selection_dialog_get_type - (c-name "gtk_color_selection_dialog_get_type") - (return-type "GType") -) - -(define-function gtk_color_selection_dialog_new - (c-name "gtk_color_selection_dialog_new") - (is-constructor-of "GtkColorSelectionDialog") - (return-type "GtkWidget*") - (properties - '("title") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkcombo.h - -(define-function gtk_combo_get_type - (c-name "gtk_combo_get_type") - (return-type "GType") -) - -(define-function gtk_combo_new - (c-name "gtk_combo_new") - (is-constructor-of "GtkCombo") - (return-type "GtkWidget*") - (deprecated "use gtk.ComboBoxEntry") -) - -(define-method set_value_in_list - (of-object "GtkCombo") - (c-name "gtk_combo_set_value_in_list") - (return-type "none") - (parameters - '("gboolean" "val") - '("gboolean" "ok_if_empty") - ) -) - -(define-method set_use_arrows - (of-object "GtkCombo") - (c-name "gtk_combo_set_use_arrows") - (return-type "none") - (parameters - '("gboolean" "val") - ) -) - -(define-method set_use_arrows_always - (of-object "GtkCombo") - (c-name "gtk_combo_set_use_arrows_always") - (return-type "none") - (parameters - '("gboolean" "val") - ) -) - -(define-method set_case_sensitive - (of-object "GtkCombo") - (c-name "gtk_combo_set_case_sensitive") - (return-type "none") - (parameters - '("gboolean" "val") - ) -) - -(define-method set_item_string - (of-object "GtkCombo") - (c-name "gtk_combo_set_item_string") - (return-type "none") - (parameters - '("GtkItem*" "item") - '("const-gchar*" "item_value") - ) -) - -(define-method set_popdown_strings - (of-object "GtkCombo") - (c-name "gtk_combo_set_popdown_strings") - (return-type "none") - (parameters - '("GList*" "strings") - ) -) - -(define-method disable_activate - (of-object "GtkCombo") - (c-name "gtk_combo_disable_activate") - (return-type "none") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkcombobox.h - -(define-function gtk_combo_box_get_type - (c-name "gtk_combo_box_get_type") - (return-type "GType") -) - -(define-function gtk_combo_box_new - (c-name "gtk_combo_box_new") - (is-constructor-of "GtkComboBox") - (return-type "GtkWidget*") -) - -(define-function gtk_combo_box_new_with_model - (c-name "gtk_combo_box_new_with_model") - (is-constructor-of "GtkComboBox") - (return-type "GtkWidget*") - (parameters - '("GtkTreeModel*" "model") - ) -) - -(define-method set_wrap_width - (of-object "GtkComboBox") - (c-name "gtk_combo_box_set_wrap_width") - (return-type "none") - (parameters - '("gint" "width") - ) -) - -(define-method set_row_span_column - (of-object "GtkComboBox") - (c-name "gtk_combo_box_set_row_span_column") - (return-type "none") - (parameters - '("gint" "row_span") - ) -) - -(define-method set_column_span_column - (of-object "GtkComboBox") - (c-name "gtk_combo_box_set_column_span_column") - (return-type "none") - (parameters - '("gint" "column_span") - ) -) - -(define-method get_active - (of-object "GtkComboBox") - (c-name "gtk_combo_box_get_active") - (return-type "gint") -) - -(define-method set_active - (of-object "GtkComboBox") - (c-name "gtk_combo_box_set_active") - (return-type "none") - (parameters - '("gint" "index") - ) -) - -(define-method get_active_iter - (of-object "GtkComboBox") - (c-name "gtk_combo_box_get_active_iter") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - ) -) - -(define-method set_active_iter - (of-object "GtkComboBox") - (c-name "gtk_combo_box_set_active_iter") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - ) -) - -(define-method set_model - (of-object "GtkComboBox") - (c-name "gtk_combo_box_set_model") - (return-type "none") - (parameters - '("GtkTreeModel*" "model" (null-ok) (default "NULL")) - ) -) - -(define-method get_model - (of-object "GtkComboBox") - (c-name "gtk_combo_box_get_model") - (return-type "GtkTreeModel*") -) - -(define-function combo_box_new_text - (c-name "gtk_combo_box_new_text") - (return-type "GtkWidget*") - (caller-owns-return #t) -) - -(define-method append_text - (of-object "GtkComboBox") - (c-name "gtk_combo_box_append_text") - (return-type "none") - (parameters - '("const-gchar*" "text") - ) -) - -(define-method insert_text - (of-object "GtkComboBox") - (c-name "gtk_combo_box_insert_text") - (return-type "none") - (parameters - '("gint" "position") - '("const-gchar*" "text") - ) -) - -(define-method prepend_text - (of-object "GtkComboBox") - (c-name "gtk_combo_box_prepend_text") - (return-type "none") - (parameters - '("const-gchar*" "text") - ) -) - -(define-method remove_text - (of-object "GtkComboBox") - (c-name "gtk_combo_box_remove_text") - (return-type "none") - (parameters - '("gint" "position") - ) -) - -(define-method popup - (of-object "GtkComboBox") - (c-name "gtk_combo_box_popup") - (return-type "none") -) - -(define-method popdown - (of-object "GtkComboBox") - (c-name "gtk_combo_box_popdown") - (return-type "none") -) - -(define-method get_wrap_width - (of-object "GtkComboBox") - (c-name "gtk_combo_box_get_wrap_width") - (return-type "gint") -) - -(define-method get_row_span_column - (of-object "GtkComboBox") - (c-name "gtk_combo_box_get_row_span_column") - (return-type "gint") -) - -(define-method get_column_span_column - (of-object "GtkComboBox") - (c-name "gtk_combo_box_get_column_span_column") - (return-type "gint") -) - -(define-method get_add_tearoffs - (of-object "GtkComboBox") - (c-name "gtk_combo_box_get_add_tearoffs") - (return-type "gboolean") -) - -(define-method set_add_tearoffs - (of-object "GtkComboBox") - (c-name "gtk_combo_box_set_add_tearoffs") - (return-type "none") - (parameters - '("gboolean" "add_tearoffs") - ) -) - -(define-method get_focus_on_click - (of-object "GtkComboBox") - (c-name "gtk_combo_box_get_focus_on_click") - (return-type "gboolean") -) - -(define-method set_focus_on_click - (of-object "GtkComboBox") - (c-name "gtk_combo_box_set_focus_on_click") - (return-type "none") - (parameters - '("gboolean" "focus_on_click") - ) -) - -(define-method set_row_separator_func - (of-object "GtkComboBox") - (c-name "gtk_combo_box_set_row_separator_func") - (return-type "none") - (parameters - '("GtkTreeViewRowSeparatorFunc" "func") - '("gpointer" "data") - '("GtkDestroyNotify" "destroy") - ) -) - -(define-method get_row_separator_func - (of-object "GtkComboBox") - (c-name "gtk_combo_box_get_row_separator_func") - (return-type "GtkTreeViewRowSeparatorFunc") -) - - -(define-method get_active_text - (of-object "GtkComboBox") - (c-name "gtk_combo_box_get_active_text") - (return-type "gchar*") -) - -(define-method get_popup_accessible - (of-object "GtkComboBox") - (c-name "gtk_combo_box_get_popup_accessible") - (return-type "AtkObject*") -) - -(define-virtual changed - (of-object "GtkComboBox") - (return-type "none") -) - -(define-virtual get_active_text - (of-object "GtkComboBox") - (return-type "char*") -) - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkcomboboxentry.h - -(define-function gtk_combo_box_entry_get_type - (c-name "gtk_combo_box_entry_get_type") - (return-type "GType") -) - -(define-function gtk_combo_box_entry_new - (c-name "gtk_combo_box_entry_new") - (is-constructor-of "GtkComboBoxEntry") - (return-type "GtkWidget*") -) - -(define-function combo_box_entry_new_with_model - (c-name "gtk_combo_box_entry_new_with_model") - (return-type "GtkWidget*") - (parameters - '("GtkTreeModel*" "model") - '("gint" "text_column") - ) - (caller-owns-return #t) -) - -(define-method set_text_column - (of-object "GtkComboBoxEntry") - (c-name "gtk_combo_box_entry_set_text_column") - (return-type "none") - (parameters - '("gint" "text_column") - ) -) - -(define-method get_text_column - (of-object "GtkComboBoxEntry") - (c-name "gtk_combo_box_entry_get_text_column") - (return-type "gint") -) - -(define-function combo_box_entry_new_text - (c-name "gtk_combo_box_entry_new_text") - (return-type "GtkWidget*") - (caller-owns-return #t) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkcontainer.h - -(define-function gtk_container_get_type - (c-name "gtk_container_get_type") - (return-type "GType") -) - -(define-method set_border_width - (of-object "GtkContainer") - (c-name "gtk_container_set_border_width") - (return-type "none") - (parameters - '("guint" "border_width") - ) -) - -(define-method get_border_width - (of-object "GtkContainer") - (c-name "gtk_container_get_border_width") - (return-type "guint") -) - -(define-method add - (of-object "GtkContainer") - (c-name "gtk_container_add") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - ) -) - -(define-method remove - (of-object "GtkContainer") - (c-name "gtk_container_remove") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - ) -) - -(define-method set_resize_mode - (of-object "GtkContainer") - (c-name "gtk_container_set_resize_mode") - (return-type "none") - (parameters - '("GtkResizeMode" "resize_mode") - ) -) - -(define-method get_resize_mode - (of-object "GtkContainer") - (c-name "gtk_container_get_resize_mode") - (return-type "GtkResizeMode") -) - -(define-method check_resize - (of-object "GtkContainer") - (c-name "gtk_container_check_resize") - (return-type "none") -) - -(define-method foreach - (of-object "GtkContainer") - (c-name "gtk_container_foreach") - (return-type "none") - (parameters - '("GtkCallback" "callback") - '("gpointer" "callback_data") - ) -) - -(define-method foreach_full - (of-object "GtkContainer") - (c-name "gtk_container_foreach_full") - (return-type "none") - (parameters - '("GtkCallback" "callback") - '("GtkCallbackMarshal" "marshal") - '("gpointer" "callback_data") - '("GtkDestroyNotify" "notify") - ) - (deprecated "") -) - -(define-method get_children - (of-object "GtkContainer") - (c-name "gtk_container_get_children") - (return-type "GList*") -) - -(define-method children - (of-object "GtkContainer") - (c-name "gtk_container_children") - (return-type "GList*") - (deprecated "use GtkContainer.get_children") -) - -(define-method propagate_expose - (of-object "GtkContainer") - (c-name "gtk_container_propagate_expose") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("GdkEventExpose*" "event") - ) -) - -(define-method set_focus_chain - (of-object "GtkContainer") - (c-name "gtk_container_set_focus_chain") - (return-type "none") - (parameters - '("GList*" "focusable_widgets") - ) -) - -(define-method get_focus_chain - (of-object "GtkContainer") - (c-name "gtk_container_get_focus_chain") - (return-type "gboolean") - (parameters - '("GList**" "focusable_widgets") - ) -) - -(define-method unset_focus_chain - (of-object "GtkContainer") - (c-name "gtk_container_unset_focus_chain") - (return-type "none") -) - -(define-method set_reallocate_redraws - (of-object "GtkContainer") - (c-name "gtk_container_set_reallocate_redraws") - (return-type "none") - (parameters - '("gboolean" "needs_redraws") - ) -) - -(define-method set_focus_child - (of-object "GtkContainer") - (c-name "gtk_container_set_focus_child") - (return-type "none") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-method set_focus_vadjustment - (of-object "GtkContainer") - (c-name "gtk_container_set_focus_vadjustment") - (return-type "none") - (parameters - '("GtkAdjustment*" "adjustment") - ) -) - -(define-method get_focus_vadjustment - (of-object "GtkContainer") - (c-name "gtk_container_get_focus_vadjustment") - (return-type "GtkAdjustment*") -) - -(define-method set_focus_hadjustment - (of-object "GtkContainer") - (c-name "gtk_container_set_focus_hadjustment") - (return-type "none") - (parameters - '("GtkAdjustment*" "adjustment") - ) -) - -(define-method get_focus_hadjustment - (of-object "GtkContainer") - (c-name "gtk_container_get_focus_hadjustment") - (return-type "GtkAdjustment*") -) - -(define-method resize_children - (of-object "GtkContainer") - (c-name "gtk_container_resize_children") - (return-type "none") -) - -(define-method child_type - (of-object "GtkContainer") - (c-name "gtk_container_child_type") - (return-type "GType") -) - -(define-function container_class_install_child_property - (c-name "gtk_container_class_install_child_property") - (return-type "none") - (parameters - '("GtkContainerClass*" "cclass") - '("guint" "property_id") - '("GParamSpec*" "pspec") - ) -) - -(define-function container_class_find_child_property - (c-name "gtk_container_class_find_child_property") - (return-type "GParamSpec*") - (parameters - '("GObjectClass*" "cclass") - '("const-gchar*" "property_name") - ) -) - -(define-function container_class_list_child_properties - (c-name "gtk_container_class_list_child_properties") - (return-type "GParamSpec**") - (parameters - '("GObjectClass*" "cclass") - '("guint*" "n_properties") - ) -) - -(define-method add_with_properties - (of-object "GtkContainer") - (c-name "gtk_container_add_with_properties") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - '("const-gchar*" "first_prop_name") - ) - (varargs #t) -) - -(define-method child_set - (of-object "GtkContainer") - (c-name "gtk_container_child_set") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("const-gchar*" "first_prop_name") - ) - (varargs #t) -) - -(define-method child_get - (of-object "GtkContainer") - (c-name "gtk_container_child_get") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("const-gchar*" "first_prop_name") - ) - (varargs #t) -) - -(define-method child_set_valist - (of-object "GtkContainer") - (c-name "gtk_container_child_set_valist") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("const-gchar*" "first_property_name") - '("va_list" "var_args") - ) -) - -(define-method child_get_valist - (of-object "GtkContainer") - (c-name "gtk_container_child_get_valist") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("const-gchar*" "first_property_name") - '("va_list" "var_args") - ) -) - -(define-method child_set_property - (of-object "GtkContainer") - (c-name "gtk_container_child_set_property") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("const-gchar*" "property_name") - '("const-GValue*" "value") - ) -) - -(define-method child_get_property - (of-object "GtkContainer") - (c-name "gtk_container_child_get_property") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("const-gchar*" "property_name") - '("GValue*" "value") - ) -) - -(define-method forall - (of-object "GtkContainer") - (c-name "gtk_container_forall") - (return-type "none") - (parameters - '("GtkCallback" "callback") - '("gpointer" "callback_data") - ) -) - -(define-virtual add - (of-object "GtkContainer") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - ) -) -(define-virtual remove - (of-object "GtkContainer") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - ) -) -(define-virtual check_resize - (of-object "GtkContainer") - (return-type "none") -) -(define-virtual forall - (of-object "GtkContainer") - (return-type "none") - (parameters - '("gboolean" "include_internals") - '("GtkCallback" "callback") - '("gpointer" "callback_data") - ) -) -(define-virtual set_focus_child - (of-object "GtkContainer") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - ) -) -(define-virtual child_type - (of-object "GtkContainer") - (return-type "GType") -) -(define-virtual composite_name - (of-object "GtkContainer") - (return-type "gchar*") - (parameters - '("GtkWidget*" "child") - ) -) -(define-virtual set_child_property - (of-object "GtkContainer") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("guint" "property_id") - '("const-GValue*" "value") - '("GParamSpec*" "pspec") - ) -) -(define-virtual get_child_property - (of-object "GtkContainer") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("guint" "property_id") - '("GValue*" "value") - '("GParamSpec*" "pspec") - ) -) - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkctree.h - -(define-function gtk_ctree_get_type - (c-name "gtk_ctree_get_type") - (return-type "GType") -) - -(define-function gtk_ctree_new_with_titles - (c-name "gtk_ctree_new_with_titles") - (is-constructor-of "GtkCTree") - (return-type "GtkWidget*") - (parameters - '("gint" "columns" (default "1")) - '("gint" "tree_column" (default "0")) - '("gchar*[]" "titles") - ) - (deprecated "use GtkTreeStore/GtkTreeView") -) - -(define-function gtk_ctree_new - (c-name "gtk_ctree_new") - (is-constructor-of "GtkCTree") - (return-type "GtkWidget*") - (parameters - '("gint" "columns" (default "1")) - '("gint" "tree_column" (default "0")) - ) - (deprecated "use GtkTreeStore/GtkTreeView") -) - -(define-method base_nodes - (of-object "GtkCTree") - (c-name "gtk_ctree_base_nodes") - (return-type "GList*") -) - -(define-method insert_node - (of-object "GtkCTree") - (c-name "gtk_ctree_insert_node") - (return-type "GtkCTreeNode*") - (parameters - '("GtkCTreeNode*" "parent") - '("GtkCTreeNode*" "sibling") - '("gchar*[]" "text") - '("guint8" "spacing" (default "5")) - '("GdkPixmap*" "pixmap_closed" (null-ok) (default "NULL")) - '("GdkBitmap*" "mask_closed" (null-ok) (default "NULL")) - '("GdkPixmap*" "pixmap_opened" (null-ok) (default "NULL")) - '("GdkBitmap*" "mask_opened" (null-ok) (default "NULL")) - '("gboolean" "is_leaf" (default "1")) - '("gboolean" "expanded" (default "0")) - ) -) - -(define-method remove_node - (of-object "GtkCTree") - (c-name "gtk_ctree_remove_node") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - ) -) - -(define-method insert_gnode - (of-object "GtkCTree") - (c-name "gtk_ctree_insert_gnode") - (return-type "GtkCTreeNode*") - (parameters - '("GtkCTreeNode*" "parent") - '("GtkCTreeNode*" "sibling") - '("GNode*" "gnode") - '("GtkCTreeGNodeFunc" "func") - '("gpointer" "data") - ) -) - -(define-method export_to_gnode - (of-object "GtkCTree") - (c-name "gtk_ctree_export_to_gnode") - (return-type "GNode*") - (parameters - '("GNode*" "parent") - '("GNode*" "sibling") - '("GtkCTreeNode*" "node") - '("GtkCTreeGNodeFunc" "func") - '("gpointer" "data") - ) -) - -(define-method post_recursive - (of-object "GtkCTree") - (c-name "gtk_ctree_post_recursive") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("GtkCTreeFunc" "func") - '("gpointer" "data") - ) -) - -(define-method post_recursive_to_depth - (of-object "GtkCTree") - (c-name "gtk_ctree_post_recursive_to_depth") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("gint" "depth") - '("GtkCTreeFunc" "func") - '("gpointer" "data") - ) -) - -(define-method pre_recursive - (of-object "GtkCTree") - (c-name "gtk_ctree_pre_recursive") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("GtkCTreeFunc" "func") - '("gpointer" "data") - ) -) - -(define-method pre_recursive_to_depth - (of-object "GtkCTree") - (c-name "gtk_ctree_pre_recursive_to_depth") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("gint" "depth") - '("GtkCTreeFunc" "func") - '("gpointer" "data") - ) -) - -(define-method is_viewable - (of-object "GtkCTree") - (c-name "gtk_ctree_is_viewable") - (return-type "gboolean") - (parameters - '("GtkCTreeNode*" "node") - ) -) - -(define-method last - (of-object "GtkCTree") - (c-name "gtk_ctree_last") - (return-type "GtkCTreeNode*") - (parameters - '("GtkCTreeNode*" "node") - ) -) - -(define-method find_node_ptr - (of-object "GtkCTree") - (c-name "gtk_ctree_find_node_ptr") - (return-type "GtkCTreeNode*") - (parameters - '("GtkCTreeRow*" "ctree_row") - ) -) - -(define-method node_nth - (of-object "GtkCTree") - (c-name "gtk_ctree_node_nth") - (return-type "GtkCTreeNode*") - (parameters - '("guint" "row") - ) -) - -(define-method find - (of-object "GtkCTree") - (c-name "gtk_ctree_find") - (return-type "gboolean") - (parameters - '("GtkCTreeNode*" "node") - '("GtkCTreeNode*" "child") - ) -) - -(define-method is_ancestor - (of-object "GtkCTree") - (c-name "gtk_ctree_is_ancestor") - (return-type "gboolean") - (parameters - '("GtkCTreeNode*" "node") - '("GtkCTreeNode*" "child") - ) -) - -(define-method find_by_row_data - (of-object "GtkCTree") - (c-name "gtk_ctree_find_by_row_data") - (return-type "GtkCTreeNode*") - (parameters - '("GtkCTreeNode*" "node") - '("gpointer" "data") - ) -) - -(define-method find_all_by_row_data - (of-object "GtkCTree") - (c-name "gtk_ctree_find_all_by_row_data") - (return-type "GList*") - (parameters - '("GtkCTreeNode*" "node") - '("gpointer" "data") - ) -) - -(define-method find_by_row_data_custom - (of-object "GtkCTree") - (c-name "gtk_ctree_find_by_row_data_custom") - (return-type "GtkCTreeNode*") - (parameters - '("GtkCTreeNode*" "node") - '("gpointer" "data") - '("GCompareFunc" "func") - ) -) - -(define-method find_all_by_row_data_custom - (of-object "GtkCTree") - (c-name "gtk_ctree_find_all_by_row_data_custom") - (return-type "GList*") - (parameters - '("GtkCTreeNode*" "node") - '("gpointer" "data") - '("GCompareFunc" "func") - ) -) - -(define-method is_hot_spot - (of-object "GtkCTree") - (c-name "gtk_ctree_is_hot_spot") - (return-type "gboolean") - (parameters - '("gint" "x") - '("gint" "y") - ) -) - -(define-method move - (of-object "GtkCTree") - (c-name "gtk_ctree_move") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("GtkCTreeNode*" "new_parent" (null-ok)) - '("GtkCTreeNode*" "new_sibling" (null-ok)) - ) -) - -(define-method expand - (of-object "GtkCTree") - (c-name "gtk_ctree_expand") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - ) -) - -(define-method expand_recursive - (of-object "GtkCTree") - (c-name "gtk_ctree_expand_recursive") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - ) -) - -(define-method expand_to_depth - (of-object "GtkCTree") - (c-name "gtk_ctree_expand_to_depth") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("gint" "depth") - ) -) - -(define-method collapse - (of-object "GtkCTree") - (c-name "gtk_ctree_collapse") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - ) -) - -(define-method collapse_recursive - (of-object "GtkCTree") - (c-name "gtk_ctree_collapse_recursive") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - ) -) - -(define-method collapse_to_depth - (of-object "GtkCTree") - (c-name "gtk_ctree_collapse_to_depth") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("gint" "depth") - ) -) - -(define-method toggle_expansion - (of-object "GtkCTree") - (c-name "gtk_ctree_toggle_expansion") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - ) -) - -(define-method toggle_expansion_recursive - (of-object "GtkCTree") - (c-name "gtk_ctree_toggle_expansion_recursive") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - ) -) - -(define-method select - (of-object "GtkCTree") - (c-name "gtk_ctree_select") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - ) -) - -(define-method select_recursive - (of-object "GtkCTree") - (c-name "gtk_ctree_select_recursive") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - ) -) - -(define-method unselect - (of-object "GtkCTree") - (c-name "gtk_ctree_unselect") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - ) -) - -(define-method unselect_recursive - (of-object "GtkCTree") - (c-name "gtk_ctree_unselect_recursive") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - ) -) - -(define-method real_select_recursive - (of-object "GtkCTree") - (c-name "gtk_ctree_real_select_recursive") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("gint" "state") - ) -) - -(define-method node_set_text - (of-object "GtkCTree") - (c-name "gtk_ctree_node_set_text") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("gint" "column") - '("const-gchar*" "text") - ) -) - -(define-method node_set_pixmap - (of-object "GtkCTree") - (c-name "gtk_ctree_node_set_pixmap") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("gint" "column") - '("GdkPixmap*" "pixmap") - '("GdkBitmap*" "mask" (null-ok)) - ) -) - -(define-method node_set_pixtext - (of-object "GtkCTree") - (c-name "gtk_ctree_node_set_pixtext") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("gint" "column") - '("const-gchar*" "text") - '("guint8" "spacing") - '("GdkPixmap*" "pixmap") - '("GdkBitmap*" "mask" (null-ok)) - ) -) - -(define-method set_node_info - (of-object "GtkCTree") - (c-name "gtk_ctree_set_node_info") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("const-gchar*" "text") - '("guint8" "spacing") - '("GdkPixmap*" "pixmap_closed" (null-ok)) - '("GdkBitmap*" "mask_closed" (null-ok)) - '("GdkPixmap*" "pixmap_opened" (null-ok)) - '("GdkBitmap*" "mask_opened" (null-ok)) - '("gboolean" "is_leaf") - '("gboolean" "expanded") - ) -) - -(define-method node_set_shift - (of-object "GtkCTree") - (c-name "gtk_ctree_node_set_shift") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("gint" "column") - '("gint" "vertical") - '("gint" "horizontal") - ) -) - -(define-method node_set_selectable - (of-object "GtkCTree") - (c-name "gtk_ctree_node_set_selectable") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("gboolean" "selectable") - ) -) - -(define-method node_get_selectable - (of-object "GtkCTree") - (c-name "gtk_ctree_node_get_selectable") - (return-type "gboolean") - (parameters - '("GtkCTreeNode*" "node") - ) -) - -(define-method node_get_cell_type - (of-object "GtkCTree") - (c-name "gtk_ctree_node_get_cell_type") - (return-type "GtkCellType") - (parameters - '("GtkCTreeNode*" "node") - '("gint" "column") - ) -) - -(define-method node_get_text - (of-object "GtkCTree") - (c-name "gtk_ctree_node_get_text") - (return-type "gboolean") - (parameters - '("GtkCTreeNode*" "node") - '("gint" "column") - '("gchar**" "text") - ) -) - -(define-method node_get_pixmap - (of-object "GtkCTree") - (c-name "gtk_ctree_node_get_pixmap") - (return-type "gboolean") - (parameters - '("GtkCTreeNode*" "node") - '("gint" "column") - '("GdkPixmap**" "pixmap") - '("GdkBitmap**" "mask") - ) -) - -(define-method node_get_pixtext - (of-object "GtkCTree") - (c-name "gtk_ctree_node_get_pixtext") - (return-type "gboolean") - (parameters - '("GtkCTreeNode*" "node") - '("gint" "column") - '("gchar**" "text") - '("guint8*" "spacing") - '("GdkPixmap**" "pixmap") - '("GdkBitmap**" "mask") - ) -) - -(define-method get_node_info - (of-object "GtkCTree") - (c-name "gtk_ctree_get_node_info") - (return-type "gboolean") - (parameters - '("GtkCTreeNode*" "node") - '("gchar**" "text") - '("guint8*" "spacing") - '("GdkPixmap**" "pixmap_closed") - '("GdkBitmap**" "mask_closed") - '("GdkPixmap**" "pixmap_opened") - '("GdkBitmap**" "mask_opened") - '("gboolean*" "is_leaf") - '("gboolean*" "expanded") - ) -) - -(define-method node_set_row_style - (of-object "GtkCTree") - (c-name "gtk_ctree_node_set_row_style") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("GtkStyle*" "style") - ) -) - -(define-method node_get_row_style - (of-object "GtkCTree") - (c-name "gtk_ctree_node_get_row_style") - (return-type "GtkStyle*") - (parameters - '("GtkCTreeNode*" "node") - ) -) - -(define-method node_set_cell_style - (of-object "GtkCTree") - (c-name "gtk_ctree_node_set_cell_style") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("gint" "column") - '("GtkStyle*" "style") - ) -) - -(define-method node_get_cell_style - (of-object "GtkCTree") - (c-name "gtk_ctree_node_get_cell_style") - (return-type "GtkStyle*") - (parameters - '("GtkCTreeNode*" "node") - '("gint" "column") - ) -) - -(define-method node_set_foreground - (of-object "GtkCTree") - (c-name "gtk_ctree_node_set_foreground") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("GdkColor*" "color") - ) -) - -(define-method node_set_background - (of-object "GtkCTree") - (c-name "gtk_ctree_node_set_background") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("GdkColor*" "color") - ) -) - -(define-method node_set_row_data - (of-object "GtkCTree") - (c-name "gtk_ctree_node_set_row_data") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("gpointer" "data") - ) -) - -(define-method node_set_row_data_full - (of-object "GtkCTree") - (c-name "gtk_ctree_node_set_row_data_full") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("gpointer" "data") - '("GtkDestroyNotify" "destroy") - ) -) - -(define-method node_get_row_data - (of-object "GtkCTree") - (c-name "gtk_ctree_node_get_row_data") - (return-type "gpointer") - (parameters - '("GtkCTreeNode*" "node") - ) -) - -(define-method node_moveto - (of-object "GtkCTree") - (c-name "gtk_ctree_node_moveto") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("gint" "column") - '("gfloat" "row_align") - '("gfloat" "col_align") - ) -) - -(define-method node_is_visible - (of-object "GtkCTree") - (c-name "gtk_ctree_node_is_visible") - (return-type "GtkVisibility") - (parameters - '("GtkCTreeNode*" "node") - ) -) - -(define-method set_indent - (of-object "GtkCTree") - (c-name "gtk_ctree_set_indent") - (return-type "none") - (parameters - '("gint" "indent") - ) -) - -(define-method set_spacing - (of-object "GtkCTree") - (c-name "gtk_ctree_set_spacing") - (return-type "none") - (parameters - '("gint" "spacing") - ) -) - -(define-method set_show_stub - (of-object "GtkCTree") - (c-name "gtk_ctree_set_show_stub") - (return-type "none") - (parameters - '("gboolean" "show_stub") - ) -) - -(define-method set_line_style - (of-object "GtkCTree") - (c-name "gtk_ctree_set_line_style") - (return-type "none") - (parameters - '("GtkCTreeLineStyle" "line_style") - ) -) - -(define-method set_expander_style - (of-object "GtkCTree") - (c-name "gtk_ctree_set_expander_style") - (return-type "none") - (parameters - '("GtkCTreeExpanderStyle" "expander_style") - ) -) - -(define-method set_drag_compare_func - (of-object "GtkCTree") - (c-name "gtk_ctree_set_drag_compare_func") - (return-type "none") - (parameters - '("GtkCTreeCompareDragFunc" "cmp_func") - ) -) - -(define-method sort_node - (of-object "GtkCTree") - (c-name "gtk_ctree_sort_node") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - ) -) - -(define-method sort_recursive - (of-object "GtkCTree") - (c-name "gtk_ctree_sort_recursive") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - ) -) - -(define-function gtk_ctree_node_get_type - (c-name "gtk_ctree_node_get_type") - (return-type "GType") -) - -(define-virtual tree_select_row - (of-object "GtkCTree") - (return-type "none") - (parameters - '("GtkCTreeNode*" "row") - '("gint" "column") - ) -) - -(define-virtual tree_unselect_row - (of-object "GtkCTree") - (return-type "none") - (parameters - '("GtkCTreeNode*" "row") - '("gint" "column") - ) -) - -(define-virtual tree_expand - (of-object "GtkCTree") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - ) -) - -(define-virtual tree_collapse - (of-object "GtkCTree") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - ) -) - -(define-virtual tree_move - (of-object "GtkCTree") - (return-type "none") - (parameters - '("GtkCTreeNode*" "node") - '("GtkCTreeNode*" "new_parent") - '("GtkCTreeNode*" "new_sibling") - ) -) - -(define-virtual change_focus_row_expansion - (of-object "GtkCTree") - (return-type "none") - (parameters - '("GtkCTreeExpansionType" "action") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkcurve.h - -(define-function gtk_curve_get_type - (c-name "gtk_curve_get_type") - (return-type "GType") -) - -(define-function gtk_curve_new - (c-name "gtk_curve_new") - (is-constructor-of "GtkCurve") - (return-type "GtkWidget*") -) - -(define-method reset - (of-object "GtkCurve") - (c-name "gtk_curve_reset") - (return-type "none") -) - -(define-method set_gamma - (of-object "GtkCurve") - (c-name "gtk_curve_set_gamma") - (return-type "none") - (parameters - '("gfloat" "gamma") - ) -) - -(define-method set_range - (of-object "GtkCurve") - (c-name "gtk_curve_set_range") - (return-type "none") - (parameters - '("gfloat" "min_x") - '("gfloat" "max_x") - '("gfloat" "min_y") - '("gfloat" "max_y") - ) -) - -(define-method get_vector - (of-object "GtkCurve") - (c-name "gtk_curve_get_vector") - (return-type "none") - (parameters - '("int" "veclen") - '("gfloat[]" "vector") - ) -) - -(define-method set_vector - (of-object "GtkCurve") - (c-name "gtk_curve_set_vector") - (return-type "none") - (parameters - '("int" "veclen") - '("gfloat[]" "vector") - ) -) - -(define-method set_curve_type - (of-object "GtkCurve") - (c-name "gtk_curve_set_curve_type") - (return-type "none") - (parameters - '("GtkCurveType" "type") - ) -) - -(define-virtual curve_type_changed - (of-object "GtkCurve") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkdebug.h - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkdialog.h - -(define-function gtk_dialog_get_type - (c-name "gtk_dialog_get_type") - (return-type "GType") -) - -(define-function gtk_dialog_new - (c-name "gtk_dialog_new") - (is-constructor-of "GtkDialog") - (return-type "GtkWidget*") -) - -(define-function gtk_dialog_new_with_buttons - (c-name "gtk_dialog_new_with_buttons") - (is-constructor-of "GtkDialog") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "title" (null-ok) (default "NULL")) - '("GtkWindow*" "parent" (null-ok) (default "NULL")) - '("GtkDialogFlags" "flags" (default "0")) - '("const-gchar*" "first_button_text" (null-ok) (default "NULL")) - ) - (varargs #t) -) - -(define-method add_action_widget - (of-object "GtkDialog") - (c-name "gtk_dialog_add_action_widget") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("gint" "response_id") - ) -) - -(define-method add_button - (of-object "GtkDialog") - (c-name "gtk_dialog_add_button") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "button_text") - '("gint" "response_id") - ) -) - -(define-method add_buttons - (of-object "GtkDialog") - (c-name "gtk_dialog_add_buttons") - (return-type "none") - (parameters - '("const-gchar*" "first_button_text") - ) - (varargs #t) -) - -(define-method set_response_sensitive - (of-object "GtkDialog") - (c-name "gtk_dialog_set_response_sensitive") - (return-type "none") - (parameters - '("gint" "response_id") - '("gboolean" "setting") - ) -) - -(define-method set_default_response - (of-object "GtkDialog") - (c-name "gtk_dialog_set_default_response") - (return-type "none") - (parameters - '("gint" "response_id") - ) -) - -(define-method get_response_for_widget - (of-object "GtkDialog") - (c-name "gtk_dialog_get_response_for_widget") - (return-type "gint") - (parameters - '("GtkWidget*" "widget") - ) -) - -(define-method set_has_separator - (of-object "GtkDialog") - (c-name "gtk_dialog_set_has_separator") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_has_separator - (of-object "GtkDialog") - (c-name "gtk_dialog_get_has_separator") - (return-type "gboolean") -) - -(define-method response - (of-object "GtkDialog") - (c-name "gtk_dialog_response") - (return-type "none") - (parameters - '("gint" "response_id") - ) -) - -(define-method run - (of-object "GtkDialog") - (c-name "gtk_dialog_run") - (return-type "gint") -) - -(define-method set_alternative_button_order - (of-object "GtkDialog") - (c-name "gtk_dialog_set_alternative_button_order") - (return-type "none") - (parameters - '("gint" "first_response_id") - ) - (varargs #t) -) - -(define-method set_alternative_button_order_from_array - (of-object "GtkDialog") - (c-name "gtk_dialog_set_alternative_button_order_from_array") - (return-type "none") - (parameters - '("gint" "n_params") - '("gint*" "new_order") - ) -) - -(define-function alternative_dialog_button_order - (c-name "gtk_alternative_dialog_button_order") - (return-type "gboolean") - (parameters - '("GdkScreen*" "screen" (null-ok) (default "NULL")) - ) -) - -(define-virtual response - (of-object "GtkDialog") - (return-type "none") - (parameters - '("gint" "response_id") - ) -) - -(define-virtual close - (of-object "GtkDialog") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkdnd.h - -(define-function drag_finish - (c-name "gtk_drag_finish") - (return-type "none") - (parameters - '("GdkDragContext*" "context") - '("gboolean" "success") - '("gboolean" "del") - '("guint32" "time_") - ) -) - -(define-function drag_set_icon_widget - (c-name "gtk_drag_set_icon_widget") - (return-type "none") - (parameters - '("GdkDragContext*" "context") - '("GtkWidget*" "widget") - '("gint" "hot_x") - '("gint" "hot_y") - ) -) - -(define-function drag_set_icon_pixmap - (c-name "gtk_drag_set_icon_pixmap") - (return-type "none") - (parameters - '("GdkDragContext*" "context") - '("GdkColormap*" "colormap") - '("GdkPixmap*" "pixmap") - '("GdkBitmap*" "mask") - '("gint" "hot_x") - '("gint" "hot_y") - ) -) - -(define-function drag_set_icon_pixbuf - (c-name "gtk_drag_set_icon_pixbuf") - (return-type "none") - (parameters - '("GdkDragContext*" "context") - '("GdkPixbuf*" "pixbuf") - '("gint" "hot_x") - '("gint" "hot_y") - ) -) - -(define-function drag_set_icon_stock - (c-name "gtk_drag_set_icon_stock") - (return-type "none") - (parameters - '("GdkDragContext*" "context") - '("const-gchar*" "stock_id") - '("gint" "hot_x") - '("gint" "hot_y") - ) -) - -(define-function drag_set_icon_name - (c-name "gtk_drag_set_icon_name") - (return-type "none") - (parameters - '("GdkDragContext*" "context") - '("const-gchar*" "icon_name") - '("gint" "hot_x") - '("gint" "hot_y") - ) -) - -(define-function drag_set_icon_default - (c-name "gtk_drag_set_icon_default") - (return-type "none") - (parameters - '("GdkDragContext*" "context") - ) -) - -(define-method drag_check_threshold - (of-object "GtkWidget") - (c-name "gtk_drag_check_threshold") - (return-type "gboolean") - (parameters - '("gint" "start_x") - '("gint" "start_y") - '("gint" "current_x") - '("gint" "current_y") - ) -) - -(define-method drag_get_data - (of-object "GtkWidget") - (c-name "gtk_drag_get_data") - (return-type "none") - (parameters - '("GdkDragContext*" "context") - '("GdkAtom" "target") - '("guint32" "time" (default "GDK_CURRENT_TIME")) - ) -) - -(define-method drag_highlight - (of-object "GtkWidget") - (c-name "gtk_drag_highlight") - (return-type "none") -) - -(define-method drag_unhighlight - (of-object "GtkWidget") - (c-name "gtk_drag_unhighlight") - (return-type "none") -) - -(define-method drag_dest_set - (of-object "GtkWidget") - (c-name "gtk_drag_dest_set") - (return-type "none") - (parameters - '("GtkDestDefaults" "flags") - '("const-GtkTargetEntry*" "targets") - '("gint" "n_targets") - '("GdkDragAction" "actions") - ) -) - -(define-method drag_dest_set_proxy - (of-object "GtkWidget") - (c-name "gtk_drag_dest_set_proxy") - (return-type "none") - (parameters - '("GdkWindow*" "proxy_window") - '("GdkDragProtocol" "protocol") - '("gboolean" "use_coordinates") - ) -) - -(define-method drag_dest_unset - (of-object "GtkWidget") - (c-name "gtk_drag_dest_unset") - (return-type "none") -) - -(define-method drag_dest_find_target - (of-object "GtkWidget") - (c-name "gtk_drag_dest_find_target") - (return-type "GdkAtom") - (parameters - '("GdkDragContext*" "context") - '("GtkTargetList*" "target_list") - ) -) - -(define-method drag_dest_get_target_list - (of-object "GtkWidget") - (c-name "gtk_drag_dest_get_target_list") - (return-type "GtkTargetList*") -) - -(define-method drag_dest_set_target_list - (of-object "GtkWidget") - (c-name "gtk_drag_dest_set_target_list") - (return-type "none") - (parameters - '("GtkTargetList*" "target_list") - ) -) - -(define-method drag_source_set - (of-object "GtkWidget") - (c-name "gtk_drag_source_set") - (return-type "none") - (parameters - '("GdkModifierType" "start_button_mask") - '("const-GtkTargetEntry*" "targets") - '("gint" "n_targets") - '("GdkDragAction" "actions") - ) -) - -(define-method drag_source_unset - (of-object "GtkWidget") - (c-name "gtk_drag_source_unset") - (return-type "none") -) - -(define-method drag_source_set_icon - (of-object "GtkWidget") - (c-name "gtk_drag_source_set_icon") - (return-type "none") - (parameters - '("GdkColormap*" "colormap") - '("GdkPixmap*" "pixmap") - '("GdkBitmap*" "mask" (null-ok) (default "NULL")) - ) -) - -(define-method drag_source_set_icon_pixbuf - (of-object "GtkWidget") - (c-name "gtk_drag_source_set_icon_pixbuf") - (return-type "none") - (parameters - '("GdkPixbuf*" "pixbuf") - ) -) - -(define-method drag_source_set_icon_stock - (of-object "GtkWidget") - (c-name "gtk_drag_source_set_icon_stock") - (return-type "none") - (parameters - '("const-gchar*" "stock_id") - ) -) - -(define-method drag_source_set_icon_name - (of-object "GtkWidget") - (c-name "gtk_drag_source_set_icon_name") - (return-type "none") - (parameters - '("const-gchar*" "icon_name") - ) -) - -(define-method drag_source_get_target_list - (of-object "GtkWidget") - (c-name "gtk_drag_source_get_target_list") - (return-type "GtkTargetList*") -) - -(define-method drag_source_set_target_list - (of-object "GtkWidget") - (c-name "gtk_drag_source_set_target_list") - (return-type "none") - (parameters - '("GtkTargetList*" "target_list") - ) -) - -(define-method drag_begin - (of-object "GtkWidget") - (c-name "gtk_drag_begin") - (return-type "GdkDragContext*") - (parameters - '("GtkTargetList*" "targets") - '("GdkDragAction" "actions") - '("gint" "button") - '("GdkEvent*" "event") - ) -) - -(define-function drag_set_default_icon - (c-name "gtk_drag_set_default_icon") - (return-type "none") - (parameters - '("GdkColormap*" "colormap") - '("GdkPixmap*" "pixmap") - '("GdkBitmap*" "mask") - '("gint" "hot_x") - '("gint" "hot_y") - ) - (deprecated "change the stock pixbuf for GTK_STOCK_DND") -) - -(define-method drag_dest_add_text_targets - (of-object "GtkWidget") - (c-name "gtk_drag_dest_add_text_targets") - (return-type "none") -) - -(define-method drag_dest_add_image_targets - (of-object "GtkWidget") - (c-name "gtk_drag_dest_add_image_targets") - (return-type "none") -) - -(define-method drag_dest_add_uri_targets - (of-object "GtkWidget") - (c-name "gtk_drag_dest_add_uri_targets") - (return-type "none") -) - -(define-method drag_source_add_text_targets - (of-object "GtkWidget") - (c-name "gtk_drag_source_add_text_targets") - (return-type "none") -) - -(define-method drag_source_add_image_targets - (of-object "GtkWidget") - (c-name "gtk_drag_source_add_image_targets") - (return-type "none") -) - -(define-method drag_source_add_uri_targets - (of-object "GtkWidget") - (c-name "gtk_drag_source_add_uri_targets") - (return-type "none") -) - -(define-function target_list_add_text_targets - (c-name "gtk_target_list_add_text_targets") - (return-type "none") - (parameters - '("GtkTargetList*" "list") - '("guint" "info") - ) -) - -(define-function target_list_add_image_targets - (c-name "gtk_target_list_add_image_targets") - (return-type "none") - (parameters - '("GtkTargetList*" "list") - '("guint" "info") - '("gboolean" "writable") - ) -) - -(define-function target_list_add_uri_targets - (c-name "gtk_target_list_add_uri_targets") - (return-type "none") - (parameters - '("GtkTargetList*" "list") - '("guint" "info") - ) -) - -(define-function drag_get_source_widget - (c-name "gtk_drag_get_source_widget") - (return-type "GtkWidget*") - (parameters - '("GdkDragContext*" "context") - ) -) - -(define-function drag_source_set_icon_name - (c-name "gtk_drag_source_set_icon_name1") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - '("const-gchar*" "icon_name") - ) - (deprecated "use GtkWidget.drag_source_set_icon_name") -) - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkdrawingarea.h - -(define-function gtk_drawing_area_get_type - (c-name "gtk_drawing_area_get_type") - (return-type "GType") -) - -(define-function gtk_drawing_area_new - (c-name "gtk_drawing_area_new") - (is-constructor-of "GtkDrawingArea") - (return-type "GtkWidget*") -) - -(define-method size - (of-object "GtkDrawingArea") - (c-name "gtk_drawing_area_size") - (return-type "none") - (parameters - '("gint" "width") - '("gint" "height") - ) - (deprecated "use GtkWidget.set_size_request") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkeditable.h - -(define-function gtk_editable_get_type - (c-name "gtk_editable_get_type") - (return-type "GType") -) - -(define-method select_region - (of-object "GtkEditable") - (c-name "gtk_editable_select_region") - (return-type "none") - (parameters - '("gint" "start") - '("gint" "end") - ) -) - -(define-method get_selection_bounds - (of-object "GtkEditable") - (c-name "gtk_editable_get_selection_bounds") - (return-type "gboolean") - (parameters - '("gint*" "start") - '("gint*" "end") - ) -) - -(define-method insert_text - (of-object "GtkEditable") - (c-name "gtk_editable_insert_text") - (return-type "none") - (parameters - '("const-gchar*" "new_text") - '("gint" "new_text_length") - '("gint*" "position" ("default" "0")) - ) -) - -(define-method delete_text - (of-object "GtkEditable") - (c-name "gtk_editable_delete_text") - (return-type "none") - (parameters - '("gint" "start_pos") - '("gint" "end_pos") - ) -) - -(define-method get_chars - (of-object "GtkEditable") - (c-name "gtk_editable_get_chars") - (return-type "gchar*") - (parameters - '("gint" "start_pos") - '("gint" "end_pos") - ) -) - -(define-method cut_clipboard - (of-object "GtkEditable") - (c-name "gtk_editable_cut_clipboard") - (return-type "none") -) - -(define-method copy_clipboard - (of-object "GtkEditable") - (c-name "gtk_editable_copy_clipboard") - (return-type "none") -) - -(define-method paste_clipboard - (of-object "GtkEditable") - (c-name "gtk_editable_paste_clipboard") - (return-type "none") -) - -(define-method delete_selection - (of-object "GtkEditable") - (c-name "gtk_editable_delete_selection") - (return-type "none") -) - -(define-method set_position - (of-object "GtkEditable") - (c-name "gtk_editable_set_position") - (return-type "none") - (parameters - '("gint" "position") - ) -) - -(define-method get_position - (of-object "GtkEditable") - (c-name "gtk_editable_get_position") - (return-type "gint") -) - -(define-method set_editable - (of-object "GtkEditable") - (c-name "gtk_editable_set_editable") - (return-type "none") - (parameters - '("gboolean" "is_editable") - ) -) - -(define-method get_editable - (of-object "GtkEditable") - (c-name "gtk_editable_get_editable") - (return-type "gboolean") -) - -(define-virtual insert_text - (of-object "GtkEditable") - (return-type "none") - (parameters - '("const-gchar*" "text") - '("gint" "length") - '("gint*" "position" (direction "inout")) - ) -) -(define-virtual delete_text - (of-object "GtkEditable") - (return-type "none") - (parameters - '("gint" "start_pos") - '("gint" "end_pos") - ) -) -(define-virtual changed - (of-object "GtkEditable") - (return-type "none") -) -(define-virtual do_insert_text - (of-object "GtkEditable") - (return-type "none") - (parameters - '("const-gchar*" "text") - '("gint" "length") - '("gint*" "position" (direction "inout")) - ) -) -(define-virtual do_delete_text - (of-object "GtkEditable") - (return-type "none") - (parameters - '("gint" "start_pos") - '("gint" "end_pos") - ) -) -(define-virtual get_chars - (of-object "GtkEditable") - (return-type "gchar*") - (parameters - '("gint" "start_pos") - '("gint" "end_pos") - ) -) -(define-virtual set_selection_bounds - (of-object "GtkEditable") - (return-type "none") - (parameters - '("gint" "start_pos") - '("gint" "end_pos") - ) -) -(define-virtual get_selection_bounds - (of-object "GtkEditable") - (return-type "gboolean") - (parameters - '("gint*" "start_pos" (direction "out")) - '("gint*" "end_pos" (direction "out")) - ) -) -(define-virtual set_position - (of-object "GtkEditable") - (return-type "none") - (parameters - '("gint" "position") - ) -) -(define-virtual get_position - (of-object "GtkEditable") - (return-type "gint") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkentry.h - -(define-function gtk_entry_get_type - (c-name "gtk_entry_get_type") - (return-type "GType") -) - -(define-function gtk_entry_new - (c-name "gtk_entry_new") - (is-constructor-of "GtkEntry") - (return-type "GtkWidget*") -) - -(define-function gtk_entry_new_with_max_length - (c-name "gtk_entry_new_with_max_length") - (is-constructor-of "GtkEntry") - (return-type "GtkWidget*") - (parameters - '("guint16" "max" (default "0")) - ) - (deprecated "use gtk.Entry() instead") -) - -(define-method set_visibility - (of-object "GtkEntry") - (c-name "gtk_entry_set_visibility") - (return-type "none") - (parameters - '("gboolean" "visible") - ) -) - -(define-method get_visibility - (of-object "GtkEntry") - (c-name "gtk_entry_get_visibility") - (return-type "gboolean") -) - -(define-method set_invisible_char - (of-object "GtkEntry") - (c-name "gtk_entry_set_invisible_char") - (return-type "none") - (parameters - '("gunichar" "ch") - ) -) - -(define-method get_invisible_char - (of-object "GtkEntry") - (c-name "gtk_entry_get_invisible_char") - (return-type "gunichar") -) - -(define-method set_has_frame - (of-object "GtkEntry") - (c-name "gtk_entry_set_has_frame") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_has_frame - (of-object "GtkEntry") - (c-name "gtk_entry_get_has_frame") - (return-type "gboolean") -) - -(define-method set_max_length - (of-object "GtkEntry") - (c-name "gtk_entry_set_max_length") - (return-type "none") - (parameters - '("gint" "max") - ) -) - -(define-method get_max_length - (of-object "GtkEntry") - (c-name "gtk_entry_get_max_length") - (return-type "gint") -) - -(define-method set_activates_default - (of-object "GtkEntry") - (c-name "gtk_entry_set_activates_default") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_activates_default - (of-object "GtkEntry") - (c-name "gtk_entry_get_activates_default") - (return-type "gboolean") -) - -(define-method set_width_chars - (of-object "GtkEntry") - (c-name "gtk_entry_set_width_chars") - (return-type "none") - (parameters - '("gint" "n_chars") - ) -) - -(define-method get_width_chars - (of-object "GtkEntry") - (c-name "gtk_entry_get_width_chars") - (return-type "gint") -) - -(define-method set_text - (of-object "GtkEntry") - (c-name "gtk_entry_set_text") - (return-type "none") - (parameters - '("const-gchar*" "text") - ) -) - -(define-method get_text - (of-object "GtkEntry") - (c-name "gtk_entry_get_text") - (return-type "const-gchar*") -) - -(define-method get_layout - (of-object "GtkEntry") - (c-name "gtk_entry_get_layout") - (return-type "PangoLayout*") -) - -(define-method get_layout_offsets - (of-object "GtkEntry") - (c-name "gtk_entry_get_layout_offsets") - (return-type "none") - (parameters - '("gint*" "x") - '("gint*" "y") - ) -) - -(define-method set_alignment - (of-object "GtkEntry") - (c-name "gtk_entry_set_alignment") - (return-type "none") - (parameters - '("gfloat" "xalign") - ) -) - -(define-method get_alignment - (of-object "GtkEntry") - (c-name "gtk_entry_get_alignment") - (return-type "gfloat") -) - -(define-method set_completion - (of-object "GtkEntry") - (c-name "gtk_entry_set_completion") - (return-type "none") - (parameters - '("GtkEntryCompletion*" "completion" (null-ok)) - ) -) - -(define-method get_completion - (of-object "GtkEntry") - (c-name "gtk_entry_get_completion") - (return-type "GtkEntryCompletion*") -) - -(define-method append_text - (of-object "GtkEntry") - (c-name "gtk_entry_append_text") - (return-type "none") - (parameters - '("const-gchar*" "text") - ) - (deprecated "use GtkEditable.insert_text") -) - -(define-method prepend_text - (of-object "GtkEntry") - (c-name "gtk_entry_prepend_text") - (return-type "none") - (parameters - '("const-gchar*" "text") - ) - (deprecated "use GtkEditable.insert_text") -) - -(define-method set_position - (of-object "GtkEntry") - (c-name "gtk_entry_set_position") - (return-type "none") - (parameters - '("gint" "position") - ) -) - -(define-method select_region - (of-object "GtkEntry") - (c-name "gtk_entry_select_region") - (return-type "none") - (parameters - '("gint" "start") - '("gint" "end") - ) -) - -(define-method set_editable - (of-object "GtkEntry") - (c-name "gtk_entry_set_editable") - (return-type "none") - (parameters - '("gboolean" "editable") - ) -) - -(define-method layout_index_to_text_index - (of-object "GtkEntry") - (c-name "gtk_entry_layout_index_to_text_index") - (return-type "gint") - (parameters - '("gint" "layout_index") - ) -) - -(define-method text_index_to_layout_index - (of-object "GtkEntry") - (c-name "gtk_entry_text_index_to_layout_index") - (return-type "gint") - (parameters - '("gint" "text_index") - ) -) - -(define-virtual populate_popup - (of-object "GtkEntry") - (return-type "none") - (parameters - '("GtkMenu*" "menu") - ) -) - -(define-virtual activate - (of-object "GtkEntry") - (return-type "none") -) - -(define-virtual move_cursor - (of-object "GtkEntry") - (return-type "none") - (parameters - '("GtkMovementStep" "step") - '("gint" "count") - '("gboolean" "extend_selection") - ) -) - -(define-virtual insert_at_cursor - (of-object "GtkEntry") - (return-type "none") - (parameters - '("const-gchar*" "str") - ) -) - -(define-virtual delete_from_cursor - (of-object "GtkEntry") - (return-type "none") - (parameters - '("GtkDeleteType" "type") - '("gint" "count") - ) -) - -(define-virtual backspace - (of-object "GtkEntry") - (return-type "none") -) - -(define-virtual cut_clipboard - (of-object "GtkEntry") - (return-type "none") -) - -(define-virtual copy_clipboard - (of-object "GtkEntry") - (return-type "none") -) - -(define-virtual paste_clipboard - (of-object "GtkEntry") - (return-type "none") -) - -(define-virtual toggle_overwrite - (of-object "GtkEntry") - (return-type "none") -) - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkentrycompletion.h - -(define-function gtk_entry_completion_get_type - (c-name "gtk_entry_completion_get_type") - (return-type "GType") -) - -(define-function gtk_entry_completion_new - (c-name "gtk_entry_completion_new") - (is-constructor-of "GtkEntryCompletion") - (return-type "GtkEntryCompletion*") -) - -(define-method get_entry - (of-object "GtkEntryCompletion") - (c-name "gtk_entry_completion_get_entry") - (return-type "GtkWidget*") -) - -(define-method set_model - (of-object "GtkEntryCompletion") - (c-name "gtk_entry_completion_set_model") - (return-type "none") - (parameters - '("GtkTreeModel*" "model" (null-ok) (default "NULL")) - ) -) - -(define-method get_model - (of-object "GtkEntryCompletion") - (c-name "gtk_entry_completion_get_model") - (return-type "GtkTreeModel*") -) - -(define-method set_match_func - (of-object "GtkEntryCompletion") - (c-name "gtk_entry_completion_set_match_func") - (return-type "none") - (parameters - '("GtkEntryCompletionMatchFunc" "func") - '("gpointer" "func_data") - '("GDestroyNotify" "func_notify") - ) -) - -(define-method set_minimum_key_length - (of-object "GtkEntryCompletion") - (c-name "gtk_entry_completion_set_minimum_key_length") - (return-type "none") - (parameters - '("gint" "length") - ) -) - -(define-method get_minimum_key_length - (of-object "GtkEntryCompletion") - (c-name "gtk_entry_completion_get_minimum_key_length") - (return-type "gint") -) - -(define-method complete - (of-object "GtkEntryCompletion") - (c-name "gtk_entry_completion_complete") - (return-type "none") -) - -(define-method insert_action_text - (of-object "GtkEntryCompletion") - (c-name "gtk_entry_completion_insert_action_text") - (return-type "none") - (parameters - '("gint" "index") - '("const-gchar*" "text") - ) -) - -(define-method insert_action_markup - (of-object "GtkEntryCompletion") - (c-name "gtk_entry_completion_insert_action_markup") - (return-type "none") - (parameters - '("gint" "index") - '("const-gchar*" "markup") - ) -) - -(define-method delete_action - (of-object "GtkEntryCompletion") - (c-name "gtk_entry_completion_delete_action") - (return-type "none") - (parameters - '("gint" "index") - ) -) - -(define-method set_text_column - (of-object "GtkEntryCompletion") - (c-name "gtk_entry_completion_set_text_column") - (return-type "none") - (parameters - '("gint" "column") - ) -) - -(define-method get_text_column - (of-object "GtkEntryCompletion") - (c-name "gtk_entry_completion_get_text_column") - (return-type "gint") -) - -(define-method insert_prefix - (of-object "GtkEntryCompletion") - (c-name "gtk_entry_completion_insert_prefix") - (return-type "none") -) - -(define-method set_inline_completion - (of-object "GtkEntryCompletion") - (c-name "gtk_entry_completion_set_inline_completion") - (return-type "none") - (parameters - '("gboolean" "inline_completion") - ) -) - -(define-method get_inline_completion - (of-object "GtkEntryCompletion") - (c-name "gtk_entry_completion_get_inline_completion") - (return-type "gboolean") -) - -(define-method set_popup_completion - (of-object "GtkEntryCompletion") - (c-name "gtk_entry_completion_set_popup_completion") - (return-type "none") - (parameters - '("gboolean" "popup_completion") - ) -) - -(define-method get_popup_completion - (of-object "GtkEntryCompletion") - (c-name "gtk_entry_completion_get_popup_completion") - (return-type "gboolean") -) - -(define-method set_popup_set_width - (of-object "GtkEntryCompletion") - (c-name "gtk_entry_completion_set_popup_set_width") - (return-type "none") - (parameters - '("gboolean" "popup_set_width") - ) -) - -(define-method get_popup_set_width - (of-object "GtkEntryCompletion") - (c-name "gtk_entry_completion_get_popup_set_width") - (return-type "gboolean") -) - -(define-method set_popup_single_match - (of-object "GtkEntryCompletion") - (c-name "gtk_entry_completion_set_popup_single_match") - (return-type "none") - (parameters - '("gboolean" "popup_single_match") - ) -) - -(define-method get_popup_single_match - (of-object "GtkEntryCompletion") - (c-name "gtk_entry_completion_get_popup_single_match") - (return-type "gboolean") -) - -(define-virtual match_selected - (of-object "GtkEntryCompletion") - (return-type "gboolean") - (parameters - '("GtkTreeModel*" "model") - '("GtkTreeIter*" "iter") - ) -) -(define-virtual action_activated - (of-object "GtkEntryCompletion") - (return-type "none") - (parameters - '("gint" "index_") - ) -) -(define-virtual insert_prefix - (of-object "GtkEntryCompletion") - (return-type "gboolean") - (parameters - '("const-gchar*" "prefix") - ) -) - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkenums.h - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkeventbox.h - -(define-function gtk_event_box_get_type - (c-name "gtk_event_box_get_type") - (return-type "GType") -) - -(define-function gtk_event_box_new - (c-name "gtk_event_box_new") - (is-constructor-of "GtkEventBox") - (return-type "GtkWidget*") -) - -(define-method get_visible_window - (of-object "GtkEventBox") - (c-name "gtk_event_box_get_visible_window") - (return-type "gboolean") -) - -(define-method set_visible_window - (of-object "GtkEventBox") - (c-name "gtk_event_box_set_visible_window") - (return-type "none") - (parameters - '("gboolean" "visible_window") - ) -) - -(define-method get_above_child - (of-object "GtkEventBox") - (c-name "gtk_event_box_get_above_child") - (return-type "gboolean") -) - -(define-method set_above_child - (of-object "GtkEventBox") - (c-name "gtk_event_box_set_above_child") - (return-type "none") - (parameters - '("gboolean" "above_child") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkexpander.h - -(define-function gtk_expander_get_type - (c-name "gtk_expander_get_type") - (return-type "GType") -) - -(define-function gtk_expander_new - (c-name "gtk_expander_new") - (is-constructor-of "GtkExpander") - (return-type "GtkWidget*") - (properties - '("label" (optional)) - ) -) - -(define-function expander_new_with_mnemonic - (c-name "gtk_expander_new_with_mnemonic") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "label" (null-ok) (default "NULL")) - ) - (caller-owns-return #t) -) - -(define-method set_expanded - (of-object "GtkExpander") - (c-name "gtk_expander_set_expanded") - (return-type "none") - (parameters - '("gboolean" "expanded") - ) -) - -(define-method get_expanded - (of-object "GtkExpander") - (c-name "gtk_expander_get_expanded") - (return-type "gboolean") -) - -(define-method set_spacing - (of-object "GtkExpander") - (c-name "gtk_expander_set_spacing") - (return-type "none") - (parameters - '("gint" "spacing") - ) -) - -(define-method get_spacing - (of-object "GtkExpander") - (c-name "gtk_expander_get_spacing") - (return-type "gint") -) - -(define-method set_label - (of-object "GtkExpander") - (c-name "gtk_expander_set_label") - (return-type "none") - (parameters - '("const-gchar*" "label" (null-ok)) - ) -) - -(define-method get_label - (of-object "GtkExpander") - (c-name "gtk_expander_get_label") - (return-type "const-gchar*") -) - -(define-method set_use_underline - (of-object "GtkExpander") - (c-name "gtk_expander_set_use_underline") - (return-type "none") - (parameters - '("gboolean" "use_underline") - ) -) - -(define-method get_use_underline - (of-object "GtkExpander") - (c-name "gtk_expander_get_use_underline") - (return-type "gboolean") -) - -(define-method set_use_markup - (of-object "GtkExpander") - (c-name "gtk_expander_set_use_markup") - (return-type "none") - (parameters - '("gboolean" "use_markup") - ) -) - -(define-method get_use_markup - (of-object "GtkExpander") - (c-name "gtk_expander_get_use_markup") - (return-type "gboolean") -) - -(define-method set_label_widget - (of-object "GtkExpander") - (c-name "gtk_expander_set_label_widget") - (return-type "none") - (parameters - '("GtkWidget*" "label_widget" (null-ok)) - ) -) - -(define-method get_label_widget - (of-object "GtkExpander") - (c-name "gtk_expander_get_label_widget") - (return-type "GtkWidget*") -) - -(define-virtual activate - (of-object "GtkExpander") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkfilechooser.h - -(define-function gtk_file_chooser_get_type - (c-name "gtk_file_chooser_get_type") - (return-type "GType") -) - -(define-function gtk_file_chooser_error_quark - (c-name "gtk_file_chooser_error_quark") - (return-type "GQuark") -) - -(define-method set_action - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_set_action") - (return-type "none") - (parameters - '("GtkFileChooserAction" "action") - ) -) - -(define-method get_action - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_get_action") - (return-type "GtkFileChooserAction") -) - -(define-method set_local_only - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_set_local_only") - (return-type "none") - (parameters - '("gboolean" "local_only") - ) -) - -(define-method get_local_only - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_get_local_only") - (return-type "gboolean") -) - -(define-method set_select_multiple - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_set_select_multiple") - (return-type "none") - (parameters - '("gboolean" "select_multiple") - ) -) - -(define-method get_select_multiple - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_get_select_multiple") - (return-type "gboolean") -) - -(define-method set_show_hidden - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_set_show_hidden") - (return-type "none") - (parameters - '("gboolean" "show_hidden") - ) -) - -(define-method get_show_hidden - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_get_show_hidden") - (return-type "gboolean") -) - -(define-method set_do_overwrite_confirmation - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_set_do_overwrite_confirmation") - (return-type "none") - (parameters - '("gboolean" "do_overwrite_confirmation") - ) -) - -(define-method get_do_overwrite_confirmation - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_get_do_overwrite_confirmation") - (return-type "gboolean") -) - -(define-method set_current_name - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_set_current_name") - (return-type "none") - (parameters - '("const-gchar*" "name") - ) -) - -(define-method get_filename - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_get_filename") - (return-type "gchar*") -) - -(define-method set_filename - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_set_filename") - (return-type "gboolean") - (parameters - '("const-char*" "filename") - ) -) - -(define-method select_filename - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_select_filename") - (return-type "gboolean") - (parameters - '("const-char*" "filename") - ) -) - -(define-method unselect_filename - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_unselect_filename") - (return-type "none") - (parameters - '("const-char*" "filename") - ) -) - -(define-method select_all - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_select_all") - (return-type "none") -) - -(define-method unselect_all - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_unselect_all") - (return-type "none") -) - -(define-method get_filenames - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_get_filenames") - (return-type "GSList*") -) - -(define-method set_current_folder - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_set_current_folder") - (return-type "gboolean") - (parameters - '("const-gchar*" "filename") - ) -) - -(define-method get_current_folder - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_get_current_folder") - (return-type "gchar*") -) - -(define-method get_uri - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_get_uri") - (return-type "gchar*") -) - -(define-method set_uri - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_set_uri") - (return-type "gboolean") - (parameters - '("const-char*" "uri") - ) -) - -(define-method select_uri - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_select_uri") - (return-type "gboolean") - (parameters - '("const-char*" "uri") - ) -) - -(define-method unselect_uri - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_unselect_uri") - (return-type "none") - (parameters - '("const-char*" "uri") - ) -) - -(define-method get_uris - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_get_uris") - (return-type "GSList*") -) - -(define-method set_current_folder_uri - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_set_current_folder_uri") - (return-type "gboolean") - (parameters - '("const-gchar*" "uri") - ) -) - -(define-method get_current_folder_uri - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_get_current_folder_uri") - (return-type "gchar*") -) - -(define-method set_preview_widget - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_set_preview_widget") - (return-type "none") - (parameters - '("GtkWidget*" "preview_widget") - ) -) - -(define-method get_preview_widget - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_get_preview_widget") - (return-type "GtkWidget*") -) - -(define-method set_preview_widget_active - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_set_preview_widget_active") - (return-type "none") - (parameters - '("gboolean" "active") - ) -) - -(define-method get_preview_widget_active - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_get_preview_widget_active") - (return-type "gboolean") -) - -(define-method set_use_preview_label - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_set_use_preview_label") - (return-type "none") - (parameters - '("gboolean" "use_label") - ) -) - -(define-method get_use_preview_label - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_get_use_preview_label") - (return-type "gboolean") -) - -(define-method get_preview_filename - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_get_preview_filename") - (return-type "char*") -) - -(define-method get_preview_uri - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_get_preview_uri") - (return-type "char*") -) - -(define-method set_extra_widget - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_set_extra_widget") - (return-type "none") - (parameters - '("GtkWidget*" "extra_widget") - ) -) - -(define-method get_extra_widget - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_get_extra_widget") - (return-type "GtkWidget*") -) - -(define-method add_filter - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_add_filter") - (return-type "none") - (parameters - '("GtkFileFilter*" "filter") - ) -) - -(define-method remove_filter - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_remove_filter") - (return-type "none") - (parameters - '("GtkFileFilter*" "filter") - ) -) - -(define-method list_filters - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_list_filters") - (return-type "GSList*") -) - -(define-method set_filter - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_set_filter") - (return-type "none") - (parameters - '("GtkFileFilter*" "filter") - ) -) - -(define-method get_filter - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_get_filter") - (return-type "GtkFileFilter*") -) - -(define-method add_shortcut_folder - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_add_shortcut_folder") - (return-type "gboolean") - (parameters - '("const-char*" "folder") - '("GError**" "error") - ) -) - -(define-method remove_shortcut_folder - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_remove_shortcut_folder") - (return-type "gboolean") - (parameters - '("const-char*" "folder") - '("GError**" "error") - ) -) - -(define-method list_shortcut_folders - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_list_shortcut_folders") - (return-type "GSList*") -) - -(define-method add_shortcut_folder_uri - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_add_shortcut_folder_uri") - (return-type "gboolean") - (parameters - '("const-char*" "uri") - '("GError**" "error") - ) -) - -(define-method remove_shortcut_folder_uri - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_remove_shortcut_folder_uri") - (return-type "gboolean") - (parameters - '("const-char*" "uri") - '("GError**" "error") - ) -) - -(define-method list_shortcut_folder_uris - (of-object "GtkFileChooser") - (c-name "gtk_file_chooser_list_shortcut_folder_uris") - (return-type "GSList*") -) - - - -;; From /opt/gnome-2.10/include/gtk-2.0/gtk/gtkfilechooserbutton.h - -(define-function gtk_file_chooser_button_get_type - (c-name "gtk_file_chooser_button_get_type") - (return-type "GType") -) - -(define-function file_chooser_button_new - (c-name "gtk_file_chooser_button_new") - (is-constructor-of "GtkFileChooserButton") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "title") - ) -) - -(define-function file_chooser_button_new_with_backend - (c-name "gtk_file_chooser_button_new_with_backend") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "title") - '("const-gchar*" "backend") - ) - (caller-owns-return #t) -) - -(define-function file_chooser_button_new_with_dialog - (c-name "gtk_file_chooser_button_new_with_dialog") - (return-type "GtkWidget*") - (parameters - '("GtkWidget*" "dialog") - ) - (caller-owns-return #t) -) - -(define-method get_title - (of-object "GtkFileChooserButton") - (c-name "gtk_file_chooser_button_get_title") - (return-type "const-gchar*") -) - -(define-method set_title - (of-object "GtkFileChooserButton") - (c-name "gtk_file_chooser_button_set_title") - (return-type "none") - (parameters - '("const-gchar*" "title") - ) -) - -(define-method get_width_chars - (of-object "GtkFileChooserButton") - (c-name "gtk_file_chooser_button_get_width_chars") - (return-type "gint") -) - -(define-method set_width_chars - (of-object "GtkFileChooserButton") - (c-name "gtk_file_chooser_button_set_width_chars") - (return-type "none") - (parameters - '("gint" "n_chars") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkfilechooserdialog.h - -(define-function gtk_file_chooser_dialog_get_type - (c-name "gtk_file_chooser_dialog_get_type") - (return-type "GType") -) - -(define-function gtk_file_chooser_dialog_new - (c-name "gtk_file_chooser_dialog_new") - (is-constructor-of "GtkFileChooserDialog") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "title") - '("GtkWindow*" "parent") - '("GtkFileChooserAction" "action") - '("const-gchar*" "first_button_text") - ) - (varargs #t) -) - -(define-function file_chooser_dialog_new_with_backend - (c-name "gtk_file_chooser_dialog_new_with_backend") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "title") - '("GtkWindow*" "parent") - '("GtkFileChooserAction" "action") - '("const-gchar*" "backend") - '("const-gchar*" "first_button_text") - ) - (varargs #t) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkfilechooserwidget.h - -(define-function gtk_file_chooser_widget_get_type - (c-name "gtk_file_chooser_widget_get_type") - (return-type "GType") -) - -(define-function gtk_file_chooser_widget_new - (c-name "gtk_file_chooser_widget_new") - (is-constructor-of "GtkFileChooserWidget") - (return-type "GtkWidget*") - (parameters - '("GtkFileChooserAction" "action") - ) -) - -(define-function file_chooser_widget_new_with_backend - (c-name "gtk_file_chooser_widget_new_with_backend") - (return-type "GtkWidget*") - (parameters - '("GtkFileChooserAction" "action") - '("const-gchar*" "backend") - ) - (caller-owns-return #t) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkfilefilter.h - -(define-function gtk_file_filter_get_type - (c-name "gtk_file_filter_get_type") - (return-type "GType") -) - -(define-function gtk_file_filter_new - (c-name "gtk_file_filter_new") - (is-constructor-of "GtkFileFilter") - (return-type "GtkFileFilter*") -) - -(define-method set_name - (of-object "GtkFileFilter") - (c-name "gtk_file_filter_set_name") - (return-type "none") - (parameters - '("const-gchar*" "name") - ) -) - -(define-method get_name - (of-object "GtkFileFilter") - (c-name "gtk_file_filter_get_name") - (return-type "const-gchar*") -) - -(define-method add_mime_type - (of-object "GtkFileFilter") - (c-name "gtk_file_filter_add_mime_type") - (return-type "none") - (parameters - '("const-gchar*" "mime_type") - ) -) - -(define-method add_pattern - (of-object "GtkFileFilter") - (c-name "gtk_file_filter_add_pattern") - (return-type "none") - (parameters - '("const-gchar*" "pattern") - ) -) - -(define-method add_pixbuf_formats - (of-object "GtkFileFilter") - (c-name "gtk_file_filter_add_pixbuf_formats") - (return-type "none") -) - -(define-method add_custom - (of-object "GtkFileFilter") - (c-name "gtk_file_filter_add_custom") - (return-type "none") - (parameters - '("GtkFileFilterFlags" "needed") - '("GtkFileFilterFunc" "func") - '("gpointer" "data") - '("GDestroyNotify" "notify") - ) -) - -(define-method get_needed - (of-object "GtkFileFilter") - (c-name "gtk_file_filter_get_needed") - (return-type "GtkFileFilterFlags") -) - -(define-method filter - (of-object "GtkFileFilter") - (c-name "gtk_file_filter_filter") - (return-type "gboolean") - (parameters - '("const-GtkFileFilterInfo*" "filter_info") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkfilesel.h - -(define-function gtk_file_selection_get_type - (c-name "gtk_file_selection_get_type") - (return-type "GType") -) - -(define-function gtk_file_selection_new - (c-name "gtk_file_selection_new") - (is-constructor-of "GtkFileSelection") - (return-type "GtkWidget*") - (properties - '("title" (optional)) - ) -) - -(define-method set_filename - (of-object "GtkFileSelection") - (c-name "gtk_file_selection_set_filename") - (return-type "none") - (parameters - '("const-gchar*" "filename") - ) -) - -(define-method get_filename - (of-object "GtkFileSelection") - (c-name "gtk_file_selection_get_filename") - (return-type "const-gchar*") -) - -(define-method complete - (of-object "GtkFileSelection") - (c-name "gtk_file_selection_complete") - (return-type "none") - (parameters - '("const-gchar*" "pattern") - ) -) - -(define-method show_fileop_buttons - (of-object "GtkFileSelection") - (c-name "gtk_file_selection_show_fileop_buttons") - (return-type "none") -) - -(define-method hide_fileop_buttons - (of-object "GtkFileSelection") - (c-name "gtk_file_selection_hide_fileop_buttons") - (return-type "none") -) - -(define-method get_selections - (of-object "GtkFileSelection") - (c-name "gtk_file_selection_get_selections") - (return-type "gchar**") -) - -(define-method set_select_multiple - (of-object "GtkFileSelection") - (c-name "gtk_file_selection_set_select_multiple") - (return-type "none") - (parameters - '("gboolean" "select_multiple") - ) -) - -(define-method get_select_multiple - (of-object "GtkFileSelection") - (c-name "gtk_file_selection_get_select_multiple") - (return-type "gboolean") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkfilesystem.h - -(define-function file_system_error_quark - (c-name "gtk_file_system_error_quark") - (return-type "GQuark") -) - -(define-function gtk_file_info_get_type - (c-name "gtk_file_info_get_type") - (return-type "GType") -) - -(define-function gtk_file_info_new - (c-name "gtk_file_info_new") - (is-constructor-of "GtkFileInfo") - (return-type "GtkFileInfo*") -) - -(define-method copy - (of-object "GtkFileInfo") - (c-name "gtk_file_info_copy") - (return-type "GtkFileInfo*") -) - -(define-method free - (of-object "GtkFileInfo") - (c-name "gtk_file_info_free") - (return-type "none") -) - -(define-method get_display_name - (of-object "GtkFileInfo") - (c-name "gtk_file_info_get_display_name") - (return-type "const-gchar*") -) - -(define-method get_display_key - (of-object "GtkFileInfo") - (c-name "gtk_file_info_get_display_key") - (return-type "const-gchar*") -) - -(define-method set_display_name - (of-object "GtkFileInfo") - (c-name "gtk_file_info_set_display_name") - (return-type "none") - (parameters - '("const-gchar*" "display_name") - ) -) - -(define-method get_is_folder - (of-object "GtkFileInfo") - (c-name "gtk_file_info_get_is_folder") - (return-type "gboolean") -) - -(define-method set_is_folder - (of-object "GtkFileInfo") - (c-name "gtk_file_info_set_is_folder") - (return-type "none") - (parameters - '("gboolean" "is_folder") - ) -) - -(define-method get_is_hidden - (of-object "GtkFileInfo") - (c-name "gtk_file_info_get_is_hidden") - (return-type "gboolean") -) - -(define-method set_is_hidden - (of-object "GtkFileInfo") - (c-name "gtk_file_info_set_is_hidden") - (return-type "none") - (parameters - '("gboolean" "is_hidden") - ) -) - -(define-method get_mime_type - (of-object "GtkFileInfo") - (c-name "gtk_file_info_get_mime_type") - (return-type "const-gchar*") -) - -(define-method set_mime_type - (of-object "GtkFileInfo") - (c-name "gtk_file_info_set_mime_type") - (return-type "none") - (parameters - '("const-gchar*" "mime_type") - ) -) - -(define-method get_modification_time - (of-object "GtkFileInfo") - (c-name "gtk_file_info_get_modification_time") - (return-type "GtkFileTime") -) - -(define-method set_modification_time - (of-object "GtkFileInfo") - (c-name "gtk_file_info_set_modification_time") - (return-type "none") - (parameters - '("GtkFileTime" "modification_time") - ) -) - -(define-method get_size - (of-object "GtkFileInfo") - (c-name "gtk_file_info_get_size") - (return-type "gint64") -) - -(define-method set_size - (of-object "GtkFileInfo") - (c-name "gtk_file_info_set_size") - (return-type "none") - (parameters - '("gint64" "size") - ) -) - -(define-function gtk_file_system_get_type - (c-name "gtk_file_system_get_type") - (return-type "GType") -) - -(define-method list_volumes - (of-object "GtkFileSystem") - (c-name "gtk_file_system_list_volumes") - (return-type "GSList*") -) - -(define-method get_volume_for_path - (of-object "GtkFileSystem") - (c-name "gtk_file_system_get_volume_for_path") - (return-type "GtkFileSystemVolume*") - (parameters - '("const-GtkFilePath*" "path") - ) -) - -(define-method volume_free - (of-object "GtkFileSystem") - (c-name "gtk_file_system_volume_free") - (return-type "none") - (parameters - '("GtkFileSystemVolume*" "volume") - ) -) - -(define-method volume_get_base_path - (of-object "GtkFileSystem") - (c-name "gtk_file_system_volume_get_base_path") - (return-type "GtkFilePath*") - (parameters - '("GtkFileSystemVolume*" "volume") - ) -) - -(define-method volume_get_is_mounted - (of-object "GtkFileSystem") - (c-name "gtk_file_system_volume_get_is_mounted") - (return-type "gboolean") - (parameters - '("GtkFileSystemVolume*" "volume") - ) -) - -(define-method volume_mount - (of-object "GtkFileSystem") - (c-name "gtk_file_system_volume_mount") - (return-type "gboolean") - (parameters - '("GtkFileSystemVolume*" "volume") - '("GError**" "error") - ) -) - -(define-method volume_get_display_name - (of-object "GtkFileSystem") - (c-name "gtk_file_system_volume_get_display_name") - (return-type "char*") - (parameters - '("GtkFileSystemVolume*" "volume") - ) -) - -(define-method volume_render_icon - (of-object "GtkFileSystem") - (c-name "gtk_file_system_volume_render_icon") - (return-type "GdkPixbuf*") - (parameters - '("GtkFileSystemVolume*" "volume") - '("GtkWidget*" "widget") - '("gint" "pixel_size") - '("GError**" "error") - ) -) - -(define-method get_parent - (of-object "GtkFileSystem") - (c-name "gtk_file_system_get_parent") - (return-type "gboolean") - (parameters - '("const-GtkFilePath*" "path") - '("GtkFilePath**" "parent") - '("GError**" "error") - ) -) - -(define-method get_folder - (of-object "GtkFileSystem") - (c-name "gtk_file_system_get_folder") - (return-type "GtkFileFolder*") - (parameters - '("const-GtkFilePath*" "path") - '("GtkFileInfoType" "types") - '("GError**" "error") - ) -) - -(define-method create_folder - (of-object "GtkFileSystem") - (c-name "gtk_file_system_create_folder") - (return-type "gboolean") - (parameters - '("const-GtkFilePath*" "path") - '("GError**" "error") - ) -) - -(define-method make_path - (of-object "GtkFileSystem") - (c-name "gtk_file_system_make_path") - (return-type "GtkFilePath*") - (parameters - '("const-GtkFilePath*" "base_path") - '("const-gchar*" "display_name") - '("GError**" "error") - ) -) - -(define-method parse - (of-object "GtkFileSystem") - (c-name "gtk_file_system_parse") - (return-type "gboolean") - (parameters - '("const-GtkFilePath*" "base_path") - '("const-gchar*" "str") - '("GtkFilePath**" "folder") - '("gchar**" "file_part") - '("GError**" "error") - ) -) - -(define-method path_to_uri - (of-object "GtkFileSystem") - (c-name "gtk_file_system_path_to_uri") - (return-type "gchar*") - (parameters - '("const-GtkFilePath*" "path") - ) -) - -(define-method path_to_filename - (of-object "GtkFileSystem") - (c-name "gtk_file_system_path_to_filename") - (return-type "gchar*") - (parameters - '("const-GtkFilePath*" "path") - ) -) - -(define-method uri_to_path - (of-object "GtkFileSystem") - (c-name "gtk_file_system_uri_to_path") - (return-type "GtkFilePath*") - (parameters - '("const-gchar*" "uri") - ) -) - -(define-method filename_to_path - (of-object "GtkFileSystem") - (c-name "gtk_file_system_filename_to_path") - (return-type "GtkFilePath*") - (parameters - '("const-gchar*" "filename") - ) -) - -(define-method render_icon - (of-object "GtkFileSystem") - (c-name "gtk_file_system_render_icon") - (return-type "GdkPixbuf*") - (parameters - '("const-GtkFilePath*" "path") - '("GtkWidget*" "widget") - '("gint" "pixel_size") - '("GError**" "error") - ) -) - -(define-method insert_bookmark - (of-object "GtkFileSystem") - (c-name "gtk_file_system_insert_bookmark") - (return-type "gboolean") - (parameters - '("const-GtkFilePath*" "path") - '("gint" "position") - '("GError**" "error") - ) -) - -(define-method remove_bookmark - (of-object "GtkFileSystem") - (c-name "gtk_file_system_remove_bookmark") - (return-type "gboolean") - (parameters - '("const-GtkFilePath*" "path") - '("GError**" "error") - ) -) - -(define-method list_bookmarks - (of-object "GtkFileSystem") - (c-name "gtk_file_system_list_bookmarks") - (return-type "GSList*") -) - -(define-virtual list_volumes - (of-object "GtkFileSystem") - (return-type "GSList*") -) - -(define-virtual get_volume_for_path - (of-object "GtkFileSystem") - (return-type "GtkFileSystemVolume*") - (parameters - '("const-GtkFilePath*" "path") - ) -) - -(define-virtual get_folder - (of-object "GtkFileSystem") - (return-type "GtkFileSystemHandle*") - (parameters - '("const-GtkFilePath*" "path") - '("GtkFileInfoType" "types") - '("GtkFileSystemGetFolderCallback" "callback") - '("gpointer" "data") - ) -) - -(define-virtual create_folder - (of-object "GtkFileSystem") - (return-type "gboolean") - (parameters - '("const-GtkFilePath*" "path") - '("GError**" "error") - ) -) -(define-virtual volume_free - (of-object "GtkFileSystem") - (return-type "none") - (parameters - '("GtkFileSystemVolume*" "volume") - ) -) -(define-virtual volume_get_base_path - (of-object "GtkFileSystem") - (return-type "GtkFilePath*") - (parameters - '("GtkFileSystemVolume*" "volume") - ) -) - -(define-virtual volume_get_is_mounted - (of-object "GtkFileSystem") - (return-type "gboolean") - (parameters - '("GtkFileSystemVolume*" "volume") - ) -) -(define-virtual volume_mount - (of-object "GtkFileSystem") - (return-type "gboolean") - (parameters - '("GtkFileSystemVolume*" "volume") - '("GError**" "error") - ) -) -(define-virtual volume_get_display_name - (of-object "GtkFileSystem") - (return-type "char*") - (parameters - '("GtkFileSystemVolume*" "volume") - ) -) - -(define-virtual volume_get_icon_name - (of-object "GtkFileSystem") - (return-type "gchar*") - (parameters - '("GtkFileSystemVolume*" "volume") - '("GError**" "error") - ) -) - -(define-virtual get_parent - (of-object "GtkFileSystem") - (return-type "gboolean") - (parameters - '("const-GtkFilePath*" "path") - '("GtkFilePath**" "parent") - '("GError**" "error") - ) -) -(define-virtual make_path - (of-object "GtkFileSystem") - (return-type "GtkFilePath*") - (parameters - '("const-GtkFilePath*" "base_path") - '("const-gchar*" "display_name") - '("GError**" "error") - ) -) - -(define-virtual parse - (of-object "GtkFileSystem") - (return-type "gboolean") - (parameters - '("const-GtkFilePath*" "base_path") - '("const-gchar*" "str") - '("GtkFilePath**" "folder") - '("gchar**" "file_part") - '("GError**" "error") - ) -) -(define-virtual path_to_uri - (of-object "GtkFileSystem") - (return-type "gchar*") - (parameters - '("const-GtkFilePath*" "path") - ) -) - -(define-virtual path_to_filename - (of-object "GtkFileSystem") - (return-type "gchar*") - (parameters - '("const-GtkFilePath*" "path") - ) -) - -(define-virtual uri_to_path - (of-object "GtkFileSystem") - (return-type "GtkFilePath*") - (parameters - '("const-gchar*" "uri") - ) -) - -(define-virtual filename_to_path - (of-object "GtkFileSystem") - (return-type "GtkFilePath*") - (parameters - '("const-gchar*" "path") - ) -) - -(define-virtual insert_bookmark - (of-object "GtkFileSystem") - (return-type "gboolean") - (parameters - '("const-GtkFilePath*" "path") - '("gint" "position") - '("GError**" "error") - ) -) -(define-virtual remove_bookmark - (of-object "GtkFileSystem") - (return-type "gboolean") - (parameters - '("const-GtkFilePath*" "path") - '("GError**" "error") - ) -) -(define-virtual list_bookmarks - (of-object "GtkFileSystem") - (return-type "GSList*") -) - -(define-virtual volumes_changed - (of-object "GtkFileSystem") - (return-type "none") -) -(define-virtual bookmarks_changed - (of-object "GtkFileSystem") - (return-type "none") -) - -(define-virtual get_bookmark_label - (of-object "GtkFileSystem") - (return-type "gchar*") - (parameters - '("const-GtkFilePath*" "path") - ) -) - -(define-virtual set_bookmark_label - (of-object "GtkFileSystem") - (return-type "none") - (parameters - '("const-GtkFilePath*" "path") - '("const-gchar*" "label") - ) -) - - -(define-function gtk_file_folder_get_type - (c-name "gtk_file_folder_get_type") - (return-type "GType") -) - -(define-method list_children - (of-object "GtkFileFolder") - (c-name "gtk_file_folder_list_children") - (return-type "gboolean") - (parameters - '("GSList**" "children") - '("GError**" "error") - ) -) - -(define-method get_info - (of-object "GtkFileFolder") - (c-name "gtk_file_folder_get_info") - (return-type "GtkFileInfo*") - (parameters - '("const-GtkFilePath*" "path") - '("GError**" "error") - ) -) - -(define-function file_paths_sort - (c-name "gtk_file_paths_sort") - (return-type "GSList*") - (parameters - '("GSList*" "paths") - ) -) - -(define-function file_paths_copy - (c-name "gtk_file_paths_copy") - (return-type "GSList*") - (parameters - '("GSList*" "paths") - ) -) - -(define-function file_paths_free - (c-name "gtk_file_paths_free") - (return-type "none") - (parameters - '("GSList*" "paths") - ) -) - -(define-virtual get_info - (of-object "GtkFileFolder") - (return-type "GtkFileInfo*") - (parameters - '("const-GtkFilePath*" "path") - '("GError**" "error") - ) -) - -(define-virtual list_children - (of-object "GtkFileFolder") - (return-type "gboolean") - (parameters - '("GSList**" "children") - '("GError**" "error") - ) -) -(define-virtual deleted - (of-object "GtkFileFolder") - (return-type "none") -) -(define-virtual files_added - (of-object "GtkFileFolder") - (return-type "none") - (parameters - '("GSList*" "paths") - ) -) -(define-virtual files_changed - (of-object "GtkFileFolder") - (return-type "none") - (parameters - '("GSList*" "paths") - ) -) -(define-virtual files_removed - (of-object "GtkFileFolder") - (return-type "none") - (parameters - '("GSList*" "paths") - ) -) -(define-virtual is_finished_loading - (of-object "GtkFileFolder") - (return-type "gboolean") -) -(define-virtual finished_loading - (of-object "GtkFileFolder") - (return-type "none") -) - -(define-method set_icon_name - (of-object "GtkFileInfo") - (c-name "gtk_file_info_set_icon_name") - (return-type "none") - (parameters - '("const-gchar*" "con_name") - ) -) - -(define-method get_icon_name - (of-object "GtkFileInfo") - (c-name "gtk_file_info_get_icon_name") - (return-type "const-gchar*") -) - -(define-method render_icon - (of-object "GtkFileInfo") - (c-name "gtk_file_info_render_icon") - (return-type "GdkPixbuf*") - (parameters - '("GtkWidget*" "widget") - '("gint" "pixel_size") - '("GError**" "error") - ) -) - -(define-function file_system_handle_get_type - (c-name "gtk_file_system_handle_get_type") - (return-type "GType") -) - -(define-method volume_get_icon_name - (of-object "GtkFileSystem") - (c-name "gtk_file_system_volume_get_icon_name") - (return-type "gchar*") - (parameters - '("GtkFileSystemVolume*" "volume") - '("GError**" "error") - ) -) - -(define-method get_info - (of-object "GtkFileSystem") - (c-name "gtk_file_system_get_info") - (return-type "GtkFileSystemHandle*") - (parameters - '("const-GtkFilePath*" "path") - '("GtkFileInfoType" "types") - '("GtkFileSystemGetInfoCallback" "callback") - '("gpointer" "data") - ) -) - -(define-function file_system_cancel_operation - (c-name "gtk_file_system_cancel_operation") - (return-type "none") - (parameters - '("GtkFileSystemHandle*" "handle") - ) -) - -(define-method path_is_local - (of-object "GtkFileSystem") - (c-name "gtk_file_system_path_is_local") - (return-type "gboolean") - (parameters - '("const-GtkFilePath*" "path") - ) -) - -(define-method get_bookmark_label - (of-object "GtkFileSystem") - (c-name "gtk_file_system_get_bookmark_label") - (return-type "gchar*") - (parameters - '("const-GtkFilePath*" "path") - ) -) - -(define-method set_bookmark_label - (of-object "GtkFileSystem") - (c-name "gtk_file_system_set_bookmark_label") - (return-type "none") - (parameters - '("const-GtkFilePath*" "path") - '("const-gchar*" "label") - ) -) - -(define-method is_finished_loading - (of-object "GtkFileFolder") - (c-name "gtk_file_folder_is_finished_loading") - (return-type "gboolean") -) - -(define-function file_path_get_type - (c-name "gtk_file_path_get_type") - (return-type "GType") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkfixed.h - -(define-function gtk_fixed_get_type - (c-name "gtk_fixed_get_type") - (return-type "GType") -) - -(define-function gtk_fixed_new - (c-name "gtk_fixed_new") - (is-constructor-of "GtkFixed") - (return-type "GtkWidget*") -) - -(define-method put - (of-object "GtkFixed") - (c-name "gtk_fixed_put") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - '("gint" "x") - '("gint" "y") - ) -) - -(define-method move - (of-object "GtkFixed") - (c-name "gtk_fixed_move") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - '("gint" "x") - '("gint" "y") - ) -) - -(define-method set_has_window - (of-object "GtkFixed") - (c-name "gtk_fixed_set_has_window") - (return-type "none") - (parameters - '("gboolean" "has_window") - ) -) - -(define-method get_has_window - (of-object "GtkFixed") - (c-name "gtk_fixed_get_has_window") - (return-type "gboolean") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkfontbutton.h - -(define-function gtk_font_button_get_type - (c-name "gtk_font_button_get_type") - (return-type "GType") -) - -(define-function gtk_font_button_new - (c-name "gtk_font_button_new") - (is-constructor-of "GtkFontButton") - (return-type "GtkWidget*") -) - -(define-function gtk_font_button_new_with_font - (c-name "gtk_font_button_new_with_font") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "fontname") - ) - (caller-owns-return #t) -) - -(define-method get_title - (of-object "GtkFontButton") - (c-name "gtk_font_button_get_title") - (return-type "const-gchar*") -) - -(define-method set_title - (of-object "GtkFontButton") - (c-name "gtk_font_button_set_title") - (return-type "none") - (parameters - '("const-gchar*" "title") - ) -) - -(define-method get_use_font - (of-object "GtkFontButton") - (c-name "gtk_font_button_get_use_font") - (return-type "gboolean") -) - -(define-method set_use_font - (of-object "GtkFontButton") - (c-name "gtk_font_button_set_use_font") - (return-type "none") - (parameters - '("gboolean" "use_font") - ) -) - -(define-method get_use_size - (of-object "GtkFontButton") - (c-name "gtk_font_button_get_use_size") - (return-type "gboolean") -) - -(define-method set_use_size - (of-object "GtkFontButton") - (c-name "gtk_font_button_set_use_size") - (return-type "none") - (parameters - '("gboolean" "use_size") - ) -) - -(define-method get_font_name - (of-object "GtkFontButton") - (c-name "gtk_font_button_get_font_name") - (return-type "const-gchar*") -) - -(define-method set_font_name - (of-object "GtkFontButton") - (c-name "gtk_font_button_set_font_name") - (return-type "gboolean") - (parameters - '("const-gchar*" "fontname") - ) -) - -(define-method get_show_style - (of-object "GtkFontButton") - (c-name "gtk_font_button_get_show_style") - (return-type "gboolean") -) - -(define-method set_show_style - (of-object "GtkFontButton") - (c-name "gtk_font_button_set_show_style") - (return-type "none") - (parameters - '("gboolean" "show_style") - ) -) - -(define-method get_show_size - (of-object "GtkFontButton") - (c-name "gtk_font_button_get_show_size") - (return-type "gboolean") -) - -(define-method set_show_size - (of-object "GtkFontButton") - (c-name "gtk_font_button_set_show_size") - (return-type "none") - (parameters - '("gboolean" "show_size") - ) -) - -(define-virtual font_set - (of-object "GtkFontButton") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkfontsel.h - -(define-function gtk_font_selection_get_type - (c-name "gtk_font_selection_get_type") - (return-type "GType") -) - -(define-function gtk_font_selection_new - (c-name "gtk_font_selection_new") - (is-constructor-of "GtkFontSelection") - (return-type "GtkWidget*") -) - -(define-method get_font_name - (of-object "GtkFontSelection") - (c-name "gtk_font_selection_get_font_name") - (return-type "gchar*") -) - -(define-method get_font - (of-object "GtkFontSelection") - (c-name "gtk_font_selection_get_font") - (return-type "GdkFont*") - (deprecated "use GtkFontSelection.get_font_name") -) - -(define-method set_font_name - (of-object "GtkFontSelection") - (c-name "gtk_font_selection_set_font_name") - (return-type "gboolean") - (parameters - '("const-gchar*" "fontname") - ) -) - -(define-method get_preview_text - (of-object "GtkFontSelection") - (c-name "gtk_font_selection_get_preview_text") - (return-type "const-gchar*") -) - -(define-method set_preview_text - (of-object "GtkFontSelection") - (c-name "gtk_font_selection_set_preview_text") - (return-type "none") - (parameters - '("const-gchar*" "text") - ) -) - -(define-function gtk_font_selection_dialog_get_type - (c-name "gtk_font_selection_dialog_get_type") - (return-type "GType") -) - -(define-function gtk_font_selection_dialog_new - (c-name "gtk_font_selection_dialog_new") - (is-constructor-of "GtkFontSelectionDialog") - (return-type "GtkWidget*") - (properties - '("title") - ) -) - -(define-method get_font_name - (of-object "GtkFontSelectionDialog") - (c-name "gtk_font_selection_dialog_get_font_name") - (return-type "gchar*") -) - -(define-method get_font - (of-object "GtkFontSelectionDialog") - (c-name "gtk_font_selection_dialog_get_font") - (return-type "GdkFont*") - (deprecated "use GtkFontSelectionDialog.get_font_name") -) - -(define-method set_font_name - (of-object "GtkFontSelectionDialog") - (c-name "gtk_font_selection_dialog_set_font_name") - (return-type "gboolean") - (parameters - '("const-gchar*" "fontname") - ) -) - -(define-method get_preview_text - (of-object "GtkFontSelectionDialog") - (c-name "gtk_font_selection_dialog_get_preview_text") - (return-type "const-gchar*") -) - -(define-method set_preview_text - (of-object "GtkFontSelectionDialog") - (c-name "gtk_font_selection_dialog_set_preview_text") - (return-type "none") - (parameters - '("const-gchar*" "text") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkframe.h - -(define-function gtk_frame_get_type - (c-name "gtk_frame_get_type") - (return-type "GType") -) - -(define-function gtk_frame_new - (c-name "gtk_frame_new") - (is-constructor-of "GtkFrame") - (return-type "GtkWidget*") - (properties - '("label" (optional)) - ) -) - -(define-method set_label - (of-object "GtkFrame") - (c-name "gtk_frame_set_label") - (return-type "none") - (parameters - '("const-gchar*" "label" (null-ok)) - ) -) - -(define-method get_label - (of-object "GtkFrame") - (c-name "gtk_frame_get_label") - (return-type "const-gchar*") -) - -(define-method set_label_widget - (of-object "GtkFrame") - (c-name "gtk_frame_set_label_widget") - (return-type "none") - (parameters - '("GtkWidget*" "label_widget") - ) -) - -(define-method get_label_widget - (of-object "GtkFrame") - (c-name "gtk_frame_get_label_widget") - (return-type "GtkWidget*") -) - -(define-method set_label_align - (of-object "GtkFrame") - (c-name "gtk_frame_set_label_align") - (return-type "none") - (parameters - '("gfloat" "xalign") - '("gfloat" "yalign") - ) -) - -(define-method get_label_align - (of-object "GtkFrame") - (c-name "gtk_frame_get_label_align") - (return-type "none") - (parameters - '("gfloat*" "xalign") - '("gfloat*" "yalign") - ) -) - -(define-method set_shadow_type - (of-object "GtkFrame") - (c-name "gtk_frame_set_shadow_type") - (return-type "none") - (parameters - '("GtkShadowType" "type") - ) -) - -(define-method get_shadow_type - (of-object "GtkFrame") - (c-name "gtk_frame_get_shadow_type") - (return-type "GtkShadowType") -) - -(define-virtual compute_child_allocation - (of-object "GtkFrame") - (return-type "none") - (parameters - '("GtkAllocation*" "allocation") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkgamma.h - -(define-function gtk_gamma_curve_get_type - (c-name "gtk_gamma_curve_get_type") - (return-type "GType") -) - -(define-function gtk_gamma_curve_new - (c-name "gtk_gamma_curve_new") - (is-constructor-of "GtkGammaCurve") - (return-type "GtkWidget*") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkgc.h - -(define-function gc_get - (c-name "gtk_gc_get") - (return-type "GdkGC*") - (parameters - '("gint" "depth") - '("GdkColormap*" "colormap") - '("GdkGCValues*" "values") - '("GdkGCValuesMask" "values_mask") - ) -) - -(define-function gc_release - (c-name "gtk_gc_release") - (return-type "none") - (parameters - '("GdkGC*" "gc") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkhandlebox.h - -(define-function gtk_handle_box_get_type - (c-name "gtk_handle_box_get_type") - (return-type "GType") -) - -(define-function gtk_handle_box_new - (c-name "gtk_handle_box_new") - (is-constructor-of "GtkHandleBox") - (return-type "GtkWidget*") -) - -(define-method set_shadow_type - (of-object "GtkHandleBox") - (c-name "gtk_handle_box_set_shadow_type") - (return-type "none") - (parameters - '("GtkShadowType" "type") - ) -) - -(define-method get_shadow_type - (of-object "GtkHandleBox") - (c-name "gtk_handle_box_get_shadow_type") - (return-type "GtkShadowType") -) - -(define-method set_handle_position - (of-object "GtkHandleBox") - (c-name "gtk_handle_box_set_handle_position") - (return-type "none") - (parameters - '("GtkPositionType" "position") - ) -) - -(define-method get_handle_position - (of-object "GtkHandleBox") - (c-name "gtk_handle_box_get_handle_position") - (return-type "GtkPositionType") -) - -(define-method set_snap_edge - (of-object "GtkHandleBox") - (c-name "gtk_handle_box_set_snap_edge") - (return-type "none") - (parameters - '("GtkPositionType" "edge") - ) -) - -(define-method get_snap_edge - (of-object "GtkHandleBox") - (c-name "gtk_handle_box_get_snap_edge") - (return-type "GtkPositionType") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkhbbox.h - -(define-function gtk_hbutton_box_get_type - (c-name "gtk_hbutton_box_get_type") - (return-type "GType") -) - -(define-function gtk_hbutton_box_new - (c-name "gtk_hbutton_box_new") - (is-constructor-of "GtkHButtonBox") - (return-type "GtkWidget*") -) - -(define-function hbutton_box_get_spacing_default - (c-name "gtk_hbutton_box_get_spacing_default") - (return-type "gint") - (deprecated "") -) - -(define-function hbutton_box_get_layout_default - (c-name "gtk_hbutton_box_get_layout_default") - (return-type "GtkButtonBoxStyle") - (deprecated "") -) - -(define-function hbutton_box_set_spacing_default - (c-name "gtk_hbutton_box_set_spacing_default") - (return-type "none") - (parameters - '("gint" "spacing") - ) - (deprecated "") -) - -(define-function hbutton_box_set_layout_default - (c-name "gtk_hbutton_box_set_layout_default") - (return-type "none") - (parameters - '("GtkButtonBoxStyle" "layout") - ) - (deprecated "") -) - -(define-virtual child_attached - (of-object "GtkHandleBox") - (return-type "none") - (parameters - '("GtkWidget*" "child") - ) -) -(define-virtual child_detached - (of-object "GtkHandleBox") - (return-type "none") - (parameters - '("GtkWidget*" "child") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkhbox.h - -(define-function gtk_hbox_get_type - (c-name "gtk_hbox_get_type") - (return-type "GType") -) - -(define-function gtk_hbox_new - (c-name "gtk_hbox_new") - (is-constructor-of "GtkHBox") - (return-type "GtkWidget*") - (properties - '("homogeneous" (optional)) - '("spacing" (optional)) - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkhpaned.h - -(define-function gtk_hpaned_get_type - (c-name "gtk_hpaned_get_type") - (return-type "GType") -) - -(define-function gtk_hpaned_new - (c-name "gtk_hpaned_new") - (is-constructor-of "GtkHPaned") - (return-type "GtkWidget*") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkhruler.h - -(define-function gtk_hruler_get_type - (c-name "gtk_hruler_get_type") - (return-type "GType") -) - -(define-function gtk_hruler_new - (c-name "gtk_hruler_new") - (is-constructor-of "GtkHRuler") - (return-type "GtkWidget*") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkhscale.h - -(define-function gtk_hscale_get_type - (c-name "gtk_hscale_get_type") - (return-type "GType") -) - -(define-function gtk_hscale_new - (c-name "gtk_hscale_new") - (is-constructor-of "GtkHScale") - (return-type "GtkWidget*") - (properties - '("adjustment" (optional)) - ) -) - -(define-function gtk_hscale_new_with_range - (c-name "gtk_hscale_new_with_range") - (is-constructor-of "GtkHScale") - (return-type "GtkWidget*") - (parameters - '("gdouble" "min") - '("gdouble" "max") - '("gdouble" "step") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkhscrollbar.h - -(define-function gtk_hscrollbar_get_type - (c-name "gtk_hscrollbar_get_type") - (return-type "GType") -) - -(define-function gtk_hscrollbar_new - (c-name "gtk_hscrollbar_new") - (is-constructor-of "GtkHScrollbar") - (return-type "GtkWidget*") - (properties - '("adjustment" (optional)) - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkhseparator.h - -(define-function gtk_hseparator_get_type - (c-name "gtk_hseparator_get_type") - (return-type "GType") -) - -(define-function gtk_hseparator_new - (c-name "gtk_hseparator_new") - (is-constructor-of "GtkHSeparator") - (return-type "GtkWidget*") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkiconfactory.h - -(define-function gtk_icon_factory_get_type - (c-name "gtk_icon_factory_get_type") - (return-type "GType") -) - -(define-function gtk_icon_factory_new - (c-name "gtk_icon_factory_new") - (is-constructor-of "GtkIconFactory") - (return-type "GtkIconFactory*") -) - -(define-method add - (of-object "GtkIconFactory") - (c-name "gtk_icon_factory_add") - (return-type "none") - (parameters - '("const-gchar*" "stock_id") - '("GtkIconSet*" "icon_set") - ) -) - -(define-method lookup - (of-object "GtkIconFactory") - (c-name "gtk_icon_factory_lookup") - (return-type "GtkIconSet*") - (parameters - '("const-gchar*" "stock_id") - ) -) - -(define-method add_default - (of-object "GtkIconFactory") - (c-name "gtk_icon_factory_add_default") - (return-type "none") -) - -(define-method remove_default - (of-object "GtkIconFactory") - (c-name "gtk_icon_factory_remove_default") - (return-type "none") -) - -(define-function icon_factory_lookup_default - (c-name "gtk_icon_factory_lookup_default") - (return-type "GtkIconSet*") - (parameters - '("const-gchar*" "stock_id") - ) -) - -(define-function icon_size_lookup - (c-name "gtk_icon_size_lookup") - (return-type "gboolean") - (parameters - '("GtkIconSize" "size") - '("gint*" "width") - '("gint*" "height") - ) -) - -(define-function icon_size_lookup_for_settings - (c-name "gtk_icon_size_lookup_for_settings") - (return-type "gboolean") - (parameters - '("GtkSettings*" "settings") - '("GtkIconSize" "size") - '("gint*" "width") - '("gint*" "height") - ) -) - -(define-function icon_size_register - (c-name "gtk_icon_size_register") - (return-type "GtkIconSize") - (parameters - '("const-gchar*" "name") - '("gint" "width") - '("gint" "height") - ) -) - -(define-function icon_size_register_alias - (c-name "gtk_icon_size_register_alias") - (return-type "none") - (parameters - '("const-gchar*" "alias") - '("GtkIconSize" "target") - ) -) - -(define-function icon_size_from_name - (c-name "gtk_icon_size_from_name") - (return-type "GtkIconSize") - (parameters - '("const-gchar*" "name") - ) -) - -(define-function icon_size_get_name - (c-name "gtk_icon_size_get_name") - (return-type "const-gchar*") - (parameters - '("GtkIconSize" "size") - ) -) - -(define-function icon_set_get_type - (c-name "gtk_icon_set_get_type") - (return-type "GType") -) - -(define-function icon_set_new - (c-name "gtk_icon_set_new") - (return-type "GtkIconSet*") - (caller-owns-return #t) -) - -(define-function icon_set_new_from_pixbuf - (c-name "gtk_icon_set_new_from_pixbuf") - (return-type "GtkIconSet*") - (is-constructor-of "GtkIconSet") - (parameters - '("GdkPixbuf*" "pixbuf") - ) -) - -(define-method ref - (of-object "GtkIconSet") - (c-name "gtk_icon_set_ref") - (return-type "GtkIconSet*") -) - -(define-method unref - (of-object "GtkIconSet") - (c-name "gtk_icon_set_unref") - (return-type "none") -) - -(define-method copy - (of-object "GtkIconSet") - (c-name "gtk_icon_set_copy") - (return-type "GtkIconSet*") - (caller-owns-return #t) -) - -(define-method render_icon - (of-object "GtkIconSet") - (c-name "gtk_icon_set_render_icon") - (return-type "GdkPixbuf*") - (parameters - '("GtkStyle*" "style") - '("GtkTextDirection" "direction") - '("GtkStateType" "state") - '("GtkIconSize" "size") - '("GtkWidget*" "widget" (null-ok) (default "NULL")) - '("const-char*" "detail" (null-ok) (default "NULL")) - ) -) - -(define-method add_source - (of-object "GtkIconSet") - (c-name "gtk_icon_set_add_source") - (return-type "none") - (parameters - '("const-GtkIconSource*" "source") - ) -) - -(define-method get_sizes - (of-object "GtkIconSet") - (c-name "gtk_icon_set_get_sizes") - (return-type "none") - (parameters - '("GtkIconSize**" "sizes") - '("gint*" "n_sizes") - ) -) - -(define-function gtk_icon_source_get_type - (c-name "gtk_icon_source_get_type") - (return-type "GType") -) - -(define-function icon_source_new - (c-name "gtk_icon_source_new") - (is-constructor-of "GtkIconSource") - (return-type "GtkIconSource*") -) - -(define-method copy - (of-object "GtkIconSource") - (c-name "gtk_icon_source_copy") - (return-type "GtkIconSource*") - (caller-owns-return #t) -) - -(define-method free - (of-object "GtkIconSource") - (c-name "gtk_icon_source_free") - (return-type "none") -) - -(define-method set_filename - (of-object "GtkIconSource") - (c-name "gtk_icon_source_set_filename") - (return-type "none") - (parameters - '("const-gchar*" "filename") - ) -) - -(define-method set_icon_name - (of-object "GtkIconSource") - (c-name "gtk_icon_source_set_icon_name") - (return-type "none") - (parameters - '("const-gchar*" "icon_name" (null-ok)) - ) -) - -(define-method set_pixbuf - (of-object "GtkIconSource") - (c-name "gtk_icon_source_set_pixbuf") - (return-type "none") - (parameters - '("GdkPixbuf*" "pixbuf") - ) -) - -(define-method get_filename - (of-object "GtkIconSource") - (c-name "gtk_icon_source_get_filename") - (return-type "const-gchar*") -) - -(define-method get_icon_name - (of-object "GtkIconSource") - (c-name "gtk_icon_source_get_icon_name") - (return-type "const-gchar*") -) - -(define-method get_pixbuf - (of-object "GtkIconSource") - (c-name "gtk_icon_source_get_pixbuf") - (return-type "GdkPixbuf*") -) - -(define-method set_direction_wildcarded - (of-object "GtkIconSource") - (c-name "gtk_icon_source_set_direction_wildcarded") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method set_state_wildcarded - (of-object "GtkIconSource") - (c-name "gtk_icon_source_set_state_wildcarded") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method set_size_wildcarded - (of-object "GtkIconSource") - (c-name "gtk_icon_source_set_size_wildcarded") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_size_wildcarded - (of-object "GtkIconSource") - (c-name "gtk_icon_source_get_size_wildcarded") - (return-type "gboolean") -) - -(define-method get_state_wildcarded - (of-object "GtkIconSource") - (c-name "gtk_icon_source_get_state_wildcarded") - (return-type "gboolean") -) - -(define-method get_direction_wildcarded - (of-object "GtkIconSource") - (c-name "gtk_icon_source_get_direction_wildcarded") - (return-type "gboolean") -) - -(define-method set_direction - (of-object "GtkIconSource") - (c-name "gtk_icon_source_set_direction") - (return-type "none") - (parameters - '("GtkTextDirection" "direction") - ) -) - -(define-method set_state - (of-object "GtkIconSource") - (c-name "gtk_icon_source_set_state") - (return-type "none") - (parameters - '("GtkStateType" "state") - ) -) - -(define-method set_size - (of-object "GtkIconSource") - (c-name "gtk_icon_source_set_size") - (return-type "none") - (parameters - '("GtkIconSize" "size") - ) -) - -(define-method get_direction - (of-object "GtkIconSource") - (c-name "gtk_icon_source_get_direction") - (return-type "GtkTextDirection") -) - -(define-method get_state - (of-object "GtkIconSource") - (c-name "gtk_icon_source_get_state") - (return-type "GtkStateType") -) - -(define-method get_size - (of-object "GtkIconSource") - (c-name "gtk_icon_source_get_size") - (return-type "GtkIconSize") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkicontheme.h - -(define-function icon_theme_error_quark - (c-name "gtk_icon_theme_error_quark") - (return-type "GQuark") -) - -(define-function gtk_icon_theme_get_type - (c-name "gtk_icon_theme_get_type") - (return-type "GType") -) - -(define-function gtk_icon_theme_new - (c-name "gtk_icon_theme_new") - (is-constructor-of "GtkIconTheme") - (return-type "GtkIconTheme*") -) - -(define-function icon_theme_get_default - (c-name "gtk_icon_theme_get_default") - (return-type "GtkIconTheme*") -) - -(define-function icon_theme_get_for_screen - (c-name "gtk_icon_theme_get_for_screen") - (return-type "GtkIconTheme*") - (parameters - '("GdkScreen*" "screen") - ) -) - -(define-method set_screen - (of-object "GtkIconTheme") - (c-name "gtk_icon_theme_set_screen") - (return-type "none") - (parameters - '("GdkScreen*" "screen") - ) -) - -(define-method set_search_path - (of-object "GtkIconTheme") - (c-name "gtk_icon_theme_set_search_path") - (return-type "none") - (parameters - '("const-gchar*[]" "path") - '("gint" "n_elements") - ) -) - -(define-method get_search_path - (of-object "GtkIconTheme") - (c-name "gtk_icon_theme_get_search_path") - (return-type "none") - (parameters - '("gchar**[]" "path") - '("gint*" "n_elements") - ) -) - -(define-method append_search_path - (of-object "GtkIconTheme") - (c-name "gtk_icon_theme_append_search_path") - (return-type "none") - (parameters - '("const-gchar*" "path") - ) -) - -(define-method prepend_search_path - (of-object "GtkIconTheme") - (c-name "gtk_icon_theme_prepend_search_path") - (return-type "none") - (parameters - '("const-gchar*" "path") - ) -) - -(define-method set_custom_theme - (of-object "GtkIconTheme") - (c-name "gtk_icon_theme_set_custom_theme") - (return-type "none") - (parameters - '("const-gchar*" "theme_name") - ) -) - -(define-method has_icon - (of-object "GtkIconTheme") - (c-name "gtk_icon_theme_has_icon") - (return-type "gboolean") - (parameters - '("const-gchar*" "icon_name") - ) -) - -(define-method lookup_icon - (of-object "GtkIconTheme") - (c-name "gtk_icon_theme_lookup_icon") - (return-type "GtkIconInfo*") - (parameters - '("const-gchar*" "icon_name") - '("gint" "size") - '("GtkIconLookupFlags" "flags") - ) - (caller-owns-return #t) -) - -(define-method load_icon - (of-object "GtkIconTheme") - (c-name "gtk_icon_theme_load_icon") - (return-type "GdkPixbuf*") - (parameters - '("const-gchar*" "icon_name") - '("gint" "size") - '("GtkIconLookupFlags" "flags") - '("GError**" "error") - ) - (caller-owns-return #t) -) - -(define-method list_icons - (of-object "GtkIconTheme") - (c-name "gtk_icon_theme_list_icons") - (return-type "GList*") - (parameters - '("const-gchar*" "context") - ) -) - -(define-method get_example_icon_name - (of-object "GtkIconTheme") - (c-name "gtk_icon_theme_get_example_icon_name") - (return-type "char*") -) - -(define-method rescan_if_needed - (of-object "GtkIconTheme") - (c-name "gtk_icon_theme_rescan_if_needed") - (return-type "gboolean") -) - -(define-function icon_theme_add_builtin_icon - (c-name "gtk_icon_theme_add_builtin_icon") - (return-type "none") - (parameters - '("const-gchar*" "icon_name") - '("gint" "size") - '("GdkPixbuf*" "pixbuf") - ) -) - -(define-function gtk_icon_info_get_type - (c-name "gtk_icon_info_get_type") - (return-type "GType") -) - -(define-method copy - (of-object "GtkIconInfo") - (c-name "gtk_icon_info_copy") - (return-type "GtkIconInfo*") - (caller-owns-return #t) -) - -(define-method free - (of-object "GtkIconInfo") - (c-name "gtk_icon_info_free") - (return-type "none") -) - -(define-method get_base_size - (of-object "GtkIconInfo") - (c-name "gtk_icon_info_get_base_size") - (return-type "gint") -) - -(define-method get_filename - (of-object "GtkIconInfo") - (c-name "gtk_icon_info_get_filename") - (return-type "const-gchar*") -) - -(define-method get_builtin_pixbuf - (of-object "GtkIconInfo") - (c-name "gtk_icon_info_get_builtin_pixbuf") - (return-type "GdkPixbuf*") -) - -(define-method load_icon - (of-object "GtkIconInfo") - (c-name "gtk_icon_info_load_icon") - (return-type "GdkPixbuf*") - (parameters - '("GError**" "error") - ) -) - -(define-method set_raw_coordinates - (of-object "GtkIconInfo") - (c-name "gtk_icon_info_set_raw_coordinates") - (return-type "none") - (parameters - '("gboolean" "raw_coordinates") - ) -) - -(define-method get_embedded_rect - (of-object "GtkIconInfo") - (c-name "gtk_icon_info_get_embedded_rect") - (return-type "gboolean") - (parameters - '("GdkRectangle*" "rectangle") - ) -) - -(define-method get_attach_points - (of-object "GtkIconInfo") - (c-name "gtk_icon_info_get_attach_points") - (return-type "gboolean") - (parameters - '("GdkPoint**" "points") - '("gint*" "n_points") - ) -) - -(define-method get_display_name - (of-object "GtkIconInfo") - (c-name "gtk_icon_info_get_display_name") - (return-type "const-gchar*") -) - -(define-method get_icon_sizes - (of-object "GtkIconTheme") - (c-name "gtk_icon_theme_get_icon_sizes") - (return-type "gint*") - (parameters - '("const-gchar*" "icon_name") - ) -) - -(define-virtual changed - (of-object "GtkIconTheme") - (return-type "none") -) - -;; From /opt/gnome-2.10/include/gtk-2.0/gtk/gtkiconview.h - -(define-function gtk_icon_view_get_type - (c-name "gtk_icon_view_get_type") - (return-type "GType") -) - -(define-function gtk_icon_view_new - (c-name "gtk_icon_view_new") - (is-constructor-of "GtkIconView") - (return-type "GtkWidget*") -) - -(define-function gtk_icon_view_new_with_model - (c-name "gtk_icon_view_new_with_model") - (return-type "GtkWidget*") - (parameters - '("GtkTreeModel*" "model") - ) - (caller-owns-return #t) -) - -(define-method set_model - (of-object "GtkIconView") - (c-name "gtk_icon_view_set_model") - (return-type "none") - (parameters - '("GtkTreeModel*" "model" (null-ok) (default "NULL")) - ) -) - -(define-method get_model - (of-object "GtkIconView") - (c-name "gtk_icon_view_get_model") - (return-type "GtkTreeModel*") -) - -(define-method set_text_column - (of-object "GtkIconView") - (c-name "gtk_icon_view_set_text_column") - (return-type "none") - (parameters - '("gint" "column") - ) -) - -(define-method get_text_column - (of-object "GtkIconView") - (c-name "gtk_icon_view_get_text_column") - (return-type "gint") -) - -(define-method set_markup_column - (of-object "GtkIconView") - (c-name "gtk_icon_view_set_markup_column") - (return-type "none") - (parameters - '("gint" "column") - ) -) - -(define-method get_markup_column - (of-object "GtkIconView") - (c-name "gtk_icon_view_get_markup_column") - (return-type "gint") -) - -(define-method set_pixbuf_column - (of-object "GtkIconView") - (c-name "gtk_icon_view_set_pixbuf_column") - (return-type "none") - (parameters - '("gint" "column") - ) -) - -(define-method get_pixbuf_column - (of-object "GtkIconView") - (c-name "gtk_icon_view_get_pixbuf_column") - (return-type "gint") -) - -(define-method set_orientation - (of-object "GtkIconView") - (c-name "gtk_icon_view_set_orientation") - (return-type "none") - (parameters - '("GtkOrientation" "orientation") - ) -) - -(define-method get_orientation - (of-object "GtkIconView") - (c-name "gtk_icon_view_get_orientation") - (return-type "GtkOrientation") -) - -(define-method set_columns - (of-object "GtkIconView") - (c-name "gtk_icon_view_set_columns") - (return-type "none") - (parameters - '("gint" "columns") - ) -) - -(define-method get_columns - (of-object "GtkIconView") - (c-name "gtk_icon_view_get_columns") - (return-type "gint") -) - -(define-method set_item_width - (of-object "GtkIconView") - (c-name "gtk_icon_view_set_item_width") - (return-type "none") - (parameters - '("gint" "item_width") - ) -) - -(define-method get_item_width - (of-object "GtkIconView") - (c-name "gtk_icon_view_get_item_width") - (return-type "gint") -) - -(define-method set_spacing - (of-object "GtkIconView") - (c-name "gtk_icon_view_set_spacing") - (return-type "none") - (parameters - '("gint" "spacing") - ) -) - -(define-method get_spacing - (of-object "GtkIconView") - (c-name "gtk_icon_view_get_spacing") - (return-type "gint") -) - -(define-method set_row_spacing - (of-object "GtkIconView") - (c-name "gtk_icon_view_set_row_spacing") - (return-type "none") - (parameters - '("gint" "row_spacing") - ) -) - -(define-method get_row_spacing - (of-object "GtkIconView") - (c-name "gtk_icon_view_get_row_spacing") - (return-type "gint") -) - -(define-method set_column_spacing - (of-object "GtkIconView") - (c-name "gtk_icon_view_set_column_spacing") - (return-type "none") - (parameters - '("gint" "column_spacing") - ) -) - -(define-method get_column_spacing - (of-object "GtkIconView") - (c-name "gtk_icon_view_get_column_spacing") - (return-type "gint") -) - -(define-method set_margin - (of-object "GtkIconView") - (c-name "gtk_icon_view_set_margin") - (return-type "none") - (parameters - '("gint" "margin") - ) -) - -(define-method get_margin - (of-object "GtkIconView") - (c-name "gtk_icon_view_get_margin") - (return-type "gint") -) - -(define-method get_path_at_pos - (of-object "GtkIconView") - (c-name "gtk_icon_view_get_path_at_pos") - (return-type "GtkTreePath*") - (parameters - '("gint" "x") - '("gint" "y") - ) -) - -(define-method get_item_at_pos - (of-object "GtkIconView") - (c-name "gtk_icon_view_get_item_at_pos") - (return-type "gboolean") - (parameters - '("gint" "x") - '("gint" "y") - '("GtkTreePath**" "path") - '("GtkCellRenderer**" "cell") - ) -) - -(define-method get_visible_range - (of-object "GtkIconView") - (c-name "gtk_icon_view_get_visible_range") - (return-type "gboolean") - (parameters - '("GtkTreePath**" "start_path") - '("GtkTreePath**" "end_path") - ) -) - -(define-method selected_foreach - (of-object "GtkIconView") - (c-name "gtk_icon_view_selected_foreach") - (return-type "none") - (parameters - '("GtkIconViewForeachFunc" "func") - '("gpointer" "data") - ) -) - -(define-method set_selection_mode - (of-object "GtkIconView") - (c-name "gtk_icon_view_set_selection_mode") - (return-type "none") - (parameters - '("GtkSelectionMode" "mode") - ) -) - -(define-method get_selection_mode - (of-object "GtkIconView") - (c-name "gtk_icon_view_get_selection_mode") - (return-type "GtkSelectionMode") -) - -(define-method select_path - (of-object "GtkIconView") - (c-name "gtk_icon_view_select_path") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - ) -) - -(define-method unselect_path - (of-object "GtkIconView") - (c-name "gtk_icon_view_unselect_path") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - ) -) - -(define-method path_is_selected - (of-object "GtkIconView") - (c-name "gtk_icon_view_path_is_selected") - (return-type "gboolean") - (parameters - '("GtkTreePath*" "path") - ) -) - -(define-method get_selected_items - (of-object "GtkIconView") - (c-name "gtk_icon_view_get_selected_items") - (return-type "GList*") -) - -(define-method select_all - (of-object "GtkIconView") - (c-name "gtk_icon_view_select_all") - (return-type "none") -) - -(define-method unselect_all - (of-object "GtkIconView") - (c-name "gtk_icon_view_unselect_all") - (return-type "none") -) - -(define-method item_activated - (of-object "GtkIconView") - (c-name "gtk_icon_view_item_activated") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - ) -) - -(define-virtual set_scroll_adjustments - (of-object "GtkIconView") - (return-type "none") - (parameters - '("GtkAdjustment*" "hadjustment") - '("GtkAdjustment*" "vadjustment") - ) -) -(define-virtual item_activated - (of-object "GtkIconView") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - ) -) -(define-virtual selection_changed - (of-object "GtkIconView") - (return-type "none") -) -(define-virtual select_all - (of-object "GtkIconView") - (return-type "none") -) -(define-virtual unselect_all - (of-object "GtkIconView") - (return-type "none") -) -(define-virtual select_cursor_item - (of-object "GtkIconView") - (return-type "none") -) -(define-virtual toggle_cursor_item - (of-object "GtkIconView") - (return-type "none") -) -(define-virtual move_cursor - (of-object "GtkIconView") - (return-type "gboolean") - (parameters - '("GtkMovementStep" "step") - '("gint" "count") - ) -) -(define-virtual activate_cursor_item - (of-object "GtkIconView") - (return-type "gboolean") -) - -(define-method set_cursor - (of-object "GtkIconView") - (c-name "gtk_icon_view_set_cursor") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - '("GtkCellRenderer*" "cell" (null-ok) (default "NULL")) - '("gboolean" "start_editing" (default "FALSE")) - ) -) - -(define-method get_cursor - (of-object "GtkIconView") - (c-name "gtk_icon_view_get_cursor") - (return-type "gboolean") - (parameters - '("GtkTreePath**" "path") - '("GtkCellRenderer**" "cell") - ) -) - -(define-method scroll_to_path - (of-object "GtkIconView") - (c-name "gtk_icon_view_scroll_to_path") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - '("gboolean" "use_align") - '("gfloat" "row_align") - '("gfloat" "col_align") - ) -) - -(define-method enable_model_drag_source - (of-object "GtkIconView") - (c-name "gtk_icon_view_enable_model_drag_source") - (return-type "none") - (parameters - '("GdkModifierType" "start_button_mask") - '("const-GtkTargetEntry*" "targets") - '("gint" "n_targets") - '("GdkDragAction" "actions") - ) -) - -(define-method enable_model_drag_dest - (of-object "GtkIconView") - (c-name "gtk_icon_view_enable_model_drag_dest") - (return-type "none") - (parameters - '("const-GtkTargetEntry*" "targets") - '("gint" "n_targets") - '("GdkDragAction" "actions") - ) -) - -(define-method unset_model_drag_source - (of-object "GtkIconView") - (c-name "gtk_icon_view_unset_model_drag_source") - (return-type "none") -) - -(define-method unset_model_drag_dest - (of-object "GtkIconView") - (c-name "gtk_icon_view_unset_model_drag_dest") - (return-type "none") -) - -(define-method set_reorderable - (of-object "GtkIconView") - (c-name "gtk_icon_view_set_reorderable") - (return-type "none") - (parameters - '("gboolean" "reorderable") - ) -) - -(define-method get_reorderable - (of-object "GtkIconView") - (c-name "gtk_icon_view_get_reorderable") - (return-type "gboolean") -) - -(define-method set_drag_dest_item - (of-object "GtkIconView") - (c-name "gtk_icon_view_set_drag_dest_item") - (return-type "none") - (parameters - '("GtkTreePath*" "path" (null-ok)) - '("GtkIconViewDropPosition" "pos") - ) -) - -(define-method get_drag_dest_item - (of-object "GtkIconView") - (c-name "gtk_icon_view_get_drag_dest_item") - (return-type "none") - (parameters - '("GtkTreePath**" "path") - '("GtkIconViewDropPosition*" "pos") - ) -) - -(define-method get_dest_item_at_pos - (of-object "GtkIconView") - (c-name "gtk_icon_view_get_dest_item_at_pos") - (return-type "gboolean") - (parameters - '("gint" "drag_x") - '("gint" "drag_y") - '("GtkTreePath**" "path") - '("GtkIconViewDropPosition*" "pos") - ) -) - -(define-method create_drag_icon - (of-object "GtkIconView") - (c-name "gtk_icon_view_create_drag_icon") - (return-type "GdkPixmap*") - (parameters - '("GtkTreePath*" "path") - ) -) - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkimage.h - -(define-function gtk_image_get_type - (c-name "gtk_image_get_type") - (return-type "GType") -) - -(define-function gtk_image_new - (c-name "gtk_image_new") - (is-constructor-of "GtkImage") - (return-type "GtkWidget*") -) - -(define-function image_new_from_pixmap - (c-name "gtk_image_new_from_pixmap") - (is-constructor-of "GtkImage") - (return-type "GtkWidget*") - (parameters - '("GdkPixmap*" "pixmap") - '("GdkBitmap*" "mask") - ) -) - -(define-function image_new_from_image - (c-name "gtk_image_new_from_image") - (is-constructor-of "GtkImage") - (return-type "GtkWidget*") - (parameters - '("GdkImage*" "image") - '("GdkBitmap*" "mask") - ) -) - -(define-function image_new_from_file - (c-name "gtk_image_new_from_file") - (is-constructor-of "GtkImage") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "filename") - ) -) - -(define-function image_new_from_pixbuf - (c-name "gtk_image_new_from_pixbuf") - (is-constructor-of "GtkImage") - (return-type "GtkWidget*") - (parameters - '("GdkPixbuf*" "pixbuf") - ) -) - -(define-function image_new_from_stock - (c-name "gtk_image_new_from_stock") - (return-type "GtkWidget*") - (caller-owns-return #t) - (parameters - '("const-gchar*" "stock_id") - '("GtkIconSize" "size") - ) -) - -(define-function image_new_from_icon_set - (c-name "gtk_image_new_from_icon_set") - (return-type "GtkWidget*") - (caller-owns-return #t) - (parameters - '("GtkIconSet*" "icon_set") - '("GtkIconSize" "size") - ) -) - -(define-function image_new_from_animation - (c-name "gtk_image_new_from_animation") - (return-type "GtkWidget*") - (caller-owns-return #t) - (parameters - '("GdkPixbufAnimation*" "animation") - ) -) - -(define-method clear - (of-object "GtkImage") - (c-name "gtk_image_clear") - (return-type "none") -) - -(define-method set_from_pixmap - (of-object "GtkImage") - (c-name "gtk_image_set_from_pixmap") - (return-type "none") - (parameters - '("GdkPixmap*" "pixmap") - '("GdkBitmap*" "mask" (null-ok)) - ) -) - -(define-method set_from_image - (of-object "GtkImage") - (c-name "gtk_image_set_from_image") - (return-type "none") - (parameters - '("GdkImage*" "gdk_image" (null-ok)) - '("GdkBitmap*" "mask" (null-ok)) - ) -) - -(define-method set_from_file - (of-object "GtkImage") - (c-name "gtk_image_set_from_file") - (return-type "none") - (parameters - '("const-gchar*" "filename" (null-ok)) - ) -) - -(define-method set_from_pixbuf - (of-object "GtkImage") - (c-name "gtk_image_set_from_pixbuf") - (return-type "none") - (parameters - '("GdkPixbuf*" "pixbuf" (null-ok)) - ) -) - -(define-method set_from_stock - (of-object "GtkImage") - (c-name "gtk_image_set_from_stock") - (return-type "none") - (parameters - '("const-gchar*" "stock_id") - '("GtkIconSize" "size") - ) -) - -(define-method set_from_icon_set - (of-object "GtkImage") - (c-name "gtk_image_set_from_icon_set") - (return-type "none") - (parameters - '("GtkIconSet*" "icon_set") - '("GtkIconSize" "size") - ) -) - -(define-method set_from_animation - (of-object "GtkImage") - (c-name "gtk_image_set_from_animation") - (return-type "none") - (parameters - '("GdkPixbufAnimation*" "animation") - ) -) - -(define-method get_storage_type - (of-object "GtkImage") - (c-name "gtk_image_get_storage_type") - (return-type "GtkImageType") -) - -(define-method get_pixmap - (of-object "GtkImage") - (c-name "gtk_image_get_pixmap") - (return-type "none") - (parameters - '("GdkPixmap**" "pixmap") - '("GdkBitmap**" "mask") - ) -) - -(define-method get_image - (of-object "GtkImage") - (c-name "gtk_image_get_image") - (return-type "none") - (parameters - '("GdkImage**" "gdk_image") - '("GdkBitmap**" "mask") - ) -) - -(define-method get_pixbuf - (of-object "GtkImage") - (c-name "gtk_image_get_pixbuf") - (return-type "GdkPixbuf*") -) - -(define-method get_stock - (of-object "GtkImage") - (c-name "gtk_image_get_stock") - (return-type "none") - (parameters - '("gchar**" "stock_id") - '("GtkIconSize*" "size") - ) -) - -(define-method get_icon_set - (of-object "GtkImage") - (c-name "gtk_image_get_icon_set") - (return-type "none") - (parameters - '("GtkIconSet**" "icon_set") - '("GtkIconSize*" "size") - ) -) - -(define-method get_animation - (of-object "GtkImage") - (c-name "gtk_image_get_animation") - (return-type "GdkPixbufAnimation*") -) - -(define-method set - (of-object "GtkImage") - (c-name "gtk_image_set") - (return-type "none") - (parameters - '("GdkImage*" "val") - '("GdkBitmap*" "mask") - ) - (deprecated "") -) - -(define-method get - (of-object "GtkImage") - (c-name "gtk_image_get") - (return-type "none") - (parameters - '("GdkImage**" "val") - '("GdkBitmap**" "mask") - ) - (deprecated "") -) - -(define-function image_new_from_icon_name - (c-name "gtk_image_new_from_icon_name") - (return-type "GtkWidget*") - (caller-owns-return #t) - (parameters - '("const-gchar*" "icon_name") - '("GtkIconSize" "size") - ) -) - - -(define-method set_from_icon_name - (of-object "GtkImage") - (c-name "gtk_image_set_from_icon_name") - (return-type "none") - (parameters - '("const-gchar*" "icon_name") - '("GtkIconSize" "size") - ) -) - -(define-method set_pixel_size - (of-object "GtkImage") - (c-name "gtk_image_set_pixel_size") - (return-type "none") - (parameters - '("gint" "pixel_size") - ) -) - -(define-method get_icon_name - (of-object "GtkImage") - (c-name "gtk_image_get_icon_name") - (return-type "none") - (parameters - '("const-gchar**" "icon_name") - '("GtkIconSize*" "size") - ) -) - -(define-method get_pixel_size - (of-object "GtkImage") - (c-name "gtk_image_get_pixel_size") - (return-type "gint") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkimagemenuitem.h - -(define-function gtk_image_menu_item_get_type - (c-name "gtk_image_menu_item_get_type") - (return-type "GType") -) - -(define-function gtk_image_menu_item_new - (c-name "gtk_image_menu_item_new") - (is-constructor-of "GtkImageMenuItem") - (return-type "GtkWidget*") -) - -(define-function gtk_image_menu_item_new_with_label - (c-name "gtk_image_menu_item_new_with_label") - (is-constructor-of "GtkImageMenuItem") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "label") - ) -) - -(define-function gtk_image_menu_item_new_with_mnemonic - (c-name "gtk_image_menu_item_new_with_mnemonic") - (is-constructor-of "GtkImageMenuItem") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "label") - ) -) - -(define-function gtk_image_menu_item_new_from_stock - (c-name "gtk_image_menu_item_new_from_stock") - (is-constructor-of "GtkImageMenuItem") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "stock_id") - '("GtkAccelGroup*" "accel_group") - ) -) - -(define-method set_image - (of-object "GtkImageMenuItem") - (c-name "gtk_image_menu_item_set_image") - (return-type "none") - (parameters - '("GtkWidget*" "image" (null-ok)) - ) -) - -(define-method get_image - (of-object "GtkImageMenuItem") - (c-name "gtk_image_menu_item_get_image") - (return-type "GtkWidget*") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkimcontext.h - -(define-function gtk_im_context_get_type - (c-name "gtk_im_context_get_type") - (return-type "GType") -) - -(define-method set_client_window - (of-object "GtkIMContext") - (c-name "gtk_im_context_set_client_window") - (return-type "none") - (parameters - '("GdkWindow*" "window") - ) -) - -(define-method get_preedit_string - (of-object "GtkIMContext") - (c-name "gtk_im_context_get_preedit_string") - (return-type "none") - (parameters - '("gchar**" "str") - '("PangoAttrList**" "attrs") - '("gint*" "cursor_pos") - ) -) - -(define-method filter_keypress - (of-object "GtkIMContext") - (c-name "gtk_im_context_filter_keypress") - (return-type "gboolean") - (parameters - '("GdkEventKey*" "event") - ) -) - -(define-method focus_in - (of-object "GtkIMContext") - (c-name "gtk_im_context_focus_in") - (return-type "none") -) - -(define-method focus_out - (of-object "GtkIMContext") - (c-name "gtk_im_context_focus_out") - (return-type "none") -) - -(define-method reset - (of-object "GtkIMContext") - (c-name "gtk_im_context_reset") - (return-type "none") -) - -(define-method set_cursor_location - (of-object "GtkIMContext") - (c-name "gtk_im_context_set_cursor_location") - (return-type "none") - (parameters - '("GdkRectangle*" "area") - ) -) - -(define-method set_use_preedit - (of-object "GtkIMContext") - (c-name "gtk_im_context_set_use_preedit") - (return-type "none") - (parameters - '("gboolean" "use_preedit") - ) -) - -(define-method set_surrounding - (of-object "GtkIMContext") - (c-name "gtk_im_context_set_surrounding") - (return-type "none") - (parameters - '("const-gchar*" "text") - '("gint" "len") - '("gint" "cursor_index") - ) -) - -(define-method get_surrounding - (of-object "GtkIMContext") - (c-name "gtk_im_context_get_surrounding") - (return-type "gboolean") - (parameters - '("gchar**" "text") - '("gint*" "cursor_index") - ) -) - -(define-method delete_surrounding - (of-object "GtkIMContext") - (c-name "gtk_im_context_delete_surrounding") - (return-type "gboolean") - (parameters - '("gint" "offset") - '("gint" "n_chars") - ) -) - -(define-virtual preedit_start - (of-object "GtkIMContext") - (return-type "none") -) -(define-virtual preedit_end - (of-object "GtkIMContext") - (return-type "none") -) -(define-virtual preedit_changed - (of-object "GtkIMContext") - (return-type "none") -) -(define-virtual commit - (of-object "GtkIMContext") - (return-type "none") - (parameters - '("const-gchar*" "str") - ) -) -(define-virtual retrieve_surrounding - (of-object "GtkIMContext") - (return-type "gboolean") -) -(define-virtual delete_surrounding - (of-object "GtkIMContext") - (return-type "gboolean") - (parameters - '("gint" "offset") - '("gint" "n_chars") - ) -) -(define-virtual set_client_window - (of-object "GtkIMContext") - (return-type "none") - (parameters - '("GdkWindow*" "window") - ) -) -(define-virtual get_preedit_string - (of-object "GtkIMContext") - (return-type "none") - (parameters - '("gchar**" "str") - '("PangoAttrList**" "attrs") - '("gint*" "cursor_pos") - ) -) -(define-virtual filter_keypress - (of-object "GtkIMContext") - (return-type "gboolean") - (parameters - '("GdkEventKey*" "event") - ) -) -(define-virtual focus_in - (of-object "GtkIMContext") - (return-type "none") -) -(define-virtual focus_out - (of-object "GtkIMContext") - (return-type "none") -) -(define-virtual reset - (of-object "GtkIMContext") - (return-type "none") -) -(define-virtual set_cursor_location - (of-object "GtkIMContext") - (return-type "none") - (parameters - '("GdkRectangle*" "area") - ) -) -(define-virtual set_use_preedit - (of-object "GtkIMContext") - (return-type "none") - (parameters - '("gboolean" "use_preedit") - ) -) -(define-virtual set_surrounding - (of-object "GtkIMContext") - (return-type "none") - (parameters - '("const-gchar*" "text") - '("gint" "len") - '("gint" "cursor_index") - ) -) -(define-virtual get_surrounding - (of-object "GtkIMContext") - (return-type "gboolean") - (parameters - '("gchar**" "text") - '("gint*" "cursor_index") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkimcontextsimple.h - -(define-function gtk_im_context_simple_get_type - (c-name "gtk_im_context_simple_get_type") - (return-type "GType") -) - -(define-function gtk_im_context_simple_new - (c-name "gtk_im_context_simple_new") - (is-constructor-of "GtkIMContextSimple") - (return-type "GtkIMContext*") -) - -(define-method add_table - (of-object "GtkIMContextSimple") - (c-name "gtk_im_context_simple_add_table") - (return-type "none") - (parameters - '("guint16*" "data") - '("gint" "max_seq_len") - '("gint" "n_seqs") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkimmodule.h - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkimmulticontext.h - -(define-function gtk_im_multicontext_get_type - (c-name "gtk_im_multicontext_get_type") - (return-type "GType") -) - -(define-function gtk_im_multicontext_new - (c-name "gtk_im_multicontext_new") - (is-constructor-of "GtkIMMulticontext") - (return-type "GtkIMContext*") -) - -(define-method append_menuitems - (of-object "GtkIMMulticontext") - (c-name "gtk_im_multicontext_append_menuitems") - (return-type "none") - (parameters - '("GtkMenuShell*" "menushell") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkinputdialog.h - -(define-function gtk_input_dialog_get_type - (c-name "gtk_input_dialog_get_type") - (return-type "GType") -) - -(define-function gtk_input_dialog_new - (c-name "gtk_input_dialog_new") - (is-constructor-of "GtkInputDialog") - (return-type "GtkWidget*") -) - -(define-virtual enable_device - (of-object "GtkInputDialog") - (return-type "none") - (parameters - '("GdkDevice*" "device") - ) -) -(define-virtual disable_device - (of-object "GtkInputDialog") - (return-type "none") - (parameters - '("GdkDevice*" "device") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkinvisible.h - -(define-function gtk_invisible_get_type - (c-name "gtk_invisible_get_type") - (return-type "GType") -) - -(define-function gtk_invisible_new - (c-name "gtk_invisible_new") - (is-constructor-of "GtkInvisible") - (return-type "GtkWidget*") -) - -(define-function gtk_invisible_new_for_screen - (c-name "gtk_invisible_new_for_screen") - (is-constructor-of "GtkInvisible") - (return-type "GtkWidget*") - (parameters - '("GdkScreen*" "screen") - ) -) - -(define-method set_screen - (of-object "GtkInvisible") - (c-name "gtk_invisible_set_screen") - (return-type "none") - (parameters - '("GdkScreen*" "screen") - ) -) - -(define-method get_screen - (of-object "GtkInvisible") - (c-name "gtk_invisible_get_screen") - (return-type "GdkScreen*") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkitem.h - -(define-function gtk_item_get_type - (c-name "gtk_item_get_type") - (return-type "GType") -) - -(define-method select - (of-object "GtkItem") - (c-name "gtk_item_select") - (return-type "none") -) - -(define-method deselect - (of-object "GtkItem") - (c-name "gtk_item_deselect") - (return-type "none") -) - -(define-method toggle - (of-object "GtkItem") - (c-name "gtk_item_toggle") - (return-type "none") -) - -(define-virtual select - (of-object "GtkItem") - (return-type "none") -) -(define-virtual deselect - (of-object "GtkItem") - (return-type "none") -) -(define-virtual toggle - (of-object "GtkItem") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkitemfactory.h - -(define-function gtk_item_factory_get_type - (c-name "gtk_item_factory_get_type") - (return-type "GType") -) - -(define-function gtk_item_factory_new - (c-name "gtk_item_factory_new") - (is-constructor-of "GtkItemFactory") - (return-type "GtkItemFactory*") - (parameters - '("GType" "container_type") - '("const-gchar*" "path") - '("GtkAccelGroup*" "accel_group" (null-ok) (default "NULL")) - ) - (deprecated "use gtk.UIManager") -) - -(define-method construct - (of-object "GtkItemFactory") - (c-name "gtk_item_factory_construct") - (return-type "none") - (parameters - '("GType" "container_type") - '("const-gchar*" "path") - '("GtkAccelGroup*" "accel_group") - ) -) - -(define-function item_factory_add_foreign - (c-name "gtk_item_factory_add_foreign") - (return-type "none") - (parameters - '("GtkWidget*" "accel_widget") - '("const-gchar*" "full_path") - '("GtkAccelGroup*" "accel_group") - '("guint" "keyval") - '("GdkModifierType" "modifiers") - ) -) - -(define-function item_factory_from_widget - (c-name "gtk_item_factory_from_widget") - (return-type "GtkItemFactory*") - (parameters - '("GtkWidget*" "widget") - ) -) - -(define-function item_factory_path_from_widget - (c-name "gtk_item_factory_path_from_widget") - (return-type "const-gchar*") - (parameters - '("GtkWidget*" "widget") - ) -) - -(define-method get_item - (of-object "GtkItemFactory") - (c-name "gtk_item_factory_get_item") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "path") - ) -) - -(define-method get_widget - (of-object "GtkItemFactory") - (c-name "gtk_item_factory_get_widget") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "path") - ) -) - -(define-method get_widget_by_action - (of-object "GtkItemFactory") - (c-name "gtk_item_factory_get_widget_by_action") - (return-type "GtkWidget*") - (parameters - '("guint" "action") - ) -) - -(define-method get_item_by_action - (of-object "GtkItemFactory") - (c-name "gtk_item_factory_get_item_by_action") - (return-type "GtkWidget*") - (parameters - '("guint" "action") - ) -) - -(define-method create_item - (of-object "GtkItemFactory") - (c-name "gtk_item_factory_create_item") - (return-type "none") - (parameters - '("GtkItemFactoryEntry*" "entry") - '("gpointer" "callback_data") - '("guint" "callback_type") - ) -) - -(define-method create_items - (of-object "GtkItemFactory") - (c-name "gtk_item_factory_create_items") - (return-type "none") - (parameters - '("guint" "n_entries") - '("GtkItemFactoryEntry*" "entries") - '("gpointer" "callback_data") - ) -) - -(define-method delete_item - (of-object "GtkItemFactory") - (c-name "gtk_item_factory_delete_item") - (return-type "none") - (parameters - '("const-gchar*" "path") - ) -) - -(define-method delete_entry - (of-object "GtkItemFactory") - (c-name "gtk_item_factory_delete_entry") - (return-type "none") - (parameters - '("GtkItemFactoryEntry*" "entry") - ) -) - -(define-method delete_entries - (of-object "GtkItemFactory") - (c-name "gtk_item_factory_delete_entries") - (return-type "none") - (parameters - '("guint" "n_entries") - '("GtkItemFactoryEntry*" "entries") - ) -) - -(define-method popup - (of-object "GtkItemFactory") - (c-name "gtk_item_factory_popup") - (return-type "none") - (parameters - '("guint" "x") - '("guint" "y") - '("guint" "mouse_button") - '("guint32" "time" (default "GDK_CURRENT_TIME")) - ) -) - -(define-method popup_with_data - (of-object "GtkItemFactory") - (c-name "gtk_item_factory_popup_with_data") - (return-type "none") - (parameters - '("gpointer" "popup_data") - '("GtkDestroyNotify" "destroy") - '("guint" "x") - '("guint" "y") - '("guint" "mouse_button") - '("guint32" "time" (default "GDK_CURRENT_TIME")) - ) -) - -(define-method popup_data - (of-object "GtkItemFactory") - (c-name "gtk_item_factory_popup_data") - (return-type "gpointer") -) - -(define-function item_factory_popup_data_from_widget - (c-name "gtk_item_factory_popup_data_from_widget") - (return-type "gpointer") - (parameters - '("GtkWidget*" "widget") - ) -) - -(define-method set_translate_func - (of-object "GtkItemFactory") - (c-name "gtk_item_factory_set_translate_func") - (return-type "none") - (parameters - '("GtkTranslateFunc" "func") - '("gpointer" "data") - '("GtkDestroyNotify" "notify") - ) -) - -(define-function item_factory_from_path - (c-name "gtk_item_factory_from_path") - (return-type "GtkItemFactory*") - (parameters - '("const-gchar*" "path") - ) - (deprecated "") -) - -(define-function item_factory_create_menu_entries - (c-name "gtk_item_factory_create_menu_entries") - (return-type "none") - (parameters - '("guint" "n_entries") - '("GtkMenuEntry*" "entries") - ) - (deprecated "") -) - -(define-function item_factories_path_delete - (c-name "gtk_item_factories_path_delete") - (return-type "none") - (parameters - '("const-gchar*" "ifactory_path") - '("const-gchar*" "path") - ) - (deprecated "") -) - -(define-method create_items_ac - (of-object "GtkItemFactory") - (c-name "gtk_item_factory_create_items_ac") - (return-type "none") - (parameters - '("guint" "n_entries") - '("GtkItemFactoryEntry*" "entries") - '("gpointer" "callback_data") - '("guint" "callback_type") - ) - (deprecated "") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtklabel.h - -(define-function gtk_label_get_type - (c-name "gtk_label_get_type") - (return-type "GType") -) - -(define-function gtk_label_new - (c-name "gtk_label_new") - (is-constructor-of "GtkLabel") - (return-type "GtkWidget*") - (properties - '("label" (argname "str") (optional)) - ) -) - -(define-function gtk_label_new_with_mnemonic - (c-name "gtk_label_new_with_mnemonic") - (is-constructor-of "GtkLabel") - (return-type "GtkWidget*") - (properties - '("label" (argname "str") (optional)) - ) -) - -(define-method set_text - (of-object "GtkLabel") - (c-name "gtk_label_set_text") - (return-type "none") - (parameters - '("const-char*" "str") - ) -) - -(define-method get_text - (of-object "GtkLabel") - (c-name "gtk_label_get_text") - (return-type "const-gchar*") -) - -(define-method set_attributes - (of-object "GtkLabel") - (c-name "gtk_label_set_attributes") - (return-type "none") - (parameters - '("PangoAttrList*" "attrs") - ) -) - -(define-method get_attributes - (of-object "GtkLabel") - (c-name "gtk_label_get_attributes") - (return-type "PangoAttrList*") -) - -(define-method set_label - (of-object "GtkLabel") - (c-name "gtk_label_set_label") - (return-type "none") - (parameters - '("const-gchar*" "str") - ) -) - -(define-method get_label - (of-object "GtkLabel") - (c-name "gtk_label_get_label") - (return-type "const-gchar*") -) - -(define-method set_markup - (of-object "GtkLabel") - (c-name "gtk_label_set_markup") - (return-type "none") - (parameters - '("const-gchar*" "str") - ) -) - -(define-method set_use_markup - (of-object "GtkLabel") - (c-name "gtk_label_set_use_markup") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_use_markup - (of-object "GtkLabel") - (c-name "gtk_label_get_use_markup") - (return-type "gboolean") -) - -(define-method set_use_underline - (of-object "GtkLabel") - (c-name "gtk_label_set_use_underline") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_use_underline - (of-object "GtkLabel") - (c-name "gtk_label_get_use_underline") - (return-type "gboolean") -) - -(define-method set_markup_with_mnemonic - (of-object "GtkLabel") - (c-name "gtk_label_set_markup_with_mnemonic") - (return-type "none") - (parameters - '("const-gchar*" "str") - ) -) - -(define-method get_mnemonic_keyval - (of-object "GtkLabel") - (c-name "gtk_label_get_mnemonic_keyval") - (return-type "guint") -) - -(define-method set_mnemonic_widget - (of-object "GtkLabel") - (c-name "gtk_label_set_mnemonic_widget") - (return-type "none") - (parameters - '("GtkWidget*" "widget" (null-ok)) - ) -) - -(define-method get_mnemonic_widget - (of-object "GtkLabel") - (c-name "gtk_label_get_mnemonic_widget") - (return-type "GtkWidget*") -) - -(define-method set_text_with_mnemonic - (of-object "GtkLabel") - (c-name "gtk_label_set_text_with_mnemonic") - (return-type "none") - (parameters - '("const-gchar*" "str") - ) -) - -(define-method set_justify - (of-object "GtkLabel") - (c-name "gtk_label_set_justify") - (return-type "none") - (parameters - '("GtkJustification" "jtype") - ) -) - -(define-method get_justify - (of-object "GtkLabel") - (c-name "gtk_label_get_justify") - (return-type "GtkJustification") -) - -(define-method set_pattern - (of-object "GtkLabel") - (c-name "gtk_label_set_pattern") - (return-type "none") - (parameters - '("const-gchar*" "pattern") - ) -) - -(define-method set_line_wrap - (of-object "GtkLabel") - (c-name "gtk_label_set_line_wrap") - (return-type "none") - (parameters - '("gboolean" "wrap") - ) -) - -(define-method get_line_wrap - (of-object "GtkLabel") - (c-name "gtk_label_get_line_wrap") - (return-type "gboolean") -) - -(define-method set_selectable - (of-object "GtkLabel") - (c-name "gtk_label_set_selectable") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_selectable - (of-object "GtkLabel") - (c-name "gtk_label_get_selectable") - (return-type "gboolean") -) - -(define-method select_region - (of-object "GtkLabel") - (c-name "gtk_label_select_region") - (return-type "none") - (parameters - '("gint" "start_offset") - '("gint" "end_offset") - ) -) - -(define-method get_selection_bounds - (of-object "GtkLabel") - (c-name "gtk_label_get_selection_bounds") - (return-type "gboolean") - (parameters - '("gint*" "start") - '("gint*" "end") - ) -) - -(define-method get_layout - (of-object "GtkLabel") - (c-name "gtk_label_get_layout") - (return-type "PangoLayout*") -) - -(define-method get_layout_offsets - (of-object "GtkLabel") - (c-name "gtk_label_get_layout_offsets") - (return-type "none") - (parameters - '("gint*" "x") - '("gint*" "y") - ) -) - -(define-method set - (of-object "GtkLabel") - (c-name "gtk_label_set") - (return-type "none") - (parameters - '("const-char*" "str") - ) - (deprecated "use GtkLabel.set_text") -) - -(define-method get - (of-object "GtkLabel") - (c-name "gtk_label_get") - (return-type "none") - (parameters - '("char**" "str") - ) - (deprecated "use GtkLabel.get_text") -) - -(define-method parse_uline - (of-object "GtkLabel") - (c-name "gtk_label_parse_uline") - (return-type "guint") - (parameters - '("const-gchar*" "string") - ) - (deprecated "") -) - -(define-method set_ellipsize - (of-object "GtkLabel") - (c-name "gtk_label_set_ellipsize") - (return-type "none") - (parameters - '("PangoEllipsizeMode" "mode") - ) -) - -(define-method get_ellipsize - (of-object "GtkLabel") - (c-name "gtk_label_get_ellipsize") - (return-type "PangoEllipsizeMode") -) - -(define-method set_angle - (of-object "GtkLabel") - (c-name "gtk_label_set_angle") - (return-type "none") - (parameters - '("gint" "angle") - ) -) - -(define-method get_angle - (of-object "GtkLabel") - (c-name "gtk_label_get_angle") - (return-type "gint") -) - -(define-method set_width_chars - (of-object "GtkLabel") - (c-name "gtk_label_set_width_chars") - (return-type "none") - (parameters - '("gint" "n_chars") - ) -) - -(define-method get_width_chars - (of-object "GtkLabel") - (c-name "gtk_label_get_width_chars") - (return-type "gint") -) - -(define-method set_max_width_chars - (of-object "GtkLabel") - (c-name "gtk_label_set_max_width_chars") - (return-type "none") - (parameters - '("gint" "n_chars") - ) -) - -(define-method get_max_width_chars - (of-object "GtkLabel") - (c-name "gtk_label_get_max_width_chars") - (return-type "gint") -) - -(define-method set_single_line_mode - (of-object "GtkLabel") - (c-name "gtk_label_set_single_line_mode") - (return-type "none") - (parameters - '("gboolean" "single_line_mode") - ) -) - -(define-method get_single_line_mode - (of-object "GtkLabel") - (c-name "gtk_label_get_single_line_mode") - (return-type "gboolean") -) - -(define-virtual move_cursor - (of-object "GtkLabel") - (return-type "none") - (parameters - '("GtkMovementStep" "step") - '("gint" "count") - '("gboolean" "extend_selection") - ) -) -(define-virtual copy_clipboard - (of-object "GtkLabel") - (return-type "none") -) -(define-virtual populate_popup - (of-object "GtkLabel") - (return-type "none") - (parameters - '("GtkMenu*" "menu") - ) -) - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtklayout.h - -(define-function gtk_layout_get_type - (c-name "gtk_layout_get_type") - (return-type "GType") -) - -(define-function gtk_layout_new - (c-name "gtk_layout_new") - (is-constructor-of "GtkLayout") - (return-type "GtkWidget*") - (properties - '("hadjustment" (optional)) - '("vadjustment" (optional)) - ) -) - -(define-method put - (of-object "GtkLayout") - (c-name "gtk_layout_put") - (return-type "none") - (parameters - '("GtkWidget*" "child_widget") - '("gint" "x") - '("gint" "y") - ) -) - -(define-method move - (of-object "GtkLayout") - (c-name "gtk_layout_move") - (return-type "none") - (parameters - '("GtkWidget*" "child_widget") - '("gint" "x") - '("gint" "y") - ) -) - -(define-method set_size - (of-object "GtkLayout") - (c-name "gtk_layout_set_size") - (return-type "none") - (parameters - '("guint" "width") - '("guint" "height") - ) -) - -(define-method get_size - (of-object "GtkLayout") - (c-name "gtk_layout_get_size") - (return-type "none") - (parameters - '("guint*" "width") - '("guint*" "height") - ) -) - -(define-method get_hadjustment - (of-object "GtkLayout") - (c-name "gtk_layout_get_hadjustment") - (return-type "GtkAdjustment*") -) - -(define-method get_vadjustment - (of-object "GtkLayout") - (c-name "gtk_layout_get_vadjustment") - (return-type "GtkAdjustment*") -) - -(define-method set_hadjustment - (of-object "GtkLayout") - (c-name "gtk_layout_set_hadjustment") - (return-type "none") - (parameters - '("GtkAdjustment*" "adjustment" (null-ok)) - ) -) - -(define-method set_vadjustment - (of-object "GtkLayout") - (c-name "gtk_layout_set_vadjustment") - (return-type "none") - (parameters - '("GtkAdjustment*" "adjustment" (null-ok)) - ) -) - -(define-method freeze - (of-object "GtkLayout") - (c-name "gtk_layout_freeze") - (return-type "none") - (deprecated "") -) - -(define-method thaw - (of-object "GtkLayout") - (c-name "gtk_layout_thaw") - (return-type "none") - (deprecated "") -) - -(define-virtual set_scroll_adjustments - (of-object "GtkLayout") - (return-type "none") - (parameters - '("GtkAdjustment*" "hadjustment") - '("GtkAdjustment*" "vadjustment") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtklist.h - -(define-function gtk_list_get_type - (c-name "gtk_list_get_type") - (return-type "GType") - (deprecated "use GtkListStore/GtkTreeView") -) - -(define-function gtk_list_new - (c-name "gtk_list_new") - (is-constructor-of "GtkList") - (return-type "GtkWidget*") - (deprecated "use GtkListStore/GtkTreeView") -) - -(define-method insert_items - (of-object "GtkList") - (c-name "gtk_list_insert_items") - (return-type "none") - (parameters - '("GList*" "items") - '("gint" "position") - ) -) - -(define-method append_items - (of-object "GtkList") - (c-name "gtk_list_append_items") - (return-type "none") - (parameters - '("GList*" "items") - ) -) - -(define-method prepend_items - (of-object "GtkList") - (c-name "gtk_list_prepend_items") - (return-type "none") - (parameters - '("GList*" "items") - ) -) - -(define-method remove_items - (of-object "GtkList") - (c-name "gtk_list_remove_items") - (return-type "none") - (parameters - '("GList*" "items") - ) -) - -(define-method remove_items_no_unref - (of-object "GtkList") - (c-name "gtk_list_remove_items_no_unref") - (return-type "none") - (parameters - '("GList*" "items") - ) - (deprecated "use GtkListStore/GtkTreeView") -) - -(define-method clear_items - (of-object "GtkList") - (c-name "gtk_list_clear_items") - (return-type "none") - (parameters - '("gint" "start") - '("gint" "end") - ) -) - -(define-method select_item - (of-object "GtkList") - (c-name "gtk_list_select_item") - (return-type "none") - (parameters - '("gint" "item") - ) -) - -(define-method unselect_item - (of-object "GtkList") - (c-name "gtk_list_unselect_item") - (return-type "none") - (parameters - '("gint" "item") - ) -) - -(define-method select_child - (of-object "GtkList") - (c-name "gtk_list_select_child") - (return-type "none") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-method unselect_child - (of-object "GtkList") - (c-name "gtk_list_unselect_child") - (return-type "none") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-method child_position - (of-object "GtkList") - (c-name "gtk_list_child_position") - (return-type "gint") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-method set_selection_mode - (of-object "GtkList") - (c-name "gtk_list_set_selection_mode") - (return-type "none") - (parameters - '("GtkSelectionMode" "mode") - ) - (deprecated "use GtkListStore/GtkTreeView") -) - -(define-method extend_selection - (of-object "GtkList") - (c-name "gtk_list_extend_selection") - (return-type "none") - (parameters - '("GtkScrollType" "scroll_type") - '("gfloat" "position") - '("gboolean" "auto_start_selection") - ) - (deprecated "use GtkListStore/GtkTreeView") -) - -(define-method start_selection - (of-object "GtkList") - (c-name "gtk_list_start_selection") - (return-type "none") - (deprecated "use GtkListStore/GtkTreeView") -) - -(define-method end_selection - (of-object "GtkList") - (c-name "gtk_list_end_selection") - (return-type "none") - (deprecated "use GtkListStore/GtkTreeView") -) - -(define-method select_all - (of-object "GtkList") - (c-name "gtk_list_select_all") - (return-type "none") - (deprecated "use GtkListStore/GtkTreeView") -) - -(define-method unselect_all - (of-object "GtkList") - (c-name "gtk_list_unselect_all") - (return-type "none") - (deprecated "use GtkListStore/GtkTreeView") -) - -(define-method scroll_horizontal - (of-object "GtkList") - (c-name "gtk_list_scroll_horizontal") - (return-type "none") - (parameters - '("GtkScrollType" "scroll_type") - '("gfloat" "position") - ) - (deprecated "use GtkListStore/GtkTreeView") -) - -(define-method scroll_vertical - (of-object "GtkList") - (c-name "gtk_list_scroll_vertical") - (return-type "none") - (parameters - '("GtkScrollType" "scroll_type") - '("gfloat" "position") - ) - (deprecated "use GtkListStore/GtkTreeView") -) - -(define-method toggle_add_mode - (of-object "GtkList") - (c-name "gtk_list_toggle_add_mode") - (return-type "none") - (deprecated "use GtkListStore/GtkTreeView") -) - -(define-method toggle_focus_row - (of-object "GtkList") - (c-name "gtk_list_toggle_focus_row") - (return-type "none") - (deprecated "use GtkListStore/GtkTreeView") -) - -(define-method toggle_row - (of-object "GtkList") - (c-name "gtk_list_toggle_row") - (return-type "none") - (parameters - '("GtkWidget*" "item") - ) - (deprecated "use GtkListStore/GtkTreeView") -) - -(define-method undo_selection - (of-object "GtkList") - (c-name "gtk_list_undo_selection") - (return-type "none") - (deprecated "use GtkListStore/GtkTreeView") -) - -(define-method end_drag_selection - (of-object "GtkList") - (c-name "gtk_list_end_drag_selection") - (return-type "none") - (deprecated "use GtkListStore/GtkTreeView") -) - - -(define-virtual selection_changed - (of-object "GtkList") - (return-type "none") -) -(define-virtual select_child - (of-object "GtkList") - (return-type "none") - (parameters - '("GtkWidget*" "child") - ) -) -(define-virtual unselect_child - (of-object "GtkList") - (return-type "none") - (parameters - '("GtkWidget*" "child") - ) -) -(define-virtual toggle_focus_row - (of-object "GtkListItem") - (return-type "none") -) -(define-virtual select_all - (of-object "GtkListItem") - (return-type "none") -) -(define-virtual unselect_all - (of-object "GtkListItem") - (return-type "none") -) -(define-virtual undo_selection - (of-object "GtkListItem") - (return-type "none") -) -(define-virtual start_selection - (of-object "GtkListItem") - (return-type "none") -) -(define-virtual end_selection - (of-object "GtkListItem") - (return-type "none") -) -(define-virtual extend_selection - (of-object "GtkListItem") - (return-type "none") - (parameters - '("GtkScrollType" "scroll_type") - '("gfloat" "position") - '("gboolean" "auto_start_selection") - ) -) -(define-virtual scroll_horizontal - (of-object "GtkListItem") - (return-type "none") - (parameters - '("GtkScrollType" "scroll_type") - '("gfloat" "position") - ) -) -(define-virtual scroll_vertical - (of-object "GtkListItem") - (return-type "none") - (parameters - '("GtkScrollType" "scroll_type") - '("gfloat" "position") - ) -) -(define-virtual toggle_add_mode - (of-object "GtkListItem") - (return-type "none") -) - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtklistitem.h - -(define-function gtk_list_item_get_type - (c-name "gtk_list_item_get_type") - (return-type "GType") -) - -(define-function gtk_list_item_new - (c-name "gtk_list_item_new") - (is-constructor-of "GtkListItem") - (return-type "GtkWidget*") - (deprecated "use gtk.TreeView") -) - -(define-function gtk_list_item_new_with_label - (c-name "gtk_list_item_new_with_label") - (is-constructor-of "GtkListItem") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "label") - ) - (deprecated "use gtk.TreeView") -) - -(define-method select - (of-object "GtkListItem") - (c-name "gtk_list_item_select") - (return-type "none") -) - -(define-method deselect - (of-object "GtkListItem") - (c-name "gtk_list_item_deselect") - (return-type "none") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkliststore.h - -(define-function gtk_list_store_get_type - (c-name "gtk_list_store_get_type") - (return-type "GType") -) - -(define-function gtk_list_store_new - (c-name "gtk_list_store_new") - (is-constructor-of "GtkListStore") - (return-type "GtkListStore*") - (parameters - '("gint" "n_columns") - ) - (varargs #t) -) - -(define-function gtk_list_store_newv - (c-name "gtk_list_store_newv") - (is-constructor-of "GtkListStore") - (return-type "GtkListStore*") - (parameters - '("gint" "n_columns") - '("GType*" "value") - ) -) - -(define-method set_column_types - (of-object "GtkListStore") - (c-name "gtk_list_store_set_column_types") - (return-type "none") - (parameters - '("gint" "n_columns") - '("GType*" "types") - ) -) - -(define-method set_value - (of-object "GtkListStore") - (c-name "gtk_list_store_set_value") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("gint" "column") - '("GValue*" "value") - ) -) - -(define-method set - (of-object "GtkListStore") - (c-name "gtk_list_store_set") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - ) - (varargs #t) -) - -(define-method set_valist - (of-object "GtkListStore") - (c-name "gtk_list_store_set_valist") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("va_list" "var_args") - ) -) - -(define-method remove - (of-object "GtkListStore") - (c-name "gtk_list_store_remove") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - ) -) - -(define-method insert - (of-object "GtkListStore") - (c-name "gtk_list_store_insert") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("gint" "position") - ) -) - -(define-method insert_before - (of-object "GtkListStore") - (c-name "gtk_list_store_insert_before") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreeIter*" "sibling") - ) -) - -(define-method insert_after - (of-object "GtkListStore") - (c-name "gtk_list_store_insert_after") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreeIter*" "sibling") - ) -) - -(define-method insert_with_values - (of-object "GtkListStore") - (c-name "gtk_list_store_insert_with_values") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("gint" "position") - ) - (varargs #t) -) - -(define-method insert_with_valuesv - (of-object "GtkListStore") - (c-name "gtk_list_store_insert_with_valuesv") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("gint" "position") - '("gint*" "columns") - '("GValue*" "values") - '("gint" "n_values") - ) -) - -(define-method prepend - (of-object "GtkListStore") - (c-name "gtk_list_store_prepend") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - ) -) - -(define-method append - (of-object "GtkListStore") - (c-name "gtk_list_store_append") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - ) -) - -(define-method clear - (of-object "GtkListStore") - (c-name "gtk_list_store_clear") - (return-type "none") -) - -(define-method iter_is_valid - (of-object "GtkListStore") - (c-name "gtk_list_store_iter_is_valid") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - ) -) - -(define-method reorder - (of-object "GtkListStore") - (c-name "gtk_list_store_reorder") - (return-type "none") - (parameters - '("gint*" "new_order") - ) -) - -(define-method swap - (of-object "GtkListStore") - (c-name "gtk_list_store_swap") - (return-type "none") - (parameters - '("GtkTreeIter*" "a") - '("GtkTreeIter*" "b") - ) -) - -(define-method move_after - (of-object "GtkListStore") - (c-name "gtk_list_store_move_after") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreeIter*" "position" (null-ok)) - ) -) - -(define-method move_before - (of-object "GtkListStore") - (c-name "gtk_list_store_move_before") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreeIter*" "position" (null-ok)) - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkmain.h - -(define-function check_version - (c-name "gtk_check_version") - (return-type "gchar*") - (caller-owns-return #f) - (parameters - '("guint" "required_major") - '("guint" "required_minor") - '("guint" "required_micro") - ) -) - -(define-function init - (c-name "gtk_init") - (return-type "none") - (parameters - '("int*" "argc") - '("char***" "argv") - ) -) - -(define-function init_check - (c-name "gtk_init_check") - (return-type "gboolean") - (parameters - '("int*" "argc") - '("char***" "argv") - ) -) - -(define-function init_abi_check - (c-name "gtk_init_abi_check") - (return-type "none") - (parameters - '("int*" "argc") - '("char***" "argv") - '("int" "num_checks") - '("size_t" "sizeof_GtkWindow") - ) -) - -(define-function init_check_abi_check - (c-name "gtk_init_check_abi_check") - (return-type "gboolean") - (parameters - '("int*" "argc") - '("char***" "argv") - '("int" "num_checks") - '("size_t" "sizeof_GtkWindow") - ) -) - -(define-function exit - (c-name "gtk_exit") - (return-type "none") - (parameters - '("gint" "error_code") - ) - (deprecated "") -) - -(define-function disable_setlocale - (c-name "gtk_disable_setlocale") - (return-type "none") -) - -(define-function set_locale - (c-name "gtk_set_locale") - (return-type "gchar*") -) - -(define-function get_default_language - (c-name "gtk_get_default_language") - (return-type "PangoLanguage*") -) - -(define-function events_pending - (c-name "gtk_events_pending") - (return-type "gint") -) - -(define-function main_do_event - (c-name "gtk_main_do_event") - (return-type "none") - (parameters - '("GdkEvent*" "event") - ) -) - -(define-function main - (c-name "gtk_main") - (return-type "none") -) - -(define-function main_level - (c-name "gtk_main_level") - (return-type "guint") -) - -(define-function main_quit - (c-name "gtk_main_quit") - (return-type "none") -) - -(define-function main_iteration - (c-name "gtk_main_iteration") - (return-type "gboolean") -) - -(define-function main_iteration_do - (c-name "gtk_main_iteration_do") - (return-type "gboolean") - (parameters - '("gboolean" "blocking" (default "TRUE")) - ) -) - -(define-function true - (c-name "gtk_true") - (return-type "gboolean") -) - -(define-function false - (c-name "gtk_false") - (return-type "gboolean") -) - -(define-method grab_add - (of-object "GtkWidget") - (c-name "gtk_grab_add") - (return-type "none") -) - -(define-function grab_get_current - (c-name "gtk_grab_get_current") - (return-type "GtkWidget*") -) - -(define-method grab_remove - (of-object "GtkWidget") - (c-name "gtk_grab_remove") - (return-type "none") -) - -(define-function init_add - (c-name "gtk_init_add") - (return-type "none") - (parameters - '("GtkFunction" "function") - '("gpointer" "data") - ) -) - -(define-function quit_add_destroy - (c-name "gtk_quit_add_destroy") - (return-type "none") - (parameters - '("guint" "main_level") - '("GtkObject*" "object") - ) -) - -(define-function quit_add - (c-name "gtk_quit_add") - (return-type "guint") - (parameters - '("guint" "main_level") - '("GtkFunction" "function") - '("gpointer" "data") - ) -) - -(define-function quit_add_full - (c-name "gtk_quit_add_full") - (return-type "guint") - (parameters - '("guint" "main_level") - '("GtkFunction" "function") - '("GtkCallbackMarshal" "marshal") - '("gpointer" "data") - '("GtkDestroyNotify" "destroy") - ) -) - -(define-function quit_remove - (c-name "gtk_quit_remove") - (return-type "none") - (parameters - '("guint" "quit_handler_id") - ) -) - -(define-function quit_remove_by_data - (c-name "gtk_quit_remove_by_data") - (return-type "none") - (parameters - '("gpointer" "data") - ) -) - -(define-function timeout_add - (c-name "gtk_timeout_add") - (return-type "guint") - (parameters - '("guint32" "interval") - '("GtkFunction" "function") - '("gpointer" "data") - ) -) - -(define-function timeout_add_full - (c-name "gtk_timeout_add_full") - (return-type "guint") - (parameters - '("guint32" "interval") - '("GtkFunction" "function") - '("GtkCallbackMarshal" "marshal") - '("gpointer" "data") - '("GtkDestroyNotify" "destroy") - ) -) - -(define-function timeout_remove - (c-name "gtk_timeout_remove") - (return-type "none") - (parameters - '("guint" "timeout_handler_id") - ) -) - -(define-function idle_add - (c-name "gtk_idle_add") - (return-type "guint") - (parameters - '("GtkFunction" "function") - '("gpointer" "data") - ) -) - -(define-function idle_add_priority - (c-name "gtk_idle_add_priority") - (return-type "guint") - (parameters - '("gint" "priority") - '("GtkFunction" "function") - '("gpointer" "data") - ) -) - -(define-function idle_add_full - (c-name "gtk_idle_add_full") - (return-type "guint") - (parameters - '("gint" "priority") - '("GtkFunction" "function") - '("GtkCallbackMarshal" "marshal") - '("gpointer" "data") - '("GtkDestroyNotify" "destroy") - ) -) - -(define-function idle_remove - (c-name "gtk_idle_remove") - (return-type "none") - (parameters - '("guint" "idle_handler_id") - ) -) - -(define-function idle_remove_by_data - (c-name "gtk_idle_remove_by_data") - (return-type "none") - (parameters - '("gpointer" "data") - ) -) - -(define-function input_add_full - (c-name "gtk_input_add_full") - (return-type "guint") - (parameters - '("gint" "source") - '("GdkInputCondition" "condition") - '("GdkInputFunction" "function") - '("GtkCallbackMarshal" "marshal") - '("gpointer" "data") - '("GtkDestroyNotify" "destroy") - ) -) - -(define-function input_remove - (c-name "gtk_input_remove") - (return-type "none") - (parameters - '("guint" "input_handler_id") - ) -) - -(define-function key_snooper_install - (c-name "gtk_key_snooper_install") - (return-type "guint") - (parameters - '("GtkKeySnoopFunc" "snooper") - '("gpointer" "func_data") - ) -) - -(define-function key_snooper_remove - (c-name "gtk_key_snooper_remove") - (return-type "none") - (parameters - '("guint" "snooper_handler_id") - ) -) - -(define-function get_current_event - (c-name "gtk_get_current_event") - (return-type "GdkEvent*") - (caller-owns-return #t) -) - -(define-function get_current_event_time - (c-name "gtk_get_current_event_time") - (return-type "guint32") -) - -(define-function get_current_event_state - (c-name "gtk_get_current_event_state") - (return-type "gboolean") - (parameters - '("GdkModifierType*" "state") - ) -) - -(define-function get_event_widget - (c-name "gtk_get_event_widget") - (return-type "GtkWidget*") - (parameters - '("GdkEvent*" "event") - ) -) - -(define-method propagate_event - (of-object "GtkWidget") - (c-name "gtk_propagate_event") - (return-type "none") - (parameters - '("GdkEvent*" "event") - ) -) - -(define-function parse_args - (c-name "gtk_parse_args") - (return-type "gboolean") - (parameters - '("int*" "argc") - '("char***" "argv") - ) -) - -(define-function init_with_args - (c-name "gtk_init_with_args") - (return-type "gboolean") - (parameters - '("int*" "argc") - '("char***" "argv") - '("char*" "parameter_string") - '("GOptionEntry*" "entries") - '("char*" "translation_domain") - '("GError**" "error") - ) -) - -(define-function get_option_group - (c-name "gtk_get_option_group") - (return-type "GOptionGroup*") - (parameters - '("gboolean" "open_default_display") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkmenu.h - -(define-function gtk_menu_get_type - (c-name "gtk_menu_get_type") - (return-type "GType") -) - -(define-function gtk_menu_new - (c-name "gtk_menu_new") - (is-constructor-of "GtkMenu") - (return-type "GtkWidget*") -) - -(define-method popup - (of-object "GtkMenu") - (c-name "gtk_menu_popup") - (return-type "none") - (parameters - '("GtkWidget*" "parent_menu_shell") - '("GtkWidget*" "parent_menu_item") - '("GtkMenuPositionFunc" "func") - '("gpointer" "data") - '("guint" "button") - '("guint32" "activate_time") - ) -) - -(define-method reposition - (of-object "GtkMenu") - (c-name "gtk_menu_reposition") - (return-type "none") -) - -(define-method popdown - (of-object "GtkMenu") - (c-name "gtk_menu_popdown") - (return-type "none") -) - -(define-method get_active - (of-object "GtkMenu") - (c-name "gtk_menu_get_active") - (return-type "GtkWidget*") -) - -(define-method set_active - (of-object "GtkMenu") - (c-name "gtk_menu_set_active") - (return-type "none") - (parameters - '("guint" "index") - ) -) - -(define-method set_accel_group - (of-object "GtkMenu") - (c-name "gtk_menu_set_accel_group") - (return-type "none") - (parameters - '("GtkAccelGroup*" "accel_group") - ) -) - -(define-method get_accel_group - (of-object "GtkMenu") - (c-name "gtk_menu_get_accel_group") - (return-type "GtkAccelGroup*") -) - -(define-method set_accel_path - (of-object "GtkMenu") - (c-name "gtk_menu_set_accel_path") - (return-type "none") - (parameters - '("const-gchar*" "accel_path") - ) -) - -(define-method attach_to_widget - (of-object "GtkMenu") - (c-name "gtk_menu_attach_to_widget") - (return-type "none") - (parameters - '("GtkWidget*" "attach_widget") - '("GtkMenuDetachFunc" "detacher") - ) -) - -(define-method detach - (of-object "GtkMenu") - (c-name "gtk_menu_detach") - (return-type "none") -) - -(define-method get_attach_widget - (of-object "GtkMenu") - (c-name "gtk_menu_get_attach_widget") - (return-type "GtkWidget*") -) - -(define-method set_tearoff_state - (of-object "GtkMenu") - (c-name "gtk_menu_set_tearoff_state") - (return-type "none") - (parameters - '("gboolean" "torn_off") - ) -) - -(define-method get_tearoff_state - (of-object "GtkMenu") - (c-name "gtk_menu_get_tearoff_state") - (return-type "gboolean") -) - -(define-method set_title - (of-object "GtkMenu") - (c-name "gtk_menu_set_title") - (return-type "none") - (parameters - '("const-gchar*" "title") - ) -) - -(define-method get_title - (of-object "GtkMenu") - (c-name "gtk_menu_get_title") - (return-type "const-gchar*") -) - -(define-method reorder_child - (of-object "GtkMenu") - (c-name "gtk_menu_reorder_child") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("gint" "position") - ) -) - -(define-method set_screen - (of-object "GtkMenu") - (c-name "gtk_menu_set_screen") - (return-type "none") - (parameters - '("GdkScreen*" "screen" (null-ok)) - ) -) - -(define-method attach - (of-object "GtkMenu") - (c-name "gtk_menu_attach") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("guint" "left_attach") - '("guint" "right_attach") - '("guint" "top_attach") - '("guint" "bottom_attach") - ) -) - -(define-method set_monitor - (of-object "GtkMenu") - (c-name "gtk_menu_set_monitor") - (return-type "none") - (parameters - '("gint" "monitor_num") - ) -) - -(define-method menu_get_for_attach_widget - (of-object "GtkWidget") - (c-name "gtk_menu_get_for_attach_widget") - (return-type "GList*") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkmenubar.h - -(define-function gtk_menu_bar_get_type - (c-name "gtk_menu_bar_get_type") - (return-type "GType") -) - -(define-function gtk_menu_bar_new - (c-name "gtk_menu_bar_new") - (is-constructor-of "GtkMenuBar") - (return-type "GtkWidget*") -) - -(define-method get_pack_direction - (of-object "GtkMenuBar") - (c-name "gtk_menu_bar_get_pack_direction") - (return-type "GtkPackDirection") -) - -(define-method set_pack_direction - (of-object "GtkMenuBar") - (c-name "gtk_menu_bar_set_pack_direction") - (return-type "none") - (parameters - '("GtkPackDirection" "pack_dir") - ) -) - -(define-method get_child_pack_direction - (of-object "GtkMenuBar") - (c-name "gtk_menu_bar_get_child_pack_direction") - (return-type "GtkPackDirection") -) - -(define-method set_child_pack_direction - (of-object "GtkMenuBar") - (c-name "gtk_menu_bar_set_child_pack_direction") - (return-type "none") - (parameters - '("GtkPackDirection" "child_pack_dir") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkmenuitem.h - -(define-function gtk_menu_item_get_type - (c-name "gtk_menu_item_get_type") - (return-type "GType") -) - -(define-function gtk_menu_item_new - (c-name "gtk_menu_item_new") - (is-constructor-of "GtkMenuItem") - (return-type "GtkWidget*") -) - -(define-function gtk_menu_item_new_with_label - (c-name "gtk_menu_item_new_with_label") - (is-constructor-of "GtkMenuItem") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "label") - ) -) - -(define-function gtk_menu_item_new_with_mnemonic - (c-name "gtk_menu_item_new_with_mnemonic") - (is-constructor-of "GtkMenuItem") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "label") - ) -) - -(define-method set_submenu - (of-object "GtkMenuItem") - (c-name "gtk_menu_item_set_submenu") - (return-type "none") - (parameters - '("GtkWidget*" "submenu") - ) -) - -(define-method get_submenu - (of-object "GtkMenuItem") - (c-name "gtk_menu_item_get_submenu") - (return-type "GtkWidget*") -) - -(define-method remove_submenu - (of-object "GtkMenuItem") - (c-name "gtk_menu_item_remove_submenu") - (return-type "none") -) - -(define-method select - (of-object "GtkMenuItem") - (c-name "gtk_menu_item_select") - (return-type "none") -) - -(define-method deselect - (of-object "GtkMenuItem") - (c-name "gtk_menu_item_deselect") - (return-type "none") -) - -(define-method activate - (of-object "GtkMenuItem") - (c-name "gtk_menu_item_activate") - (return-type "none") -) - -(define-method toggle_size_request - (of-object "GtkMenuItem") - (c-name "gtk_menu_item_toggle_size_request") - (return-type "none") - (parameters - '("gint*" "requisition") - ) -) - -(define-method toggle_size_allocate - (of-object "GtkMenuItem") - (c-name "gtk_menu_item_toggle_size_allocate") - (return-type "none") - (parameters - '("gint" "allocation") - ) -) - -(define-method set_right_justified - (of-object "GtkMenuItem") - (c-name "gtk_menu_item_set_right_justified") - (return-type "none") - (parameters - '("gboolean" "right_justified") - ) -) - -(define-method get_right_justified - (of-object "GtkMenuItem") - (c-name "gtk_menu_item_get_right_justified") - (return-type "gboolean") -) - -(define-method set_accel_path - (of-object "GtkMenuItem") - (c-name "gtk_menu_item_set_accel_path") - (return-type "none") - (parameters - '("const-gchar*" "accel_path") - ) -) - -(define-method right_justify - (of-object "GtkMenuItem") - (c-name "gtk_menu_item_right_justify") - (return-type "none") - (deprecated "use GtkMenuItem.set_right_justified") -) - -(define-virtual activate - (of-object "GtkMenuItem") - (return-type "none") -) -(define-virtual activate_item - (of-object "GtkMenuItem") - (return-type "none") -) -(define-virtual toggle_size_request - (of-object "GtkMenuItem") - (return-type "none") - (parameters - '("gint*" "requisition" (direction "out")) - ) -) -(define-virtual toggle_size_allocate - (of-object "GtkMenuItem") - (return-type "none") - (parameters - '("gint" "allocation") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkmenushell.h - -(define-function gtk_menu_shell_get_type - (c-name "gtk_menu_shell_get_type") - (return-type "GType") -) - -(define-method append - (of-object "GtkMenuShell") - (c-name "gtk_menu_shell_append") - (return-type "none") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-method prepend - (of-object "GtkMenuShell") - (c-name "gtk_menu_shell_prepend") - (return-type "none") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-method insert - (of-object "GtkMenuShell") - (c-name "gtk_menu_shell_insert") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("gint" "position") - ) -) - -(define-method deactivate - (of-object "GtkMenuShell") - (c-name "gtk_menu_shell_deactivate") - (return-type "none") -) - -(define-method select_item - (of-object "GtkMenuShell") - (c-name "gtk_menu_shell_select_item") - (return-type "none") - (parameters - '("GtkWidget*" "menu_item") - ) -) - -(define-method deselect - (of-object "GtkMenuShell") - (c-name "gtk_menu_shell_deselect") - (return-type "none") -) - -(define-method activate_item - (of-object "GtkMenuShell") - (c-name "gtk_menu_shell_activate_item") - (return-type "none") - (parameters - '("GtkWidget*" "menu_item") - '("gboolean" "force_deactivate") - ) -) - -(define-method select_first - (of-object "GtkMenuShell") - (c-name "gtk_menu_shell_select_first") - (return-type "none") - (parameters - '("gboolean" "search_sensitive") - ) -) - -(define-method cancel - (of-object "GtkMenuShell") - (c-name "gtk_menu_shell_cancel") - (return-type "none") -) -(define-virtual deactivate - (of-object "GtkMenuShell") - (return-type "none") -) -(define-virtual selection_done - (of-object "GtkMenuShell") - (return-type "none") -) -(define-virtual move_current - (of-object "GtkMenuShell") - (return-type "none") - (parameters - '("GtkMenuDirectionType" "direction") - ) -) -(define-virtual activate_current - (of-object "GtkMenuShell") - (return-type "none") - (parameters - '("gboolean" "force_hide") - ) -) -(define-virtual cancel - (of-object "GtkMenuShell") - (return-type "none") -) -(define-virtual select_item - (of-object "GtkMenuShell") - (return-type "none") - (parameters - '("GtkWidget*" "menu_item") - ) -) -(define-virtual insert - (of-object "GtkMenuShell") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("gint" "position") - ) -) -(define-virtual get_popup_delay - (of-object "GtkMenuShell") - (return-type "gint") -) - -(define-method get_take_focus - (of-object "GtkMenuShell") - (c-name "gtk_menu_shell_get_take_focus") - (return-type "gboolean") -) - -(define-method set_take_focus - (of-object "GtkMenuShell") - (c-name "gtk_menu_shell_set_take_focus") - (return-type "none") - (parameters - '("gboolean" "take_focus") - ) -) - - -;; From /opt/gnome-2.10/include/gtk-2.0/gtk/gtkmenutoolbutton.h - -(define-function gtk_menu_tool_button_get_type - (c-name "gtk_menu_tool_button_get_type") - (return-type "GType") -) - -(define-function gtk_menu_tool_button_new - (c-name "gtk_menu_tool_button_new") - (is-constructor-of "GtkMenuToolButton") - (return-type "GtkToolItem*") - (parameters - '("GtkWidget*" "icon_widget") - '("const-gchar*" "label") - ) -) - -(define-function gtk_menu_tool_button_new_from_stock - (c-name "gtk_menu_tool_button_new_from_stock") - (return-type "GtkToolItem*") - (parameters - '("const-gchar*" "stock_id") - ) - (caller-owns-return #t) -) - -(define-method set_menu - (of-object "GtkMenuToolButton") - (c-name "gtk_menu_tool_button_set_menu") - (return-type "none") - (parameters - '("GtkWidget*" "menu") - ) -) - -(define-method get_menu - (of-object "GtkMenuToolButton") - (c-name "gtk_menu_tool_button_get_menu") - (return-type "GtkWidget*") -) - -(define-method set_arrow_tooltip - (of-object "GtkMenuToolButton") - (c-name "gtk_menu_tool_button_set_arrow_tooltip") - (return-type "none") - (parameters - '("GtkTooltips*" "tooltips") - '("const-gchar*" "tip_text" (null-ok)) - '("const-gchar*" "tip_private" (null-ok) (default "NULL")) - ) -) - -(define-virtual show_menu - (of-object "GtkMenuToolButton") - (return-type "none") -) - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkmessagedialog.h - -(define-function gtk_message_dialog_get_type - (c-name "gtk_message_dialog_get_type") - (return-type "GType") -) - -(define-function gtk_message_dialog_new - (c-name "gtk_message_dialog_new") - (is-constructor-of "GtkMessageDialog") - (return-type "GtkWidget*") - (parameters - '("GtkWindow*" "parent" (null-ok) (default "NULL")) - '("GtkDialogFlags" "flags" (default "0")) - '("GtkMessageType" "type" (default "GTK_MESSAGE_INFO")) - '("GtkButtonsType" "buttons" (default "GTK_BUTTONS_NONE")) - '("const-gchar*" "message_format" (null-ok) (default "NULL")) - ) - (varargs #t) -) - -(define-function message_dialog_new_with_markup - (c-name "gtk_message_dialog_new_with_markup") - (is-constructor-of "GtkMessageDialog") - (return-type "GtkWidget*") - (parameters - '("GtkWindow*" "parent") - '("GtkDialogFlags" "flags") - '("GtkMessageType" "type") - '("GtkButtonsType" "buttons") - '("const-gchar*" "message_format") - ) - (varargs #t) -) - -(define-method set_markup - (of-object "GtkMessageDialog") - (c-name "gtk_message_dialog_set_markup") - (return-type "none") - (parameters - '("const-gchar*" "str") - ) -) - - -(define-method format_secondary_text - (of-object "GtkMessageDialog") - (c-name "gtk_message_dialog_format_secondary_text") - (return-type "none") - (parameters - '("const-gchar*" "message_format") - ) - (varargs #t) -) - -(define-method format_secondary_markup - (of-object "GtkMessageDialog") - (c-name "gtk_message_dialog_format_secondary_markup") - (return-type "none") - (parameters - '("const-gchar*" "message_format") - ) - (varargs #t) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkmisc.h - -(define-function gtk_misc_get_type - (c-name "gtk_misc_get_type") - (return-type "GType") -) - -(define-method set_alignment - (of-object "GtkMisc") - (c-name "gtk_misc_set_alignment") - (return-type "none") - (parameters - '("gfloat" "xalign") - '("gfloat" "yalign") - ) -) - -(define-method get_alignment - (of-object "GtkMisc") - (c-name "gtk_misc_get_alignment") - (return-type "none") - (parameters - '("gfloat*" "xalign") - '("gfloat*" "yalign") - ) -) - -(define-method set_padding - (of-object "GtkMisc") - (c-name "gtk_misc_set_padding") - (return-type "none") - (parameters - '("gint" "xpad") - '("gint" "ypad") - ) -) - -(define-method get_padding - (of-object "GtkMisc") - (c-name "gtk_misc_get_padding") - (return-type "none") - (parameters - '("gint*" "xpad") - '("gint*" "ypad") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtknotebook.h - -(define-function gtk_notebook_get_type - (c-name "gtk_notebook_get_type") - (return-type "GType") -) - -(define-function gtk_notebook_new - (c-name "gtk_notebook_new") - (is-constructor-of "GtkNotebook") - (return-type "GtkWidget*") -) - -(define-method append_page - (of-object "GtkNotebook") - (c-name "gtk_notebook_append_page") - (return-type "gint") - (parameters - '("GtkWidget*" "child") - '("GtkWidget*" "tab_label" (null-ok) (default "NULL")) - ) -) - -(define-method append_page_menu - (of-object "GtkNotebook") - (c-name "gtk_notebook_append_page_menu") - (return-type "gint") - (parameters - '("GtkWidget*" "child") - '("GtkWidget*" "tab_label" (null-ok) (default "NULL")) - '("GtkWidget*" "menu_label" (null-ok) (default "NULL")) - ) -) - -(define-method prepend_page - (of-object "GtkNotebook") - (c-name "gtk_notebook_prepend_page") - (return-type "gint") - (parameters - '("GtkWidget*" "child") - '("GtkWidget*" "tab_label" (null-ok) (default "NULL")) - ) -) - -(define-method prepend_page_menu - (of-object "GtkNotebook") - (c-name "gtk_notebook_prepend_page_menu") - (return-type "gint") - (parameters - '("GtkWidget*" "child") - '("GtkWidget*" "tab_label" (null-ok) (default "NULL")) - '("GtkWidget*" "menu_label" (null-ok) (default "NULL")) - ) -) - -(define-method insert_page - (of-object "GtkNotebook") - (c-name "gtk_notebook_insert_page") - (return-type "gint") - (parameters - '("GtkWidget*" "child") - '("GtkWidget*" "tab_label" (null-ok) (default "NULL")) - '("gint" "position" (default "-1")) - ) -) - -(define-method insert_page_menu - (of-object "GtkNotebook") - (c-name "gtk_notebook_insert_page_menu") - (return-type "gint") - (parameters - '("GtkWidget*" "child") - '("GtkWidget*" "tab_label" (null-ok) (default "NULL")) - '("GtkWidget*" "menu_label" (null-ok) (default "NULL")) - '("gint" "position" (default "-1")) - ) -) - -(define-method remove_page - (of-object "GtkNotebook") - (c-name "gtk_notebook_remove_page") - (return-type "none") - (parameters - '("gint" "page_num") - ) -) - -(define-method get_current_page - (of-object "GtkNotebook") - (c-name "gtk_notebook_get_current_page") - (return-type "gint") -) - -(define-method get_nth_page - (of-object "GtkNotebook") - (c-name "gtk_notebook_get_nth_page") - (return-type "GtkWidget*") - (parameters - '("gint" "page_num") - ) -) - -(define-method get_n_pages - (of-object "GtkNotebook") - (c-name "gtk_notebook_get_n_pages") - (return-type "gint") -) - -(define-method page_num - (of-object "GtkNotebook") - (c-name "gtk_notebook_page_num") - (return-type "gint") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-method set_current_page - (of-object "GtkNotebook") - (c-name "gtk_notebook_set_current_page") - (return-type "none") - (parameters - '("gint" "page_num") - ) -) - -(define-method next_page - (of-object "GtkNotebook") - (c-name "gtk_notebook_next_page") - (return-type "none") -) - -(define-method prev_page - (of-object "GtkNotebook") - (c-name "gtk_notebook_prev_page") - (return-type "none") -) - -(define-method set_show_border - (of-object "GtkNotebook") - (c-name "gtk_notebook_set_show_border") - (return-type "none") - (parameters - '("gboolean" "show_border") - ) -) - -(define-method get_show_border - (of-object "GtkNotebook") - (c-name "gtk_notebook_get_show_border") - (return-type "gboolean") -) - -(define-method set_show_tabs - (of-object "GtkNotebook") - (c-name "gtk_notebook_set_show_tabs") - (return-type "none") - (parameters - '("gboolean" "show_tabs") - ) -) - -(define-method get_show_tabs - (of-object "GtkNotebook") - (c-name "gtk_notebook_get_show_tabs") - (return-type "gboolean") -) - -(define-method set_tab_pos - (of-object "GtkNotebook") - (c-name "gtk_notebook_set_tab_pos") - (return-type "none") - (parameters - '("GtkPositionType" "pos") - ) -) - -(define-method get_tab_pos - (of-object "GtkNotebook") - (c-name "gtk_notebook_get_tab_pos") - (return-type "GtkPositionType") -) - -(define-method set_homogeneous_tabs - (of-object "GtkNotebook") - (c-name "gtk_notebook_set_homogeneous_tabs") - (return-type "none") - (parameters - '("gboolean" "homogeneous") - ) - (deprecated "") -) - -(define-method set_tab_border - (of-object "GtkNotebook") - (c-name "gtk_notebook_set_tab_border") - (return-type "none") - (parameters - '("guint" "border_width") - ) - (deprecated "") -) - -(define-method set_tab_hborder - (of-object "GtkNotebook") - (c-name "gtk_notebook_set_tab_hborder") - (return-type "none") - (parameters - '("guint" "tab_hborder") - ) - (deprecated "") -) - -(define-method set_tab_vborder - (of-object "GtkNotebook") - (c-name "gtk_notebook_set_tab_vborder") - (return-type "none") - (parameters - '("guint" "tab_vborder") - ) - (deprecated "") -) - -(define-method set_scrollable - (of-object "GtkNotebook") - (c-name "gtk_notebook_set_scrollable") - (return-type "none") - (parameters - '("gboolean" "scrollable") - ) -) - -(define-method get_scrollable - (of-object "GtkNotebook") - (c-name "gtk_notebook_get_scrollable") - (return-type "gboolean") -) - -(define-method popup_enable - (of-object "GtkNotebook") - (c-name "gtk_notebook_popup_enable") - (return-type "none") -) - -(define-method popup_disable - (of-object "GtkNotebook") - (c-name "gtk_notebook_popup_disable") - (return-type "none") -) - -(define-method get_tab_label - (of-object "GtkNotebook") - (c-name "gtk_notebook_get_tab_label") - (return-type "GtkWidget*") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-method set_tab_label - (of-object "GtkNotebook") - (c-name "gtk_notebook_set_tab_label") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("GtkWidget*" "tab_label" (null-ok) (default "NULL")) - ) -) - -(define-method set_tab_label_text - (of-object "GtkNotebook") - (c-name "gtk_notebook_set_tab_label_text") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("const-gchar*" "tab_text") - ) -) - -(define-method get_tab_label_text - (of-object "GtkNotebook") - (c-name "gtk_notebook_get_tab_label_text") - (return-type "const-gchar*") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-method get_menu_label - (of-object "GtkNotebook") - (c-name "gtk_notebook_get_menu_label") - (return-type "GtkWidget*") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-method set_menu_label - (of-object "GtkNotebook") - (c-name "gtk_notebook_set_menu_label") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("GtkWidget*" "menu_label" (null-ok) (default "NULL")) - ) -) - -(define-method set_menu_label_text - (of-object "GtkNotebook") - (c-name "gtk_notebook_set_menu_label_text") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("const-gchar*" "menu_text") - ) -) - -(define-method get_menu_label_text - (of-object "GtkNotebook") - (c-name "gtk_notebook_get_menu_label_text") - (return-type "const-gchar*") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-method query_tab_label_packing - (of-object "GtkNotebook") - (c-name "gtk_notebook_query_tab_label_packing") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("gboolean*" "expand") - '("gboolean*" "fill") - '("GtkPackType*" "pack_type") - ) -) - -(define-method set_tab_label_packing - (of-object "GtkNotebook") - (c-name "gtk_notebook_set_tab_label_packing") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("gboolean" "expand") - '("gboolean" "fill") - '("GtkPackType" "pack_type") - ) -) - -(define-method reorder_child - (of-object "GtkNotebook") - (c-name "gtk_notebook_reorder_child") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("gint" "position") - ) -) - -(define-method current_page - (of-object "GtkNotebook") - (c-name "gtk_notebook_current_page") - (return-type "gint") - (deprecated "use GtkNotebook.get_current_page") -) - -(define-method set_page - (of-object "GtkNotebook") - (c-name "gtk_notebook_set_page") - (return-type "none") - (parameters - '("gint" "page_num") - ) - (deprecated "use GtkNotebook.set_current_page") -) - - -(define-virtual switch_page - (of-object "GtkNotebook") - (return-type "none") - (parameters - '("GtkNotebookPage*" "page") - '("guint" "page_num") - ) -) -(define-virtual select_page - (of-object "GtkNotebook") - (return-type "gboolean") - (parameters - '("gboolean" "move_focus") - ) -) -(define-virtual focus_tab - (of-object "GtkNotebook") - (return-type "gboolean") - (parameters - '("GtkNotebookTab" "type") - ) -) -(define-virtual change_current_page - (of-object "GtkNotebook") - (return-type "none") - (parameters - '("gint" "offset") - ) -) -(define-virtual move_focus_out - (of-object "GtkNotebook") - (return-type "none") - (parameters - '("GtkDirectionType" "direction") - ) -) - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkobject.h - -(define-function gtk_object_get_type - (c-name "gtk_object_get_type") - (return-type "GType") -) - -(define-function object_new - (c-name "gtk_object_new") - (return-type "GtkObject*") - (parameters - '("GType" "type") - '("const-gchar*" "first_property_name") - ) - (varargs #t) -) - -(define-method sink - (of-object "GtkObject") - (c-name "gtk_object_sink") - (return-type "none") -) - -(define-method destroy - (of-object "GtkObject") - (c-name "gtk_object_destroy") - (return-type "none") -) - -(define-virtual set_arg - (of-object "GtkObject") - (return-type "none") - (parameters - '("GtkArg*" "arg") - '("guint" "arg_id") - ) -) -(define-virtual get_arg - (of-object "GtkObject") - (return-type "none") - (parameters - '("GtkArg*" "arg") - '("guint" "arg_id") - ) -) -(define-virtual destroy - (of-object "GtkObject") - (return-type "none") -) - -(define-method ref - (of-object "GtkObject") - (c-name "gtk_object_ref") - (return-type "GtkObject*") -) - -(define-method unref - (of-object "GtkObject") - (c-name "gtk_object_unref") - (return-type "none") -) - -(define-method weakref - (of-object "GtkObject") - (c-name "gtk_object_weakref") - (return-type "none") - (parameters - '("GtkDestroyNotify" "notify") - '("gpointer" "data") - ) -) - -(define-method weakunref - (of-object "GtkObject") - (c-name "gtk_object_weakunref") - (return-type "none") - (parameters - '("GtkDestroyNotify" "notify") - '("gpointer" "data") - ) -) - -(define-method set_data - (of-object "GtkObject") - (c-name "gtk_object_set_data") - (return-type "none") - (parameters - '("const-gchar*" "key") - '("gpointer" "data") - ) -) - -(define-method set_data_full - (of-object "GtkObject") - (c-name "gtk_object_set_data_full") - (return-type "none") - (parameters - '("const-gchar*" "key") - '("gpointer" "data") - '("GtkDestroyNotify" "destroy") - ) -) - -(define-method remove_data - (of-object "GtkObject") - (c-name "gtk_object_remove_data") - (return-type "none") - (parameters - '("const-gchar*" "key") - ) -) - -(define-method get_data - (of-object "GtkObject") - (c-name "gtk_object_get_data") - (return-type "gpointer") - (parameters - '("const-gchar*" "key") - ) -) - -(define-method remove_no_notify - (of-object "GtkObject") - (c-name "gtk_object_remove_no_notify") - (return-type "none") - (parameters - '("const-gchar*" "key") - ) -) -(define-method set_user_data - (of-object "GtkObject") - (c-name "gtk_object_set_user_data") - (return-type "none") - (parameters - '("gpointer" "data") - ) -) - -(define-method get_user_data - (of-object "GtkObject") - (c-name "gtk_object_get_user_data") - (return-type "gpointer") -) - -(define-method set_data_by_id - (of-object "GtkObject") - (c-name "gtk_object_set_data_by_id") - (return-type "none") - (parameters - '("GQuark" "data_id") - '("gpointer" "data") - ) -) - -(define-method set_data_by_id_full - (of-object "GtkObject") - (c-name "gtk_object_set_data_by_id_full") - (return-type "none") - (parameters - '("GQuark" "data_id") - '("gpointer" "data") - '("GtkDestroyNotify" "destroy") - ) -) - -(define-method get_data_by_id - (of-object "GtkObject") - (c-name "gtk_object_get_data_by_id") - (return-type "gpointer") - (parameters - '("GQuark" "data_id") - ) -) - -(define-method remove_data_by_id - (of-object "GtkObject") - (c-name "gtk_object_remove_data_by_id") - (return-type "none") - (parameters - '("GQuark" "data_id") - ) -) - -(define-method remove_no_notify_by_id - (of-object "GtkObject") - (c-name "gtk_object_remove_no_notify_by_id") - (return-type "none") - (parameters - '("GQuark" "key_id") - ) -) - -(define-method get - (of-object "GtkObject") - (c-name "gtk_object_get") - (return-type "none") - (parameters - '("const-gchar*" "first_property_name") - ) - (varargs #t) -) - -(define-method set - (of-object "GtkObject") - (c-name "gtk_object_set") - (return-type "none") - (parameters - '("const-gchar*" "first_property_name") - ) - (varargs #t) -) - -(define-function object_add_arg_type - (c-name "gtk_object_add_arg_type") - (return-type "none") - (parameters - '("const-gchar*" "arg_name") - '("GtkType" "arg_type") - '("guint" "arg_flags") - '("guint" "arg_id") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkoldeditable.h - -(define-function gtk_old_editable_get_type - (c-name "gtk_old_editable_get_type") - (return-type "GType") -) - -(define-method claim_selection - (of-object "GtkOldEditable") - (c-name "gtk_old_editable_claim_selection") - (return-type "none") - (parameters - '("gboolean" "claim") - '("guint32" "time" (default "GDK_CURRENT_TIME")) - ) -) - -(define-method changed - (of-object "GtkOldEditable") - (c-name "gtk_old_editable_changed") - (return-type "none") -) - -(define-virtual activate - (of-object "GtkOldEditable") - (return-type "none") -) - -(define-virtual set_editable - (of-object "GtkOldEditable") - (return-type "none") - (parameters - '("gboolean" "is_editable") - ) -) - -(define-virtual move_cursor - (of-object "GtkOldEditable") - (return-type "none") - (parameters - '("gint" "x") - '("gint" "y") - ) -) - -(define-virtual move_word - (of-object "GtkOldEditable") - (return-type "none") - (parameters - '("gint" "n") - ) -) - -(define-virtual move_page - (of-object "GtkOldEditable") - (return-type "none") - (parameters - '("gint" "x") - '("gint" "y") - ) -) - -(define-virtual move_to_row - (of-object "GtkOldEditable") - (return-type "none") - (parameters - '("gint" "row") - ) -) - -(define-virtual move_to_column - (of-object "GtkOldEditable") - (return-type "none") - (parameters - '("gint" "row") - ) -) - -(define-virtual kill_char - (of-object "GtkOldEditable") - (return-type "none") - (parameters - '("gint" "direction") - ) -) - -(define-virtual kill_word - (of-object "GtkOldEditable") - (return-type "none") - (parameters - '("gint" "direction") - ) -) - -(define-virtual kill_line - (of-object "GtkOldEditable") - (return-type "none") - (parameters - '("gint" "direction") - ) -) - -(define-virtual cut_clipboard - (of-object "GtkOldEditable") - (return-type "none") -) - -(define-virtual copy_clipboard - (of-object "GtkOldEditable") - (return-type "none") -) - -(define-virtual paste_clipboard - (of-object "GtkOldEditable") - (return-type "none") -) - -(define-virtual update_text - (of-object "GtkOldEditable") - (return-type "none") - (parameters - '("gint" "start_pos") - '("gint" "end_pos") - ) -) - -(define-virtual get_chars - (of-object "GtkOldEditable") - (return-type "gchar*") - (parameters - '("gint" "start_pos") - '("gint" "end_pos") - ) -) - -(define-virtual set_selection - (of-object "GtkOldEditable") - (return-type "none") - (parameters - '("gint" "start_pos") - '("gint" "end_pos") - ) -) - -(define-virtual set_position - (of-object "GtkOldEditable") - (return-type "none") - (parameters - '("gint" "position") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkoptionmenu.h - -(define-function gtk_option_menu_get_type - (c-name "gtk_option_menu_get_type") - (return-type "GType") -) - -(define-function gtk_option_menu_new - (c-name "gtk_option_menu_new") - (is-constructor-of "GtkOptionMenu") - (return-type "GtkWidget*") - (deprecated "use gtk.ComboBox") -) - -(define-method get_menu - (of-object "GtkOptionMenu") - (c-name "gtk_option_menu_get_menu") - (return-type "GtkWidget*") -) - -(define-method set_menu - (of-object "GtkOptionMenu") - (c-name "gtk_option_menu_set_menu") - (return-type "none") - (parameters - '("GtkWidget*" "menu") - ) -) - -(define-method remove_menu - (of-object "GtkOptionMenu") - (c-name "gtk_option_menu_remove_menu") - (return-type "none") -) - -(define-method get_history - (of-object "GtkOptionMenu") - (c-name "gtk_option_menu_get_history") - (return-type "gint") -) - -(define-method set_history - (of-object "GtkOptionMenu") - (c-name "gtk_option_menu_set_history") - (return-type "none") - (parameters - '("guint" "index") - ) -) - -(define-virtual changed - (of-object "GtkOptionMenu") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkpaned.h - -(define-function gtk_paned_get_type - (c-name "gtk_paned_get_type") - (return-type "GType") -) - -(define-method add1 - (of-object "GtkPaned") - (c-name "gtk_paned_add1") - (return-type "none") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-method add2 - (of-object "GtkPaned") - (c-name "gtk_paned_add2") - (return-type "none") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-method pack1 - (of-object "GtkPaned") - (c-name "gtk_paned_pack1") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("gboolean" "resize" (default "FALSE")) - '("gboolean" "shrink" (default "TRUE")) - ) -) - -(define-method pack2 - (of-object "GtkPaned") - (c-name "gtk_paned_pack2") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("gboolean" "resize" (default "TRUE")) - '("gboolean" "shrink" (default "TRUE")) - ) -) - -(define-method get_position - (of-object "GtkPaned") - (c-name "gtk_paned_get_position") - (return-type "gint") -) - -(define-method set_position - (of-object "GtkPaned") - (c-name "gtk_paned_set_position") - (return-type "none") - (parameters - '("gint" "position") - ) -) - -(define-method get_child1 - (of-object "GtkPaned") - (c-name "gtk_paned_get_child1") - (return-type "GtkWidget*") -) - -(define-method get_child2 - (of-object "GtkPaned") - (c-name "gtk_paned_get_child2") - (return-type "GtkWidget*") -) - -(define-method compute_position - (of-object "GtkPaned") - (c-name "gtk_paned_compute_position") - (return-type "none") - (parameters - '("gint" "allocation") - '("gint" "child1_req") - '("gint" "child2_req") - ) -) - -(define-virtual cycle_child_focus - (of-object "GtkPaned") - (return-type "gboolean") - (parameters - '("gboolean" "reverse") - ) -) -(define-virtual toggle_handle_focus - (of-object "GtkPaned") - (return-type "gboolean") -) -(define-virtual move_handle - (of-object "GtkPaned") - (return-type "gboolean") - (parameters - '("GtkScrollType" "scroll") - ) -) -(define-virtual cycle_handle_focus - (of-object "GtkPaned") - (return-type "gboolean") - (parameters - '("gboolean" "reverse") - ) -) -(define-virtual accept_position - (of-object "GtkPaned") - (return-type "gboolean") -) -(define-virtual cancel_position - (of-object "GtkPaned") - (return-type "gboolean") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkpixmap.h - -(define-function gtk_pixmap_get_type - (c-name "gtk_pixmap_get_type") - (return-type "GType") -) - -(define-function gtk_pixmap_new - (c-name "gtk_pixmap_new") - (is-constructor-of "GtkPixmap") - (return-type "GtkWidget*") - (parameters - '("GdkPixmap*" "pixmap") - '("GdkBitmap*" "mask" (null-ok)) - ) - (deprecated "use GtkImage") -) - -(define-method set - (of-object "GtkPixmap") - (c-name "gtk_pixmap_set") - (return-type "none") - (parameters - '("GdkPixmap*" "val") - '("GdkBitmap*" "mask" (null-ok)) - ) -) - -(define-method get - (of-object "GtkPixmap") - (c-name "gtk_pixmap_get") - (return-type "none") - (parameters - '("GdkPixmap**" "val") - '("GdkBitmap**" "mask") - ) -) - -(define-method set_build_insensitive - (of-object "GtkPixmap") - (c-name "gtk_pixmap_set_build_insensitive") - (return-type "none") - (parameters - '("gboolean" "build") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkplug.h - -(define-function gtk_plug_get_type - (c-name "gtk_plug_get_type") - (return-type "GType") -) - -(define-method construct - (of-object "GtkPlug") - (c-name "gtk_plug_construct") - (return-type "none") - (parameters - '("GdkNativeWindow" "socket_id") - ) -) - -(define-function gtk_plug_new - (c-name "gtk_plug_new") - (is-constructor-of "GtkPlug") - (return-type "GtkWidget*") - (parameters - '("GdkNativeWindow" "socket_id") - ) -) - -(define-method construct_for_display - (of-object "GtkPlug") - (c-name "gtk_plug_construct_for_display") - (return-type "none") - (parameters - '("GdkDisplay*" "display") - '("GdkNativeWindow" "socket_id") - ) -) - -(define-function plug_new_for_display - (c-name "gtk_plug_new_for_display") - (return-type "GtkWidget*") - (parameters - '("GdkDisplay*" "display") - '("GdkNativeWindow" "socket_id") - ) - (deprecated "use gtk.Plug(socket_id, display)") -) - -(define-method get_id - (of-object "GtkPlug") - (c-name "gtk_plug_get_id") - (return-type "GdkNativeWindow") -) - -(define-virtual embedded - (of-object "GtkPlug") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkpreview.h - -(define-function gtk_preview_get_type - (c-name "gtk_preview_get_type") - (return-type "GType") -) - -(define-function preview_uninit - (c-name "gtk_preview_uninit") - (return-type "none") - (deprecated "use GtkPixbuf") -) - -(define-function gtk_preview_new - (c-name "gtk_preview_new") - (is-constructor-of "GtkPreview") - (return-type "GtkWidget*") - (parameters - '("GtkPreviewType" "type") - ) - (deprecated "use GtkDrawingArea") -) - -(define-method size - (of-object "GtkPreview") - (c-name "gtk_preview_size") - (return-type "none") - (parameters - '("gint" "width") - '("gint" "height") - ) -) - -(define-method put - (of-object "GtkPreview") - (c-name "gtk_preview_put") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GdkGC*" "gc") - '("gint" "srcx") - '("gint" "srcy") - '("gint" "destx") - '("gint" "desty") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method draw_row - (of-object "GtkPreview") - (c-name "gtk_preview_draw_row") - (return-type "none") - (parameters - '("guchar*" "data") - '("gint" "x") - '("gint" "y") - '("gint" "w") - ) -) - -(define-method set_expand - (of-object "GtkPreview") - (c-name "gtk_preview_set_expand") - (return-type "none") - (parameters - '("gboolean" "expand") - ) -) - -(define-function preview_set_gamma - (c-name "gtk_preview_set_gamma") - (return-type "none") - (parameters - '("double" "gamma") - ) - (deprecated "use GtkPixbuf") -) - -(define-function preview_set_color_cube - (c-name "gtk_preview_set_color_cube") - (return-type "none") - (parameters - '("guint" "nred_shades") - '("guint" "ngreen_shades") - '("guint" "nblue_shades") - '("guint" "ngray_shades") - ) - (deprecated "use GtkPixbuf") -) - -(define-function preview_set_install_cmap - (c-name "gtk_preview_set_install_cmap") - (return-type "none") - (parameters - '("gint" "install_cmap") - ) - (deprecated "use GtkPixbuf") -) - -(define-function preview_set_reserved - (c-name "gtk_preview_set_reserved") - (return-type "none") - (parameters - '("gint" "nreserved") - ) - (deprecated "use GtkPixbuf") -) - -(define-method set_dither - (of-object "GtkPreview") - (c-name "gtk_preview_set_dither") - (return-type "none") - (parameters - '("GdkRgbDither" "dither") - ) - (deprecated "use GtkPixbuf") -) - -(define-function preview_get_visual - (c-name "gtk_preview_get_visual") - (return-type "GdkVisual*") - (deprecated "use GtkPixbuf") -) - -(define-function preview_get_cmap - (c-name "gtk_preview_get_cmap") - (return-type "GdkColormap*") - (deprecated "use GtkPixbuf") -) - -(define-function preview_get_info - (c-name "gtk_preview_get_info") - (return-type "GtkPreviewInfo*") - (deprecated "use GtkPixbuf") -) - -(define-function preview_reset - (c-name "gtk_preview_reset") - (return-type "none") - (deprecated "use GtkPixbuf") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkprivate.h - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkprogress.h - -(define-function gtk_progress_get_type - (c-name "gtk_progress_get_type") - (return-type "GType") -) - -(define-method set_show_text - (of-object "GtkProgress") - (c-name "gtk_progress_set_show_text") - (return-type "none") - (parameters - '("gboolean" "show_text") - ) - (deprecated "gtk.Progress.set_show_text is deprecated, use gtk.ProgressBar methods") -) - -(define-method set_text_alignment - (of-object "GtkProgress") - (c-name "gtk_progress_set_text_alignment") - (return-type "none") - (parameters - '("gfloat" "x_align") - '("gfloat" "y_align") - ) - (deprecated "gtk.Progress.set_text_alignment is deprecated, use gtk.ProgressBar methods") -) - -(define-method set_format_string - (of-object "GtkProgress") - (c-name "gtk_progress_set_format_string") - (return-type "none") - (parameters - '("const-gchar*" "format") - ) - (deprecated "gtk.Progress.set_format_string is deprecated, use gtk.ProgressBar methods") -) - -(define-method set_adjustment - (of-object "GtkProgress") - (c-name "gtk_progress_set_adjustment") - (return-type "none") - (parameters - '("GtkAdjustment*" "adjustment") - ) - (deprecated "gtk.Progress.set_adjustment is deprecated, use gtk.ProgressBar methods") -) - -(define-method configure - (of-object "GtkProgress") - (c-name "gtk_progress_configure") - (return-type "none") - (parameters - '("gdouble" "value") - '("gdouble" "min") - '("gdouble" "max") - ) - (deprecated "gtk.Progress.configure is deprecated, use gtk.ProgressBar methods") -) - -(define-method set_percentage - (of-object "GtkProgress") - (c-name "gtk_progress_set_percentage") - (return-type "none") - (parameters - '("gdouble" "percentage") - ) - (deprecated "gtk.Progress.set_percentage is deprecated, use gtk.ProgressBar methods") -) - -(define-method set_value - (of-object "GtkProgress") - (c-name "gtk_progress_set_value") - (return-type "none") - (parameters - '("gdouble" "value") - ) - (deprecated "gtk.Progress.set_value is deprecated, use gtk.ProgressBar methods") -) - -(define-method get_value - (of-object "GtkProgress") - (c-name "gtk_progress_get_value") - (return-type "gdouble") - (deprecated "gtk.Progress.get_value is deprecated, use gtk.ProgressBar methods") -) - -(define-method set_activity_mode - (of-object "GtkProgress") - (c-name "gtk_progress_set_activity_mode") - (return-type "none") - (parameters - '("gboolean" "activity_mode") - ) - (deprecated "gtk.Progress.set_activity_mode is deprecated, use gtk.ProgressBar methods") -) - -(define-method get_current_text - (of-object "GtkProgress") - (c-name "gtk_progress_get_current_text") - (return-type "gchar*") - (deprecated "gtk.Progress.get_current_text is deprecated, use gtk.ProgressBar methods") -) - -(define-method get_text_from_value - (of-object "GtkProgress") - (c-name "gtk_progress_get_text_from_value") - (return-type "gchar*") - (parameters - '("gdouble" "value") - ) - (deprecated "gtk.Progress.get_text_from_value is deprecated, use gtk.ProgressBar methods") -) - -(define-method get_current_percentage - (of-object "GtkProgress") - (c-name "gtk_progress_get_current_percentage") - (return-type "gdouble") - (deprecated "gtk.Progress.get_current_percentage is deprecated, use gtk.ProgressBar methods") -) - -(define-method get_percentage_from_value - (of-object "GtkProgress") - (c-name "gtk_progress_get_percentage_from_value") - (return-type "gdouble") - (parameters - '("gdouble" "value") - ) - (deprecated "gtk.Progress.get_percentage_from_value is deprecated, use gtk.ProgressBar methods") -) - -(define-virtual paint - (of-object "GtkProgress") - (return-type "none") -) -(define-virtual update - (of-object "GtkProgress") - (return-type "none") -) -(define-virtual act_mode_enter - (of-object "GtkProgress") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkprogressbar.h - -(define-function gtk_progress_bar_get_type - (c-name "gtk_progress_bar_get_type") - (return-type "GType") -) - -(define-function gtk_progress_bar_new - (c-name "gtk_progress_bar_new") - (is-constructor-of "GtkProgressBar") - (return-type "GtkWidget*") -) - -(define-method pulse - (of-object "GtkProgressBar") - (c-name "gtk_progress_bar_pulse") - (return-type "none") -) - -(define-method set_text - (of-object "GtkProgressBar") - (c-name "gtk_progress_bar_set_text") - (return-type "none") - (parameters - '("const-gchar*" "text") - ) -) - -(define-method set_fraction - (of-object "GtkProgressBar") - (c-name "gtk_progress_bar_set_fraction") - (return-type "none") - (parameters - '("gdouble" "fraction") - ) -) - -(define-method set_pulse_step - (of-object "GtkProgressBar") - (c-name "gtk_progress_bar_set_pulse_step") - (return-type "none") - (parameters - '("gdouble" "fraction") - ) -) - -(define-method set_orientation - (of-object "GtkProgressBar") - (c-name "gtk_progress_bar_set_orientation") - (return-type "none") - (parameters - '("GtkProgressBarOrientation" "orientation") - ) -) - -(define-method get_text - (of-object "GtkProgressBar") - (c-name "gtk_progress_bar_get_text") - (return-type "const-gchar*") -) - -(define-method get_fraction - (of-object "GtkProgressBar") - (c-name "gtk_progress_bar_get_fraction") - (return-type "gdouble") -) - -(define-method get_pulse_step - (of-object "GtkProgressBar") - (c-name "gtk_progress_bar_get_pulse_step") - (return-type "gdouble") -) - -(define-method get_orientation - (of-object "GtkProgressBar") - (c-name "gtk_progress_bar_get_orientation") - (return-type "GtkProgressBarOrientation") -) - -(define-function gtk_progress_bar_new_with_adjustment - (c-name "gtk_progress_bar_new_with_adjustment") - (is-constructor-of "GtkProgressBar") - (return-type "GtkWidget*") - (parameters - '("GtkAdjustment*" "adjustment" (null-ok) (default "NULL")) - ) - (deprecated "") -) - -(define-method set_bar_style - (of-object "GtkProgressBar") - (c-name "gtk_progress_bar_set_bar_style") - (return-type "none") - (parameters - '("GtkProgressBarStyle" "style") - ) - (deprecated "") -) - -(define-method set_discrete_blocks - (of-object "GtkProgressBar") - (c-name "gtk_progress_bar_set_discrete_blocks") - (return-type "none") - (parameters - '("guint" "blocks") - ) - (deprecated "") -) - -(define-method set_activity_step - (of-object "GtkProgressBar") - (c-name "gtk_progress_bar_set_activity_step") - (return-type "none") - (parameters - '("guint" "step") - ) - (deprecated "") -) - -(define-method set_activity_blocks - (of-object "GtkProgressBar") - (c-name "gtk_progress_bar_set_activity_blocks") - (return-type "none") - (parameters - '("guint" "blocks") - ) - (deprecated "") -) - -(define-method update - (of-object "GtkProgressBar") - (c-name "gtk_progress_bar_update") - (return-type "none") - (parameters - '("gfloat" "percentage") - ) - (deprecated "") -) - -(define-method set_ellipsize - (of-object "GtkProgressBar") - (c-name "gtk_progress_bar_set_ellipsize") - (return-type "none") - (parameters - '("PangoEllipsizeMode" "mode") - ) -) - -(define-method get_ellipsize - (of-object "GtkProgressBar") - (c-name "gtk_progress_bar_get_ellipsize") - (return-type "PangoEllipsizeMode") -) - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkradioaction.h - -(define-function gtk_radio_action_get_type - (c-name "gtk_radio_action_get_type") - (return-type "GType") -) - -(define-function gtk_radio_action_new - (c-name "gtk_radio_action_new") - (is-constructor-of "GtkRadioAction") - (return-type "GtkRadioAction*") - (properties - '("name") - '("label") - '("tooltip") - '("stock_id") - '("value") - ) -) - -(define-method set_group - (of-object "GtkRadioAction") - (c-name "gtk_radio_action_set_group") - (return-type "none") - (parameters - '("GSList*" "group") - ) -) - -(define-method get_group - (of-object "GtkRadioAction") - (c-name "gtk_radio_action_get_group") - (return-type "GSList*") -) - -(define-method get_current_value - (of-object "GtkRadioAction") - (c-name "gtk_radio_action_get_current_value") - (return-type "gint") -) - -(define-virtual changed - (of-object "GtkRadioAction") - (return-type "none") - (parameters - '("GtkRadioAction*" "current") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkradiobutton.h - -(define-function gtk_radio_button_get_type - (c-name "gtk_radio_button_get_type") - (return-type "GType") -) - -(define-function gtk_radio_button_new - (c-name "gtk_radio_button_new") - (is-constructor-of "GtkRadioButton") - (return-type "GtkWidget*") - (parameters - '("GSList*" "group") - ) -) - -(define-function radio_button_new_from_widget - (is-constructor-of "GtkRadioButton") - (c-name "gtk_radio_button_new_from_widget") - (return-type "GtkWidget*") - (parameters - '("GtkRadioButton*" "group") - ) -) - -(define-function radio_button_new_with_label - (c-name "gtk_radio_button_new_with_label") - (is-constructor-of "GtkRadioButton") - (return-type "GtkWidget*") - (parameters - '("GSList*" "group") - '("const-gchar*" "label") - ) -) - -(define-function radio_button_new_with_label_from_widget - (c-name "gtk_radio_button_new_with_label_from_widget") - (is-constructor-of "GtkRadioButton") - (return-type "GtkWidget*") - (parameters - '("GtkRadioButton" "*group") - '("const-gchar*" "label") - ) -) - -(define-function radio_button_new_with_mnemonic - (c-name "gtk_radio_button_new_with_mnemonic") - (is-constructor-of "GtkRadioButton") - (return-type "GtkWidget*") - (parameters - '("GSList*" "group") - '("const-gchar*" "label") - ) -) - -(define-function radio_button_new_with_mnemonic_from_widget - (c-name "gtk_radio_button_new_with_mnemonic_from_widget") - (is-constructor-of "GtkRadioButton") - (return-type "GtkWidget*") - (parameters - '("GtkRadioButton" "*group") - '("const-gchar*" "label") - ) -) - -(define-method get_group - (of-object "GtkRadioButton") - (c-name "gtk_radio_button_get_group") - (return-type "GSList*") -) - -(define-method set_group - (of-object "GtkRadioButton") - (c-name "gtk_radio_button_set_group") - (return-type "none") - (parameters - '("GSList*" "group") - ) -) - -(define-method group - (of-object "GtkRadioButton") - (c-name "gtk_radio_button_group") - (return-type "GSList*") - (deprecated "use GtkRadioButton.get_group") -) - -(define-virtual group_changed - (of-object "GtkRadioButton") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkradiomenuitem.h - -(define-function gtk_radio_menu_item_get_type - (c-name "gtk_radio_menu_item_get_type") - (return-type "GType") -) - -(define-function gtk_radio_menu_item_new - (c-name "gtk_radio_menu_item_new") - (is-constructor-of "GtkRadioMenuItem") - (return-type "GtkWidget*") - (parameters - '("GSList*" "group") - ) -) - -(define-function gtk_radio_menu_item_new_with_label - (c-name "gtk_radio_menu_item_new_with_label") - (is-constructor-of "GtkRadioMenuItem") - (return-type "GtkWidget*") - (parameters - '("GSList*" "group") - '("const-gchar*" "label") - ) -) - -(define-function gtk_radio_menu_item_new_with_mnemonic - (c-name "gtk_radio_menu_item_new_with_mnemonic") - (is-constructor-of "GtkRadioMenuItem") - (return-type "GtkWidget*") - (parameters - '("GSList*" "group") - '("const-gchar*" "label") - ) -) - -(define-method new_from_widget - (of-object "GtkRadioMenuItem") - (c-name "gtk_radio_menu_item_new_from_widget") - (caller-owns-return #t) - (return-type "GtkWidget*") -) - -(define-method new_with_mnemonic_from_widget - (of-object "GtkRadioMenuItem") - (c-name "gtk_radio_menu_item_new_with_mnemonic_from_widget") - (return-type "GtkWidget*") - (caller-owns-return #t) - (parameters - '("const-gchar*" "label") - ) -) - -(define-method new_with_label_from_widget - (of-object "GtkRadioMenuItem") - (c-name "gtk_radio_menu_item_new_with_label_from_widget") - (return-type "GtkWidget*") - (caller-owns-return #t) - (parameters - '("const-gchar*" "label") - ) -) - -(define-method get_group - (of-object "GtkRadioMenuItem") - (c-name "gtk_radio_menu_item_get_group") - (return-type "GSList*") -) - -(define-method set_group - (of-object "GtkRadioMenuItem") - (c-name "gtk_radio_menu_item_set_group") - (return-type "none") - (parameters - '("GSList*" "group") - ) -) - -(define-method group - (of-object "GtkRadioMenuItem") - (c-name "gtk_radio_menu_item_group") - (return-type "GSList*") - (deprecated "use GtkRadioMenuItem.get_group") -) - -(define-virtual group_changed - (of-object "GtkRadioMenuItem") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkradiotoolbutton.h - -(define-function gtk_radio_tool_button_get_type - (c-name "gtk_radio_tool_button_get_type") - (return-type "GType") -) - -(define-function gtk_radio_tool_button_new - (c-name "gtk_radio_tool_button_new") - (is-constructor-of "GtkRadioToolButton") - (return-type "GtkToolItem*") -) - -(define-function radio_tool_button_new_from_stock - (c-name "gtk_radio_tool_button_new_from_stock") - (is-constructor-of "GtkRadioToolButton") - (return-type "GtkToolItem*") - (parameters - '("const-gchar*" "stock_id") - ) -) - -(define-function radio_tool_button_new_from_widget - (c-name "gtk_radio_tool_button_new_from_widget") - (is-constructor-of "GtkRadioToolButton") - (return-type "GtkToolItem*") - (parameters - '("GtkRadioToolButton*" "group") - ) -) - -(define-function radio_tool_button_new_with_stock_from_widget - (c-name "gtk_radio_tool_button_new_with_stock_from_widget") - (is-constructor-of "GtkRadioToolButton") - (return-type "GtkToolItem*") - (parameters - '("GtkRadioToolButton*" "group") - '("const-gchar*" "stock_id") - ) -) - -(define-method set_group - (of-object "GtkRadioToolButton") - (c-name "gtk_radio_tool_button_set_group") - (return-type "none") - (parameters - '("GSList*" "group") - ) -) - -(define-method get_group - (of-object "GtkRadioToolButton") - (c-name "gtk_radio_tool_button_get_group") - (return-type "GSList*") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkrange.h - -(define-function gtk_range_get_type - (c-name "gtk_range_get_type") - (return-type "GType") -) - -(define-method set_update_policy - (of-object "GtkRange") - (c-name "gtk_range_set_update_policy") - (return-type "none") - (parameters - '("GtkUpdateType" "policy") - ) -) - -(define-method get_update_policy - (of-object "GtkRange") - (c-name "gtk_range_get_update_policy") - (return-type "GtkUpdateType") -) - -(define-method set_adjustment - (of-object "GtkRange") - (c-name "gtk_range_set_adjustment") - (return-type "none") - (parameters - '("GtkAdjustment*" "adjustment") - ) -) - -(define-method get_adjustment - (of-object "GtkRange") - (c-name "gtk_range_get_adjustment") - (return-type "GtkAdjustment*") -) - -(define-method set_inverted - (of-object "GtkRange") - (c-name "gtk_range_set_inverted") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_inverted - (of-object "GtkRange") - (c-name "gtk_range_get_inverted") - (return-type "gboolean") -) - -(define-method set_increments - (of-object "GtkRange") - (c-name "gtk_range_set_increments") - (return-type "none") - (parameters - '("gdouble" "step") - '("gdouble" "page") - ) -) - -(define-method set_range - (of-object "GtkRange") - (c-name "gtk_range_set_range") - (return-type "none") - (parameters - '("gdouble" "min") - '("gdouble" "max") - ) -) - -(define-method set_value - (of-object "GtkRange") - (c-name "gtk_range_set_value") - (return-type "none") - (parameters - '("gdouble" "value") - ) -) - -(define-method get_value - (of-object "GtkRange") - (c-name "gtk_range_get_value") - (return-type "gdouble") -) - - -(define-virtual value_changed - (of-object "GtkRange") - (return-type "none") -) -(define-virtual adjust_bounds - (of-object "GtkRange") - (return-type "none") - (parameters - '("gdouble" "new_value") - ) -) -(define-virtual move_slider - (of-object "GtkRange") - (return-type "none") - (parameters - '("GtkScrollType" "scroll") - ) -) -(define-virtual get_range_border - (of-object "GtkRange") - (return-type "none") - (parameters - '("GtkBorder*" "border_") - ) -) -(define-virtual change_value - (of-object "GtkRange") - (return-type "gboolean") - (parameters - '("GtkScrollType" "scroll") - '("gdouble" "new_value") - ) -) - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkrc.h - -(define-function rc_add_default_file - (c-name "gtk_rc_add_default_file") - (return-type "none") - (parameters - '("const-gchar*" "filename") - ) -) - -(define-function rc_set_default_files - (c-name "gtk_rc_set_default_files") - (return-type "none") - (parameters - '("gchar**" "filenames") - ) -) - -(define-function rc_get_default_files - (c-name "gtk_rc_get_default_files") - (return-type "gchar**") -) - -(define-method rc_get_style - (of-object "GtkWidget") - (c-name "gtk_rc_get_style") - (return-type "GtkStyle*") -) - -(define-function rc_get_style_by_paths - (c-name "gtk_rc_get_style_by_paths") - (return-type "GtkStyle*") - (parameters - '("GtkSettings*" "settings") - '("const-char*" "widget_path") - '("const-char*" "class_path") - '("GType" "type") - ) -) - -(define-function rc_reparse_all_for_settings - (c-name "gtk_rc_reparse_all_for_settings") - (return-type "gboolean") - (parameters - '("GtkSettings*" "settings") - '("gboolean" "force_load") - ) -) - -(define-function rc_reset_styles - (c-name "gtk_rc_reset_styles") - (return-type "none") - (parameters - '("GtkSettings*" "settings") - ) -) - -(define-function rc_find_pixmap_in_path - (c-name "gtk_rc_find_pixmap_in_path") - (return-type "gchar*") - (parameters - '("GtkSettings*" "settings") - '("GScanner*" "scanner") - '("const-gchar*" "pixmap_file") - ) -) - -(define-function rc_parse - (c-name "gtk_rc_parse") - (return-type "none") - (parameters - '("const-gchar*" "filename") - ) -) - -(define-function rc_parse_string - (c-name "gtk_rc_parse_string") - (return-type "none") - (parameters - '("const-gchar*" "rc_string") - ) -) - -(define-function rc_reparse_all - (c-name "gtk_rc_reparse_all") - (return-type "gboolean") -) - -(define-method rc_add_widget_name_style - (of-object "GtkRcStyle") - (c-name "gtk_rc_add_widget_name_style") - (return-type "none") - (parameters - '("const-gchar*" "pattern") - ) - (deprecated "") -) - -(define-method rc_add_widget_class_style - (of-object "GtkRcStyle") - (c-name "gtk_rc_add_widget_class_style") - (return-type "none") - (parameters - '("const-gchar*" "pattern") - ) - (deprecated "") -) - -(define-method rc_add_class_style - (of-object "GtkRcStyle") - (c-name "gtk_rc_add_class_style") - (return-type "none") - (parameters - '("const-gchar*" "pattern") - ) - (deprecated "") -) - - -(define-function gtk_rc_style_get_type - (c-name "gtk_rc_style_get_type") - (return-type "GType") -) - -(define-function gtk_rc_style_new - (c-name "gtk_rc_style_new") - (is-constructor-of "GtkRCStyle") - (return-type "GtkRcStyle*") -) - -(define-method copy - (of-object "GtkRcStyle") - (c-name "gtk_rc_style_copy") - (return-type "GtkRcStyle*") - (caller-owns-return #t) -) - -(define-method ref - (of-object "GtkRcStyle") - (c-name "gtk_rc_style_ref") - (return-type "none") -) - -(define-method unref - (of-object "GtkRcStyle") - (c-name "gtk_rc_style_unref") - (return-type "none") -) - -(define-virtual create_rc_style - (of-object "GtkRcStyle") - (return-type "GtkRcStyle*") -) - -(define-virtual parse - (of-object "GtkRcStyle") - (return-type "guint") - (parameters - '("GtkSettings*" "settings") - '("GScanner*" "scanner") - ) -) -(define-virtual merge - (of-object "GtkRcStyle") - (return-type "none") - (parameters - '("GtkRcStyle*" "src") - ) -) - -(define-virtual create_style - (of-object "GtkRcStyle") - (return-type "GtkStyle*") -) - -(define-function rc_find_module_in_path - (c-name "gtk_rc_find_module_in_path") - (return-type "gchar*") - (parameters - '("const-gchar*" "module_file") - ) -) - -(define-function rc_get_theme_dir - (c-name "gtk_rc_get_theme_dir") - (return-type "gchar*") -) - -(define-function rc_get_module_dir - (c-name "gtk_rc_get_module_dir") - (return-type "gchar*") -) - -(define-function rc_get_im_module_path - (c-name "gtk_rc_get_im_module_path") - (return-type "gchar*") -) - -(define-function rc_get_im_module_file - (c-name "gtk_rc_get_im_module_file") - (return-type "gchar*") -) - -(define-function rc_scanner_new - (c-name "gtk_rc_scanner_new") - (is-constructor-of "GtkRcScanner") - (return-type "GScanner*") -) - -(define-function rc_parse_color - (c-name "gtk_rc_parse_color") - (return-type "guint") - (parameters - '("GScanner*" "scanner") - '("GdkColor*" "color") - ) -) - -(define-function rc_parse_state - (c-name "gtk_rc_parse_state") - (return-type "guint") - (parameters - '("GScanner*" "scanner") - '("GtkStateType*" "state") - ) -) - -(define-function rc_parse_priority - (c-name "gtk_rc_parse_priority") - (return-type "guint") - (parameters - '("GScanner*" "scanner") - '("GtkPathPriorityType*" "priority") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkruler.h - -(define-function gtk_ruler_get_type - (c-name "gtk_ruler_get_type") - (return-type "GType") -) - -(define-method set_metric - (of-object "GtkRuler") - (c-name "gtk_ruler_set_metric") - (return-type "none") - (parameters - '("GtkMetricType" "metric") - ) -) - -(define-method set_range - (of-object "GtkRuler") - (c-name "gtk_ruler_set_range") - (return-type "none") - (parameters - '("gdouble" "lower") - '("gdouble" "upper") - '("gdouble" "position") - '("gdouble" "max_size") - ) -) - -(define-method draw_ticks - (of-object "GtkRuler") - (c-name "gtk_ruler_draw_ticks") - (return-type "none") -) - -(define-method draw_pos - (of-object "GtkRuler") - (c-name "gtk_ruler_draw_pos") - (return-type "none") -) - -(define-method get_metric - (of-object "GtkRuler") - (c-name "gtk_ruler_get_metric") - (return-type "GtkMetricType") -) - -(define-method get_range - (of-object "GtkRuler") - (c-name "gtk_ruler_get_range") - (return-type "none") - (parameters - '("gdouble*" "lower") - '("gdouble*" "upper") - '("gdouble*" "position") - '("gdouble*" "max_size") - ) -) - -(define-virtual draw_ticks - (of-object "GtkRuler") - (return-type "none") -) -(define-virtual draw_pos - (of-object "GtkRuler") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkscale.h - -(define-function gtk_scale_get_type - (c-name "gtk_scale_get_type") - (return-type "GType") -) - -(define-method set_digits - (of-object "GtkScale") - (c-name "gtk_scale_set_digits") - (return-type "none") - (parameters - '("gint" "digits") - ) -) - -(define-method get_digits - (of-object "GtkScale") - (c-name "gtk_scale_get_digits") - (return-type "gint") -) - -(define-method set_draw_value - (of-object "GtkScale") - (c-name "gtk_scale_set_draw_value") - (return-type "none") - (parameters - '("gboolean" "draw_value") - ) -) - -(define-method get_draw_value - (of-object "GtkScale") - (c-name "gtk_scale_get_draw_value") - (return-type "gboolean") -) - -(define-method set_value_pos - (of-object "GtkScale") - (c-name "gtk_scale_set_value_pos") - (return-type "none") - (parameters - '("GtkPositionType" "pos") - ) -) - -(define-method get_value_pos - (of-object "GtkScale") - (c-name "gtk_scale_get_value_pos") - (return-type "GtkPositionType") -) - -(define-method get_layout - (of-object "GtkScale") - (c-name "gtk_scale_get_layout") - (return-type "PangoLayout*") -) - -(define-method get_layout_offsets - (of-object "GtkScale") - (c-name "gtk_scale_get_layout_offsets") - (return-type "none") - (parameters - '("gint*" "x") - '("gint*" "y") - ) -) - -(define-virtual format_value - (of-object "GtkScale") - (return-type "gchar*") - (parameters - '("gdouble" "value") - ) -) - -(define-virtual draw_value - (of-object "GtkScale") - (return-type "none") -) -(define-virtual get_layout_offsets - (of-object "GtkScale") - (return-type "none") - (parameters - '("gint*" "x") - '("gint*" "y") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkscrollbar.h - -(define-function gtk_scrollbar_get_type - (c-name "gtk_scrollbar_get_type") - (return-type "GType") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkscrolledwindow.h - -(define-function gtk_scrolled_window_get_type - (c-name "gtk_scrolled_window_get_type") - (return-type "GType") -) - -(define-function gtk_scrolled_window_new - (c-name "gtk_scrolled_window_new") - (is-constructor-of "GtkScrolledWindow") - (return-type "GtkWidget*") - (properties - '("hadjustment" (optional)) - '("vadjustment" (optional)) - ) -) - -(define-method set_hadjustment - (of-object "GtkScrolledWindow") - (c-name "gtk_scrolled_window_set_hadjustment") - (return-type "none") - (parameters - '("GtkAdjustment*" "hadjustment") - ) -) - -(define-method set_vadjustment - (of-object "GtkScrolledWindow") - (c-name "gtk_scrolled_window_set_vadjustment") - (return-type "none") - (parameters - '("GtkAdjustment*" "hadjustment") - ) -) - -(define-method get_hadjustment - (of-object "GtkScrolledWindow") - (c-name "gtk_scrolled_window_get_hadjustment") - (return-type "GtkAdjustment*") -) - -(define-method get_vadjustment - (of-object "GtkScrolledWindow") - (c-name "gtk_scrolled_window_get_vadjustment") - (return-type "GtkAdjustment*") -) - -(define-method get_hscrollbar - (of-object "GtkScrolledWindow") - (c-name "gtk_scrolled_window_get_hscrollbar") - (return-type "GtkWidget*") -) - -(define-method get_vscrollbar - (of-object "GtkScrolledWindow") - (c-name "gtk_scrolled_window_get_vscrollbar") - (return-type "GtkWidget*") -) - -(define-method set_policy - (of-object "GtkScrolledWindow") - (c-name "gtk_scrolled_window_set_policy") - (return-type "none") - (parameters - '("GtkPolicyType" "hscrollbar_policy") - '("GtkPolicyType" "vscrollbar_policy") - ) -) - -(define-method get_policy - (of-object "GtkScrolledWindow") - (c-name "gtk_scrolled_window_get_policy") - (return-type "none") - (parameters - '("GtkPolicyType*" "hscrollbar_policy") - '("GtkPolicyType*" "vscrollbar_policy") - ) -) - -(define-method set_placement - (of-object "GtkScrolledWindow") - (c-name "gtk_scrolled_window_set_placement") - (return-type "none") - (parameters - '("GtkCornerType" "window_placement") - ) -) - -(define-method get_placement - (of-object "GtkScrolledWindow") - (c-name "gtk_scrolled_window_get_placement") - (return-type "GtkCornerType") -) - -(define-method set_shadow_type - (of-object "GtkScrolledWindow") - (c-name "gtk_scrolled_window_set_shadow_type") - (return-type "none") - (parameters - '("GtkShadowType" "type") - ) -) - -(define-method get_shadow_type - (of-object "GtkScrolledWindow") - (c-name "gtk_scrolled_window_get_shadow_type") - (return-type "GtkShadowType") -) - -(define-method add_with_viewport - (of-object "GtkScrolledWindow") - (c-name "gtk_scrolled_window_add_with_viewport") - (return-type "none") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-virtual scroll_child - (of-object "GtkScrolledWindow") - (return-type "none") - (parameters - '("GtkScrollType" "scroll") - '("gboolean" "horizontal") - ) -) -(define-virtual move_focus_out - (of-object "GtkScrolledWindow") - (return-type "none") - (parameters - '("GtkDirectionType" "direction") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkselection.h - -(define-function gtk_target_list_new - (c-name "gtk_target_list_new") - (is-constructor-of "GtkTargetList") - (return-type "GtkTargetList*") - (parameters - '("const-GtkTargetEntry*" "targets") - '("guint" "ntargets") - ) -) - -(define-method ref - (of-object "GtkTargetList") - (c-name "gtk_target_list_ref") - (return-type "none") -) - -(define-method unref - (of-object "GtkTargetList") - (c-name "gtk_target_list_unref") - (return-type "none") -) - -(define-method add - (of-object "GtkTargetList") - (c-name "gtk_target_list_add") - (return-type "none") - (parameters - '("GdkAtom" "target") - '("guint" "flags") - '("guint" "info") - ) -) - -(define-method add_table - (of-object "GtkTargetList") - (c-name "gtk_target_list_add_table") - (return-type "none") - (parameters - '("const-GtkTargetEntry*" "targets") - '("guint" "ntargets") - ) -) - -(define-method remove - (of-object "GtkTargetList") - (c-name "gtk_target_list_remove") - (return-type "none") - (parameters - '("GdkAtom" "target") - ) -) - -(define-method find - (of-object "GtkTargetList") - (c-name "gtk_target_list_find") - (return-type "gboolean") - (parameters - '("GdkAtom" "target") - '("guint*" "info") - ) -) - -(define-method selection_owner_set - (of-object "GtkWidget") - (c-name "gtk_selection_owner_set") - (return-type "gboolean") - (parameters - '("GdkAtom" "selection") - '("guint32" "time" (default "GDK_CURRENT_TIME")) - ) -) - -(define-function selection_owner_set_for_display - (c-name "gtk_selection_owner_set_for_display") - (return-type "gboolean") - (parameters - '("GdkDisplay*" "display") - '("GtkWidget*" "widget" (null-ok)) - '("GdkAtom" "selection") - '("guint32" "time" (default "GDK_CURRENT_TIME")) - ) -) - -(define-method selection_add_target - (of-object "GtkWidget") - (c-name "gtk_selection_add_target") - (return-type "none") - (parameters - '("GdkAtom" "selection") - '("GdkAtom" "target") - '("guint" "info") - ) -) - -(define-method selection_add_targets - (of-object "GtkWidget") - (c-name "gtk_selection_add_targets") - (return-type "none") - (parameters - '("GdkAtom" "selection") - '("const-GtkTargetEntry*" "targets") - '("guint" "ntargets") - ) -) - -(define-method selection_clear_targets - (of-object "GtkWidget") - (c-name "gtk_selection_clear_targets") - (return-type "none") - (parameters - '("GdkAtom" "selection") - ) -) - -(define-method selection_convert - (of-object "GtkWidget") - (c-name "gtk_selection_convert") - (return-type "gboolean") - (parameters - '("GdkAtom" "selection") - '("GdkAtom" "target") - '("guint32" "time" (default "GDK_CURRENT_TIME")) - ) -) - -(define-method set - (of-object "GtkSelectionData") - (c-name "gtk_selection_data_set") - (return-type "none") - (parameters - '("GdkAtom" "type") - '("gint" "format") - '("const-guchar*" "data") - '("gint" "length") - ) -) - -(define-method set_text - (of-object "GtkSelectionData") - (c-name "gtk_selection_data_set_text") - (return-type "gboolean") - (parameters - '("const-gchar*" "str") - '("gint" "len" (default "-1")) - ) -) - -(define-method get_text - (of-object "GtkSelectionData") - (c-name "gtk_selection_data_get_text") - (return-type "guchar*") -) - -(define-method get_targets - (of-object "GtkSelectionData") - (c-name "gtk_selection_data_get_targets") - (return-type "gboolean") - (parameters - '("GdkAtom**" "targets") - '("gint*" "n_atoms") - ) -) - -(define-method targets_include_text - (of-object "GtkSelectionData") - (c-name "gtk_selection_data_targets_include_text") - (return-type "gboolean") -) - -(define-method selection_remove_all - (of-object "GtkWidget") - (c-name "gtk_selection_remove_all") - (return-type "none") -) - -(define-method selection_clear - (of-object "GtkWidget") - (c-name "gtk_selection_clear") - (return-type "gboolean") - (parameters - '("GdkEventSelection*" "event") - ) -) - -(define-function gtk_selection_data_get_type - (c-name "gtk_selection_data_get_type") - (return-type "GType") -) - -(define-method copy - (of-object "GtkSelectionData") - (c-name "gtk_selection_data_copy") - (return-type "GtkSelectionData*") - (caller-owns-return #t) -) - -(define-method free - (of-object "GtkSelectionData") - (c-name "gtk_selection_data_free") - (return-type "none") -) - -(define-method set_pixbuf - (of-object "GtkSelectionData") - (c-name "gtk_selection_data_set_pixbuf") - (return-type "gboolean") - (parameters - '("GdkPixbuf*" "pixbuf") - ) -) - -(define-method get_pixbuf - (of-object "GtkSelectionData") - (c-name "gtk_selection_data_get_pixbuf") - (return-type "GdkPixbuf*") -) - -(define-method set_uris - (of-object "GtkSelectionData") - (c-name "gtk_selection_data_set_uris") - (return-type "gboolean") - (parameters - '("gchar**" "uris") - ) -) - -(define-method get_uris - (of-object "GtkSelectionData") - (c-name "gtk_selection_data_get_uris") - (return-type "gchar**") -) - - -(define-method targets_include_image - (of-object "GtkSelectionData") - (c-name "gtk_selection_data_targets_include_image") - (return-type "gboolean") - (parameters - '("gboolean" "writable") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkseparator.h - -(define-function gtk_separator_get_type - (c-name "gtk_separator_get_type") - (return-type "GType") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkseparatormenuitem.h - -(define-function gtk_separator_menu_item_get_type - (c-name "gtk_separator_menu_item_get_type") - (return-type "GType") -) - -(define-function gtk_separator_menu_item_new - (c-name "gtk_separator_menu_item_new") - (is-constructor-of "GtkSeparatorMenuItem") - (return-type "GtkWidget*") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkseparatortoolitem.h - -(define-function gtk_separator_tool_item_get_type - (c-name "gtk_separator_tool_item_get_type") - (return-type "GType") -) - -(define-function gtk_separator_tool_item_new - (c-name "gtk_separator_tool_item_new") - (is-constructor-of "GtkSeparatorToolItem") - (return-type "GtkToolItem*") -) - -(define-method get_draw - (of-object "GtkSeparatorToolItem") - (c-name "gtk_separator_tool_item_get_draw") - (return-type "gboolean") -) - -(define-method set_draw - (of-object "GtkSeparatorToolItem") - (c-name "gtk_separator_tool_item_set_draw") - (return-type "none") - (parameters - '("gboolean" "draw") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtksettings.h - -(define-function gtk_settings_get_type - (c-name "gtk_settings_get_type") - (return-type "GType") -) - -(define-function settings_get_default - (c-name "gtk_settings_get_default") - (return-type "GtkSettings*") -) - -(define-function settings_get_for_screen - (c-name "gtk_settings_get_for_screen") - (return-type "GtkSettings*") - (parameters - '("GdkScreen*" "screen") - ) -) - -(define-function settings_install_property - (c-name "gtk_settings_install_property") - (return-type "none") - (parameters - '("GParamSpec*" "pspec") - ) -) - -(define-function settings_install_property_parser - (c-name "gtk_settings_install_property_parser") - (return-type "none") - (parameters - '("GParamSpec*" "pspec") - '("GtkRcPropertyParser" "parser") - ) -) - -(define-function rc_property_parse_color - (c-name "gtk_rc_property_parse_color") - (return-type "gboolean") - (parameters - '("const-GParamSpec*" "pspec") - '("const-GString*" "gstring") - '("GValue*" "property_value") - ) -) - -(define-function rc_property_parse_enum - (c-name "gtk_rc_property_parse_enum") - (return-type "gboolean") - (parameters - '("const-GParamSpec*" "pspec") - '("const-GString*" "gstring") - '("GValue*" "property_value") - ) -) - -(define-function rc_property_parse_flags - (c-name "gtk_rc_property_parse_flags") - (return-type "gboolean") - (parameters - '("const-GParamSpec*" "pspec") - '("const-GString*" "gstring") - '("GValue*" "property_value") - ) -) - -(define-function rc_property_parse_requisition - (c-name "gtk_rc_property_parse_requisition") - (return-type "gboolean") - (parameters - '("const-GParamSpec*" "pspec") - '("const-GString*" "gstring") - '("GValue*" "property_value") - ) -) - -(define-function rc_property_parse_border - (c-name "gtk_rc_property_parse_border") - (return-type "gboolean") - (parameters - '("const-GParamSpec*" "pspec") - '("const-GString*" "gstring") - '("GValue*" "property_value") - ) -) - -(define-method set_property_value - (of-object "GtkSettings") - (c-name "gtk_settings_set_property_value") - (return-type "none") - (parameters - '("const-gchar*" "name") - '("const-GtkSettingsValue*" "svalue") - ) -) - -(define-method set_string_property - (of-object "GtkSettings") - (c-name "gtk_settings_set_string_property") - (return-type "none") - (parameters - '("const-gchar*" "name") - '("const-gchar*" "v_string") - '("const-gchar*" "origin") - ) -) - -(define-method set_long_property - (of-object "GtkSettings") - (c-name "gtk_settings_set_long_property") - (return-type "none") - (parameters - '("const-gchar*" "name") - '("glong" "v_long") - '("const-gchar*" "origin") - ) -) - -(define-method set_double_property - (of-object "GtkSettings") - (c-name "gtk_settings_set_double_property") - (return-type "none") - (parameters - '("const-gchar*" "name") - '("gdouble" "v_double") - '("const-gchar*" "origin") - ) -) - - -;; From /mondo/local/gtk-2.10/include/gtk-2.0/gtk/gtksignal.h - -(define-function signal_newv - (c-name "gtk_signal_newv") - (return-type "guint") - (parameters - '("const-gchar*" "name") - '("GtkSignalRunType" "signal_flags") - '("GtkType" "object_type") - '("guint" "function_offset") - '("GtkSignalMarshaller" "marshaller") - '("GtkType" "return_val") - '("guint" "n_args") - '("GtkType*" "args") - ) -) - -(define-function signal_new - (c-name "gtk_signal_new") - (return-type "guint") - (parameters - '("const-gchar*" "name") - '("GtkSignalRunType" "signal_flags") - '("GtkType" "object_type") - '("guint" "function_offset") - '("GtkSignalMarshaller" "marshaller") - '("GtkType" "return_val") - '("guint" "n_args") - ) - (varargs #t) -) - -(define-function signal_emit_stop_by_name - (c-name "gtk_signal_emit_stop_by_name") - (return-type "none") - (parameters - '("GtkObject*" "object") - '("const-gchar*" "name") - ) -) - -(define-function signal_connect_object_while_alive - (c-name "gtk_signal_connect_object_while_alive") - (return-type "none") - (parameters - '("GtkObject*" "object") - '("const-gchar*" "name") - '("GtkSignalFunc" "func") - '("GtkObject*" "alive_object") - ) -) - -(define-function signal_connect_while_alive - (c-name "gtk_signal_connect_while_alive") - (return-type "none") - (parameters - '("GtkObject*" "object") - '("const-gchar*" "name") - '("GtkSignalFunc" "func") - '("gpointer" "func_data") - '("GtkObject*" "alive_object") - ) -) - -(define-function signal_connect_full - (c-name "gtk_signal_connect_full") - (return-type "gulong") - (parameters - '("GtkObject*" "object") - '("const-gchar*" "name") - '("GtkSignalFunc" "func") - '("GtkCallbackMarshal" "unsupported") - '("gpointer" "data") - '("GtkDestroyNotify" "destroy_func") - '("gint" "object_signal") - '("gint" "after") - ) -) - -(define-function signal_emitv - (c-name "gtk_signal_emitv") - (return-type "none") - (parameters - '("GtkObject*" "object") - '("guint" "signal_id") - '("GtkArg*" "args") - ) -) - -(define-function signal_emit - (c-name "gtk_signal_emit") - (return-type "none") - (parameters - '("GtkObject*" "object") - '("guint" "signal_id") - ) - (varargs #t) -) - -(define-function signal_emit_by_name - (c-name "gtk_signal_emit_by_name") - (return-type "none") - (parameters - '("GtkObject*" "object") - '("const-gchar*" "name") - ) - (varargs #t) -) - -(define-function signal_emitv_by_name - (c-name "gtk_signal_emitv_by_name") - (return-type "none") - (parameters - '("GtkObject*" "object") - '("const-gchar*" "name") - '("GtkArg*" "args") - ) -) - -(define-function signal_compat_matched - (c-name "gtk_signal_compat_matched") - (return-type "none") - (parameters - '("GtkObject*" "object") - '("GtkSignalFunc" "func") - '("gpointer" "data") - '("GSignalMatchType" "match") - '("guint" "action") - ) -) - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtksizegroup.h - -(define-function gtk_size_group_get_type - (c-name "gtk_size_group_get_type") - (return-type "GType") -) - -(define-function size_group_new - (c-name "gtk_size_group_new") - (is-constructor-of "GtkSizeGroup") - (return-type "GtkSizeGroup*") - (properties - '("mode") - ) -) - -(define-method set_mode - (of-object "GtkSizeGroup") - (c-name "gtk_size_group_set_mode") - (return-type "none") - (parameters - '("GtkSizeGroupMode" "mode") - ) -) - -(define-method get_mode - (of-object "GtkSizeGroup") - (c-name "gtk_size_group_get_mode") - (return-type "GtkSizeGroupMode") -) - -(define-method set_ignore_hidden - (of-object "GtkSizeGroup") - (c-name "gtk_size_group_set_ignore_hidden") - (return-type "none") - (parameters - '("gboolean" "ignore_hidden") - ) -) - -(define-method get_ignore_hidden - (of-object "GtkSizeGroup") - (c-name "gtk_size_group_get_ignore_hidden") - (return-type "gboolean") -) - -(define-method add_widget - (of-object "GtkSizeGroup") - (c-name "gtk_size_group_add_widget") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - ) -) - -(define-method remove_widget - (of-object "GtkSizeGroup") - (c-name "gtk_size_group_remove_widget") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtksocket.h - -(define-function gtk_socket_get_type - (c-name "gtk_socket_get_type") - (return-type "GType") -) - -(define-function gtk_socket_new - (c-name "gtk_socket_new") - (is-constructor-of "GtkSocket") - (return-type "GtkWidget*") -) - -(define-method add_id - (of-object "GtkSocket") - (c-name "gtk_socket_add_id") - (return-type "none") - (parameters - '("GdkNativeWindow" "window_id") - ) -) - -(define-method get_id - (of-object "GtkSocket") - (c-name "gtk_socket_get_id") - (return-type "GdkNativeWindow") -) - -(define-method steal - (of-object "GtkSocket") - (c-name "gtk_socket_steal") - (return-type "none") - (parameters - '("GdkNativeWindow" "wid") - ) - (deprecated "") -) - -(define-virtual plug_added - (of-object "GtkSocket") - (return-type "none") -) -(define-virtual plug_removed - (of-object "GtkSocket") - (return-type "gboolean") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkspinbutton.h - -(define-function gtk_spin_button_get_type - (c-name "gtk_spin_button_get_type") - (return-type "GType") -) - -(define-method configure - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_configure") - (return-type "none") - (parameters - '("GtkAdjustment*" "adjustment" (null-ok)) - '("gdouble" "climb_rate") - '("guint" "digits") - ) -) - -(define-function gtk_spin_button_new - (c-name "gtk_spin_button_new") - (is-constructor-of "GtkSpinButton") - (return-type "GtkWidget*") - (properties - '("adjustment" (optional)) - '("climb_rate" (optional)) - '("digits" (optional)) - ) -) - -(define-function gtk_spin_button_new_with_range - (c-name "gtk_spin_button_new_with_range") - (is-constructor-of "GtkSpinButton") - (return-type "GtkWidget*") - (parameters - '("gdouble" "min") - '("gdouble" "max") - '("gdouble" "step") - ) -) - -(define-method set_adjustment - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_set_adjustment") - (return-type "none") - (parameters - '("GtkAdjustment*" "adjustment") - ) -) - -(define-method get_adjustment - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_get_adjustment") - (return-type "GtkAdjustment*") -) - -(define-method set_digits - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_set_digits") - (return-type "none") - (parameters - '("guint" "digits") - ) -) - -(define-method get_digits - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_get_digits") - (return-type "guint") -) - -(define-method set_increments - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_set_increments") - (return-type "none") - (parameters - '("gdouble" "step") - '("gdouble" "page") - ) -) - -(define-method get_increments - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_get_increments") - (return-type "none") - (parameters - '("gdouble*" "step") - '("gdouble*" "page") - ) -) - -(define-method set_range - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_set_range") - (return-type "none") - (parameters - '("gdouble" "min") - '("gdouble" "max") - ) -) - -(define-method get_range - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_get_range") - (return-type "none") - (parameters - '("gdouble*" "min") - '("gdouble*" "max") - ) -) - -(define-method get_value - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_get_value") - (return-type "gdouble") -) - -(define-method get_value_as_int - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_get_value_as_int") - (return-type "gint") -) - -(define-method set_value - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_set_value") - (return-type "none") - (parameters - '("gdouble" "value") - ) -) - -(define-method set_update_policy - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_set_update_policy") - (return-type "none") - (parameters - '("GtkSpinButtonUpdatePolicy" "policy") - ) -) - -(define-method get_update_policy - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_get_update_policy") - (return-type "guint") -) - -(define-method set_numeric - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_set_numeric") - (return-type "none") - (parameters - '("gboolean" "numeric") - ) -) - -(define-method get_numeric - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_get_numeric") - (return-type "gboolean") -) - -(define-method spin - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_spin") - (return-type "none") - (parameters - '("GtkSpinType" "direction") - '("gdouble" "increment" (default "1")) - ) -) - -(define-method set_wrap - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_set_wrap") - (return-type "none") - (parameters - '("gboolean" "wrap") - ) -) - -(define-method get_wrap - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_get_wrap") - (return-type "gboolean") -) - -(define-method set_snap_to_ticks - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_set_snap_to_ticks") - (return-type "none") - (parameters - '("gboolean" "snap_to_ticks") - ) -) - -(define-method get_snap_to_ticks - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_get_snap_to_ticks") - (return-type "gboolean") -) - -(define-method update - (of-object "GtkSpinButton") - (c-name "gtk_spin_button_update") - (return-type "none") -) - -(define-virtual input - (of-object "GtkSpinButton") - (return-type "gint") - (parameters - '("gdouble*" "new_value" (direction "out")) - ) -) -(define-virtual output - (of-object "GtkSpinButton") - (return-type "gint") -) -(define-virtual value_changed - (of-object "GtkSpinButton") - (return-type "none") -) -(define-virtual change_value - (of-object "GtkSpinButton") - (return-type "none") - (parameters - '("GtkScrollType" "scroll") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkstatusbar.h - -(define-function gtk_statusbar_get_type - (c-name "gtk_statusbar_get_type") - (return-type "GType") -) - -(define-function gtk_statusbar_new - (c-name "gtk_statusbar_new") - (is-constructor-of "GtkStatusbar") - (return-type "GtkWidget*") -) - -(define-method get_context_id - (of-object "GtkStatusbar") - (c-name "gtk_statusbar_get_context_id") - (return-type "guint") - (parameters - '("const-gchar*" "context_description") - ) -) - -(define-method push - (of-object "GtkStatusbar") - (c-name "gtk_statusbar_push") - (return-type "guint") - (parameters - '("guint" "context_id") - '("const-gchar*" "text") - ) -) - -(define-method pop - (of-object "GtkStatusbar") - (c-name "gtk_statusbar_pop") - (return-type "none") - (parameters - '("guint" "context_id") - ) -) - -(define-method remove - (of-object "GtkStatusbar") - (c-name "gtk_statusbar_remove") - (return-type "none") - (parameters - '("guint" "context_id") - '("guint" "message_id") - ) -) - -(define-method set_has_resize_grip - (of-object "GtkStatusbar") - (c-name "gtk_statusbar_set_has_resize_grip") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_has_resize_grip - (of-object "GtkStatusbar") - (c-name "gtk_statusbar_get_has_resize_grip") - (return-type "gboolean") -) - -(define-virtual text_pushed - (of-object "GtkStatusbar") - (return-type "none") - (parameters - '("guint" "context_id") - '("const-gchar*" "text") - ) -) -(define-virtual text_popped - (of-object "GtkStatusbar") - (return-type "none") - (parameters - '("guint" "context_id") - '("const-gchar*" "text") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkstock.h - -(define-function stock_add - (c-name "gtk_stock_add") - (return-type "none") - (parameters - '("const-GtkStockItem*" "items") - '("guint" "n_items") - ) -) - -(define-function stock_add_static - (c-name "gtk_stock_add_static") - (return-type "none") - (parameters - '("const-GtkStockItem*" "items") - '("guint" "n_items") - ) -) - -(define-function stock_lookup - (c-name "gtk_stock_lookup") - (return-type "gboolean") - (parameters - '("const-gchar*" "stock_id") - '("GtkStockItem*" "item") - ) -) - -(define-function stock_list_ids - (c-name "gtk_stock_list_ids") - (return-type "GSList*") -) - -(define-method copy - (of-object "GtkStockItem") - (c-name "gtk_stock_item_copy") - (return-type "GtkStockItem*") - (caller-owns-return #t) -) - -(define-method free - (of-object "GtkStockItem") - (c-name "gtk_stock_item_free") - (return-type "none") -) - -(define-function stock_set_translate_func - (c-name "gtk_stock_set_translate_func") - (return-type "none") - (parameters - '("const-gchar*" "domain") - '("GtkTranslateFunc" "func") - '("gpointer" "data") - '("GtkDestroyNotify" "notify") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkstyle.h - -(define-function gtk_style_get_type - (c-name "gtk_style_get_type") - (return-type "GType") -) - -(define-function gtk_style_new - (c-name "gtk_style_new") - (is-constructor-of "GtkStyle") - (return-type "GtkStyle*") -) - -(define-method copy - (of-object "GtkStyle") - (c-name "gtk_style_copy") - (return-type "GtkStyle*") - (caller-owns-return #t) -) - -(define-method attach - (of-object "GtkStyle") - (c-name "gtk_style_attach") - (return-type "GtkStyle*") - (parameters - '("GdkWindow*" "window") - ) -) - -(define-method detach - (of-object "GtkStyle") - (c-name "gtk_style_detach") - (return-type "none") -) - -(define-method ref - (of-object "GtkStyle") - (c-name "gtk_style_ref") - (return-type "GtkStyle*") - (deprecated "") -) - -(define-method unref - (of-object "GtkStyle") - (c-name "gtk_style_unref") - (return-type "none") - (deprecated "") -) - -(define-method get_font - (of-object "GtkStyle") - (c-name "gtk_style_get_font") - (return-type "GdkFont*") - (deprecated "") -) - -(define-method set_font - (of-object "GtkStyle") - (c-name "gtk_style_set_font") - (return-type "none") - (parameters - '("GdkFont*" "font") - ) - (deprecated "") -) - -(define-method set_background - (of-object "GtkStyle") - (c-name "gtk_style_set_background") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - ) -) - -(define-method apply_default_background - (of-object "GtkStyle") - (c-name "gtk_style_apply_default_background") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("gboolean" "set_bg") - '("GtkStateType" "state_type") - '("GdkRectangle*" "area" (null-ok)) - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method lookup_icon_set - (of-object "GtkStyle") - (c-name "gtk_style_lookup_icon_set") - (return-type "GtkIconSet*") - (parameters - '("const-gchar*" "stock_id") - ) -) - -(define-method render_icon - (of-object "GtkStyle") - (c-name "gtk_style_render_icon") - (return-type "GdkPixbuf*") - (parameters - '("const-GtkIconSource*" "source") - '("GtkTextDirection" "direction") - '("GtkStateType" "state") - '("GtkIconSize" "size") - '("GtkWidget*" "widget" (null-ok) (default "NULL")) - '("const-gchar*" "detail" (null-ok) (default "NULL")) - ) -) - -(define-method draw_hline - (of-object "GtkStyle") - (c-name "gtk_draw_hline") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("gint" "x1") - '("gint" "x2") - '("gint" "y") - ) - (deprecated "") -) - -(define-method draw_vline - (of-object "GtkStyle") - (c-name "gtk_draw_vline") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("gint" "y1") - '("gint" "y2") - '("gint" "x") - ) - (deprecated "") -) - -(define-method draw_shadow - (of-object "GtkStyle") - (c-name "gtk_draw_shadow") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) - (deprecated "") -) - -(define-method draw_polygon - (of-object "GtkStyle") - (c-name "gtk_draw_polygon") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkPoint*" "points") - '("gint" "npoints") - '("gboolean" "fill") - ) - (deprecated "") -) - -(define-method draw_arrow - (of-object "GtkStyle") - (c-name "gtk_draw_arrow") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GtkArrowType" "arrow_type") - '("gboolean" "fill") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) - (deprecated "") -) - -(define-method draw_diamond - (of-object "GtkStyle") - (c-name "gtk_draw_diamond") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) - (deprecated "") -) - -(define-method draw_box - (of-object "GtkStyle") - (c-name "gtk_draw_box") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) - (deprecated "") -) - -(define-method draw_flat_box - (of-object "GtkStyle") - (c-name "gtk_draw_flat_box") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) - (deprecated "") -) - -(define-method draw_check - (of-object "GtkStyle") - (c-name "gtk_draw_check") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method draw_option - (of-object "GtkStyle") - (c-name "gtk_draw_option") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) - (deprecated "") -) - -(define-method draw_tab - (of-object "GtkStyle") - (c-name "gtk_draw_tab") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) - (deprecated "") -) - -(define-method draw_shadow_gap - (of-object "GtkStyle") - (c-name "gtk_draw_shadow_gap") - (return-type "none") - (parameters - '("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") - ) - (deprecated "") -) - -(define-method draw_box_gap - (of-object "GtkStyle") - (c-name "gtk_draw_box_gap") - (return-type "none") - (parameters - '("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") - ) - (deprecated "") -) - -(define-method draw_extension - (of-object "GtkStyle") - (c-name "gtk_draw_extension") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("GtkPositionType" "gap_side") - ) - (deprecated "") -) - -(define-method draw_focus - (of-object "GtkStyle") - (c-name "gtk_draw_focus") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) - (deprecated "") -) - -(define-method draw_slider - (of-object "GtkStyle") - (c-name "gtk_draw_slider") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("GtkOrientation" "orientation") - ) - (deprecated "") -) - -(define-method draw_handle - (of-object "GtkStyle") - (c-name "gtk_draw_handle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("GtkOrientation" "orientation") - ) - (deprecated "") -) - -(define-method draw_expander - (of-object "GtkStyle") - (c-name "gtk_draw_expander") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("gint" "x") - '("gint" "y") - '("gboolean" "is_open") - ) - (deprecated "") -) - -(define-method draw_layout - (of-object "GtkStyle") - (c-name "gtk_draw_layout") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("gboolean" "use_text") - '("gint" "x") - '("gint" "y") - '("PangoLayout*" "layout") - ) - (deprecated "") -) - -(define-method draw_resize_grip - (of-object "GtkStyle") - (c-name "gtk_draw_resize_grip") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GdkWindowEdge" "edge") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) - (deprecated "") -) - -(define-method paint_hline - (of-object "GtkStyle") - (c-name "gtk_paint_hline") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GdkRectangle*" "area" (null-ok)) - '("GtkWidget*" "widget" (null-ok)) - '("const-gchar*" "detail" (null-ok)) - '("gint" "x1") - '("gint" "x2") - '("gint" "y") - ) -) - -(define-method paint_vline - (of-object "GtkStyle") - (c-name "gtk_paint_vline") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GdkRectangle*" "area" (null-ok)) - '("GtkWidget*" "widget" (null-ok)) - '("const-gchar*" "detail" (null-ok)) - '("gint" "y1") - '("gint" "y2") - '("gint" "x") - ) -) - -(define-method paint_shadow - (of-object "GtkStyle") - (c-name "gtk_paint_shadow") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area" (null-ok)) - '("GtkWidget*" "widget" (null-ok)) - '("const-gchar*" "detail" (null-ok)) - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method paint_polygon - (of-object "GtkStyle") - (c-name "gtk_paint_polygon") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area" (null-ok)) - '("GtkWidget*" "widget" (null-ok)) - '("const-gchar*" "detail" (null-ok)) - '("GdkPoint*" "points") - '("gint" "npoints") - '("gboolean" "fill") - ) -) - -(define-method paint_arrow - (of-object "GtkStyle") - (c-name "gtk_paint_arrow") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area" (null-ok)) - '("GtkWidget*" "widget" (null-ok)) - '("const-gchar*" "detail" (null-ok)) - '("GtkArrowType" "arrow_type") - '("gboolean" "fill") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method paint_diamond - (of-object "GtkStyle") - (c-name "gtk_paint_diamond") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area" (null-ok)) - '("GtkWidget*" "widget" (null-ok)) - '("const-gchar*" "detail" (null-ok)) - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method paint_box - (of-object "GtkStyle") - (c-name "gtk_paint_box") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area" (null-ok)) - '("GtkWidget*" "widget" (null-ok)) - '("const-gchar*" "detail" (null-ok)) - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method paint_flat_box - (of-object "GtkStyle") - (c-name "gtk_paint_flat_box") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area" (null-ok)) - '("GtkWidget*" "widget" (null-ok)) - '("const-gchar*" "detail" (null-ok)) - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method paint_check - (of-object "GtkStyle") - (c-name "gtk_paint_check") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area" (null-ok)) - '("GtkWidget*" "widget" (null-ok)) - '("const-gchar*" "detail" (null-ok)) - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method paint_option - (of-object "GtkStyle") - (c-name "gtk_paint_option") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area" (null-ok)) - '("GtkWidget*" "widget" (null-ok)) - '("const-gchar*" "detail" (null-ok)) - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method paint_tab - (of-object "GtkStyle") - (c-name "gtk_paint_tab") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area" (null-ok)) - '("GtkWidget*" "widget" (null-ok)) - '("const-gchar*" "detail" (null-ok)) - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method paint_shadow_gap - (of-object "GtkStyle") - (c-name "gtk_paint_shadow_gap") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area" (null-ok)) - '("GtkWidget*" "widget" (null-ok)) - '("gchar*" "detail" (null-ok)) - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("GtkPositionType" "gap_side") - '("gint" "gap_x") - '("gint" "gap_width") - ) -) - -(define-method paint_box_gap - (of-object "GtkStyle") - (c-name "gtk_paint_box_gap") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area" (null-ok)) - '("GtkWidget*" "widget" (null-ok)) - '("gchar*" "detail" (null-ok)) - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("GtkPositionType" "gap_side") - '("gint" "gap_x") - '("gint" "gap_width") - ) -) - -(define-method paint_extension - (of-object "GtkStyle") - (c-name "gtk_paint_extension") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area" (null-ok)) - '("GtkWidget*" "widget" (null-ok)) - '("gchar*" "detail" (null-ok)) - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("GtkPositionType" "gap_side") - ) -) - -(define-method paint_focus - (of-object "GtkStyle") - (c-name "gtk_paint_focus") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GdkRectangle*" "area" (null-ok)) - '("GtkWidget*" "widget" (null-ok)) - '("const-gchar*" "detail" (null-ok)) - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method paint_slider - (of-object "GtkStyle") - (c-name "gtk_paint_slider") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area" (null-ok)) - '("GtkWidget*" "widget" (null-ok)) - '("const-gchar*" "detail" (null-ok)) - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("GtkOrientation" "orientation") - ) -) - -(define-method paint_handle - (of-object "GtkStyle") - (c-name "gtk_paint_handle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area" (null-ok)) - '("GtkWidget*" "widget" (null-ok)) - '("const-gchar*" "detail" (null-ok)) - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("GtkOrientation" "orientation") - ) -) - -(define-method paint_expander - (of-object "GtkStyle") - (c-name "gtk_paint_expander") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GdkRectangle*" "area" (null-ok)) - '("GtkWidget*" "widget" (null-ok)) - '("const-gchar*" "detail" (null-ok)) - '("gint" "x") - '("gint" "y") - '("GtkExpanderStyle" "expander_style") - ) -) - -(define-method paint_layout - (of-object "GtkStyle") - (c-name "gtk_paint_layout") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("gboolean" "use_text") - '("GdkRectangle*" "area" (null-ok)) - '("GtkWidget*" "widget" (null-ok)) - '("const-gchar*" "detail" (null-ok)) - '("gint" "x") - '("gint" "y") - '("PangoLayout*" "layout") - ) -) - -(define-method paint_resize_grip - (of-object "GtkStyle") - (c-name "gtk_paint_resize_grip") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GdkRectangle*" "area" (null-ok)) - '("GtkWidget*" "widget" (null-ok)) - '("const-gchar*" "detail" (null-ok)) - '("GdkWindowEdge" "edge") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-function gtk_border_get_type - (c-name "gtk_border_get_type") - (return-type "GType") -) - -(define-method copy - (of-object "GtkBorder") - (c-name "gtk_border_copy") - (return-type "GtkBorder*") - (caller-owns-return #t) -) - -(define-method free - (of-object "GtkBorder") - (c-name "gtk_border_free") - (return-type "none") -) - -(define-method apply_default_pixmap - (of-object "GtkStyle") - (c-name "gtk_style_apply_default_pixmap") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("gboolean" "set_bg") - '("GdkRectangle*" "area") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) - (deprecated "use GtkStyle.apply_default_background") -) - -(define-method draw_string - (of-object "GtkStyle") - (c-name "gtk_draw_string") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("gint" "x") - '("gint" "y") - '("const-gchar*" "string") - ) - (deprecated "") -) - -(define-method paint_string - (of-object "GtkStyle") - (c-name "gtk_paint_string") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GdkRectangle*" "area" (null-ok)) - '("GtkWidget*" "widget" (null-ok)) - '("const-gchar*" "detail" (null-ok)) - '("gint" "x") - '("gint" "y") - '("const-gchar*" "string") - ) - (deprecated "") -) - -(define-function draw_insertion_cursor - (c-name "gtk_draw_insertion_cursor") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - '("GdkDrawable*" "drawable") - '("GdkRectangle*" "area" (null-ok)) - '("GdkRectangle*" "location") - '("gboolean" "is_primary") - '("GtkTextDirection" "direction") - '("gboolean" "draw_arrow") - ) -) - -(define-virtual realize - (of-object "GtkStyle") - (return-type "none") -) -(define-virtual unrealize - (of-object "GtkStyle") - (return-type "none") -) -(define-virtual copy - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GtkStyle*" "src") - ) -) -(define-virtual clone - (of-object "GtkStyle") - (return-type "GtkStyle*") -) - -(define-virtual init_from_rc - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GtkRcStyle*" "rc_style") - ) -) -(define-virtual set_background - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - ) -) -(define-virtual render_icon - (of-object "GtkStyle") - (return-type "GdkPixbuf*") - (parameters - '("const-GtkIconSource*" "source") - '("GtkTextDirection" "direction") - '("GtkStateType" "state") - '("GtkIconSize" "size") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - ) -) - -(define-virtual draw_hline - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GdkRectangle*" "area") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - '("gint" "x1") - '("gint" "x2") - '("gint" "y") - ) -) -(define-virtual draw_vline - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GdkRectangle*" "area") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - '("gint" "y1_") - '("gint" "y2_") - '("gint" "x") - ) -) -(define-virtual draw_shadow - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) -(define-virtual draw_polygon - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - '("GdkPoint*" "point") - '("gint" "npoints") - '("gboolean" "fill") - ) -) -(define-virtual draw_arrow - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - '("GtkArrowType" "arrow_type") - '("gboolean" "fill") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) -(define-virtual draw_diamond - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) -(define-virtual draw_string - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GdkRectangle*" "area") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - '("gint" "x") - '("gint" "y") - '("const-gchar*" "string") - ) -) -(define-virtual draw_box - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) -(define-virtual draw_flat_box - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) -(define-virtual draw_check - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) -(define-virtual draw_option - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) -(define-virtual draw_tab - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) -(define-virtual draw_shadow_gap - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("GtkPositionType" "gap_side") - '("gint" "gap_x") - '("gint" "gap_width") - ) -) -(define-virtual draw_box_gap - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("GtkPositionType" "gap_side") - '("gint" "gap_x") - '("gint" "gap_width") - ) -) -(define-virtual draw_extension - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("GtkPositionType" "gap_side") - ) -) -(define-virtual draw_focus - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GdkRectangle*" "area") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) -(define-virtual draw_slider - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("GtkOrientation" "orientation") - ) -) -(define-virtual draw_handle - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GtkShadowType" "shadow_type") - '("GdkRectangle*" "area") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("GtkOrientation" "orientation") - ) -) -(define-virtual draw_expander - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GdkRectangle*" "area") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - '("gint" "x") - '("gint" "y") - '("GtkExpanderStyle" "expander_style") - ) -) -(define-virtual draw_layout - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("gboolean" "use_text") - '("GdkRectangle*" "area") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - '("gint" "x") - '("gint" "y") - '("PangoLayout*" "layout") - ) -) -(define-virtual draw_resize_grip - (of-object "GtkStyle") - (return-type "none") - (parameters - '("GdkWindow*" "window") - '("GtkStateType" "state_type") - '("GdkRectangle*" "area") - '("GtkWidget*" "widget") - '("const-gchar*" "detail") - '("GdkWindowEdge" "edge") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktable.h - -(define-function gtk_table_get_type - (c-name "gtk_table_get_type") - (return-type "GType") -) - -(define-function gtk_table_new - (c-name "gtk_table_new") - (is-constructor-of "GtkTable") - (return-type "GtkWidget*") - (properties - '("n_rows" (argname "rows") (optional)) - '("n_columns" (argname "columns") (optional)) - '("homogeneous" (optional)) - ) -) - -(define-method resize - (of-object "GtkTable") - (c-name "gtk_table_resize") - (return-type "none") - (parameters - '("guint" "rows") - '("guint" "columns") - ) -) - -(define-method attach - (of-object "GtkTable") - (c-name "gtk_table_attach") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("guint" "left_attach") - '("guint" "right_attach") - '("guint" "top_attach") - '("guint" "bottom_attach") - '("GtkAttachOptions" "xoptions" (default "GTK_EXPAND|GTK_FILL")) - '("GtkAttachOptions" "yoptions" (default "GTK_EXPAND|GTK_FILL")) - '("guint" "xpadding" (default "0")) - '("guint" "ypadding" (default "0")) - ) -) - -(define-method attach_defaults - (of-object "GtkTable") - (c-name "gtk_table_attach_defaults") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - '("guint" "left_attach") - '("guint" "right_attach") - '("guint" "top_attach") - '("guint" "bottom_attach") - ) - (deprecated "use attach instead") -) - -(define-method set_row_spacing - (of-object "GtkTable") - (c-name "gtk_table_set_row_spacing") - (return-type "none") - (parameters - '("guint" "row") - '("guint" "spacing") - ) -) - -(define-method get_row_spacing - (of-object "GtkTable") - (c-name "gtk_table_get_row_spacing") - (return-type "guint") - (parameters - '("guint" "row") - ) -) - -(define-method set_col_spacing - (of-object "GtkTable") - (c-name "gtk_table_set_col_spacing") - (return-type "none") - (parameters - '("guint" "column") - '("guint" "spacing") - ) -) - -(define-method get_col_spacing - (of-object "GtkTable") - (c-name "gtk_table_get_col_spacing") - (return-type "guint") - (parameters - '("guint" "column") - ) -) - -(define-method set_row_spacings - (of-object "GtkTable") - (c-name "gtk_table_set_row_spacings") - (return-type "none") - (parameters - '("guint" "spacing") - ) -) - -(define-method get_default_row_spacing - (of-object "GtkTable") - (c-name "gtk_table_get_default_row_spacing") - (return-type "guint") -) - -(define-method set_col_spacings - (of-object "GtkTable") - (c-name "gtk_table_set_col_spacings") - (return-type "none") - (parameters - '("guint" "spacing") - ) -) - -(define-method get_default_col_spacing - (of-object "GtkTable") - (c-name "gtk_table_get_default_col_spacing") - (return-type "guint") -) - -(define-method set_homogeneous - (of-object "GtkTable") - (c-name "gtk_table_set_homogeneous") - (return-type "none") - (parameters - '("gboolean" "homogeneous") - ) -) - -(define-method get_homogeneous - (of-object "GtkTable") - (c-name "gtk_table_get_homogeneous") - (return-type "gboolean") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktearoffmenuitem.h - -(define-function gtk_tearoff_menu_item_get_type - (c-name "gtk_tearoff_menu_item_get_type") - (return-type "GType") -) - -(define-function gtk_tearoff_menu_item_new - (c-name "gtk_tearoff_menu_item_new") - (is-constructor-of "GtkTearoffMenuItem") - (return-type "GtkWidget*") -) - - -(define-function text_get_type - (c-name "gtk_text_get_type") - (return-type "GtkType") -) - -(define-function text_new - (c-name "gtk_text_new") - (is-constructor-of "GtkText") - (return-type "GtkWidget*") - (parameters - '("GtkAdjustment*" "hadj") - '("GtkAdjustment*" "vadj") - ) -) - -(define-method set_editable - (of-object "GtkText") - (c-name "gtk_text_set_editable") - (return-type "none") - (parameters - '("gboolean" "editable") - ) -) - -(define-method set_word_wrap - (of-object "GtkText") - (c-name "gtk_text_set_word_wrap") - (return-type "none") - (parameters - '("gboolean" "word_wrap") - ) -) - -(define-method set_line_wrap - (of-object "GtkText") - (c-name "gtk_text_set_line_wrap") - (return-type "none") - (parameters - '("gboolean" "line_wrap") - ) -) - -(define-method set_adjustments - (of-object "GtkText") - (c-name "gtk_text_set_adjustments") - (return-type "none") - (parameters - '("GtkAdjustment*" "hadj") - '("GtkAdjustment*" "vadj") - ) -) - -(define-method set_point - (of-object "GtkText") - (c-name "gtk_text_set_point") - (return-type "none") - (parameters - '("guint" "index") - ) -) - -(define-method get_point - (of-object "GtkText") - (c-name "gtk_text_get_point") - (return-type "guint") -) - -(define-method get_length - (of-object "GtkText") - (c-name "gtk_text_get_length") - (return-type "guint") -) - -(define-method freeze - (of-object "GtkText") - (c-name "gtk_text_freeze") - (return-type "none") -) - -(define-method thaw - (of-object "GtkText") - (c-name "gtk_text_thaw") - (return-type "none") -) - -(define-method insert - (of-object "GtkText") - (c-name "gtk_text_insert") - (return-type "none") - (parameters - '("GdkFont*" "font") - '("const-GdkColor*" "fore") - '("const-GdkColor*" "back") - '("const-char*" "chars") - '("gint" "length") - ) -) - -(define-method backward_delete - (of-object "GtkText") - (c-name "gtk_text_backward_delete") - (return-type "gboolean") - (parameters - '("guint" "nchars") - ) -) - -(define-method forward_delete - (of-object "GtkText") - (c-name "gtk_text_forward_delete") - (return-type "gboolean") - (parameters - '("guint" "nchars") - ) -) - -(define-virtual set_scroll_adjustments - (of-object "GtkText") - (return-type "none") - (parameters - '("GtkAdjustment*" "hadjustment") - '("GtkAdjustment*" "vadjustment") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktextbuffer.h - -(define-function gtk_text_buffer_get_type - (c-name "gtk_text_buffer_get_type") - (return-type "GType") -) - -(define-function gtk_text_buffer_new - (c-name "gtk_text_buffer_new") - (is-constructor-of "GtkTextBuffer") - (return-type "GtkTextBuffer*") - (properties - '("tag_table" (argname "table") (optional)) - ) -) - -(define-method get_line_count - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_line_count") - (return-type "gint") -) - -(define-method get_char_count - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_char_count") - (return-type "gint") -) - -(define-method get_tag_table - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_tag_table") - (return-type "GtkTextTagTable*") -) - -(define-method set_text - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_set_text") - (return-type "none") - (parameters - '("const-gchar*" "text") - '("gint" "len") - ) -) - -(define-method insert - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_insert") - (return-type "none") - (parameters - '("GtkTextIter*" "iter") - '("const-gchar*" "text") - '("gint" "len" (default "-1")) - ) -) - -(define-method insert_at_cursor - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_insert_at_cursor") - (return-type "none") - (parameters - '("const-gchar*" "text") - '("gint" "len" (default "-1")) - ) -) - -(define-method insert_interactive - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_insert_interactive") - (return-type "gboolean") - (parameters - '("GtkTextIter*" "iter") - '("const-gchar*" "text") - '("gint" "len") - '("gboolean" "default_editable") - ) -) - -(define-method insert_interactive_at_cursor - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_insert_interactive_at_cursor") - (return-type "gboolean") - (parameters - '("const-gchar*" "text") - '("gint" "len") - '("gboolean" "default_editable") - ) -) - -(define-method insert_range - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_insert_range") - (return-type "none") - (parameters - '("GtkTextIter*" "iter") - '("const-GtkTextIter*" "start") - '("const-GtkTextIter*" "end") - ) -) - -(define-method insert_range_interactive - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_insert_range_interactive") - (return-type "gboolean") - (parameters - '("GtkTextIter*" "iter") - '("const-GtkTextIter*" "start") - '("const-GtkTextIter*" "end") - '("gboolean" "default_editable") - ) -) - -(define-method insert_with_tags - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_insert_with_tags") - (return-type "none") - (parameters - '("GtkTextIter*" "iter") - '("const-gchar*" "text") - '("gint" "len") - '("GtkTextTag*" "first_tag") - ) - (varargs #t) -) - -(define-method insert_with_tags_by_name - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_insert_with_tags_by_name") - (return-type "none") - (parameters - '("GtkTextIter*" "iter") - '("const-gchar*" "text") - '("gint" "len") - '("const-gchar*" "first_tag_name") - ) - (varargs #t) -) - -(define-method delete - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_delete") - (return-type "none") - (parameters - '("GtkTextIter*" "start") - '("GtkTextIter*" "end") - ) -) - -(define-method delete_interactive - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_delete_interactive") - (return-type "gboolean") - (parameters - '("GtkTextIter*" "start_iter") - '("GtkTextIter*" "end_iter") - '("gboolean" "default_editable") - ) -) - -(define-method get_text - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_text") - (return-type "gchar*") - (parameters - '("const-GtkTextIter*" "start") - '("const-GtkTextIter*" "end") - '("gboolean" "include_hidden_chars" (default "TRUE")) - ) -) - -(define-method get_slice - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_slice") - (return-type "gchar*") - (parameters - '("const-GtkTextIter*" "start") - '("const-GtkTextIter*" "end") - '("gboolean" "include_hidden_chars" (default "TRUE")) - ) -) - -(define-method insert_pixbuf - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_insert_pixbuf") - (return-type "none") - (parameters - '("GtkTextIter*" "iter") - '("GdkPixbuf*" "pixbuf") - ) -) - -(define-method insert_child_anchor - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_insert_child_anchor") - (return-type "none") - (parameters - '("GtkTextIter*" "iter") - '("GtkTextChildAnchor*" "anchor") - ) -) - -(define-method create_child_anchor - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_create_child_anchor") - (return-type "GtkTextChildAnchor*") - (parameters - '("GtkTextIter*" "iter") - ) -) - -(define-method create_mark - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_create_mark") - (return-type "GtkTextMark*") - (parameters - '("const-gchar*" "mark_name" (null-ok)) - '("const-GtkTextIter*" "where") - '("gboolean" "left_gravity" (default "FALSE")) - ) -) - -(define-method move_mark - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_move_mark") - (return-type "none") - (parameters - '("GtkTextMark*" "mark") - '("const-GtkTextIter*" "where") - ) -) - -(define-method delete_mark - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_delete_mark") - (return-type "none") - (parameters - '("GtkTextMark*" "mark") - ) -) - -(define-method get_mark - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_mark") - (return-type "GtkTextMark*") - (parameters - '("const-gchar*" "name") - ) -) - -(define-method move_mark_by_name - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_move_mark_by_name") - (return-type "none") - (parameters - '("const-gchar*" "name") - '("const-GtkTextIter*" "where") - ) -) - -(define-method delete_mark_by_name - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_delete_mark_by_name") - (return-type "none") - (parameters - '("const-gchar*" "name") - ) -) - -(define-method get_insert - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_insert") - (return-type "GtkTextMark*") -) - -(define-method get_selection_bound - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_selection_bound") - (return-type "GtkTextMark*") -) - -(define-method place_cursor - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_place_cursor") - (return-type "none") - (parameters - '("const-GtkTextIter*" "where") - ) -) - -(define-method select_range - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_select_range") - (return-type "none") - (parameters - '("const-GtkTextIter*" "ins") - '("const-GtkTextIter*" "bound") - ) -) - -(define-method apply_tag - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_apply_tag") - (return-type "none") - (parameters - '("GtkTextTag*" "tag") - '("const-GtkTextIter*" "start") - '("const-GtkTextIter*" "end") - ) -) - -(define-method remove_tag - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_remove_tag") - (return-type "none") - (parameters - '("GtkTextTag*" "tag") - '("const-GtkTextIter*" "start") - '("const-GtkTextIter*" "end") - ) -) - -(define-method apply_tag_by_name - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_apply_tag_by_name") - (return-type "none") - (parameters - '("const-gchar*" "name") - '("const-GtkTextIter*" "start") - '("const-GtkTextIter*" "end") - ) -) - -(define-method remove_tag_by_name - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_remove_tag_by_name") - (return-type "none") - (parameters - '("const-gchar*" "name") - '("const-GtkTextIter*" "start") - '("const-GtkTextIter*" "end") - ) -) - -(define-method remove_all_tags - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_remove_all_tags") - (return-type "none") - (parameters - '("const-GtkTextIter*" "start") - '("const-GtkTextIter*" "end") - ) -) - -(define-method create_tag - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_create_tag") - (return-type "GtkTextTag*") - (parameters - '("const-gchar*" "tag_name") - '("const-gchar*" "first_property_name") - ) - (varargs #t) -) - -(define-method get_iter_at_line_offset - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_iter_at_line_offset") - (return-type "none") - (parameters - '("GtkTextIter*" "iter") - '("gint" "line_number") - '("gint" "char_offset") - ) -) - -(define-method get_iter_at_line_index - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_iter_at_line_index") - (return-type "none") - (parameters - '("GtkTextIter*" "iter") - '("gint" "line_number") - '("gint" "byte_index") - ) -) - -(define-method get_iter_at_offset - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_iter_at_offset") - (return-type "none") - (parameters - '("GtkTextIter*" "iter") - '("gint" "char_offset") - ) -) - -(define-method get_iter_at_line - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_iter_at_line") - (return-type "none") - (parameters - '("GtkTextIter*" "iter") - '("gint" "line_number") - ) -) - -(define-method get_start_iter - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_start_iter") - (return-type "none") - (parameters - '("GtkTextIter*" "iter") - ) -) - -(define-method get_end_iter - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_end_iter") - (return-type "none") - (parameters - '("GtkTextIter*" "iter") - ) -) - -(define-method get_bounds - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_bounds") - (return-type "none") - (parameters - '("GtkTextIter*" "start") - '("GtkTextIter*" "end") - ) -) - -(define-method get_iter_at_mark - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_iter_at_mark") - (return-type "none") - (parameters - '("GtkTextIter*" "iter") - '("GtkTextMark*" "mark") - ) -) - -(define-method get_iter_at_child_anchor - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_iter_at_child_anchor") - (return-type "none") - (parameters - '("GtkTextIter*" "iter") - '("GtkTextChildAnchor*" "anchor") - ) -) - -(define-method get_modified - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_modified") - (return-type "gboolean") -) - -(define-method set_modified - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_set_modified") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method add_selection_clipboard - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_add_selection_clipboard") - (return-type "none") - (parameters - '("GtkClipboard*" "clipboard") - ) -) - -(define-method remove_selection_clipboard - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_remove_selection_clipboard") - (return-type "none") - (parameters - '("GtkClipboard*" "clipboard") - ) -) - -(define-method cut_clipboard - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_cut_clipboard") - (return-type "none") - (parameters - '("GtkClipboard*" "clipboard") - '("gboolean" "default_editable") - ) -) - -(define-method copy_clipboard - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_copy_clipboard") - (return-type "none") - (parameters - '("GtkClipboard*" "clipboard") - ) -) - -(define-method paste_clipboard - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_paste_clipboard") - (return-type "none") - (parameters - '("GtkClipboard*" "clipboard") - '("GtkTextIter*" "override_location" (null-ok)) - '("gboolean" "default_editable") - ) -) - -(define-method get_selection_bounds - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_get_selection_bounds") - (return-type "gboolean") - (parameters - '("GtkTextIter*" "start") - '("GtkTextIter*" "end") - ) -) - -(define-method delete_selection - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_delete_selection") - (return-type "gboolean") - (parameters - '("gboolean" "interactive") - '("gboolean" "default_editable") - ) -) - -(define-method begin_user_action - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_begin_user_action") - (return-type "none") -) - -(define-method end_user_action - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_end_user_action") - (return-type "none") -) - -(define-virtual insert_text - (of-object "GtkTextBuffer") - (return-type "none") - (parameters - '("GtkTextIter*" "pos") - '("const-gchar*" "text") - '("gint" "length") - ) -) -(define-virtual insert_pixbuf - (of-object "GtkTextBuffer") - (return-type "none") - (parameters - '("GtkTextIter*" "pos") - '("GdkPixbuf*" "pixbuf") - ) -) -(define-virtual insert_child_anchor - (of-object "GtkTextBuffer") - (return-type "none") - (parameters - '("GtkTextIter*" "pos") - '("GtkTextChildAnchor*" "anchor") - ) -) -(define-virtual delete_range - (of-object "GtkTextBuffer") - (return-type "none") - (parameters - '("GtkTextIter*" "start") - '("GtkTextIter*" "end") - ) -) -(define-virtual changed - (of-object "GtkTextBuffer") - (return-type "none") -) -(define-virtual modified_changed - (of-object "GtkTextBuffer") - (return-type "none") -) -(define-virtual mark_set - (of-object "GtkTextBuffer") - (return-type "none") - (parameters - '("const-GtkTextIter*" "location") - '("GtkTextMark*" "mark") - ) -) -(define-virtual mark_deleted - (of-object "GtkTextBuffer") - (return-type "none") - (parameters - '("GtkTextMark*" "mark") - ) -) -(define-virtual apply_tag - (of-object "GtkTextBuffer") - (return-type "none") - (parameters - '("GtkTextTag*" "tag") - '("const-GtkTextIter*" "start_char") - '("const-GtkTextIter*" "end_char") - ) -) -(define-virtual remove_tag - (of-object "GtkTextBuffer") - (return-type "none") - (parameters - '("GtkTextTag*" "tag") - '("const-GtkTextIter*" "start_char") - '("const-GtkTextIter*" "end_char") - ) -) -(define-virtual begin_user_action - (of-object "GtkTextBuffer") - (return-type "none") -) -(define-virtual end_user_action - (of-object "GtkTextBuffer") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktextchild.h - -(define-function gtk_text_child_anchor_get_type - (c-name "gtk_text_child_anchor_get_type") - (return-type "GType") -) - -(define-function gtk_text_child_anchor_new - (c-name "gtk_text_child_anchor_new") - (is-constructor-of "GtkTextChildAnchor") - (return-type "GtkTextChildAnchor*") -) - -(define-method get_widgets - (of-object "GtkTextChildAnchor") - (c-name "gtk_text_child_anchor_get_widgets") - (return-type "GList*") -) - -(define-method get_deleted - (of-object "GtkTextChildAnchor") - (c-name "gtk_text_child_anchor_get_deleted") - (return-type "gboolean") -) - -(define-method backspace - (of-object "GtkTextBuffer") - (c-name "gtk_text_buffer_backspace") - (return-type "gboolean") - (parameters - '("GtkTextIter*" "iter") - '("gboolean" "interactive") - '("gboolean" "default_editable") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktextdisplay.h - -(define-method draw - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_draw") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - '("GdkDrawable*" "drawable") - '("GdkGC*" "cursor_gc") - '("gint" "x_offset") - '("gint" "y_offset") - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - '("GList**" "widgets") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktextiter.h - -(define-method get_buffer - (of-object "GtkTextIter") - (c-name "gtk_text_iter_get_buffer") - (return-type "GtkTextBuffer*") -) - -(define-method copy - (of-object "GtkTextIter") - (c-name "gtk_text_iter_copy") - (return-type "GtkTextIter*") - (caller-owns-return #t) -) - -(define-method free - (of-object "GtkTextIter") - (c-name "gtk_text_iter_free") - (return-type "none") -) - -(define-function gtk_text_iter_get_type - (c-name "gtk_text_iter_get_type") - (return-type "GType") -) - -(define-method get_offset - (of-object "GtkTextIter") - (c-name "gtk_text_iter_get_offset") - (return-type "gint") -) - -(define-method get_line - (of-object "GtkTextIter") - (c-name "gtk_text_iter_get_line") - (return-type "gint") -) - -(define-method get_line_offset - (of-object "GtkTextIter") - (c-name "gtk_text_iter_get_line_offset") - (return-type "gint") -) - -(define-method get_line_index - (of-object "GtkTextIter") - (c-name "gtk_text_iter_get_line_index") - (return-type "gint") -) - -(define-method get_visible_line_offset - (of-object "GtkTextIter") - (c-name "gtk_text_iter_get_visible_line_offset") - (return-type "gint") -) - -(define-method get_visible_line_index - (of-object "GtkTextIter") - (c-name "gtk_text_iter_get_visible_line_index") - (return-type "gint") -) - -(define-method get_char - (of-object "GtkTextIter") - (c-name "gtk_text_iter_get_char") - (return-type "gunichar") -) - -(define-method get_slice - (of-object "GtkTextIter") - (c-name "gtk_text_iter_get_slice") - (return-type "gchar*") - (parameters - '("const-GtkTextIter*" "end") - ) -) - -(define-method get_text - (of-object "GtkTextIter") - (c-name "gtk_text_iter_get_text") - (return-type "gchar*") - (parameters - '("const-GtkTextIter*" "end") - ) -) - -(define-method get_visible_slice - (of-object "GtkTextIter") - (c-name "gtk_text_iter_get_visible_slice") - (return-type "gchar*") - (parameters - '("const-GtkTextIter*" "end") - ) -) - -(define-method get_visible_text - (of-object "GtkTextIter") - (c-name "gtk_text_iter_get_visible_text") - (return-type "gchar*") - (parameters - '("const-GtkTextIter*" "end") - ) -) - -(define-method get_pixbuf - (of-object "GtkTextIter") - (c-name "gtk_text_iter_get_pixbuf") - (return-type "GdkPixbuf*") -) - -(define-method get_marks - (of-object "GtkTextIter") - (c-name "gtk_text_iter_get_marks") - (return-type "GSList*") -) - -(define-method get_child_anchor - (of-object "GtkTextIter") - (c-name "gtk_text_iter_get_child_anchor") - (return-type "GtkTextChildAnchor*") -) - -(define-method get_toggled_tags - (of-object "GtkTextIter") - (c-name "gtk_text_iter_get_toggled_tags") - (return-type "GSList*") - (parameters - '("gboolean" "toggled_on") - ) -) - -(define-method begins_tag - (of-object "GtkTextIter") - (c-name "gtk_text_iter_begins_tag") - (return-type "gboolean") - (parameters - '("GtkTextTag*" "tag" (null-ok) (default "NULL")) - ) -) - -(define-method ends_tag - (of-object "GtkTextIter") - (c-name "gtk_text_iter_ends_tag") - (return-type "gboolean") - (parameters - '("GtkTextTag*" "tag" (null-ok) (default "NULL")) - ) -) - -(define-method toggles_tag - (of-object "GtkTextIter") - (c-name "gtk_text_iter_toggles_tag") - (return-type "gboolean") - (parameters - '("GtkTextTag*" "tag" (null-ok) (default "NULL")) - ) -) - -(define-method has_tag - (of-object "GtkTextIter") - (c-name "gtk_text_iter_has_tag") - (return-type "gboolean") - (parameters - '("GtkTextTag*" "tag") - ) -) - -(define-method get_tags - (of-object "GtkTextIter") - (c-name "gtk_text_iter_get_tags") - (return-type "GSList*") -) - -(define-method editable - (of-object "GtkTextIter") - (c-name "gtk_text_iter_editable") - (return-type "gboolean") - (parameters - '("gboolean" "default_setting") - ) -) - -(define-method can_insert - (of-object "GtkTextIter") - (c-name "gtk_text_iter_can_insert") - (return-type "gboolean") - (parameters - '("gboolean" "default_editability") - ) -) - -(define-method starts_word - (of-object "GtkTextIter") - (c-name "gtk_text_iter_starts_word") - (return-type "gboolean") -) - -(define-method ends_word - (of-object "GtkTextIter") - (c-name "gtk_text_iter_ends_word") - (return-type "gboolean") -) - -(define-method inside_word - (of-object "GtkTextIter") - (c-name "gtk_text_iter_inside_word") - (return-type "gboolean") -) - -(define-method starts_sentence - (of-object "GtkTextIter") - (c-name "gtk_text_iter_starts_sentence") - (return-type "gboolean") -) - -(define-method ends_sentence - (of-object "GtkTextIter") - (c-name "gtk_text_iter_ends_sentence") - (return-type "gboolean") -) - -(define-method inside_sentence - (of-object "GtkTextIter") - (c-name "gtk_text_iter_inside_sentence") - (return-type "gboolean") -) - -(define-method starts_line - (of-object "GtkTextIter") - (c-name "gtk_text_iter_starts_line") - (return-type "gboolean") -) - -(define-method ends_line - (of-object "GtkTextIter") - (c-name "gtk_text_iter_ends_line") - (return-type "gboolean") -) - -(define-method is_cursor_position - (of-object "GtkTextIter") - (c-name "gtk_text_iter_is_cursor_position") - (return-type "gboolean") -) - -(define-method get_chars_in_line - (of-object "GtkTextIter") - (c-name "gtk_text_iter_get_chars_in_line") - (return-type "gint") -) - -(define-method get_bytes_in_line - (of-object "GtkTextIter") - (c-name "gtk_text_iter_get_bytes_in_line") - (return-type "gint") -) - -(define-method get_attributes - (of-object "GtkTextIter") - (c-name "gtk_text_iter_get_attributes") - (return-type "gboolean") - (parameters - '("GtkTextAttributes*" "values") - ) -) - -(define-method get_language - (of-object "GtkTextIter") - (c-name "gtk_text_iter_get_language") - (return-type "PangoLanguage*") -) - -(define-method is_end - (of-object "GtkTextIter") - (c-name "gtk_text_iter_is_end") - (return-type "gboolean") -) - -(define-method is_start - (of-object "GtkTextIter") - (c-name "gtk_text_iter_is_start") - (return-type "gboolean") -) - -(define-method forward_char - (of-object "GtkTextIter") - (c-name "gtk_text_iter_forward_char") - (return-type "gboolean") -) - -(define-method backward_char - (of-object "GtkTextIter") - (c-name "gtk_text_iter_backward_char") - (return-type "gboolean") -) - -(define-method forward_chars - (of-object "GtkTextIter") - (c-name "gtk_text_iter_forward_chars") - (return-type "gboolean") - (parameters - '("gint" "count") - ) -) - -(define-method backward_chars - (of-object "GtkTextIter") - (c-name "gtk_text_iter_backward_chars") - (return-type "gboolean") - (parameters - '("gint" "count") - ) -) - -(define-method forward_line - (of-object "GtkTextIter") - (c-name "gtk_text_iter_forward_line") - (return-type "gboolean") -) - -(define-method backward_line - (of-object "GtkTextIter") - (c-name "gtk_text_iter_backward_line") - (return-type "gboolean") -) - -(define-method forward_lines - (of-object "GtkTextIter") - (c-name "gtk_text_iter_forward_lines") - (return-type "gboolean") - (parameters - '("gint" "count") - ) -) - -(define-method backward_lines - (of-object "GtkTextIter") - (c-name "gtk_text_iter_backward_lines") - (return-type "gboolean") - (parameters - '("gint" "count") - ) -) - -(define-method forward_word_end - (of-object "GtkTextIter") - (c-name "gtk_text_iter_forward_word_end") - (return-type "gboolean") -) - -(define-method backward_word_start - (of-object "GtkTextIter") - (c-name "gtk_text_iter_backward_word_start") - (return-type "gboolean") -) - -(define-method forward_word_ends - (of-object "GtkTextIter") - (c-name "gtk_text_iter_forward_word_ends") - (return-type "gboolean") - (parameters - '("gint" "count") - ) -) - -(define-method backward_word_starts - (of-object "GtkTextIter") - (c-name "gtk_text_iter_backward_word_starts") - (return-type "gboolean") - (parameters - '("gint" "count") - ) -) - -(define-method forward_visible_line - (of-object "GtkTextIter") - (c-name "gtk_text_iter_forward_visible_line") - (return-type "gboolean") -) - -(define-method backward_visible_line - (of-object "GtkTextIter") - (c-name "gtk_text_iter_backward_visible_line") - (return-type "gboolean") -) - -(define-method forward_visible_lines - (of-object "GtkTextIter") - (c-name "gtk_text_iter_forward_visible_lines") - (return-type "gboolean") - (parameters - '("gint" "count") - ) -) - -(define-method backward_visible_lines - (of-object "GtkTextIter") - (c-name "gtk_text_iter_backward_visible_lines") - (return-type "gboolean") - (parameters - '("gint" "count") - ) -) - -(define-method forward_visible_word_end - (of-object "GtkTextIter") - (c-name "gtk_text_iter_forward_visible_word_end") - (return-type "gboolean") -) - -(define-method backward_visible_word_start - (of-object "GtkTextIter") - (c-name "gtk_text_iter_backward_visible_word_start") - (return-type "gboolean") -) - -(define-method forward_visible_word_ends - (of-object "GtkTextIter") - (c-name "gtk_text_iter_forward_visible_word_ends") - (return-type "gboolean") - (parameters - '("gint" "count") - ) -) - -(define-method backward_visible_word_starts - (of-object "GtkTextIter") - (c-name "gtk_text_iter_backward_visible_word_starts") - (return-type "gboolean") - (parameters - '("gint" "count") - ) -) - -(define-method forward_sentence_end - (of-object "GtkTextIter") - (c-name "gtk_text_iter_forward_sentence_end") - (return-type "gboolean") -) - -(define-method backward_sentence_start - (of-object "GtkTextIter") - (c-name "gtk_text_iter_backward_sentence_start") - (return-type "gboolean") -) - -(define-method forward_sentence_ends - (of-object "GtkTextIter") - (c-name "gtk_text_iter_forward_sentence_ends") - (return-type "gboolean") - (parameters - '("gint" "count") - ) -) - -(define-method backward_sentence_starts - (of-object "GtkTextIter") - (c-name "gtk_text_iter_backward_sentence_starts") - (return-type "gboolean") - (parameters - '("gint" "count") - ) -) - -(define-method forward_cursor_position - (of-object "GtkTextIter") - (c-name "gtk_text_iter_forward_cursor_position") - (return-type "gboolean") -) - -(define-method backward_cursor_position - (of-object "GtkTextIter") - (c-name "gtk_text_iter_backward_cursor_position") - (return-type "gboolean") -) - -(define-method forward_cursor_positions - (of-object "GtkTextIter") - (c-name "gtk_text_iter_forward_cursor_positions") - (return-type "gboolean") - (parameters - '("gint" "count") - ) -) - -(define-method backward_cursor_positions - (of-object "GtkTextIter") - (c-name "gtk_text_iter_backward_cursor_positions") - (return-type "gboolean") - (parameters - '("gint" "count") - ) -) - -(define-method forward_visible_cursor_position - (of-object "GtkTextIter") - (c-name "gtk_text_iter_forward_visible_cursor_position") - (return-type "gboolean") -) - -(define-method backward_visible_cursor_position - (of-object "GtkTextIter") - (c-name "gtk_text_iter_backward_visible_cursor_position") - (return-type "gboolean") -) - -(define-method forward_visible_cursor_positions - (of-object "GtkTextIter") - (c-name "gtk_text_iter_forward_visible_cursor_positions") - (return-type "gboolean") - (parameters - '("gint" "count") - ) -) - -(define-method backward_visible_cursor_positions - (of-object "GtkTextIter") - (c-name "gtk_text_iter_backward_visible_cursor_positions") - (return-type "gboolean") - (parameters - '("gint" "count") - ) -) - -(define-method set_offset - (of-object "GtkTextIter") - (c-name "gtk_text_iter_set_offset") - (return-type "none") - (parameters - '("gint" "char_offset") - ) -) - -(define-method set_line - (of-object "GtkTextIter") - (c-name "gtk_text_iter_set_line") - (return-type "none") - (parameters - '("gint" "line_number") - ) -) - -(define-method set_line_offset - (of-object "GtkTextIter") - (c-name "gtk_text_iter_set_line_offset") - (return-type "none") - (parameters - '("gint" "char_on_line") - ) -) - -(define-method set_line_index - (of-object "GtkTextIter") - (c-name "gtk_text_iter_set_line_index") - (return-type "none") - (parameters - '("gint" "byte_on_line") - ) -) - -(define-method forward_to_end - (of-object "GtkTextIter") - (c-name "gtk_text_iter_forward_to_end") - (return-type "none") -) - -(define-method forward_to_line_end - (of-object "GtkTextIter") - (c-name "gtk_text_iter_forward_to_line_end") - (return-type "gboolean") -) - -(define-method set_visible_line_offset - (of-object "GtkTextIter") - (c-name "gtk_text_iter_set_visible_line_offset") - (return-type "none") - (parameters - '("gint" "char_on_line") - ) -) - -(define-method set_visible_line_index - (of-object "GtkTextIter") - (c-name "gtk_text_iter_set_visible_line_index") - (return-type "none") - (parameters - '("gint" "byte_on_line") - ) -) - -(define-method forward_to_tag_toggle - (of-object "GtkTextIter") - (c-name "gtk_text_iter_forward_to_tag_toggle") - (return-type "gboolean") - (parameters - '("GtkTextTag*" "tag" (null-ok)) - ) -) - -(define-method backward_to_tag_toggle - (of-object "GtkTextIter") - (c-name "gtk_text_iter_backward_to_tag_toggle") - (return-type "gboolean") - (parameters - '("GtkTextTag*" "tag" (null-ok)) - ) -) - -(define-method forward_find_char - (of-object "GtkTextIter") - (c-name "gtk_text_iter_forward_find_char") - (return-type "gboolean") - (parameters - '("GtkTextCharPredicate" "pred") - '("gpointer" "user_data") - '("const-GtkTextIter*" "limit") - ) -) - -(define-method backward_find_char - (of-object "GtkTextIter") - (c-name "gtk_text_iter_backward_find_char") - (return-type "gboolean") - (parameters - '("GtkTextCharPredicate" "pred") - '("gpointer" "user_data") - '("const-GtkTextIter*" "limit") - ) -) - -(define-method forward_search - (of-object "GtkTextIter") - (c-name "gtk_text_iter_forward_search") - (return-type "gboolean") - (parameters - '("const-gchar*" "str") - '("GtkTextSearchFlags" "flags") - '("GtkTextIter*" "match_start") - '("GtkTextIter*" "match_end") - '("const-GtkTextIter*" "limit" (null-ok)) - ) -) - -(define-method backward_search - (of-object "GtkTextIter") - (c-name "gtk_text_iter_backward_search") - (return-type "gboolean") - (parameters - '("const-gchar*" "str") - '("GtkTextSearchFlags" "flags") - '("GtkTextIter*" "match_start") - '("GtkTextIter*" "match_end") - '("const-GtkTextIter*" "limit" (null-ok)) - ) -) - -(define-method equal - (of-object "GtkTextIter") - (c-name "gtk_text_iter_equal") - (return-type "gboolean") - (parameters - '("const-GtkTextIter*" "rhs") - ) -) - -(define-method compare - (of-object "GtkTextIter") - (c-name "gtk_text_iter_compare") - (return-type "gint") - (parameters - '("const-GtkTextIter*" "rhs") - ) -) - -(define-method in_range - (of-object "GtkTextIter") - (c-name "gtk_text_iter_in_range") - (return-type "gboolean") - (parameters - '("const-GtkTextIter*" "start") - '("const-GtkTextIter*" "end") - ) -) - -(define-method order - (of-object "GtkTextIter") - (c-name "gtk_text_iter_order") - (return-type "none") - (parameters - '("GtkTextIter*" "second") - ) -) - -;; From /usr/include/gtk-2.0/gtk/gtktextlayout.h - -(define-function gtk_text_layout_get_type - (c-name "gtk_text_layout_get_type") - (return-type "GType") -) - -(define-function gtk_text_layout_new - (c-name "gtk_text_layout_new") - (is-constructor-of "GtkTextLayout") - (return-type "GtkTextLayout*") -) - -(define-method set_buffer - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_set_buffer") - (return-type "none") - (parameters - '("GtkTextBuffer*" "buffer") - ) -) - -(define-method get_buffer - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_get_buffer") - (return-type "GtkTextBuffer*") -) - -(define-method set_default_style - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_set_default_style") - (return-type "none") - (parameters - '("GtkTextAttributes*" "values") - ) -) - -(define-method set_contexts - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_set_contexts") - (return-type "none") - (parameters - '("PangoContext*" "ltr_context") - '("PangoContext*" "rtl_context") - ) -) - -(define-method set_cursor_direction - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_set_cursor_direction") - (return-type "none") - (parameters - '("GtkTextDirection" "direction") - ) -) - -(define-method set_keyboard_direction - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_set_keyboard_direction") - (return-type "none") - (parameters - '("GtkTextDirection" "keyboard_dir") - ) -) - -(define-method default_style_changed - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_default_style_changed") - (return-type "none") -) - -(define-method set_screen_width - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_set_screen_width") - (return-type "none") - (parameters - '("gint" "width") - ) -) - -(define-method set_preedit_string - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_set_preedit_string") - (return-type "none") - (parameters - '("const-gchar*" "preedit_string") - '("PangoAttrList*" "preedit_attrs") - '("gint" "cursor_pos") - ) -) - -(define-method set_cursor_visible - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_set_cursor_visible") - (return-type "none") - (parameters - '("gboolean" "cursor_visible") - ) -) - -(define-method get_cursor_visible - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_get_cursor_visible") - (return-type "gboolean") -) - -(define-method get_size - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_get_size") - (return-type "none") - (parameters - '("gint*" "width") - '("gint*" "height") - ) -) - -(define-method get_lines - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_get_lines") - (return-type "GSList*") - (parameters - '("gint" "top_y") - '("gint" "bottom_y") - '("gint*" "first_line_y") - ) -) - -(define-method wrap_loop_start - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_wrap_loop_start") - (return-type "none") -) - -(define-method wrap_loop_end - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_wrap_loop_end") - (return-type "none") -) - -(define-method get_line_display - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_get_line_display") - (return-type "GtkTextLineDisplay*") - (parameters - '("GtkTextLine*" "line") - '("gboolean" "size_only") - ) -) - -(define-method free_line_display - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_free_line_display") - (return-type "none") - (parameters - '("GtkTextLineDisplay*" "display") - ) -) - -(define-method get_line_at_y - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_get_line_at_y") - (return-type "none") - (parameters - '("GtkTextIter*" "target_iter") - '("gint" "y") - '("gint*" "line_top") - ) -) - -(define-method get_iter_at_pixel - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_get_iter_at_pixel") - (return-type "none") - (parameters - '("GtkTextIter*" "iter") - '("gint" "x") - '("gint" "y") - ) -) - -(define-method get_iter_at_position - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_get_iter_at_position") - (return-type "none") - (parameters - '("GtkTextIter*" "iter") - '("gint*" "trailing") - '("gint" "x") - '("gint" "y") - ) -) - -(define-method invalidate - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_invalidate") - (return-type "none") - (parameters - '("const-GtkTextIter*" "start") - '("const-GtkTextIter*" "end") - ) -) - -(define-method free_line_data - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_free_line_data") - (return-type "none") - (parameters - '("GtkTextLine*" "line") - '("GtkTextLineData*" "line_data") - ) -) - -(define-method is_valid - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_is_valid") - (return-type "gboolean") -) - -(define-method validate_yrange - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_validate_yrange") - (return-type "none") - (parameters - '("GtkTextIter*" "anchor_line") - '("gint" "y0_") - '("gint" "y1_") - ) -) - -(define-method validate - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_validate") - (return-type "none") - (parameters - '("gint" "max_pixels") - ) -) - -(define-method wrap - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_wrap") - (return-type "GtkTextLineData*") - (parameters - '("GtkTextLine*" "line") - '("GtkTextLineData*" "line_data") - ) -) - -(define-method changed - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_changed") - (return-type "none") - (parameters - '("gint" "y") - '("gint" "old_height") - '("gint" "new_height") - ) -) - -(define-method get_iter_location - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_get_iter_location") - (return-type "none") - (parameters - '("const-GtkTextIter*" "iter") - '("GdkRectangle*" "rect") - ) -) - -(define-method get_line_yrange - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_get_line_yrange") - (return-type "none") - (parameters - '("const-GtkTextIter*" "iter") - '("gint*" "y") - '("gint*" "height") - ) -) - -(define-method get_cursor_locations - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_get_cursor_locations") - (return-type "none") - (parameters - '("GtkTextIter*" "iter") - '("GdkRectangle*" "strong_pos") - '("GdkRectangle*" "weak_pos") - ) -) - -(define-method clamp_iter_to_vrange - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_clamp_iter_to_vrange") - (return-type "gboolean") - (parameters - '("GtkTextIter*" "iter") - '("gint" "top") - '("gint" "bottom") - ) -) - -(define-method move_iter_to_line_end - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_move_iter_to_line_end") - (return-type "gboolean") - (parameters - '("GtkTextIter*" "iter") - '("gint" "direction") - ) -) - -(define-method move_iter_to_previous_line - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_move_iter_to_previous_line") - (return-type "gboolean") - (parameters - '("GtkTextIter*" "iter") - ) -) - -(define-method move_iter_to_next_line - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_move_iter_to_next_line") - (return-type "gboolean") - (parameters - '("GtkTextIter*" "iter") - ) -) - -(define-method move_iter_to_x - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_move_iter_to_x") - (return-type "none") - (parameters - '("GtkTextIter*" "iter") - '("gint" "x") - ) -) - -(define-method move_iter_visually - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_move_iter_visually") - (return-type "gboolean") - (parameters - '("GtkTextIter*" "iter") - '("gint" "count") - ) -) - -(define-method iter_starts_line - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_iter_starts_line") - (return-type "gboolean") - (parameters - '("const-GtkTextIter*" "iter") - ) -) - -(define-method get_iter_at_line - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_get_iter_at_line") - (return-type "none") - (parameters - '("GtkTextIter*" "iter") - '("GtkTextLine*" "line") - '("gint" "byte_offset") - ) -) - -(define-virtual invalidated - (of-object "GtkTextLayout") - (return-type "none") -) - -(define-virtual changed - (of-object "GtkTextLayout") - (return-type "none") - (parameters - '("gint" "y") - '("gint" "old_height") - '("gint" "new_height") - ) -) - -(define-virtual wrap - (of-object "GtkTextLayout") - (return-type "GtkTextLineData*") - (parameters - '("GtkTextLine*" "line") - '("GtkTextLineData*" "line_data") - ) -) - -(define-virtual get_log_attrs - (of-object "GtkTextLayout") - (return-type "none") - (parameters - '("GtkTextLine*" "line") - '("PangoLogAttr**" "attrs") - '("gint*" "n_attrs") - ) -) - -(define-virtual invalidate - (of-object "GtkTextLayout") - (return-type "none") - (parameters - '("const-GtkTextIter*" "start") - '("const-GtkTextIter*" "end") - ) -) - -(define-virtual free_line_data - (of-object "GtkTextLayout") - (return-type "none") - (parameters - '("GtkTextLine*" "line") - '("GtkTextLineData*" "line_data") - ) -) - -(define-virtual allocate_child - (of-object "GtkTextLayout") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("gint" "x") - '("gint" "y") - ) -) - -(define-method register_child - (of-object "GtkTextChildAnchor") - (c-name "gtk_text_child_anchor_register_child") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("GtkTextLayout*" "layout") - ) -) - -(define-method unregister_child - (of-object "GtkTextChildAnchor") - (c-name "gtk_text_child_anchor_unregister_child") - (return-type "none") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-method queue_resize - (of-object "GtkTextChildAnchor") - (c-name "gtk_text_child_anchor_queue_resize") - (return-type "none") - (parameters - '("GtkTextLayout*" "layout") - ) -) - -(define-function gtk_text_anchored_child_set_layout - (c-name "gtk_text_anchored_child_set_layout") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("GtkTextLayout*" "layout") - ) -) - -(define-method spew - (of-object "GtkTextLayout") - (c-name "gtk_text_layout_spew") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktextmark.h - -(define-function gtk_text_mark_get_type - (c-name "gtk_text_mark_get_type") - (return-type "GType") -) - -(define-method set_visible - (of-object "GtkTextMark") - (c-name "gtk_text_mark_set_visible") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_visible - (of-object "GtkTextMark") - (c-name "gtk_text_mark_get_visible") - (return-type "gboolean") -) - -(define-method get_name - (of-object "GtkTextMark") - (c-name "gtk_text_mark_get_name") - (return-type "const-gchar*") -) - -(define-method get_deleted - (of-object "GtkTextMark") - (c-name "gtk_text_mark_get_deleted") - (return-type "gboolean") -) - -(define-method get_buffer - (of-object "GtkTextMark") - (c-name "gtk_text_mark_get_buffer") - (return-type "GtkTextBuffer*") -) - -(define-method get_left_gravity - (of-object "GtkTextMark") - (c-name "gtk_text_mark_get_left_gravity") - (return-type "gboolean") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktexttag.h - -(define-function gtk_text_tag_get_type - (c-name "gtk_text_tag_get_type") - (return-type "GType") -) - -(define-function gtk_text_tag_new - (c-name "gtk_text_tag_new") - (is-constructor-of "GtkTextTag") - (return-type "GtkTextTag*") - (properties - '("name" (optional)) - ) -) - -(define-method get_priority - (of-object "GtkTextTag") - (c-name "gtk_text_tag_get_priority") - (return-type "gint") -) - -(define-method set_priority - (of-object "GtkTextTag") - (c-name "gtk_text_tag_set_priority") - (return-type "none") - (parameters - '("gint" "priority") - ) -) - -(define-method event - (of-object "GtkTextTag") - (c-name "gtk_text_tag_event") - (return-type "gboolean") - (parameters - '("GObject*" "event_object") - '("GdkEvent*" "event") - '("const-GtkTextIter*" "iter") - ) -) - -(define-virtual event - (of-object "GtkTextTag") - (return-type "gboolean") - (parameters - '("GObject*" "event_object") - '("GdkEvent*" "event") - '("const-GtkTextIter*" "iter") - ) -) - -(define-function gtk_text_attributes_new - (c-name "gtk_text_attributes_new") - (is-constructor-of "GtkTextAttributes") - (return-type "GtkTextAttributes*") -) - -(define-method copy - (of-object "GtkTextAttributes") - (c-name "gtk_text_attributes_copy") - (return-type "GtkTextAttributes*") - (caller-owns-return #t) -) - -(define-method copy_values - (of-object "GtkTextAttributes") - (c-name "gtk_text_attributes_copy_values") - (return-type "none") - (parameters - '("GtkTextAttributes*" "dest") - ) -) - -(define-method unref - (of-object "GtkTextAttributes") - (c-name "gtk_text_attributes_unref") - (return-type "none") -) - -(define-method ref - (of-object "GtkTextAttributes") - (c-name "gtk_text_attributes_ref") - (return-type "none") -) - -(define-function gtk_text_attributes_get_type - (c-name "gtk_text_attributes_get_type") - (return-type "GType") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktexttagtable.h - -(define-function gtk_text_tag_table_get_type - (c-name "gtk_text_tag_table_get_type") - (return-type "GType") -) - -(define-function gtk_text_tag_table_new - (c-name "gtk_text_tag_table_new") - (is-constructor-of "GtkTextTagTable") - (return-type "GtkTextTagTable*") -) - -(define-method add - (of-object "GtkTextTagTable") - (c-name "gtk_text_tag_table_add") - (return-type "none") - (parameters - '("GtkTextTag*" "tag") - ) -) - -(define-method remove - (of-object "GtkTextTagTable") - (c-name "gtk_text_tag_table_remove") - (return-type "none") - (parameters - '("GtkTextTag*" "tag") - ) -) - -(define-method lookup - (of-object "GtkTextTagTable") - (c-name "gtk_text_tag_table_lookup") - (return-type "GtkTextTag*") - (parameters - '("const-gchar*" "name") - ) -) - -(define-method foreach - (of-object "GtkTextTagTable") - (c-name "gtk_text_tag_table_foreach") - (return-type "none") - (parameters - '("GtkTextTagTableForeach" "func") - '("gpointer" "data") - ) -) - -(define-method get_size - (of-object "GtkTextTagTable") - (c-name "gtk_text_tag_table_get_size") - (return-type "gint") -) - -(define-virtual tag_changed - (of-object "GtkTextTagTable") - (return-type "none") - (parameters - '("GtkTextTag*" "tag") - '("gboolean" "size_changed") - ) -) -(define-virtual tag_added - (of-object "GtkTextTagTable") - (return-type "none") - (parameters - '("GtkTextTag*" "tag") - ) -) -(define-virtual tag_removed - (of-object "GtkTextTagTable") - (return-type "none") - (parameters - '("GtkTextTag*" "tag") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktextview.h - -(define-function gtk_text_view_get_type - (c-name "gtk_text_view_get_type") - (return-type "GType") -) - -(define-function gtk_text_view_new - (c-name "gtk_text_view_new") - (is-constructor-of "GtkTextView") - (return-type "GtkWidget*") -) - -(define-function gtk_text_view_new_with_buffer - (c-name "gtk_text_view_new_with_buffer") - (is-constructor-of "GtkTextView") - (return-type "GtkWidget*") - (properties - '("buffer" (optional)) - ) -) - -(define-method set_buffer - (of-object "GtkTextView") - (c-name "gtk_text_view_set_buffer") - (return-type "none") - (parameters - '("GtkTextBuffer*" "buffer") - ) -) - -(define-method get_buffer - (of-object "GtkTextView") - (c-name "gtk_text_view_get_buffer") - (return-type "GtkTextBuffer*") -) - -(define-method scroll_to_iter - (of-object "GtkTextView") - (c-name "gtk_text_view_scroll_to_iter") - (return-type "gboolean") - (parameters - '("GtkTextIter*" "iter") - '("gdouble" "within_margin") - '("gboolean" "use_align" (default "FALSE")) - '("gdouble" "xalign" (default "0.5")) - '("gdouble" "yalign" (default "0.5")) - ) -) - -(define-method scroll_to_mark - (of-object "GtkTextView") - (c-name "gtk_text_view_scroll_to_mark") - (return-type "none") - (parameters - '("GtkTextMark*" "mark") - '("gdouble" "within_margin") - '("gboolean" "use_align" (default "FALSE")) - '("gdouble" "xalign" (default "0.5")) - '("gdouble" "yalign" (default "0.5")) - ) -) - -(define-method scroll_mark_onscreen - (of-object "GtkTextView") - (c-name "gtk_text_view_scroll_mark_onscreen") - (return-type "none") - (parameters - '("GtkTextMark*" "mark") - ) -) - -(define-method move_mark_onscreen - (of-object "GtkTextView") - (c-name "gtk_text_view_move_mark_onscreen") - (return-type "gboolean") - (parameters - '("GtkTextMark*" "mark") - ) -) - -(define-method place_cursor_onscreen - (of-object "GtkTextView") - (c-name "gtk_text_view_place_cursor_onscreen") - (return-type "gboolean") -) - -(define-method get_visible_rect - (of-object "GtkTextView") - (c-name "gtk_text_view_get_visible_rect") - (return-type "none") - (parameters - '("GdkRectangle*" "visible_rect") - ) -) - -(define-method set_cursor_visible - (of-object "GtkTextView") - (c-name "gtk_text_view_set_cursor_visible") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_cursor_visible - (of-object "GtkTextView") - (c-name "gtk_text_view_get_cursor_visible") - (return-type "gboolean") -) - -(define-method get_iter_location - (of-object "GtkTextView") - (c-name "gtk_text_view_get_iter_location") - (return-type "none") - (parameters - '("const-GtkTextIter*" "iter") - '("GdkRectangle*" "location") - ) -) - -(define-method get_iter_at_location - (of-object "GtkTextView") - (c-name "gtk_text_view_get_iter_at_location") - (return-type "none") - (parameters - '("GtkTextIter*" "iter") - '("gint" "x") - '("gint" "y") - ) -) - -(define-method get_iter_at_position - (of-object "GtkTextView") - (c-name "gtk_text_view_get_iter_at_position") - (return-type "none") - (parameters - '("GtkTextIter*" "iter") - '("gint*" "trailing") - '("gint" "x") - '("gint" "y") - ) -) - -(define-method get_line_yrange - (of-object "GtkTextView") - (c-name "gtk_text_view_get_line_yrange") - (return-type "none") - (parameters - '("const-GtkTextIter*" "iter") - '("gint*" "y") - '("gint*" "height") - ) -) - -(define-method get_line_at_y - (of-object "GtkTextView") - (c-name "gtk_text_view_get_line_at_y") - (return-type "none") - (parameters - '("GtkTextIter*" "target_iter") - '("gint" "y") - '("gint*" "line_top") - ) -) - -(define-method buffer_to_window_coords - (of-object "GtkTextView") - (c-name "gtk_text_view_buffer_to_window_coords") - (return-type "none") - (parameters - '("GtkTextWindowType" "win") - '("gint" "buffer_x") - '("gint" "buffer_y") - '("gint*" "window_x") - '("gint*" "window_y") - ) -) - -(define-method window_to_buffer_coords - (of-object "GtkTextView") - (c-name "gtk_text_view_window_to_buffer_coords") - (return-type "none") - (parameters - '("GtkTextWindowType" "win") - '("gint" "window_x") - '("gint" "window_y") - '("gint*" "buffer_x") - '("gint*" "buffer_y") - ) -) - -(define-method get_window - (of-object "GtkTextView") - (c-name "gtk_text_view_get_window") - (return-type "GdkWindow*") - (parameters - '("GtkTextWindowType" "win") - ) -) - -(define-method get_window_type - (of-object "GtkTextView") - (c-name "gtk_text_view_get_window_type") - (return-type "GtkTextWindowType") - (parameters - '("GdkWindow*" "window") - ) -) - -(define-method set_border_window_size - (of-object "GtkTextView") - (c-name "gtk_text_view_set_border_window_size") - (return-type "none") - (parameters - '("GtkTextWindowType" "type") - '("gint" "size") - ) -) - -(define-method get_border_window_size - (of-object "GtkTextView") - (c-name "gtk_text_view_get_border_window_size") - (return-type "gint") - (parameters - '("GtkTextWindowType" "type") - ) -) - -(define-method forward_display_line - (of-object "GtkTextView") - (c-name "gtk_text_view_forward_display_line") - (return-type "gboolean") - (parameters - '("GtkTextIter*" "iter") - ) -) - -(define-method backward_display_line - (of-object "GtkTextView") - (c-name "gtk_text_view_backward_display_line") - (return-type "gboolean") - (parameters - '("GtkTextIter*" "iter") - ) -) - -(define-method forward_display_line_end - (of-object "GtkTextView") - (c-name "gtk_text_view_forward_display_line_end") - (return-type "gboolean") - (parameters - '("GtkTextIter*" "iter") - ) -) - -(define-method backward_display_line_start - (of-object "GtkTextView") - (c-name "gtk_text_view_backward_display_line_start") - (return-type "gboolean") - (parameters - '("GtkTextIter*" "iter") - ) -) - -(define-method starts_display_line - (of-object "GtkTextView") - (c-name "gtk_text_view_starts_display_line") - (return-type "gboolean") - (parameters - '("const-GtkTextIter*" "iter") - ) -) - -(define-method move_visually - (of-object "GtkTextView") - (c-name "gtk_text_view_move_visually") - (return-type "gboolean") - (parameters - '("GtkTextIter*" "iter") - '("gint" "count") - ) -) - -(define-method add_child_at_anchor - (of-object "GtkTextView") - (c-name "gtk_text_view_add_child_at_anchor") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("GtkTextChildAnchor*" "anchor") - ) -) - -(define-method add_child_in_window - (of-object "GtkTextView") - (c-name "gtk_text_view_add_child_in_window") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("GtkTextWindowType" "which_window") - '("gint" "xpos") - '("gint" "ypos") - ) -) - -(define-method move_child - (of-object "GtkTextView") - (c-name "gtk_text_view_move_child") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("gint" "xpos") - '("gint" "ypos") - ) -) - -(define-method set_wrap_mode - (of-object "GtkTextView") - (c-name "gtk_text_view_set_wrap_mode") - (return-type "none") - (parameters - '("GtkWrapMode" "wrap_mode") - ) -) - -(define-method get_wrap_mode - (of-object "GtkTextView") - (c-name "gtk_text_view_get_wrap_mode") - (return-type "GtkWrapMode") -) - -(define-method set_editable - (of-object "GtkTextView") - (c-name "gtk_text_view_set_editable") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_editable - (of-object "GtkTextView") - (c-name "gtk_text_view_get_editable") - (return-type "gboolean") -) - -(define-method set_overwrite - (of-object "GtkTextView") - (c-name "gtk_text_view_set_overwrite") - (return-type "none") - (parameters - '("gboolean" "overwrite") - ) -) - -(define-method get_overwrite - (of-object "GtkTextView") - (c-name "gtk_text_view_get_overwrite") - (return-type "gboolean") -) - -(define-method set_accepts_tab - (of-object "GtkTextView") - (c-name "gtk_text_view_set_accepts_tab") - (return-type "none") - (parameters - '("gboolean" "accepts_tab") - ) -) - -(define-method get_accepts_tab - (of-object "GtkTextView") - (c-name "gtk_text_view_get_accepts_tab") - (return-type "gboolean") -) - -(define-method set_pixels_above_lines - (of-object "GtkTextView") - (c-name "gtk_text_view_set_pixels_above_lines") - (return-type "none") - (parameters - '("gint" "pixels_above_lines") - ) -) - -(define-method get_pixels_above_lines - (of-object "GtkTextView") - (c-name "gtk_text_view_get_pixels_above_lines") - (return-type "gint") -) - -(define-method set_pixels_below_lines - (of-object "GtkTextView") - (c-name "gtk_text_view_set_pixels_below_lines") - (return-type "none") - (parameters - '("gint" "pixels_below_lines") - ) -) - -(define-method get_pixels_below_lines - (of-object "GtkTextView") - (c-name "gtk_text_view_get_pixels_below_lines") - (return-type "gint") -) - -(define-method set_pixels_inside_wrap - (of-object "GtkTextView") - (c-name "gtk_text_view_set_pixels_inside_wrap") - (return-type "none") - (parameters - '("gint" "pixels_inside_wrap") - ) -) - -(define-method get_pixels_inside_wrap - (of-object "GtkTextView") - (c-name "gtk_text_view_get_pixels_inside_wrap") - (return-type "gint") -) - -(define-method set_justification - (of-object "GtkTextView") - (c-name "gtk_text_view_set_justification") - (return-type "none") - (parameters - '("GtkJustification" "justification") - ) -) - -(define-method get_justification - (of-object "GtkTextView") - (c-name "gtk_text_view_get_justification") - (return-type "GtkJustification") -) - -(define-method set_left_margin - (of-object "GtkTextView") - (c-name "gtk_text_view_set_left_margin") - (return-type "none") - (parameters - '("gint" "left_margin") - ) -) - -(define-method get_left_margin - (of-object "GtkTextView") - (c-name "gtk_text_view_get_left_margin") - (return-type "gint") -) - -(define-method set_right_margin - (of-object "GtkTextView") - (c-name "gtk_text_view_set_right_margin") - (return-type "none") - (parameters - '("gint" "right_margin") - ) -) - -(define-method get_right_margin - (of-object "GtkTextView") - (c-name "gtk_text_view_get_right_margin") - (return-type "gint") -) - -(define-method set_indent - (of-object "GtkTextView") - (c-name "gtk_text_view_set_indent") - (return-type "none") - (parameters - '("gint" "indent") - ) -) - -(define-method get_indent - (of-object "GtkTextView") - (c-name "gtk_text_view_get_indent") - (return-type "gint") -) - -(define-method set_tabs - (of-object "GtkTextView") - (c-name "gtk_text_view_set_tabs") - (return-type "none") - (parameters - '("PangoTabArray*" "tabs") - ) -) - -(define-method get_tabs - (of-object "GtkTextView") - (c-name "gtk_text_view_get_tabs") - (return-type "PangoTabArray*") -) - -(define-method get_default_attributes - (of-object "GtkTextView") - (c-name "gtk_text_view_get_default_attributes") - (return-type "GtkTextAttributes*") -) - -(define-virtual set_scroll_adjustments - (of-object "GtkTextView") - (return-type "none") - (parameters - '("GtkAdjustment*" "hadjustment") - '("GtkAdjustment*" "vadjustment") - ) -) -(define-virtual populate_popup - (of-object "GtkTextView") - (return-type "none") - (parameters - '("GtkMenu*" "menu") - ) -) -(define-virtual move_cursor - (of-object "GtkTextView") - (return-type "none") - (parameters - '("GtkMovementStep" "step") - '("gint" "count") - '("gboolean" "extend_selection") - ) -) -(define-virtual page_horizontally - (of-object "GtkTextView") - (return-type "none") - (parameters - '("gint" "count") - '("gboolean" "extend_selection") - ) -) -(define-virtual set_anchor - (of-object "GtkTextView") - (return-type "none") -) -(define-virtual insert_at_cursor - (of-object "GtkTextView") - (return-type "none") - (parameters - '("const-gchar*" "str") - ) -) -(define-virtual delete_from_cursor - (of-object "GtkTextView") - (return-type "none") - (parameters - '("GtkDeleteType" "type") - '("gint" "count") - ) -) -(define-virtual backspace - (of-object "GtkTextView") - (return-type "none") -) -(define-virtual cut_clipboard - (of-object "GtkTextView") - (return-type "none") -) -(define-virtual copy_clipboard - (of-object "GtkTextView") - (return-type "none") -) -(define-virtual paste_clipboard - (of-object "GtkTextView") - (return-type "none") -) -(define-virtual toggle_overwrite - (of-object "GtkTextView") - (return-type "none") -) -(define-virtual move_focus - (of-object "GtkTextView") - (return-type "none") - (parameters - '("GtkDirectionType" "direction") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktipsquery.h - -(define-function gtk_tips_query_get_type - (c-name "gtk_tips_query_get_type") - (return-type "GType") -) - -(define-function gtk_tips_query_new - (c-name "gtk_tips_query_new") - (is-constructor-of "GtkTipsQuery") - (return-type "GtkWidget*") - (deprecated "") -) - -(define-method start_query - (of-object "GtkTipsQuery") - (c-name "gtk_tips_query_start_query") - (return-type "none") - (deprecated "") -) - -(define-method stop_query - (of-object "GtkTipsQuery") - (c-name "gtk_tips_query_stop_query") - (return-type "none") - (deprecated "") -) - -(define-method set_caller - (of-object "GtkTipsQuery") - (c-name "gtk_tips_query_set_caller") - (return-type "none") - (parameters - '("GtkWidget*" "caller") - ) - (deprecated "") -) - -(define-method set_labels - (of-object "GtkTipsQuery") - (c-name "gtk_tips_query_set_labels") - (return-type "none") - (parameters - '("const-gchar*" "label_inactive") - '("const-gchar*" "label_no_tip") - ) - (deprecated "") -) - -(define-virtual start_query - (of-object "GtkTipsQuery") - (return-type "none") -) -(define-virtual stop_query - (of-object "GtkTipsQuery") - (return-type "none") -) -(define-virtual widget_entered - (of-object "GtkTipsQuery") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - '("const-gchar*" "tip_text") - '("const-gchar*" "tip_private") - ) -) -(define-virtual widget_selected - (of-object "GtkTipsQuery") - (return-type "gint") - (parameters - '("GtkWidget*" "widget") - '("const-gchar*" "tip_text") - '("const-gchar*" "tip_private") - '("GdkEventButton*" "event") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktoggleaction.h - -(define-function gtk_toggle_action_get_type - (c-name "gtk_toggle_action_get_type") - (return-type "GType") -) - -(define-function gtk_toggle_action_new - (c-name "gtk_toggle_action_new") - (is-constructor-of "GtkToggleAction") - (return-type "GtkToggleAction*") - (properties - '("name") - '("label") - '("tooltip") - '("stock_id") - ) -) - -(define-method toggled - (of-object "GtkToggleAction") - (c-name "gtk_toggle_action_toggled") - (return-type "none") -) - -(define-method set_active - (of-object "GtkToggleAction") - (c-name "gtk_toggle_action_set_active") - (return-type "none") - (parameters - '("gboolean" "is_active") - ) -) - -(define-method get_active - (of-object "GtkToggleAction") - (c-name "gtk_toggle_action_get_active") - (return-type "gboolean") -) - -(define-method set_draw_as_radio - (of-object "GtkToggleAction") - (c-name "gtk_toggle_action_set_draw_as_radio") - (return-type "none") - (parameters - '("gboolean" "draw_as_radio") - ) -) - -(define-method get_draw_as_radio - (of-object "GtkToggleAction") - (c-name "gtk_toggle_action_get_draw_as_radio") - (return-type "gboolean") -) - -(define-virtual toggled - (of-object "GtkToggleAction") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktogglebutton.h - -(define-function gtk_toggle_button_get_type - (c-name "gtk_toggle_button_get_type") - (return-type "GType") -) - -(define-function gtk_toggle_button_new - (c-name "gtk_toggle_button_new") - (is-constructor-of "GtkToggleButton") - (return-type "GtkWidget*") -) - -(define-function gtk_toggle_button_new_with_label - (c-name "gtk_toggle_button_new_with_label") - (is-constructor-of "GtkToggleButton") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "label") - ) -) - -(define-function gtk_toggle_button_new_with_mnemonic - (c-name "gtk_toggle_button_new_with_mnemonic") - (is-constructor-of "GtkToggleButton") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "label") - ) -) - -(define-method set_mode - (of-object "GtkToggleButton") - (c-name "gtk_toggle_button_set_mode") - (return-type "none") - (parameters - '("gboolean" "draw_indicator") - ) -) - -(define-method get_mode - (of-object "GtkToggleButton") - (c-name "gtk_toggle_button_get_mode") - (return-type "gboolean") -) - -(define-method set_active - (of-object "GtkToggleButton") - (c-name "gtk_toggle_button_set_active") - (return-type "none") - (parameters - '("gboolean" "is_active") - ) -) - -(define-method get_active - (of-object "GtkToggleButton") - (c-name "gtk_toggle_button_get_active") - (return-type "gboolean") -) - -(define-method toggled - (of-object "GtkToggleButton") - (c-name "gtk_toggle_button_toggled") - (return-type "none") -) - -(define-method set_inconsistent - (of-object "GtkToggleButton") - (c-name "gtk_toggle_button_set_inconsistent") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_inconsistent - (of-object "GtkToggleButton") - (c-name "gtk_toggle_button_get_inconsistent") - (return-type "gboolean") -) - -(define-method set_state - (of-object "GtkToggleButton") - (c-name "gtk_toggle_button_set_state") - (return-type "none") - (parameters - '("gboolean" "is_active") - ) - (deprecated "use GtkToggleButton.set_active") -) - -(define-virtual toggled - (of-object "GtkToggleButton") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktoggletoolbutton.h - -(define-function gtk_toggle_tool_button_get_type - (c-name "gtk_toggle_tool_button_get_type") - (return-type "GType") -) - -(define-function gtk_toggle_tool_button_new - (c-name "gtk_toggle_tool_button_new") - (is-constructor-of "GtkToggleToolButton") - (return-type "GtkToolItem*") -) - -(define-function toggle_tool_button_new_from_stock - (c-name "gtk_toggle_tool_button_new_from_stock") - (return-type "GtkToolItem*") - (parameters - '("const-gchar*" "stock_id") - ) - (caller-owns-return #t) -) - -(define-method set_active - (of-object "GtkToggleToolButton") - (c-name "gtk_toggle_tool_button_set_active") - (return-type "none") - (parameters - '("gboolean" "is_active") - ) -) - -(define-method get_active - (of-object "GtkToggleToolButton") - (c-name "gtk_toggle_tool_button_get_active") - (return-type "gboolean") -) - -(define-virtual toggled - (of-object "GtkToggleToolButton") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktoolbar.h - -(define-function gtk_toolbar_get_type - (c-name "gtk_toolbar_get_type") - (return-type "GType") -) - -(define-function gtk_toolbar_new - (c-name "gtk_toolbar_new") - (is-constructor-of "GtkToolbar") - (return-type "GtkWidget*") -) - -(define-method insert - (of-object "GtkToolbar") - (c-name "gtk_toolbar_insert") - (return-type "none") - (parameters - '("GtkToolItem*" "item") - '("gint" "pos") - ) -) - -(define-method get_item_index - (of-object "GtkToolbar") - (c-name "gtk_toolbar_get_item_index") - (return-type "gint") - (parameters - '("GtkToolItem*" "item") - ) -) - -(define-method get_n_items - (of-object "GtkToolbar") - (c-name "gtk_toolbar_get_n_items") - (return-type "gint") -) - -(define-method get_nth_item - (of-object "GtkToolbar") - (c-name "gtk_toolbar_get_nth_item") - (return-type "GtkToolItem*") - (parameters - '("gint" "n") - ) -) - -(define-method get_drop_index - (of-object "GtkToolbar") - (c-name "gtk_toolbar_get_drop_index") - (return-type "gint") - (parameters - '("gint" "x") - '("gint" "y") - ) -) - -(define-method set_drop_highlight_item - (of-object "GtkToolbar") - (c-name "gtk_toolbar_set_drop_highlight_item") - (return-type "none") - (parameters - '("GtkToolItem*" "tool_item" (null-ok)) - '("gint" "index") - ) -) - -(define-method set_show_arrow - (of-object "GtkToolbar") - (c-name "gtk_toolbar_set_show_arrow") - (return-type "none") - (parameters - '("gboolean" "show_arrow") - ) -) - -(define-method get_show_arrow - (of-object "GtkToolbar") - (c-name "gtk_toolbar_get_show_arrow") - (return-type "gboolean") -) - -(define-method get_relief_style - (of-object "GtkToolbar") - (c-name "gtk_toolbar_get_relief_style") - (return-type "GtkReliefStyle") -) - -(define-method append_item - (of-object "GtkToolbar") - (c-name "gtk_toolbar_append_item") - (return-type "GtkWidget*") - (parameters - '("const-char*" "text") - '("const-char*" "tooltip_text") - '("const-char*" "tooltip_private_text") - '("GtkWidget*" "icon") - '("GtkSignalFunc" "callback") - '("gpointer" "user_data" (null-ok) (default "NULL")) - ) - (deprecated "") -) - -(define-method prepend_item - (of-object "GtkToolbar") - (c-name "gtk_toolbar_prepend_item") - (return-type "GtkWidget*") - (parameters - '("const-char*" "text") - '("const-char*" "tooltip_text") - '("const-char*" "tooltip_private_text") - '("GtkWidget*" "icon") - '("GtkSignalFunc" "callback") - '("gpointer" "user_data") - ) - (deprecated "") -) - -(define-method insert_item - (of-object "GtkToolbar") - (c-name "gtk_toolbar_insert_item") - (return-type "GtkWidget*") - (parameters - '("const-char*" "text") - '("const-char*" "tooltip_text") - '("const-char*" "tooltip_private_text") - '("GtkWidget*" "icon") - '("GtkSignalFunc" "callback") - '("gpointer" "user_data") - '("gint" "position") - ) - (deprecated "") -) - -(define-method insert_stock - (of-object "GtkToolbar") - (c-name "gtk_toolbar_insert_stock") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "stock_id") - '("const-char*" "tooltip_text") - '("const-char*" "tooltip_private_text") - '("GtkSignalFunc" "callback") - '("gpointer" "user_data") - '("gint" "position") - ) - (deprecated "") -) - -(define-method append_space - (of-object "GtkToolbar") - (c-name "gtk_toolbar_append_space") - (return-type "none") - (deprecated "") -) - -(define-method prepend_space - (of-object "GtkToolbar") - (c-name "gtk_toolbar_prepend_space") - (return-type "none") - (deprecated "") -) - -(define-method insert_space - (of-object "GtkToolbar") - (c-name "gtk_toolbar_insert_space") - (return-type "none") - (parameters - '("gint" "position") - ) - (deprecated "") -) - -(define-method remove_space - (of-object "GtkToolbar") - (c-name "gtk_toolbar_remove_space") - (return-type "none") - (parameters - '("gint" "position") - ) - (deprecated "") -) - -(define-method append_element - (of-object "GtkToolbar") - (c-name "gtk_toolbar_append_element") - (return-type "GtkWidget*") - (parameters - '("GtkToolbarChildType" "type") - '("GtkWidget*" "widget") - '("const-char*" "text") - '("const-char*" "tooltip_text") - '("const-char*" "tooltip_private_text") - '("GtkWidget*" "icon") - '("GtkSignalFunc" "callback") - '("gpointer" "user_data") - ) - (deprecated "") -) - -(define-method prepend_element - (of-object "GtkToolbar") - (c-name "gtk_toolbar_prepend_element") - (return-type "GtkWidget*") - (parameters - '("GtkToolbarChildType" "type") - '("GtkWidget*" "widget") - '("const-char*" "text") - '("const-char*" "tooltip_text") - '("const-char*" "tooltip_private_text") - '("GtkWidget*" "icon") - '("GtkSignalFunc" "callback") - '("gpointer" "user_data") - ) - (deprecated "") -) - -(define-method insert_element - (of-object "GtkToolbar") - (c-name "gtk_toolbar_insert_element") - (return-type "GtkWidget*") - (parameters - '("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") - ) - (deprecated "") -) - -(define-method append_widget - (of-object "GtkToolbar") - (c-name "gtk_toolbar_append_widget") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - '("const-char*" "tooltip_text" (null-ok)) - '("const-char*" "tooltip_private_text" (null-ok)) - ) - (deprecated "") -) - -(define-method prepend_widget - (of-object "GtkToolbar") - (c-name "gtk_toolbar_prepend_widget") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - '("const-char*" "tooltip_text" (null-ok)) - '("const-char*" "tooltip_private_text" (null-ok)) - ) - (deprecated "") -) - -(define-method insert_widget - (of-object "GtkToolbar") - (c-name "gtk_toolbar_insert_widget") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - '("const-char*" "tooltip_text" (null-ok)) - '("const-char*" "tooltip_private_text" (null-ok)) - '("gint" "position") - ) - (deprecated "") -) - -(define-method set_orientation - (of-object "GtkToolbar") - (c-name "gtk_toolbar_set_orientation") - (return-type "none") - (parameters - '("GtkOrientation" "orientation") - ) -) - -(define-method set_style - (of-object "GtkToolbar") - (c-name "gtk_toolbar_set_style") - (return-type "none") - (parameters - '("GtkToolbarStyle" "style") - ) -) - -(define-method set_icon_size - (of-object "GtkToolbar") - (c-name "gtk_toolbar_set_icon_size") - (return-type "none") - (parameters - '("GtkIconSize" "icon_size") - ) - (deprecated "") -) - -(define-method set_tooltips - (of-object "GtkToolbar") - (c-name "gtk_toolbar_set_tooltips") - (return-type "none") - (parameters - '("gboolean" "enable") - ) -) - -(define-method unset_style - (of-object "GtkToolbar") - (c-name "gtk_toolbar_unset_style") - (return-type "none") -) - -(define-method unset_icon_size - (of-object "GtkToolbar") - (c-name "gtk_toolbar_unset_icon_size") - (return-type "none") - (deprecated "") -) - -(define-method get_orientation - (of-object "GtkToolbar") - (c-name "gtk_toolbar_get_orientation") - (return-type "GtkOrientation") -) - -(define-method get_style - (of-object "GtkToolbar") - (c-name "gtk_toolbar_get_style") - (return-type "GtkToolbarStyle") -) - -(define-method get_icon_size - (of-object "GtkToolbar") - (c-name "gtk_toolbar_get_icon_size") - (return-type "GtkIconSize") -) - -(define-method get_tooltips - (of-object "GtkToolbar") - (c-name "gtk_toolbar_get_tooltips") - (return-type "gboolean") -) - -(define-virtual orientation_changed - (of-object "GtkToolbar") - (return-type "none") - (parameters - '("GtkOrientation" "orientation") - ) -) -(define-virtual style_changed - (of-object "GtkToolbar") - (return-type "none") - (parameters - '("GtkToolbarStyle" "style") - ) -) -(define-virtual popup_context_menu - (of-object "GtkToolbar") - (return-type "gboolean") - (parameters - '("gint" "x") - '("gint" "y") - '("gint" "button_number") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktoolbutton.h - -(define-function gtk_tool_button_get_type - (c-name "gtk_tool_button_get_type") - (return-type "GType") -) - -(define-function gtk_tool_button_new - (c-name "gtk_tool_button_new") - (is-constructor-of "GtkToolButton") - (return-type "GtkToolItem*") - (parameters - '("GtkWidget*" "icon_widget" (null-ok) (default "NULL")) - '("const-gchar*" "label" (null-ok) (default "NULL")) - ) -) - -(define-function tool_button_new_from_stock - (c-name "gtk_tool_button_new_from_stock") - (return-type "GtkToolItem*") - (parameters - '("const-gchar*" "stock_id") - ) - (caller-owns-return #t) -) - -(define-method set_label - (of-object "GtkToolButton") - (c-name "gtk_tool_button_set_label") - (return-type "none") - (parameters - '("const-gchar*" "label" (null-ok)) - ) -) - -(define-method get_label - (of-object "GtkToolButton") - (c-name "gtk_tool_button_get_label") - (return-type "const-gchar*") -) - -(define-method set_use_underline - (of-object "GtkToolButton") - (c-name "gtk_tool_button_set_use_underline") - (return-type "none") - (parameters - '("gboolean" "use_underline") - ) -) - -(define-method get_use_underline - (of-object "GtkToolButton") - (c-name "gtk_tool_button_get_use_underline") - (return-type "gboolean") -) - -(define-method set_stock_id - (of-object "GtkToolButton") - (c-name "gtk_tool_button_set_stock_id") - (return-type "none") - (parameters - '("const-gchar*" "stock_id" (null-ok)) - ) -) - -(define-method set_icon_name - (of-object "GtkToolButton") - (c-name "gtk_tool_button_set_icon_name") - (return-type "none") - (parameters - '("const-gchar*" "icon_name" (null-ok)) - ) -) - -(define-method get_icon_name - (of-object "GtkToolButton") - (c-name "gtk_tool_button_get_icon_name") - (return-type "const-gchar*") -) - -(define-method get_stock_id - (of-object "GtkToolButton") - (c-name "gtk_tool_button_get_stock_id") - (return-type "const-gchar*") -) - -(define-method set_icon_widget - (of-object "GtkToolButton") - (c-name "gtk_tool_button_set_icon_widget") - (return-type "none") - (parameters - '("GtkWidget*" "icon_widget" (null-ok)) - ) -) - -(define-method get_icon_widget - (of-object "GtkToolButton") - (c-name "gtk_tool_button_get_icon_widget") - (return-type "GtkWidget*") -) - -(define-method set_label_widget - (of-object "GtkToolButton") - (c-name "gtk_tool_button_set_label_widget") - (return-type "none") - (parameters - '("GtkWidget*" "label_widget" (null-ok)) - ) -) - -(define-method get_label_widget - (of-object "GtkToolButton") - (c-name "gtk_tool_button_get_label_widget") - (return-type "GtkWidget*") -) - -(define-virtual clicked - (of-object "GtkToolButton") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktoolitem.h - -(define-function gtk_tool_item_get_type - (c-name "gtk_tool_item_get_type") - (return-type "GType") -) - -(define-function gtk_tool_item_new - (c-name "gtk_tool_item_new") - (is-constructor-of "GtkToolItem") - (return-type "GtkToolItem*") -) - -(define-method set_homogeneous - (of-object "GtkToolItem") - (c-name "gtk_tool_item_set_homogeneous") - (return-type "none") - (parameters - '("gboolean" "homogeneous") - ) -) - -(define-method get_homogeneous - (of-object "GtkToolItem") - (c-name "gtk_tool_item_get_homogeneous") - (return-type "gboolean") -) - -(define-method set_expand - (of-object "GtkToolItem") - (c-name "gtk_tool_item_set_expand") - (return-type "none") - (parameters - '("gboolean" "expand") - ) -) - -(define-method get_expand - (of-object "GtkToolItem") - (c-name "gtk_tool_item_get_expand") - (return-type "gboolean") -) - -(define-method set_tooltip - (of-object "GtkToolItem") - (c-name "gtk_tool_item_set_tooltip") - (return-type "none") - (parameters - ("GtkTooltips*" "tooltips") - ("const-gchar*" "tip_text" (null-ok) (default "NULL")) - ("const-gchar*" "tip_private" (null-ok) (default "NULL")) - ) -) - -(define-method set_use_drag_window - (of-object "GtkToolItem") - (c-name "gtk_tool_item_set_use_drag_window") - (return-type "none") - (parameters - '("gboolean" "use_drag_window") - ) -) - -(define-method get_use_drag_window - (of-object "GtkToolItem") - (c-name "gtk_tool_item_get_use_drag_window") - (return-type "gboolean") -) - -(define-method set_visible_horizontal - (of-object "GtkToolItem") - (c-name "gtk_tool_item_set_visible_horizontal") - (return-type "none") - (parameters - '("gboolean" "visible_horizontal") - ) -) - -(define-method get_visible_horizontal - (of-object "GtkToolItem") - (c-name "gtk_tool_item_get_visible_horizontal") - (return-type "gboolean") -) - -(define-method set_visible_vertical - (of-object "GtkToolItem") - (c-name "gtk_tool_item_set_visible_vertical") - (return-type "none") - (parameters - '("gboolean" "visible_vertical") - ) -) - -(define-method get_visible_vertical - (of-object "GtkToolItem") - (c-name "gtk_tool_item_get_visible_vertical") - (return-type "gboolean") -) - -(define-method set_is_important - (of-object "GtkToolItem") - (c-name "gtk_tool_item_set_is_important") - (return-type "none") - (parameters - '("gboolean" "is_important") - ) -) - -(define-method get_is_important - (of-object "GtkToolItem") - (c-name "gtk_tool_item_get_is_important") - (return-type "gboolean") -) - -(define-method get_icon_size - (of-object "GtkToolItem") - (c-name "gtk_tool_item_get_icon_size") - (return-type "GtkIconSize") -) - -(define-method get_orientation - (of-object "GtkToolItem") - (c-name "gtk_tool_item_get_orientation") - (return-type "GtkOrientation") -) - -(define-method get_toolbar_style - (of-object "GtkToolItem") - (c-name "gtk_tool_item_get_toolbar_style") - (return-type "GtkToolbarStyle") -) - -(define-method get_relief_style - (of-object "GtkToolItem") - (c-name "gtk_tool_item_get_relief_style") - (return-type "GtkReliefStyle") -) - -(define-method retrieve_proxy_menu_item - (of-object "GtkToolItem") - (c-name "gtk_tool_item_retrieve_proxy_menu_item") - (return-type "GtkWidget*") -) - -(define-method set_proxy_menu_item - (of-object "GtkToolItem") - (c-name "gtk_tool_item_set_proxy_menu_item") - (return-type "none") - (parameters - '("const-gchar*" "menu_item_id") - '("GtkWidget*" "menu_item" (null-ok)) - ) -) - -(define-method get_proxy_menu_item - (of-object "GtkToolItem") - (c-name "gtk_tool_item_get_proxy_menu_item") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "menu_item_id") - ) -) - -(define-method rebuild_menu - (of-object "GtkToolItem") - (c-name "gtk_tool_item_rebuild_menu") - (return-type "none") -) - -(define-virtual create_menu_proxy - (of-object "GtkToolItem") - (return-type "gboolean") -) -(define-virtual toolbar_reconfigured - (of-object "GtkToolItem") - (return-type "none") -) -(define-virtual set_tooltip - (of-object "GtkToolItem") - (return-type "gboolean") - (parameters - '("GtkTooltips*" "tooltips") - '("const-gchar*" "tip_text") - '("const-gchar*" "tip_private") - ) -) - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktooltips.h - -(define-function gtk_tooltips_get_type - (c-name "gtk_tooltips_get_type") - (return-type "GType") -) - -(define-function gtk_tooltips_new - (c-name "gtk_tooltips_new") - (is-constructor-of "GtkTooltips") - (return-type "GtkTooltips*") -) - -(define-method enable - (of-object "GtkTooltips") - (c-name "gtk_tooltips_enable") - (return-type "none") -) - -(define-method disable - (of-object "GtkTooltips") - (c-name "gtk_tooltips_disable") - (return-type "none") -) - -(define-method set_delay - (of-object "GtkTooltips") - (c-name "gtk_tooltips_set_delay") - (return-type "none") - (parameters - '("guint" "delay") - ) - (deprecated "") -) - -(define-method set_tip - (of-object "GtkTooltips") - (c-name "gtk_tooltips_set_tip") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - '("const-gchar*" "tip_text" (null-ok)) - '("const-gchar*" "tip_private" (null-ok) (default "NULL")) - ) -) - -(define-function tooltips_data_get - (c-name "gtk_tooltips_data_get") - (return-type "GtkTooltipsData*") - (parameters - '("GtkWidget*" "widget") - ) -) - -(define-function gtk_tooltips_data_get - (c-name "gtk_tooltips_data_get1") - (return-type "GtkTooltipsData*") - (parameters - '("GtkWidget*" "widget") - ) - (deprecated "use tooltips_data_get") -) - -(define-method force_window - (of-object "GtkTooltips") - (c-name "gtk_tooltips_force_window") - (return-type "none") -) - -(define-method tooltips_get_info_from_tip_window - (of-object "GtkWindow") - (c-name "gtk_tooltips_get_info_from_tip_window") - (return-type "gboolean") - (parameters - '("GtkTooltips**" "tooltips") - '("GtkWidget**" "current_widget") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktreednd.h - -(define-function gtk_tree_drag_source_get_type - (c-name "gtk_tree_drag_source_get_type") - (return-type "GType") -) - -(define-method row_draggable - (of-object "GtkTreeDragSource") - (c-name "gtk_tree_drag_source_row_draggable") - (return-type "gboolean") - (parameters - '("GtkTreePath*" "path") - ) -) - -(define-method drag_data_delete - (of-object "GtkTreeDragSource") - (c-name "gtk_tree_drag_source_drag_data_delete") - (return-type "gboolean") - (parameters - '("GtkTreePath*" "path") - ) -) - -(define-method drag_data_get - (of-object "GtkTreeDragSource") - (c-name "gtk_tree_drag_source_drag_data_get") - (return-type "gboolean") - (parameters - '("GtkTreePath*" "path") - '("GtkSelectionData*" "selection_data") - ) -) - -(define-virtual row_draggable - (of-object "GtkTreeDragSource") - (return-type "gboolean") - (parameters - '("GtkTreePath*" "path") - ) -) -(define-virtual drag_data_get - (of-object "GtkTreeDragSource") - (return-type "gboolean") - (parameters - '("GtkTreePath*" "path") - '("GtkSelectionData*" "selection_data") - ) -) -(define-virtual drag_data_delete - (of-object "GtkTreeDragSource") - (return-type "gboolean") - (parameters - '("GtkTreePath*" "path") - ) -) - - -(define-function gtk_tree_drag_dest_get_type - (c-name "gtk_tree_drag_dest_get_type") - (return-type "GType") -) - -(define-method drag_data_received - (of-object "GtkTreeDragDest") - (c-name "gtk_tree_drag_dest_drag_data_received") - (return-type "gboolean") - (parameters - '("GtkTreePath*" "dest") - '("GtkSelectionData*" "selection_data") - ) -) - -(define-method row_drop_possible - (of-object "GtkTreeDragDest") - (c-name "gtk_tree_drag_dest_row_drop_possible") - (return-type "gboolean") - (parameters - '("GtkTreePath*" "dest_path") - '("GtkSelectionData*" "selection_data") - ) -) - -(define-method tree_set_row_drag_data - (of-object "GtkSelectionData") - (c-name "gtk_tree_set_row_drag_data") - (return-type "gboolean") - (parameters - '("GtkTreeModel*" "tree_model") - '("GtkTreePath*" "path") - ) -) - -(define-method tree_get_row_drag_data - (of-object "GtkSelectionData") - (c-name "gtk_tree_get_row_drag_data") - (return-type "gboolean") - (parameters - '("GtkTreeModel**" "tree_model") - '("GtkTreePath**" "path") - ) -) - -(define-virtual drag_data_received - (of-object "GtkTreeDragDest") - (return-type "gboolean") - (parameters - '("GtkTreePath*" "dest") - '("GtkSelectionData*" "selection_data") - ) -) -(define-virtual row_drop_possible - (of-object "GtkTreeDragDest") - (return-type "gboolean") - (parameters - '("GtkTreePath*" "dest_path") - '("GtkSelectionData*" "selection_data") - ) -) - -;; From /mondo/local/gtk-2.10/include/gtk-2.0/gtk/gtktree.h - -(define-function gtk_tree_get_type - (c-name "gtk_tree_get_type") - (return-type "GtkType") -) - -(define-function gtk_tree_new - (c-name "gtk_tree_new") - (is-constructor-of "GtkTree") - (return-type "GtkWidget*") -) - -(define-method append - (of-object "GtkTree") - (c-name "gtk_tree_append") - (return-type "none") - (parameters - '("GtkWidget*" "tree_item") - ) -) - -(define-method prepend - (of-object "GtkTree") - (c-name "gtk_tree_prepend") - (return-type "none") - (parameters - '("GtkWidget*" "tree_item") - ) -) - -(define-method insert - (of-object "GtkTree") - (c-name "gtk_tree_insert") - (return-type "none") - (parameters - '("GtkWidget*" "tree_item") - '("gint" "position") - ) -) - -(define-method remove_items - (of-object "GtkTree") - (c-name "gtk_tree_remove_items") - (return-type "none") - (parameters - '("GList*" "items") - ) -) - -(define-method clear_items - (of-object "GtkTree") - (c-name "gtk_tree_clear_items") - (return-type "none") - (parameters - '("gint" "start") - '("gint" "end") - ) -) - -(define-method select_item - (of-object "GtkTree") - (c-name "gtk_tree_select_item") - (return-type "none") - (parameters - '("gint" "item") - ) -) - -(define-method unselect_item - (of-object "GtkTree") - (c-name "gtk_tree_unselect_item") - (return-type "none") - (parameters - '("gint" "item") - ) -) - -(define-method select_child - (of-object "GtkTree") - (c-name "gtk_tree_select_child") - (return-type "none") - (parameters - '("GtkWidget*" "tree_item") - ) -) - -(define-method unselect_child - (of-object "GtkTree") - (c-name "gtk_tree_unselect_child") - (return-type "none") - (parameters - '("GtkWidget*" "tree_item") - ) -) - -(define-method child_position - (of-object "GtkTree") - (c-name "gtk_tree_child_position") - (return-type "gint") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-method set_selection_mode - (of-object "GtkTree") - (c-name "gtk_tree_set_selection_mode") - (return-type "none") - (parameters - '("GtkSelectionMode" "mode") - ) -) - -(define-method set_view_mode - (of-object "GtkTree") - (c-name "gtk_tree_set_view_mode") - (return-type "none") - (parameters - '("GtkTreeViewMode" "mode") - ) -) - -(define-method set_view_lines - (of-object "GtkTree") - (c-name "gtk_tree_set_view_lines") - (return-type "none") - (parameters - '("gboolean" "flag") - ) -) - -(define-method remove_item - (of-object "GtkTree") - (c-name "gtk_tree_remove_item") - (return-type "none") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-virtual selection_changed - (of-object "GtkTree") - (return-type "none") -) - -(define-virtual select_child - (of-object "GtkTree") - (return-type "none") - (parameters - '("GtkWidget*" "child") - ) -) - -(define-virtual unselect_child - (of-object "GtkTree") - (return-type "none") - (parameters - '("GtkWidget*" "child") - ) -) - -;; From /mondo/local/gtk-2.10/include/gtk-2.0/gtk/gtktreeitem.h - -(define-function gtk_tree_item_get_type - (c-name "gtk_tree_item_get_type") - (return-type "GtkType") -) - -(define-function gtk_tree_item_new - (c-name "gtk_tree_item_new") - (is-constructor-of "GtkTreeItem") - (return-type "GtkWidget*") -) - -(define-function gtk_tree_item_new_with_label - (c-name "gtk_tree_item_new_with_label") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "label") - ) -) - -(define-method set_subtree - (of-object "GtkTreeItem") - (c-name "gtk_tree_item_set_subtree") - (return-type "none") - (parameters - '("GtkWidget*" "subtree") - ) -) - -(define-method remove_subtree - (of-object "GtkTreeItem") - (c-name "gtk_tree_item_remove_subtree") - (return-type "none") -) - -(define-method select - (of-object "GtkTreeItem") - (c-name "gtk_tree_item_select") - (return-type "none") -) - -(define-method deselect - (of-object "GtkTreeItem") - (c-name "gtk_tree_item_deselect") - (return-type "none") -) - -(define-method expand - (of-object "GtkTreeItem") - (c-name "gtk_tree_item_expand") - (return-type "none") -) - -(define-method collapse - (of-object "GtkTreeItem") - (c-name "gtk_tree_item_collapse") - (return-type "none") -) - -(define-virtual expand - (of-object "GtkTreeItem") - (return-type "none") -) - -(define-virtual collapse - (of-object "GtkTreeItem") - (return-type "none") -) - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktreemodel.h - -(define-function tree_path_get_type - (c-name "gtk_tree_path_get_type") - (return-type "GType") -) - -(define-function gtk_tree_path_new - (c-name "gtk_tree_path_new") - (is-constructor-of "GtkTreePath") - (return-type "GtkTreePath*") -) - -(define-function tree_path_new_from_string - (c-name "gtk_tree_path_new_from_string") - (return-type "GtkTreePath*") - (parameters - '("gchar*" "path") - ) -) - -(define-function tree_path_new_from_indices - (c-name "gtk_tree_path_new_from_indices") - (return-type "GtkTreePath*") - (parameters - '("gint" "first_index") - ) - (varargs #t) -) - -(define-method to_string - (of-object "GtkTreePath") - (c-name "gtk_tree_path_to_string") - (return-type "gchar*") -) - -(define-function tree_path_new_first - (c-name "gtk_tree_path_new_first") - (return-type "GtkTreePath*") -) - -(define-method append_index - (of-object "GtkTreePath") - (c-name "gtk_tree_path_append_index") - (return-type "none") - (parameters - '("gint" "index") - ) -) - -(define-method prepend_index - (of-object "GtkTreePath") - (c-name "gtk_tree_path_prepend_index") - (return-type "none") - (parameters - '("gint" "index") - ) -) - -(define-method get_depth - (of-object "GtkTreePath") - (c-name "gtk_tree_path_get_depth") - (return-type "gint") -) - -(define-method get_indices - (of-object "GtkTreePath") - (c-name "gtk_tree_path_get_indices") - (return-type "gint*") -) - -(define-method free - (of-object "GtkTreePath") - (c-name "gtk_tree_path_free") - (return-type "none") -) - -(define-method copy - (of-object "GtkTreePath") - (c-name "gtk_tree_path_copy") - (return-type "GtkTreePath*") - (caller-owns-return #t) -) - -(define-method compare - (of-object "GtkTreePath") - (c-name "gtk_tree_path_compare") - (return-type "gint") - (parameters - '("const-GtkTreePath*" "b") - ) -) - -(define-method next - (of-object "GtkTreePath") - (c-name "gtk_tree_path_next") - (return-type "none") -) - -(define-method prev - (of-object "GtkTreePath") - (c-name "gtk_tree_path_prev") - (return-type "gint") -) - -(define-method up - (of-object "GtkTreePath") - (c-name "gtk_tree_path_up") - (return-type "gint") -) - -(define-method down - (of-object "GtkTreePath") - (c-name "gtk_tree_path_down") - (return-type "none") -) - -(define-method is_ancestor - (of-object "GtkTreePath") - (c-name "gtk_tree_path_is_ancestor") - (return-type "gboolean") - (parameters - '("GtkTreePath*" "descendant") - ) -) - -(define-method is_descendant - (of-object "GtkTreePath") - (c-name "gtk_tree_path_is_descendant") - (return-type "gboolean") - (parameters - '("GtkTreePath*" "ancestor") - ) -) - -(define-function gtk_tree_row_reference_get_type - (c-name "gtk_tree_row_reference_get_type") - (return-type "GType") -) - -(define-function gtk_tree_row_reference_new - (c-name "gtk_tree_row_reference_new") - (is-constructor-of "GtkTreeRowReference") - (return-type "GtkTreeRowReference*") - (parameters - '("GtkTreeModel*" "model") - '("GtkTreePath*" "path") - ) -) - -(define-function gtk_tree_row_reference_new_proxy - (c-name "gtk_tree_row_reference_new_proxy") - (is-constructor-of "GtkTreeRowReference") - (return-type "GtkTreeRowReference*") - (parameters - '("GObject*" "proxy") - '("GtkTreeModel*" "model") - '("GtkTreePath*" "path") - ) -) - -(define-method get_path - (of-object "GtkTreeRowReference") - (c-name "gtk_tree_row_reference_get_path") - (return-type "GtkTreePath*") - (caller-owns-return #t) -) - - -(define-method get_model - (of-object "GtkTreeRowReference") - (c-name "gtk_tree_row_reference_get_model") - (return-type "GtkTreeModel*") -) - -(define-method valid - (of-object "GtkTreeRowReference") - (c-name "gtk_tree_row_reference_valid") - (return-type "gboolean") -) - -(define-method copy - (of-object "GtkTreeRowReference") - (c-name "gtk_tree_row_reference_copy") - (return-type "GtkTreeRowReference*") -) - -(define-method free - (of-object "GtkTreeRowReference") - (c-name "gtk_tree_row_reference_free") - (deprecated "don't call this or Bad Things will happen") - (return-type "none") -) - -(define-function tree_row_reference_inserted - (c-name "gtk_tree_row_reference_inserted") - (return-type "none") - (parameters - '("GObject*" "proxy") - '("GtkTreePath*" "path") - ) -) - -(define-function tree_row_reference_deleted - (c-name "gtk_tree_row_reference_deleted") - (return-type "none") - (parameters - '("GObject*" "proxy") - '("GtkTreePath*" "path") - ) -) - -(define-function tree_row_reference_reordered - (c-name "gtk_tree_row_reference_reordered") - (return-type "none") - (parameters - '("GObject*" "proxy") - '("GtkTreePath*" "path") - '("GtkTreeIter*" "iter") - '("gint*" "new_order") - ) -) - -(define-method copy - (of-object "GtkTreeIter") - (c-name "gtk_tree_iter_copy") - (return-type "GtkTreeIter*") - (caller-owns-return #t) -) - -(define-method free - (of-object "GtkTreeIter") - (c-name "gtk_tree_iter_free") - (return-type "none") -) - -(define-function gtk_tree_iter_get_type - (c-name "gtk_tree_iter_get_type") - (return-type "GType") -) - -(define-function gtk_tree_model_get_type - (c-name "gtk_tree_model_get_type") - (return-type "GType") -) - -(define-method get_flags - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_get_flags") - (return-type "GtkTreeModelFlags") -) - -(define-method get_n_columns - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_get_n_columns") - (return-type "gint") -) - -(define-method get_column_type - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_get_column_type") - (return-type "GType") - (parameters - '("gint" "index") - ) -) - -(define-method get_iter - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_get_iter") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreePath*" "path") - ) -) - -(define-method get_iter_from_string - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_get_iter_from_string") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - '("const-gchar*" "path_string") - ) -) - -(define-method get_string_from_iter - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_get_string_from_iter") - (return-type "gchar*") - (parameters - '("GtkTreeIter*" "iter") - ) -) - -(define-method get_iter_root - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_get_iter_first") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - ) -) - -(define-method get_iter_first - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_get_iter_first") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - ) -) - -(define-method get_path - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_get_path") - (return-type "GtkTreePath*") - (caller-owns-return #t) - (parameters - '("GtkTreeIter*" "iter") - ) -) - -(define-method get_value - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_get_value") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("gint" "column") - '("GValue*" "value") - ) -) - -(define-method iter_next - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_iter_next") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - ) -) - -(define-method iter_children - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_iter_children") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreeIter*" "parent" (null-ok)) - ) -) - -(define-method iter_has_child - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_iter_has_child") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - ) -) - -(define-method iter_n_children - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_iter_n_children") - (return-type "gint") - (parameters - '("GtkTreeIter*" "iter" (null-ok)) - ) -) - -(define-method iter_nth_child - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_iter_nth_child") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreeIter*" "parent" (null-ok)) - '("gint" "n") - ) -) - -(define-method iter_parent - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_iter_parent") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreeIter*" "child") - ) -) - -(define-method ref_node - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_ref_node") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - ) -) - -(define-method unref_node - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_unref_node") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - ) -) - -(define-method get - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_get") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - ) - (varargs #t) -) - -(define-method get_valist - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_get_valist") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("va_list" "var_args") - ) -) - -(define-method foreach - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_foreach") - (return-type "none") - (parameters - '("GtkTreeModelForeachFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-method row_changed - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_row_changed") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - '("GtkTreeIter*" "iter") - ) -) - -(define-method row_inserted - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_row_inserted") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - '("GtkTreeIter*" "iter") - ) -) - -(define-method row_has_child_toggled - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_row_has_child_toggled") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - '("GtkTreeIter*" "iter") - ) -) - -(define-method row_deleted - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_row_deleted") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - ) -) - -(define-method rows_reordered - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_rows_reordered") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - '("GtkTreeIter*" "iter") - '("gint*" "new_order") - ) -) - -(define-virtual row_changed - (of-object "GtkTreeModel") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - '("GtkTreeIter*" "iter") - ) -) -(define-virtual row_inserted - (of-object "GtkTreeModel") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - '("GtkTreeIter*" "iter") - ) -) -(define-virtual row_has_child_toggled - (of-object "GtkTreeModel") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - '("GtkTreeIter*" "iter") - ) -) -(define-virtual row_deleted - (of-object "GtkTreeModel") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - ) -) -(define-virtual rows_reordered - (of-object "GtkTreeModel") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - '("GtkTreeIter*" "iter") - '("gint*" "new_order") - ) -) -(define-virtual get_flags - (of-object "GtkTreeModel") - (return-type "GtkTreeModelFlags") -) -(define-virtual get_n_columns - (of-object "GtkTreeModel") - (return-type "gint") -) -(define-virtual get_column_type - (of-object "GtkTreeModel") - (return-type "GType") - (parameters - '("gint" "index_") - ) -) -(define-virtual get_iter - (of-object "GtkTreeModel") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreePath*" "path") - ) -) -(define-virtual get_path - (of-object "GtkTreeModel") - (return-type "GtkTreePath*") - (parameters - '("GtkTreeIter*" "iter") - ) -) - -(define-virtual get_value - (of-object "GtkTreeModel") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("gint" "column") - '("GValue*" "value") - ) -) -(define-virtual iter_next - (of-object "GtkTreeModel") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - ) -) -(define-virtual iter_children - (of-object "GtkTreeModel") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreeIter*" "parent") - ) -) -(define-virtual iter_has_child - (of-object "GtkTreeModel") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - ) -) -(define-virtual iter_n_children - (of-object "GtkTreeModel") - (return-type "gint") - (parameters - '("GtkTreeIter*" "iter") - ) -) -(define-virtual iter_nth_child - (of-object "GtkTreeModel") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreeIter*" "parent") - '("gint" "n") - ) -) -(define-virtual iter_parent - (of-object "GtkTreeModel") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreeIter*" "child") - ) -) -(define-virtual ref_node - (of-object "GtkTreeModel") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - ) -) -(define-virtual unref_node - (of-object "GtkTreeModel") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktreemodelfilter.h - -(define-function gtk_tree_model_filter_get_type - (c-name "gtk_tree_model_filter_get_type") - (return-type "GType") -) - -(define-method filter_new - (of-object "GtkTreeModel") - (c-name "gtk_tree_model_filter_new") - (return-type "GtkTreeModel*") - (parameters - '("GtkTreePath*" "root" (null-ok) (default "NULL")) - ) -) - -(define-method set_visible_func - (of-object "GtkTreeModelFilter") - (c-name "gtk_tree_model_filter_set_visible_func") - (return-type "none") - (parameters - '("GtkTreeModelFilterVisibleFunc" "func") - '("gpointer" "data") - '("GtkDestroyNotify" "destroy") - ) -) - -(define-method set_modify_func - (of-object "GtkTreeModelFilter") - (c-name "gtk_tree_model_filter_set_modify_func") - (return-type "none") - (parameters - '("gint" "n_columns") - '("GType*" "types") - '("GtkTreeModelFilterModifyFunc" "func") - '("gpointer" "data") - '("GtkDestroyNotify" "destroy") - ) -) - -(define-method set_visible_column - (of-object "GtkTreeModelFilter") - (c-name "gtk_tree_model_filter_set_visible_column") - (return-type "none") - (parameters - '("gint" "column") - ) -) - -(define-method get_model - (of-object "GtkTreeModelFilter") - (c-name "gtk_tree_model_filter_get_model") - (return-type "GtkTreeModel*") -) - -(define-method convert_child_iter_to_iter - (of-object "GtkTreeModelFilter") - (c-name "gtk_tree_model_filter_convert_child_iter_to_iter") - (return-type "none") - (parameters - '("GtkTreeIter*" "filter_iter") - '("GtkTreeIter*" "child_iter") - ) -) - -(define-method convert_iter_to_child_iter - (of-object "GtkTreeModelFilter") - (c-name "gtk_tree_model_filter_convert_iter_to_child_iter") - (return-type "none") - (parameters - '("GtkTreeIter*" "child_iter") - '("GtkTreeIter*" "filter_iter") - ) -) - -(define-method convert_child_path_to_path - (of-object "GtkTreeModelFilter") - (c-name "gtk_tree_model_filter_convert_child_path_to_path") - (return-type "GtkTreePath*") - (parameters - '("GtkTreePath*" "child_path") - ) -) - -(define-method convert_path_to_child_path - (of-object "GtkTreeModelFilter") - (c-name "gtk_tree_model_filter_convert_path_to_child_path") - (return-type "GtkTreePath*") - (parameters - '("GtkTreePath*" "filter_path") - ) -) - -(define-method refilter - (of-object "GtkTreeModelFilter") - (c-name "gtk_tree_model_filter_refilter") - (return-type "none") -) - -(define-method clear_cache - (of-object "GtkTreeModelFilter") - (c-name "gtk_tree_model_filter_clear_cache") - (return-type "none") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktreemodelsort.h - -(define-function gtk_tree_model_sort_get_type - (c-name "gtk_tree_model_sort_get_type") - (return-type "GType") -) - -(define-function gtk_tree_model_sort_new_with_model - (c-name "gtk_tree_model_sort_new_with_model") - (is-constructor-of "GtkTreeModelSort") - (return-type "GtkTreeModel*") - (properties - '("model" (argname "child_model")) - ) -) - -(define-method get_model - (of-object "GtkTreeModelSort") - (c-name "gtk_tree_model_sort_get_model") - (return-type "GtkTreeModel*") -) - -(define-method convert_child_path_to_path - (of-object "GtkTreeModelSort") - (c-name "gtk_tree_model_sort_convert_child_path_to_path") - (return-type "GtkTreePath*") - (caller-owns-return #t) - (parameters - '("GtkTreePath*" "child_path") - ) -) - -(define-method convert_child_iter_to_iter - (of-object "GtkTreeModelSort") - (c-name "gtk_tree_model_sort_convert_child_iter_to_iter") - (return-type "none") - (parameters - '("GtkTreeIter*" "sort_iter" (null-ok)) - '("GtkTreeIter*" "child_iter") - ) -) - -(define-method convert_path_to_child_path - (of-object "GtkTreeModelSort") - (c-name "gtk_tree_model_sort_convert_path_to_child_path") - (return-type "GtkTreePath*") - (caller-owns-return #t) - (parameters - '("GtkTreePath*" "sorted_path") - ) -) - -(define-method convert_iter_to_child_iter - (of-object "GtkTreeModelSort") - (c-name "gtk_tree_model_sort_convert_iter_to_child_iter") - (return-type "none") - (parameters - '("GtkTreeIter*" "child_iter" (null-ok)) - '("GtkTreeIter*" "sorted_iter") - ) -) - -(define-method reset_default_sort_func - (of-object "GtkTreeModelSort") - (c-name "gtk_tree_model_sort_reset_default_sort_func") - (return-type "none") -) - -(define-method clear_cache - (of-object "GtkTreeModelSort") - (c-name "gtk_tree_model_sort_clear_cache") - (return-type "none") -) - -(define-method iter_is_valid - (of-object "GtkTreeModelSort") - (c-name "gtk_tree_model_sort_iter_is_valid") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktreeselection.h - -(define-function gtk_tree_selection_get_type - (c-name "gtk_tree_selection_get_type") - (return-type "GType") -) - -(define-method set_mode - (of-object "GtkTreeSelection") - (c-name "gtk_tree_selection_set_mode") - (return-type "none") - (parameters - '("GtkSelectionMode" "type") - ) -) - -(define-method get_mode - (of-object "GtkTreeSelection") - (c-name "gtk_tree_selection_get_mode") - (return-type "GtkSelectionMode") -) - -(define-method set_select_function - (of-object "GtkTreeSelection") - (c-name "gtk_tree_selection_set_select_function") - (return-type "none") - (parameters - '("GtkTreeSelectionFunc" "func") - '("gpointer" "data") - '("GtkDestroyNotify" "destroy") - ) -) - -(define-method get_user_data - (of-object "GtkTreeSelection") - (c-name "gtk_tree_selection_get_user_data") - (return-type "gpointer") -) - -(define-method get_tree_view - (of-object "GtkTreeSelection") - (c-name "gtk_tree_selection_get_tree_view") - (return-type "GtkTreeView*") -) - -(define-method get_selected - (of-object "GtkTreeSelection") - (c-name "gtk_tree_selection_get_selected") - (return-type "gboolean") - (parameters - '("GtkTreeModel**" "model") - '("GtkTreeIter*" "iter") - ) -) - -(define-method get_selected_rows - (of-object "GtkTreeSelection") - (c-name "gtk_tree_selection_get_selected_rows") - (return-type "GList*") - (parameters - '("GtkTreeModel**" "model") - ) -) - -(define-method count_selected_rows - (of-object "GtkTreeSelection") - (c-name "gtk_tree_selection_count_selected_rows") - (return-type "gint") -) - -(define-method selected_foreach - (of-object "GtkTreeSelection") - (c-name "gtk_tree_selection_selected_foreach") - (return-type "none") - (parameters - '("GtkTreeSelectionForeachFunc" "func") - '("gpointer" "data") - ) -) - -(define-method select_path - (of-object "GtkTreeSelection") - (c-name "gtk_tree_selection_select_path") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - ) -) - -(define-method unselect_path - (of-object "GtkTreeSelection") - (c-name "gtk_tree_selection_unselect_path") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - ) -) - -(define-method select_iter - (of-object "GtkTreeSelection") - (c-name "gtk_tree_selection_select_iter") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - ) -) - -(define-method unselect_iter - (of-object "GtkTreeSelection") - (c-name "gtk_tree_selection_unselect_iter") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - ) -) - -(define-method path_is_selected - (of-object "GtkTreeSelection") - (c-name "gtk_tree_selection_path_is_selected") - (return-type "gboolean") - (parameters - '("GtkTreePath*" "path") - ) -) - -(define-method iter_is_selected - (of-object "GtkTreeSelection") - (c-name "gtk_tree_selection_iter_is_selected") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - ) -) - -(define-method select_all - (of-object "GtkTreeSelection") - (c-name "gtk_tree_selection_select_all") - (return-type "none") -) - -(define-method unselect_all - (of-object "GtkTreeSelection") - (c-name "gtk_tree_selection_unselect_all") - (return-type "none") -) - -(define-method select_range - (of-object "GtkTreeSelection") - (c-name "gtk_tree_selection_select_range") - (return-type "none") - (parameters - '("GtkTreePath*" "start_path") - '("GtkTreePath*" "end_path") - ) -) - -(define-method unselect_range - (of-object "GtkTreeSelection") - (c-name "gtk_tree_selection_unselect_range") - (return-type "none") - (parameters - '("GtkTreePath*" "start_path") - '("GtkTreePath*" "end_path") - ) -) - -(define-virtual changed - (of-object "GtkTreeSelection") - (return-type "none") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktreesortable.h - -(define-function gtk_tree_sortable_get_type - (c-name "gtk_tree_sortable_get_type") - (return-type "GType") -) - -(define-method sort_column_changed - (of-object "GtkTreeSortable") - (c-name "gtk_tree_sortable_sort_column_changed") - (return-type "none") -) - -(define-method get_sort_column_id - (of-object "GtkTreeSortable") - (c-name "gtk_tree_sortable_get_sort_column_id") - (return-type "gboolean") - (parameters - '("gint*" "sort_column_id") - '("GtkSortType*" "order") - ) -) - -(define-method set_sort_column_id - (of-object "GtkTreeSortable") - (c-name "gtk_tree_sortable_set_sort_column_id") - (return-type "none") - (parameters - '("gint" "sort_column_id") - '("GtkSortType" "order") - ) -) - -(define-method set_sort_func - (of-object "GtkTreeSortable") - (c-name "gtk_tree_sortable_set_sort_func") - (return-type "none") - (parameters - '("gint" "sort_column_id") - '("GtkTreeIterCompareFunc" "sort_func") - '("gpointer" "user_data") - '("GtkDestroyNotify" "destroy") - ) -) - -(define-method set_default_sort_func - (of-object "GtkTreeSortable") - (c-name "gtk_tree_sortable_set_default_sort_func") - (return-type "none") - (parameters - '("GtkTreeIterCompareFunc" "sort_func") - '("gpointer" "user_data") - '("GtkDestroyNotify" "destroy") - ) -) - -(define-method has_default_sort_func - (of-object "GtkTreeSortable") - (c-name "gtk_tree_sortable_has_default_sort_func") - (return-type "gboolean") -) - -(define-virtual sort_column_changed - (of-object "GtkTreeSortable") - (return-type "none") -) -(define-virtual get_sort_column_id - (of-object "GtkTreeSortable") - (return-type "gboolean") - (parameters - '("gint*" "sort_column_id") - '("GtkSortType*" "order") - ) -) -(define-virtual set_sort_column_id - (of-object "GtkTreeSortable") - (return-type "none") - (parameters - '("gint" "sort_column_id") - '("GtkSortType" "order") - ) -) -(define-virtual set_sort_func - (of-object "GtkTreeSortable") - (return-type "none") - (parameters - '("gint" "sort_column_id") - '("GtkTreeIterCompareFunc" "func") - '("gpointer" "data") - '("GtkDestroyNotify" "destroy") - ) -) -(define-virtual set_default_sort_func - (of-object "GtkTreeSortable") - (return-type "none") - (parameters - '("GtkTreeIterCompareFunc" "func") - '("gpointer" "data") - '("GtkDestroyNotify" "destroy") - ) -) -(define-virtual has_default_sort_func - (of-object "GtkTreeSortable") - (return-type "gboolean") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktreestore.h - -(define-function gtk_tree_store_get_type - (c-name "gtk_tree_store_get_type") - (return-type "GType") -) - -(define-function gtk_tree_store_new - (c-name "gtk_tree_store_new") - (is-constructor-of "GtkTreeStore") - (return-type "GtkTreeStore*") - (parameters - '("gint" "n_columns") - ) - (varargs #t) -) - -(define-function gtk_tree_store_newv - (c-name "gtk_tree_store_newv") - (is-constructor-of "GtkTreeStore") - (return-type "GtkTreeStore*") - (parameters - '("gint" "n_columns") - '("GType*" "types") - ) -) - -(define-method set_column_types - (of-object "GtkTreeStore") - (c-name "gtk_tree_store_set_column_types") - (return-type "none") - (parameters - '("gint" "n_columns") - '("GType*" "types") - ) -) - -(define-method set_value - (of-object "GtkTreeStore") - (c-name "gtk_tree_store_set_value") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("gint" "column") - '("GValue*" "value") - ) -) - -(define-method set - (of-object "GtkTreeStore") - (c-name "gtk_tree_store_set") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - ) - (varargs #t) -) - -(define-method set_valist - (of-object "GtkTreeStore") - (c-name "gtk_tree_store_set_valist") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("va_list" "var_args") - ) -) - -(define-method remove - (of-object "GtkTreeStore") - (c-name "gtk_tree_store_remove") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - ) -) - -(define-method insert - (of-object "GtkTreeStore") - (c-name "gtk_tree_store_insert") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreeIter*" "parent") - '("gint" "position") - ) -) - -(define-method insert_before - (of-object "GtkTreeStore") - (c-name "gtk_tree_store_insert_before") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreeIter*" "parent") - '("GtkTreeIter*" "sibling") - ) -) - -(define-method insert_after - (of-object "GtkTreeStore") - (c-name "gtk_tree_store_insert_after") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreeIter*" "parent") - '("GtkTreeIter*" "sibling") - ) -) - -(define-method prepend - (of-object "GtkTreeStore") - (c-name "gtk_tree_store_prepend") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreeIter*" "parent") - ) -) - -(define-method append - (of-object "GtkTreeStore") - (c-name "gtk_tree_store_append") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreeIter*" "parent") - ) -) - -(define-method is_ancestor - (of-object "GtkTreeStore") - (c-name "gtk_tree_store_is_ancestor") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreeIter*" "descendant") - ) -) - -(define-method iter_depth - (of-object "GtkTreeStore") - (c-name "gtk_tree_store_iter_depth") - (return-type "gint") - (parameters - '("GtkTreeIter*" "iter") - ) -) - -(define-method clear - (of-object "GtkTreeStore") - (c-name "gtk_tree_store_clear") - (return-type "none") -) - -(define-method iter_is_valid - (of-object "GtkTreeStore") - (c-name "gtk_tree_store_iter_is_valid") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - ) -) - -(define-method reorder - (of-object "GtkTreeStore") - (c-name "gtk_tree_store_reorder") - (return-type "none") - (parameters - '("GtkTreeIter*" "parent") - '("gint*" "new_order") - ) -) - -(define-method swap - (of-object "GtkTreeStore") - (c-name "gtk_tree_store_swap") - (return-type "none") - (parameters - '("GtkTreeIter*" "a") - '("GtkTreeIter*" "b") - ) -) - -(define-method move_after - (of-object "GtkTreeStore") - (c-name "gtk_tree_store_move_after") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreeIter*" "position" (null-ok)) - ) -) - -(define-method move_before - (of-object "GtkTreeStore") - (c-name "gtk_tree_store_move_before") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreeIter*" "position" (null-ok)) - ) -) - -(define-method queue_resize - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_queue_resize") - (return-type "none") -) - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktreeview.h - -(define-function gtk_tree_view_get_type - (c-name "gtk_tree_view_get_type") - (return-type "GType") -) - -(define-function gtk_tree_view_new - (c-name "gtk_tree_view_new") - (is-constructor-of "GtkTreeView") - (return-type "GtkWidget*") -) - -(define-function gtk_tree_view_new_with_model - (c-name "gtk_tree_view_new_with_model") - (is-constructor-of "GtkTreeView") - (return-type "GtkWidget*") - (properties - '("model" (optional)) - ) -) - -(define-method get_model - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_model") - (return-type "GtkTreeModel*") -) - -(define-method set_model - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_model") - (return-type "none") - (parameters - '("GtkTreeModel*" "model" (null-ok) (default "NULL")) - ) -) - -(define-method get_selection - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_selection") - (return-type "GtkTreeSelection*") -) - -(define-method get_hadjustment - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_hadjustment") - (return-type "GtkAdjustment*") -) - -(define-method set_hadjustment - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_hadjustment") - (return-type "none") - (parameters - '("GtkAdjustment*" "adjustment") - ) -) - -(define-method get_vadjustment - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_vadjustment") - (return-type "GtkAdjustment*") -) - -(define-method set_vadjustment - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_vadjustment") - (return-type "none") - (parameters - '("GtkAdjustment*" "adjustment") - ) -) - -(define-method get_headers_visible - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_headers_visible") - (return-type "gboolean") -) - -(define-method set_headers_visible - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_headers_visible") - (return-type "none") - (parameters - '("gboolean" "headers_visible") - ) -) - -(define-method columns_autosize - (of-object "GtkTreeView") - (c-name "gtk_tree_view_columns_autosize") - (return-type "none") -) - -(define-method set_headers_clickable - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_headers_clickable") - (return-type "none") - (parameters - '("gboolean" "active") - ) -) - -(define-method set_rules_hint - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_rules_hint") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_rules_hint - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_rules_hint") - (return-type "gboolean") -) - -(define-method append_column - (of-object "GtkTreeView") - (c-name "gtk_tree_view_append_column") - (return-type "gint") - (parameters - '("GtkTreeViewColumn*" "column") - ) -) - -(define-method remove_column - (of-object "GtkTreeView") - (c-name "gtk_tree_view_remove_column") - (return-type "gint") - (parameters - '("GtkTreeViewColumn*" "column") - ) -) - -(define-method insert_column - (of-object "GtkTreeView") - (c-name "gtk_tree_view_insert_column") - (return-type "gint") - (parameters - '("GtkTreeViewColumn*" "column") - '("gint" "position") - ) -) - -(define-method insert_column_with_attributes - (of-object "GtkTreeView") - (c-name "gtk_tree_view_insert_column_with_attributes") - (return-type "gint") - (parameters - '("gint" "position") - '("const-gchar*" "title") - '("GtkCellRenderer*" "cell") - ) - (varargs #t) -) - -(define-method insert_column_with_data_func - (of-object "GtkTreeView") - (c-name "gtk_tree_view_insert_column_with_data_func") - (return-type "gint") - (parameters - '("gint" "position") - '("const-gchar*" "title") - '("GtkCellRenderer*" "cell") - '("GtkTreeCellDataFunc" "func") - '("gpointer" "data") - '("GDestroyNotify" "dnotify") - ) -) - -(define-method get_column - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_column") - (return-type "GtkTreeViewColumn*") - (parameters - '("gint" "n") - ) -) - -(define-method get_columns - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_columns") - (return-type "GList*") -) - -(define-method move_column_after - (of-object "GtkTreeView") - (c-name "gtk_tree_view_move_column_after") - (return-type "none") - (parameters - '("GtkTreeViewColumn*" "column") - '("GtkTreeViewColumn*" "base_column" (null-ok)) - ) -) - -(define-method set_expander_column - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_expander_column") - (return-type "none") - (parameters - '("GtkTreeViewColumn*" "column") - ) -) - -(define-method get_expander_column - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_expander_column") - (return-type "GtkTreeViewColumn*") -) - -(define-method set_column_drag_function - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_column_drag_function") - (return-type "none") - (parameters - '("GtkTreeViewColumnDropFunc" "func") - '("gpointer" "user_data") - '("GtkDestroyNotify" "destroy") - ) -) - -(define-method scroll_to_point - (of-object "GtkTreeView") - (c-name "gtk_tree_view_scroll_to_point") - (return-type "none") - (parameters - '("gint" "tree_x") - '("gint" "tree_y") - ) -) - -(define-method scroll_to_cell - (of-object "GtkTreeView") - (c-name "gtk_tree_view_scroll_to_cell") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - '("GtkTreeViewColumn*" "column" (null-ok) (default "NULL")) - '("gboolean" "use_align" (default "FALSE")) - '("gfloat" "row_align" (default "0.0")) - '("gfloat" "col_align" (default "0.0")) - ) -) - -(define-method row_activated - (of-object "GtkTreeView") - (c-name "gtk_tree_view_row_activated") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - '("GtkTreeViewColumn*" "column") - ) -) - -(define-method expand_all - (of-object "GtkTreeView") - (c-name "gtk_tree_view_expand_all") - (return-type "none") -) - -(define-method collapse_all - (of-object "GtkTreeView") - (c-name "gtk_tree_view_collapse_all") - (return-type "none") -) - -(define-method expand_to_path - (of-object "GtkTreeView") - (c-name "gtk_tree_view_expand_to_path") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - ) -) - -(define-method expand_row - (of-object "GtkTreeView") - (c-name "gtk_tree_view_expand_row") - (return-type "gboolean") - (parameters - '("GtkTreePath*" "path") - '("gboolean" "open_all") - ) -) - -(define-method collapse_row - (of-object "GtkTreeView") - (c-name "gtk_tree_view_collapse_row") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - ) -) - -(define-method map_expanded_rows - (of-object "GtkTreeView") - (c-name "gtk_tree_view_map_expanded_rows") - (return-type "none") - (parameters - '("GtkTreeViewMappingFunc" "func") - '("gpointer" "data") - ) -) - -(define-method row_expanded - (of-object "GtkTreeView") - (c-name "gtk_tree_view_row_expanded") - (return-type "gboolean") - (parameters - '("GtkTreePath*" "path") - ) -) - -(define-method set_reorderable - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_reorderable") - (return-type "none") - (parameters - '("gboolean" "reorderable") - ) -) - -(define-method get_reorderable - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_reorderable") - (return-type "gboolean") -) - -(define-method set_cursor - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_cursor") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - '("GtkTreeViewColumn*" "focus_column" (null-ok) (default "NULL")) - '("gboolean" "start_editing" (default "FALSE")) - ) -) - -(define-method set_cursor_on_cell - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_cursor_on_cell") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - '("GtkTreeViewColumn*" "focus_column" (null-ok) (default "NULL")) - '("GtkCellRenderer*" "focus_cell" (null-ok) (default "NULL")) - '("gboolean" "start_editing" (default "FALSE")) - ) -) - -(define-method get_cursor - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_cursor") - (return-type "none") - (parameters - '("GtkTreePath**" "path") - '("GtkTreeViewColumn**" "focus_column") - ) -) - -(define-method get_bin_window - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_bin_window") - (return-type "GdkWindow*") -) - -(define-method get_path_at_pos - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_path_at_pos") - (return-type "gboolean") - (parameters - '("gint" "x") - '("gint" "y") - '("GtkTreePath**" "path") - '("GtkTreeViewColumn**" "column") - '("gint*" "cell_x") - '("gint*" "cell_y") - ) -) - -(define-method get_cell_area - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_cell_area") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - '("GtkTreeViewColumn*" "column") - '("GdkRectangle*" "rect") - ) -) - -(define-method get_background_area - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_background_area") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - '("GtkTreeViewColumn*" "column") - '("GdkRectangle*" "rect") - ) -) - -(define-method get_visible_rect - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_visible_rect") - (return-type "none") - (parameters - '("GdkRectangle*" "visible_rect") - ) -) - -(define-method widget_to_tree_coords - (of-object "GtkTreeView") - (c-name "gtk_tree_view_widget_to_tree_coords") - (return-type "none") - (parameters - '("gint" "wx") - '("gint" "wy") - '("gint*" "tx") - '("gint*" "ty") - ) -) - -(define-method tree_to_widget_coords - (of-object "GtkTreeView") - (c-name "gtk_tree_view_tree_to_widget_coords") - (return-type "none") - (parameters - '("gint" "tx") - '("gint" "ty") - '("gint*" "wx") - '("gint*" "wy") - ) -) - -(define-method enable_model_drag_source - (of-object "GtkTreeView") - (c-name "gtk_tree_view_enable_model_drag_source") - (return-type "none") - (parameters - '("GdkModifierType" "start_button_mask") - '("const-GtkTargetEntry*" "targets") - '("gint" "n_targets") - '("GdkDragAction" "actions") - ) -) - -(define-method enable_model_drag_dest - (of-object "GtkTreeView") - (c-name "gtk_tree_view_enable_model_drag_dest") - (return-type "none") - (parameters - '("const-GtkTargetEntry*" "targets") - '("gint" "n_targets") - '("GdkDragAction" "actions") - ) -) - -(define-method unset_rows_drag_source - (of-object "GtkTreeView") - (c-name "gtk_tree_view_unset_rows_drag_source") - (return-type "none") -) - -(define-method unset_rows_drag_dest - (of-object "GtkTreeView") - (c-name "gtk_tree_view_unset_rows_drag_dest") - (return-type "none") -) - -(define-method set_drag_dest_row - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_drag_dest_row") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - '("GtkTreeViewDropPosition" "pos") - ) -) - -(define-method get_drag_dest_row - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_drag_dest_row") - (return-type "none") - (parameters - '("GtkTreePath**" "path") - '("GtkTreeViewDropPosition*" "pos") - ) -) - -(define-method get_dest_row_at_pos - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_dest_row_at_pos") - (return-type "gboolean") - (parameters - '("gint" "drag_x") - '("gint" "drag_y") - '("GtkTreePath**" "path") - '("GtkTreeViewDropPosition*" "pos") - ) -) - -(define-method create_row_drag_icon - (of-object "GtkTreeView") - (c-name "gtk_tree_view_create_row_drag_icon") - (return-type "GdkPixmap*") - (parameters - '("GtkTreePath*" "path") - ) -) - -(define-method set_enable_search - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_enable_search") - (return-type "none") - (parameters - '("gboolean" "enable_search") - ) -) - -(define-method get_enable_search - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_enable_search") - (return-type "gboolean") -) - -(define-method get_search_column - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_search_column") - (return-type "gint") -) - -(define-method set_search_column - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_search_column") - (return-type "none") - (parameters - '("gint" "column") - ) -) - -(define-method get_search_equal_func - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_search_equal_func") - (return-type "GtkTreeViewSearchEqualFunc") -) - -(define-method set_search_equal_func - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_search_equal_func") - (return-type "none") - (parameters - '("GtkTreeViewSearchEqualFunc" "search_equal_func") - '("gpointer" "search_user_data") - '("GtkDestroyNotify" "search_destroy") - ) -) - -(define-method set_destroy_count_func - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_destroy_count_func") - (return-type "none") - (parameters - '("GtkTreeDestroyCountFunc" "func") - '("gpointer" "data") - '("GtkDestroyNotify" "destroy") - ) -) - -(define-method set_fixed_height_mode - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_fixed_height_mode") - (return-type "none") - (parameters - '("gboolean" "enable") - ) -) - -(define-method get_fixed_height_mode - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_fixed_height_mode") - (return-type "gboolean") -) - -(define-method set_hover_selection - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_hover_selection") - (return-type "none") - (parameters - '("gboolean" "hover") - ) -) - -(define-method get_hover_selection - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_hover_selection") - (return-type "gboolean") -) - -(define-method set_hover_expand - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_hover_expand") - (return-type "none") - (parameters - '("gboolean" "expand") - ) -) - -(define-method get_hover_expand - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_hover_expand") - (return-type "gboolean") -) - -(define-method get_row_separator_func - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_row_separator_func") - (return-type "GtkTreeViewRowSeparatorFunc") -) - -(define-method set_row_separator_func - (of-object "GtkTreeView") - (c-name "gtk_tree_view_set_row_separator_func") - (return-type "none") - (parameters - '("GtkTreeViewRowSeparatorFunc" "func") - '("gpointer" "data") - '("GtkDestroyNotify" "destroy") - ) -) - -(define-method get_visible_range - (of-object "GtkTreeView") - (c-name "gtk_tree_view_get_visible_range") - (return-type "gboolean") - (parameters - '("GtkTreePath**" "start_path") - '("GtkTreePath**" "end_path") - ) -) - -(define-virtual set_scroll_adjustments - (of-object "GtkTreeView") - (return-type "none") - (parameters - '("GtkAdjustment*" "hadjustment") - '("GtkAdjustment*" "vadjustment") - ) -) -(define-virtual row_activated - (of-object "GtkTreeView") - (return-type "none") - (parameters - '("GtkTreePath*" "path") - '("GtkTreeViewColumn*" "column") - ) -) -(define-virtual test_expand_row - (of-object "GtkTreeView") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreePath*" "path") - ) -) -(define-virtual test_collapse_row - (of-object "GtkTreeView") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreePath*" "path") - ) -) -(define-virtual row_expanded - (of-object "GtkTreeView") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreePath*" "path") - ) -) -(define-virtual row_collapsed - (of-object "GtkTreeView") - (return-type "none") - (parameters - '("GtkTreeIter*" "iter") - '("GtkTreePath*" "path") - ) -) -(define-virtual columns_changed - (of-object "GtkTreeView") - (return-type "none") -) -(define-virtual cursor_changed - (of-object "GtkTreeView") - (return-type "none") -) -(define-virtual move_cursor - (of-object "GtkTreeView") - (return-type "gboolean") - (parameters - '("GtkMovementStep" "step") - '("gint" "count") - ) -) -(define-virtual select_all - (of-object "GtkTreeView") - (return-type "gboolean") -) -(define-virtual unselect_all - (of-object "GtkTreeView") - (return-type "gboolean") -) -(define-virtual select_cursor_row - (of-object "GtkTreeView") - (return-type "gboolean") - (parameters - '("gboolean" "start_editing") - ) -) -(define-virtual toggle_cursor_row - (of-object "GtkTreeView") - (return-type "gboolean") -) -(define-virtual expand_collapse_cursor_row - (of-object "GtkTreeView") - (return-type "gboolean") - (parameters - '("gboolean" "logical") - '("gboolean" "expand") - '("gboolean" "open_all") - ) -) -(define-virtual select_cursor_parent - (of-object "GtkTreeView") - (return-type "gboolean") -) -(define-virtual start_interactive_search - (of-object "GtkTreeView") - (return-type "gboolean") -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktreeviewcolumn.h - -(define-function gtk_tree_view_column_get_type - (c-name "gtk_tree_view_column_get_type") - (return-type "GType") -) - -(define-function gtk_tree_view_column_new - (c-name "gtk_tree_view_column_new") - (is-constructor-of "GtkTreeViewColumn") - (return-type "GtkObject*") -) - -(define-function gtk_tree_view_column_new_with_attributes - (c-name "gtk_tree_view_column_new_with_attributes") - (is-constructor-of "GtkTreeViewColumn") - (return-type "GtkObject*") - (parameters - '("gchar*" "title") - '("GtkCellRenderer*" "cell") - ) - (varargs #t) -) - -(define-method pack_start - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_pack_start") - (return-type "none") - (parameters - '("GtkCellRenderer*" "cell") - '("gboolean" "expand" (default "TRUE")) - ) -) - -(define-method pack_end - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_pack_end") - (return-type "none") - (parameters - '("GtkCellRenderer*" "cell") - '("gboolean" "expand" (default "TRUE")) - ) -) - -(define-method clear - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_clear") - (return-type "none") -) - -(define-method get_cell_renderers - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_get_cell_renderers") - (return-type "GList*") -) - -(define-method add_attribute - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_add_attribute") - (return-type "none") - (parameters - '("GtkCellRenderer*" "cell_renderer") - '("gchar*" "attribute") - '("gint" "column") - ) -) - -(define-method set_attributes - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_set_attributes") - (return-type "none") - (parameters - '("GtkCellRenderer*" "cell_renderer") - ) - (varargs #t) -) - -(define-method set_cell_data_func - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_set_cell_data_func") - (return-type "none") - (parameters - '("GtkCellRenderer*" "cell_renderer") - '("GtkTreeCellDataFunc" "func") - '("gpointer" "func_data") - '("GtkDestroyNotify" "destroy") - ) -) - -(define-method clear_attributes - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_clear_attributes") - (return-type "none") - (parameters - '("GtkCellRenderer*" "cell_renderer") - ) -) - -(define-method set_spacing - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_set_spacing") - (return-type "none") - (parameters - '("gint" "spacing") - ) -) - -(define-method get_spacing - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_get_spacing") - (return-type "gint") -) - -(define-method set_visible - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_set_visible") - (return-type "none") - (parameters - '("gboolean" "visible") - ) -) - -(define-method get_visible - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_get_visible") - (return-type "gboolean") -) - -(define-method set_resizable - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_set_resizable") - (return-type "none") - (parameters - '("gboolean" "resizable") - ) -) - -(define-method get_resizable - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_get_resizable") - (return-type "gboolean") -) - -(define-method set_sizing - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_set_sizing") - (return-type "none") - (parameters - '("GtkTreeViewColumnSizing" "type") - ) -) - -(define-method get_sizing - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_get_sizing") - (return-type "gint") -) - -(define-method get_width - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_get_width") - (return-type "gint") -) - -(define-method get_fixed_width - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_get_fixed_width") - (return-type "gint") -) - -(define-method set_fixed_width - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_set_fixed_width") - (return-type "none") - (parameters - '("gint" "fixed_width") - ) -) - -(define-method set_min_width - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_set_min_width") - (return-type "none") - (parameters - '("gint" "min_width") - ) -) - -(define-method get_min_width - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_get_min_width") - (return-type "gint") -) - -(define-method set_max_width - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_set_max_width") - (return-type "none") - (parameters - '("gint" "max_width") - ) -) - -(define-method get_max_width - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_get_max_width") - (return-type "gint") -) - -(define-method clicked - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_clicked") - (return-type "none") -) - -(define-method set_title - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_set_title") - (return-type "none") - (parameters - '("gchar*" "title") - ) -) - -(define-method get_title - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_get_title") - (return-type "const-gchar*") -) - -(define-method set_expand - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_set_expand") - (return-type "none") - (parameters - '("gboolean" "expand") - ) -) - -(define-method get_expand - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_get_expand") - (return-type "gboolean") -) - -(define-method set_clickable - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_set_clickable") - (return-type "none") - (parameters - '("gboolean" "active") - ) -) - -(define-method get_clickable - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_get_clickable") - (return-type "gboolean") -) - -(define-method set_widget - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_set_widget") - (return-type "none") - (parameters - '("GtkWidget*" "widget" (null-ok)) - ) -) - -(define-method get_widget - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_get_widget") - (return-type "GtkWidget*") -) - -(define-method set_alignment - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_set_alignment") - (return-type "none") - (parameters - '("gfloat" "xalign") - ) -) - -(define-method get_alignment - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_get_alignment") - (return-type "gfloat") -) - -(define-method set_reorderable - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_set_reorderable") - (return-type "none") - (parameters - '("gboolean" "reorderable") - ) -) - -(define-method get_reorderable - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_get_reorderable") - (return-type "gboolean") -) - -(define-method set_sort_column_id - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_set_sort_column_id") - (return-type "none") - (parameters - '("gint" "sort_column_id") - ) -) - -(define-method get_sort_column_id - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_get_sort_column_id") - (return-type "gint") -) - -(define-method set_sort_indicator - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_set_sort_indicator") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_sort_indicator - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_get_sort_indicator") - (return-type "gboolean") -) - -(define-method set_sort_order - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_set_sort_order") - (return-type "none") - (parameters - '("GtkSortType" "order") - ) -) - -(define-method get_sort_order - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_get_sort_order") - (return-type "GtkSortType") -) - -(define-method cell_set_cell_data - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_cell_set_cell_data") - (return-type "none") - (parameters - '("GtkTreeModel*" "tree_model") - '("GtkTreeIter*" "iter") - '("gboolean" "is_expander") - '("gboolean" "is_expanded") - ) -) - -(define-method cell_get_size - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_cell_get_size") - (return-type "none") - (parameters - '("GdkRectangle*" "cell_area") - '("gint*" "x_offset") - '("gint*" "y_offset") - '("gint*" "width") - '("gint*" "height") - ) -) - -(define-method cell_is_visible - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_cell_is_visible") - (return-type "gboolean") -) - -(define-method focus_cell - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_focus_cell") - (return-type "none") - (parameters - '("GtkCellRenderer*" "cell") - ) -) - -(define-method cell_get_position - (of-object "GtkTreeViewColumn") - (c-name "gtk_tree_view_column_cell_get_position") - (return-type "none") - (parameters - '("GtkCellRenderer*" "cell_renderer") - '("gint*" "start_pos") - '("gint*" "width") - ) -) - -(define-virtual clicked - (of-object "GtkTreeViewColumn") - (return-type "none") -) - -;; From /mondo/local/gtk-2.10/include/gtk-2.0/gtk/gtktypebuiltins.h - -(define-function gtk_accel_flags_get_type - (c-name "gtk_accel_flags_get_type") - (return-type "GType") -) - -(define-function gtk_calendar_display_options_get_type - (c-name "gtk_calendar_display_options_get_type") - (return-type "GType") -) - -(define-function gtk_cell_renderer_state_get_type - (c-name "gtk_cell_renderer_state_get_type") - (return-type "GType") -) - -(define-function gtk_cell_renderer_mode_get_type - (c-name "gtk_cell_renderer_mode_get_type") - (return-type "GType") -) - -(define-function gtk_cell_type_get_type - (c-name "gtk_cell_type_get_type") - (return-type "GType") -) - -(define-function gtk_clist_drag_pos_get_type - (c-name "gtk_clist_drag_pos_get_type") - (return-type "GType") -) - -(define-function gtk_button_action_get_type - (c-name "gtk_button_action_get_type") - (return-type "GType") -) - -(define-function gtk_ctree_pos_get_type - (c-name "gtk_ctree_pos_get_type") - (return-type "GType") -) - -(define-function gtk_ctree_line_style_get_type - (c-name "gtk_ctree_line_style_get_type") - (return-type "GType") -) - -(define-function gtk_ctree_expander_style_get_type - (c-name "gtk_ctree_expander_style_get_type") - (return-type "GType") -) - -(define-function gtk_ctree_expansion_type_get_type - (c-name "gtk_ctree_expansion_type_get_type") - (return-type "GType") -) - -(define-function gtk_debug_flag_get_type - (c-name "gtk_debug_flag_get_type") - (return-type "GType") -) - -(define-function gtk_dialog_flags_get_type - (c-name "gtk_dialog_flags_get_type") - (return-type "GType") -) - -(define-function gtk_response_type_get_type - (c-name "gtk_response_type_get_type") - (return-type "GType") -) - -(define-function gtk_dest_defaults_get_type - (c-name "gtk_dest_defaults_get_type") - (return-type "GType") -) - -(define-function gtk_target_flags_get_type - (c-name "gtk_target_flags_get_type") - (return-type "GType") -) - -(define-function gtk_anchor_type_get_type - (c-name "gtk_anchor_type_get_type") - (return-type "GType") -) - -(define-function gtk_arrow_type_get_type - (c-name "gtk_arrow_type_get_type") - (return-type "GType") -) - -(define-function gtk_attach_options_get_type - (c-name "gtk_attach_options_get_type") - (return-type "GType") -) - -(define-function gtk_button_box_style_get_type - (c-name "gtk_button_box_style_get_type") - (return-type "GType") -) - -(define-function gtk_curve_type_get_type - (c-name "gtk_curve_type_get_type") - (return-type "GType") -) - -(define-function gtk_delete_type_get_type - (c-name "gtk_delete_type_get_type") - (return-type "GType") -) - -(define-function gtk_direction_type_get_type - (c-name "gtk_direction_type_get_type") - (return-type "GType") -) - -(define-function gtk_expander_style_get_type - (c-name "gtk_expander_style_get_type") - (return-type "GType") -) - -(define-function gtk_icon_size_get_type - (c-name "gtk_icon_size_get_type") - (return-type "GType") -) - -(define-function gtk_side_type_get_type - (c-name "gtk_side_type_get_type") - (return-type "GType") -) - -(define-function gtk_text_direction_get_type - (c-name "gtk_text_direction_get_type") - (return-type "GType") -) - -(define-function gtk_justification_get_type - (c-name "gtk_justification_get_type") - (return-type "GType") -) - -(define-function gtk_match_type_get_type - (c-name "gtk_match_type_get_type") - (return-type "GType") -) - -(define-function gtk_menu_direction_type_get_type - (c-name "gtk_menu_direction_type_get_type") - (return-type "GType") -) - -(define-function gtk_metric_type_get_type - (c-name "gtk_metric_type_get_type") - (return-type "GType") -) - -(define-function gtk_movement_step_get_type - (c-name "gtk_movement_step_get_type") - (return-type "GType") -) - -(define-function gtk_scroll_step_get_type - (c-name "gtk_scroll_step_get_type") - (return-type "GType") -) - -(define-function gtk_orientation_get_type - (c-name "gtk_orientation_get_type") - (return-type "GType") -) - -(define-function gtk_corner_type_get_type - (c-name "gtk_corner_type_get_type") - (return-type "GType") -) - -(define-function gtk_pack_type_get_type - (c-name "gtk_pack_type_get_type") - (return-type "GType") -) - -(define-function gtk_path_priority_type_get_type - (c-name "gtk_path_priority_type_get_type") - (return-type "GType") -) - -(define-function gtk_path_type_get_type - (c-name "gtk_path_type_get_type") - (return-type "GType") -) - -(define-function gtk_policy_type_get_type - (c-name "gtk_policy_type_get_type") - (return-type "GType") -) - -(define-function gtk_position_type_get_type - (c-name "gtk_position_type_get_type") - (return-type "GType") -) - -(define-function gtk_preview_type_get_type - (c-name "gtk_preview_type_get_type") - (return-type "GType") -) - -(define-function gtk_relief_style_get_type - (c-name "gtk_relief_style_get_type") - (return-type "GType") -) - -(define-function gtk_resize_mode_get_type - (c-name "gtk_resize_mode_get_type") - (return-type "GType") -) - -(define-function gtk_signal_run_type_get_type - (c-name "gtk_signal_run_type_get_type") - (return-type "GType") -) - -(define-function gtk_scroll_type_get_type - (c-name "gtk_scroll_type_get_type") - (return-type "GType") -) - -(define-function gtk_selection_mode_get_type - (c-name "gtk_selection_mode_get_type") - (return-type "GType") -) - -(define-function gtk_shadow_type_get_type - (c-name "gtk_shadow_type_get_type") - (return-type "GType") -) - -(define-function gtk_state_type_get_type - (c-name "gtk_state_type_get_type") - (return-type "GType") -) - -(define-function gtk_submenu_direction_get_type - (c-name "gtk_submenu_direction_get_type") - (return-type "GType") -) - -(define-function gtk_submenu_placement_get_type - (c-name "gtk_submenu_placement_get_type") - (return-type "GType") -) - -(define-function gtk_toolbar_style_get_type - (c-name "gtk_toolbar_style_get_type") - (return-type "GType") -) - -(define-function gtk_update_type_get_type - (c-name "gtk_update_type_get_type") - (return-type "GType") -) - -(define-function gtk_visibility_get_type - (c-name "gtk_visibility_get_type") - (return-type "GType") -) - -(define-function gtk_window_position_get_type - (c-name "gtk_window_position_get_type") - (return-type "GType") -) - -(define-function gtk_window_type_get_type - (c-name "gtk_window_type_get_type") - (return-type "GType") -) - -(define-function gtk_wrap_mode_get_type - (c-name "gtk_wrap_mode_get_type") - (return-type "GType") -) - -(define-function gtk_sort_type_get_type - (c-name "gtk_sort_type_get_type") - (return-type "GType") -) - -(define-function gtk_im_preedit_style_get_type - (c-name "gtk_im_preedit_style_get_type") - (return-type "GType") -) - -(define-function gtk_im_status_style_get_type - (c-name "gtk_im_status_style_get_type") - (return-type "GType") -) - -(define-function gtk_pack_direction_get_type - (c-name "gtk_pack_direction_get_type") - (return-type "GType") -) - -(define-function gtk_file_chooser_action_get_type - (c-name "gtk_file_chooser_action_get_type") - (return-type "GType") -) - -(define-function gtk_file_chooser_confirmation_get_type - (c-name "gtk_file_chooser_confirmation_get_type") - (return-type "GType") -) - -(define-function gtk_file_chooser_error_get_type - (c-name "gtk_file_chooser_error_get_type") - (return-type "GType") -) - -(define-function gtk_file_filter_flags_get_type - (c-name "gtk_file_filter_flags_get_type") - (return-type "GType") -) - -(define-function gtk_icon_lookup_flags_get_type - (c-name "gtk_icon_lookup_flags_get_type") - (return-type "GType") -) - -(define-function gtk_icon_theme_error_get_type - (c-name "gtk_icon_theme_error_get_type") - (return-type "GType") -) - -(define-function gtk_icon_view_drop_position_get_type - (c-name "gtk_icon_view_drop_position_get_type") - (return-type "GType") -) - -(define-function gtk_image_type_get_type - (c-name "gtk_image_type_get_type") - (return-type "GType") -) - -(define-function gtk_message_type_get_type - (c-name "gtk_message_type_get_type") - (return-type "GType") -) - -(define-function gtk_buttons_type_get_type - (c-name "gtk_buttons_type_get_type") - (return-type "GType") -) - -(define-function gtk_notebook_tab_get_type - (c-name "gtk_notebook_tab_get_type") - (return-type "GType") -) - -(define-function gtk_object_flags_get_type - (c-name "gtk_object_flags_get_type") - (return-type "GType") -) - -(define-function gtk_arg_flags_get_type - (c-name "gtk_arg_flags_get_type") - (return-type "GType") -) - -(define-function gtk_print_status_get_type - (c-name "gtk_print_status_get_type") - (return-type "GType") -) - -(define-function gtk_print_operation_result_get_type - (c-name "gtk_print_operation_result_get_type") - (return-type "GType") -) - -(define-function gtk_print_error_get_type - (c-name "gtk_print_error_get_type") - (return-type "GType") -) - -(define-function gtk_private_flags_get_type - (c-name "gtk_private_flags_get_type") - (return-type "GType") -) - -(define-function gtk_progress_bar_style_get_type - (c-name "gtk_progress_bar_style_get_type") - (return-type "GType") -) - -(define-function gtk_progress_bar_orientation_get_type - (c-name "gtk_progress_bar_orientation_get_type") - (return-type "GType") -) - -(define-function gtk_rc_flags_get_type - (c-name "gtk_rc_flags_get_type") - (return-type "GType") -) - -(define-function gtk_rc_token_type_get_type - (c-name "gtk_rc_token_type_get_type") - (return-type "GType") -) - -(define-function gtk_size_group_mode_get_type - (c-name "gtk_size_group_mode_get_type") - (return-type "GType") -) - -(define-function gtk_spin_button_update_policy_get_type - (c-name "gtk_spin_button_update_policy_get_type") - (return-type "GType") -) - -(define-function gtk_spin_type_get_type - (c-name "gtk_spin_type_get_type") - (return-type "GType") -) - -(define-function gtk_text_search_flags_get_type - (c-name "gtk_text_search_flags_get_type") - (return-type "GType") -) - -(define-function gtk_text_window_type_get_type - (c-name "gtk_text_window_type_get_type") - (return-type "GType") -) - -(define-function gtk_toolbar_child_type_get_type - (c-name "gtk_toolbar_child_type_get_type") - (return-type "GType") -) - -(define-function gtk_toolbar_space_style_get_type - (c-name "gtk_toolbar_space_style_get_type") - (return-type "GType") -) - -(define-function gtk_tree_view_mode_get_type - (c-name "gtk_tree_view_mode_get_type") - (return-type "GType") -) - -(define-function gtk_tree_model_flags_get_type - (c-name "gtk_tree_model_flags_get_type") - (return-type "GType") -) - -(define-function gtk_tree_view_drop_position_get_type - (c-name "gtk_tree_view_drop_position_get_type") - (return-type "GType") -) - -(define-function gtk_tree_view_column_sizing_get_type - (c-name "gtk_tree_view_column_sizing_get_type") - (return-type "GType") -) - -(define-function gtk_ui_manager_item_type_get_type - (c-name "gtk_ui_manager_item_type_get_type") - (return-type "GType") -) - -(define-function gtk_widget_flags_get_type - (c-name "gtk_widget_flags_get_type") - (return-type "GType") -) - -(define-function gtk_widget_help_type_get_type - (c-name "gtk_widget_help_type_get_type") - (return-type "GType") -) - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtktypeutils.h - -(define-function identifier_get_type - (c-name "gtk_identifier_get_type") - (return-type "GType") -) - -(define-method class - (of-object "GtkType") - (c-name "gtk_type_class") - (return-type "gpointer") -) - -(define-method unique - (of-object "GtkType") - (c-name "gtk_type_unique") - (return-type "GtkType") - (parameters - '("const-GtkTypeInfo*" "gtkinfo") - ) -) - -(define-method new - (of-object "GtkType") - (c-name "gtk_type_new") - (return-type "gpointer") -) - -(define-method enum_get_values - (of-object "GtkType") - (c-name "gtk_type_enum_get_values") - (return-type "GtkEnumValue*") -) - -(define-method flags_get_values - (of-object "GtkType") - (c-name "gtk_type_flags_get_values") - (return-type "GtkFlagValue*") -) - -(define-method enum_find_value - (of-object "GtkType") - (c-name "gtk_type_enum_find_value") - (return-type "GtkEnumValue*") - (parameters - '("const-gchar*" "value_name") - ) -) - -(define-method flags_find_value - (of-object "GtkType") - (c-name "gtk_type_flags_find_value") - (return-type "GtkFlagValue*") - (parameters - '("const-gchar*" "value_name") - ) -) - -(define-function gtk_type_init - (c-name "gtk_type_init") - (return-type "none") - (parameters - '("GTypeDebugFlags" "debug_flags") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkuimanager.h - -(define-function gtk_ui_manager_get_type - (c-name "gtk_ui_manager_get_type") - (return-type "GType") -) - -(define-function gtk_ui_manager_new - (c-name "gtk_ui_manager_new") - (is-constructor-of "GtkUIManager") - (return-type "GtkUIManager*") -) - -(define-method set_add_tearoffs - (of-object "GtkUIManager") - (c-name "gtk_ui_manager_set_add_tearoffs") - (return-type "none") - (parameters - '("gboolean" "add_tearoffs") - ) -) - -(define-method get_add_tearoffs - (of-object "GtkUIManager") - (c-name "gtk_ui_manager_get_add_tearoffs") - (return-type "gboolean") -) - -(define-method insert_action_group - (of-object "GtkUIManager") - (c-name "gtk_ui_manager_insert_action_group") - (return-type "none") - (parameters - '("GtkActionGroup*" "action_group") - '("gint" "pos") - ) -) - -(define-method remove_action_group - (of-object "GtkUIManager") - (c-name "gtk_ui_manager_remove_action_group") - (return-type "none") - (parameters - '("GtkActionGroup*" "action_group") - ) -) - -(define-method get_action_groups - (of-object "GtkUIManager") - (c-name "gtk_ui_manager_get_action_groups") - (return-type "GList*") -) - -(define-method get_accel_group - (of-object "GtkUIManager") - (c-name "gtk_ui_manager_get_accel_group") - (return-type "GtkAccelGroup*") -) - -(define-method get_widget - (of-object "GtkUIManager") - (c-name "gtk_ui_manager_get_widget") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "path") - ) -) - -(define-method get_toplevels - (of-object "GtkUIManager") - (c-name "gtk_ui_manager_get_toplevels") - (return-type "GSList*") - (parameters - '("GtkUIManagerItemType" "types") - ) -) - -(define-method get_action - (of-object "GtkUIManager") - (c-name "gtk_ui_manager_get_action") - (return-type "GtkAction*") - (parameters - '("const-gchar*" "path") - ) -) - -(define-method add_ui_from_string - (of-object "GtkUIManager") - (c-name "gtk_ui_manager_add_ui_from_string") - (return-type "guint") - (parameters - '("const-gchar*" "buffer") - '("gssize" "length") - '("GError**" "error") - ) -) - -(define-method add_ui_from_file - (of-object "GtkUIManager") - (c-name "gtk_ui_manager_add_ui_from_file") - (return-type "guint") - (parameters - '("const-gchar*" "filename") - '("GError**" "error") - ) -) - -(define-method add_ui - (of-object "GtkUIManager") - (c-name "gtk_ui_manager_add_ui") - (return-type "none") - (parameters - '("guint" "merge_id") - '("const-gchar*" "path") - '("const-gchar*" "name") - '("const-gchar*" "action" (null-ok)) - '("GtkUIManagerItemType" "type") - '("gboolean" "top") - ) -) - -(define-method remove_ui - (of-object "GtkUIManager") - (c-name "gtk_ui_manager_remove_ui") - (return-type "none") - (parameters - '("guint" "merge_id") - ) -) - -(define-method get_ui - (of-object "GtkUIManager") - (c-name "gtk_ui_manager_get_ui") - (return-type "gchar*") -) - -(define-method ensure_update - (of-object "GtkUIManager") - (c-name "gtk_ui_manager_ensure_update") - (return-type "none") -) - -(define-method new_merge_id - (of-object "GtkUIManager") - (c-name "gtk_ui_manager_new_merge_id") - (return-type "guint") -) - -(define-virtual add_widget - (of-object "GtkUIManager") - (return-type "none") - (parameters - '("GtkWidget*" "widget") - ) -) -(define-virtual actions_changed - (of-object "GtkUIManager") - (return-type "none") -) -(define-virtual connect_proxy - (of-object "GtkUIManager") - (return-type "none") - (parameters - '("GtkAction*" "action") - '("GtkWidget*" "proxy") - ) -) -(define-virtual disconnect_proxy - (of-object "GtkUIManager") - (return-type "none") - (parameters - '("GtkAction*" "action") - '("GtkWidget*" "proxy") - ) -) -(define-virtual pre_activate - (of-object "GtkUIManager") - (return-type "none") - (parameters - '("GtkAction*" "action") - ) -) -(define-virtual post_activate - (of-object "GtkUIManager") - (return-type "none") - (parameters - '("GtkAction*" "action") - ) -) - -(define-virtual get_widget - (of-object "GtkUIManager") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "path") - ) -) - -(define-virtual get_action - (of-object "GtkUIManager") - (return-type "GtkAction*") - (parameters - '("const-gchar*" "path") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkvbbox.h - -(define-function gtk_vbutton_box_get_type - (c-name "gtk_vbutton_box_get_type") - (return-type "GType") -) - -(define-function gtk_vbutton_box_new - (c-name "gtk_vbutton_box_new") - (is-constructor-of "GtkVButtonBox") - (return-type "GtkWidget*") -) - -(define-function vbutton_box_get_spacing_default - (c-name "gtk_vbutton_box_get_spacing_default") - (return-type "gint") - (deprecated "") -) - -(define-function vbutton_box_set_spacing_default - (c-name "gtk_vbutton_box_set_spacing_default") - (return-type "none") - (parameters - '("gint" "spacing") - ) - (deprecated "") -) - -(define-function vbutton_box_get_layout_default - (c-name "gtk_vbutton_box_get_layout_default") - (return-type "GtkButtonBoxStyle") - (deprecated "") -) - -(define-function vbutton_box_set_layout_default - (c-name "gtk_vbutton_box_set_layout_default") - (return-type "none") - (parameters - '("GtkButtonBoxStyle" "layout") - ) - (deprecated "") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkvbox.h - -(define-function gtk_vbox_get_type - (c-name "gtk_vbox_get_type") - (return-type "GType") -) - -(define-function gtk_vbox_new - (c-name "gtk_vbox_new") - (is-constructor-of "GtkVBox") - (return-type "GtkWidget*") - (properties - '("homogeneous" (optional)) - '("spacing" (optional)) - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkversion.h - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkviewport.h - -(define-function gtk_viewport_get_type - (c-name "gtk_viewport_get_type") - (return-type "GType") -) - -(define-function gtk_viewport_new - (c-name "gtk_viewport_new") - (is-constructor-of "GtkViewport") - (return-type "GtkWidget*") - (properties - '("hadjustment" (optional)) - '("vadjustment" (optional)) - ) -) - -(define-method get_hadjustment - (of-object "GtkViewport") - (c-name "gtk_viewport_get_hadjustment") - (return-type "GtkAdjustment*") -) - -(define-method get_vadjustment - (of-object "GtkViewport") - (c-name "gtk_viewport_get_vadjustment") - (return-type "GtkAdjustment*") -) - -(define-method set_hadjustment - (of-object "GtkViewport") - (c-name "gtk_viewport_set_hadjustment") - (return-type "none") - (parameters - '("GtkAdjustment*" "adjustment" (null-ok)) - ) -) - -(define-method set_vadjustment - (of-object "GtkViewport") - (c-name "gtk_viewport_set_vadjustment") - (return-type "none") - (parameters - '("GtkAdjustment*" "adjustment" (null-ok)) - ) -) - -(define-method set_shadow_type - (of-object "GtkViewport") - (c-name "gtk_viewport_set_shadow_type") - (return-type "none") - (parameters - '("GtkShadowType" "type") - ) -) - -(define-method get_shadow_type - (of-object "GtkViewport") - (c-name "gtk_viewport_get_shadow_type") - (return-type "GtkShadowType") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkvpaned.h - -(define-function gtk_vpaned_get_type - (c-name "gtk_vpaned_get_type") - (return-type "GType") -) - -(define-function gtk_vpaned_new - (c-name "gtk_vpaned_new") - (is-constructor-of "GtkVPaned") - (return-type "GtkWidget*") -) - -(define-virtual set_scroll_adjustments - (of-object "GtkViewport") - (return-type "none") - (parameters - '("GtkAdjustment*" "hadjustment") - '("GtkAdjustment*" "vadjustment") - ) -) - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkvruler.h - -(define-function gtk_vruler_get_type - (c-name "gtk_vruler_get_type") - (return-type "GType") -) - -(define-function gtk_vruler_new - (c-name "gtk_vruler_new") - (is-constructor-of "GtkVRuler") - (return-type "GtkWidget*") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkvscale.h - -(define-function gtk_vscale_get_type - (c-name "gtk_vscale_get_type") - (return-type "GType") -) - -(define-function gtk_vscale_new - (c-name "gtk_vscale_new") - (is-constructor-of "GtkVScale") - (return-type "GtkWidget*") - (properties - '("adjustment" (optional)) - ) -) - -(define-function gtk_vscale_new_with_range - (c-name "gtk_vscale_new_with_range") - (is-constructor-of "GtkVScale") - (return-type "GtkWidget*") - (parameters - '("gdouble" "min") - '("gdouble" "max") - '("gdouble" "step") - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkvscrollbar.h - -(define-function gtk_vscrollbar_get_type - (c-name "gtk_vscrollbar_get_type") - (return-type "GType") -) - -(define-function gtk_vscrollbar_new - (c-name "gtk_vscrollbar_new") - (is-constructor-of "GtkVScrollbar") - (return-type "GtkWidget*") - (properties - '("adjustment" (optional)) - ) -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkvseparator.h - -(define-function gtk_vseparator_get_type - (c-name "gtk_vseparator_get_type") - (return-type "GType") -) - -(define-function gtk_vseparator_new - (c-name "gtk_vseparator_new") - (is-constructor-of "GtkVSeparator") - (return-type "GtkWidget*") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkwidget.h - -(define-function gtk_widget_get_type - (c-name "gtk_widget_get_type") - (return-type "GType") -) - -(define-function gtk_widget_new - (c-name "gtk_widget_new") - (is-constructor-of "GtkWidget") - (return-type "GtkWidget*") - (parameters - '("GType" "type") - '("const-gchar*" "first_property_name") - ) - (varargs #t) -) - -(define-method ref - (of-object "GtkWidget") - (c-name "gtk_widget_ref") - (return-type "GtkWidget*") -) - -(define-method unref - (of-object "GtkWidget") - (c-name "gtk_widget_unref") - (return-type "none") -) - -(define-method destroy - (of-object "GtkWidget") - (c-name "gtk_widget_destroy") - (return-type "none") -) - -(define-method destroyed - (of-object "GtkWidget") - (c-name "gtk_widget_destroyed") - (return-type "none") - (parameters - '("GtkWidget**" "widget_pointer") - ) -) - -(define-method set - (of-object "GtkWidget") - (c-name "gtk_widget_set") - (return-type "none") - (parameters - '("const-gchar*" "first_property_name") - ) - (varargs #t) -) - -(define-method unparent - (of-object "GtkWidget") - (c-name "gtk_widget_unparent") - (return-type "none") -) - -(define-method show - (of-object "GtkWidget") - (c-name "gtk_widget_show") - (return-type "none") -) - -(define-method show_now - (of-object "GtkWidget") - (c-name "gtk_widget_show_now") - (return-type "none") -) - -(define-method hide - (of-object "GtkWidget") - (c-name "gtk_widget_hide") - (return-type "none") -) - -(define-method show_all - (of-object "GtkWidget") - (c-name "gtk_widget_show_all") - (return-type "none") -) - -(define-method hide_all - (of-object "GtkWidget") - (c-name "gtk_widget_hide_all") - (return-type "none") -) - -(define-method set_no_show_all - (of-object "GtkWidget") - (c-name "gtk_widget_set_no_show_all") - (return-type "none") - (parameters - '("gboolean" "no_show_all") - ) -) - -(define-method get_no_show_all - (of-object "GtkWidget") - (c-name "gtk_widget_get_no_show_all") - (return-type "gboolean") -) - -(define-method map - (of-object "GtkWidget") - (c-name "gtk_widget_map") - (return-type "none") -) - -(define-method unmap - (of-object "GtkWidget") - (c-name "gtk_widget_unmap") - (return-type "none") -) - -(define-method realize - (of-object "GtkWidget") - (c-name "gtk_widget_realize") - (return-type "none") -) - -(define-method unrealize - (of-object "GtkWidget") - (c-name "gtk_widget_unrealize") - (return-type "none") -) - -(define-method queue_draw - (of-object "GtkWidget") - (c-name "gtk_widget_queue_draw") - (return-type "none") -) - -(define-method queue_draw_area - (of-object "GtkWidget") - (c-name "gtk_widget_queue_draw_area") - (return-type "none") - (parameters - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) -) - -(define-method queue_clear - (of-object "GtkWidget") - (c-name "gtk_widget_queue_clear") - (return-type "none") - (deprecated "use GtkWidget.queue_draw") -) - -(define-method queue_clear_area - (of-object "GtkWidget") - (c-name "gtk_widget_queue_clear_area") - (return-type "none") - (parameters - '("gint" "x") - '("gint" "y") - '("gint" "width") - '("gint" "height") - ) - (deprecated "use GtkWidget.queue_draw_area") -) - -(define-method queue_resize - (of-object "GtkWidget") - (c-name "gtk_widget_queue_resize") - (return-type "none") -) - -(define-method queue_resize_no_redraw - (of-object "GtkWidget") - (c-name "gtk_widget_queue_resize_no_redraw") - (return-type "none") -) - -(define-method draw - (of-object "GtkWidget") - (c-name "gtk_widget_draw") - (return-type "none") - (parameters - '("GdkRectangle*" "area") - ) - (deprecated "use GtkWidget.queue_draw_area") -) - -(define-method size_request - (of-object "GtkWidget") - (c-name "gtk_widget_size_request") - (return-type "none") - (parameters - '("GtkRequisition*" "requisition") - ) -) - -(define-method size_allocate - (of-object "GtkWidget") - (c-name "gtk_widget_size_allocate") - (return-type "none") - (parameters - '("GtkAllocation*" "allocation") - ) -) - -(define-method get_child_requisition - (of-object "GtkWidget") - (c-name "gtk_widget_get_child_requisition") - (return-type "none") - (parameters - '("GtkRequisition*" "requisition") - ) -) - -(define-method add_accelerator - (of-object "GtkWidget") - (c-name "gtk_widget_add_accelerator") - (return-type "none") - (parameters - '("const-gchar*" "accel_signal") - '("GtkAccelGroup*" "accel_group") - '("guint" "accel_key") - '("GdkModifierType" "accel_mods") - '("GtkAccelFlags" "accel_flags") - ) -) - -(define-method remove_accelerator - (of-object "GtkWidget") - (c-name "gtk_widget_remove_accelerator") - (return-type "gboolean") - (parameters - '("GtkAccelGroup*" "accel_group") - '("guint" "accel_key") - '("GdkModifierType" "accel_mods") - ) -) - -(define-method set_accel_path - (of-object "GtkWidget") - (c-name "gtk_widget_set_accel_path") - (return-type "none") - (parameters - '("const-gchar*" "accel_path") - '("GtkAccelGroup*" "accel_group") - ) -) - -(define-method list_accel_closures - (of-object "GtkWidget") - (c-name "gtk_widget_list_accel_closures") - (return-type "GList*") -) - -(define-method can_activate_accel - (of-object "GtkWidget") - (c-name "gtk_widget_can_activate_accel") - (return-type "gboolean") - (parameters - '("guint" "signal_id") - ) -) - -(define-method mnemonic_activate - (of-object "GtkWidget") - (c-name "gtk_widget_mnemonic_activate") - (return-type "gboolean") - (parameters - '("gboolean" "group_cycling") - ) -) - -(define-method event - (of-object "GtkWidget") - (c-name "gtk_widget_event") - (return-type "gboolean") - (parameters - '("GdkEvent*" "event") - ) -) - -(define-method send_expose - (of-object "GtkWidget") - (c-name "gtk_widget_send_expose") - (return-type "gint") - (parameters - '("GdkEvent*" "event") - ) -) - -(define-method activate - (of-object "GtkWidget") - (c-name "gtk_widget_activate") - (return-type "gboolean") -) - -(define-method set_scroll_adjustments - (of-object "GtkWidget") - (c-name "gtk_widget_set_scroll_adjustments") - (return-type "gboolean") - (parameters - '("GtkAdjustment*" "hadjustment" (null-ok)) - '("GtkAdjustment*" "vadjustment" (null-ok)) - ) -) - -(define-method reparent - (of-object "GtkWidget") - (c-name "gtk_widget_reparent") - (return-type "none") - (parameters - '("GtkWidget*" "new_parent") - ) -) - -(define-method intersect - (of-object "GtkWidget") - (c-name "gtk_widget_intersect") - (return-type "gboolean") - (parameters - '("GdkRectangle*" "area") - '("GdkRectangle*" "intersection") - ) -) - -(define-method region_intersect - (of-object "GtkWidget") - (c-name "gtk_widget_region_intersect") - (return-type "GdkRegion*") - (caller-owns-return #t) - (parameters - '("GdkRegion*" "region") - ) -) - -(define-method freeze_child_notify - (of-object "GtkWidget") - (c-name "gtk_widget_freeze_child_notify") - (return-type "none") -) - -(define-method child_notify - (of-object "GtkWidget") - (c-name "gtk_widget_child_notify") - (return-type "none") - (parameters - '("const-gchar*" "child_property") - ) -) - -(define-method thaw_child_notify - (of-object "GtkWidget") - (c-name "gtk_widget_thaw_child_notify") - (return-type "none") -) - -(define-method is_focus - (of-object "GtkWidget") - (c-name "gtk_widget_is_focus") - (return-type "gboolean") -) - -(define-method grab_focus - (of-object "GtkWidget") - (c-name "gtk_widget_grab_focus") - (return-type "none") -) - -(define-method grab_default - (of-object "GtkWidget") - (c-name "gtk_widget_grab_default") - (return-type "none") -) - -(define-method set_name - (of-object "GtkWidget") - (c-name "gtk_widget_set_name") - (return-type "none") - (parameters - '("const-gchar*" "name") - ) -) - -(define-method get_name - (of-object "GtkWidget") - (c-name "gtk_widget_get_name") - (return-type "const-gchar*") -) - -(define-method set_state - (of-object "GtkWidget") - (c-name "gtk_widget_set_state") - (return-type "none") - (parameters - '("GtkStateType" "state") - ) -) - -(define-method set_sensitive - (of-object "GtkWidget") - (c-name "gtk_widget_set_sensitive") - (return-type "none") - (parameters - '("gboolean" "sensitive") - ) -) - -(define-method set_app_paintable - (of-object "GtkWidget") - (c-name "gtk_widget_set_app_paintable") - (return-type "none") - (parameters - '("gboolean" "app_paintable") - ) -) - -(define-method set_double_buffered - (of-object "GtkWidget") - (c-name "gtk_widget_set_double_buffered") - (return-type "none") - (parameters - '("gboolean" "double_buffered") - ) -) - -(define-method set_redraw_on_allocate - (of-object "GtkWidget") - (c-name "gtk_widget_set_redraw_on_allocate") - (return-type "none") - (parameters - '("gboolean" "redraw_on_allocate") - ) -) - -(define-method set_parent - (of-object "GtkWidget") - (c-name "gtk_widget_set_parent") - (return-type "none") - (parameters - '("GtkWidget*" "parent") - ) -) - -(define-method set_parent_window - (of-object "GtkWidget") - (c-name "gtk_widget_set_parent_window") - (return-type "none") - (parameters - '("GdkWindow*" "parent_window") - ) -) - -(define-method set_child_visible - (of-object "GtkWidget") - (c-name "gtk_widget_set_child_visible") - (return-type "none") - (parameters - '("gboolean" "is_visible") - ) -) - -(define-method get_child_visible - (of-object "GtkWidget") - (c-name "gtk_widget_get_child_visible") - (return-type "gboolean") -) - -(define-method get_parent - (of-object "GtkWidget") - (c-name "gtk_widget_get_parent") - (return-type "GtkWidget*") -) - -(define-method get_parent_window - (of-object "GtkWidget") - (c-name "gtk_widget_get_parent_window") - (return-type "GdkWindow*") -) - -(define-method child_focus - (of-object "GtkWidget") - (c-name "gtk_widget_child_focus") - (return-type "gboolean") - (parameters - '("GtkDirectionType" "direction") - ) -) - -(define-method set_size_request - (of-object "GtkWidget") - (c-name "gtk_widget_set_size_request") - (return-type "none") - (parameters - '("gint" "width") - '("gint" "height") - ) -) - -(define-method get_size_request - (of-object "GtkWidget") - (c-name "gtk_widget_get_size_request") - (return-type "none") - (parameters - '("gint*" "width") - '("gint*" "height") - ) -) - -(define-method set_uposition - (of-object "GtkWidget") - (c-name "gtk_widget_set_uposition") - (return-type "none") - (parameters - '("gint" "x") - '("gint" "y") - ) - (deprecated "") -) - -(define-method set_usize - (of-object "GtkWidget") - (c-name "gtk_widget_set_usize") - (return-type "none") - (parameters - '("gint" "width") - '("gint" "height") - ) - (deprecated "use GtkWidget.set_size_request") -) - -(define-method set_events - (of-object "GtkWidget") - (c-name "gtk_widget_set_events") - (return-type "none") - (parameters - '("gint" "events") - ) -) - -(define-method add_events - (of-object "GtkWidget") - (c-name "gtk_widget_add_events") - (return-type "none") - (parameters - '("gint" "events") - ) -) - -(define-method set_extension_events - (of-object "GtkWidget") - (c-name "gtk_widget_set_extension_events") - (return-type "none") - (parameters - '("GdkExtensionMode" "mode") - ) -) - -(define-method get_extension_events - (of-object "GtkWidget") - (c-name "gtk_widget_get_extension_events") - (return-type "GdkExtensionMode") -) - -(define-method get_toplevel - (of-object "GtkWidget") - (c-name "gtk_widget_get_toplevel") - (return-type "GtkWidget*") -) - -(define-method get_ancestor - (of-object "GtkWidget") - (c-name "gtk_widget_get_ancestor") - (return-type "GtkWidget*") - (parameters - '("GType" "widget_type") - ) -) - -(define-method get_colormap - (of-object "GtkWidget") - (c-name "gtk_widget_get_colormap") - (return-type "GdkColormap*") -) - -(define-method get_visual - (of-object "GtkWidget") - (c-name "gtk_widget_get_visual") - (return-type "GdkVisual*") -) - -(define-method get_screen - (of-object "GtkWidget") - (c-name "gtk_widget_get_screen") - (return-type "GdkScreen*") -) - -(define-method has_screen - (of-object "GtkWidget") - (c-name "gtk_widget_has_screen") - (return-type "gboolean") -) - -(define-method get_display - (of-object "GtkWidget") - (c-name "gtk_widget_get_display") - (return-type "GdkDisplay*") -) - -(define-method get_root_window - (of-object "GtkWidget") - (c-name "gtk_widget_get_root_window") - (return-type "GdkWindow*") -) - -(define-method get_settings - (of-object "GtkWidget") - (c-name "gtk_widget_get_settings") - (return-type "GtkSettings*") -) - -(define-method get_clipboard - (of-object "GtkWidget") - (c-name "gtk_widget_get_clipboard") - (return-type "GtkClipboard*") - (parameters - '("GdkAtom" "selection") - ) -) - -(define-method get_accessible - (of-object "GtkWidget") - (c-name "gtk_widget_get_accessible") - (return-type "AtkObject*") -) - -(define-method set_colormap - (of-object "GtkWidget") - (c-name "gtk_widget_set_colormap") - (return-type "none") - (parameters - '("GdkColormap*" "colormap") - ) -) - -(define-method get_events - (of-object "GtkWidget") - (c-name "gtk_widget_get_events") - (return-type "gint") -) - -(define-method get_pointer - (of-object "GtkWidget") - (c-name "gtk_widget_get_pointer") - (return-type "none") - (parameters - '("gint*" "x") - '("gint*" "y") - ) -) - -(define-method is_ancestor - (of-object "GtkWidget") - (c-name "gtk_widget_is_ancestor") - (return-type "gboolean") - (parameters - '("GtkWidget*" "ancestor") - ) -) - -(define-method translate_coordinates - (of-object "GtkWidget") - (c-name "gtk_widget_translate_coordinates") - (return-type "gboolean") - (parameters - '("GtkWidget*" "dest_widget") - '("gint" "src_x") - '("gint" "src_y") - '("gint*" "dest_x") - '("gint*" "dest_y") - ) -) - -(define-method hide_on_delete - (of-object "GtkWidget") - (c-name "gtk_widget_hide_on_delete") - (return-type "gboolean") -) - -(define-method set_style - (of-object "GtkWidget") - (c-name "gtk_widget_set_style") - (return-type "none") - (parameters - '("GtkStyle*" "style" (null-ok)) - ) -) - -(define-method ensure_style - (of-object "GtkWidget") - (c-name "gtk_widget_ensure_style") - (return-type "none") -) - -(define-method get_style - (of-object "GtkWidget") - (c-name "gtk_widget_get_style") - (return-type "GtkStyle*") -) - -(define-method modify_style - (of-object "GtkWidget") - (c-name "gtk_widget_modify_style") - (return-type "none") - (parameters - '("GtkRcStyle*" "style") - ) -) - -(define-method get_modifier_style - (of-object "GtkWidget") - (c-name "gtk_widget_get_modifier_style") - (return-type "GtkRcStyle*") -) - -(define-method modify_fg - (of-object "GtkWidget") - (c-name "gtk_widget_modify_fg") - (return-type "none") - (parameters - '("GtkStateType" "state") - '("GdkColor*" "color" (null-ok)) - ) -) - -(define-method modify_bg - (of-object "GtkWidget") - (c-name "gtk_widget_modify_bg") - (return-type "none") - (parameters - '("GtkStateType" "state") - '("GdkColor*" "color" (null-ok)) - ) -) - -(define-method modify_text - (of-object "GtkWidget") - (c-name "gtk_widget_modify_text") - (return-type "none") - (parameters - '("GtkStateType" "state") - '("GdkColor*" "color" (null-ok)) - ) -) - -(define-method modify_base - (of-object "GtkWidget") - (c-name "gtk_widget_modify_base") - (return-type "none") - (parameters - '("GtkStateType" "state") - '("GdkColor*" "color" (null-ok)) - ) -) - -(define-method modify_font - (of-object "GtkWidget") - (c-name "gtk_widget_modify_font") - (return-type "none") - (parameters - '("PangoFontDescription*" "font_desc" (null-ok)) - ) -) - -(define-method create_pango_context - (of-object "GtkWidget") - (c-name "gtk_widget_create_pango_context") - (caller-owns-return #t) - (return-type "PangoContext*") -) - -(define-method get_pango_context - (of-object "GtkWidget") - (c-name "gtk_widget_get_pango_context") - (return-type "PangoContext*") -) - -(define-method create_pango_layout - (of-object "GtkWidget") - (c-name "gtk_widget_create_pango_layout") - (caller-owns-return #t) - (return-type "PangoLayout*") - (parameters - '("const-gchar*" "text") - ) -) - -(define-method render_icon - (of-object "GtkWidget") - (c-name "gtk_widget_render_icon") - (return-type "GdkPixbuf*") - (caller-owns-return #t) - (parameters - '("const-gchar*" "stock_id") - '("GtkIconSize" "size") - '("const-gchar*" "detail" (null-ok) (default "NULL")) - ) -) - -(define-method set_composite_name - (of-object "GtkWidget") - (c-name "gtk_widget_set_composite_name") - (return-type "none") - (parameters - '("const-gchar*" "name") - ) -) - -(define-method get_composite_name - (of-object "GtkWidget") - (c-name "gtk_widget_get_composite_name") - (return-type "gchar*") -) - -(define-method reset_rc_styles - (of-object "GtkWidget") - (c-name "gtk_widget_reset_rc_styles") - (return-type "none") -) - -(define-function widget_push_colormap - (c-name "gtk_widget_push_colormap") - (return-type "none") - (parameters - '("GdkColormap*" "cmap") - ) -) - -(define-function widget_push_composite_child - (c-name "gtk_widget_push_composite_child") - (return-type "none") -) - -(define-function widget_pop_composite_child - (c-name "gtk_widget_pop_composite_child") - (return-type "none") -) - -(define-function widget_pop_colormap - (c-name "gtk_widget_pop_colormap") - (return-type "none") -) - -(define-function widget_class_install_style_property - (c-name "gtk_widget_class_install_style_property") - (return-type "none") - (parameters - '("GtkWidgetClass*" "klass") - '("GParamSpec*" "pspec") - ) -) - -(define-function widget_class_install_style_property_parser - (c-name "gtk_widget_class_install_style_property_parser") - (return-type "none") - (parameters - '("GtkWidgetClass*" "klass") - '("GParamSpec*" "pspec") - '("GtkRcPropertyParser" "parser") - ) -) - -(define-function widget_class_find_style_property - (c-name "gtk_widget_class_find_style_property") - (return-type "GParamSpec*") - (parameters - '("GtkWidgetClass*" "klass") - '("const-gchar*" "property_name") - ) -) - -(define-function widget_class_list_style_properties - (c-name "gtk_widget_class_list_style_properties") - (return-type "GParamSpec**") - (parameters - '("guint*" "n_properties") - ) -) - -(define-method style_get_property - (of-object "GtkWidget") - (c-name "gtk_widget_style_get_property") - (return-type "none") - (parameters - '("const-gchar*" "property_name") - '("GValue*" "value") - ) -) - -(define-method style_get_valist - (of-object "GtkWidget") - (c-name "gtk_widget_style_get_valist") - (return-type "none") - (parameters - '("const-gchar*" "first_property_name") - '("va_list" "var_args") - ) -) - -(define-method style_get - (of-object "GtkWidget") - (c-name "gtk_widget_style_get") - (return-type "none") - (parameters - '("const-gchar*" "first_property_name") - ) - (varargs #t) -) - -(define-function widget_get_default_style - (c-name "gtk_widget_get_default_style") - (return-type "GtkStyle*") -) - -(define-function widget_set_default_colormap - (c-name "gtk_widget_set_default_colormap") - (return-type "none") - (parameters - '("GdkColormap*" "colormap") - ) -) - -(define-function widget_get_default_colormap - (c-name "gtk_widget_get_default_colormap") - (return-type "GdkColormap*") -) - -(define-function widget_get_default_visual - (c-name "gtk_widget_get_default_visual") - (return-type "GdkVisual*") -) - -(define-method set_direction - (of-object "GtkWidget") - (c-name "gtk_widget_set_direction") - (return-type "none") - (parameters - '("GtkTextDirection" "dir") - ) -) - -(define-method get_direction - (of-object "GtkWidget") - (c-name "gtk_widget_get_direction") - (return-type "GtkTextDirection") -) - -(define-function widget_set_default_direction - (c-name "gtk_widget_set_default_direction") - (return-type "none") - (parameters - '("GtkTextDirection" "dir") - ) -) - -(define-function widget_get_default_direction - (c-name "gtk_widget_get_default_direction") - (return-type "GtkTextDirection") -) - -(define-method shape_combine_mask - (of-object "GtkWidget") - (c-name "gtk_widget_shape_combine_mask") - (return-type "none") - (parameters - '("GdkBitmap*" "shape_mask") - '("gint" "offset_x") - '("gint" "offset_y") - ) -) - -(define-method reset_shapes - (of-object "GtkWidget") - (c-name "gtk_widget_reset_shapes") - (return-type "none") -) - -(define-method path - (of-object "GtkWidget") - (c-name "gtk_widget_path") - (return-type "none") - (parameters - '("guint*" "path_length") - '("gchar**" "path") - '("gchar**" "path_reversed") - ) -) - -(define-method class_path - (of-object "GtkWidget") - (c-name "gtk_widget_class_path") - (return-type "none") - (parameters - '("guint*" "path_length") - '("gchar**" "path") - '("gchar**" "path_reversed") - ) -) - -(define-method list_mnemonic_labels - (of-object "GtkWidget") - (c-name "gtk_widget_list_mnemonic_labels") - (return-type "GList*") -) - -(define-method add_mnemonic_label - (of-object "GtkWidget") - (c-name "gtk_widget_add_mnemonic_label") - (return-type "none") - (parameters - '("GtkWidget*" "label") - ) -) - -(define-method remove_mnemonic_label - (of-object "GtkWidget") - (c-name "gtk_widget_remove_mnemonic_label") - (return-type "none") - (parameters - '("GtkWidget*" "label") - ) -) - -(define-virtual dispatch_child_properties_changed - (of-object "GtkWidget") - (return-type "none") - (parameters - '("guint" "n_pspecs") - '("GParamSpec**" "pspecs") - ) -) -(define-virtual show - (of-object "GtkWidget") - (return-type "none") -) -(define-virtual show_all - (of-object "GtkWidget") - (return-type "none") -) -(define-virtual hide - (of-object "GtkWidget") - (return-type "none") -) -(define-virtual hide_all - (of-object "GtkWidget") - (return-type "none") -) -(define-virtual map - (of-object "GtkWidget") - (return-type "none") -) -(define-virtual unmap - (of-object "GtkWidget") - (return-type "none") -) -(define-virtual realize - (of-object "GtkWidget") - (return-type "none") -) -(define-virtual unrealize - (of-object "GtkWidget") - (return-type "none") -) -(define-virtual size_request - (of-object "GtkWidget") - (return-type "none") - (parameters - '("GtkRequisition*" "requisition") - ) -) -(define-virtual size_allocate - (of-object "GtkWidget") - (return-type "none") - (parameters - '("GtkAllocation*" "allocation") - ) -) -(define-virtual state_changed - (of-object "GtkWidget") - (return-type "none") - (parameters - '("GtkStateType" "previous_state") - ) -) -(define-virtual parent_set - (of-object "GtkWidget") - (return-type "none") - (parameters - '("GtkWidget*" "previous_parent") - ) -) -(define-virtual hierarchy_changed - (of-object "GtkWidget") - (return-type "none") - (parameters - '("GtkWidget*" "previous_toplevel") - ) -) -(define-virtual style_set - (of-object "GtkWidget") - (return-type "none") - (parameters - '("GtkStyle*" "previous_style") - ) -) -(define-virtual direction_changed - (of-object "GtkWidget") - (return-type "none") - (parameters - '("GtkTextDirection" "previous_direction") - ) -) -(define-virtual grab_notify - (of-object "GtkWidget") - (return-type "none") - (parameters - '("gboolean" "was_grabbed") - ) -) -(define-virtual child_notify - (of-object "GtkWidget") - (return-type "none") - (parameters - '("GParamSpec*" "pspec") - ) -) -(define-virtual mnemonic_activate - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("gboolean" "group_cycling") - ) -) -(define-virtual grab_focus - (of-object "GtkWidget") - (return-type "none") -) -(define-virtual focus - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GtkDirectionType" "direction") - ) -) -(define-virtual event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEvent*" "event") - ) -) -(define-virtual button_press_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventButton*" "event") - ) -) -(define-virtual button_release_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventButton*" "event") - ) -) -(define-virtual scroll_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventScroll*" "event") - ) -) -(define-virtual motion_notify_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventMotion*" "event") - ) -) -(define-virtual delete_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventAny*" "event") - ) -) -(define-virtual destroy_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventAny*" "event") - ) -) -(define-virtual expose_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventExpose*" "event") - ) -) -(define-virtual key_press_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventKey*" "event") - ) -) -(define-virtual key_release_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventKey*" "event") - ) -) -(define-virtual enter_notify_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventCrossing*" "event") - ) -) -(define-virtual leave_notify_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventCrossing*" "event") - ) -) -(define-virtual configure_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventConfigure*" "event") - ) -) -(define-virtual focus_in_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventFocus*" "event") - ) -) -(define-virtual focus_out_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventFocus*" "event") - ) -) -(define-virtual map_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventAny*" "event") - ) -) -(define-virtual unmap_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventAny*" "event") - ) -) -(define-virtual property_notify_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventProperty*" "event") - ) -) -(define-virtual selection_clear_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventSelection*" "event") - ) -) -(define-virtual selection_request_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventSelection*" "event") - ) -) -(define-virtual selection_notify_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventSelection*" "event") - ) -) -(define-virtual proximity_in_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventProximity*" "event") - ) -) -(define-virtual proximity_out_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventProximity*" "event") - ) -) -(define-virtual visibility_notify_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventVisibility*" "event") - ) -) -(define-virtual client_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventClient*" "event") - ) -) -(define-virtual no_expose_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventAny*" "event") - ) -) -(define-virtual window_state_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventWindowState*" "event") - ) -) -(define-virtual selection_get - (of-object "GtkWidget") - (return-type "none") - (parameters - '("GtkSelectionData*" "selection_data") - '("guint" "info") - '("guint" "time_") - ) -) -(define-virtual selection_received - (of-object "GtkWidget") - (return-type "none") - (parameters - '("GtkSelectionData*" "selection_data") - '("guint" "time_") - ) -) -(define-virtual drag_begin - (of-object "GtkWidget") - (return-type "none") - (parameters - '("GdkDragContext*" "context") - ) -) -(define-virtual drag_end - (of-object "GtkWidget") - (return-type "none") - (parameters - '("GdkDragContext*" "context") - ) -) -(define-virtual drag_data_get - (of-object "GtkWidget") - (return-type "none") - (parameters - '("GdkDragContext*" "context") - '("GtkSelectionData*" "selection_data") - '("guint" "info") - '("guint" "time_") - ) -) -(define-virtual drag_data_delete - (of-object "GtkWidget") - (return-type "none") - (parameters - '("GdkDragContext*" "context") - ) -) -(define-virtual drag_leave - (of-object "GtkWidget") - (return-type "none") - (parameters - '("GdkDragContext*" "context") - '("guint" "time_") - ) -) -(define-virtual drag_motion - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkDragContext*" "context") - '("gint" "x") - '("gint" "y") - '("guint" "time_") - ) -) -(define-virtual drag_drop - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkDragContext*" "context") - '("gint" "x") - '("gint" "y") - '("guint" "time_") - ) -) -(define-virtual drag_data_received - (of-object "GtkWidget") - (return-type "none") - (parameters - '("GdkDragContext*" "context") - '("gint" "x") - '("gint" "y") - '("GtkSelectionData*" "selection_data") - '("guint" "info") - '("guint" "time_") - ) -) -(define-virtual popup_menu - (of-object "GtkWidget") - (return-type "gboolean") -) -(define-virtual show_help - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GtkWidgetHelpType" "help_type") - ) -) -(define-virtual get_accessible - (of-object "GtkWidget") - (return-type "AtkObject*") -) - -(define-virtual screen_changed - (of-object "GtkWidget") - (return-type "none") - (parameters - '("GdkScreen*" "previous_screen") - ) -) -(define-virtual can_activate_accel - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("guint" "signal_id") - ) -) -(define-virtual grab_broken_event - (of-object "GtkWidget") - (return-type "gboolean") - (parameters - '("GdkEventGrabBroken*" "event") - ) -) - - - -(define-function gtk_requisition_get_type - (c-name "gtk_requisition_get_type") - (return-type "GType") -) - -(define-method copy - (of-object "GtkRequisition") - (c-name "gtk_requisition_copy") - (return-type "GtkRequisition*") - (caller-owns-return #t) -) - -(define-method free - (of-object "GtkRequisition") - (c-name "gtk_requisition_free") - (return-type "none") -) - - - -;; From /opt/gtk2/include/gtk-2.0/gtk/gtkwindow.h - -(define-function gtk_window_get_type - (c-name "gtk_window_get_type") - (return-type "GType") -) - -(define-function gtk_window_new - (c-name "gtk_window_new") - (is-constructor-of "GtkWindow") - (return-type "GtkWidget*") - (properties - '("type" (optional)) - ) -) - -(define-method set_title - (of-object "GtkWindow") - (c-name "gtk_window_set_title") - (return-type "none") - (parameters - '("const-gchar*" "title") - ) -) - -(define-method get_title - (of-object "GtkWindow") - (c-name "gtk_window_get_title") - (return-type "const-gchar*") -) - -(define-method set_wmclass - (of-object "GtkWindow") - (c-name "gtk_window_set_wmclass") - (return-type "none") - (parameters - '("const-gchar*" "wmclass_name") - '("const-gchar*" "wmclass_class") - ) -) - -(define-method set_role - (of-object "GtkWindow") - (c-name "gtk_window_set_role") - (return-type "none") - (parameters - '("const-gchar*" "role") - ) -) - -(define-method get_role - (of-object "GtkWindow") - (c-name "gtk_window_get_role") - (return-type "const-gchar*") -) - -(define-method add_accel_group - (of-object "GtkWindow") - (c-name "gtk_window_add_accel_group") - (return-type "none") - (parameters - '("GtkAccelGroup*" "accel_group") - ) -) - -(define-method remove_accel_group - (of-object "GtkWindow") - (c-name "gtk_window_remove_accel_group") - (return-type "none") - (parameters - '("GtkAccelGroup*" "accel_group") - ) -) - -(define-method set_position - (of-object "GtkWindow") - (c-name "gtk_window_set_position") - (return-type "none") - (parameters - '("GtkWindowPosition" "position") - ) -) - -(define-method activate_focus - (of-object "GtkWindow") - (c-name "gtk_window_activate_focus") - (return-type "gboolean") -) - -(define-method set_focus - (of-object "GtkWindow") - (c-name "gtk_window_set_focus") - (return-type "none") - (parameters - '("GtkWidget*" "focus" (null-ok)) - ) -) - -(define-method get_focus - (of-object "GtkWindow") - (c-name "gtk_window_get_focus") - (return-type "GtkWidget*") -) - -(define-method set_default - (of-object "GtkWindow") - (c-name "gtk_window_set_default") - (return-type "none") - (parameters - '("GtkWidget*" "default_widget" (null-ok)) - ) -) - -(define-method activate_default - (of-object "GtkWindow") - (c-name "gtk_window_activate_default") - (return-type "gboolean") -) - -(define-method set_transient_for - (of-object "GtkWindow") - (c-name "gtk_window_set_transient_for") - (return-type "none") - (parameters - '("GtkWindow*" "parent" (null-ok)) - ) -) - -(define-method get_transient_for - (of-object "GtkWindow") - (c-name "gtk_window_get_transient_for") - (return-type "GtkWindow*") -) - -(define-method set_type_hint - (of-object "GtkWindow") - (c-name "gtk_window_set_type_hint") - (return-type "none") - (parameters - '("GdkWindowTypeHint" "hint") - ) -) - -(define-method get_type_hint - (of-object "GtkWindow") - (c-name "gtk_window_get_type_hint") - (return-type "GdkWindowTypeHint") -) - -(define-method set_skip_taskbar_hint - (of-object "GtkWindow") - (c-name "gtk_window_set_skip_taskbar_hint") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_skip_taskbar_hint - (of-object "GtkWindow") - (c-name "gtk_window_get_skip_taskbar_hint") - (return-type "gboolean") -) - -(define-method set_skip_pager_hint - (of-object "GtkWindow") - (c-name "gtk_window_set_skip_pager_hint") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_skip_pager_hint - (of-object "GtkWindow") - (c-name "gtk_window_get_skip_pager_hint") - (return-type "gboolean") -) - - -(define-method set_urgency_hint - (of-object "GtkWindow") - (c-name "gtk_window_set_urgency_hint") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_urgency_hint - (of-object "GtkWindow") - (c-name "gtk_window_get_urgency_hint") - (return-type "gboolean") -) - -(define-method set_accept_focus - (of-object "GtkWindow") - (c-name "gtk_window_set_accept_focus") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_accept_focus - (of-object "GtkWindow") - (c-name "gtk_window_get_accept_focus") - (return-type "gboolean") -) - -(define-method set_destroy_with_parent - (of-object "GtkWindow") - (c-name "gtk_window_set_destroy_with_parent") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_destroy_with_parent - (of-object "GtkWindow") - (c-name "gtk_window_get_destroy_with_parent") - (return-type "gboolean") -) - -(define-method set_resizable - (of-object "GtkWindow") - (c-name "gtk_window_set_resizable") - (return-type "none") - (parameters - '("gboolean" "resizable") - ) -) - -(define-method get_resizable - (of-object "GtkWindow") - (c-name "gtk_window_get_resizable") - (return-type "gboolean") -) - -(define-method set_gravity - (of-object "GtkWindow") - (c-name "gtk_window_set_gravity") - (return-type "none") - (parameters - '("GdkGravity" "gravity") - ) -) - -(define-method get_gravity - (of-object "GtkWindow") - (c-name "gtk_window_get_gravity") - (return-type "GdkGravity") -) - -(define-method set_geometry_hints - (of-object "GtkWindow") - (c-name "gtk_window_set_geometry_hints") - (return-type "none") - (parameters - '("GtkWidget*" "geometry_widget") - '("GdkGeometry*" "geometry") - '("GdkWindowHints" "geom_mask") - ) -) - -(define-method set_screen - (of-object "GtkWindow") - (c-name "gtk_window_set_screen") - (return-type "none") - (parameters - '("GdkScreen*" "screen") - ) -) - -(define-method get_screen - (of-object "GtkWindow") - (c-name "gtk_window_get_screen") - (return-type "GdkScreen*") -) - -(define-method is_active - (of-object "GtkWindow") - (c-name "gtk_window_is_active") - (return-type "gboolean") -) - -(define-method has_toplevel_focus - (of-object "GtkWindow") - (c-name "gtk_window_has_toplevel_focus") - (return-type "gboolean") -) - -(define-method set_has_frame - (of-object "GtkWindow") - (c-name "gtk_window_set_has_frame") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_has_frame - (of-object "GtkWindow") - (c-name "gtk_window_get_has_frame") - (return-type "gboolean") -) - -(define-method set_frame_dimensions - (of-object "GtkWindow") - (c-name "gtk_window_set_frame_dimensions") - (return-type "none") - (parameters - '("gint" "left") - '("gint" "top") - '("gint" "right") - '("gint" "bottom") - ) -) - -(define-method get_frame_dimensions - (of-object "GtkWindow") - (c-name "gtk_window_get_frame_dimensions") - (return-type "none") - (parameters - '("gint*" "left") - '("gint*" "top") - '("gint*" "right") - '("gint*" "bottom") - ) -) - -(define-method set_decorated - (of-object "GtkWindow") - (c-name "gtk_window_set_decorated") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_decorated - (of-object "GtkWindow") - (c-name "gtk_window_get_decorated") - (return-type "gboolean") -) - -(define-method set_icon_list - (of-object "GtkWindow") - (c-name "gtk_window_set_icon_list") - (return-type "none") - (parameters - '("GList*" "list") - ) -) - -(define-method get_icon_list - (of-object "GtkWindow") - (c-name "gtk_window_get_icon_list") - (return-type "GList*") -) - -(define-method set_icon - (of-object "GtkWindow") - (c-name "gtk_window_set_icon") - (return-type "none") - (parameters - '("GdkPixbuf*" "icon" (null-ok)) - ) -) - -(define-method set_icon_from_file - (of-object "GtkWindow") - (c-name "gtk_window_set_icon_from_file") - (return-type "none") - (parameters - '("const-gchar*" "filename") - '("GError**" "error") - ) -) - -(define-method get_icon - (of-object "GtkWindow") - (c-name "gtk_window_get_icon") - (return-type "GdkPixbuf*") -) - -(define-function window_set_default_icon_list - (c-name "gtk_window_set_default_icon_list") - (return-type "none") - (parameters - '("GList*" "list") - ) -) - -(define-function window_get_default_icon_list - (c-name "gtk_window_get_default_icon_list") - (return-type "GList*") -) - -(define-function window_set_default_icon - (c-name "gtk_window_set_default_icon") - (return-type "none") - (parameters - '("GdkPixbuf*" "icon") - ) -) - -(define-function window_set_default_icon_from_file - (c-name "gtk_window_set_default_icon_from_file") - (return-type "none") - (parameters - '("const-gchar*" "filename") - '("GError**" "error") - ) -) - -(define-function window_set_auto_startup_notification - (c-name "gtk_window_set_auto_startup_notification") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method set_modal - (of-object "GtkWindow") - (c-name "gtk_window_set_modal") - (return-type "none") - (parameters - '("gboolean" "modal") - ) -) - -(define-method get_modal - (of-object "GtkWindow") - (c-name "gtk_window_get_modal") - (return-type "gboolean") -) - -(define-function window_list_toplevels - (c-name "gtk_window_list_toplevels") - (return-type "GList*") -) - -(define-method add_mnemonic - (of-object "GtkWindow") - (c-name "gtk_window_add_mnemonic") - (return-type "none") - (parameters - '("guint" "keyval") - '("GtkWidget*" "target") - ) -) - -(define-method remove_mnemonic - (of-object "GtkWindow") - (c-name "gtk_window_remove_mnemonic") - (return-type "none") - (parameters - '("guint" "keyval") - '("GtkWidget*" "target") - ) -) - -(define-method mnemonic_activate - (of-object "GtkWindow") - (c-name "gtk_window_mnemonic_activate") - (return-type "gboolean") - (parameters - '("guint" "keyval") - '("GdkModifierType" "modifier") - ) -) - -(define-method set_mnemonic_modifier - (of-object "GtkWindow") - (c-name "gtk_window_set_mnemonic_modifier") - (return-type "none") - (parameters - '("GdkModifierType" "modifier") - ) -) - -(define-method get_mnemonic_modifier - (of-object "GtkWindow") - (c-name "gtk_window_get_mnemonic_modifier") - (return-type "GdkModifierType") -) - -(define-method activate_key - (of-object "GtkWindow") - (c-name "gtk_window_activate_key") - (return-type "gboolean") - (parameters - '("GdkEventKey*" "event") - ) -) - -(define-method propagate_key_event - (of-object "GtkWindow") - (c-name "gtk_window_propagate_key_event") - (return-type "gboolean") - (parameters - '("GdkEventKey*" "event") - ) -) - -(define-method present - (of-object "GtkWindow") - (c-name "gtk_window_present") - (return-type "none") -) - -(define-method present_with_time - (of-object "GtkWindow") - (c-name "gtk_window_present_with_time") - (return-type "none") - (parameters - '("guint32" "timestamp") - ) -) - -(define-method iconify - (of-object "GtkWindow") - (c-name "gtk_window_iconify") - (return-type "none") -) - -(define-method deiconify - (of-object "GtkWindow") - (c-name "gtk_window_deiconify") - (return-type "none") -) - -(define-method stick - (of-object "GtkWindow") - (c-name "gtk_window_stick") - (return-type "none") -) - -(define-method unstick - (of-object "GtkWindow") - (c-name "gtk_window_unstick") - (return-type "none") -) - -(define-method maximize - (of-object "GtkWindow") - (c-name "gtk_window_maximize") - (return-type "none") -) - -(define-method unmaximize - (of-object "GtkWindow") - (c-name "gtk_window_unmaximize") - (return-type "none") -) - -(define-method fullscreen - (of-object "GtkWindow") - (c-name "gtk_window_fullscreen") - (return-type "none") -) - -(define-method unfullscreen - (of-object "GtkWindow") - (c-name "gtk_window_unfullscreen") - (return-type "none") -) - -(define-method set_keep_above - (of-object "GtkWindow") - (c-name "gtk_window_set_keep_above") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method set_keep_below - (of-object "GtkWindow") - (c-name "gtk_window_set_keep_below") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method begin_resize_drag - (of-object "GtkWindow") - (c-name "gtk_window_begin_resize_drag") - (return-type "none") - (parameters - '("GdkWindowEdge" "edge") - '("gint" "button") - '("gint" "root_x") - '("gint" "root_y") - '("guint32" "timestamp") - ) -) - -(define-method begin_move_drag - (of-object "GtkWindow") - (c-name "gtk_window_begin_move_drag") - (return-type "none") - (parameters - '("gint" "button") - '("gint" "root_x") - '("gint" "root_y") - '("guint32" "timestamp") - ) -) - -(define-method set_policy - (of-object "GtkWindow") - (c-name "gtk_window_set_policy") - (return-type "none") - (parameters - '("gint" "allow_shrink") - '("gint" "allow_grow") - '("gint" "auto_shrink") - ) - (deprecated "use GtkWindow.set_resizable") -) - -(define-method set_default_size - (of-object "GtkWindow") - (c-name "gtk_window_set_default_size") - (return-type "none") - (parameters - '("gint" "width") - '("gint" "height") - ) -) - -(define-method get_default_size - (of-object "GtkWindow") - (c-name "gtk_window_get_default_size") - (return-type "none") - (parameters - '("gint*" "width") - '("gint*" "height") - ) -) - -(define-method resize - (of-object "GtkWindow") - (c-name "gtk_window_resize") - (return-type "none") - (parameters - '("gint" "width") - '("gint" "height") - ) -) - -(define-method get_size - (of-object "GtkWindow") - (c-name "gtk_window_get_size") - (return-type "none") - (parameters - '("gint*" "width") - '("gint*" "height") - ) -) - -(define-method move - (of-object "GtkWindow") - (c-name "gtk_window_move") - (return-type "none") - (parameters - '("gint" "x") - '("gint" "y") - ) -) - -(define-method get_position - (of-object "GtkWindow") - (c-name "gtk_window_get_position") - (return-type "none") - (parameters - '("gint*" "root_x") - '("gint*" "root_y") - ) -) - -(define-method parse_geometry - (of-object "GtkWindow") - (c-name "gtk_window_parse_geometry") - (return-type "gboolean") - (parameters - '("const-gchar*" "geometry") - ) -) - -(define-method reshow_with_initial_size - (of-object "GtkWindow") - (c-name "gtk_window_reshow_with_initial_size") - (return-type "none") -) - -(define-function gtk_window_group_get_type - (c-name "gtk_window_group_get_type") - (return-type "GType") -) - -(define-function window_group_new - (c-name "gtk_window_group_new") - (is-constructor-of "GtkWindowGroup") - (return-type "GtkWindowGroup*") -) - -(define-method add_window - (of-object "GtkWindowGroup") - (c-name "gtk_window_group_add_window") - (return-type "none") - (parameters - '("GtkWindow*" "window") - ) -) - -(define-method remove_window - (of-object "GtkWindowGroup") - (c-name "gtk_window_group_remove_window") - (return-type "none") - (parameters - '("GtkWindow*" "window") - ) -) - -(define-method remove_embedded_xid - (of-object "GtkWindow") - (c-name "gtk_window_remove_embedded_xid") - (return-type "none") - (parameters - '("guint" "xid") - ) -) - -(define-method add_embedded_xid - (of-object "GtkWindow") - (c-name "gtk_window_add_embedded_xid") - (return-type "none") - (parameters - '("guint" "xid") - ) -) - -(define-method set_focus_on_map - (of-object "GtkWindow") - (c-name "gtk_window_set_focus_on_map") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_focus_on_map - (of-object "GtkWindow") - (c-name "gtk_window_get_focus_on_map") - (return-type "gboolean") -) - - -(define-method set_icon_name - (of-object "GtkWindow") - (c-name "gtk_window_set_icon_name") - (return-type "none") - (parameters - '("const-gchar*" "name" (null-ok)) - ) -) - -(define-method get_icon_name - (of-object "GtkWindow") - (c-name "gtk_window_get_icon_name") - (return-type "const-gchar*") -) - - -(define-function window_set_default_icon_name - (c-name "gtk_window_set_default_icon_name") - (return-type "none") - (parameters - '("const-gchar*" "name") - ) -) - -(define-virtual set_focus - (of-object "GtkWindow") - (return-type "none") - (parameters - '("GtkWidget*" "focus") - ) -) -(define-virtual frame_event - (of-object "GtkWindow") - (return-type "gboolean") - (parameters - '("GdkEvent*" "event") - ) -) -(define-virtual activate_focus - (of-object "GtkWindow") - (return-type "none") -) -(define-virtual activate_default - (of-object "GtkWindow") - (return-type "none") -) -(define-virtual move_focus - (of-object "GtkWindow") - (return-type "none") - (parameters - '("GtkDirectionType" "direction") - ) -) -(define-virtual keys_changed - (of-object "GtkWindow") - (return-type "none") -) diff --git a/gtk/gtk-extrafuncs.defs b/gtk/gtk-extrafuncs.defs deleted file mode 100644 index af690ef8..00000000 --- a/gtk/gtk-extrafuncs.defs +++ /dev/null @@ -1,110 +0,0 @@ -; -*- scheme -*- - -(define-method flags - (of-object "GtkObject") - (c-name "GTK_OBJECT_FLAGS") - (return-type "GtkWidgetFlags") -) - -(define-method set_flags - (of-object "GtkObject") - (c-name "GTK_OBJECT_SET_FLAGS") - (return-type "none") - (parameters - '("GtkWidgetFlags" "flags") - ) -) - -(define-method unset_flags - (of-object "GtkObject") - (c-name "GTK_OBJECT_UNSET_FLAGS") - (return-type "none") - (parameters - '("GtkWidgetFlags" "flags") - ) -) - -(define-method get_allocation - (of-object "GtkWidget") - (c-name "gtk_widget_get_allocation") - (return-type "GtkAllocation") -) - -(define-method get_selection - (of-object "GtkList") - (c-name "gtk_list_get_selection") - (return-type "GList*") -) - -(define-method set_all - (of-object "GtkAdjustment") - (c-name "gtk_adjustment_set_all") - (return-type "none") - (parameters - '("gfloat" "value") - '("gfloat" "lower") - '("gfloat" "upper") - '("gfloat" "step_increment") - '("gfloat" "page_increment") - '("gfloat" "page_size") - ) -) - -;; PyGtkTreeModel - -(define-object GenericTreeModel - (in-module "PyGtk") - (parent "GObject") - (c-name "PyGtkGenericTreeModel") - (gtype-id "PYGTK_TYPE_GENERIC_TREE_MODEL") - (implements "GtkTreeModel") -) - -(define-function pygtk_generic_tree_model_get_type - (c-name "pygtk_generic_tree_model_get_type") - (return-type "GType") -) - -(define-function pygtk_generic_tree_model_new - (c-name "pygtk_generic_tree_model_new") - (is-constructor-of PyGtkGenericTreeModel) - (return-type "PyGtkGenericTreeModel*") -) - -;; PyGtkGenericTreeModel methods - -(define-method invalidate_iters - (of-object "PyGtkGenericTreeModel") - (c-name "pygtk_generic_tree_model_invalidate_iters") - (return-type "none") -) - -(define-method iter_is_valid - (of-object "PyGtkGenericTreeModel") - (c-name "pygtk_generic_tree_model_iter_is_valid") - (return-type "gboolean") - (parameters - '("GtkTreeIter*" "iter") - ) -) - -;; PyGtkGenericCellRenderer - -(define-object GenericCellRenderer - (in-module "PyGtk") - (parent "GtkCellRenderer") - (c-name "PyGtkGenericCellRenderer") - (gtype-id "PYGTK_TYPE_GENERIC_CELL_RENDERER") -) - -(define-function pygtk_generic_cell_renderer_get_type - (c-name "pygtk_generic_cell_renderer_get_type") - (return-type "GType") -) - -(define-function pygtk_generic_cell_renderer_new - (c-name "pygtk_generic_cell_renderer_new") - (is-constructor-of PyGtkGenericCellRenderer) - (return-type "GtkCellRenderer*") -) - diff --git a/gtk/gtk-types.c b/gtk/gtk-types.c deleted file mode 100644 index 5286a9df..00000000 --- a/gtk/gtk-types.c +++ /dev/null @@ -1,1372 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * gtk-types.c: wrappers for some specialised GTK types. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -#define PY_SSIZE_T_CLEAN - -#include -#include "pygtk-private.h" -#include - -#if PY_VERSION_HEX < 0x02050000 -typedef int Py_ssize_t; -#define PY_SSIZE_T_MAX INT_MAX -#define PY_SSIZE_T_MIN INT_MIN -typedef inquiry lenfunc; -typedef intargfunc ssizeargfunc; -typedef intobjargproc ssizeobjargproc; -#endif - -#if 0 -PyObject * -PyGdkWindow_New(GdkWindow *win) -{ - PyGdkWindow_Object *self; - - self = (PyGdkWindow_Object *)PyObject_NEW(PyGdkWindow_Object, - &PyGdkWindow_Type); - if (self == NULL) - return NULL; - self->obj = win; - gdk_window_ref(self->obj); - return (PyObject *)self; -} -#endif - -PyObject * -PyGdkAtom_New(GdkAtom atom) -{ - PyGdkAtom_Object *self; - - self = (PyGdkAtom_Object *)PyObject_NEW(PyGdkAtom_Object, &PyGdkAtom_Type); - if (self == NULL) - return NULL; - self->atom = atom; - self->name = NULL; - return (PyObject *)self; -} - - -/* style helper code */ -#define NUM_STATES 5 -staticforward PyTypeObject PyGtkStyleHelper_Type; - -PyObject * -_pygtk_style_helper_new(GtkStyle *style, int type, gpointer array) -{ - PyGtkStyleHelper_Object *self; - - self = (PyGtkStyleHelper_Object *)PyObject_NEW(PyGtkStyleHelper_Object, - &PyGtkStyleHelper_Type); - if (self == NULL) - return NULL; - - self->style = g_object_ref(style); - self->type = type; - self->array = array; - return (PyObject *)self; -} - -static void -pygtk_style_helper_dealloc(PyGtkStyleHelper_Object *self) -{ - g_object_unref(self->style); - PyObject_DEL(self); -} - -static Py_ssize_t -pygtk_style_helper_length(PyGtkStyleHelper_Object *self) -{ - return NUM_STATES; -} - -static PyObject * -pygtk_style_helper_getitem(PyGtkStyleHelper_Object *self, Py_ssize_t pos) -{ - if (pos < 0) pos += NUM_STATES; - if (pos < 0 || pos >= NUM_STATES) { - PyErr_SetString(PyExc_IndexError, "index out of range"); - return NULL; - } - switch (self->type) { - case STYLE_COLOUR_ARRAY: - { - GdkColor *array = (GdkColor *)self->array; - return pyg_boxed_new(GDK_TYPE_COLOR, &array[pos], TRUE, TRUE); - } - case STYLE_GC_ARRAY: - { - GdkGC **array = (GdkGC **)self->array; - return pygobject_new((GObject *)array[pos]); - } - case STYLE_PIXMAP_ARRAY: - { - GdkPixmap **array = (GdkPixmap **)self->array; - if ((long)array[pos] == GDK_PARENT_RELATIVE) - return PyLong_FromLong(GDK_PARENT_RELATIVE); - return pygobject_new((GObject *)array[pos]); - } - } - g_assert_not_reached(); - return NULL; -} - -static int -pygtk_style_helper_setitem(PyGtkStyleHelper_Object *self, Py_ssize_t pos, - PyObject *value) -{ - extern PyTypeObject PyGdkGC_Type; - extern PyTypeObject PyGdkPixmap_Type; - - if (pos < 0) pos += NUM_STATES; - if (pos < 0 || pos >= NUM_STATES) { - PyErr_SetString(PyExc_IndexError, "index out of range"); - return -1; - } - switch (self->type) { - case STYLE_COLOUR_ARRAY: - { - GdkColor *array = (GdkColor *)self->array; - - if (!pyg_boxed_check(value, GDK_TYPE_COLOR)) { - PyErr_SetString(PyExc_TypeError, "can only assign a GdkColor"); - return -1; - } - array[pos] = *pyg_boxed_get(value, GdkColor); - return 0; - } - case STYLE_GC_ARRAY: - { - GdkGC **array = (GdkGC **)self->array; - - if (!pygobject_check(value, &PyGdkGC_Type)) { - PyErr_SetString(PyExc_TypeError, "can only assign a GdkGC"); - return -1; - } - if (array[pos]) { - g_object_unref(array[pos]); - } - array[pos] = GDK_GC(g_object_ref(pygobject_get(value))); - return 0; - } - case STYLE_PIXMAP_ARRAY: - { - GdkPixmap **array = (GdkPixmap **)self->array; - GdkPixmap *cvalue = NULL; - - if (pygobject_check(value, &PyGdkPixmap_Type)) - cvalue = GDK_PIXMAP(g_object_ref(pygobject_get(value))); - else if (PyLong_Check(value)) { - if (PyLong_AsLong(value) != GDK_PARENT_RELATIVE) { - PyErr_SetString(PyExc_TypeError, - "can only assign a GdkPixmap, None or " - "GDK_PARENT_RELATIVE"); - return -1; - } - cvalue = (GdkPixmap*)GDK_PARENT_RELATIVE; - } else if (value != Py_None) { - PyErr_SetString(PyExc_TypeError, - "can only assign a GdkPixmap, None or " - "GDK_PARENT_RELATIVE"); - return -1; - } - - if (array[pos] && (long)array[pos] != GDK_PARENT_RELATIVE) { - g_object_unref(array[pos]); - } - array[pos] = cvalue; - return 0; - } - } - g_assert_not_reached(); - return -1; -} - -static PySequenceMethods pygtk_style_helper_seqmethods = { - (lenfunc)pygtk_style_helper_length, - 0, - 0, - (ssizeargfunc)pygtk_style_helper_getitem, - 0, - (ssizeobjargproc)pygtk_style_helper_setitem, - 0, -}; -static PyTypeObject PyGtkStyleHelper_Type = { - PyObject_HEAD_INIT(NULL) - 0, - "gtk.GtkStyleHelper", - sizeof(PyGtkStyleHelper_Object), - 0, - (destructor)pygtk_style_helper_dealloc, - (printfunc)0, - (getattrfunc)0, - (setattrfunc)0, - (cmpfunc)0, - (reprfunc)0, - 0, - &pygtk_style_helper_seqmethods, - 0, - (hashfunc)0, - (ternaryfunc)0, - (reprfunc)0, - (getattrofunc)0, - (setattrofunc)0, - 0, - Py_TPFLAGS_DEFAULT, - NULL -}; - -#if 0 -static void -PyGdkWindow_Dealloc(PyGdkWindow_Object *self) -{ - if (gdk_window_get_type(self->obj) == GDK_WINDOW_PIXMAP) - gdk_pixmap_unref(self->obj); - else - gdk_window_unref(self->obj); - PyObject_DEL(self); -} - -static int -PyGdkWindow_Compare(PyGdkWindow_Object *self, PyGdkWindow_Object *v) -{ - if (self->obj == v->obj) return 0; - if (self->obj > v->obj) return -1; - return 1; -} - -static long -PyGdkWindow_Hash(PyGdkWindow_Object *self) -{ - return (long)self->obj; -} - -static PyObject * -PyGdkWindow_Repr(PyGdkWindow_Object *self) -{ - char buf[100]; - if (gdk_window_get_type(self->obj) == GDK_WINDOW_PIXMAP) - sprintf(buf, "", (long)PyGdkWindow_Get(self)); - else - sprintf(buf, "", (long)PyGdkWindow_Get(self)); - return PyString_FromString(buf); -} - -static PyObject * -PyGdkWindow_NewGC(PyGdkWindow_Object *self, PyObject *args, PyObject *kws) -{ - int i = 0; - PyObject *key, *value; - char *strkey; - GdkGCValues values; - GdkGCValuesMask mask = 0; - GdkGC *gc; - - if (kws != NULL) - while (PyDict_Next(kws, &i, &key, &value)) { - strkey = PyString_AsString(key); - if (!strcmp(strkey, "foreground")) { - if (!PyGdkColor_Check(value)) { - PyErr_SetString(PyExc_TypeError, - "foreground argument takes a GdkColor"); - return NULL; - } - mask |= GDK_GC_FOREGROUND; - values.foreground.red = PyGdkColor_Get(value)->red; - values.foreground.green = PyGdkColor_Get(value)->green; - values.foreground.blue = PyGdkColor_Get(value)->blue; - values.foreground.pixel = PyGdkColor_Get(value)->pixel; - } else if (!strcmp(strkey, "background")) { - if (!PyGdkColor_Check(value)) { - PyErr_SetString(PyExc_TypeError, - "background argument takes a GdkColor"); - return NULL; - } - mask |= GDK_GC_BACKGROUND; - values.background.red = PyGdkColor_Get(value)->red; - values.background.green = PyGdkColor_Get(value)->green; - values.background.blue = PyGdkColor_Get(value)->blue; - values.background.pixel = PyGdkColor_Get(value)->pixel; - } else if (!strcmp(strkey, "font")) { - if (!PyGdkFont_Check(value)) { - PyErr_SetString(PyExc_TypeError, - "font argument takes a GdkFont"); - return NULL; - } - mask |= GDK_GC_FONT; - values.font = PyGdkFont_Get(value); - } else if (!strcmp(strkey, "tile")) { - if (!PyGdkWindow_Check(value)) { - PyErr_SetString(PyExc_TypeError, - "tile argument takes a GdkPixmap"); - return NULL; - } - mask |= GDK_GC_TILE; - values.tile = PyGdkWindow_Get(value); - } else if (!strcmp(strkey, "stipple")) { - if (!PyGdkWindow_Check(value)) { - PyErr_SetString(PyExc_TypeError, - "stipple argument takes a GdkPixmap"); - return NULL; - } - mask |= GDK_GC_STIPPLE; - values.stipple = PyGdkWindow_Get(value); - } else if (!strcmp(strkey, "clip_mask")) { - if (!PyGdkWindow_Check(value)) { - PyErr_SetString(PyExc_TypeError, - "clip_mask argument takes a GdkPixmap"); - return NULL; - } - mask |= GDK_GC_CLIP_MASK; - values.clip_mask = PyGdkWindow_Get(value); - } else { - int i = 0; -#ifndef offsetof -#define offsetof(type, member) ( (int) &((type*)0)->member) -#endif -#define OFF(x) offsetof(GdkGCValues, x) - static struct {char *name;GdkGCValuesMask mask;int offs; } others[] = { - {"function", GDK_GC_FUNCTION, OFF(function)}, - {"fill", GDK_GC_FILL, OFF(fill)}, - {"subwindow_mode", GDK_GC_SUBWINDOW, OFF(subwindow_mode)}, - {"ts_x_origin", GDK_GC_TS_X_ORIGIN, OFF(ts_x_origin)}, - {"ts_y_origin", GDK_GC_TS_Y_ORIGIN, OFF(ts_y_origin)}, - {"clip_x_origin", GDK_GC_CLIP_X_ORIGIN, OFF(clip_x_origin)}, - {"clip_y_origin", GDK_GC_CLIP_Y_ORIGIN, OFF(clip_y_origin)}, - {"graphics_exposures", GDK_GC_EXPOSURES, OFF(graphics_exposures)}, - {"line_width", GDK_GC_LINE_WIDTH, OFF(line_width)}, - {"line_style", GDK_GC_LINE_STYLE, OFF(line_style)}, - {"cap_style", GDK_GC_CAP_STYLE, OFF(cap_style)}, - {"join_style", GDK_GC_JOIN_STYLE, OFF(join_style)}, - {NULL, 0, 0} - }; -#undef OFF - while (others[i].name != NULL) { - if (!strcmp(strkey, others[i].name)) { - if (!PyInt_Check(value)) { - char buf[80]; - g_snprintf(buf, sizeof(buf), - "%s argument expects an integer", - others[i].name); - PyErr_SetString(PyExc_TypeError, buf); - return NULL; - } - mask |= others[i].mask; - *((int *)((char *)&values + others[i].offs)) = - PyInt_AsLong(value); - break; - } - i++; - } - if (others[i].name == NULL) { - PyErr_SetString(PyExc_TypeError, "unknown argument"); - return NULL; - } - } - } - if (!PyArg_ParseTuple(args, ":GdkWindow.new_gc")) - return NULL; - gc = gdk_gc_new_with_values(PyGdkWindow_Get(self), &values, mask); - value = PyGdkGC_New(gc); - gdk_gc_unref(gc); - return value; -} - -static PyObject * -PyGdkWindow_SetCursor(PyGdkWindow_Object *self, PyObject *args) -{ - PyObject *cursor; - - if (!PyArg_ParseTuple(args, "O!:GdkWindow.set_cursor", &PyGdkCursor_Type, - &cursor)) - return NULL; - gdk_window_set_cursor(self->obj, PyGdkCursor_Get(cursor)); - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -PyGdkWindow_PropertyGet(PyGdkWindow_Object *self, PyObject *args) -{ - PyObject *py_property, py_type = NULL; - gint pdelete = FALSE; - - GdkAtom atype, property, type; - gint aformat, alength; - guchar *data; - - if (!PyArg_ParseTuple(args, "O|Oi:GdkWindow.property_get", &py_property, - &py_type, &pdelete)) { - return NULL; - } - - property = pygdk_atom_from_pyobject(py_property); - if (Pyerr_Occurred()) - return NULL; - - type = pygdk_atom_from_pyobject(py_type); - if (Pyerr_Occurred()) - return NULL; - - if (gdk_property_get(self->obj, property, type, 0, G_MAXLONG, - pdelete, &atype, &aformat, &alength, &data)) { - /* success */ - PyObject *pdata = NULL; - gint i; - guint16 *data16; - guint32 *data32; - switch (aformat) { - case 8: - if ((pdata = PyString_FromStringAndSize(data, alength)) == NULL) - return NULL; - break; - case 16: - data16 = (guint16 *)data; - if ((pdata = PyTuple_New(alength)) == NULL) - return NULL; - for (i = 0; i < alength; i++) - PyTuple_SetItem(pdata, i, PyInt_FromLong(data16[i])); - break; - case 32: - data32 = (guint32 *)data; - if ((pdata = PyTuple_New(alength)) == NULL) - return NULL; - for (i = 0; i < alength; i++) - PyTuple_SetItem(pdata, i, PyInt_FromLong(data32[i])); - break; - default: - g_warning("got a property format != 8, 16 or 32"); - g_assert_not_reached(); - } - g_free(data); - return Py_BuildValue("(NiN)", PyGdkAtom_New(atype), aformat, pdata); - } else { - Py_INCREF(Py_None); - return Py_None; - } -} - -static PyObject * -PyGdkWindow_PropertyChange(PyGdkWindow_Object *self, PyObject *args) -{ - PyObject *py_property, *py_type; - GdkAtom property, type; - gint format; - PyObject *py_mode, *pdata; - GdkPropMode mode; - guchar *data = NULL; - gint nelements; - - if (!PyArg_ParseTuple(args, "OOiOO:GdkWindow.property_change", - &py_property, &py_type, &format, &py_mode, &pdata)) { - return NULL; - } - - property = pygdk_atom_from_pyobject(py_property); - if (Pyerr_Occurred()) - return NULL; - - type = pygdk_atom_from_pyobject(py_type); - if (Pyerr_Occurred()) - return NULL; - - if (pygtk_enum_get_value(GDK_TYPE_PROP_MODE, py_mode, (gint *)&mode)) - return NULL; - switch (format) { - case 8: - if (!PyString_Check(pdata)) { - PyErr_SetString(PyExc_TypeError, "data not a string and format=8"); - return NULL; - } - data = PyString_AsString(pdata); - nelements = PyString_Size(pdata); - break; - case 16: - { - guint16 *data16; - gint i; - - if (!PySequence_Check(pdata)) { - PyErr_SetString(PyExc_TypeError, - "data not a sequence and format=16"); - return NULL; - } - nelements = PySequence_Length(pdata); - data16 = g_new(guint16, nelements); - data = (guchar *)data16; - for (i = 0; i < nelements; i++) { - PyObject *item = PySequence_GetItem(pdata, i); - Py_DECREF(item); - item = PyNumber_Int(item); - if (!item) { - g_free(data16); - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError,"data element not an int"); - return NULL; - } - data16[i] = PyInt_AsLong(item); - Py_DECREF(item); - } - } - break; - case 32: - { - guint32 *data32; - gint i; - - if (!PySequence_Check(pdata)) { - PyErr_SetString(PyExc_TypeError, - "data not a sequence and format=32"); - return NULL; - } - nelements = PySequence_Length(pdata); - data32 = g_new(guint32, nelements); - data = (guchar *)data32; - for (i = 0; i < nelements; i++) { - PyObject *item = PySequence_GetItem(pdata, i); - Py_DECREF(item); - item = PyNumber_Int(item); - if (!item) { - g_free(data32); - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError,"data element not an int"); - return NULL; - } - data32[i] = PyInt_AsLong(item); - Py_DECREF(item); - } - } - break; - default: - PyErr_SetString(PyExc_TypeError, "format must be 8, 16 or 32"); - return NULL; - break; - } - gdk_property_change(self->obj, property, type, format, mode, data, - nelements); - if (format != 8) - g_free(data); - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -PyGdkWindow_PropertyDelete(PyGdkWindow_Object *self, PyObject *args) -{ - PyObject py_property; - GdkAtom property; - - if (!PyArg_ParseTuple(args, "O:GdkWindow.property_delete", &property)) { - return NULL; - } - - property = pygdk_atom_from_pyobject(py_property); - if (Pyerr_Occurred()) - return NULL; - - gdk_property_delete(self->obj, property); - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -PyGdkWindow_Raise(PyGdkWindow_Object *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, ":GdkWindow._raise")) - return NULL; - gdk_window_raise(self->obj); - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -PyGdkWindow_Lower(PyGdkWindow_Object *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, ":GdkWindow.lower")) - return NULL; - gdk_window_lower(self->obj); - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -PyGdkWindow_InputGetPointer(PyGdkWindow_Object *self, PyObject *args) -{ - guint32 deviceid; - gdouble x = 0.0, y = 0.0, pressure = 0.0, xtilt = 0.0, ytilt = 0.0; - GdkModifierType mask = 0; - - if (!PyArg_ParseTuple(args, "i:GdkWindow.input_get_pointer", &deviceid)) - return NULL; - gdk_input_window_get_pointer(self->obj, deviceid, &x, &y, &pressure, - &xtilt, &ytilt, &mask); - return Py_BuildValue("(dddddi)", x, y, pressure, xtilt, ytilt, mask); -} - -static PyMethodDef PyGdkWindow_methods[] = { - {"new_gc", (PyCFunction)PyGdkWindow_NewGC, METH_VARARGS|METH_KEYWORDS, NULL}, - {"set_cursor", (PyCFunction)PyGdkWindow_SetCursor, METH_VARARGS, NULL}, - {"property_get", (PyCFunction)PyGdkWindow_PropertyGet, METH_VARARGS, NULL}, - {"property_change", (PyCFunction)PyGdkWindow_PropertyChange, METH_VARARGS, NULL}, - {"property_delete", (PyCFunction)PyGdkWindow_PropertyDelete, METH_VARARGS, NULL}, - {"_raise", (PyCFunction)PyGdkWindow_Raise, METH_VARARGS, NULL}, - {"lower", (PyCFunction)PyGdkWindow_Lower, METH_VARARGS, NULL}, - {"input_get_pointer", (PyCFunction)PyGdkWindow_InputGetPointer, METH_VARARGS, NULL}, - {NULL, 0, 0, NULL} -}; - -static PyObject * -PyGdkWindow_GetAttr(PyGdkWindow_Object *self, char *key) -{ - GdkWindow *win = PyGdkWindow_Get(self); - gint x, y; - GdkModifierType p_mask; - - if (!strcmp(key, "__members__")) - return Py_BuildValue("[sssssssssssss]", "children", "colormap", "depth", - "height", "parent", "pointer", "pointer_state", - "toplevel", "type", "width", "x", "xid", "y"); - if (!strcmp(key, "width")) { - gdk_window_get_size(win, &x, NULL); - return PyInt_FromLong(x); - } - if (!strcmp(key, "height")) { - gdk_window_get_size(win, NULL, &y); - return PyInt_FromLong(y); - } - if (!strcmp(key, "x")) { - gdk_window_get_position(win, &x, NULL); - return PyInt_FromLong(x); - } - if (!strcmp(key, "y")) { - gdk_window_get_position(win, NULL, &y); - return PyInt_FromLong(y); - } - if (!strcmp(key, "colormap")) - return PyGdkColormap_New(gdk_window_get_colormap(win)); - if (!strcmp(key, "pointer")) { - gdk_window_get_pointer(win, &x, &y, NULL); - return Py_BuildValue("(ii)", x, y); - } - if (!strcmp(key, "pointer_state")) { - gdk_window_get_pointer(win, NULL, NULL, &p_mask); - return PyInt_FromLong(p_mask); - } - if (!strcmp(key, "parent")) { - GdkWindow *par = gdk_window_get_parent(win); - if (par) - return PyGdkWindow_New(par); - Py_INCREF(Py_None); - return Py_None; - } - if (!strcmp(key, "toplevel")) - return PyGdkWindow_New(gdk_window_get_toplevel(win)); - if (!strcmp(key, "children")) { - GList *children, *tmp; - PyObject *ret; - children = gdk_window_get_children(win); - if ((ret = PyList_New(0)) == NULL) - return NULL; - for (tmp = children; tmp != NULL; tmp = tmp->next) { - PyObject *win = PyGdkWindow_New(tmp->data); - if (win == NULL) { - Py_DECREF(ret); - return NULL; - } - PyList_Append(ret, win); - Py_DECREF(win); - } - g_list_free(children); - return ret; - } - if (!strcmp(key, "type")) - return PyInt_FromLong(gdk_window_get_type(win)); - if (!strcmp(key, "depth")) { - gdk_window_get_geometry(win, NULL, NULL, NULL, NULL, &x); - return PyInt_FromLong(x); - } -#ifdef WITH_XSTUFF - if (!strcmp(key, "xid")) - return PyInt_FromLong(GDK_WINDOW_XWINDOW(win)); -#endif - - return Py_FindMethod(PyGdkWindow_methods, (PyObject *)self, key); -} - -PyTypeObject PyGdkWindow_Type = { - PyObject_HEAD_INIT(NULL) - 0, - "GdkWindow", - sizeof(PyGdkWindow_Object), - 0, - (destructor)PyGdkWindow_Dealloc, - (printfunc)0, - (getattrfunc)PyGdkWindow_GetAttr, - (setattrfunc)0, - (cmpfunc)PyGdkWindow_Compare, - (reprfunc)PyGdkWindow_Repr, - 0, - 0, - 0, - (hashfunc)PyGdkWindow_Hash, - (ternaryfunc)0, - (reprfunc)0, - (getattrofunc)0, - (setattrofunc)0, - 0, - Py_TPFLAGS_DEFAULT, - NULL -}; -#endif - -GdkAtom -pygdk_atom_from_pyobject(PyObject *object) -{ - if (object == NULL) - return NULL; - if (PyString_Check(object)) - return gdk_atom_intern(PyString_AsString(object), FALSE); - if (PyGdkAtom_Check(object)) - return PyGdkAtom_Get(object); - PyErr_SetString(PyExc_TypeError, "unable to convert argument to GdkAtom"); - return NULL; -} - -static void -pygdk_atom_dealloc(PyGdkAtom_Object *self) -{ - if (self->name) g_free(self->name); - PyObject_DEL(self); -} - -static long -pygdk_atom_hash(PyGdkAtom_Object *self) -{ - return (long)self->atom; -} - -static PyObject * -pygdk_atom_repr(PyGdkAtom_Object *self) -{ - char buf[256]; - if (!self->name) self->name = gdk_atom_name(self->atom); - g_snprintf(buf, 256, "", (unsigned long)self->atom, - self->name?self->name:"(null)"); - return PyString_FromString(buf); -} - -static PyObject * -pygdk_atom_str(PyGdkAtom_Object *self) -{ - if (!self->name) self->name = gdk_atom_name(self->atom); - if (self->name) - return PyString_FromString(self->name); - return pygdk_atom_repr(self); -} - -static PyObject * -pygdk_atom_richcompare(PyGdkAtom_Object *self, PyGdkAtom_Object *v, int op) -{ - PyObject *result = Py_NotImplemented; - - if (PyString_Check(v)) { - PyObject *str = pygdk_atom_str(self); - result = PyObject_RichCompare(str, (PyObject *)v, op); - Py_DECREF(str); - return result; - } - if (PyGdkAtom_Check(v)) { - switch (op) { - case Py_LT: - result = (self->atom < v->atom) ? Py_True : Py_False; - break; - case Py_LE: - result = (self->atom <= v->atom) ? Py_True : Py_False; - break; - case Py_EQ: - result = (self->atom == v->atom) ? Py_True : Py_False; - break; - case Py_NE: - result = (self->atom != v->atom) ? Py_True : Py_False; - break; - case Py_GE: - result = (self->atom >= v->atom) ? Py_True : Py_False; - break; - case Py_GT: - result = (self->atom > v->atom) ? Py_True : Py_False; - break; - default: - break; - } - } - Py_INCREF(result); - return result; -} - -PyTypeObject PyGdkAtom_Type = { - PyObject_HEAD_INIT(NULL) - 0, - "gtk.gdk.GdkAtom", - sizeof(PyGdkAtom_Object), - 0, - (destructor)pygdk_atom_dealloc, - (printfunc)0, - (getattrfunc)0, - (setattrfunc)0, - (cmpfunc)0, - (reprfunc)pygdk_atom_repr, - 0, - 0, - 0, - (hashfunc)pygdk_atom_hash, - (ternaryfunc)0, - (reprfunc)pygdk_atom_str, - (getattrofunc)0, - (setattrofunc)0, - 0, - Py_TPFLAGS_DEFAULT, - NULL, - 0, - 0, - (richcmpfunc)pygdk_atom_richcompare, -}; - -typedef struct { - PyObject_HEAD - GtkTreeModel *model; - GtkTreeIter iter; -} PyGtkTreeModelRow; -staticforward PyTypeObject PyGtkTreeModelRow_Type; - -PyObject * -_pygtk_tree_model_row_new(GtkTreeModel *model, GtkTreeIter *iter) -{ - PyGtkTreeModelRow *self; - - self = (PyGtkTreeModelRow *) PyObject_NEW(PyGtkTreeModelRow, - &PyGtkTreeModelRow_Type); - if (self == NULL) - return NULL; - self->model = g_object_ref(model); - self->iter = *iter; - return (PyObject *)self; -} - -static void -pygtk_tree_model_row_dealloc(PyGtkTreeModelRow *self) -{ - g_object_unref(self->model); - PyObject_DEL(self); -} - -static Py_ssize_t -pygtk_tree_model_row_length(PyGtkTreeModelRow *self) -{ - return gtk_tree_model_get_n_columns(self->model); -} - -static PyObject * -pygtk_tree_model_row_getitem(PyGtkTreeModelRow *self, Py_ssize_t column) -{ - gint n_columns; - GValue value = { 0, }; - PyObject *ret; - - n_columns = gtk_tree_model_get_n_columns(self->model); - if (column < 0 || column >= n_columns) { - PyErr_SetString(PyExc_IndexError, "column index out of range"); - return NULL; - } - gtk_tree_model_get_value(self->model, &self->iter, column, &value); - ret = pyg_value_as_pyobject(&value, TRUE); - g_value_unset(&value); - return ret; -} - -static int -pygtk_tree_model_row_setitem(PyGtkTreeModelRow *self, Py_ssize_t column, - PyObject *pyvalue) -{ - gint n_columns; - GValue value = { 0, }; - - if (!GTK_IS_LIST_STORE(self->model) && !GTK_IS_TREE_STORE(self->model)) { - PyErr_SetString(PyExc_TypeError, - "can not set cells in this tree model"); - return -1; - } - - n_columns = gtk_tree_model_get_n_columns(self->model); - if (column < 0 || column >= n_columns) { - PyErr_SetString(PyExc_IndexError, "column index out of range"); - return -1; - } - g_value_init(&value, gtk_tree_model_get_column_type(self->model, column)); - if (pyg_value_from_pyobject(&value, pyvalue)) { - PyErr_SetString(PyExc_TypeError, - "value is of wrong type for this column"); - return -1; - } - if (GTK_IS_LIST_STORE(self->model)) - gtk_list_store_set_value(GTK_LIST_STORE(self->model), &self->iter, - column, &value); - else if (GTK_IS_TREE_STORE(self->model)) - gtk_tree_store_set_value(GTK_TREE_STORE(self->model), &self->iter, - column, &value); - g_value_unset(&value); - return 0; -} - -static PySequenceMethods pygtk_tree_model_row_seqmethods = { - (lenfunc)pygtk_tree_model_row_length, - 0, - 0, - (ssizeargfunc)pygtk_tree_model_row_getitem, - 0, - (ssizeobjargproc)pygtk_tree_model_row_setitem, - 0 -}; - -static PyObject * -pygtk_tree_model_row_iterchildren(PyGtkTreeModelRow *self) -{ - return _pygtk_tree_model_row_iter_new(self->model, &self->iter); -} - -static PyMethodDef pygtk_tree_model_row_methods[] = { - { "iterchildren", (PyCFunction)pygtk_tree_model_row_iterchildren, METH_NOARGS }, - { NULL, NULL, 0 } -}; - -static PyObject * -pygtk_tree_model_row_get_next(PyGtkTreeModelRow *self, void *closure) -{ - GtkTreeIter iter; - - iter = self->iter; - if (gtk_tree_model_iter_next(self->model, &iter)) - return _pygtk_tree_model_row_new(self->model, &iter); - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -pygtk_tree_model_row_get_parent(PyGtkTreeModelRow *self, void *closure) -{ - GtkTreeIter parent; - - if (gtk_tree_model_iter_parent(self->model, &parent, &self->iter)) - return _pygtk_tree_model_row_new(self->model, &parent); - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -pygtk_tree_model_row_get_model(PyGtkTreeModelRow *self, void *closure) -{ - return pygobject_new((GObject *)self->model); -} - -static PyObject * -pygtk_tree_model_row_get_path(PyGtkTreeModelRow *self, void *closure) -{ - GtkTreePath *path; - PyObject *ret; - - path = gtk_tree_model_get_path(self->model, &self->iter); - if (!path) { - PyErr_SetString(PyExc_RuntimeError, "could not get tree path"); - return NULL; - } - ret = pygtk_tree_path_to_pyobject(path); - gtk_tree_path_free(path); - return ret; -} - -static PyObject * -pygtk_tree_model_row_get_iter(PyGtkTreeModelRow *self, void *closure) -{ - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &self->iter, TRUE, TRUE); -} - -static PyGetSetDef pygtk_tree_model_row_getsets[] = { - { "next", (getter)pygtk_tree_model_row_get_next, (setter)0 }, - { "parent", (getter)pygtk_tree_model_row_get_parent, (setter)0 }, - { "model", (getter)pygtk_tree_model_row_get_model, (setter)0 }, - { "path", (getter)pygtk_tree_model_row_get_path, (setter)0 }, - { "iter", (getter)pygtk_tree_model_row_get_iter, (setter)0 }, - { NULL, (getter)0, (setter)0 } -}; - -static PyTypeObject PyGtkTreeModelRow_Type = { - PyObject_HEAD_INIT(NULL) - 0, - "gtk.TreeModelRow", - sizeof(PyGtkTreeModelRow), - 0, - (destructor)pygtk_tree_model_row_dealloc, - (printfunc)0, - (getattrfunc)0, - (setattrfunc)0, - (cmpfunc)0, - (reprfunc)0, - 0, - &pygtk_tree_model_row_seqmethods, - 0, - (hashfunc)0, - (ternaryfunc)0, - (reprfunc)0, - (getattrofunc)0, - (setattrofunc)0, - 0, - Py_TPFLAGS_DEFAULT, - NULL, - (traverseproc)0, - (inquiry)0, - (richcmpfunc)0, - 0, - (getiterfunc)0, - (iternextfunc)0, - pygtk_tree_model_row_methods, - 0, - pygtk_tree_model_row_getsets -}; - -typedef struct { - PyObject_HEAD - GtkTreeModel *model; - gboolean has_more; - GtkTreeIter iter; -} PyGtkTreeModelRowIter; -staticforward PyTypeObject PyGtkTreeModelRowIter_Type; - -PyObject * -_pygtk_tree_model_row_iter_new(GtkTreeModel *model, GtkTreeIter *parent_iter) -{ - PyGtkTreeModelRowIter *self; - - self = (PyGtkTreeModelRowIter *) PyObject_NEW(PyGtkTreeModelRowIter, - &PyGtkTreeModelRowIter_Type); - if (self == NULL) - return NULL; - self->model = g_object_ref(model); - /* iterate through child nodes */ - self->has_more = gtk_tree_model_iter_children(self->model, &self->iter, - parent_iter); - return (PyObject *)self; -} - -static void -pygtk_tree_model_row_iter_dealloc(PyGtkTreeModelRowIter *self) -{ - g_object_unref(self->model); - PyObject_DEL(self); -} - -static PyObject * -pygtk_tree_model_row_iter_getiter(PyGtkTreeModelRowIter *self) -{ - Py_INCREF(self); - return (PyObject *)self; -} - -static PyObject * -pygtk_tree_model_row_iter_next(PyGtkTreeModelRowIter *self) -{ - PyObject *row; - - if (!self->has_more) { - PyErr_SetNone(PyExc_StopIteration); - return NULL; - } - - row = _pygtk_tree_model_row_new(self->model, &self->iter); - - /* move to next iter */ - self->has_more = gtk_tree_model_iter_next(self->model, &self->iter); - - return row; -} - -static PyTypeObject PyGtkTreeModelRowIter_Type = { - PyObject_HEAD_INIT(NULL) - 0, - "gtk.TreeModelRowIter", - sizeof(PyGtkTreeModelRowIter), - 0, - (destructor)pygtk_tree_model_row_iter_dealloc, - (printfunc)0, - (getattrfunc)0, - (setattrfunc)0, - (cmpfunc)0, - (reprfunc)0, - 0, - 0, - 0, - (hashfunc)0, - (ternaryfunc)0, - (reprfunc)0, - (getattrofunc)0, - (setattrofunc)0, - 0, - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_ITER, - NULL, - (traverseproc)0, - (inquiry)0, - (richcmpfunc)0, - 0, - (getiterfunc)pygtk_tree_model_row_iter_getiter, - (iternextfunc)pygtk_tree_model_row_iter_next -}; - -int -_pygtk_tree_model_remove_row(GtkTreeModel *model, GtkTreeIter *iter) -{ - GtkTreeModel *child; - GtkTreeIter citer; - - if (GTK_IS_LIST_STORE(model)) { - gtk_list_store_remove(GTK_LIST_STORE(model), iter); - return 0; - } - - if (GTK_IS_TREE_STORE(model)) { - gtk_tree_store_remove(GTK_TREE_STORE(model), iter); - return 0; - } - - if (GTK_IS_TREE_MODEL_SORT(model)) { - child = gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(model)); - gtk_tree_model_sort_convert_iter_to_child_iter( - GTK_TREE_MODEL_SORT(model), &citer, iter); - return _pygtk_tree_model_remove_row(child, &citer); - } - - if (GTK_IS_TREE_MODEL_FILTER(model)) { - child = gtk_tree_model_filter_get_model(GTK_TREE_MODEL_FILTER(model)); - gtk_tree_model_filter_convert_iter_to_child_iter( - GTK_TREE_MODEL_FILTER(model), &citer, iter); - return _pygtk_tree_model_remove_row(child, &citer); - } - - PyErr_SetString(PyExc_TypeError, - "cannot remove rows in this tree model"); - return -1; -} - -int -_pygtk_tree_model_set_row(GtkTreeModel *model, GtkTreeIter *iter, - PyObject *items) -{ - gint n_columns, i; - GtkTreeModel *child; - GtkTreeIter citer; - - if (!GTK_IS_LIST_STORE(model) && !GTK_IS_TREE_STORE(model) && - !GTK_IS_TREE_MODEL_SORT(model) && !GTK_IS_TREE_MODEL_FILTER(model)) { - PyErr_SetString(PyExc_TypeError, - "cannot set cells in this tree model"); - return -1; - } - - if (GTK_IS_TREE_MODEL_SORT(model)) { - child = gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(model)); - gtk_tree_model_sort_convert_iter_to_child_iter( - GTK_TREE_MODEL_SORT(model), &citer, iter); - return _pygtk_tree_model_set_row(child, &citer, items); - } - - if (GTK_IS_TREE_MODEL_FILTER(model)) { - child = gtk_tree_model_filter_get_model(GTK_TREE_MODEL_FILTER(model)); - gtk_tree_model_filter_convert_iter_to_child_iter( - GTK_TREE_MODEL_FILTER(model), &citer, iter); - return _pygtk_tree_model_set_row(child, &citer, items); - } - - if (!PySequence_Check(items)) { - PyErr_SetString(PyExc_TypeError, "expecting a sequence"); - return -1; - } - n_columns = gtk_tree_model_get_n_columns(model); - if (PySequence_Length(items) != n_columns) { - PyErr_SetString(PyExc_ValueError, "row sequence has wrong length"); - return -1; - } - for (i = 0; i < n_columns; i++) { - GValue value = { 0, }; - PyObject *item; - - item = PySequence_GetItem(items, i); - if (!item) - return -1; - g_value_init(&value, gtk_tree_model_get_column_type(model, i)); - if (pyg_value_from_pyobject(&value, item)) { - Py_DECREF(item); - PyErr_SetString(PyExc_TypeError, - "value is of wrong type for this column"); - return -1; - } - - if (GTK_IS_LIST_STORE(model)) - gtk_list_store_set_value(GTK_LIST_STORE(model), iter, i, &value); - else if (GTK_IS_TREE_STORE(model)) - gtk_tree_store_set_value(GTK_TREE_STORE(model), iter, i, &value); - - g_value_unset(&value); - Py_DECREF(item); - } - return 0; -} - -PyObject * -pygtk_tree_path_to_pyobject(GtkTreePath *path) -{ - gint len, i, *indices; - PyObject *ret; - - len = gtk_tree_path_get_depth(path); - indices = gtk_tree_path_get_indices(path); - ret = PyTuple_New(len); - for (i = 0; i < len; i++) - PyTuple_SetItem(ret, i, PyInt_FromLong(indices[i])); - return ret; -} - -GtkTreePath * -pygtk_tree_path_from_pyobject(PyObject *object) -{ - if (PyString_Check(object)) { - GtkTreePath *path; - - path = gtk_tree_path_new_from_string(PyString_AsString(object)); - return path; - } else if (PyInt_Check(object)) { - GtkTreePath *path; - - path = gtk_tree_path_new(); - gtk_tree_path_append_index(path, PyInt_AsLong(object)); - return path; - } else if (PyTuple_Check(object)) { - GtkTreePath *path; - guint len, i; - - len = PyTuple_Size(object); - if (len < 1) - return NULL; - path = gtk_tree_path_new(); - for (i = 0; i < len; i++) { - PyObject *item = PyTuple_GetItem(object, i); - gint index = PyInt_AsLong(item); - if (PyErr_Occurred()) { - gtk_tree_path_free(path); - PyErr_Clear(); - return NULL; - } - gtk_tree_path_append_index(path, index); - } - return path; - } - return NULL; -} - -/* marshalers for the boxed types. Uses uppercase notation so that - * the macro below can automatically install them. */ -static PyObject * -PyGtkTreePath_from_value(const GValue *value) -{ - GtkTreePath *path = (GtkTreePath *)g_value_get_boxed(value); - - return pygtk_tree_path_to_pyobject(path); -} -static int -PyGtkTreePath_to_value(GValue *value, PyObject *object) -{ - GtkTreePath *path = pygtk_tree_path_from_pyobject(object); - - if (path) { - g_value_set_boxed(value, path); - gtk_tree_path_free(path); - return 0; - } - return -1; -} - -gboolean -pygdk_rectangle_from_pyobject(PyObject *object, GdkRectangle *rectangle) -{ - g_return_val_if_fail(rectangle != NULL, FALSE); - - if (pyg_boxed_check(object, GDK_TYPE_RECTANGLE)) { - *rectangle = *pyg_boxed_get(object, GdkRectangle); - return TRUE; - } - if (PyArg_ParseTuple(object, "iiii", &rectangle->x, &rectangle->y, - &rectangle->width, &rectangle->height)) { - return TRUE; - } - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, "could not convert to GdkRectangle"); - return FALSE; -} - -static PyObject * -PyGdkRectangle_from_value(const GValue *value) -{ - GdkRectangle *rect = (GdkRectangle *)g_value_get_boxed(value); - - return pyg_boxed_new(GDK_TYPE_RECTANGLE, rect, TRUE, TRUE); -} -static int -PyGdkRectangle_to_value(GValue *value, PyObject *object) -{ - GdkRectangle rect; - - if (!pygdk_rectangle_from_pyobject(object, &rect)) - return -1; - - g_value_set_boxed(value, &rect); - return 0; -} - -/* We have to set ob_type here because stupid win32 does not allow you - * to use variables from another dll in a global variable initialisation. - */ -void -_pygtk_register_boxed_types(PyObject *moddict) -{ - PyGtkStyleHelper_Type.ob_type = &PyType_Type; - PyGdkAtom_Type.ob_type = &PyType_Type; - PyGtkTreeModelRow_Type.ob_type = &PyType_Type; - PyGtkTreeModelRowIter_Type.ob_type = &PyType_Type; - - PyType_Ready(&PyGtkStyleHelper_Type); - PyType_Ready(&PyGdkAtom_Type); - PyType_Ready(&PyGtkTreeModelRow_Type); - PyType_Ready(&PyGtkTreeModelRowIter_Type); - - PyDict_SetItemString(moddict, "GdkAtomType", (PyObject *)&PyGdkAtom_Type); - - pyg_register_boxed_custom(GTK_TYPE_TREE_PATH, - PyGtkTreePath_from_value, - PyGtkTreePath_to_value); - pyg_register_boxed_custom(GDK_TYPE_RECTANGLE, - PyGdkRectangle_from_value, - PyGdkRectangle_to_value); -} diff --git a/gtk/gtk.override b/gtk/gtk.override deleted file mode 100644 index b9bcaabb..00000000 --- a/gtk/gtk.override +++ /dev/null @@ -1,8293 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * gtk.override: overrides for the gtk module. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -headers -#define NO_IMPORT_PYGOBJECT -#include "pygobject.h" - -#include - -#include -#include -#include -#include - -#include -extern Pycairo_CAPI_t *Pycairo_CAPI; -extern PyTypeObject PyGdkCairoContext_Type; - -#include "pygtk-private.h" - -#define PYGTK_CONTAINER_FOREACH 0 -#define PYGTK_CONTAINER_FORALL 1 -#define countof(array) (sizeof(array)/sizeof(array[0])) - -/* make GDK_DISPLAY() the case macro */ -#undef GDK_DISPLAY -#define GDK_DISPLAY(object) (GDK_DISPLAY_OBJECT(object)) - -/* from the gdk portion ... */ -extern PyTypeObject PyGdkColormap_Type; -extern PyTypeObject PyGdkGC_Type; -extern PyTypeObject PyGdkWindow_Type; -extern PyTypeObject PyGdkPixmap_Type; -extern PyTypeObject PyGdkImage_Type; -extern PyTypeObject PyGdkPixbuf_Type; -extern PyTypeObject PyGdkPixbufAnimation_Type; -extern PyTypeObject PyGdkDragContext_Type; -extern PyTypeObject PyGdkDrawable_Type; -extern PyTypeObject PyGdkDisplay_Type; -extern PyTypeObject PyGdkScreen_Type; -extern PyTypeObject PyGdkRectangle_Type; -extern PyTypeObject PyGdkDevice_Type; - -extern PyObject *PyGtkWarning; - -#ifndef pyg_add_warning_redirection - -static guint _gtk_handler = -1, _gdk_handler = -1, _gdk_pixbuf_handler = -1; - -static void -_pygtk_log_func(const gchar *log_domain, - GLogLevelFlags log_level, - const gchar *message, - gpointer user_data) - { - if (G_LIKELY(Py_IsInitialized())) - { - PyGILState_STATE state; - - state = pyg_gil_state_ensure(); - PyErr_Warn(PyGtkWarning, (char *) message); - pyg_gil_state_release(state); - } else - g_log_default_handler(log_domain, log_level, message, user_data); -} - -#endif /* ifndef pyg_add_warning_redirection */ - -static gboolean -pygtk_util_pyobject_as_double(PyObject *obj, gdouble *value, const char *argument_name) -{ - PyObject *number; - - if (!PyNumber_Check(obj)) { - PyErr_Format(PyExc_TypeError, "'%s' must be a number", argument_name); - return FALSE; - } - number = PyNumber_Float(obj); - if (!number) { - PyErr_Format(PyExc_TypeError, "Could not convert '%s' to a float", argument_name); - return FALSE; - } - *value = PyFloat_AsDouble(number); - Py_DECREF(number); - return TRUE; -} - -%% -include - gtkclist.override - gtkcontainer.override - gtkctree.override - gtkiconview.override - gtkstyle.override - gtktextview.override - gtktoolbar.override - gtktreeview.override - gtkwidget.override - gtkwindow.override -%% -modulename gtk -%% -import gobject.GObject as PyGObject_Type -import atk.Object as PyAtkObject_Type -import pango.Context as PyPangoContext_Type -import pango.Font as PyPangoFont_Type -import pango.Layout as PyPangoLayout_Type -%% -ignore - gtk_accel_group_add - gtk_accel_group_connect - gtk_accel_group_create_add - gtk_accel_group_create_remove - gtk_accel_group_disconnect - gtk_accel_group_entries_from_object - gtk_accel_group_get_entry - gtk_accel_group_handle_add - gtk_accel_group_handle_remove - gtk_accel_group_lock_entry - gtk_accel_group_ref - gtk_accel_group_remove - gtk_accel_groups_activate - gtk_accel_group_unlock_entry - gtk_accel_group_unref - gtk_action_group_add_actions_full - gtk_action_group_add_toggle_actions_full - gtk_action_group_add_radio_actions_full - gtk_binding_set_by_class - gtk_binding_set_clear - gtk_binding_set_find - gtk_binding_set_new - gtk_button_new_from_stock - gtk_button_new_with_label - gtk_button_new_with_mnemonic - gtk_check_button_new_with_label - gtk_check_button_new_with_mnemonic - gtk_check_menu_item_new_with_label - gtk_check_menu_item_new_with_mnemonic - gtk_clipboard_set_with_owner - gtk_color_button_new_with_color - gtk_color_selection_set_color - gtk_color_selection_get_color - gtk_combo_box_get_row_separator_func - gtk_dialog_new - gtk_dialog_set_alternative_button_order_from_array - gtk_drag_dest_handle_event - gtk_drag_source_handle_event - gtk_drag_finish - gtk_drag_set_icon_default - gtk_drag_set_icon_name - gtk_drag_set_icon_stock - gtk_drag_set_icon_pixbuf - gtk_drag_set_icon_pixmap - gtk_drag_set_icon_widget - gtk_draw_hline - gtk_draw_vline - gtk_draw_shadow - gtk_draw_polygon - gtk_draw_arrow - gtk_draw_diamond - gtk_draw_box - gtk_draw_flat_box - gtk_draw_check - gtk_draw_option - gtk_draw_tab - gtk_draw_shadow_gap - gtk_draw_box_gap - gtk_draw_extension - gtk_draw_focus - gtk_draw_slider - gtk_draw_handle - gtk_draw_expander - gtk_draw_layout - gtk_draw_resize_grip - gtk_draw_string - gtk_entry_new_with_max_length - gtk_entry_select_region - gtk_exit - gtk_false - gtk_file_chooser_button_new_with_backend - gtk_file_chooser_button_new_with_dialog - gtk_file_chooser_dialog_new_with_backend - gtk_file_chooser_error_quark - gtk_file_chooser_dialog_widget_new_with_backend - gtk_file_system_error_quark - gtk_file_system_cancel_operation - gtk_file_paths_copy - gtk_file_paths_free - gtk_font_button_new_with_font - gtk_gc_get - gtk_gc_release - gtk_get_event_widget - gtk_icon_theme_error_quark - gtk_idle_add - gtk_idle_add_full - gtk_idle_add_priority - gtk_idle_remove - gtk_idle_remove_by_data - gtk_image_item_menu_new_with_label - gtk_image_menu_item_new_from_stock - gtk_image_menu_item_new_with_mnemonic - gtk_init - gtk_init_abi_check - gtk_init_check_abi_check - gtk_input_add_full - gtk_input_remove - gtk_item_factory_create_item - gtk_item_factory_create_items_ac - gtk_item_factory_create_menu_entries - gtk_item_factory_delete_entries - gtk_item_factory_delete_entry - gtk_item_factory_popup_data - gtk_item_factory_popup_with_data - gtk_item_factory_set_translate_func - gtk_key_snooper_install - gtk_key_snooper_remove - gtk_list_item_new_with_label - gtk_list_remove_items_no_unref - gtk_menu_append - gtk_menu_bar_append - gtk_menu_bar_insert - gtk_menu_bar_prepend - gtk_menu_insert - gtk_menu_item_new_with_label - gtk_menu_item_new_with_mnemonic - gtk_menu_prepend - gtk_object_add_arg_type - gtk_object_arg_get - gtk_object_arg_get_info - gtk_object_args_collect - gtk_object_arg_set - gtk_object_get - gtk_object_get_data - gtk_object_get_data_by_id - gtk_object_get_user_data - gtk_object_getv - gtk_object_new - gtk_object_newv - gtk_object_query_args - gtk_object_ref - gtk_object_remove_data_by_id - gtk_object_remove_no_notify_by_id - gtk_object_set - gtk_object_set_data - gtk_object_set_data_by_id - gtk_object_set_data_by_id_full - gtk_object_set_data_full - gtk_object_set_user_data - gtk_object_setv - gtk_object_sink - gtk_object_unref - gtk_object_weakref - gtk_object_weakunref - gtk_paper_size_free - gtk_plug_construct - gtk_plug_construct_for_display - gtk_preview_uninit - gtk_preview_get_info - gtk_print_error_quark - gtk_progress_bar_new - gtk_propagate_event - gtk_quit_remove_by_data - gtk_radio_button_group - gtk_radio_menu_item_group - gtk_radio_menu_item_new_with_label - gtk_radio_menu_item_new_with_mnemonic - gtk_range_default_htrough_click - gtk_range_default_vtrough_click - gtk_range_trough_click - gtk_recent_chooser_error_quark - gtk_recent_chooser_dialog_new_for_manager - gtk_recent_chooser_menu_new - gtk_recent_chooser_widget_new - gtk_recent_chooser_set_show_numbers - gtk_recent_chooser_get_show_numbers - gtk_recent_manager_error_quark - gtk_selection_clear - gtk_selection_data_copy - gtk_selection_data_free - gtk_selection_incr_event - gtk_selection_notify - gtk_selection_property_notify - gtk_selection_request - gtk_set_locale - gtk_timeout_remove - gtk_toggle_button_new_with_label - gtk_toggle_button_new_with_mnemonic - gtk_text_anchored_child_set_layout - gtk_text_child_anchor_queue_resize - gtk_text_child_anchor_register_child - gtk_text_child_anchor_unregister_child - gtk_trace_referencing - gtk_tree_item_new_with_label - gtk_tree_remove_items - gtk_true - gtk_rc_find_pixmap_in_path - gtk_rc_scanner_new - gtk_rc_parse_color - gtk_rc_parse_state - gtk_rc_parse_priority - gtk_rc_property_parse_color - gtk_rc_property_parse_enum - gtk_rc_property_parse_flags - gtk_rc_property_parse_requisition - gtk_rc_property_parse_border - 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_target_table_new_from_list - gtk_target_table_free - GtkObject__do_set_arg - GtkObject__do_get_arg - GtkObject__proxy_do_set_arg - GtkObject__proxy_do_get_arg -%% -ignore-glob - _* - *_get_type - *_ref - *_unref - gtk_arg_* - gtk_args_* - gtk_init_add_* - gtk_marshal_* - gtk_pattern_* - gtk_radio_button_new_* - gtk_quit_add_* - gtk_signal_* - gtk_text_layout_* - gtk_type_* - gtk_timeout_add* -%% -ignore-type - GtkFileFolder - GtkFileInfo - GtkFileInfoType - GtkFilePath - GtkFileSystem - GtkFileSystemError - GtkFileSystemHandle - GtkSignalRunType - GtkTargetList - GtkTipsQuery - GtkTree - GtkTreeItem - GtkTreePath - GtkText - GtkTextLayout -%% -override gtk_init_check noargs -static PyObject * -_wrap_gtk_init_check(PyGObject *self, PyObject *args) -{ - PyObject *av; - int argc, i; - char **argv; - - /* initialise GTK ... */ - av = PySys_GetObject("argv"); - if (av != NULL) { - if (!PyList_Check(av)) { - PyErr_Warn(PyExc_Warning, "ignoring sys.argv: it must be a list of strings"); - av = NULL; - } else { - argc = PyList_Size(av); - for (i = 0; i < argc; i++) - if (!PyString_Check(PyList_GetItem(av, i))) { - PyErr_Warn(PyExc_Warning, "ignoring sys.argv: it must be a list of strings"); - av = NULL; - break; - } - } - } - if (av != NULL) { - argv = g_new(char *, argc); - for (i = 0; i < argc; i++) - argv[i] = g_strdup(PyString_AsString(PyList_GetItem(av, i))); - } else { - argc = 0; - argv = NULL; - } - - if (!gtk_init_check(&argc, &argv)) { - if (argv != NULL) { - for (i = 0; i < argc; i++) - g_free(argv[i]); - g_free(argv); - } - PyErr_SetString(PyExc_RuntimeError, "could not open display"); - /* set the LC_NUMERIC locale back to "C", as Python < 2.4 requires - * that it be set that way. */ -#if PY_VERSION_HEX < 0x020400F0 - setlocale(LC_NUMERIC, "C"); -#endif - return NULL; - } - /* set the LC_NUMERIC locale back to "C", as Python < 2.4 requires that - * it be set that way. */ -#if PY_VERSION_HEX < 0x020400F0 - setlocale(LC_NUMERIC, "C"); -#endif - if (argv != NULL) { - PySys_SetArgv(argc, argv); - for (i = 0; i < argc; i++) - g_free(argv[i]); - g_free(argv); - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -define add_log_handlers -static PyObject * -_wrap_add_log_handlers(PyGObject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, ":add_log_handlers")) - return NULL; -#ifndef pyg_add_warning_redirection - - _gtk_handler = g_log_set_handler("Gtk", - G_LOG_LEVEL_CRITICAL|G_LOG_LEVEL_WARNING, - _pygtk_log_func, NULL); - _gdk_handler = g_log_set_handler("Gdk", - G_LOG_LEVEL_CRITICAL|G_LOG_LEVEL_WARNING, - _pygtk_log_func, NULL); - _gdk_pixbuf_handler = g_log_set_handler("GdkPixbuf", - G_LOG_LEVEL_CRITICAL|G_LOG_LEVEL_WARNING, - _pygtk_log_func, NULL); -#else - - pyg_add_warning_redirection("Gtk", PyGtkWarning); - pyg_add_warning_redirection("Gdk", PyGtkWarning); - pyg_add_warning_redirection("GdkPixbuf", PyGtkWarning); - -#endif /* ifndef pyg_add_warning_redirection */ - - Py_INCREF(Py_None); - return Py_None; -} -%% -define remove_log_handlers -static PyObject * -_wrap_remove_log_handlers(PyGObject *self, PyObject *args) -{ - if (!PyArg_ParseTuple(args, ":remove_log_handlers")) - return NULL; - -#ifndef pyg_disable_warning_redirections - - g_log_remove_handler("Gtk", _gtk_handler); - _gtk_handler = -1; - g_log_remove_handler("Gdk", _gdk_handler); - _gdk_handler = -1; - g_log_remove_handler("GdkPixbuf", _gdk_pixbuf_handler); - _gdk_pixbuf_handler = -1; - -#else - - pyg_disable_warning_redirections(); - -#endif /* ifndef pyg_disable_warning_redirections */ - - Py_INCREF(Py_None); - return Py_None; -} - -%% -override gtk_paint_polygon kwargs -static PyObject * -_wrap_gtk_paint_polygon(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "window", "state_type", "shadow_type", "area", "widget", "detail", "points", "fill", NULL }; - PyObject *window, *py_state_type, *py_shadow_type, *py_area; - GtkStateType state_type; - GtkShadowType shadow_type; - GdkRectangle area; - PyObject *widget; - const gchar *detail; - PyObject *py_points; - gint npoints, i; - GdkPoint *points; - gboolean fill; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!OOOO!zOi:GdkStyle.paint_polygon", - kwlist, &PyGdkWindow_Type, &window, - &py_state_type, &py_shadow_type, &py_area, - &PyGtkWidget_Type, &widget, &detail, - &py_points, &fill)) - return NULL; - if (pyg_enum_get_value(GTK_TYPE_STATE_TYPE, py_state_type, - (gint *)&state_type)) - return NULL; - if (pyg_enum_get_value(GTK_TYPE_SHADOW_TYPE, py_shadow_type, - (gint *)&shadow_type)) - return NULL; - if (!pygdk_rectangle_from_pyobject(py_area, &area)) - return NULL; - if (!PySequence_Check(py_points)) { - PyErr_SetString(PyExc_TypeError, "points must be a sequence"); - return NULL; - } - npoints = PySequence_Length(py_points); - points = g_new(GdkPoint, npoints); - for (i = 0; i < npoints; i++) { - PyObject *item = PySequence_GetItem(py_points, i); - Py_DECREF(item); - if (!PyArg_ParseTuple(item, "hh", &points[i].x, &points[i].y)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "sequence members must be 2-tuples"); - g_free(points); - return NULL; - } - } - gtk_paint_polygon(GTK_STYLE(self->obj), GDK_WINDOW(pygobject_get(window)), - state_type, shadow_type, &area, - GTK_WIDGET(pygobject_get(widget)), detail, - points, npoints, fill); - g_free(points); - Py_INCREF(Py_None); - return Py_None; -} -%% -override-attr GtkSelectionData.data -static PyObject * -_wrap_gtk_selection_data__get_data(PyGObject *self, void *closure) -{ - if (pyg_boxed_get(self, GtkSelectionData)->length >= 0) { - return PyString_FromStringAndSize( - (char*)pyg_boxed_get(self, GtkSelectionData)->data, - pyg_boxed_get(self, GtkSelectionData)->length); - } else { - Py_INCREF(Py_None); - return Py_None; - } -} -%% -override gtk_selection_data_set kwargs -static PyObject * -_wrap_gtk_selection_data_set(PyGBoxed *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "type", "format", "data", NULL }; - PyObject *py_type; - GdkAtom type; - int format; - Py_ssize_t length; - guchar *data; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "Ois#:GtkSelectionData.set", kwlist, - &py_type, &format, &data, &length)) - return NULL; - type = pygdk_atom_from_pyobject(py_type); - if (PyErr_Occurred()) - return NULL; - - gtk_selection_data_set(pyg_boxed_get(self, GtkSelectionData), - type, format, data, length); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_selection_data_get_text noargs -static PyObject * -_wrap_gtk_selection_data_get_text(PyObject *self) -{ - gchar *ret; - - ret = (char*)gtk_selection_data_get_text(pyg_boxed_get(self, - GtkSelectionData)); - if (ret) { - PyObject *py_ret = PyUnicode_DecodeUTF8(ret, strlen(ret), "strict"); - g_free(ret); - return py_ret; - } - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_selection_data_get_targets noargs -static PyObject * -_wrap_gtk_selection_data_get_targets(PyObject *self) -{ - GdkAtom *targets; - gint n_atoms; - - if (gtk_selection_data_get_targets(pyg_boxed_get(self, GtkSelectionData), - &targets, &n_atoms)) { - PyObject *ret; - gint i; - - ret = PyTuple_New(n_atoms); - for (i = 0; i < n_atoms; i++) { - gchar *name = gdk_atom_name(targets[i]); - - PyTuple_SetItem(ret, i, PyString_FromString(name)); - g_free(name); - } - g_free(targets); - return ret; - } - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_clipboard_set_with_data kwargs -static void -clipboard_get_func(GtkClipboard *clipboard, GtkSelectionData *selection_data, - guint info, gpointer user_data) -{ - PyObject *callback, *args, *ret; - PyGILState_STATE state; - - state = pyg_gil_state_ensure(); - callback = PyTuple_GetItem((PyObject *)user_data, 0); - args = Py_BuildValue("(NNiO)", - pygobject_new((GObject *)clipboard), - pyg_boxed_new(GTK_TYPE_SELECTION_DATA, - selection_data, FALSE, FALSE), - info, PyTuple_GetItem((PyObject *)user_data, 2)); - ret = PyObject_CallObject(callback, args); - if (!ret) - PyErr_Print(); - Py_XDECREF(ret); - Py_DECREF(args); - pyg_gil_state_release(state); -} -static void -clipboard_clear_func(GtkClipboard *clipboard, gpointer user_data) -{ - PyGILState_STATE state; - PyObject *callback, *args, *ret; - - state = pyg_gil_state_ensure(); - callback = PyTuple_GetItem((PyObject *)user_data, 1); - args = Py_BuildValue("(NO)", - pygobject_new((GObject *)clipboard), - PyTuple_GetItem((PyObject *)user_data, 2)); - ret = PyObject_CallObject(callback, args); - if (!ret) - PyErr_Print(); - Py_XDECREF(ret); - Py_DECREF(args); - Py_DECREF((PyObject *)user_data); - pyg_gil_state_release(state); -} -static PyObject * -_wrap_gtk_clipboard_set_with_data(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "targets", "get_func", "clear_func", "user_data", NULL }; - PyObject *py_targets, *get_func, *clear_func = Py_None, *user_data = Py_None; - GtkTargetEntry *targets; - gint n_targets, i; - gboolean ret; - PyObject *data; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OO|OO:GtkClipboard.set_with_data",kwlist, - &py_targets, &get_func, &clear_func, - &user_data)) - return NULL; - if (!PyCallable_Check(get_func)) { - PyErr_SetString(PyExc_TypeError, "get_func must be callable"); - return NULL; - } - if (clear_func != Py_None && !PyCallable_Check(clear_func)) { - PyErr_SetString(PyExc_TypeError,"clear_func must be callable or None"); - return NULL; - } - if (!(py_targets = PySequence_Fast(py_targets, "targets must be a sequence"))) - return NULL; - n_targets = PySequence_Fast_GET_SIZE(py_targets); - targets = g_new(GtkTargetEntry, n_targets); - for (i = 0; i < n_targets; i++) { - PyObject *item = PySequence_Fast_GET_ITEM(py_targets, i); - if (!PyArg_ParseTuple(item, "sii", &targets[i].target, - &targets[i].flags, &targets[i].info)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "list items should be of form (string,int,int)"); - g_free(targets); - Py_DECREF(py_targets); - return NULL; - } - } - data = Py_BuildValue("(OOO)", get_func, clear_func, user_data); - ret = gtk_clipboard_set_with_data(GTK_CLIPBOARD(self->obj), - targets, n_targets, - clipboard_get_func, clipboard_clear_func, - data); - g_free(targets); - Py_DECREF(py_targets); - if (!ret) { - Py_DECREF(data); - } - - return PyBool_FromLong(ret); -} -%% -override gtk_label_get noargs -static PyObject * -_wrap_gtk_label_get(PyGObject *self) -{ - gchar *text = NULL; - - gtk_label_get(GTK_LABEL(self->obj), &text); - if (text) - return PyString_FromString(text); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_label_get_selection_bounds noargs -static PyObject * -_wrap_gtk_label_get_selection_bounds(PyGObject *self) -{ - int start, end; - - if (!gtk_label_get_selection_bounds(GTK_LABEL(self->obj), &start, &end)) { - return Py_BuildValue ("()"); - } - - return Py_BuildValue("(ii)", start, end); -} -%% -override gtk_label_get_layout_offsets noargs -static PyObject * -_wrap_gtk_label_get_layout_offsets(PyGObject *self) -{ - gint x; - gint y; - - gtk_label_get_layout_offsets(GTK_LABEL(self->obj), &x, &y); - return Py_BuildValue("(ii)", x, y); -} -%% -override gtk_spin_button_get_increments noargs -static PyObject * -_wrap_gtk_spin_button_get_increments(PyGObject *self) -{ - gdouble step; - gdouble page; - - gtk_spin_button_get_increments(GTK_SPIN_BUTTON(self->obj), &step, &page); - return Py_BuildValue("(dd)", step, page); -} -%% -override gtk_spin_button_get_range noargs -static PyObject * -_wrap_gtk_spin_button_get_range(PyGObject *self) -{ - gdouble min; - gdouble max; - - gtk_spin_button_get_range(GTK_SPIN_BUTTON(self->obj), &min, &max); - return Py_BuildValue("(dd)", min, max); -} -%% -override gtk_box_query_child_packing kwargs -static PyObject * -_wrap_gtk_box_query_child_packing(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "child", NULL }; - PyGObject *pychild; - GtkWidget *child; - GList *children; - gboolean expand, fill; - guint padding; - GtkPackType pack_type; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!:GtkBox.query_child_packing", kwlist, - &PyGtkWidget_Type, &pychild)) { - return NULL; - } - - child = GTK_WIDGET(pychild->obj); - children = gtk_container_get_children(GTK_CONTAINER(self->obj)); - if (g_list_find(children, child) == NULL) { - PyErr_SetString(PyExc_TypeError, - "first argument must be a child"); - return NULL; - } - gtk_box_query_child_packing(GTK_BOX(self->obj), - child, &expand, &fill, - &padding, &pack_type); - return Py_BuildValue("(iiiN)", (int)expand, (int)fill, padding, - pyg_enum_from_gtype(GTK_TYPE_PACK_TYPE, pack_type)); -} -%% -override gtk_combo_set_popdown_strings kwargs -static PyObject * -_wrap_gtk_combo_set_popdown_strings(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "strings", NULL }; - PyObject *list; - GList *glist = NULL; - int len, i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkCombo.set_popdown_strings", kwlist, - &list)) - return NULL; - if (!PySequence_Check(list)) { - PyErr_SetString(PyExc_TypeError, "first argument must be a sequence"); - return NULL; - } - len = PySequence_Length(list); - for (i = 0; i < len; i++) { - PyObject *item = PySequence_GetItem(list, i); - - Py_DECREF(item); - if (!PyString_Check(item) && !PyUnicode_Check(item)) { - PyErr_SetString(PyExc_TypeError, - "sequence item not a string or unicode object"); - g_list_free(glist); - return NULL; - } - glist = g_list_append(glist, PyString_AsString(item)); - } - gtk_combo_set_popdown_strings(GTK_COMBO(self->obj), glist); - g_list_free(glist); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_curve_get_vector kwargs -static PyObject * -_wrap_gtk_curve_get_vector(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "size", NULL }; - int size = -1, i; - gfloat *vector; - PyObject *ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|i:GtkCurve.get_vector", kwlist, - &size)) - return NULL; - if (size < 0) size = GTK_CURVE(self->obj)->num_points; - vector = g_new(gfloat, size); - gtk_curve_get_vector(GTK_CURVE(self->obj), size, vector); - ret = PyTuple_New(size); - for (i = 0; i < size; i++) - PyTuple_SetItem(ret, i, PyFloat_FromDouble(vector[i])); - g_free(vector); - return ret; -} -%% -override gtk_curve_set_vector kwargs -static PyObject * -_wrap_gtk_curve_set_vector(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "vector", NULL }; - PyObject *seq; - int size, i; - gfloat *vector; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GtkCurve.set_vector", - kwlist, &seq)) - return NULL; - if (!PySequence_Check(seq)) { - PyErr_SetString(PyExc_TypeError, "1st argument is not a sequence"); - return NULL; - } - size = PySequence_Length(seq); - vector = g_new(gfloat, size); - for (i = 0; i < size; i++) { - PyObject *item = PySequence_GetItem(seq, i); - - Py_DECREF(item); - item = PyNumber_Float(item); /* item has a ref now */ - if (item == NULL) { - g_free(vector); - return NULL; - } - vector[i] = PyFloat_AsDouble(item); - Py_DECREF(item); - } - gtk_curve_set_vector(GTK_CURVE(self->obj), size, vector); - g_free(vector); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_binding_entry_add_signal -static PyObject * -_wrap_gtk_binding_entry_add_signal(PyGObject *self, PyObject *args) -{ - PyObject *first; - gint len, i; - PyObject *class; - guint keyval, modifiers; - gchar *signal_name; - GType class_type; - GtkBindingSet *bset = NULL; - GSList *slist = NULL; - gchar *errmsg; - - len = PyTuple_Size(args); - if (len < 4) { - PyErr_SetString(PyExc_TypeError, "binding_entry_add_signal requires at" - " least 4 arguments"); - return NULL; - } - first = PySequence_GetSlice(args, 0, 4); - if (!PyArg_ParseTuple(first, "Oiis:binding_entry_add_signal", &class, - &keyval, &modifiers, &signal_name)) { - Py_DECREF(first); - return NULL; - } - Py_DECREF(first); - - class_type = pyg_type_from_object(class); - if (class_type == 0) - return NULL; - - bset = gtk_binding_set_by_class(gtk_type_class(class_type)); - - /* extra args */ - if ((len-4)%2) { - PyErr_SetString(PyExc_ValueError, - "GtkBindingSet.add_signal requires an even number" - " of parameter pairs following the first four args"); - return NULL; - } - for (i=4; i < len; i+=2) { - PyObject *item; - GType arg_type; - GtkBindingArg *arg = NULL; - - item = PyTuple_GET_ITEM(args, i); - arg_type = pyg_type_from_object(item); - if (!arg_type) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "GtkBindingSet.add_signal parameter types" - " must be int"); - goto arg_error; - } - arg = g_new0 (GtkBindingArg, 1); - slist = g_slist_prepend(slist, arg); - - arg->arg_type = arg_type; - switch (GTK_FUNDAMENTAL_TYPE(arg->arg_type)) { - case GTK_TYPE_CHAR: - case GTK_TYPE_UCHAR: - case GTK_TYPE_INT: - case GTK_TYPE_UINT: - case GTK_TYPE_BOOL: - case GTK_TYPE_ENUM: - case GTK_TYPE_FLAGS: - case GTK_TYPE_LONG: - case GTK_TYPE_ULONG: - arg->arg_type = GTK_TYPE_LONG; - item = PyTuple_GET_ITEM(args, i+1); - if (!PyInt_Check(item)) { - errmsg = g_strdup_printf("GtkBindingSet.add_signal " - "arg[%u] must be int", i+1); - PyErr_SetString(PyExc_TypeError, errmsg); - g_free(errmsg); - goto arg_error; - } - arg->d.long_data = (glong)PyInt_AsLong(item); - break; - case GTK_TYPE_FLOAT: - case GTK_TYPE_DOUBLE: - arg->arg_type = GTK_TYPE_DOUBLE; - item = PyTuple_GET_ITEM(args, i+1); - if (!PyFloat_Check(item)) { - errmsg = g_strdup_printf("GtkBindingSet.add_signal " - "arg[%u] must be float", i+1); - PyErr_SetString(PyExc_TypeError, errmsg); - g_free(errmsg); - goto arg_error; - } - arg->d.long_data = (gdouble)PyFloat_AsDouble(item); - break; - case GTK_TYPE_STRING: - arg->arg_type = GTK_TYPE_STRING; - if (arg->arg_type != GTK_TYPE_IDENTIFIER) - arg->arg_type = GTK_TYPE_STRING; - item = PyTuple_GET_ITEM(args, i+1); - if (!PyString_Check(item)) { - errmsg = g_strdup_printf("GtkBindingSet.add_signal arg[%u] " - "must be non-empty string", i+1); - PyErr_SetString(PyExc_TypeError, errmsg); - g_free(errmsg); - goto arg_error; - } - arg->d.string_data = (gchar*)PyString_AsString(item); - if (!arg->d.string_data) { - errmsg = g_strdup_printf("GtkBindingSet.add_signal arg[%u] " - "must be non-empty string", i+1); - PyErr_SetString(PyExc_TypeError, errmsg); - g_free(errmsg); - goto arg_error; - } - break; - default: - errmsg = g_strdup_printf("GtkBindingSet.add_signal unsupported " - "type %10s for arg[%u]", - gtk_type_name(arg->arg_type), i+1); - PyErr_SetString(PyExc_TypeError, errmsg); - g_free(errmsg); - goto arg_error; - } /* switch */ - } - - slist = g_slist_reverse (slist); - gtk_binding_entry_add_signall (bset, keyval,modifiers, signal_name, slist); - - g_slist_foreach(slist, (GFunc)g_free, NULL); - g_slist_free(slist); - - Py_INCREF(Py_None); - return Py_None; - -arg_error: - if (slist) { - g_slist_foreach(slist, (GFunc)g_free, NULL); - g_slist_free(slist); - } - return NULL; -} -%% -override gtk_main noargs - - /* This code (pygtk main watch) was copied with minor changes from - * pygobject/gobject/pygmainloop.c */ -static gboolean -pygtk_main_watch_prepare(GSource *source, - int *timeout) -{ - /* Python only invokes signal handlers from the main thread, - * so if a thread other than the main thread receives the signal - * from the kernel, PyErr_CheckSignals() from that thread will - * do nothing. So, we need to time out and check for signals - * regularily too. - * Also, on Windows g_poll() won't be interrupted by a signal - * (AFAIK), so we need the timeout there too. - */ -#ifndef PLATFORM_WIN32 - if (pyg_threads_enabled) -#endif - *timeout = 100; - - return FALSE; -} - -static gboolean -pygtk_main_watch_check(GSource *source) -{ - PyGILState_STATE state; - - state = pyg_gil_state_ensure(); - - if (PyErr_CheckSignals() == -1 && gtk_main_level() > 0) { - PyErr_SetNone(PyExc_KeyboardInterrupt); - gtk_main_quit(); - } - - pyg_gil_state_release(state); - - return FALSE; -} - -static gboolean -pygtk_main_watch_dispatch(GSource *source, - GSourceFunc callback, - gpointer user_data) -{ - /* We should never be dispatched */ - g_assert_not_reached(); - return TRUE; -} - -static GSourceFuncs pygtk_main_watch_funcs = -{ - pygtk_main_watch_prepare, - pygtk_main_watch_check, - pygtk_main_watch_dispatch, - NULL -}; - -static GSource * -pygtk_main_watch_new(void) -{ - return g_source_new(&pygtk_main_watch_funcs, sizeof(GSource)); -} - - -static PyObject * -_wrap_gtk_main(PyObject *self) -{ - GSource *main_watch; - // Call enable_threads again to ensure that the thread state is recorded - if (pyg_threads_enabled) - pyg_enable_threads(); - - main_watch = pygtk_main_watch_new(); - pyg_begin_allow_threads; - g_source_attach(main_watch, NULL); - gtk_main(); - g_source_destroy(main_watch); - pyg_end_allow_threads; - if (PyErr_Occurred()) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_main_iteration kwargs -static PyObject * -_wrap_gtk_main_iteration(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = {"block", NULL}; - int block = 1, ret; - - if(!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:main_iteration", kwlist, - &block)) - return NULL; - pyg_begin_allow_threads; - ret = gtk_main_iteration_do(block); - pyg_end_allow_threads; - - return PyBool_FromLong(ret); -} -%% -override gtk_main_quit args -static PyObject * -_wrap_gtk_main_quit(PyObject *self, PyObject *args) -{ - /* args is just ignored, so obj.connect(signal, func) always works */ - - /* Sanity check to make sure we're in a mainloop */ - if (gtk_main_level() == 0) { - PyErr_SetString(PyExc_RuntimeError, - "called outside of a mainloop"); - return NULL; - } - - gtk_main_quit(); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_main_iteration_do kwargs -static PyObject * -_wrap_gtk_main_iteration_do(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = {"block", NULL}; - int block = 1, ret; - - if(!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:main_iteration_do", - kwlist, &block)) - return NULL; - - pyg_begin_allow_threads; - ret = gtk_main_iteration_do(block); - pyg_end_allow_threads; - - return PyBool_FromLong(ret); -} -%% -override gtk_quit_add -static gboolean -quit_handler_marshal(gpointer user_data) -{ - PyGILState_STATE state; - PyObject *tuple, *ret; - gboolean res; - - g_return_val_if_fail(user_data != NULL, FALSE); - - state = pyg_gil_state_ensure(); - - tuple = (PyObject *)user_data; - ret = PyObject_CallObject(PyTuple_GetItem(tuple, 0), - PyTuple_GetItem(tuple, 1)); - if (!ret) { - PyErr_Print(); - res = FALSE; - } else { - res = PyObject_IsTrue(ret); - Py_DECREF(ret); - } - pyg_gil_state_release(state); - - return res; -} - -static PyObject * -_wrap_gtk_quit_add(PyObject *self, PyObject *args) -{ - gint main_level; - PyObject *first, *callback, *cbargs = NULL, *data; - gint len; - - len = PyTuple_Size(args); - if (len < 2) { - PyErr_SetString(PyExc_TypeError, - "quit_add requires at least 2 args"); - return NULL; - } - first = PySequence_GetSlice(args, 0, 2); - if (!PyArg_ParseTuple(first, "iO:quit_add", &main_level, &callback)) { - Py_DECREF(first); - return NULL; - } - Py_DECREF(first); - if (!PyCallable_Check(callback)) { - PyErr_SetString(PyExc_TypeError, "second argument not callable"); - return NULL; - } - - cbargs = PySequence_GetSlice(args, 2, len); - if (cbargs == NULL) - return NULL; - - data = Py_BuildValue("(ON)", callback, cbargs); - if (data == NULL) - return NULL; - return PyInt_FromLong(gtk_quit_add_full(main_level, quit_handler_marshal, - NULL, data, pyg_destroy_notify)); -} -%% -override gtk_get_current_event_state noargs -static PyObject * -_wrap_gtk_get_current_event_state (PyGObject *self) -{ - GdkModifierType state = 0; - - if (gtk_get_current_event_state (&state)) { - return pyg_flags_from_gtype (GDK_TYPE_MODIFIER_TYPE, state); - } else { - Py_INCREF (Py_None); - return Py_None; - } -} -%% -override gtk_editable_insert_text kwargs -static PyObject * -_wrap_gtk_editable_insert_text(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "text", "position", NULL }; - char *text; - Py_ssize_t len; - int position=0; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s#|i:GtkEditable.insert_text", - kwlist, &text, &len, &position)) - return NULL; - gtk_editable_insert_text(GTK_EDITABLE(self->obj), text, len, &position); - return PyInt_FromLong(position); -} -%% -override gtk_editable_get_selection_bounds noargs -static PyObject * -_wrap_gtk_editable_get_selection_bounds(PyGObject *self, PyObject *args) -{ - int start, end; - - if (!gtk_editable_get_selection_bounds(GTK_EDITABLE(self->obj), &start, &end)) { - return Py_BuildValue ("()"); - } - - return Py_BuildValue ("(ii)", start, end); -} -%% -override gtk_entry_get_layout_offsets noargs -static PyObject * -_wrap_gtk_entry_get_layout_offsets(PyGObject *self, PyObject *args) -{ - int x, y; - - gtk_entry_get_layout_offsets(GTK_ENTRY(self->obj), &x, &y); - - return Py_BuildValue ("(ii)", x, y); -} -%% -override gtk_item_factory_create_items kwargs -static void -pygtk_item_factory_cb(PyGtkCustomNotify *cunote, - guint action, GtkWidget *widget) -{ - PyGILState_STATE state; - PyObject *ret; - - state = pyg_gil_state_ensure(); - if (cunote->data) - ret = PyObject_CallFunction(cunote->func, "OiO", cunote->data, action, - pygobject_new((GObject *)widget)); - else - ret = PyObject_CallFunction(cunote->func, "iO", action, - pygobject_new((GObject *)widget)); - if (ret == NULL) { - PyErr_Print(); - } else - Py_DECREF(ret); - pyg_gil_state_release(state); -} -static PyObject * -_wrap_gtk_item_factory_create_items(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "entries", "callback_data", NULL }; - PyObject *list, *cb, *cbdata = NULL; - GtkItemFactoryEntry ent; - PyObject *extra_data = NULL; - GtkItemFactory *ifact; - int i, len; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:GtkItemFactory.create_items", kwlist, - &list, &cbdata)) - return NULL; - - if (!PySequence_Check(list)) { - PyErr_SetString(PyExc_TypeError, "entries must be a sequence"); - return NULL; - } - - ifact = GTK_ITEM_FACTORY(self->obj); - len = PySequence_Size(list); - for (i = 0; i < len; i++) { - PyGtkCustomNotify *cunote = NULL; - PyObject *item = PySequence_GetItem(list, i); - Py_DECREF(item); - - memset(&ent, 0, sizeof(ent)); - cb = Py_None; - - if (!PyArg_ParseTuple(item, "s|zOizO", &(ent.path), &(ent.accelerator), - &cb, &(ent.callback_action), &(ent.item_type), - &extra_data)) { - return NULL; - } - - if (cb == Py_None) { - ent.callback = NULL; - } else { - ent.callback = (GtkItemFactoryCallback)pygtk_item_factory_cb; - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = cb; - cunote->data = cbdata; - Py_XINCREF(cunote->func); - Py_XINCREF(cunote->data); - } - - if (extra_data != NULL) { - if (PyString_Check(extra_data)) { - ent.extra_data = PyString_AsString(extra_data); - } else if (pygobject_check(extra_data, &PyGdkPixbuf_Type)) { - /* create_items actually expects inline image data - * so let's create it for the user from the pixbuf - * it's not optimal but it's convenient - */ - GdkPixdata pixdata; - GdkPixbuf * pixbuf; - guint8 * serialstr; - guint len; - - pixbuf = GDK_PIXBUF(pygobject_get(extra_data)); - gdk_pixdata_from_pixbuf(&pixdata, pixbuf, FALSE); - serialstr = gdk_pixdata_serialize(&pixdata, &len); - ent.extra_data = serialstr; - } else { - PyErr_SetString(PyExc_TypeError, - "last argument must be a GdkPixBuf or a string"); - return NULL; - } - } - if (cunote != NULL) { - PyGILState_STATE state; - state = pyg_gil_state_ensure(); - g_object_weak_ref(G_OBJECT(ifact), - (GWeakNotify) pygtk_custom_destroy_notify, - cunote); - pyg_gil_state_release(state); - } - - gtk_item_factory_create_item(ifact, &ent, cunote, 1); - } - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_menu_popup kwargs -static void -pygtk_menu_position(GtkMenu *menu, int *x, int *y, gboolean *push_in, - gpointer user_data) -{ - PyGtkCustomNotify *cunote = (PyGtkCustomNotify*)user_data; - PyObject *ret; - PyGILState_STATE state; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - if (cunote->data) { - ret = PyObject_CallFunction(cunote->func, "(NO)", - pygobject_new((GObject *)menu), - cunote->data); - } else { - ret = PyObject_CallFunction(cunote->func, "(N)", - pygobject_new((GObject *)menu)); - } - - if (ret == NULL || !PyArg_ParseTuple(ret, "iii", x, y, push_in)) { - PyErr_Print(); - Py_XDECREF(ret); - } else { - Py_DECREF(ret); - } - pyg_gil_state_release(state); -} -static PyObject * -_wrap_gtk_menu_popup(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "parent_menu_shell", "parent_menu_item", "func", - "button", "activate_time", "data", NULL }; - PyGObject *py_pms, *py_pmi; - GtkWidget *pms = NULL, *pmi = NULL; - GtkMenu *menu = GTK_MENU(self->obj); - PyObject *func, *data = NULL; - int button; - guint32 time; - PyObject *pytime; - PyGtkCustomNotify *cunote; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOiO|O:GtkMenu.popup", - kwlist, &py_pms, &py_pmi, &func, - &button, &pytime, &data)) - return NULL; - if (pygobject_check(py_pms, &PyGtkWidget_Type)) - pms = GTK_WIDGET(py_pms->obj); - else if ((PyObject *)py_pms != Py_None) { - PyErr_SetString(PyExc_TypeError, - "parent_menu_shell must be a GtkWidget or None"); - return NULL; - } - if (pygobject_check(py_pmi, &PyGtkWidget_Type)) - pmi = GTK_WIDGET(py_pmi->obj); - else if ((PyObject *)py_pmi != Py_None) { - PyErr_SetString(PyExc_TypeError, - "parent_menu_item must be a GtkWidget or None"); - return NULL; - } - if (!PyCallable_Check(func) && func != Py_None) { - PyErr_SetString(PyExc_TypeError, - "func must be a callable object or None"); - return NULL; - } - if (PyLong_Check(pytime)) { - time = PyLong_AsUnsignedLong(pytime); - if (PyErr_Occurred()) - return NULL; - } else if (PyInt_Check(pytime)) { - time = PyInt_AsLong(pytime); - } else { - PyErr_SetString(PyExc_TypeError, - "last argument must be int or long"); - return NULL; - } - - /* this is an ugly hack to avoid leaking memory and references - gtk_menu_popup should use a data destroy function */ - if (menu->position_func == pygtk_menu_position) { - cunote = menu->position_func_data; - Py_DECREF(cunote->func); - Py_XDECREF(cunote->data); - g_free(cunote); - } - if (func != Py_None) { - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = func; - cunote->data = data; - Py_INCREF(func); - Py_XINCREF(data); - gtk_menu_popup(GTK_MENU(self->obj), pms, pmi, - (GtkMenuPositionFunc)pygtk_menu_position, - cunote, button, time); - } else - gtk_menu_popup(GTK_MENU(self->obj), pms, pmi, NULL,NULL, button,time); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_pixmap_get noargs -static PyObject * -_wrap_gtk_pixmap_get(PyGObject *self) -{ - GdkPixmap *pixmap; - GdkBitmap *mask; - - gtk_pixmap_get(GTK_PIXMAP(self->obj), &pixmap, &mask); - return Py_BuildValue("(NN)", pygobject_new((GObject *)pixmap), - pygobject_new((GObject *)mask)); -} - -%% -override gtk_button_new kwargs -static int -_wrap_gtk_button_new(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "label", "stock", "use_underline", NULL }; - gchar *text = NULL, *stock = NULL; - PyObject *py_use_underline = Py_True; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|zzO:OGtkButton.__init__", - kwlist, &text, &stock, &py_use_underline)) - return -1; - if (stock) - pygobject_construct(self, - "label", stock, "use-stock", TRUE, - "use-underline", TRUE, NULL); - else if (text) - pygobject_construct(self, - "label", text, "use-underline", - PyObject_IsTrue(py_use_underline), NULL); - else - pygobject_construct(self, NULL); - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, "could not create GtkButton object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_BUTTON -%% -override gtk_button_get_alignment noargs -static PyObject * -_wrap_gtk_button_get_alignment(PyGObject *self) -{ - gfloat xalign, yalign; - - gtk_button_get_alignment(GTK_BUTTON(self->obj), &xalign, &yalign); - return Py_BuildValue("(ff)", xalign, yalign); -} -%% -override gtk_button_box_get_child_size noargs -static PyObject * -_wrap_gtk_button_box_get_child_size(PyGObject *self) -{ - gint min_width; - gint min_height; - - if (PyErr_Warn(PyExc_DeprecationWarning, "don't use this") < 0) - return NULL; - gtk_button_box_get_child_size(GTK_BUTTON_BOX(self->obj), &min_width, &min_height); - return Py_BuildValue("(ii)", min_width, min_height); -} -%% -override gtk_button_box_get_child_ipadding noargs -static PyObject * -_wrap_gtk_button_box_get_child_ipadding(PyGObject *self) -{ - gint ipad_x; - gint ipad_y; - - if (PyErr_Warn(PyExc_DeprecationWarning, "don't use this") < 0) - return NULL; - gtk_button_box_get_child_ipadding(GTK_BUTTON_BOX(self->obj), &ipad_x, &ipad_y); - return Py_BuildValue("(ii)", ipad_x, ipad_y); -} -%% -override gtk_toggle_button_new kwargs -static int -_wrap_gtk_toggle_button_new(PyGObject *self, PyObject*args, PyObject*kwargs) -{ - static char *kwlist[] = { "label", "use_underline", NULL }; - gchar *text = NULL; - PyObject *py_use_underline = Py_True; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|zO):GtkToggleButton.__init__", kwlist, - &text, &py_use_underline)) - return -1; - if (text) - pygobject_construct(self, - "label", text, "use-underline", - PyObject_IsTrue(py_use_underline), NULL); - else - pygobject_construct(self, NULL); - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkToggleButton object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_TOGGLE_BUTTON -%% -override gtk_check_button_new kwargs -static int -_wrap_gtk_check_button_new(PyGObject *self, PyObject *args, PyObject*kwargs) -{ - static char *kwlist[] = { "label", "use_underline", NULL }; - gchar *text = NULL; - PyObject *py_use_underline = Py_True; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs,"|zO:GtkCheckButton.__init__", - kwlist, &text, &py_use_underline)) - return -1; - if (text) - pygobject_construct(self, - "label", text, "use-underline", - PyObject_IsTrue(py_use_underline), NULL); - else - pygobject_construct(self, NULL); - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkCheckButton object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_CHECK_BUTTON -%% -override gtk_radio_button_new kwargs -static int -_wrap_gtk_radio_button_new(PyGObject *self, PyObject *args, PyObject*kwargs) -{ - static char *kwlist[] = { "group", "label", "use_underline", NULL }; - PyObject *py_group = Py_None; - gchar *label = NULL; - GtkRadioButton *group; - PyObject *py_use_underline = Py_True; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,"|OzO:GtkRadioButton.__init__", - kwlist, &py_group, &label, - &py_use_underline)) - return -1; - if (py_group == Py_None) - group = NULL; - else if (pygobject_check(py_group, &PyGtkRadioButton_Type)) - group = GTK_RADIO_BUTTON(pygobject_get(py_group)); - else { - PyErr_SetString(PyExc_TypeError, - "first argument must be a GtkRadioButton or None"); - return -1; - } - /* various configs for create radio buttons ... */ - if (label == NULL) { - if (group == NULL) - pygobject_construct(self, NULL); - else - pygobject_construct(self, "group", group, NULL); - } else { - if (group == NULL) - pygobject_construct(self, - "label", label, "use-underline", - PyObject_IsTrue(py_use_underline), NULL); - else - pygobject_construct(self, - "label", label, "group", group, - "use-underline", - PyObject_IsTrue(py_use_underline), NULL); - } - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, "could not create GtkRadioButton object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_RADIO_BUTTON -%% -override gtk_radio_button_get_group noargs -static PyObject * -_wrap_gtk_radio_button_get_group(PyGObject *self) { - PyObject *py_list; - GSList *list, *tmp; - PyObject *gtk_obj; - - list = gtk_radio_button_get_group(GTK_RADIO_BUTTON(self->obj)); - - if ((py_list = PyList_New(0)) == NULL) { - return NULL; - } - for (tmp = list; tmp != NULL; tmp = tmp->next) { - gtk_obj = pygobject_new(G_OBJECT(tmp->data)); - if (gtk_obj == NULL) { - Py_DECREF(py_list); - return NULL; - } - PyList_Append(py_list, gtk_obj); - Py_DECREF(gtk_obj); - } - return py_list; -} -%% -override gtk_list_item_new kwargs -static int -_wrap_gtk_list_item_new(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "label", NULL }; - gchar *text = NULL; - - if (PyErr_Warn(PyExc_DeprecationWarning, "use gtk.TreeView") < 0) - return -1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|z:GtkListItem.__init__", - kwlist, &text)) - return -1; - if (text) - self->obj = (GObject *)gtk_list_item_new_with_label(text); - else - self->obj = (GObject *)gtk_list_item_new(); - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, "could not create GtkListItem object"); - return -1; - } - pygobject_register_wrapper((PyObject *)self); - return 0; -} -%% -override gtk_menu_item_new kwargs -static int -_wrap_gtk_menu_item_new(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "label", "use_underline", NULL }; - gchar *text = NULL; - PyObject *py_use_underline = Py_True; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|zO:GtkMenuItem.__init__", - kwlist, &text, &py_use_underline)) - return -1; - pygobject_construct(self, NULL); - if (text) { - GtkWidget *accel_label; - accel_label = g_object_new(GTK_TYPE_ACCEL_LABEL, NULL); - gtk_misc_set_alignment(GTK_MISC(accel_label), 0.0, 0.5); - gtk_container_add(GTK_CONTAINER(self->obj), accel_label); - if (PyObject_IsTrue(py_use_underline)) - gtk_label_set_text_with_mnemonic(GTK_LABEL(accel_label), text); - else - gtk_label_set_text(GTK_LABEL(accel_label), text); - gtk_accel_label_set_accel_widget(GTK_ACCEL_LABEL(accel_label), - GTK_WIDGET(self->obj)); - gtk_widget_show(accel_label); - } - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkMenuItem object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_MENU_ITEM -%% -override gtk_menu_attach_to_widget kwargs -static void -pygtk_menu_detach (GtkWidget *attach_widget, GtkMenu *menu) -{ - PyGILState_STATE state; - PyObject *func; - PyObject *ret; - - func = g_object_get_data (G_OBJECT (menu), "pygtk_menu_detach_func"); - - if (!func) - return; - - state = pyg_gil_state_ensure(); - - ret = PyObject_CallFunction (func, "OO", - pygobject_new ((GObject *) menu), - pygobject_new ((GObject *) attach_widget)); - if (ret == NULL) { - PyErr_Print (); - Py_XDECREF (ret); - } - else - Py_DECREF (ret); - - pyg_gil_state_release(state); -} -static PyObject * -_wrap_gtk_menu_attach_to_widget (PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "attach_widget", "detach_func", NULL }; - PyGObject *py_attach_widget; - PyObject *detach_func; - GtkWidget *attach_widget; - - if (!PyArg_ParseTupleAndKeywords (args, kwargs, - "O!O:GtkMenu.attach_to_widget", - kwlist, &PyGtkWidget_Type, - &py_attach_widget, &detach_func)) - return NULL; - - attach_widget = GTK_WIDGET (py_attach_widget->obj); - - if (!PyCallable_Check (detach_func) && detach_func != Py_None) { - PyErr_SetString (PyExc_TypeError, "second argument not callable"); - return NULL; - } - - if (detach_func != Py_None) { - Py_INCREF (detach_func); - g_object_set_data_full (self->obj, - "pygtk_menu_detach_func", - detach_func, - pyg_destroy_notify); - } - else - g_object_set_data (self->obj, "pygtk_menu_detach_func", NULL); - - gtk_menu_attach_to_widget (GTK_MENU (self->obj), attach_widget, - (GtkMenuDetachFunc) pygtk_menu_detach); - - Py_INCREF (Py_None); - return Py_None; -} -%% -override gtk_check_menu_item_new kwargs -static int -_wrap_gtk_check_menu_item_new(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "label", "use_underline", NULL }; - gchar *text = NULL; - PyObject *py_use_underline = Py_True; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|zO:GtkCheckMenuItem.__init__", kwlist, - &text, &py_use_underline)) - return -1; - pygobject_construct(self, NULL); - if (text) { - GtkWidget *accel_label; - accel_label = g_object_new(GTK_TYPE_ACCEL_LABEL, NULL); - gtk_misc_set_alignment(GTK_MISC(accel_label), 0.0, 0.5); - gtk_container_add(GTK_CONTAINER(self->obj), accel_label); - if (PyObject_IsTrue(py_use_underline)) - gtk_label_set_text_with_mnemonic(GTK_LABEL(accel_label), text); - else - gtk_label_set_text(GTK_LABEL(accel_label), text); - gtk_accel_label_set_accel_widget(GTK_ACCEL_LABEL(accel_label), - GTK_WIDGET(self->obj)); - gtk_widget_show(accel_label); - } - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkCheckMenuItem object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_CHECK_MENU_ITEM -%% -override gtk_radio_menu_item_new kwargs -static int -_wrap_gtk_radio_menu_item_new(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "group", "label", "use_underline", NULL }; - gchar *text = NULL; - PyObject *py_group = Py_None; - GtkRadioMenuItem *group; - PyObject *py_use_underline = Py_True; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|OzO:GtkRadioMenuItem.__init__", kwlist, - &py_group, &text, &py_use_underline)) - return -1; - if (py_group == Py_None) - group = NULL; - else if (pygobject_check(py_group, &PyGtkRadioMenuItem_Type)) - group = GTK_RADIO_MENU_ITEM(pygobject_get(py_group)); - else { - PyErr_SetString(PyExc_TypeError, - "first argument must be a GtkRadioMenuItem or None"); - return -1; - } - - pygobject_construct(self, NULL); - - if (text) { - GtkWidget *accel_label; - accel_label = g_object_new(GTK_TYPE_ACCEL_LABEL, NULL); - gtk_misc_set_alignment(GTK_MISC(accel_label), 0.0, 0.5); - gtk_container_add(GTK_CONTAINER(self->obj), accel_label); - if (PyObject_IsTrue(py_use_underline)) - gtk_label_set_text_with_mnemonic(GTK_LABEL(accel_label), text); - else - gtk_label_set_text(GTK_LABEL(accel_label), text); - gtk_accel_label_set_accel_widget(GTK_ACCEL_LABEL(accel_label), - GTK_WIDGET(self->obj)); - gtk_widget_show(accel_label); - } - if (group) - gtk_radio_menu_item_set_group(GTK_RADIO_MENU_ITEM(self->obj), - gtk_radio_menu_item_get_group(group)); - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkRadioMenuItem object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_RADIO_MENU_ITEM -%% -override gtk_image_menu_item_new kwargs -static int -_wrap_gtk_image_menu_item_new(PyGObject *self, PyObject *args,PyObject *kwargs) -{ - static char *kwlist[] = { "stock_id", "accel_group", NULL }; - gchar *stock_id = NULL; - PyObject *py_accel_group = Py_None; - GtkAccelGroup *accel_group= NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|zO:GtkImageMenuItem.__init__",kwlist, - &stock_id, &py_accel_group)) - return -1; - if (pygobject_check(py_accel_group, &PyGtkAccelGroup_Type)) - accel_group = GTK_ACCEL_GROUP(pygobject_get(py_accel_group)); - - if (stock_id) - self->obj = (GObject *)gtk_image_menu_item_new_from_stock(stock_id, - accel_group); - else - self->obj = (GObject *)gtk_image_menu_item_new(); - - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, "could not create GtkImageMenuItem object"); - return -1; - } - - if (pyg_type_from_object((PyObject *) self) != GTK_TYPE_IMAGE_MENU_ITEM) { - PyErr_SetString(PyExc_RuntimeError, "__gobject_init__ must be used " - "when subclassing gtk.ImageMenuItem"); - return -1; - } - - pygobject_register_wrapper((PyObject *)self); - return 0; -} -%% -override-slot GtkRequisition.tp_as_sequence -static Py_ssize_t -_wrap_gtk_requisition_length(PyGBoxed *self) -{ - return 2; -} -static PyObject * -_wrap_gtk_requisition_getitem(PyGBoxed *self, Py_ssize_t pos) -{ - GtkRequisition *requisition; - - if (pos < 0) pos += 2; - if (pos < 0 || pos >= 2) { - PyErr_SetString(PyExc_IndexError, "index out of range"); - return NULL; - } - requisition = pyg_boxed_get(self, GtkRequisition); - switch (pos) { - case 0: return PyInt_FromLong(requisition->width); - case 1: return PyInt_FromLong(requisition->height); - default: - g_assert_not_reached(); - return NULL; - } -} -static int -_wrap_gtk_requisition_setitem(PyGBoxed *self, Py_ssize_t pos, PyObject *value) -{ - GtkRequisition *requisition; - gint val; - - if (pos < 0) pos += 2; - if (pos < 0 || pos >= 2) { - PyErr_SetString(PyExc_IndexError, "index out of range"); - return -1; - } - requisition = pyg_boxed_get(self, GtkRequisition); - val = PyInt_AsLong(value); - if (PyErr_Occurred()) - return -1; - switch(pos) { - case 0: requisition->width = val; break; - case 1: requisition->height = val; break; - default: - g_assert_not_reached(); - return -1; - } - return 0; -} -static PySequenceMethods _wrap_gtk_requisition_tp_as_sequence = { - (lenfunc)_wrap_gtk_requisition_length, - 0, - 0, - (ssizeargfunc)_wrap_gtk_requisition_getitem, - 0, - (ssizeobjargproc)_wrap_gtk_requisition_setitem, - 0, -}; -%% -override-attr GtkRequisition.width -static int -_wrap_gtk_requisition__set_width(PyGBoxed *self, PyObject *value, void *closure) -{ - gint val; - - val = PyInt_AsLong(value); - if (PyErr_Occurred()) - return -1; - pyg_boxed_get(self, GtkRequisition)->width = val; - return 0; -} -%% -override-attr GtkRequisition.height -static int -_wrap_gtk_requisition__set_height(PyGBoxed *self, PyObject *value, void *closure) -{ - gint val; - - val = PyInt_AsLong(value); - if (PyErr_Occurred()) - return -1; - pyg_boxed_get(self, GtkRequisition)->height = val; - return 0; -} -%% -override gtk_notebook_query_tab_label_packing kwargs -static PyObject * -_wrap_gtk_notebook_query_tab_label_packing(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "child", NULL }; - PyGObject *child; - gboolean expand, fill; - GtkPackType pack_type; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkNotebook.query_tab_label_packing", - kwlist, &child)) - return NULL; - if (!pygobject_check(child, &PyGtkWidget_Type)) { - PyErr_SetString(PyExc_TypeError, "child must be a GtkWidget"); - return NULL; - } - gtk_notebook_query_tab_label_packing(GTK_NOTEBOOK(self->obj), - GTK_WIDGET(child->obj), - &expand, &fill, &pack_type); - return Py_BuildValue("(iiN)", expand, fill, - pyg_enum_from_gtype(GTK_TYPE_PACK_TYPE, pack_type)); -} -%% -override gtk_list_insert_items kwargs -static PyObject * -_wrap_gtk_list_insert_items(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "items", "position", NULL }; - PyObject *py_items; - GList *items = NULL; - int position, len, i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!i:GtkList.insert_items", - kwlist, &PyList_Type, &py_items, - &position)) - return NULL; - len = PyList_Size(py_items); - for (i = 0; i < len; i++) { - PyObject *item = PyList_GetItem(py_items, i); - if (!pygobject_check(item, &PyGtkListItem_Type)) { - PyErr_SetString(PyExc_TypeError, "list item not a GtkListItem"); - g_list_free(items); - return NULL; - } - items = g_list_append(items, pygobject_get(item)); - } - gtk_list_insert_items(GTK_LIST(self->obj), items, position); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_list_append_items kwargs -static PyObject * -_wrap_gtk_list_append_items(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "items", NULL }; - PyObject *py_items; - GList *items = NULL; - int len, i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:GtkList.append_items", - kwlist, &PyList_Type, &py_items)) - return NULL; - len = PyList_Size(py_items); - for (i = 0; i < len; i++) { - PyObject *item = PyList_GetItem(py_items, i); - if (!pygobject_check(item, &PyGtkListItem_Type)) { - PyErr_SetString(PyExc_TypeError, "list item not a GtkListItem"); - g_list_free(items); - return NULL; - } - items = g_list_append(items, pygobject_get(item)); - } - gtk_list_append_items(GTK_LIST(self->obj), items); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_list_prepend_items kwargs -static PyObject * -_wrap_gtk_list_prepend_items(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "items", NULL }; - PyObject *py_items; - GList *items = NULL; - int len, i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:GtkList.preppend_items", - kwlist, &PyList_Type, &py_items)) - return NULL; - len = PyList_Size(py_items); - for (i = 0; i < len; i++) { - PyObject *item = PyList_GetItem(py_items, i); - if (!pygobject_check(item, &PyGtkListItem_Type)) { - PyErr_SetString(PyExc_TypeError, "list item not a GtkListItem"); - g_list_free(items); - return NULL; - } - items = g_list_append(items, pygobject_get(item)); - } - gtk_list_prepend_items(GTK_LIST(self->obj), items); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_list_remove_items kwargs -static PyObject * -_wrap_gtk_list_remove_items(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "items", NULL }; - PyObject *py_items; - GList *items = NULL; - int len, i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:GtkList.remove_items", - kwlist, &PyList_Type, &py_items)) - return NULL; - len = PyList_Size(py_items); - for (i = 0; i < len; i++) { - PyObject *item = PyList_GetItem(py_items, i); - if (!pygobject_check(item, &PyGtkListItem_Type)) { - PyErr_SetString(PyExc_TypeError, "list item not a GtkListItem"); - g_list_free(items); - return NULL; - } - items = g_list_append(items, pygobject_get(item)); - } - gtk_list_remove_items(GTK_LIST(self->obj), items); - g_list_free(items); - Py_INCREF(Py_None); - return Py_None; -} -%% -override-attr GtkList.selection -static PyObject * -_wrap_gtk_list__get_selection(PyGObject *self, void *closure) -{ - GList *selection; - PyObject *item, *ret = PyList_New(0); - - if (ret == NULL) - return NULL; - - for (selection = GTK_LIST(self->obj)->selection; selection != NULL; - selection = selection->next) { - item = pygobject_new((GObject *) GTK_LIST_ITEM(selection->data)); - - if (!item) { - Py_DECREF(ret); - return NULL; - } - - PyList_Append(ret, item); - Py_DECREF(item); - } - return ret; -} -%% -override gtk_list_get_selection noargs -static PyObject * -_wrap_gtk_list__get_selection(PyGObject *self, void *closure); -static PyObject * -_wrap_gtk_list_get_selection(PyGObject *self) -{ - return _wrap_gtk_list__get_selection(self, NULL); -} -%% -override gtk_color_selection_get_current_color noargs -static PyObject * -_wrap_gtk_color_selection_get_current_color(PyGObject *self) -{ - GdkColor colour = { 0, }; - - gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(self->obj), - &colour); - return pyg_boxed_new(GDK_TYPE_COLOR, &colour, TRUE, TRUE); -} -%% -override gtk_color_selection_get_previous_color noargs -static PyObject * -_wrap_gtk_color_selection_get_previous_color(PyGObject *self) -{ - GdkColor colour = { 0, }; - - gtk_color_selection_get_previous_color(GTK_COLOR_SELECTION(self->obj), - &colour); - return pyg_boxed_new(GDK_TYPE_COLOR, &colour, TRUE, TRUE); -} -%% -override gtk_calendar_get_date noargs -static PyObject * -_wrap_gtk_calendar_get_date(PyGObject *self) -{ - guint year, month, day; - - gtk_calendar_get_date(GTK_CALENDAR(self->obj), &year, &month, &day); - return Py_BuildValue("(iii)", year, month, day); -} -%% -override gtk_drag_dest_set kwargs -static PyObject * -_wrap_gtk_drag_dest_set(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "flags", "targets", "actions", NULL }; - PyObject *py_flags, *py_targets, *py_actions; - GtkDestDefaults flags; - GtkTargetEntry *targets; - GdkDragAction actions; - gint n_targets, i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OOO:GtkWidget.drag_dest_set", kwlist, - &py_flags, &py_targets, &py_actions)) - return NULL; - if (pyg_flags_get_value(GTK_TYPE_DEST_DEFAULTS, py_flags, (gint *)&flags)) - return NULL; - if (pyg_flags_get_value(GDK_TYPE_DRAG_ACTION, - py_actions, (gint *)&actions)) - return NULL; - if (!PySequence_Check(py_targets)) { - PyErr_SetString(PyExc_TypeError, "targets must be a sequence"); - return NULL; - } - n_targets = PySequence_Length(py_targets); - targets = g_new(GtkTargetEntry, n_targets); - for (i = 0; i < n_targets; i++) { - PyObject *item = PySequence_GetItem(py_targets, i); - Py_DECREF(item); - if (!PyArg_ParseTuple(item, "sii", &targets[i].target, - &targets[i].flags, &targets[i].info)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "list items should be of form (string,int,int)"); - g_free(targets); - return NULL; - } - } - gtk_drag_dest_set(GTK_WIDGET(self->obj), flags, targets, n_targets, - actions); - g_free(targets); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_drag_dest_find_target kwargs -static PyObject * -_wrap_gtk_drag_dest_find_target(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "context", "target_list", NULL }; - PyObject *context, *py_targets; - GtkTargetList *target_list; - GdkAtom atom; - gchar *name; - PyObject *ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!O:GtkWidget.drag_dest_find_target", - kwlist, &PyGdkDragContext_Type, &context, - &py_targets)) - return NULL; - - if (!(target_list = pygtk_target_list_from_sequence(py_targets))) - return NULL; - - atom = gtk_drag_dest_find_target(GTK_WIDGET(self->obj), - GDK_DRAG_CONTEXT(pygobject_get(context)), - target_list); - gtk_target_list_unref(target_list); - - name = gdk_atom_name(atom); - ret = PyString_FromString(name); - g_free(name); - return ret; -} -%% -override gtk_drag_dest_get_target_list noargs -static PyObject * -_wrap_gtk_drag_dest_get_target_list(PyGObject *self) -{ - GtkTargetList *target_list; - - target_list = gtk_drag_dest_get_target_list(GTK_WIDGET(self->obj)); - - if (!target_list) { - Py_INCREF(Py_None); - return Py_None; - } - - return pygtk_target_list_to_list(target_list); -} -%% -override gtk_drag_dest_set_target_list kwargs -static PyObject * -_wrap_gtk_drag_dest_set_target_list(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "target_list", NULL }; - PyObject *py_targets; - GtkTargetList *target_list; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkWidget.drag_dest_set_target_list", - kwlist, &py_targets)) - return NULL; - - if (!(target_list = pygtk_target_list_from_sequence(py_targets))) - return NULL; - - gtk_drag_dest_set_target_list(GTK_WIDGET(self->obj), target_list); - gtk_target_list_unref(target_list); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_drag_source_set kwargs -static PyObject * -_wrap_gtk_drag_source_set(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "start_button_mask", "targets", "actions", NULL }; - PyObject *py_sbmask, *py_targets, *py_actions; - GdkModifierType sbmask; - GtkTargetEntry *targets; - GdkDragAction actions; - gint n_targets, i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OOO:GtkWidget.drag_source_set", kwlist, - &py_sbmask, &py_targets, &py_actions)) - return NULL; - if (pyg_flags_get_value(GDK_TYPE_MODIFIER_TYPE, - py_sbmask, (gint *)&sbmask)) - return NULL; - if (pyg_flags_get_value(GDK_TYPE_DRAG_ACTION, - py_actions, (gint *)&actions)) - return NULL; - if (!(py_targets = PySequence_Fast(py_targets, "targets must be a sequence"))) - return NULL; - n_targets = PySequence_Fast_GET_SIZE(py_targets); - targets = g_new(GtkTargetEntry, n_targets); - for (i = 0; i < n_targets; i++) { - PyObject *item = PySequence_Fast_GET_ITEM(py_targets, i); - if (!PyArg_ParseTuple(item, "sii", &targets[i].target, - &targets[i].flags, &targets[i].info)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "list items should be of form (string,int,int)"); - g_free(targets); - Py_DECREF(py_targets); - return NULL; - } - } - gtk_drag_source_set(GTK_WIDGET(self->obj), sbmask, targets, n_targets, - actions); - g_free(targets); - Py_DECREF(py_targets); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_drag_begin kwargs -static PyObject * -_wrap_gtk_drag_begin(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "targets", "actions", "button", "event", NULL }; - PyObject *py_targets, *py_actions, *event; - GtkTargetList *targets; - GdkDragAction actions; - gint button; - GdkDragContext *context; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OOiO:GtkWidget.drag_begin", kwlist, - &py_targets, &py_actions, &button, - &event)) - return NULL; - if (pyg_flags_get_value(GDK_TYPE_DRAG_ACTION, - py_actions, (gint *)&actions)) - return NULL; - if (!pyg_boxed_check(event, GDK_TYPE_EVENT)) { - PyErr_SetString(PyExc_TypeError, "event must be a GdkEvent"); - return NULL; - } - if (!(targets = pygtk_target_list_from_sequence(py_targets))) - return NULL; - - context = gtk_drag_begin(GTK_WIDGET(self->obj), targets, actions, button, - pyg_boxed_get(event, GdkEvent)); - gtk_target_list_unref(targets); - return pygobject_new((GObject *)context); -} -%% -override gtk_selection_add_targets kwargs -static PyObject * -_wrap_gtk_selection_add_targets(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "selection", "targets", NULL }; - PyObject *py_targets, *py_selection; - GtkTargetEntry *targets; - GdkAtom selection; - int n_targets, i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OO:GtkWidget.selection_add_targets", - kwlist, &py_selection, &py_targets)) - return NULL; - selection = pygdk_atom_from_pyobject(py_selection); - if (PyErr_Occurred()) - return NULL; - - if (!(py_targets = PySequence_Fast(py_targets, "targets must be a sequence"))) - return NULL; - n_targets = PySequence_Fast_GET_SIZE(py_targets); - targets = g_new(GtkTargetEntry, n_targets); - for (i = 0; i < n_targets; i++) { - PyObject *item = PySequence_Fast_GET_ITEM(py_targets, i); - if (!PyArg_ParseTuple(item, "sii", &targets[i].target, - &targets[i].flags, &targets[i].info)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "list items should be of form (string,int,int)"); - g_free(targets); - Py_DECREF(py_targets); - return NULL; - } - } - gtk_selection_add_targets(GTK_WIDGET(self->obj), selection, - targets, n_targets); - g_free(targets); - Py_DECREF(py_targets); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_text_child_anchor_get_widgets noargs -static PyObject * -_wrap_gtk_text_child_anchor_get_widgets(PyGObject *self) -{ - GList *list, *tmp; - PyObject *ret; - - list = gtk_text_child_anchor_get_widgets(GTK_TEXT_CHILD_ANCHOR(self->obj)); - - ret = PyList_New(0); - for (tmp = list; tmp != NULL; tmp = tmp->next) { - GtkWidget *widget = tmp->data; - PyObject *item = pygobject_new((GObject *)widget); - - PyList_Append(ret, item); - Py_DECREF(item); - } - g_list_free(list); - return ret; -} -%% -override gtk_dialog_new_with_buttons kwargs -static int -_wrap_gtk_dialog_new_with_buttons(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - gchar *title = NULL; - PyGObject *py_window = NULL; - PyObject *py_flags = NULL, *py_buttons = Py_None; - GtkDialogFlags flags = 0; - int len, i; - GtkWindow *parent; - - static char *kwlist[] = { "title", "parent", "flags", "buttons", NULL }; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|zOOO:GtkDialog.__init__", kwlist, - &title, &py_window, &py_flags, - &py_buttons)) - return -1; - - if (py_window == NULL || (PyObject*)py_window == Py_None) - parent = NULL; - else if (pygobject_check(py_window, &PyGtkWindow_Type)) - parent = GTK_WINDOW(py_window->obj); - else { - PyErr_SetString(PyExc_TypeError, "parent must be a GtkWindow or None"); - return -1; - } - - if (pyg_flags_get_value(GTK_TYPE_DIALOG_FLAGS, py_flags, (gint *)&flags)) - return -1; - if (py_buttons == Py_None) - len = 0; - else if (PyTuple_Check(py_buttons)) - len = PyTuple_Size(py_buttons); - else { - PyErr_SetString(PyExc_TypeError, "buttons must be a tuple containing text/response pairs or None"); - return -1; - } - - if (len % 2) { - PyErr_SetString(PyExc_RuntimeError, - "buttons tuple must contain text/response id pairs"); - return -1; - } - - if (pygobject_constructv(self, 0, NULL)) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkDialog object"); - return -1; - } - - if (title) - gtk_window_set_title (GTK_WINDOW (self->obj), title); - - if (parent) - gtk_window_set_transient_for (GTK_WINDOW (self->obj), parent); - - if (flags & GTK_DIALOG_MODAL) - gtk_window_set_modal (GTK_WINDOW (self->obj), TRUE); - - if (flags & GTK_DIALOG_DESTROY_WITH_PARENT) - gtk_window_set_destroy_with_parent (GTK_WINDOW (self->obj), TRUE); - - if (flags & GTK_DIALOG_NO_SEPARATOR) - gtk_dialog_set_has_separator (GTK_DIALOG (self->obj), FALSE); - - for (i = 0; i < len; i += 2) { - PyObject *text = PyTuple_GetItem(py_buttons, i); - PyObject *id = PyTuple_GetItem(py_buttons, i + 1); - if (!PyString_Check(text)) { - gtk_object_destroy(GTK_OBJECT(self->obj)); - self->obj = NULL; - PyErr_SetString(PyExc_RuntimeError, - "first member of each text/response id pair " - "must be a string"); - return -1; - } - if (!PyInt_Check(id)) { - gtk_object_destroy(GTK_OBJECT(self->obj)); - self->obj = NULL; - PyErr_SetString(PyExc_RuntimeError, - "second member of each text/response id pair " - "must be a number"); - return -1; - } - gtk_dialog_add_button(GTK_DIALOG(self->obj), PyString_AsString(text), - PyInt_AsLong(id)); - } - - return 0; -} -%% -new-constructor GTK_TYPE_DIALOG -%% -override gtk_dialog_run noargs -static PyObject * -_wrap_gtk_dialog_run(PyGObject *self) -{ - gint retval; - - pyg_begin_allow_threads; - retval = gtk_dialog_run(GTK_DIALOG(self->obj)); - pyg_end_allow_threads; - return PyInt_FromLong(retval); -} -%% -override gtk_dialog_add_buttons -static PyObject * -_wrap_gtk_dialog_add_buttons(PyGObject *self, PyObject *args) -{ - GtkDialog *dialog; - int i, len; - - dialog = GTK_DIALOG(self->obj); - - len = PyTuple_Size(args); - if (len % 2 != 0) { - PyErr_SetString(PyExc_TypeError, - "must pass an even number of arguments"); - return NULL; - } - - for (i = 0; i < len; i+= 2) { - PyObject *curr_args = PyTuple_GetSlice(args, i, i + 2); - gchar *text; - gint response_id; - - if (!PyArg_ParseTuple(curr_args, "si", &text, &response_id)) - return NULL; - - gtk_dialog_add_button(dialog, text, response_id); - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -init -#if GTK_CHECK_VERSION(2, 9, 0) - pyg_set_object_has_new_constructor(GTK_TYPE_MESSAGE_DIALOG); -#endif -%% -override gtk_message_dialog_new kwargs -static int -_wrap_gtk_message_dialog_new(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - GtkButtonsType buttons = GTK_BUTTONS_NONE; - static char *kwlist[] = { "parent", "flags", "type", "buttons", "message_format", NULL }; - PyObject *py_flags = NULL, *py_type = NULL, *py_buttons = NULL; - GtkDialogFlags flags = 0; - GtkWindow *parent = NULL; - GtkMessageType type = GTK_MESSAGE_INFO; - PyGObject *py_parent = NULL; - char *message_format = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOOOz:GtkMessageDialog.__init__", kwlist, &py_parent, &py_flags, &py_type, &py_buttons, &message_format)) - return -1; - if ((PyObject *)py_parent == Py_None) - parent = NULL; - else if (py_parent && pygobject_check(py_parent, &PyGtkWindow_Type)) - parent = GTK_WINDOW(py_parent->obj); - else if (py_parent) { - PyErr_SetString(PyExc_TypeError, "parent should be a GtkWindow or None"); - return -1; - } - if (pyg_flags_get_value(GTK_TYPE_DIALOG_FLAGS, py_flags, (gint *)&flags)) - return -1; - if (pyg_enum_get_value(GTK_TYPE_MESSAGE_TYPE, py_type, (gint *)&type)) - return -1; - if (pyg_enum_get_value(GTK_TYPE_BUTTONS_TYPE, py_buttons, (gint *)&buttons)) - return -1; - -#if GTK_CHECK_VERSION(2, 9, 0) - - if (flags & GTK_DIALOG_NO_SEPARATOR) - g_warning("The gtk.DIALOG_NO_SEPARATOR flag cannot be used for gtk.MessageDialog"); - - pygobject_construct(self, "buttons", buttons, - "message-type", type, - (message_format? "text" : NULL), message_format, - NULL); - if (parent != NULL) - gtk_window_set_transient_for(GTK_WINDOW(self->obj), parent); - - if (flags & GTK_DIALOG_MODAL) - gtk_window_set_modal(GTK_WINDOW(self->obj), TRUE); - - if (flags & GTK_DIALOG_DESTROY_WITH_PARENT) - gtk_window_set_destroy_with_parent(GTK_WINDOW(self->obj), TRUE); - - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkMessageDialog object"); - return -1; - } - - g_object_ref(self->obj); /* we don't own the first reference of windows */ - -#else - - /* Note: with older API (< 2.10), it is impossible to - * construct a GtkMessageDialog through g_object_new(), because - * there is no 'message' property and the label field is - * private */ - if (message_format) - self->obj = (GObject *)gtk_message_dialog_new(parent, flags, type, - buttons, "%s", - message_format); - else - self->obj = (GObject *)gtk_message_dialog_new(parent, flags, type, - buttons, message_format); - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkMessageDialog object"); - return -1; - } - - g_object_ref(self->obj); /* we don't own the first reference of windows */ - - if (pyg_type_from_object((PyObject *) self) != GTK_TYPE_MESSAGE_DIALOG) { - PyErr_SetString(PyExc_RuntimeError, "__gobject_init__ must be used " - "when subclassing gtk.MessageDialog"); - return -1; - } - - pygobject_register_wrapper((PyObject *)self); - -#endif - return 0; -} -%% -override gtk_progress_bar_new_with_adjustment kwargs -static int -_wrap_gtk_progress_bar_new_with_adjustment(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - GtkAdjustment *adjustment = NULL; - static char *kwlist[] = { "adjustment", NULL }; - PyGObject *py_adjustment = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:GtkProgressBar.__init__", kwlist, &py_adjustment)) - return -1; - if ((PyObject *)py_adjustment == Py_None) - adjustment = NULL; - else if (py_adjustment && pygobject_check(py_adjustment, &PyGtkAdjustment_Type)) - adjustment = GTK_ADJUSTMENT(py_adjustment->obj); - else if (py_adjustment) { - PyErr_SetString(PyExc_TypeError, "adjustment should be a GtkAdjustment or None"); - return -1; - } - - - if (adjustment) - pygobject_construct(self, "adjustment", adjustment, NULL); - else - pygobject_construct(self, NULL); - - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, "could not create GtkProgressBar object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_PROGRESS_BAR -%% -override gtk_rc_set_default_files kwargs -static PyObject * -_wrap_gtk_rc_set_default_files(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - gchar **filenames = NULL; - static char *kwlist[] = { "filenames", NULL }; - PyObject *py_filenames = NULL; - int i, n_files; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:rc_set_default_files", - kwlist, &py_filenames)) - return NULL; - - if (!PySequence_Check(py_filenames)) { - PyErr_SetString(PyExc_TypeError, "filenames must be a sequence"); - return NULL; - } - - n_files = PySequence_Length(py_filenames); - filenames = g_new(gchar *, n_files + 1); - for (i = 0; i < n_files; i++) { - PyObject *item = PySequence_GetItem(py_filenames, i); - Py_DECREF(item); /* PySequence_GetItem INCREF's */ - filenames[i] = PyString_AsString(item); - } - filenames[n_files] = NULL; - - gtk_rc_set_default_files(filenames); - - g_free(filenames); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_rc_get_default_files noargs -static PyObject * -_wrap_gtk_rc_get_default_files(PyGObject *self) -{ - gchar **filenames = NULL, **tmp; - int i = 0, j; - PyObject *ret; - - filenames = gtk_rc_get_default_files(); - - tmp = filenames; - while (*tmp) - tmp++, i++; - - ret = PyTuple_New(i); - for (j = 0; j < i; j++) - PyTuple_SetItem(ret, j, PyString_FromString(filenames[j])); - - return ret; -} -%% -override gtk_icon_set_new_from_pixbuf kwargs -static int -_wrap_gtk_icon_set_new_from_pixbuf(PyGBoxed *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "pixbuf", NULL }; - PyGObject *pixbuf = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:GtkIconSet.__init__", kwlist, &pixbuf)) - return -1; - if (pixbuf && !pygobject_check(pixbuf, &PyGdkPixbuf_Type)) { - PyErr_SetString(PyExc_TypeError, "pixbuf should be a GdkPixbuf"); - return -1; - } - self->gtype = GTK_TYPE_ICON_SET; - self->free_on_dealloc = FALSE; - if (pixbuf) - self->boxed = gtk_icon_set_new_from_pixbuf(GDK_PIXBUF(pixbuf->obj)); - else - self->boxed = gtk_icon_set_new(); - - if (!self->boxed) { - PyErr_SetString(PyExc_RuntimeError, "could not create GtkIconSet object"); - return -1; - } - self->free_on_dealloc = TRUE; - return 0; -} -%% -override gtk_icon_set_get_sizes noargs -static PyObject * -_wrap_gtk_icon_set_get_sizes(PyGObject *self) -{ - GtkIconSize *sizes; - int i, n_sizes; - PyObject *ret; - - gtk_icon_set_get_sizes(pyg_boxed_get(self, GtkIconSet), &sizes, &n_sizes); - - ret = PyTuple_New(n_sizes); - for (i = 0; i < n_sizes; i++) - PyTuple_SetItem(ret, i, PyInt_FromLong(sizes[i])); - g_free(sizes); - - return ret; -} -%% -override gtk_stock_add kwargs -static PyObject * -_wrap_gtk_stock_add(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "items", NULL }; - PyObject *py_items; - PyObject *py_item; - GtkStockItem *items = NULL; - int i, len; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:stock_add", kwlist, - &py_items)) - return NULL; - - if (!PySequence_Check(py_items)) { - PyErr_SetString(PyExc_TypeError, - "items must be a sequence of five-element tuples"); - return NULL; - } - - len = PySequence_Length(py_items); - if (len > 0) { - items = g_new(GtkStockItem, len); - for (i = 0; i < len; i++) { - py_item = PySequence_GetItem(py_items, i); - if (!py_item) goto error; - if (!PyArg_ParseTuple(py_item, "zziiz", - &items[i].stock_id, &items[i].label, - &items[i].modifier, &items[i].keyval, - &items[i].translation_domain)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, "items sequence members " - "must be of form (stock_id, label, modifiers, " - "keyval, domain)"); - goto error; - } - Py_DECREF(py_item); - } - gtk_stock_add(items, PySequence_Length(py_items)); - g_free(items); - } - Py_INCREF(Py_None); - return Py_None; - error: - g_free(items); - return NULL; -} -%% -override gtk_stock_list_ids noargs -static PyObject * -_wrap_gtk_stock_list_ids(PyGObject *self) -{ - GSList *ids; - PyObject *list; - int i = 0; - - ids = gtk_stock_list_ids(); - - list = PyList_New(g_slist_length(ids)); - for (; ids; ids = ids->next, i++) { - PyList_SetItem(list, i, PyString_FromString(ids->data)); - g_free(ids->data); - } - g_slist_free(ids); - - return list; -} -%% -override gtk_stock_lookup args -static PyObject * -_wrap_gtk_stock_lookup(PyGObject *self, PyObject *args) -{ - gchar *stock_id; - GtkStockItem item; - - if (!PyArg_ParseTuple(args, "s:gtk.stock_lookup", - &stock_id)) { - return NULL; - } - - if(gtk_stock_lookup(stock_id, &item)) { - return Py_BuildValue("zzNiz", - item.stock_id, - item.label, - pyg_flags_from_gtype(GDK_TYPE_MODIFIER_TYPE, - item.modifier), - item.keyval, - item.translation_domain); - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_layout_get_size noargs -static PyObject * -_wrap_gtk_layout_get_size(PyGObject *self) -{ - guint width, height; - gtk_layout_get_size(GTK_LAYOUT(self->obj), &width, &height); - - return Py_BuildValue("(ii)", width, height); -} -%% -override gtk_frame_get_label_align noargs -static PyObject * -_wrap_gtk_frame_get_label_align(PyGObject *self) -{ - gfloat xalign, yalign; - - gtk_frame_get_label_align(GTK_FRAME(self->obj), &xalign, &yalign); - return Py_BuildValue("(ff)", xalign, yalign); -} -%% -override gtk_misc_get_alignment noargs -static PyObject * -_wrap_gtk_misc_get_alignment(PyGObject *self) -{ - gfloat xalign, yalign; - - gtk_misc_get_alignment(GTK_MISC(self->obj), &xalign, &yalign); - return Py_BuildValue("(ff)", xalign, yalign); -} -%% -override gtk_misc_get_padding noargs -static PyObject * -_wrap_gtk_misc_get_padding(PyGObject *self) -{ - gint xpad, ypad; - - gtk_misc_get_padding(GTK_MISC(self->obj), &xpad, &ypad); - return Py_BuildValue("(ii)", xpad, ypad); -} -%% -override gtk_ruler_get_range noargs -static PyObject * -_wrap_gtk_ruler_get_range(PyGObject *self) -{ - gdouble lower, upper, position, max_size; - - gtk_ruler_get_range(GTK_RULER(self->obj), &lower, &upper, &position, - &max_size); - return Py_BuildValue("(dddd)", lower, upper, position, max_size); -} -%% -override gtk_im_context_get_preedit_string noargs -static PyObject * -_wrap_gtk_im_context_get_preedit_string(PyGObject *self) -{ - gchar *str; - PangoAttrList *attrs; - gint cursor_pos; - PyObject *ret; - - gtk_im_context_get_preedit_string(GTK_IM_CONTEXT(self->obj), - &str, &attrs, &cursor_pos); - - ret = Py_BuildValue("(sNi)", str, - pyg_boxed_new(PANGO_TYPE_ATTR_LIST, attrs, FALSE,TRUE), - cursor_pos); - g_free(str); - - return ret; -} -%% -override gtk_im_context_filter_keypress kwargs -static PyObject * -_wrap_gtk_im_context_filter_keypress(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "key", NULL }; - PyObject *key; - int ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkIMContext.filter_keypress", kwlist, - &key)) - return NULL; - - if (!pyg_boxed_check(key, GDK_TYPE_EVENT)) { - PyErr_SetString(PyExc_TypeError, "key must be a GdkEvent"); - return NULL; - } - - ret = gtk_im_context_filter_keypress(GTK_IM_CONTEXT(self->obj), - pyg_boxed_get(key, GdkEventKey)); - return PyBool_FromLong(ret); -} -%% -override gtk_im_context_get_surrounding noargs -static PyObject * -_wrap_gtk_im_context_get_surrounding(PyGObject *self) -{ - gchar *text; - gint cursor_index; - - if (gtk_im_context_get_surrounding(GTK_IM_CONTEXT(self->obj), - &text, &cursor_index)) { - PyObject *ret = Py_BuildValue("(si)", text, cursor_index); - - g_free(text); - return ret; - } - Py_INCREF(Py_None); - return Py_None; -} -%% -override-attr GtkTooltips.active_tips_data -static PyObject * -_wrap_gtk_tooltips__get_active_tips_data(PyGObject *self, void *closure) -{ - GtkTooltips *tips = GTK_TOOLTIPS(self->obj); - GtkTooltipsData *data = tips->active_tips_data; - - if (data == NULL) { - Py_INCREF(Py_None); - return Py_None; - } - - return Py_BuildValue("NNss", - pygobject_new((GObject *)data->tooltips), - pygobject_new((GObject *)data->widget), - data->tip_text, - data->tip_private); -} -%% -override-attr GtkTooltips.tips_data_list -static PyObject * -_wrap_gtk_tooltips__get_tips_data_list(PyGObject *self, void *closure) -{ - GList *list = GTK_TOOLTIPS(self->obj)->tips_data_list; - gint i, length; - PyObject *pylist; - GList *iter; - - length = g_list_length(list); - pylist = PyList_New(length); - - i = 0; - for (iter = list; iter; iter = iter->next) { - GtkTooltipsData *data = (GtkTooltipsData*)iter->data; - PyObject *item = Py_BuildValue("NNss", - pygobject_new((GObject *)data->tooltips), - pygobject_new((GObject *)data->widget), - data->tip_text, - data->tip_private); - PyList_SetItem(pylist, i, item); - Py_INCREF(item); - } - return pylist; -} -%% -override-attr GtkAdjustment.value -static int -_wrap_gtk_adjustment__set_value(PyGObject *self, PyObject *value, - void *closure) -{ - GtkAdjustment *adjustment = GTK_ADJUSTMENT(self->obj); - - if (!pygtk_util_pyobject_as_double(value, &adjustment->value, "value")) - return -1; - gtk_adjustment_value_changed(adjustment); - return 0; -} -%% -override-attr GtkAdjustment.lower -static int -_wrap_gtk_adjustment__set_lower(PyGObject *self, PyObject *value, - void *closure) -{ - GtkAdjustment *adjustment = GTK_ADJUSTMENT(self->obj); - - if (!pygtk_util_pyobject_as_double(value, &adjustment->lower, "lower")) - return -1; - gtk_adjustment_changed(adjustment); - return 0; -} -%% -override-attr GtkAdjustment.upper -static int -_wrap_gtk_adjustment__set_upper(PyGObject *self, PyObject *value, - void *closure) -{ - GtkAdjustment *adjustment = GTK_ADJUSTMENT(self->obj); - - if (!pygtk_util_pyobject_as_double(value, &adjustment->upper, "upper")) - return -1; - gtk_adjustment_changed(adjustment); - return 0; -} -%% -override-attr GtkAdjustment.step_increment -static int -_wrap_gtk_adjustment__set_step_increment(PyGObject *self, PyObject *value, - void *closure) -{ - GtkAdjustment *adjustment = GTK_ADJUSTMENT(self->obj); - - if (!pygtk_util_pyobject_as_double(value, &adjustment->step_increment, - "step_increment")) - return -1; - gtk_adjustment_changed(adjustment); - return 0; -} -%% -override-attr GtkAdjustment.page_increment -static int -_wrap_gtk_adjustment__set_page_increment(PyGObject *self, PyObject *value, - void *closure) -{ - GtkAdjustment *adjustment = GTK_ADJUSTMENT(self->obj); - - if (!pygtk_util_pyobject_as_double(value, &adjustment->page_increment, - "page_increment")) - return -1; - gtk_adjustment_changed(adjustment); - return 0; -} -%% -override-attr GtkAdjustment.page_size -static int -_wrap_gtk_adjustment__set_page_size(PyGObject *self, PyObject *value, - void *closure) -{ - GtkAdjustment *adjustment = GTK_ADJUSTMENT(self->obj); - - if (!pygtk_util_pyobject_as_double(value, &adjustment->page_size, "page_size")) - return -1; - gtk_adjustment_changed(adjustment); - return 0; -} -%% -override gtk_adjustment_set_all kwargs -static PyObject * -_wrap_gtk_adjustment_set_all(PyGObject *self, - PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "value", "lower", "upper", "step_increment", - "page_increment", "page_size", NULL }; - GtkAdjustment *adj = GTK_ADJUSTMENT(self->obj); - double *value = &adj->value, *lower = &adj->lower, *upper = &adj->upper; - double *step_increment = &adj->step_increment; - double *page_increment = &adj->page_increment; - double *page_size = &adj->page_size; - double old_value = *value, old_lower = *lower, old_upper = *upper; - double old_step_increment = *step_increment; - double old_page_increment = *page_increment; - double old_page_size = *page_size; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|dddddd:gtk_adjustment_set_all", - kwlist, - value, lower, upper, step_increment, - page_increment, page_size)) { - adj->value = old_value; - adj->lower = old_lower; - adj->upper = old_upper; - adj->step_increment = old_step_increment; - adj->page_increment = old_page_increment; - adj->page_size = old_page_size; - return NULL; - } - - if (adj->value != old_value) - gtk_adjustment_value_changed(adj); - if (adj->lower != old_lower || adj->upper != old_upper - || adj->step_increment != old_step_increment - || adj->page_increment != old_page_increment - || adj->page_size != old_page_size) - gtk_adjustment_changed(adj); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_file_selection_get_selections noargs -static PyObject * -_wrap_gtk_file_selection_get_selections(PyGObject *self) -{ - gchar **filenames = NULL; - int size; - int i; - PyObject *ret; - - filenames = gtk_file_selection_get_selections( - GTK_FILE_SELECTION(self->obj)); - - for (i = 0; filenames[i]; i++); - size = i; - - ret = PyTuple_New(size); - for (i = 0; i < size; i++) - PyTuple_SetItem(ret, i, PyString_FromString(filenames[i])); - - return ret; -} -%% -override gtk_icon_size_lookup kwargs -static PyObject * -_wrap_gtk_icon_size_lookup(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "icon_size", NULL }; - PyObject *py_icon_size; - GtkIconSize icon_size; - gint width, height; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:icon_size_lookup", - kwlist, &py_icon_size)) - return NULL; - - if (pyg_enum_get_value(GTK_TYPE_ICON_SIZE, py_icon_size, - (gint *) &icon_size)) - return NULL; - - gtk_icon_size_lookup(icon_size, &width, &height); - - return Py_BuildValue("(ii)", width, height); -} -%% -override gtk_image_get_pixmap noargs -static PyObject * -_wrap_gtk_image_get_pixmap(PyGObject *self) -{ - GdkPixmap *pixmap; - GdkBitmap *mask; - GtkImageType type; - - type = gtk_image_get_storage_type(GTK_IMAGE(self->obj)); - if (!(type == GTK_IMAGE_PIXMAP || type == GTK_IMAGE_EMPTY)) { - PyErr_SetString(PyExc_ValueError, "image should be a GdkPixmap or empty"); - return NULL; - } - gtk_image_get_pixmap(GTK_IMAGE(self->obj), &pixmap, &mask); - return Py_BuildValue("(NN)", pygobject_new((GObject *)pixmap), - pygobject_new((GObject *)mask)); -} -%% -override gtk_image_get_image noargs -static PyObject * -_wrap_gtk_image_get_image(PyGObject *self) -{ - GdkImage *image; - GdkBitmap *mask; - GtkImageType type; - - type = gtk_image_get_storage_type(GTK_IMAGE(self->obj)); - if (!(type == GTK_IMAGE_IMAGE || type == GTK_IMAGE_EMPTY)) { - PyErr_SetString(PyExc_ValueError, "image should be a GdkImage or empty"); - return NULL; - } - gtk_image_get_image(GTK_IMAGE(self->obj), &image, &mask); - return Py_BuildValue("(NN)", pygobject_new((GObject *)image), - pygobject_new((GObject *)mask)); -} -%% -override gtk_image_get_stock noargs -static PyObject * -_wrap_gtk_image_get_stock(PyGObject *self) -{ - gchar *stock_id; - GtkIconSize size; - GtkImageType type; - - type = gtk_image_get_storage_type(GTK_IMAGE(self->obj)); - if (!(type == GTK_IMAGE_STOCK || type == GTK_IMAGE_EMPTY)) { - PyErr_SetString(PyExc_ValueError, "image should be a stock icon or empty"); - return NULL; - } - gtk_image_get_stock(GTK_IMAGE(self->obj), &stock_id, &size); - - if (stock_id) { - return Py_BuildValue("(NN)", - PyString_FromString(stock_id), - pyg_enum_from_gtype(GTK_TYPE_ICON_SIZE, size)); - } else { - Py_INCREF(Py_None); - return Py_BuildValue("(ON)", - Py_None, - pyg_enum_from_gtype(GTK_TYPE_ICON_SIZE, size)); - } -} -%% -override gtk_image_get_icon_set noargs -static PyObject * -_wrap_gtk_image_get_icon_set(PyGObject *self) -{ - GtkIconSet *icon_set; - GtkIconSize size; - GtkImageType type; - - type = gtk_image_get_storage_type(GTK_IMAGE(self->obj)); - if (!(type == GTK_IMAGE_ICON_SET || type == GTK_IMAGE_EMPTY)) { - PyErr_SetString(PyExc_ValueError, "image should be a GtkIconSet or empty"); - return NULL; - } - gtk_image_get_icon_set(GTK_IMAGE(self->obj), &icon_set, &size); - return Py_BuildValue("(NN)", pygobject_new((GObject *)icon_set), - pyg_enum_from_gtype(GTK_TYPE_ICON_SIZE, size)); -} -%% -override gtk_image_get noargs -static PyObject * -_wrap_gtk_image_get(PyGObject *self) -{ - return _wrap_gtk_image_get_image(self); -} -%% -override gtk_image_get_pixbuf noargs -static PyObject * -_wrap_gtk_image_get_pixbuf(PyGObject *self) -{ - GdkPixbuf *ret; - GtkImageType type; - - type = gtk_image_get_storage_type(GTK_IMAGE(self->obj)); - if (!(type == GTK_IMAGE_PIXBUF || type == GTK_IMAGE_EMPTY)) { - PyErr_SetString(PyExc_ValueError, "image should be a GdkPixbuf or empty"); - return NULL; - } - ret = gtk_image_get_pixbuf(GTK_IMAGE(self->obj)); - /* pygobject_new handles NULL checking */ - return pygobject_new((GObject *)ret); -} -%% -override gtk_image_get_animation noargs -static PyObject * -_wrap_gtk_image_get_animation(PyGObject *self) -{ - GdkPixbufAnimation *ret; - GtkImageType type; - - type = gtk_image_get_storage_type(GTK_IMAGE(self->obj)); - if (!(type == GTK_IMAGE_ANIMATION || type == GTK_IMAGE_EMPTY)) { - PyErr_SetString(PyExc_ValueError, "image should be a GdkPixbufAnimation or empty"); - return NULL; - } - - ret = gtk_image_get_animation(GTK_IMAGE(self->obj)); - /* pygobject_new handles NULL checking */ - return pygobject_new((GObject *)ret); -} -%% -override gtk_radio_button_set_group kwargs -static PyObject * -_wrap_gtk_radio_button_set_group(PyGObject *self, PyObject *args, - PyObject *kwargs) { - static char *kwlist[] = { "group", NULL }; - PyObject *py_group; - GSList *list; - GtkRadioButton *group; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs,"O:GtkRadioButton.set_group", - kwlist, &py_group)) - return NULL; - - if (pygobject_check(py_group, &PyGtkRadioButton_Type)) { - group = GTK_RADIO_BUTTON(pygobject_get(py_group)); - list = gtk_radio_button_get_group(group); - if (list == gtk_radio_button_get_group(GTK_RADIO_BUTTON(self->obj))) { - PyErr_SetString(PyExc_ValueError, "radio button already in group"); - return NULL; - } - } else if (py_group == Py_None) { - list = NULL; - } else { - PyErr_SetString(PyExc_TypeError, "group must be a RadioGroup or None"); - return NULL; - } - - gtk_radio_button_set_group(GTK_RADIO_BUTTON(self->obj), list); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_radio_menu_item_get_group noargs -static PyObject * -_wrap_gtk_radio_menu_item_get_group(PyGObject *self) { - PyObject *py_list; - GSList *list, *tmp; - PyObject *gtk_obj; - - list = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(self->obj)); - - if ((py_list = PyList_New(0)) == NULL) { - return NULL; - } - for (tmp = list; tmp != NULL; tmp = tmp->next) { - gtk_obj = pygobject_new(G_OBJECT(tmp->data)); - if (gtk_obj == NULL) { - Py_DECREF(py_list); - return NULL; - } - PyList_Append(py_list, gtk_obj); - Py_DECREF(gtk_obj); - } - return py_list; -} -%% -override gtk_radio_menu_item_set_group kwargs -static PyObject * -_wrap_gtk_radio_menu_item_set_group(PyGObject *self, PyObject *args, - PyObject *kwargs) { - static char *kwlist[] = { "group", NULL }; - PyObject *py_group; - GSList *list; - GtkRadioMenuItem *group; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkRadioMenuItem.set_group", - kwlist, &py_group)) - return NULL; - - if (pygobject_check(py_group, &PyGtkRadioMenuItem_Type)) { - group = GTK_RADIO_MENU_ITEM(pygobject_get(py_group)); - list = gtk_radio_menu_item_get_group(group); - if (list == gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM(self->obj))) { - PyErr_SetString(PyExc_ValueError, "radio menu item already in group"); - return NULL; - } - } else if (py_group == Py_None) { - list = NULL; - } else { - PyErr_SetString(PyExc_TypeError, "group must be a RadioMenuItem or None"); - return NULL; - } - - gtk_radio_menu_item_set_group(GTK_RADIO_MENU_ITEM(self->obj), list); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_scrolled_window_get_policy noargs -static PyObject * -_wrap_gtk_scrolled_window_get_policy(PyGObject *self) -{ - GtkPolicyType hscrollbar_policy, vscrollbar_policy; - - gtk_scrolled_window_get_policy(GTK_SCROLLED_WINDOW(self->obj), - &hscrollbar_policy, &vscrollbar_policy); - return Py_BuildValue("(NN)", - pyg_enum_from_gtype(GTK_TYPE_POLICY_TYPE, hscrollbar_policy), - pyg_enum_from_gtype(GTK_TYPE_POLICY_TYPE, vscrollbar_policy)); -} -%% -override gtk_tooltips_data_get kwargs -static PyObject * -_wrap_gtk_tooltips_data_get(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "widget", NULL }; - PyGObject *widget; - GtkTooltipsData *data; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!:GtkTooltips.data_get", - kwlist, &PyGtkWidget_Type, &widget)) - return NULL; - - data = gtk_tooltips_data_get(GTK_WIDGET(widget->obj)); - - if (!data) { - Py_INCREF(Py_None); - return Py_None; - } - - return Py_BuildValue("NNss", - pygobject_new((GObject *)data->tooltips), - pygobject_new((GObject *)data->widget), - data->tip_text, - data->tip_private); -} -%% -override gtk_tooltips_data_get1 kwargs -static PyObject * -_wrap_gtk_tooltips_data_get1(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - if (PyErr_Warn(PyExc_DeprecationWarning, "use tooltips_data_get") < 0) - return NULL; - - return _wrap_gtk_tooltips_data_get(self, args, kwargs); -} -%% -override gtk_accelerator_parse kwargs -static PyObject * -_wrap_gtk_accelerator_parse(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "accelerator", NULL }; - gchar *accel; - guint keyval; - GdkModifierType modifier; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s:Gtk.accelerator_parse", - kwlist, &accel)) - return NULL; - - gtk_accelerator_parse((const gchar *)accel, &keyval, &modifier); - - return Py_BuildValue("iN", keyval, - pyg_flags_from_gtype(GDK_TYPE_MODIFIER_TYPE, - modifier)); -} -%% -override gtk_accel_map_lookup_entry kwargs -static PyObject * -_wrap_gtk_accel_map_lookup_entry(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "accel_path", NULL }; - gchar *accel_path; - GtkAccelKey accel_key; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s:gtk.accel_map_lookup_entry", - kwlist, &accel_path)) - return NULL; - - if (gtk_accel_map_lookup_entry((const gchar *)accel_path, &accel_key)) - return Py_BuildValue("iN", accel_key.accel_key, - pyg_flags_from_gtype(GDK_TYPE_MODIFIER_TYPE, accel_key.accel_mods)); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_accel_map_load_fd kwargs -static PyObject * -_wrap_gtk_accel_map_load_fd(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "fd", NULL }; - gint fd; - PyObject *py_fd; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:gtk.accel_map_load_fd", - kwlist, &py_fd)) - return NULL; - - if ((fd = PyObject_AsFileDescriptor(py_fd)) != -1) - gtk_accel_map_load_fd(fd); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_accel_map_save_fd kwargs -static PyObject * -_wrap_gtk_accel_map_save_fd(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "fd", NULL }; - gint fd; - PyObject *py_fd; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:gtk.accel_map_save_fd", - kwlist, &py_fd)) - return NULL; - - if ((fd = PyObject_AsFileDescriptor(py_fd)) != -1) - gtk_accel_map_save_fd(fd); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_color_selection_palette_from_string kwargs -static PyObject * -_wrap_gtk_color_selection_palette_from_string(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "str", NULL }; - gchar *str; - GdkColor *colors; - gint i, n_colors; - PyObject *py_list; - - if (!PyArg_ParseTupleAndKeywords( - args, kwargs, "s:gtk.color_selection_palette_from_string", - kwlist, &str)) - return NULL; - - if (!gtk_color_selection_palette_from_string(str, &colors, &n_colors)) { - Py_INCREF(Py_None); - return Py_None; - } - - if ((py_list = PyList_New(n_colors)) == NULL) { - g_free(colors); - return NULL; - } - - for (i = 0; i < n_colors; i++) { - PyObject *item = pyg_boxed_new(GDK_TYPE_COLOR, &colors[i], TRUE, TRUE); - - PyList_SetItem(py_list, i, item); - } - g_free(colors); - - return py_list; -} -%% -override gtk_color_selection_palette_to_string kwargs -static PyObject * -_wrap_gtk_color_selection_palette_to_string(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "colors", NULL }; - gchar *str; - GdkColor *colors; - gint i, n_colors; - PyObject *py_colors, *ret; - - if (!PyArg_ParseTupleAndKeywords( - args, kwargs, "O:gtk.color_selection_palette_to_string", - kwlist, &py_colors)) - return NULL; - - if (!(py_colors = PySequence_Fast( - py_colors, "colors must be a sequence of gtk.gdk.Colors"))) - return NULL; - - n_colors = PySequence_Fast_GET_SIZE(py_colors); - if ((colors = g_new0(GdkColor, n_colors)) == NULL) { - Py_DECREF(py_colors); - return NULL; - } - for (i = 0; i < n_colors; i++) { - PyObject *item = PySequence_Fast_GET_ITEM(py_colors, i); - if (!pyg_boxed_check(item, GDK_TYPE_COLOR)) { - PyErr_SetString(PyExc_TypeError, - "colors must contain gtk.gdk.Colors"); - g_free(colors); - Py_DECREF(py_colors); - return NULL; - } - colors[i] = *pyg_boxed_get(item, GdkColor); - } - - str = gtk_color_selection_palette_to_string(colors, n_colors); - ret = PyString_FromString(str); - g_free(colors); - g_free(str); - Py_DECREF(py_colors); - - return ret; -} - -%% -override gtk_binding_entry_remove kwargs -static PyObject * -_wrap_gtk_binding_entry_remove(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "class_type", "keyval", "modifiers", NULL }; - int keyval; - PyObject *py_modifiers = NULL; - GdkModifierType modifiers; - PyObject *class; - GType class_type; - GtkBindingSet *bset = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OiO:gtk_binding_entry_remove", - kwlist, &class, &keyval, &py_modifiers)) - return NULL; - if (pyg_flags_get_value(GDK_TYPE_MODIFIER_TYPE, py_modifiers, (gint *)&modifiers)) - return NULL; - - class_type = pyg_type_from_object(class); - if (class_type == 0) - return NULL; - - bset = gtk_binding_set_by_class(gtk_type_class(class_type)); - gtk_binding_entry_remove(bset, keyval, modifiers); - Py_INCREF(Py_None); - return Py_None; -} - -%% -define GtkAccelGroup.connect_group kwargs -static PyObject * -_wrap_gtk_accel_group_connect_group(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "accel_key", "accel_mods", "accel_flags", "callback", NULL }; - int accel_key; - PyObject *py_accel_mods = NULL, *py_accel_flags = NULL, *py_callback; - GdkModifierType accel_mods; - GtkAccelFlags accel_flags; - GClosure *closure; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iOOO:GtkAccelGroup.connect", kwlist, - &accel_key, &py_accel_mods, &py_accel_flags, - &py_callback)) - return NULL; - if (!PyCallable_Check(py_callback)) { - PyErr_SetString(PyExc_TypeError, "callback argument not callable"); - return NULL; - } - if (pyg_flags_get_value(GDK_TYPE_MODIFIER_TYPE, py_accel_mods, (gint *)&accel_mods)) - return NULL; - if (pyg_flags_get_value(GTK_TYPE_ACCEL_FLAGS, py_accel_flags, (gint *)&accel_flags)) - return NULL; - closure = pyg_closure_new(py_callback, NULL, NULL); - pygobject_watch_closure((PyObject *)self, closure); - gtk_accel_group_connect(GTK_ACCEL_GROUP(self->obj), accel_key, - accel_mods, accel_flags, closure); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_file_chooser_dialog_new kwargs -static int -_wrap_gtk_file_chooser_dialog_new(PyGObject *self, - PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "title", "parent", "action", "buttons", "backend", NULL }; - gchar *title = NULL; - PyGObject *py_window = NULL; - PyObject *py_buttons = Py_None; - PyObject *py_action = NULL; - GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_OPEN; - GtkWindow *parent = NULL; - gchar *backend = NULL; - int len, i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|zOOOz:GtkFileChooserDialog.__init__", kwlist, - &title, &py_window, &py_action, - &py_buttons, - &backend)) - return -1; - - if (py_window == NULL || (PyObject*)py_window == Py_None) - parent = NULL; - else if (pygobject_check(py_window, &PyGtkWindow_Type)) - parent = GTK_WINDOW(py_window->obj); - else { - PyErr_SetString(PyExc_TypeError, "parent must be a GtkWindow or None"); - return -1; - } - - if (pyg_enum_get_value(GTK_TYPE_FILE_CHOOSER_ACTION, py_action, - (gint *)&action)) - return -1; - if (py_buttons == Py_None) - len = 0; - else if (PyTuple_Check(py_buttons)) - len = PyTuple_Size(py_buttons); - else { - PyErr_SetString(PyExc_TypeError, "buttons must be a tuple containing text/response pairs or None"); - return -1; - } - - if (len % 2) { - PyErr_SetString(PyExc_RuntimeError, - "buttons tuple must contain text/response id pairs"); - return -1; - } - - pygobject_construct(self, - "title", title, - "action", action, - "file-system-backend", backend, - NULL); - - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkFileChooserDialog object"); - return -1; - } - - if (parent) - gtk_window_set_transient_for (GTK_WINDOW (self->obj), parent); - - for (i = 0; i < len; i += 2) { - PyObject *text = PyTuple_GetItem(py_buttons, i); - PyObject *id = PyTuple_GetItem(py_buttons, i + 1); - if (!PyString_Check(text)) { - gtk_object_destroy(GTK_OBJECT(self->obj)); - self->obj = NULL; - PyErr_SetString(PyExc_RuntimeError, - "first member of each text/response id pair " - "must be a string"); - return -1; - } - if (!PyInt_Check(id)) { - gtk_object_destroy(GTK_OBJECT(self->obj)); - self->obj = NULL; - PyErr_SetString(PyExc_RuntimeError, - "second member of each text/response id pair " - "must be a number"); - return -1; - } - gtk_dialog_add_button(GTK_DIALOG(self->obj), PyString_AsString(text), - PyInt_AsLong(id)); - } - g_object_ref(self->obj); /* we don't own the first reference of windows */ - - return 0; -} -%% -new-constructor GTK_TYPE_FILE_CHOOSER_DIALOG -%% -override gtk_ui_manager_get_action_groups noargs -static PyObject * -_wrap_gtk_ui_manager_get_action_groups(PyGObject *self) -{ - GList *list, *tmp; - PyObject *ret; - - list = gtk_ui_manager_get_action_groups(GTK_UI_MANAGER(self->obj)); - - ret = PyList_New(0); - for (tmp = list; tmp != NULL; tmp = tmp->next) { - PyObject *item = pygobject_new(G_OBJECT(tmp->data)); - - PyList_Append(ret, item); - Py_DECREF(item); - } - - return ret; -} -%% -override gtk_ui_manager_get_toplevels kwargs -static PyObject * -_wrap_gtk_ui_manager_get_toplevels(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "types", NULL }; - GtkUIManagerItemType types; - PyObject *py_types = NULL; - GSList *list, *tmp; - PyObject *ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkUIManager.get_toplevels", kwlist, - &py_types)) - return NULL; - - if (pyg_flags_get_value(GTK_TYPE_UI_MANAGER_ITEM_TYPE, py_types, (gint *)&types)) - return NULL; - - list = gtk_ui_manager_get_toplevels(GTK_UI_MANAGER(self->obj), types); - - ret = PyList_New(0); - for (tmp = list; tmp; tmp = tmp->next) { - PyObject *item = pygobject_new(G_OBJECT(tmp->data)); - - PyList_Append(ret, item); - Py_DECREF(item); - } - - return ret; -} -%% -override gtk_action_group_add_actions kwargs -static PyObject * -_wrap_gtk_action_group_add_actions (PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "entries", "user_data", NULL }; - PyGILState_STATE state; - PyObject *entries, *extra_args = NULL; - int len, i; - PyObject *item; - GtkActionEntry entry; - GtkAction *action; - PyObject *callback, *py_action; - GClosure *closure; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:GtkActionGroup.add_actions", - kwlist, &entries, &extra_args)) - return NULL; - - if (!PySequence_Check(entries)) { - PyErr_SetString(PyExc_TypeError, "entries must be a sequence"); - return NULL; - } - - state = pyg_gil_state_ensure(); - - len = PySequence_Size(entries); - for (i = 0; i < len; i++) { - item = PySequence_GetItem(entries, i); - Py_DECREF(item); - - memset(&entry, 0, sizeof(entry)); - callback = Py_None; - - if (!PyArg_ParseTuple(item, "s|zzzzO", &(entry.name), &(entry.stock_id), - &(entry.label), &(entry.accelerator), &(entry.tooltip), - &callback)) { - return NULL; - } - - action = gtk_action_new(entry.name, entry.label, entry.tooltip, - entry.stock_id); - if (action == NULL) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkAction object"); - return NULL; - } - - py_action = pygobject_new((GObject *)action); - if (callback != Py_None) { - if (PyCallable_Check(callback)) { - closure = pyg_closure_new(callback, extra_args, NULL); - g_signal_connect_closure(action, "activate", closure, FALSE); - pygobject_watch_closure(py_action, closure); - } else { - PyErr_SetString(PyExc_TypeError, - "One or more entry is missing a callback type"); - g_object_unref (action); - Py_DECREF (py_action); - return NULL; - } - } - - gtk_action_group_add_action_with_accel (GTK_ACTION_GROUP(self->obj), - GTK_ACTION(action), - entry.accelerator); - - g_object_unref(action); - Py_DECREF (py_action); - } - - pyg_gil_state_release(state); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_action_group_add_toggle_actions kwargs -static PyObject * -_wrap_gtk_action_group_add_toggle_actions (PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "entries", "user_data", NULL }; - PyGILState_STATE state; - PyObject *entries, *extra_args = NULL; - int len, i; - PyObject *item; - GtkToggleActionEntry entry; - GtkToggleAction *action; - PyObject *callback, *py_action; - GClosure *closure; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:GtkActionGroup.add_toggle_actions", - kwlist, &entries, &extra_args)) - return NULL; - - if (!PySequence_Check(entries)) { - PyErr_SetString(PyExc_TypeError, "entries must be a sequence"); - return NULL; - } - - state = pyg_gil_state_ensure(); - - len = PySequence_Size(entries); - for (i = 0; i < len; i++) { - item = PySequence_GetItem(entries, i); - Py_DECREF(item); - - memset(&entry, 0, sizeof(entry)); - callback = Py_None; - - if (!PyArg_ParseTuple(item, "s|zzzzOi", &(entry.name), &(entry.stock_id), - &(entry.label), &(entry.accelerator), &(entry.tooltip), - &callback, &(entry.is_active))) { - return NULL; - } - - action = gtk_toggle_action_new(entry.name, entry.label, entry.tooltip, - entry.stock_id); - if (action == NULL) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkToggleAction object"); - return NULL; - } - - gtk_toggle_action_set_active(action, entry.is_active); - py_action = pygobject_new((GObject *)action); - if (callback != Py_None && PyCallable_Check(callback)) { - closure = pyg_closure_new(callback, extra_args, NULL); - g_signal_connect_closure(action, "activate", closure, FALSE); - pygobject_watch_closure(py_action, closure); - } - - gtk_action_group_add_action_with_accel (GTK_ACTION_GROUP(self->obj), - GTK_ACTION(action), - entry.accelerator); - - g_object_unref (action); - Py_DECREF (py_action); - } - - pyg_gil_state_release(state); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_action_group_add_radio_actions kwargs -static PyObject * -_wrap_gtk_action_group_add_radio_actions (PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "entries", "value", "on_change", "user_data", NULL }; - PyGILState_STATE state; - PyObject *entries, *extra_args = NULL; - int len, i; - PyObject *item; - GtkRadioActionEntry entry; - GtkRadioAction *action, *first_action = NULL; - PyObject *callback = Py_None; - GClosure *closure; - GSList * group = NULL; - gint value = 0; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|iOO:GtkActionGroup.add_radio_actions", - kwlist, &entries, &value, &callback, &extra_args)) - return NULL; - - if (!PySequence_Check(entries)) { - PyErr_SetString(PyExc_TypeError, "entries must be a sequence"); - return NULL; - } - - state = pyg_gil_state_ensure(); - - len = PySequence_Size(entries); - for (i = 0; i < len; i++) { - item = PySequence_GetItem(entries, i); - Py_DECREF(item); - - memset(&entry, 0, sizeof(entry)); - - if (!PyArg_ParseTuple(item, "s|zzzzi", &(entry.name), - &(entry.stock_id), - &(entry.label), &(entry.accelerator), - &(entry.tooltip), - &(entry.value))) { - return NULL; - } - - action = gtk_radio_action_new(entry.name, entry.label, entry.tooltip, - entry.stock_id, entry.value); - if (action == NULL) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkRadioAction object"); - return NULL; - } - - gtk_radio_action_set_group(action, group); - group = gtk_radio_action_get_group(action); - - if (value == entry.value) - gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), TRUE); - - gtk_action_group_add_action_with_accel (GTK_ACTION_GROUP(self->obj), - GTK_ACTION(action), - entry.accelerator); - - if (i == 0) - first_action = action; - else - g_object_unref (action); - } - - if (first_action && callback != Py_None && PyCallable_Check(callback)) { - PyObject *py_action; - - closure = pyg_closure_new(callback, extra_args, NULL); - g_signal_connect_closure(first_action, "changed", closure, FALSE); - py_action = pygobject_new((GObject *)first_action); - pygobject_watch_closure(py_action, closure); - g_object_unref(first_action); - Py_DECREF (py_action); - } - - pyg_gil_state_release(state); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_ui_manager_add_ui_from_string kwargs -static PyObject * -_wrap_gtk_ui_manager_add_ui_from_string(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "buffer", NULL }; - char *buffer; - Py_ssize_t length; - int ret; - GError *error = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#:GtkUIManager.add_ui_from_string", - kwlist, &buffer, &length)) - return NULL; - - ret = gtk_ui_manager_add_ui_from_string(GTK_UI_MANAGER(self->obj), - buffer, length, &error); - if (pyg_error_check(&error)) - return NULL; - return PyInt_FromLong(ret); -} -%% -override gtk_action_group_list_actions noargs -static PyObject * -_wrap_gtk_action_group_list_actions(PyGObject *self) -{ - GList *l, *actions; - PyObject *item, *ret; - - ret = PyList_New(0); - if (ret == NULL) - return NULL; - - actions = gtk_action_group_list_actions(GTK_ACTION_GROUP(self->obj)); - - for (l = actions; l; l = l->next) { - item = pygobject_new((GObject *) GTK_ACTION(l->data)); - - if (!item) { - Py_DECREF(ret); - return NULL; - } - - PyList_Append(ret, item); - Py_DECREF(item); - } - - g_list_free(actions); - - return ret; -} -%% -override gtk_alignment_get_padding noargs -static PyObject * -_wrap_gtk_alignment_get_padding(PyGObject *self) -{ - guint top, bottom, left, right; - - gtk_alignment_get_padding(GTK_ALIGNMENT(self->obj), &top, &bottom, &left, - &right); - return Py_BuildValue("(iiii)", top, bottom, left, right); -} -%% -override gtk_accel_group_connect_by_path kwargs -static PyObject * -_wrap_gtk_accel_group_connect_by_path(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "accel_path", "callback", NULL }; - gchar *accel_path; - PyObject *py_callback; - GClosure *closure; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "sO:GtkAccelGroup.connect_by_path", kwlist, - &accel_path, &py_callback)) - return NULL; - if (!PyCallable_Check(py_callback)) { - PyErr_SetString(PyExc_TypeError, "callback argument not callable"); - return NULL; - } - closure = pyg_closure_new(py_callback, NULL, NULL); - pygobject_watch_closure((PyObject *)self, closure); - gtk_accel_group_connect_by_path(GTK_ACCEL_GROUP(self->obj), accel_path, - closure); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_color_button_new kwargs -static int -_wrap_gtk_color_button_new(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "color", NULL }; - GdkColor *color = NULL; - PyObject *pycolor = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|O:GtkColorButton.__init__", - kwlist, &pycolor)) - return -1; - if (pycolor) { - if (!pyg_boxed_check(pycolor, GDK_TYPE_COLOR)) { - PyErr_SetString(PyExc_TypeError, - "color should be a gtk.gdk.Color"); - return -1; - } - color = pyg_boxed_get(pycolor, GdkColor); - pygobject_construct(self, "color", color, NULL); - } else { - pygobject_construct(self, NULL); - } - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, "could not create GtkColorButton object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_COLOR_BUTTON -%% -override gtk_color_button_get_color noargs -static PyObject * -_wrap_gtk_color_button_get_color(PyGObject *self) -{ - GdkColor color = {0, 0, 0, 0}; - - gtk_color_button_get_color(GTK_COLOR_BUTTON(self->obj), &color); - return pyg_boxed_new(GDK_TYPE_COLOR, &color, TRUE, TRUE); -} -%% -override gtk_combo_box_new kwargs -static int -_wrap_gtk_combo_box_new(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "model", NULL }; - PyGObject *pymodel = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:GtkComboBox.__init__", - kwlist, &pymodel)) - return -1; - if (pymodel == NULL || (PyObject *)pymodel == Py_None) - pygobject_construct(self, NULL); - else if (pygobject_check(pymodel, &PyGtkTreeModel_Type)) - pygobject_construct(self, "model", GTK_TREE_MODEL(pymodel->obj), NULL); - else { - PyErr_SetString(PyExc_TypeError, - "model must be a gtk.TreeModel or None"); - return -1; - } - - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkComboBox object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_COMBO_BOX -%% -override gtk_combo_box_get_active_iter noargs -static PyObject * -_wrap_gtk_combo_box_get_active_iter(PyGObject *self) -{ - GtkTreeIter iter; - gboolean ret; - - ret = gtk_combo_box_get_active_iter(GTK_COMBO_BOX(self->obj), &iter); - - if (ret) - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_cell_layout_set_attributes kwargs -static PyObject * -_wrap_gtk_cell_layout_set_attributes(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - PyObject *py_cell, *key, *item; - GtkCellRenderer *cell; - Py_ssize_t i = 0; - - if (!PyArg_ParseTuple(args, "O!:GtkCellLayout.set_attributes", - &PyGtkCellRenderer_Type, &py_cell)) - return NULL; - cell = GTK_CELL_RENDERER(pygobject_get(py_cell)); - gtk_cell_layout_clear_attributes(GTK_CELL_LAYOUT(self->obj), cell); - if (kwargs) { - while (PyDict_Next(kwargs, &i, &key, &item)) { - gchar *attr = PyString_AsString(key); - - if (!PyInt_Check(item)) { - gchar err[128]; - g_snprintf(err, sizeof(err), - "%s must be an integer column number", attr); - PyErr_SetString(PyExc_TypeError, err); - return NULL; - } - gtk_cell_layout_add_attribute(GTK_CELL_LAYOUT(self->obj), - cell, attr, PyInt_AsLong(item)); - } - } - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_combo_box_entry_new kwargs -static int -_wrap_gtk_combo_box_entry_new(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "model", "column", NULL }; - PyGObject *pymodel = NULL; - gint column = 0; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|Oi:GtkComboBoxEntry.__init__", - kwlist, &pymodel, &column)) - return -1; - if ((PyObject*)pymodel == Py_None || pymodel == NULL) - pygobject_construct(self, NULL); - else if (pygobject_check(pymodel, &PyGtkTreeModel_Type)) { - gint ncol = gtk_tree_model_get_n_columns(GTK_TREE_MODEL(pymodel->obj)); - - if (column < 0 || column >= ncol) { - PyErr_SetString(PyExc_ValueError, "column value out of range"); - return -1; - } - pygobject_construct(self, "model", GTK_TREE_MODEL(pymodel->obj), - "text-column", column, NULL); - } else { - PyErr_SetString(PyExc_TypeError, - "model must be a gtk.TreeModel or None"); - return -1; - } - - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkComboBoxEntry object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_COMBO_BOX_ENTRY -%% -override gtk_entry_completion_set_match_func args -static gboolean -pygtk_entry_completion_match_func_cb(GtkEntryCompletion *completion, - const gchar *key, - GtkTreeIter *iter, - gpointer user_data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = user_data; - PyObject *py_completion, *py_iter; - gboolean ret = FALSE; - PyObject *retobj; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - py_completion = pygobject_new((GObject *)completion); - py_iter = pyg_boxed_new(GTK_TYPE_TREE_ITER, iter, TRUE, TRUE); - - if (cunote->data) { - retobj = PyEval_CallFunction(cunote->func, "(NsNO)", py_completion, - key, py_iter, cunote->data); - } else { - retobj = PyEval_CallFunction(cunote->func, "(NsN)", py_completion, - key, py_iter); - } - - if (retobj != NULL) { - ret = PyObject_IsTrue(retobj); - Py_DECREF(retobj); - } else { - PyErr_Print(); - } - - pyg_gil_state_release(state); - return ret; -} -static PyObject * -_wrap_gtk_entry_completion_set_match_func(PyGObject *self, PyObject *args) -{ - PyObject *pyfunc, *pyarg = NULL; - PyGtkCustomNotify *cunote; - - if (!PyArg_ParseTuple(args, - "O|O:GtkEntryCompletion.set_match_func", - &pyfunc, &pyarg)) - return NULL; - - if (!PyCallable_Check(pyfunc)) { - PyErr_SetString(PyExc_TypeError, "func must be a callable object"); - return NULL; - } - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = pyfunc; - cunote->data = pyarg; - Py_INCREF(cunote->func); - Py_XINCREF(cunote->data); - - gtk_entry_completion_set_match_func(GTK_ENTRY_COMPLETION(self->obj), - pygtk_entry_completion_match_func_cb, - cunote, pygtk_custom_destroy_notify); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_file_chooser_get_filenames noargs -static PyObject * -_wrap_gtk_file_chooser_get_filenames(PyGObject *self) -{ - PyObject *py_list; - GSList *slist, *tmp; - int i, slen; - - slist = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(self->obj)); - slen = g_slist_length(slist); - if ((py_list = PyList_New(slen)) == NULL) - return NULL; - - for (i = 0, tmp = slist; i < slen && tmp != NULL; tmp = tmp->next, i++) { - PyObject *obj = PyString_FromString((char *)tmp->data); - if (obj == NULL) { - g_slist_foreach(slist, (GFunc)g_free, NULL); - g_slist_free(slist); - Py_DECREF(py_list); - return NULL; - } - PyList_SetItem(py_list, i, obj); - } - g_slist_foreach(slist, (GFunc)g_free, NULL); - g_slist_free(slist); - return py_list; -} -%% -override gtk_file_chooser_get_uris noargs -static PyObject * -_wrap_gtk_file_chooser_get_uris(PyGObject *self) -{ - PyObject *py_list; - GSList *slist, *tmp; - int i, slen; - - slist = gtk_file_chooser_get_uris(GTK_FILE_CHOOSER(self->obj)); - slen = g_slist_length(slist); - if ((py_list = PyList_New(slen)) == NULL) - return NULL; - - for (i = 0, tmp = slist; i < slen && tmp != NULL; tmp = tmp->next, i++) { - PyObject *obj = PyString_FromString((char *)tmp->data); - if (obj == NULL) { - g_slist_foreach(slist, (GFunc)g_free, NULL); - g_slist_free(slist); - Py_DECREF(py_list); - return NULL; - } - PyList_SetItem(py_list, i, obj); - } - g_slist_foreach(slist, (GFunc)g_free, NULL); - g_slist_free(slist); - return py_list; -} -%% -override gtk_file_chooser_list_filters noargs -static PyObject * -_wrap_gtk_file_chooser_list_filters(PyGObject *self) -{ - PyObject *py_list; - GSList *slist, *tmp; - int i, slen; - - slist = gtk_file_chooser_list_filters(GTK_FILE_CHOOSER(self->obj)); - slen = g_slist_length(slist); - if ((py_list = PyList_New(slen)) == NULL) - return NULL; - - for (i = 0, tmp = slist; i < slen && tmp != NULL; tmp = tmp->next, i++) { - PyObject *obj = pygobject_new(G_OBJECT(tmp->data)); - if (obj == NULL) { - g_slist_free(slist); - Py_DECREF(py_list); - return NULL; - } - PyList_SetItem(py_list, i, obj); - } - g_slist_free(slist); - return py_list; -} -%% -override gtk_file_chooser_list_shortcut_folder_uris noargs -static PyObject * -_wrap_gtk_file_chooser_list_shortcut_folder_uris(PyGObject *self) -{ - PyObject *py_list; - GSList *slist, *tmp; - int i, slen; - - slist = gtk_file_chooser_list_shortcut_folder_uris(GTK_FILE_CHOOSER(self->obj)); - - slen = g_slist_length(slist); - if ((py_list = PyList_New(slen)) == NULL) - return NULL; - - for (i = 0, tmp = slist; i < slen && tmp != NULL; tmp = tmp->next, i++) { - PyObject *obj = PyString_FromString((char *)tmp->data); - if (obj == NULL) { - g_slist_foreach(slist, (GFunc)g_free, NULL); - g_slist_free(slist); - Py_DECREF(py_list); - return NULL; - } - PyList_SetItem(py_list, i, obj); - } - g_slist_foreach(slist, (GFunc)g_free, NULL); - g_slist_free(slist); - return py_list; -} -%% -override gtk_file_chooser_list_shortcut_folders noargs -static PyObject * -_wrap_gtk_file_chooser_list_shortcut_folders(PyGObject *self) -{ - PyObject *py_list; - GSList *slist, *tmp; - int i, slen; - - slist = gtk_file_chooser_list_shortcut_folders(GTK_FILE_CHOOSER(self->obj)); - slen = g_slist_length(slist); - if ((py_list = PyList_New(slen)) == NULL) - return NULL; - - for (i = 0, tmp = slist; i < slen && tmp != NULL; tmp = tmp->next, i++) { - PyObject *obj = PyString_FromString((char *)tmp->data); - if (obj == NULL) { - g_slist_foreach(slist, (GFunc)g_free, NULL); - g_slist_free(slist); - Py_DECREF(py_list); - return NULL; - } - PyList_SetItem(py_list, i, obj); - } - g_slist_foreach(slist, (GFunc)g_free, NULL); - g_slist_free(slist); - return py_list; -} -%% -override gtk_file_chooser_widget_new kwargs -static int -_wrap_gtk_file_chooser_widget_new(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "action", "backend", NULL }; - PyObject *py_action = NULL; - gchar * backend = NULL; - GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_OPEN; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|Oz:GtkFileChooserWidget.__init__", - kwlist, &py_action, &backend)) - return -1; - if (py_action && pyg_enum_get_value(GTK_TYPE_FILE_CHOOSER_ACTION, - py_action, (gint *)&action)) - return -1; - pygobject_construct(self, - "action", action, "file-system-backend", backend, - NULL); - - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkFileChooserWidget object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_FILE_CHOOSER_WIDGET -%% -override gtk_file_filter_filter kwargs -static PyObject * -_wrap_gtk_file_filter_filter(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "filter_info", NULL }; - GtkFileFilterInfo filter_info = { 0, NULL, NULL, NULL, NULL }; - PyObject *py_filter_info, *obj; - PyObject *pyret = Py_False; - int size; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!:GtkFileFilter.filter", kwlist, - &PyTuple_Type, &py_filter_info)) - return NULL; - - size = PyTuple_Size(py_filter_info); - if (size != 4) { - PyErr_SetString(PyExc_RuntimeError, - "filter_info tuple must contain 4 items" - " each of type string or None"); - return NULL; - } - - if ((obj = PyTuple_GetItem(py_filter_info, 0)) != Py_None) { - if (!PyString_Check(obj)) - goto error; - filter_info.filename = PyString_AsString(obj); - filter_info.contains |= GTK_FILE_FILTER_FILENAME; - } - if ((obj = PyTuple_GetItem(py_filter_info, 1)) != Py_None) { - if (!PyString_Check(obj)) - goto error; - filter_info.uri = PyString_AsString(obj); - filter_info.contains |= GTK_FILE_FILTER_URI; - } - if ((obj = PyTuple_GetItem(py_filter_info, 2)) != Py_None) { - if (!PyString_Check(obj)) - goto error; - filter_info.display_name = PyString_AsString(obj); - filter_info.contains |= GTK_FILE_FILTER_DISPLAY_NAME; - } - if ((obj = PyTuple_GetItem(py_filter_info, 3)) != Py_None) { - if (!PyString_Check(obj)) - goto error; - filter_info.mime_type = PyString_AsString(obj); - filter_info.contains |= GTK_FILE_FILTER_MIME_TYPE; - } - - if (gtk_file_filter_filter(GTK_FILE_FILTER(self->obj), &filter_info)) - pyret = Py_True; - Py_INCREF(pyret); - return pyret; - - error: - PyErr_SetString(PyExc_TypeError, "filter_info 4-tuple items" - " must be of type string or None"); - return NULL; -} -%% -override gtk_file_filter_add_custom args -static gboolean -pygtk_file_filter_add_custom_cb(const GtkFileFilterInfo *filter_info, - gpointer user_data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = user_data; - gboolean ret = FALSE; - PyObject *retobj, *py_filter_info, *py_obj; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - py_filter_info = PyTuple_New(4); - - if (filter_info->filename - && (filter_info->contains & GTK_FILE_FILTER_FILENAME)) { - py_obj = PyString_FromString(filter_info->filename); - } else { - Py_INCREF(Py_None); - py_obj = Py_None; - } - PyTuple_SetItem(py_filter_info, 0, py_obj); - if (filter_info->uri - && (filter_info->contains & GTK_FILE_FILTER_URI)) { - py_obj = PyString_FromString(filter_info->uri); - } else { - Py_INCREF(Py_None); - py_obj = Py_None; - } - PyTuple_SetItem(py_filter_info, 1, py_obj); - if (filter_info->display_name - && (filter_info->contains & GTK_FILE_FILTER_DISPLAY_NAME)) { - py_obj = PyString_FromString(filter_info->display_name); - } else { - Py_INCREF(Py_None); - py_obj = Py_None; - } - PyTuple_SetItem(py_filter_info, 2, py_obj); - if (filter_info->mime_type - && (filter_info->contains & GTK_FILE_FILTER_MIME_TYPE)) { - py_obj = PyString_FromString(filter_info->mime_type); - } else { - Py_INCREF(Py_None); - py_obj = Py_None; - } - PyTuple_SetItem(py_filter_info, 3, py_obj); - - if (cunote->data) { - retobj = PyEval_CallFunction(cunote->func, "(NO)", py_filter_info, - cunote->data); - } else { - retobj = PyEval_CallFunction(cunote->func, "(N)", py_filter_info); - } - - if (retobj != NULL) { - ret = PyObject_IsTrue(retobj); - Py_DECREF(retobj); - } else { - PyErr_Print(); - } - - pyg_gil_state_release(state); - return ret; -} -static PyObject * -_wrap_gtk_file_filter_add_custom(PyGObject *self, PyObject *args) -{ - PyObject *pyfunc, *pyflags, *pyarg = NULL; - PyGtkCustomNotify *cunote; - GtkFileFilterFlags flags; - - if (!PyArg_ParseTuple(args, - "OO|O:GtkEntryCompletion.set_match_func", - &pyflags, &pyfunc, &pyarg)) - return NULL; - - if (pyg_flags_get_value(GTK_TYPE_FILE_FILTER_FLAGS, pyflags, - (gint *)&flags)) - return NULL; - - if (!PyCallable_Check(pyfunc)) { - PyErr_SetString(PyExc_TypeError, "func must be a callable object"); - return NULL; - } - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = pyfunc; - cunote->data = pyarg; - Py_INCREF(cunote->func); - Py_XINCREF(cunote->data); - - gtk_file_filter_add_custom(GTK_FILE_FILTER(self->obj), flags, - pygtk_file_filter_add_custom_cb, - cunote, pygtk_custom_destroy_notify); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_font_button_new kwargs -static int -_wrap_gtk_font_button_new(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "fontname", NULL }; - gchar * fontname = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|z:GtkFontButton.__init__", - kwlist, &fontname)) - return -1; - - if (fontname == NULL) - pygobject_construct(self, NULL); - else - pygobject_construct(self, "font-name", fontname, NULL); - - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkFontButton object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_FONT_BUTTON -%% -override gtk_action_get_proxies noargs -static PyObject * -_wrap_gtk_action_get_proxies(PyGObject *self) -{ - PyObject *py_list; - GSList *slist, *tmp; - int i, slen; - - slist = gtk_action_get_proxies(GTK_ACTION(self->obj)); - slen = g_slist_length(slist); - if ((py_list = PyList_New(slen)) == NULL) - return NULL; - - for (i = 0, tmp = slist; i < slen && tmp != NULL; tmp = tmp->next, i++) { - PyObject *obj = pygobject_new(G_OBJECT(tmp->data)); - if (obj == NULL) { - Py_DECREF(py_list); - return NULL; - } - PyList_SetItem(py_list, i, obj); - } - return py_list; -} -%% -override gtk_clipboard_wait_for_targets noargs -static PyObject * -_wrap_gtk_clipboard_wait_for_targets(PyGObject *self) -{ - GtkSelectionData *data; - - /* have to work around GTK+ bug #139883 */ - data = gtk_clipboard_wait_for_contents(GTK_CLIPBOARD(self->obj), - gdk_atom_intern("TARGETS", FALSE)); - - if (data) { - gint n_targets = 0; - GdkAtom *targets = NULL; - - if (gtk_selection_data_get_targets(data, &targets, &n_targets)) { - PyObject *ret; - int i; - - ret = PyTuple_New(n_targets); - for (i = 0; i < n_targets; i++) { - gchar *name; - - name = gdk_atom_name(targets[i]); - PyTuple_SetItem(ret, i, PyString_FromString(name)); - g_free(name); - } - g_free(targets); - gtk_selection_data_free(data); - return ret; - } - gtk_selection_data_free(data); - } - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_clipboard_request_contents kwargs -static void -clipboard_request_contents_cb(GtkClipboard *clipboard, - GtkSelectionData *selection_data, - gpointer user_data) -{ - PyGILState_STATE state; - PyObject *callback, *args, *ret; - - state = pyg_gil_state_ensure(); - callback = PyTuple_GetItem((PyObject *)user_data, 0); - args = Py_BuildValue("(NNO)", - pygobject_new((GObject *)clipboard), - pyg_boxed_new(GTK_TYPE_SELECTION_DATA, - selection_data, TRUE, TRUE), - PyTuple_GetItem((PyObject *)user_data, 1)); - ret = PyObject_CallObject(callback, args); - if (!ret) - PyErr_Print(); - Py_XDECREF(ret); - Py_DECREF(args); - Py_DECREF((PyObject *)user_data); - pyg_gil_state_release(state); -} -static PyObject * -_wrap_gtk_clipboard_request_contents(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "target", "callback", "user_data", NULL }; - PyObject *py_target, *callback, *data, *user_data = Py_None; - GdkAtom target; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OO|O:GtkClipboard.request_contents", - kwlist, &py_target, &callback, - &user_data)) - return NULL; - if (!PyCallable_Check(callback)) { - PyErr_SetString(PyExc_TypeError, "callback must be callable"); - return NULL; - } - target = pygdk_atom_from_pyobject(py_target); - if (PyErr_Occurred()) - return NULL; - - data = Py_BuildValue("(OO)", callback, user_data); - gtk_clipboard_request_contents(GTK_CLIPBOARD(self->obj), target, - clipboard_request_contents_cb, - (gpointer)data); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_clipboard_request_text kwargs -static void -clipboard_request_text_cb(GtkClipboard *clipboard, - const gchar *text, - gpointer user_data) -{ - PyGILState_STATE state; - PyObject *callback, *args, *ret, *py_text, *data; - - data = (PyObject *) user_data; - - if (text) { - py_text = PyString_FromString(text); - } else { - py_text = Py_None; - Py_INCREF(Py_None); - } - - state = pyg_gil_state_ensure(); - callback = PyTuple_GetItem(data, 0); - args = Py_BuildValue("(NNO)", - pygobject_new((GObject *)clipboard), - py_text, - PyTuple_GetItem(data, 1)); - ret = PyObject_CallObject(callback, args); - if (!ret) - PyErr_Print(); - Py_XDECREF(ret); - Py_DECREF(data); - Py_DECREF(args); - pyg_gil_state_release(state); -} - -static PyObject * -_wrap_gtk_clipboard_request_text(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "callback", "user_data", NULL }; - PyObject *callback, *data, *user_data = Py_None; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:GtkClipboard.request_text", - kwlist, &callback, &user_data)) - return NULL; - if (!PyCallable_Check(callback)) { - PyErr_SetString(PyExc_TypeError, "callback must be callable"); - return NULL; - } - - data = Py_BuildValue("(OO)", callback, user_data); - gtk_clipboard_request_text(GTK_CLIPBOARD(self->obj), - clipboard_request_text_cb, - (gpointer)data); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_clipboard_request_targets kwargs -static void -clipboard_request_targets_cb(GtkClipboard *clipboard, - GdkAtom *atoms, - gint n_atoms, - gpointer user_data) -{ - PyGILState_STATE state; - PyObject *callback, *args, *ret, *py_atoms; - int i; - - state = pyg_gil_state_ensure(); - callback = PyTuple_GetItem((PyObject *)user_data, 0); - if (atoms) { - py_atoms = PyTuple_New(n_atoms); - for (i = 0; i < n_atoms; i++) { - gchar *name; - - name = gdk_atom_name(atoms[i]); - PyTuple_SetItem(py_atoms, i, PyString_FromString(name)); - g_free(name); - } - } else - py_atoms = PyTuple_New(0); - args = Py_BuildValue("(NNO)", - pygobject_new((GObject *)clipboard), - py_atoms, - PyTuple_GetItem((PyObject *)user_data, 1)); - ret = PyObject_CallObject(callback, args); - if (!ret) - PyErr_Print(); - Py_XDECREF(ret); - Py_DECREF(args); - Py_DECREF((PyObject *)user_data); - pyg_gil_state_release(state); -} -static PyObject * -_wrap_gtk_clipboard_request_targets(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "callback", "user_data", NULL }; - PyObject *callback, *data, *user_data = Py_None; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:GtkClipboard.request_targets", - kwlist, &callback, &user_data)) - return NULL; - if (!PyCallable_Check(callback)) { - PyErr_SetString(PyExc_TypeError, "callback must be callable"); - return NULL; - } - - data = Py_BuildValue("(OO)", callback, user_data); - gtk_clipboard_request_targets(GTK_CLIPBOARD(self->obj), - clipboard_request_targets_cb, - (gpointer)data); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_icon_size_lookup_for_settings kwargs -static PyObject * -_wrap_gtk_icon_size_lookup_for_settings(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "settings", "icon_size", NULL }; - PyObject *py_settings, *py_icon_size; - GtkSettings *settings; - GtkIconSize icon_size; - gint width, height; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!O:icon_size_lookupfor settings", - kwlist, &PyGtkSettings_Type, - &py_settings, &py_icon_size)) - return NULL; - - if (pyg_enum_get_value(GTK_TYPE_ICON_SIZE, py_icon_size, - (gint *) &icon_size)) - return NULL; - - settings = GTK_SETTINGS(pygobject_get(py_settings)); - if (gtk_icon_size_lookup_for_settings(settings, icon_size, - &width, &height)) - return Py_BuildValue("(ii)", width, height); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_icon_theme_set_search_path kwargs -static PyObject * -_wrap_gtk_icon_theme_set_search_path(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "path", NULL }; - int i, len; - PyObject *py_seq; - gchar **paths; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs, - "O:GtkIconTheme.set_search_path", - kwlist, &py_seq)) - return NULL; - - if (!PySequence_Check(py_seq) || (len = PySequence_Size(py_seq)) < 0) { - PyErr_SetString(PyExc_ValueError, - "path should be a sequence of strings"); - return NULL; - } - - paths = g_new(gchar *, len); - for (i = 0; i < len; i++) { - PyObject *py_path = PySequence_GetItem(py_seq, i); - if (!PyString_Check(py_path)) { - PyErr_SetString(PyExc_ValueError, "path items must be strings"); - Py_DECREF(py_path); - g_free(paths); - return NULL; - } - paths[i] = PyString_AsString(py_path); - Py_DECREF(py_path); - } - - gtk_icon_theme_set_search_path(GTK_ICON_THEME(self->obj), - (const gchar **)paths, len); - - g_free(paths); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_icon_theme_get_search_path noargs -static PyObject * -_wrap_gtk_icon_theme_get_search_path(PyGObject *self) -{ - gchar **paths; - gint n_items; - PyObject *py_tuple; - int i; - - gtk_icon_theme_get_search_path(GTK_ICON_THEME(self->obj), - &paths, &n_items); - - py_tuple = PyTuple_New(n_items); - for (i = 0; i < n_items; i++) - PyTuple_SetItem(py_tuple, i, PyString_FromString(paths[i])); - - g_strfreev(paths); - - return py_tuple; -} -%% -override gtk_icon_theme_list_icons kwargs -static PyObject * -_wrap_gtk_icon_theme_list_icons(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "context", NULL }; - GList *icons; - gchar *context = NULL; - int i; - guint len; - PyObject *py_icons; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|z:GtkIconTheme.list_icons", - kwlist, &context)) - return NULL; - - icons = gtk_icon_theme_list_icons(GTK_ICON_THEME(self->obj), context); - len = g_list_length(icons); - - py_icons = PyTuple_New(len); - - for (i = 0; i < len; i++) { - char *name = (char *)g_list_nth_data(icons, i); - - PyTuple_SetItem(py_icons, i, PyString_FromString(name)); - } - g_list_foreach(icons, (GFunc)g_free, NULL); - g_list_free(icons); - - return py_icons; -} -%% -override gtk_icon_info_get_embedded_rect noargs -static PyObject * -_wrap_gtk_icon_info_get_embedded_rect(PyGObject *self) -{ - GdkRectangle rect; - int ret; - - ret = gtk_icon_info_get_embedded_rect(pyg_boxed_get(self, GtkIconInfo), - &rect); - - if (ret) - return pyg_boxed_new(GDK_TYPE_RECTANGLE, &rect, TRUE, TRUE); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_icon_info_get_attach_points noargs -static PyObject * -_wrap_gtk_icon_info_get_attach_points(PyGObject *self) -{ - GdkPoint *points; - gint n_points; - int ret; - PyObject *py_points; - - ret = gtk_icon_info_get_attach_points(pyg_boxed_get(self, GtkIconInfo), - &points, &n_points); - if (ret) { - int i; - - py_points = PyTuple_New(n_points); - for (i = 0; i < n_points; i++) - PyTuple_SetItem(py_points, i, Py_BuildValue("(ii)", - points[i].x, - points[i].y)); - g_free(points); - return py_points; - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_radio_action_set_group kwargs -static PyObject * -_wrap_gtk_radio_action_set_group(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "group", NULL }; - GSList *list; - GtkRadioAction *group; - PyObject *py_group; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkRadioAction.set_group", - kwlist, &py_group)) - return NULL; - - if (pygobject_check(py_group, &PyGtkRadioAction_Type)) { - group = GTK_RADIO_ACTION(pygobject_get(py_group)); - list = gtk_radio_action_get_group(group); - if (list == gtk_radio_action_get_group(GTK_RADIO_ACTION(self->obj))) { - PyErr_SetString(PyExc_ValueError, "radio action already in group"); - return NULL; - } - } else if (py_group == Py_None) { - list = NULL; - } else { - PyErr_SetString(PyExc_TypeError, "group must be a RadioAction or None"); - return NULL; - } - - gtk_radio_action_set_group(GTK_RADIO_ACTION(self->obj), list); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_radio_action_get_group noargs -static PyObject * -_wrap_gtk_radio_action_get_group(PyGObject *self) { - PyObject *py_list; - GSList *list, *tmp; - PyObject *gtk_obj; - - list = gtk_radio_action_get_group(GTK_RADIO_ACTION(self->obj)); - - if ((py_list = PyList_New(0)) == NULL) { - return NULL; - } - for (tmp = list; tmp != NULL; tmp = tmp->next) { - gtk_obj = pygobject_new(G_OBJECT(tmp->data)); - if (gtk_obj == NULL) { - Py_DECREF(py_list); - return NULL; - } - PyList_Append(py_list, gtk_obj); - Py_DECREF(gtk_obj); - } - return py_list; -} -%% -override gtk_scale_get_layout_offsets noargs -static PyObject * -_wrap_gtk_scale_get_layout_offsets(PyGObject *self) -{ - gint x = 0, y = 0; - - gtk_scale_get_layout_offsets(GTK_SCALE(self->obj), &x, &y); - - return Py_BuildValue("(ii)", x, y); -} -%% -override gtk_tooltips_get_info_from_tip_window noargs -static PyObject * -_wrap_gtk_tooltips_get_info_from_tip_window(PyGObject *self) -{ - gboolean ret; - GtkWidget *widget; - GtkTooltips *tooltips; - - ret = gtk_tooltips_get_info_from_tip_window(GTK_WINDOW(self->obj), - &tooltips, &widget); - if (ret) - return Py_BuildValue("(NN)", - pygobject_new((GObject *)tooltips), - pygobject_new((GObject *)widget)); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_menu_item_toggle_size_request noargs -static PyObject * -_wrap_gtk_menu_item_toggle_size_request(PyGObject *self) -{ - gint requisition; - - gtk_menu_item_toggle_size_request(GTK_MENU_ITEM(self->obj), &requisition); - - return PyInt_FromLong(requisition); -} -%% -override gtk_entry_new kwargs -static int -_wrap_gtk_entry_new(PyGObject * self, PyObject * args, PyObject * kwargs) -{ - static char *kwlist[] = { "max", NULL }; - int max = 0; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|i:GtkEntry.__init__", - kwlist, &max)) - return -1; - pygobject_construct(self, "max-length", max, NULL); - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkEntry object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_ENTRY -%% -override gtk_accel_groups_from_object -static PyObject * -_wrap_gtk_accel_groups_from_object(PyGObject *self, PyObject *args) -{ - PyGObject *obj; - PyObject *py_list; - GSList *list, *tmp; - PyObject *item; - - if (!PyArg_ParseTuple(args, "O!:accel_group_from_object", - &PyGObject_Type, &obj)) - return NULL; - - list = gtk_accel_groups_from_object(G_OBJECT(obj->obj)); - - if ((py_list = PyList_New(0)) == NULL) { - return NULL; - } - - for (tmp = list; tmp; tmp = tmp->next) { - item = pygobject_new(G_OBJECT(tmp->data)); - if (item == NULL) { - Py_DECREF(py_list); - return NULL; - } - PyList_Append(py_list, item); - Py_DECREF(item); - } - - return py_list; -} -%% -override gtk_table_new kwargs -static int -_wrap_gtk_table_new(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - char *arg_names[] = {"rows", "columns", "homogeneous", NULL }; - int rows = 1, cols = 1; - PyObject *homogeneous = Py_False; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iiO:gtk.Table.__init__", arg_names, - &rows, &cols, &homogeneous)) - return -1; - pygobject_construct(self, "n_rows", rows, "n_columns", cols, - "homogeneous", PyObject_IsTrue(homogeneous), NULL); - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, "could not create gtk.Table object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_TABLE -%% -override gtk_pixmap_new kwargs -static int -_wrap_gtk_pixmap_new(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "pixmap", "mask", NULL }; - PyGObject *pixmap, *py_mask; - GdkPixmap *mask = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O:GtkPixmap.__init__", - kwlist, &PyGdkPixmap_Type, &pixmap, &py_mask)) - return -1; - if (PyErr_Warn(PyExc_DeprecationWarning, "use GtkImage") < 0) - return -1; - if (py_mask && pygobject_check(py_mask, &PyGdkPixmap_Type)) - mask = GDK_PIXMAP(py_mask->obj); - else if ((PyObject *)py_mask != Py_None) { - PyErr_SetString(PyExc_TypeError, "mask should be a GdkPixmap or None"); - return -1; - } - - pygobject_construct(self, NULL); - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, "could not create GtkPixmap object"); - return -1; - } - - gtk_pixmap_set(GTK_PIXMAP(self->obj), GDK_PIXMAP(pixmap->obj), mask); - - return 0; -} -%% -new-constructor GTK_TYPE_PIXMAP -%% -override gtk_plug_new kwargs -static int -_wrap_gtk_plug_new(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "socket_id", "display", NULL }; - PyObject *py_socket_id = NULL; - gulong socket_id; - PyGObject *display = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!|O!:GtkPlug.__init__", kwlist, - &PyLong_Type, &py_socket_id, - &PyGdkDisplay_Type, &display)) - return -1; - - socket_id = PyLong_AsUnsignedLong(py_socket_id); - - pygobject_construct(self, NULL); - - if (display) - gtk_plug_construct_for_display(GTK_PLUG(self->obj), - GDK_DISPLAY(display->obj), socket_id); - else - gtk_plug_construct(GTK_PLUG(self->obj), socket_id); - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, "could not create GtkPlug object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_PLUG -%% -override gtk_adjustment_new kwargs -static int -_wrap_gtk_adjustment_new(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - char *kwlist[] = {"value", "lower", "upper", "step_incr", - "page_incr", "page_size", NULL }; - gdouble value = 0; - gdouble lower = 0; - gdouble upper = 0; - gdouble step_incr = 0; - gdouble page_incr = 0; - gdouble page_size = 0; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|dddddd:gtk.Adjustment.__init__" , - kwlist, &value, &lower, &upper, &step_incr, - &page_incr, &page_size)) - return -1; - - pygobject_construct(self, "lower", lower, "upper", upper, - "step_increment", step_incr, - "page_increment", page_incr, - "page_size", page_size, - "value", value, NULL); - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create gtk.Adjustment object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_ADJUSTMENT -%% -override gtk_alignment_new kwargs -static int -_wrap_gtk_alignment_new(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - char *kwlist[] = {"xalign", "yalign", "xscale", "yscale", NULL }; - gdouble xalign = 0; - gdouble yalign = 0; - gdouble xscale = 0; - gdouble yscale = 0; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|dddd:gtk.Alignment.__init__" , - kwlist, &xalign, &yalign, &xscale, &yscale)) - return -1; - - pygobject_construct(self, "xalign", xalign, "yalign", yalign, - "xscale", xscale, "yscale", yscale, NULL); - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create gtk.Alignment object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_ALIGNMENT -%% -override gtk_about_dialog_set_authors kwargs -static PyObject * -_wrap_gtk_about_dialog_set_authors(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - gchar **authors = NULL; - static char *kwlist[] = { "authors", NULL }; - PyObject *py_authors = NULL; - int i, n_authors; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkAboutDialog.set_authors", - kwlist, &py_authors)) - return NULL; - - if (!PySequence_Check(py_authors)) { - PyErr_SetString(PyExc_TypeError, "authors must be a sequence"); - return NULL; - } - - n_authors = PySequence_Length(py_authors); - authors = g_new(gchar *, n_authors + 1); - for (i = 0; i < n_authors; i++) { - PyObject *item = PySequence_GetItem(py_authors, i); - Py_DECREF(item); /* PySequence_GetItem INCREF's */ - authors[i] = PyString_AsString(item); - } - authors[n_authors] = NULL; - - gtk_about_dialog_set_authors(GTK_ABOUT_DIALOG(self->obj), - (const char **)authors); - - g_free(authors); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_about_dialog_get_authors noargs -static PyObject * -_wrap_gtk_about_dialog_get_authors(PyGObject *self) -{ - gchar **authors, **tmp; - int i = 0, j; - PyObject *ret; - - authors = (gchar **)gtk_about_dialog_get_authors(GTK_ABOUT_DIALOG(self->obj)); - if (!authors) - return PyTuple_New(0); - - tmp = authors; - while (*tmp) - tmp++, i++; - - ret = PyTuple_New(i); - for (j = 0; j < i; j++) - PyTuple_SetItem(ret, j, PyString_FromString(authors[j])); - - return ret; -} -%% -override gtk_about_dialog_set_documenters kwargs -static PyObject * -_wrap_gtk_about_dialog_set_documenters(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - gchar **documenters = NULL; - static char *kwlist[] = { "documenters", NULL }; - PyObject *py_documenters = NULL; - int i, n_documenters; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkAboutDialog.set_documenters", - kwlist, &py_documenters)) - return NULL; - - if (!PySequence_Check(py_documenters)) { - PyErr_SetString(PyExc_TypeError, "documenters must be a sequence"); - return NULL; - } - - n_documenters = PySequence_Length(py_documenters); - documenters = g_new(gchar *, n_documenters + 1); - for (i = 0; i < n_documenters; i++) { - PyObject *item = PySequence_GetItem(py_documenters, i); - Py_DECREF(item); /* PySequence_GetItem INCREF's */ - documenters[i] = PyString_AsString(item); - } - documenters[n_documenters] = NULL; - - gtk_about_dialog_set_documenters(GTK_ABOUT_DIALOG(self->obj), - (const char **)documenters); - - g_free(documenters); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_about_dialog_get_documenters noargs -static PyObject * -_wrap_gtk_about_dialog_get_documenters(PyGObject *self) -{ - gchar **documenters, **tmp; - int i = 0, j; - PyObject *ret; - - documenters = (gchar **)gtk_about_dialog_get_documenters(GTK_ABOUT_DIALOG(self->obj)); - if (!documenters) - return PyTuple_New(0); - - tmp = documenters; - while (*tmp) - tmp++, i++; - - ret = PyTuple_New(i); - for (j = 0; j < i; j++) - PyTuple_SetItem(ret, j, PyString_FromString(documenters[j])); - - return ret; -} -%% -override gtk_about_dialog_set_artists kwargs -static PyObject * -_wrap_gtk_about_dialog_set_artists(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - gchar **artists = NULL; - static char *kwlist[] = { "artists", NULL }; - PyObject *py_artists = NULL; - int i, n_artists; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkAboutDialog.set_artists", - kwlist, &py_artists)) - return NULL; - - if (!PySequence_Check(py_artists)) { - PyErr_SetString(PyExc_TypeError, "artists must be a sequence"); - return NULL; - } - - n_artists = PySequence_Length(py_artists); - artists = g_new(gchar *, n_artists + 1); - for (i = 0; i < n_artists; i++) { - PyObject *item = PySequence_GetItem(py_artists, i); - Py_DECREF(item); /* PySequence_GetItem INCREF's */ - artists[i] = PyString_AsString(item); - } - artists[n_artists] = NULL; - - gtk_about_dialog_set_artists(GTK_ABOUT_DIALOG(self->obj), - (const char **)artists); - - g_free(artists); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_about_dialog_get_artists noargs -static PyObject * -_wrap_gtk_about_dialog_get_artists(PyGObject *self) -{ - gchar **artists, **tmp; - int i = 0, j; - PyObject *ret; - - artists = (gchar **)gtk_about_dialog_get_artists(GTK_ABOUT_DIALOG(self->obj)); - if (!artists) - return PyTuple_New(0); - - tmp = artists; - while (*tmp) - tmp++, i++; - - ret = PyTuple_New(i); - for (j = 0; j < i; j++) - PyTuple_SetItem(ret, j, PyString_FromString(artists[j])); - - return ret; -} -%% -override gtk_selection_data_set_uris kwargs -static PyObject * -_wrap_gtk_selection_data_set_uris(PyGBoxed *self, PyObject *args, - PyObject *kwargs) -{ - gchar **uris = NULL; - static char *kwlist[] = { "uris", NULL }; - PyObject *py_uris = NULL; - int i, n_uris; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkSelectionData.set_uris", - kwlist, &py_uris)) - return NULL; - - if (!PySequence_Check(py_uris)) { - PyErr_SetString(PyExc_TypeError, "uris must be a sequence"); - return NULL; - } - - n_uris = PySequence_Length(py_uris); - uris = g_new(gchar *, n_uris + 1); - for (i = 0; i < n_uris; i++) { - PyObject *item = PySequence_GetItem(py_uris, i); - Py_DECREF(item); /* PySequence_GetItem INCREF's */ - uris[i] = PyString_AsString(item); - } - uris[n_uris] = NULL; - - gtk_selection_data_set_uris(pyg_boxed_get(self, GtkSelectionData), uris); - - g_free(uris); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_selection_data_get_uris noargs -static PyObject * -_wrap_gtk_selection_data_get_uris(PyGBoxed *self) -{ - gchar **uris, **tmp; - int i = 0, j; - PyObject *ret; - - uris = gtk_selection_data_get_uris(pyg_boxed_get(self, GtkSelectionData)); - if (!uris) - return PyTuple_New(0); - - tmp = uris; - while (*tmp) - tmp++, i++; - - ret = PyTuple_New(i); - for (j = 0; j < i; j++) - PyTuple_SetItem(ret, j, PyString_FromString(uris[j])); - - return ret; -} -%% -override gtk_drag_source_get_target_list noargs -static PyObject * -_wrap_gtk_drag_source_get_target_list(PyGObject *self) -{ - GtkTargetList *target_list; - - target_list = gtk_drag_source_get_target_list(GTK_WIDGET(self->obj)); - - if (!target_list) { - Py_INCREF(Py_None); - return Py_None; - } - - return pygtk_target_list_to_list(target_list); -} -%% -override gtk_drag_source_set_target_list kwargs -static PyObject * -_wrap_gtk_drag_source_set_target_list(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "target_list", NULL }; - PyObject *py_targets; - GtkTargetList *target_list; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkWidget.drag_source_set_target_list", - kwlist, &py_targets)) - return NULL; - - if (!(target_list = pygtk_target_list_from_sequence(py_targets))) - return NULL; - - gtk_drag_source_set_target_list(GTK_WIDGET(self->obj), target_list); - gtk_target_list_unref(target_list); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_cell_view_set_value kwargs -static PyObject * -_wrap_gtk_cell_view_set_value(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "renderer", "property", "value", NULL }; - PyObject *pyrenderer, *pyvalue; - GtkCellRenderer *renderer; - gchar *property; - GParamSpec *pspec; - GValue value = { 0 }; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!sO:GtkCellView.set_value", - kwlist, - &PyGtkCellRenderer_Type, &pyrenderer, - &property, &pyvalue)) - return NULL; - - renderer = GTK_CELL_RENDERER(pygobject_get(pyrenderer)); - pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(renderer), - property); - if (!pspec) { - PyErr_Format(PyExc_TypeError, - "property %s is not defined for the renderer", - property); - return NULL; - } - g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec)); - if (pyg_value_from_pyobject(&value, pyvalue)) { - PyErr_Format(PyExc_TypeError, - "value is of the wrong type for property %s", - property); - return NULL; - } - gtk_cell_view_set_value(GTK_CELL_VIEW(self->obj), renderer, - property, &value); - g_value_unset(&value); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_cell_view_set_values kwargs -static PyObject * -_wrap_gtk_cell_view_set_values(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - PyObject *pyrenderer, *key, *item; - GtkCellRenderer *renderer; - GtkCellView *view; - gchar *property; - GParamSpec *pspec; - GValue value = { 0 }; - gint i = 0; - - if (!PyArg_ParseTuple(args, "O!:GtkCellView.set_values", - &PyGtkCellRenderer_Type, &pyrenderer)) - return NULL; - - if (!kwargs) { - Py_INCREF(Py_None); - return Py_None; - } - view = GTK_CELL_VIEW(self->obj); - renderer = GTK_CELL_RENDERER(pygobject_get(pyrenderer)); - while (PyDict_Next(kwargs, &i, &key, &item)) { - property = PyString_AsString(key); - pspec = g_object_class_find_property(G_OBJECT_GET_CLASS(renderer), - property); - if (!pspec) { - PyErr_Format(PyExc_TypeError, - "property %s is not defined for the renderer", - property); - return NULL; - } - g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec)); - if (pyg_value_from_pyobject(&value, item)) { - PyErr_Format(PyExc_TypeError, - "value is of the wrong type for property %s", - property); - return NULL; - } - gtk_cell_view_set_value(view, renderer, property, &value); - g_value_unset(&value); - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_cell_view_get_cell_renderers noargs -static PyObject * -_wrap_gtk_cell_view_get_cell_renderers(PyGObject *self) -{ - GList *cell_list; - PyObject *py_cell_list, *py_cell; - GtkCellRenderer *cell; - guint len; - int i; - - cell_list = gtk_cell_view_get_cell_renderers(GTK_CELL_VIEW(self->obj)); - len = g_list_length(cell_list); - py_cell_list = PyList_New(len); - for (i = 0; i < len; i++) { - cell = GTK_CELL_RENDERER(g_list_nth_data(cell_list, i)); - if (!cell || !(py_cell = pygobject_new(G_OBJECT(cell)))) { - g_list_free(cell_list); - Py_DECREF(py_cell_list); - return NULL; - } - PyList_SetItem(py_cell_list, i, py_cell); - } - g_list_free(cell_list); - return py_cell_list; -} -%% -override gtk_cell_view_get_size_of_row kwargs -static PyObject * -_wrap_gtk_cell_view_get_size_of_row(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "path", NULL }; - PyObject *py_path; - GtkTreePath *path; - GtkRequisition requisition; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkCellView.get_size_of_row", - kwlist, &py_path)) - return NULL; - path = pygtk_tree_path_from_pyobject(py_path); - if (!path) { - PyErr_SetString(PyExc_TypeError, - "could not convert path to a GtkTreePath"); - return NULL; - } - gtk_cell_view_get_size_of_row(GTK_CELL_VIEW(self->obj), path, - &requisition); - gtk_tree_path_free(path); - return pyg_boxed_new(GTK_TYPE_REQUISITION, &requisition, TRUE, TRUE); -} -%% -override gtk_clipboard_set_can_store kwargs -static PyObject * -_wrap_gtk_clipboard_set_can_store(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "targets", NULL }; - GtkTargetEntry *targets; - PyObject *py_targets; - gint n_targets, i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkClipboard.set_can_store", - kwlist, &py_targets)) - return NULL; - if (py_targets == Py_None) { - targets = NULL; - n_targets = 0; - } else { - if (!(py_targets = PySequence_Fast(py_targets, - "targets must be a sequence"))) - return NULL; - n_targets = PySequence_Fast_GET_SIZE(py_targets); - targets = g_new(GtkTargetEntry, n_targets); - for (i = 0; i < n_targets; i++) { - PyObject *item = PySequence_Fast_GET_ITEM(py_targets, i); - if (!PyArg_ParseTuple(item, "sii", &targets[i].target, - &targets[i].flags, &targets[i].info)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "list items should be of form (string,int,int)"); - g_free(targets); - Py_DECREF(py_targets); - return NULL; - } - } - Py_DECREF(py_targets); - } - gtk_clipboard_set_can_store(GTK_CLIPBOARD(self->obj), targets, n_targets); - g_free(targets); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_combo_box_set_row_separator_func args -static gboolean -pygtk_combo_box_row_separator_func_cb(GtkTreeModel *model, - GtkTreeIter *iter, - gpointer user_data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = user_data; - PyObject *py_model, *py_iter; - gboolean ret = FALSE; - PyObject *retobj; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - py_model = pygobject_new((GObject *)model); - py_iter = pyg_boxed_new(GTK_TYPE_TREE_ITER, iter, TRUE, TRUE); - - if (cunote->data) { - retobj = PyEval_CallFunction(cunote->func, "(NNO)", py_model, - py_iter, cunote->data); - } else { - retobj = PyEval_CallFunction(cunote->func, "(NN)", py_model, py_iter); - } - - if (retobj != NULL) { - ret = PyObject_IsTrue(retobj); - Py_DECREF(retobj); - } else { - PyErr_Print(); - } - - pyg_gil_state_release(state); - return ret; -} -static PyObject * -_wrap_gtk_combo_box_set_row_separator_func(PyGObject *self, PyObject *args) -{ - PyObject *pyfunc = NULL, *pyarg = NULL; - PyGtkCustomNotify *cunote; - - if (!PyArg_ParseTuple(args, - "|OO:GtkComboBox.set_row_separator_func", - &pyfunc, &pyarg)) - return NULL; - - if (pyfunc == NULL || pyfunc == Py_None) { - gtk_combo_box_set_row_separator_func(GTK_COMBO_BOX(self->obj), - NULL, NULL, NULL); - } else if (!PyCallable_Check(pyfunc)) { - PyErr_SetString(PyExc_TypeError, "func must be a callable object"); - return NULL; - } else { - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = pyfunc; - cunote->data = pyarg; - Py_INCREF(cunote->func); - Py_XINCREF(cunote->data); - - gtk_combo_box_set_row_separator_func( - GTK_COMBO_BOX(self->obj), - pygtk_combo_box_row_separator_func_cb, - cunote, - pygtk_custom_destroy_notify); - } - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_file_chooser_button_new kwargs -static int -_wrap_gtk_file_chooser_button_new(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist1[] = { "title", "backend", NULL }; - static char *kwlist2[] = { "dialog", NULL }; - gchar *title, *backend = NULL; - PyGObject *dialog; - - if (PyArg_ParseTupleAndKeywords(args, kwargs, - "s|z:GtkFileChooserButton.__init__", - kwlist1, &title, &backend)) - pygobject_construct(self, "title", title, - "file-system-backend", backend, - NULL); - else { - PyErr_Clear(); - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!:GtkFileChooserButton.__init__", - kwlist2, &PyGtkFileChooserDialog_Type, - &dialog)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "Usage: one of:\n" - " gtk.FileChooserButton(title, backend=None)\n" - " gtk.FileChooserButton(filechooserdialog)"); - return -1; - } - pygobject_construct(self, "dialog", GTK_WIDGET(dialog->obj), NULL); - } - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkFileChooserBUtton object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_FILE_CHOOSER_BUTTON -%% -override gtk_icon_theme_get_icon_sizes kwargs -static PyObject * -_wrap_gtk_icon_theme_get_icon_sizes(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "icon_name", NULL }; - const gchar *icon_name; - gint *sizes; - int i; - PyObject *py_sizes; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s:GtkIconTheme.get_icon_sizes", - kwlist, &icon_name)) - return NULL; - - sizes = gtk_icon_theme_get_icon_sizes(GTK_ICON_THEME(self->obj), - icon_name); - - for (i = 0; sizes[i] != 0; i++) ; - - if ((py_sizes = PyTuple_New(i)) == NULL) { - g_free(sizes); - return NULL; - } - for (i = 0; sizes[i] != 0; i++) - PyTuple_SET_ITEM(py_sizes, i, PyInt_FromLong(sizes[i])); - - g_free(sizes); - return py_sizes; -} -%% -override gtk_image_get_icon_name noargs -static PyObject * -_wrap_gtk_image_get_icon_name(PyGObject *self) -{ - gchar *icon_name = NULL; - GtkIconSize size = GTK_ICON_SIZE_INVALID; - - gtk_image_get_icon_name(GTK_IMAGE(self->obj), - (G_CONST_RETURN gchar **)&icon_name, &size); - - return Py_BuildValue("(sN)", icon_name, - pyg_enum_from_gtype(GTK_TYPE_ICON_SIZE, size)); -} -%% -override gtk_message_dialog_format_secondary_text kwargs -static PyObject * -_wrap_gtk_message_dialog_format_secondary_text(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "message_format", NULL }; - gchar *message_format = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|z:GtkMessageDialog.format_secondary_text", - kwlist, &message_format)) - return NULL; - - if (message_format) - gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(self->obj), - "%s", message_format); - else - gtk_message_dialog_format_secondary_text(GTK_MESSAGE_DIALOG(self->obj), - message_format); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_message_dialog_format_secondary_markup kwargs -static PyObject * -_wrap_gtk_message_dialog_format_secondary_markup(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "message_format", NULL }; - gchar *message_format = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|z:GtkMessageDialog.format_secondary_markup", - kwlist, &message_format)) - return NULL; - - if (message_format) - gtk_message_dialog_format_secondary_markup(GTK_MESSAGE_DIALOG(self->obj), - "%s", message_format); - else - gtk_message_dialog_format_secondary_markup(GTK_MESSAGE_DIALOG(self->obj), - message_format); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_target_list_add_text_targets kwargs -static PyObject * -_wrap_gtk_target_list_add_text_targets(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "list", "info", NULL }; - PyObject *list = NULL; - guint info = 0; - GtkTargetList *targets; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|Oi:gtk.target_list_add_text_targets", - kwlist, &list, &info)) { - return NULL; - } - if (!list || list == Py_None) { - targets = gtk_target_list_new(NULL, 0); - } else if (!(targets = pygtk_target_list_from_sequence(list))) - return NULL; - - gtk_target_list_add_text_targets(targets, info); - list = pygtk_target_list_to_list(targets); - gtk_target_list_unref(targets); - return list; -} -%% -override gtk_target_list_add_image_targets kwargs -static PyObject * -_wrap_gtk_target_list_add_image_targets(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "list", "info", "writable", NULL }; - PyObject *list = NULL; - guint info = 0; - gboolean writable = FALSE; - GtkTargetList *targets; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|Oii:gtk.target_list_add_text_targets", - kwlist, &list, &info, &writable)) { - return NULL; - } - if (!list || list == Py_None) { - targets = gtk_target_list_new(NULL, 0); - } else if (!(targets = pygtk_target_list_from_sequence(list))) - return NULL; - - gtk_target_list_add_image_targets(targets, info, writable); - list = pygtk_target_list_to_list(targets); - gtk_target_list_unref(targets); - return list; -} -%% -override gtk_target_list_add_uri_targets kwargs -static PyObject * -_wrap_gtk_target_list_add_uri_targets(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "list", "info", NULL }; - PyObject *list = NULL; - guint info = 0; - GtkTargetList *targets; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|Oi:gtk.target_list_add_text_targets", - kwlist, &list, &info)) { - return NULL; - } - if (!list || list == Py_None) { - targets = gtk_target_list_new(NULL, 0); - } else if (!(targets = pygtk_target_list_from_sequence(list))) - return NULL; - - gtk_target_list_add_uri_targets(targets, info); - list = pygtk_target_list_to_list(targets); - gtk_target_list_unref(targets); - return list; -} -%% -override gtk_about_dialog_set_email_hook kwargs -static void -pygtk_about_dialog_link_hook_marshal(GtkAboutDialog *about, - const gchar *link, - gpointer user_data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = user_data; - PyObject *py_about, *retobj; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - py_about = pygobject_new((GObject *)about); - - if (cunote->data) { - retobj = PyEval_CallFunction(cunote->func, "(NsO)", py_about, - link, cunote->data); - } else { - retobj = PyEval_CallFunction(cunote->func, "(Ns)", py_about, link); - } - - if (!retobj) - PyErr_Print(); - - Py_XDECREF(retobj); - pyg_gil_state_release(state); -} -static PyObject * -_wrap_gtk_about_dialog_set_email_hook(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "func", "data", NULL }; - PyObject *pyfunc = NULL, *pyarg = NULL; - PyGtkCustomNotify *cunote; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|OO:GtkAboutDialog.set_email_hook", - kwlist, &pyfunc, &pyarg)) - return NULL; - - if (pyfunc == NULL || pyfunc == Py_None) { - gtk_about_dialog_set_email_hook(NULL, NULL, NULL); - } else if (!PyCallable_Check(pyfunc)) { - PyErr_SetString(PyExc_TypeError, "func must be a callable object"); - return NULL; - } else { - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = pyfunc; - cunote->data = pyarg; - Py_INCREF(cunote->func); - Py_XINCREF(cunote->data); - - gtk_about_dialog_set_email_hook( - pygtk_about_dialog_link_hook_marshal, - cunote, - pygtk_custom_destroy_notify); - } - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_about_dialog_set_url_hook kwargs -static PyObject * -_wrap_gtk_about_dialog_set_url_hook(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "func", "data", NULL}; - PyObject *pyfunc = NULL, *pyarg = NULL; - PyGtkCustomNotify *cunote; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|OO:GtkAboutDialog.set_url_hook", - kwlist, &pyfunc, &pyarg)) - return NULL; - - if (pyfunc == NULL || pyfunc == Py_None) { - gtk_about_dialog_set_url_hook(NULL, NULL, NULL); - } else if (!PyCallable_Check(pyfunc)) { - PyErr_SetString(PyExc_TypeError, "func must be a callable object"); - return NULL; - } else { - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = pyfunc; - cunote->data = pyarg; - Py_INCREF(cunote->func); - Py_XINCREF(cunote->data); - - gtk_about_dialog_set_url_hook( - pygtk_about_dialog_link_hook_marshal, - cunote, - pygtk_custom_destroy_notify); - } - Py_INCREF(Py_None); - return Py_None; -} -%% -override GtkCellRenderer__proxy_do_get_size -static void -_wrap_GtkCellRenderer__proxy_do_get_size (GtkCellRenderer *cell, - GtkWidget *widget, - GdkRectangle *cell_area, - gint *x_offset, - gint *y_offset, - gint *width, - gint *height) -{ - PyGILState_STATE state; - PyObject *self, *py_ret, *py_widget, *py_cell_area; - gint my_x, my_y, my_width, my_height; - - state = pyg_gil_state_ensure(); - self = pygobject_new((GObject *)cell); - py_widget = pygobject_new((GObject *)widget); - py_cell_area = pyg_boxed_new(GDK_TYPE_RECTANGLE, cell_area, TRUE, TRUE); - - py_ret = PyObject_CallMethod(self, "do_get_size", "OO", - py_widget, py_cell_area); - if (!py_ret) { - PyErr_Print(); - Py_DECREF(self); - Py_DECREF(py_widget); - Py_DECREF(py_cell_area); - pyg_gil_state_release(state); - return; - } - Py_DECREF(self); - Py_DECREF(py_widget); - Py_DECREF(py_cell_area); - - if (!PyArg_ParseTuple(py_ret, "iiii", - &my_x, &my_y, &my_width, &my_height)) { - PyErr_Print(); - Py_DECREF(py_ret); - pyg_gil_state_release(state); - return; - } - Py_DECREF(py_ret); - - pyg_gil_state_release(state); - - /* success */ - if (x_offset) - *x_offset = my_x; - if (y_offset) - *y_offset = my_y; - if (width) - *width = my_width; - if (height) - *height = my_height; -} -%% -override GtkCellRenderer__do_get_size kwargs -static PyObject * -_wrap_GtkCellRenderer__do_get_size(PyObject *cls, PyObject *args, PyObject *kwargs) -{ - gpointer klass; - static char *kwlist[] = { "self", "widget", "cell_area", NULL }; - PyGObject *self, *widget; - PyObject *py_cell_area; - gint x, y, width, height; - GdkRectangle cell_area; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!O!OO!:GtkContainer.get_child_property", kwlist, - &PyGtkCellRenderer_Type, &self, - &PyGtkWidget_Type, &widget, - &py_cell_area)) - return NULL; - - if (!pygdk_rectangle_from_pyobject(py_cell_area, &cell_area)) - return NULL; - - klass = g_type_class_ref(pyg_type_from_object(cls)); - if (GTK_CELL_RENDERER_CLASS(klass)->get_size) - GTK_CELL_RENDERER_CLASS(klass)->get_size(GTK_CELL_RENDERER(self->obj), - GTK_WIDGET(widget->obj), - &cell_area, - &x, &y, &width, &height); - else { - PyErr_SetString(PyExc_NotImplementedError, "virtual method GtkContainer.get_child_property not implemented"); - g_type_class_unref(klass); - return NULL; - } - g_type_class_unref(klass); - - return Py_BuildValue("(iiii)", x, y, width, height); -} - - -%% -override GtkCellLayout__proxy_do_set_cell_data_func - -typedef struct { - GtkCellLayoutDataFunc func; - gpointer func_data; - GDestroyNotify destroy; -} PyGtkCellLayoutDataFuncData; - -static void -_wrap_GtkCellLayoutDataFunc_destroy(void *arg) -{ - PyGtkCellLayoutDataFuncData *data = arg; - data->destroy(data->func_data); - g_free(data); -} - -static PyObject * -_wrap_GtkCellLayoutDataFunc(PyObject *self, PyObject *args) -{ - PyObject *py_cell_layout; - PyObject *py_cell; - PyObject *py_tree_model; - PyObject *py_iter; - PyObject *py_data; - PyGtkCellLayoutDataFuncData *data; - - if (!PyArg_ParseTuple(args, "O!O!O!OO!", - &PyGtkCellLayout_Type, &py_cell_layout, - &PyGtkCellRenderer_Type, &py_cell, - &PyGtkTreeModel_Type, &py_tree_model, - &py_iter, - &PyCObject_Type, &py_data)) - return NULL; - if (!pyg_boxed_check(py_iter, GTK_TYPE_TREE_ITER)) { - PyErr_SetString(PyExc_TypeError, "4th argument must be a gtk.TreeIter"); - return NULL; - } - - data = PyCObject_AsVoidPtr(py_data); - data->func(GTK_CELL_LAYOUT(pygobject_get(py_cell_layout)), - GTK_CELL_RENDERER(pygobject_get(py_cell)), - GTK_TREE_MODEL(pygobject_get(py_tree_model)), - pyg_boxed_get(py_iter, GtkTreeIter), - data->func_data); - Py_INCREF(Py_None); - return Py_None; -} - -static void -_wrap_GtkCellLayout__proxy_do_set_cell_data_func ( - GtkCellLayout *cell_layout, - GtkCellRenderer *cell, - GtkCellLayoutDataFunc func, - gpointer func_data, - GDestroyNotify destroy) -{ - PyGILState_STATE state; - PyObject *self, *py_ret, *py_cell, *py_func, *py_func_data; - PyMethodDef pyfunc_def = { NULL, (PyCFunction)_wrap_GtkCellLayoutDataFunc, - METH_VARARGS|METH_KEYWORDS }; - PyGtkCellLayoutDataFuncData *data; - - state = pyg_gil_state_ensure(); - self = pygobject_new((GObject *)cell); - py_cell = pygobject_new((GObject *)cell); - py_func = PyCFunction_NewEx(&pyfunc_def, NULL, NULL); - data = g_new(PyGtkCellLayoutDataFuncData, 1); - data->func = func; - data->func_data = func_data; - data->destroy = destroy; - py_func_data = PyCObject_FromVoidPtr(data, _wrap_GtkCellLayoutDataFunc_destroy); - - py_ret = PyObject_CallMethod(self, "do_set_cell_data_func", "NNNN", - self, py_cell, py_func, py_func_data); - if (!py_ret) - PyErr_Print(); - Py_DECREF(self); - Py_XDECREF(py_ret); - pyg_gil_state_release(state); -} -%% -override gtk_dialog_set_alternative_button_order kwargs -static PyObject * -_wrap_gtk_dialog_set_alternative_button_order(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "new_order", NULL }; - gint *new_order, n_params; - PyObject *py_new_order; - int i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkDialog.set_alternative_button_order", - kwlist, &py_new_order)) - return NULL; - - n_params = PySequence_Size(py_new_order); - if (!PySequence_Check(py_new_order) || n_params < 1) { - PyErr_SetString(PyExc_TypeError, - "new_order must be a sequence with" - "at least one response id int"); - return NULL; - } - new_order = (gint *)g_new0(gint, n_params); - for (i = 0; i < n_params; i++) { - PyObject *item = PySequence_GetItem(py_new_order, i); - - if (!PyInt_Check(item)) { - PyErr_SetString(PyExc_TypeError, - "each new_order item must be an integer"); - g_free(new_order); - Py_XDECREF(item); - return NULL; - } - new_order[i] = PyInt_AsLong(item); - Py_DECREF(item); - } - gtk_dialog_set_alternative_button_order_from_array(GTK_DIALOG(self->obj), - n_params, new_order); - g_free(new_order); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_icon_info_free noargs -static PyObject * -_wrap_gtk_icon_info_free(PyObject *self) -{ - if (PyErr_Warn(PyExc_DeprecationWarning, "gtk.IconInfo.free should not be used") < 0) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_icon_source_free noargs -static PyObject * -_wrap_gtk_icon_source_free(PyObject *self) -{ - if (PyErr_Warn(PyExc_DeprecationWarning, "gtk.IconSource.free should not be used") < 0) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_requisition_free noargs -static PyObject * -_wrap_gtk_requisition_free(PyObject *self) -{ - if (PyErr_Warn(PyExc_DeprecationWarning, "gtk.Requisition.free should not be used") < 0) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_iter_free noargs -static PyObject * -_wrap_gtk_tree_iter_free(PyObject *self) -{ - if (PyErr_Warn(PyExc_DeprecationWarning, "gtk.TreeIter.free should not be used") < 0) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_row_reference_free noargs -static PyObject * -_wrap_gtk_tree_row_reference_free(PyObject *self) -{ - if (PyErr_Warn(PyExc_DeprecationWarning, "gtk.TreeRowReference.free should not be used") < 0) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_border_free noargs -static PyObject * -_wrap_gtk_border_free(PyObject *self) -{ - if (PyErr_Warn(PyExc_DeprecationWarning, "gtk.Border.free should not be used") < 0) - return NULL; - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_clipboard_request_image kwargs -static void -clipboard_request_image_cb(GtkClipboard *clipboard, - GdkPixbuf *pixbuf, - gpointer user_data) -{ - PyGILState_STATE state; - PyObject *callback, *args, *ret, *py_image; - - if (pixbuf) { - py_image = pygobject_new((GObject *)pixbuf); - } else { - py_image = Py_None; - Py_INCREF(Py_None); - } - - state = pyg_gil_state_ensure(); - callback = PyTuple_GetItem((PyObject *)user_data, 0); - args = Py_BuildValue("(NNO)", - pygobject_new((GObject *)clipboard), - py_image, - PyTuple_GetItem((PyObject *)user_data, 1)); - ret = PyObject_CallObject(callback, args); - if (!ret) - PyErr_Print(); - Py_XDECREF(ret); - Py_DECREF(args); - Py_DECREF((PyObject *)user_data); - pyg_gil_state_release(state); -} -static PyObject * -_wrap_gtk_clipboard_request_image(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "callback", "user_data", NULL }; - PyObject *callback, *data, *user_data = Py_None; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:GtkClipboard.request_image", - kwlist, &callback, &user_data)) - return NULL; - if (!PyCallable_Check(callback)) { - PyErr_SetString(PyExc_TypeError, "callback must be callable"); - return NULL; - } - - data = Py_BuildValue("(OO)", callback, user_data); - gtk_clipboard_request_image(GTK_CLIPBOARD(self->obj), - clipboard_request_image_cb, - (gpointer)data); - Py_INCREF(Py_None); - return Py_None; -} - -%% -override gtk_print_context_get_cairo_context noargs -static PyObject * -_wrap_gtk_print_context_get_cairo_context(PyGObject *self) -{ - cairo_t *ret; - - ret = gtk_print_context_get_cairo_context(GTK_PRINT_CONTEXT(self->obj)); - - cairo_reference(ret); - return PycairoContext_FromContext(ret, &PyGdkCairoContext_Type, NULL); -} -%% -override gtk_assistant_set_forward_page_func kwargs -static gint -pygtk_assistant_set_forward_page_func_cb(gint current_page, - gpointer user_data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = user_data; - gint ret = current_page; - PyObject *retobj; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - if (cunote->data) { - retobj = PyEval_CallFunction(cunote->func, "(iO)", - current_page, cunote->data); - } else { - retobj = PyEval_CallFunction(cunote->func, "(i)", current_page); - } - - if (retobj != NULL) { - ret = PyInt_AsLong(retobj); - Py_DECREF(retobj); - } else { - PyErr_Print(); - } - - pyg_gil_state_release(state); - return ret; -} -static PyObject * -_wrap_gtk_assistant_set_forward_page_func(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "page_func", "data", NULL }; - PyObject *pyfunc, *pyarg = NULL; - PyGtkCustomNotify *cunote; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:GtkAssistant.set_forward_page_func", - kwlist, &pyfunc, &pyarg)) - return NULL; - - if (!PyCallable_Check(pyfunc)) { - PyErr_SetString(PyExc_TypeError, - "page_func must be a callable object"); - return NULL; - } - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = pyfunc; - cunote->data = pyarg; - Py_INCREF(cunote->func); - Py_XINCREF(cunote->data); - - gtk_assistant_set_forward_page_func(GTK_ASSISTANT(self->obj), - pygtk_assistant_set_forward_page_func_cb, - cunote, pygtk_custom_destroy_notify); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_clipboard_request_rich_text kwargs -static void -clipboard_request_rich_text_cb(GtkClipboard *clipboard, - GdkAtom format, - const guint8 *text, - gsize length, - gpointer user_data) -{ - PyGILState_STATE state; - PyObject *callback, *args, *ret, *py_format, *py_text, *data; - gchar *name; - - data = (PyObject *) user_data; - - if (text) { - py_text = PyString_FromString((char *) text); - } else { - py_text = Py_None; - Py_INCREF(Py_None); - } - - name = gdk_atom_name(format); - py_format = PyString_FromString(name); - g_free(name); - - state = pyg_gil_state_ensure(); - callback = PyTuple_GetItem(data, 0); - args = Py_BuildValue("(NNNiO)", - pygobject_new((GObject *)clipboard), - py_format, py_text, length, - PyTuple_GetItem(data, 1)); - ret = PyObject_CallObject(callback, args); - if (!ret) - PyErr_Print(); - Py_XDECREF(ret); - Py_DECREF(args); - Py_DECREF((PyObject *)user_data); - pyg_gil_state_release(state); -} -static PyObject * -_wrap_gtk_clipboard_request_rich_text(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "buffer", "callback", "user_data", NULL }; - PyObject *callback, *data, *user_data = Py_None; - GtkTextBuffer *buffer; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!O|O:GtkClipboard.request_rich_text", - kwlist, &PyGtkTextBuffer_Type, &buffer, - &callback, &user_data)) - return NULL; - if (!PyCallable_Check(callback)) { - PyErr_SetString(PyExc_TypeError, "callback must be callable"); - return NULL; - } - - data = Py_BuildValue("(OO)", callback, user_data); - gtk_clipboard_request_rich_text(GTK_CLIPBOARD(self->obj), buffer, - clipboard_request_rich_text_cb, - (gpointer)data); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_clipboard_wait_for_rich_text kwargs -static PyObject * -_wrap_gtk_clipboard_wait_for_rich_text(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "buffer", NULL }; - GtkTextBuffer *buffer; - GdkAtom format; - gchar *name; - gsize length; - guint8 *ret; - - - if (!PyArg_ParseTupleAndKeywords(args,kwargs, - "O:GtkClipboard.wait_for_rich_text", - kwlist, &PyGtkTextBuffer_Type, &buffer)) - return NULL; - - ret = gtk_clipboard_wait_for_rich_text(GTK_CLIPBOARD(self->obj), - buffer, &format, &length); - - if (ret) { - PyObject *py_ret; - name = gdk_atom_name(format); - py_ret = Py_BuildValue("(s#s)", ret, (Py_ssize_t) length, name); - g_free(ret); - g_free(name); - return py_ret; - } - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_link_button_set_uri_hook kwargs -static void -pygtk_link_button_set_uri_hook_cb(GtkLinkButton *button, - const gchar *link, - gpointer user_data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = user_data; - PyObject *retobj; - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - if (cunote->data) { - retobj = PyEval_CallFunction(cunote->func, "(NsO)", - pygobject_new((GObject *)button), - link, cunote->data); - } else { - retobj = PyEval_CallFunction(cunote->func, "(Ns)", - pygobject_new((GObject *)button), link); - } - - if (retobj == NULL) - PyErr_Print(); - - Py_XDECREF(retobj); - - pyg_gil_state_release(state); -} -static PyObject * -_wrap_gtk_link_button_set_uri_hook(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "func", "data", NULL }; - PyObject *pyfunc, *pyarg = NULL; - PyGtkCustomNotify *cunote; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:gtk.link_button_set_uri_hook", - kwlist, &pyfunc, &pyarg)) - return NULL; - - if (pyfunc != Py_None && !PyCallable_Check(pyfunc)) { - PyErr_SetString(PyExc_TypeError, "func must be a callable object or None"); - return NULL; - } - - if (pyfunc == Py_None) { - gtk_link_button_set_uri_hook(NULL, NULL, NULL); - } else { - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = pyfunc; - cunote->data = pyarg; - Py_INCREF(cunote->func); - Py_XINCREF(cunote->data); - - gtk_link_button_set_uri_hook(pygtk_link_button_set_uri_hook_cb, - cunote, pygtk_custom_destroy_notify); - } - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_print_settings_foreach kwargs -static void -pygtk_print_settings_foreach_cb(const gchar *key, - const gchar *value, - gpointer data) -{ - PyGILState_STATE state; - PyObject *retobj; - PyGtkCustomNotify *cunote = data; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - if (cunote->data) - retobj = PyEval_CallFunction(cunote->func, "(ssO)", key, value, - cunote->data); - else - retobj = PyEval_CallFunction(cunote->func, "(ss)", key, value); - - if (retobj == NULL) - PyErr_Print(); - - Py_XDECREF(retobj); - - pyg_gil_state_release(state); -} -static PyObject * -_wrap_gtk_print_settings_foreach(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "func", "user_data", NULL }; - PyObject *pyfunc, *pyarg = NULL; - PyGtkCustomNotify cunote; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:gtk.PrintSettings.foreach", - kwlist, &pyfunc, &pyarg)) - return NULL; - - if (!PyCallable_Check(pyfunc)) { - PyErr_SetString(PyExc_TypeError, "func must be a callable object"); - return NULL; - } - - cunote.func = pyfunc; - cunote.data = pyarg; - - gtk_print_settings_foreach(GTK_PRINT_SETTINGS(self->obj), - pygtk_print_settings_foreach_cb, &cunote); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_print_settings_get_page_ranges noargs -static PyObject * -_wrap_gtk_print_settings_get_page_ranges(PyGObject *self) -{ - GtkPageRange *ranges; - PyObject *py_ranges; - gint n_ranges, i; - - ranges = gtk_print_settings_get_page_ranges(GTK_PRINT_SETTINGS(self->obj), - &n_ranges); - - py_ranges = PyList_New(n_ranges); - - for (i = 0; i < n_ranges; i++) - PyList_SetItem(py_ranges, i, - Py_BuildValue("(ii)", ranges[i].start, ranges[i].end)); - g_free(ranges); - return py_ranges; -} -%% -override gtk_print_settings_set_page_ranges kwargs -static PyObject * -_wrap_gtk_print_settings_set_page_ranges(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "page_ranges", NULL }; - PyObject *py_ranges; - gint n_ranges = 0, i; - GtkPageRange *ranges = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:gtk.PrintSettings.set_page_ranges", - kwlist, &py_ranges)) - return NULL; - - if (!PySequence_Check(py_ranges)) { - PyErr_SetString(PyExc_TypeError, - "page_ranges must be a sequence of 2-tuples"); - return NULL; - } - - n_ranges = PySequence_Size(py_ranges); - ranges = g_new0(GtkPageRange, n_ranges); - for (i = 0; i < n_ranges; i++) { - PyObject *range = PySequence_GetItem(py_ranges, i); - - if (!PyTuple_Check(range)) { - PyErr_SetString(PyExc_TypeError, - "Each page range must be a 2-tuple of start and end page numbers"); - g_free(ranges); - return NULL; - } - if (!PyArg_ParseTuple(range, - "ii;Each page range must be a 2-tuple of start and end page numbers", - &ranges[i].start, &ranges[i].end)) { - Py_DECREF(range); - g_free(ranges); - return NULL; - } - Py_DECREF(range); - } - gtk_print_settings_set_page_ranges(GTK_PRINT_SETTINGS(self->obj), - ranges, n_ranges); - g_free(ranges); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_recent_chooser_get_items noargs -static PyObject * -_wrap_gtk_recent_chooser_get_items(PyGObject *self) -{ - GList *items; - GtkRecentInfo *info; - PyObject *py_items; - guint count, i; - - items = gtk_recent_chooser_get_items(GTK_RECENT_CHOOSER(self->obj)); - count = g_list_length(items); - py_items = PyList_New(count); - for (i = 0; i < count; i++) { - info = g_list_nth_data(items, i); - PyList_SetItem(py_items, i, - pyg_boxed_new(GTK_TYPE_RECENT_INFO, info, TRUE, TRUE)); - } - g_list_foreach(items, (GFunc) gtk_recent_info_unref, NULL); - g_list_free(items); - - return py_items; -} -%% -override gtk_recent_chooser_get_uris noargs -static PyObject * -_wrap_gtk_recent_chooser_get_uris(PyGObject *self) -{ - gchar **uris; - PyObject *py_uris; - gsize length, i; - - uris = gtk_recent_chooser_get_uris(GTK_RECENT_CHOOSER(self->obj), - &length); - if (!uris) - length = 0; - py_uris = PyList_New(length); - for (i = 0; i < length; i++) - PyList_SetItem(py_uris, i, PyString_FromString(uris[i])); - g_strfreev(uris); - - return py_uris; -} -%% -override gtk_recent_chooser_dialog_new kwargs -static int -_wrap_gtk_recent_chooser_dialog_new(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - gchar *title = NULL; - PyGObject *py_window = NULL, *py_manager = NULL; - PyObject *py_buttons = Py_None; - int len, i; - GtkWindow *parent; - GtkRecentManager *manager; - - static char *kwlist[] = { "title", "parent", "manager", "buttons", NULL }; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|zOOO:gtk.RecentChooserDialog", kwlist, - &title, &py_window, &py_manager, - &py_buttons)) - return -1; - - if (py_window == NULL || (PyObject*)py_window == Py_None) - parent = NULL; - else if (pygobject_check(py_window, &PyGtkWindow_Type)) - parent = GTK_WINDOW(py_window->obj); - else { - PyErr_SetString(PyExc_TypeError, "parent must be a GtkWindow or None"); - return -1; - } - - if (py_manager == NULL || (PyObject*)py_manager == Py_None) - manager = NULL; - else if (pygobject_check(py_manager, &PyGtkRecentManager_Type)) - manager = GTK_RECENT_MANAGER(py_manager->obj); - else { - PyErr_SetString(PyExc_TypeError, "manager must be a GtkRecentManager or None"); - return -1; - } - - if (py_buttons == Py_None) - len = 0; - else if (PySequence_Check(py_buttons)) - len = PySequence_Size(py_buttons); - else { - PyErr_SetString(PyExc_TypeError, "buttons must be a sequence containing text/response pairs or None"); - return -1; - } - - if (len % 2) { - PyErr_SetString(PyExc_RuntimeError, - "buttons tuple must contain text/response id pairs"); - return -1; - } - - if (pygobject_construct(self, "recent-manager", manager, NULL)) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkDialog object"); - return -1; - } - - if (title) - gtk_window_set_title (GTK_WINDOW (self->obj), title); - - if (parent) - gtk_window_set_transient_for (GTK_WINDOW (self->obj), parent); - - for (i = 0; i < len; i += 2) { - PyObject *text = PySequence_GetItem(py_buttons, i); - PyObject *id = PySequence_GetItem(py_buttons, i + 1); - if (!PyString_Check(text)) { - gtk_object_destroy(GTK_OBJECT(self->obj)); - self->obj = NULL; - PyErr_SetString(PyExc_RuntimeError, - "first member of each text/response id pair " - "must be a string"); - Py_DECREF(text); - Py_DECREF(id); - return -1; - } - if (!PyInt_Check(id)) { - gtk_object_destroy(GTK_OBJECT(self->obj)); - self->obj = NULL; - PyErr_SetString(PyExc_RuntimeError, - "second member of each text/response id pair " - "must be a number"); - Py_DECREF(text); - Py_DECREF(id); - return -1; - } - gtk_dialog_add_button(GTK_DIALOG(self->obj), PyString_AsString(text), - PyInt_AsLong(id)); - Py_DECREF(text); - Py_DECREF(id); - } - - return 0; -} -%% -new-constructor GTK_TYPE_RECENT_CHOOSER_DIALOG -%% -override gtk_recent_chooser_list_filters noargs -static PyObject * -_wrap_gtk_recent_chooser_list_filters(PyGObject *self) -{ - GSList *filters; - GtkRecentFilter *filter; - PyObject *py_filters; - guint count, i; - - filters = gtk_recent_chooser_list_filters(GTK_RECENT_CHOOSER(self->obj)); - count = g_slist_length(filters); - py_filters = PyList_New(count); - for (i = 0; i < count; i++) { - filter = g_slist_nth_data(filters, i); - PyList_SetItem(py_filters, i, pygobject_new((GObject*)filter)); - } - g_slist_free(filters); - - return py_filters; -} -%% -override gtk_recent_chooser_set_sort_func kwargs -static gint -pygtk_recent_chooser_set_sort_func_cb(GtkRecentInfo *a, - GtkRecentInfo *b, - gpointer user_data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = user_data; - PyObject *py_a, *py_b, *retobj; - gint ret = -1; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - py_a = pyg_boxed_new(GTK_TYPE_RECENT_INFO, a, TRUE, TRUE); - py_b = pyg_boxed_new(GTK_TYPE_RECENT_INFO, b, TRUE, TRUE); - if (cunote->data) { - retobj = PyEval_CallFunction(cunote->func, "(NNO)", - py_a, py_b, cunote->data); - } else { - retobj = PyEval_CallFunction(cunote->func, "(NN)", py_a, py_b); - } - - if (retobj != NULL) { - ret = PyInt_AsLong(retobj); - Py_DECREF(retobj); - } else { - PyErr_Print(); - } - - pyg_gil_state_release(state); - return ret; -} -static PyObject * -_wrap_gtk_recent_chooser_set_sort_func(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "sort_func", "sort_data", NULL }; - PyObject *pyfunc, *pyarg = NULL; - PyGtkCustomNotify *cunote; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:GtkRecentChooser.set_sort_func", - kwlist, &pyfunc, &pyarg)) - return NULL; - - if (!PyCallable_Check(pyfunc)) { - PyErr_SetString(PyExc_TypeError, - "sort_func must be a callable object"); - return NULL; - } - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = pyfunc; - cunote->data = pyarg; - Py_INCREF(cunote->func); - Py_XINCREF(cunote->data); - - gtk_recent_chooser_set_sort_func(GTK_RECENT_CHOOSER(self->obj), - pygtk_recent_chooser_set_sort_func_cb, - cunote, pygtk_custom_destroy_notify); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_recent_info_get_applications noargs -static PyObject * -_wrap_gtk_recent_info_get_applications(PyGObject *self) -{ - gchar **apps; - PyObject *py_apps; - gsize length, i; - - apps = gtk_recent_info_get_applications(pyg_boxed_get(self, GtkRecentInfo), - &length); - if (!apps) - length = 0; - py_apps = PyList_New(length); - for (i = 0; i < length; i++) - PyList_SetItem(py_apps, i, PyString_FromString(apps[i])); - g_strfreev(apps); - - return py_apps; -} -%% -override gtk_recent_info_get_groups noargs -static PyObject * -_wrap_gtk_recent_info_get_groups(PyGObject *self) -{ - gchar **groups; - PyObject *py_groups; - gsize length, i; - - groups = gtk_recent_info_get_groups(pyg_boxed_get(self, GtkRecentInfo), - &length); - if (!groups) - length = 0; - py_groups = PyList_New(length); - for (i = 0; i < length; i++) - PyList_SetItem(py_groups, i, PyString_FromString(groups[i])); - g_strfreev(groups); - - return py_groups; -} -%% -override gtk_recent_info_get_application_info kwargs -static PyObject * -_wrap_gtk_recent_info_get_application_info(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "app_name", NULL }; - gchar *app_name, *app_exec = NULL; - gboolean ret; - PyObject *py_ret; - guint count = 0; - time_t time_; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s:GtkRecentInfo.get_application_info", - kwlist, &app_name)) - return NULL; - - ret = gtk_recent_info_get_application_info(pyg_boxed_get(self, - GtkRecentInfo), - app_name, &app_exec, &count, - &time_); - if (ret) { - py_ret = Py_BuildValue("(sii)", app_exec, count, time_); - g_free(app_exec); - } else { - py_ret = Py_None; - } - return py_ret; -} -%% -override gtk_size_group_get_widgets noargs -static PyObject * -_wrap_gtk_size_group_get_widgets(PyGObject *self) -{ - GSList *widgets; - GtkWidget *widget; - PyObject *py_widgets; - guint count, i; - - widgets = gtk_size_group_get_widgets(GTK_SIZE_GROUP(self->obj)); - count = g_slist_length(widgets); - py_widgets = PyList_New(count); - for (i = 0; i < count; i++) { - widget = g_slist_nth_data(widgets, i); - PyList_SetItem(py_widgets, i, pygobject_new((GObject*)widget)); - } - - return py_widgets; -} -%% -override gtk_recent_filter_add_custom kwargs -static gboolean -pygtk_recent_filter_add_custom_cb(const GtkRecentFilterInfo *info, - gpointer user_data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = user_data; - PyObject *py_info, *retobj; - gboolean ret = TRUE; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - py_info = PyDict_New(); - - if (info->contains & GTK_RECENT_FILTER_URI) - PyDict_SetItemString(py_info, "uri", PyString_FromString(info->uri)); - - if (info->contains & GTK_RECENT_FILTER_DISPLAY_NAME) - PyDict_SetItemString(py_info, "display_name", - PyString_FromString(info->display_name)); - - if (info->contains & GTK_RECENT_FILTER_MIME_TYPE) - PyDict_SetItemString(py_info, "mime_type", - PyString_FromString(info->mime_type)); - - if (info->contains & GTK_RECENT_FILTER_APPLICATION) { - gchar **apps = (gchar **)info->applications; - PyObject *applications = PyList_New(0); - if (apps) { - while (*apps) { - PyList_Append(applications, PyString_FromString(*apps)); - apps++; - } - } - PyDict_SetItemString(py_info, "applications", applications); - } - - if (info->contains & GTK_RECENT_FILTER_GROUP) { - gchar **grps = (gchar **)info->groups; - PyObject *groups = PyList_New(0); - if (grps) { - while (*grps) { - PyList_Append(groups, PyString_FromString(*grps)); - grps++; - } - } - PyDict_SetItemString(py_info, "groups", groups); - } - - if (info->contains & GTK_RECENT_FILTER_AGE) - PyDict_SetItemString(py_info, "age", PyInt_FromLong(info->age)); - - if (cunote->data) { - retobj = PyEval_CallFunction(cunote->func, "(NO)", py_info, - cunote->data); - } else { - retobj = PyEval_CallFunction(cunote->func, "(N)", py_info); - } - - if (retobj != NULL) { - ret = PyInt_AsLong(retobj); - Py_DECREF(retobj); - } else { - PyErr_Print(); - } - - pyg_gil_state_release(state); - return ret; -} -static PyObject * -_wrap_gtk_recent_filter_add_custom(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "needed", "func", "data", NULL }; - PyObject *pyneeded, *pyfunc, *pyarg = NULL; - PyGtkCustomNotify *cunote; - GtkRecentFilterFlags needed; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OO|O:GtkRecentFilter.add_custom", - kwlist, &pyneeded, &pyfunc, &pyarg)) - return NULL; - - if (pyg_flags_get_value(GTK_TYPE_RECENT_FILTER_FLAGS, pyneeded, - (gint *)&needed)) - return NULL; - - if (!PyCallable_Check(pyfunc)) { - PyErr_SetString(PyExc_TypeError, - "func must be a callable object"); - return NULL; - } - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = pyfunc; - cunote->data = pyarg; - Py_INCREF(cunote->func); - Py_XINCREF(cunote->data); - - gtk_recent_filter_add_custom(GTK_RECENT_FILTER(self->obj), needed, - pygtk_recent_filter_add_custom_cb, - cunote, pygtk_custom_destroy_notify); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_recent_filter_filter kwargs -static PyObject* -_wrap_gtk_recent_filter_filter(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "filter_info", NULL }; - GtkRecentFilterInfo info; - PyObject *py_info, *py_ret = Py_False, *item; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkRecentFilter.filter", kwlist, - &py_info)) - return NULL; - - if (!PyDict_Check(py_info)) { - PyErr_SetString(PyExc_TypeError, "filter_info must be a mapping"); - return NULL; - } - - if ((item = PyDict_GetItemString(py_info, "uri"))) { - if (!PyString_Check(item)) { - PyErr_SetString(PyExc_TypeError, - "filter_info uri must be a string"); - return NULL; - } - info.uri = PyString_AsString(item); - info.contains |= GTK_RECENT_FILTER_URI; - } else { - info.uri = NULL; - } - - if ((item = PyDict_GetItemString(py_info, "mime_type"))) { - if (!PyString_Check(item)) { - PyErr_SetString(PyExc_TypeError, - "filter_info mime_type must be a string"); - return NULL; - } - info.mime_type = PyString_AsString(item); - info.contains |= GTK_RECENT_FILTER_MIME_TYPE; - } else { - info.mime_type = NULL; - } - - if ((item = PyDict_GetItemString(py_info, "display_name"))) { - if (!PyString_Check(item)) { - PyErr_SetString(PyExc_TypeError, - "filter_info display_name must be a string"); - return NULL; - } - info.display_name = PyString_AsString(item); - info.contains |= GTK_RECENT_FILTER_DISPLAY_NAME; - } else { - info.display_name = NULL; - } - - if ((item = PyDict_GetItemString(py_info, "applications"))) { - gint size, i; - if (!PySequence_Check(item)) { - PyErr_SetString(PyExc_TypeError, - "filter_info applications must be a sequence of strings"); - return NULL; - } - size = PySequence_Size(item); - info.applications = (const gchar**)g_new0(gchar*, size + 1); - for (i = 0; i < size; i++) { - PyObject *app = PySequence_GetItem(item, i); - if (!PyString_Check(app)) { - PyErr_SetString(PyExc_TypeError, - "filter_info applications must be a sequence of strings"); - return NULL; - } - info.applications[i] = PyString_AsString(app); - Py_DECREF(app); - } - info.contains |= GTK_RECENT_FILTER_APPLICATION; - } else { - info.applications = NULL; - } - - if ((item = PyDict_GetItemString(py_info, "groups"))) { - gint size, i; - if (!PySequence_Check(item)) { - PyErr_SetString(PyExc_TypeError, - "filter_info groups must be a sequence of strings"); - return NULL; - } - size = PySequence_Size(item); - info.groups = (const gchar**)g_new0(gchar*, size + 1); - for (i = 0; i < size; i++) { - PyObject *grp = PySequence_GetItem(item, i); - if (!PyString_Check(grp)) { - PyErr_SetString(PyExc_TypeError, - "filter_info groups must be a sequence of strings"); - return NULL; - } - info.groups[i] = PyString_AsString(grp); - Py_DECREF(grp); - } - info.contains |= GTK_RECENT_FILTER_GROUP; - } else { - info.groups = NULL; - } - - if ((item = PyDict_GetItemString(py_info, "age"))) { - if (!PyInt_Check(item)) { - PyErr_SetString(PyExc_TypeError, - "filter_info age must be an int"); - return NULL; - } - info.age = PyInt_AsLong(item); - info.contains |= GTK_RECENT_FILTER_AGE; - } else { - info.age = -1; - } - - if (gtk_recent_filter_filter(GTK_RECENT_FILTER(self->obj), &info)) - py_ret = Py_True; - - if (info.applications) - g_free(info.applications); - if (info.groups) - g_free(info.groups); - - Py_INCREF(py_ret); - return py_ret; -} -%% -override gtk_recent_manager_add_full kwargs -static PyObject* -_wrap_gtk_recent_manager_add_full(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "uri", "recent_data", NULL }; - PyObject *py_data, *item, *py_ret = Py_False; - gchar *uri; - GtkRecentData recent_data; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "sO:GtkRecentManager.add_full", kwlist, - &uri, &py_data)) - return NULL; - - if (!PyDict_Check(py_data)) { - PyErr_SetString(PyExc_TypeError, "recent_data must be a mapping"); - return NULL; - } - - if (!(item = PyDict_GetItemString(py_data, "mime_type")) - || !PyString_Check(item)) { - PyErr_SetString(PyExc_RuntimeError, - "recent_data must reference a 'mime_type' string value"); - return NULL; - } - recent_data.mime_type = PyString_AsString(item); - - if (!(item = PyDict_GetItemString(py_data, "app_name")) - || !PyString_Check(item)) { - PyErr_SetString(PyExc_RuntimeError, - "recent_data must reference a 'app_name' string value"); - return NULL; - } - recent_data.app_name = PyString_AsString(item); - - if (!(item = PyDict_GetItemString(py_data, "app_exec")) - || !PyString_Check(item)) { - PyErr_SetString(PyExc_RuntimeError, - "recent_data must reference a 'app_exec' string value"); - return NULL; - } - recent_data.app_exec = PyString_AsString(item); - - if ((item = PyDict_GetItemString(py_data, "display_name"))) { - if (!PyString_Check(item)) { - PyErr_SetString(PyExc_TypeError, - "recent_data 'display_name' must reference a string"); - return NULL; - } - recent_data.display_name = PyString_AsString(item); - } else { - recent_data.display_name = NULL; - } - - if ((item = PyDict_GetItemString(py_data, "description"))) { - if (!PyString_Check(item)) { - PyErr_SetString(PyExc_TypeError, - "recent_data 'description' must reference a string"); - return NULL; - } - recent_data.description = PyString_AsString(item); - } else { - recent_data.description = NULL; - } - - if ((item = PyDict_GetItemString(py_data, "is_private"))) { - if (!PyBool_Check(item)) { - PyErr_SetString(PyExc_TypeError, - "recent_data 'is_private' must reference a boolean"); - return NULL; - } - if (item == Py_True) - recent_data.is_private = TRUE; - else - recent_data.is_private = FALSE; - } else { - recent_data.is_private = FALSE; - } - - if ((item = PyDict_GetItemString(py_data, "groups"))) { - gint size, i; - if (!PySequence_Check(item)) { - PyErr_SetString(PyExc_TypeError, - "recent_data 'groups' must reference a sequence of strings"); - return NULL; - } - size = PySequence_Size(item); - recent_data.groups = (gchar**)g_new0(gchar*, size+1); - for (i = 0; i < size; i++) { - PyObject *group = PySequence_GetItem(item, i); - if (!PyString_Check(group)) { - PyErr_SetString(PyExc_TypeError, - "recent_data 'groups' must reference a sequence of strings"); - g_free(recent_data.groups); - Py_XDECREF(group); - return NULL; - } - recent_data.groups[i] = PyString_AsString(group); - Py_DECREF(group); - } - } else { - recent_data.groups = NULL; - } - - if (gtk_recent_manager_add_full(GTK_RECENT_MANAGER(self->obj), uri, - &recent_data)) - py_ret = Py_True; - - if (recent_data.groups) - g_free(recent_data.groups); - - Py_INCREF(py_ret); - return py_ret; -} -%% -override gtk_recent_manager_get_items noargs -static PyObject * -_wrap_gtk_recent_manager_get_items(PyGObject *self) -{ - GtkRecentInfo *info; - GList *items; - PyObject *py_items; - guint count, i; - - items = gtk_recent_manager_get_items(GTK_RECENT_MANAGER(self->obj)); - count = g_list_length(items); - py_items = PyList_New(count); - for (i = 0; i < count; i++) { - info = g_list_nth_data(items, i); - PyList_SetItem(py_items, i, - pyg_boxed_new(GTK_TYPE_RECENT_INFO, info, TRUE, TRUE)); - } - g_list_foreach(items, (GFunc) gtk_recent_info_unref, NULL); - g_list_free(items); - - return py_items; -} -%% -override gtk_status_icon_get_geometry noargs -static PyObject * -_wrap_gtk_status_icon_get_geometry(PyGObject *self) -{ - GdkScreen *screen; - GdkRectangle rect; - GtkOrientation orientation; - gboolean ret; - - ret = gtk_status_icon_get_geometry(GTK_STATUS_ICON(self->obj), - &screen, &rect, &orientation); - if (ret) - return Py_BuildValue("(NNN)", pygobject_new((GObject*)screen), - pyg_boxed_new(GDK_TYPE_RECTANGLE, &rect, - TRUE, TRUE), - pyg_enum_from_gtype(GTK_TYPE_ORIENTATION, - orientation)); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_status_icon_position_menu args -static PyObject * -_wrap_gtk_status_icon_position_menu(PyGObject *self, PyObject *args) -{ - PyGObject *menu, *icon; - gint x, y; - gboolean push_in; - - if (!PyArg_ParseTuple(args,"O!O!:gtk.status_icon_position_menu", - &PyGtkMenu_Type, &menu, - &PyGtkStatusIcon_Type, &icon)) - return NULL; - - gtk_status_icon_position_menu(GTK_MENU(menu->obj), &x, &y, &push_in, - (gpointer)icon->obj); - return Py_BuildValue("(iii)", x, y, push_in); -} -%% -override gtk_targets_include_image kwargs -static PyObject * -_wrap_gtk_targets_include_image(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "targets", "writable", NULL }; - GdkAtom *targets; - gint n_targets; - gboolean writable; - PyObject *py_targets, *py_ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "Oi:gtk.targets_include_image", - kwlist, &py_targets, &writable)) - return NULL; - - if (!(targets = pygdk_atom_vector_from_sequence(py_targets, &n_targets))) - return NULL; - - if (gtk_targets_include_image(targets, n_targets, writable)) - py_ret = Py_True; - else - py_ret = Py_False; - g_free(targets); - return py_ret; -} -%% -override gtk_targets_include_text kwargs -static PyObject * -_wrap_gtk_targets_include_text(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "targets", NULL }; - GdkAtom *targets; - gint n_targets; - PyObject *py_targets, *py_ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:gtk.targets_include_text", - kwlist, &py_targets)) - return NULL; - - if (!(targets = pygdk_atom_vector_from_sequence(py_targets, &n_targets))) - return NULL; - - if (gtk_targets_include_text(targets, n_targets)) - py_ret = Py_True; - else - py_ret = Py_False; - g_free(targets); - return py_ret; -} -%% -override gtk_targets_include_uri kwargs -static PyObject * -_wrap_gtk_targets_include_uri(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "targets", NULL }; - GdkAtom *targets; - gint n_targets; - PyObject *py_targets, *py_ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:gtk.targets_include_uri", - kwlist, &py_targets)) - return NULL; - - if (!(targets = pygdk_atom_vector_from_sequence(py_targets, &n_targets))) - return NULL; - - if (gtk_targets_include_uri(targets, n_targets)) - py_ret = Py_True; - else - py_ret = Py_False; - g_free(targets); - return py_ret; -} -%% -override gtk_targets_include_rich_text kwargs -static PyObject * -_wrap_gtk_targets_include_rich_text(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "targets", "buffer", NULL }; - GdkAtom *targets; - PyGObject *buffer; - gint n_targets; - PyObject *py_targets, *py_ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OO!:gtk.targets_include_rich_text", - kwlist, &py_targets, - &PyGtkTextBuffer_Type, &buffer)) - return NULL; - - if (!(targets = pygdk_atom_vector_from_sequence(py_targets, &n_targets))) - return NULL; - - if (gtk_targets_include_rich_text(targets, n_targets, - GTK_TEXT_BUFFER(buffer->obj))) - py_ret = Py_True; - else - py_ret = Py_False; - g_free(targets); - return py_ret; -} -%% -override gtk_target_list_add_rich_text_targets kwargs -static PyObject * -_wrap_gtk_target_list_add_rich_text_targets(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "list", "info", "deserializable", "buffer", NULL }; - PyObject *list = NULL; - guint info = 0; - GtkTargetList *targets; - gboolean deserializable; - PyGObject *buffer; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OiiO!:gtk.target_list_add_rich_text_targets", - kwlist, &list, &info, &deserializable, - &PyGtkTextBuffer_Type, &buffer)) { - return NULL; - } - if (!list || list == Py_None) { - targets = gtk_target_list_new(NULL, 0); - } else if (!(targets = pygtk_target_list_from_sequence(list))) - return NULL; - - gtk_target_list_add_rich_text_targets(targets, info, deserializable, - GTK_TEXT_BUFFER(buffer->obj)); - list = pygtk_target_list_to_list(targets); - gtk_target_list_unref(targets); - return list; -} -%% -override gtk_notebook_set_window_creation_hook kwargs -static GtkNotebook * -pygtk_notebook_set_window_creation_hook_cb(GtkNotebook *notebook, - GtkWidget *page, - gint x, gint y, - gpointer user_data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = user_data; - PyObject *py_notebook, *py_page, *retobj; - GtkNotebook *ret = NULL; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - py_notebook = pygobject_new((GObject*)notebook); - py_page = pygobject_new((GObject*)page); - - if (cunote->data) { - retobj = PyEval_CallFunction(cunote->func, "(NNiiO)", py_notebook, - py_page, x, y, cunote->data); - } else { - retobj = PyEval_CallFunction(cunote->func, "(NNii)", py_notebook, - py_page, x, y); - } - - if (retobj) { - if (!pygobject_check((PyGObject*)retobj, &PyGtkNotebook_Type)) { - PyErr_SetString(PyExc_TypeError, - "GtkNotebook window creation hook function return should be a GtkNotebook or None"); - PyErr_Print(); - ret = NULL; - } else { - ret = GTK_NOTEBOOK(pygobject_get(retobj)); - } - Py_DECREF(retobj); - } else { - PyErr_Print(); - ret = NULL; - } - - pyg_gil_state_release(state); - return ret; -} -static PyObject * -_wrap_gtk_notebook_set_window_creation_hook(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "func", "data", NULL }; - PyObject *pyfunc, *pyarg = NULL; - PyGtkCustomNotify *cunote; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:gtk.notebook_set_window_creation_hook", - kwlist, &pyfunc, &pyarg)) - return NULL; - - if (!PyCallable_Check(pyfunc)) { - PyErr_SetString(PyExc_TypeError, - "func must be a callable object"); - return NULL; - } - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = pyfunc; - cunote->data = pyarg; - Py_INCREF(cunote->func); - Py_XINCREF(cunote->data); - - gtk_notebook_set_window_creation_hook( - pygtk_notebook_set_window_creation_hook_cb, - cunote, pygtk_custom_destroy_notify); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_print_operation_get_error noargs -static PyObject * -_wrap_gtk_print_operation_get_error(PyGObject *self) -{ - GError *error = NULL; - - gtk_print_operation_get_error(GTK_PRINT_OPERATION(self->obj), &error); - - if (pyg_error_check(&error)) { - PyObject *type, *value, *traceback; - PyErr_Fetch(&type, &value, &traceback); - Py_DECREF(type); - Py_DECREF(traceback); - return value; - } - - Py_INCREF(Py_None); - return Py_None; -} - -%% -override GtkEditable__do_insert_text kwargs -static PyObject * -_wrap_GtkEditable__do_insert_text(PyObject *cls, PyObject *args, PyObject *kwargs) -{ - gpointer klass; - static char *kwlist[] = { "self", "text", "position", NULL }; - PyGObject *self; - Py_ssize_t text_len; - int position; - char *text; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!s#i:GtkEditable.do_insert_text", kwlist, - &PyGtkEditable_Type, &self, - &text, &text_len, &position)) - return NULL; - - - klass = g_type_class_ref(pyg_type_from_object(cls)); - if (GTK_EDITABLE_CLASS(klass)->insert_text) - GTK_EDITABLE_CLASS(klass)->insert_text(GTK_EDITABLE(self->obj), - text, text_len, &position); - else { - PyErr_SetString(PyExc_NotImplementedError, "virtual method GtkEditable.do_insert_text not implemented"); - g_type_class_unref(klass); - return NULL; - } - g_type_class_unref(klass); - - return PyInt_FromLong(position); -} - -%% -override GtkEditable__do_do_insert_text kwargs -static PyObject * -_wrap_GtkEditable__do_do_insert_text(PyObject *cls, PyObject *args, PyObject *kwargs) -{ - gpointer klass; - static char *kwlist[] = { "self", "text", "position", NULL }; - PyGObject *self; - Py_ssize_t text_len; - int position; - char *text; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!s#i:GtkEditable.do_do_insert_text", kwlist, - &PyGtkEditable_Type, &self, - &text, &text_len, &position)) - return NULL; - - - klass = g_type_class_ref(pyg_type_from_object(cls)); - if (GTK_EDITABLE_CLASS(klass)->do_insert_text) - GTK_EDITABLE_CLASS(klass)->do_insert_text(GTK_EDITABLE(self->obj), - text, text_len, &position); - else { - PyErr_SetString(PyExc_NotImplementedError, "virtual method GtkEditable.do_do_insert_text not implemented"); - g_type_class_unref(klass); - return NULL; - } - g_type_class_unref(klass); - - return PyInt_FromLong(position); -} - -%% -override GtkEditable__do_get_selection_bounds kwargs -static PyObject * -_wrap_GtkEditable__do_get_selection_bounds(PyObject *cls, PyObject *args, PyObject *kwargs) -{ - gpointer klass; - static char *kwlist[] = { "self", NULL }; - PyGObject *self; - int start_pos, end_pos;; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:GtkEditable.do_get_selection_bounds", kwlist, - &PyGtkEditable_Type, &self)) - return NULL; - - klass = g_type_class_ref(pyg_type_from_object(cls)); - if (GTK_EDITABLE_CLASS(klass)->get_selection_bounds) - GTK_EDITABLE_CLASS(klass)->get_selection_bounds(GTK_EDITABLE(self->obj), - &start_pos, &end_pos); - else { - PyErr_SetString(PyExc_NotImplementedError, "virtual method GtkEditable.do_get_selection_bounds not implemented"); - g_type_class_unref(klass); - return NULL; - } - g_type_class_unref(klass); - - return Py_BuildValue("ii", start_pos, end_pos); -} - -%% -define GtkAction.set_menu_item_type kwargs classmethod -static PyObject * -_wrap_gtk_action_set_menu_item_type(PyObject *cls, - PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "menu_item_type", NULL }; - GType gtype, menu_item_type; - GtkActionClass *klass; - PyObject *py_menu_item_type; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:gtk.Action.set_menu_item_type", kwlist, - &py_menu_item_type)) - return NULL; - - if ((gtype = pyg_type_from_object(cls)) == 0) - return NULL; - if ((menu_item_type = pyg_type_from_object(py_menu_item_type)) == 0) - return NULL; - klass = (GtkActionClass *) g_type_class_ref(gtype); - klass->menu_item_type = menu_item_type; - g_type_class_unref(klass); - Py_INCREF(Py_None); - return Py_None; -} - -%% -define GtkAction.set_tool_item_type kwargs classmethod -static PyObject * -_wrap_gtk_action_set_tool_item_type(PyObject *cls, - PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "tool_item_type", NULL }; - GType gtype, tool_item_type; - GtkActionClass *klass; - PyObject *py_tool_item_type; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:gtk.Action.set_tool_item_type", kwlist, - &py_tool_item_type)) - return NULL; - - if ((gtype = pyg_type_from_object(cls)) == 0) - return NULL; - if ((tool_item_type = pyg_type_from_object(py_tool_item_type)) == 0) - return NULL; - klass = (GtkActionClass *) g_type_class_ref(gtype); - klass->toolbar_item_type = tool_item_type; - g_type_class_unref(klass); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_accel_map_foreach kwargs -static void -pygtk_accel_map_foreach_cb(gpointer data, const gchar *accel_path, - guint accel_key, GdkModifierType accel_mode, - gboolean changed) -{ - PyGILState_STATE state; - PyObject *retobj, *py_accel_mode; - PyGtkCustomNotify *cunote = data; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - py_accel_mode = pyg_flags_from_gtype(GDK_TYPE_MODIFIER_TYPE, accel_mode); - if (cunote->data) - retobj = PyEval_CallFunction(cunote->func, "(siNNO)", - accel_path, accel_key, py_accel_mode, - PyBool_FromLong(changed), cunote->data); - else - retobj = PyEval_CallFunction(cunote->func, "(siNN)", accel_path, - accel_key, py_accel_mode, - PyBool_FromLong(changed)); - - if (retobj == NULL) - PyErr_Print(); - - Py_XDECREF(retobj); - - pyg_gil_state_release(state); -} -static PyObject * -_wrap_gtk_accel_map_foreach(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "foreach_func", "data", NULL }; - PyObject *pyfunc, *pyarg = NULL; - PyGtkCustomNotify cunote; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:gtk.accel_map_foreach", - kwlist, &pyfunc, &pyarg)) - return NULL; - - if (!PyCallable_Check(pyfunc)) { - PyErr_SetString(PyExc_TypeError, - "foreach_func must be a callable object"); - return NULL; - } - - cunote.func = pyfunc; - cunote.data = pyarg; - - gtk_accel_map_foreach(&cunote, pygtk_accel_map_foreach_cb); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_accel_map_foreach_unfiltered kwargs -static PyObject * -_wrap_gtk_accel_map_foreach_unfiltered(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "foreach_func", "data", NULL }; - PyObject *pyfunc, *pyarg = NULL; - PyGtkCustomNotify cunote; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:gtk.accel_map_foreach_unfiltered", - kwlist, &pyfunc, &pyarg)) - return NULL; - - if (!PyCallable_Check(pyfunc)) { - PyErr_SetString(PyExc_TypeError, - "foreach_func must be a callable object"); - return NULL; - } - - cunote.func = pyfunc; - cunote.data = pyarg; - - gtk_accel_map_foreach_unfiltered(&cunote, pygtk_accel_map_foreach_cb); - - Py_INCREF(Py_None); - return Py_None; -} diff --git a/gtk/gtkclist.override b/gtk/gtkclist.override deleted file mode 100644 index a3e477dc..00000000 --- a/gtk/gtkclist.override +++ /dev/null @@ -1,359 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * gtkclist.override: overrides for the gtk.CList type. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -ignore - gtk_clist_new - gtk_clist_set_row_data_full - gtk_clist_set_compare_func -%% -override gtk_clist_new_with_titles kwargs -static int -_wrap_gtk_clist_new_with_titles(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "count", "titles", NULL }; - int count = 1, i; - PyObject *py_list = NULL; - - if (PyErr_Warn(PyExc_DeprecationWarning, "use gtk.TreeView") < 0) - return -1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iO:GtkCList.__init__", - kwlist, &count, &py_list)) - return -1; - if (py_list) { - gchar **list; - - if (!PySequence_Check(py_list)) { - PyErr_SetString(PyExc_TypeError,"2nd argument not a sequence"); - return -1; - } - if (PySequence_Length(py_list) < count) { - PyErr_SetString(PyExc_TypeError, "sequence not long enough"); - return -1; - } - list = g_new(gchar *, count); - for (i = 0; i < count; i++) { - PyObject *item = PySequence_GetItem(py_list, i); - - Py_DECREF(item); /* PySequence_GetItem INCREF's */ - if (!PyString_Check(item) && !PyUnicode_Check(item)) { - PyErr_SetString(PyExc_TypeError, - "sequence item not a string or unicode object"); - g_free(list); - return -1; - } - list[i] = PyString_AsString(item); - } - self->obj = (GObject *)gtk_clist_new_with_titles(count, list); - g_free(list); - } else - self->obj = (GObject *)gtk_clist_new(count); - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError,"could not create GtkCList object"); - return -1; - } - pygobject_register_wrapper((PyObject *)self); - return 0; -} -%% -override gtk_clist_get_text kwargs -static PyObject * -_wrap_gtk_clist_get_text(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "row", "column", NULL }; - int r, c; - char *text = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii:GtkCList.get_text", - kwlist, &r, &c)) - return NULL; - if (!gtk_clist_get_text(GTK_CLIST(self->obj), r, c, &text) || text==NULL) { - PyErr_SetString(PyExc_ValueError, "can't get text value"); - return NULL; - } - return PyString_FromString(text); -} -%% -override gtk_clist_get_pixmap kwargs -static PyObject * -_wrap_gtk_clist_get_pixmap(PyGObject *self, PyObject *args, PyObject*kwargs) -{ - static char *kwlist[] = { "row", "column", NULL }; - int r, c; - GdkPixmap *pixmap; - GdkBitmap *mask; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii:GtkCList.get_pixmap", - kwlist, &r, &c)) - return NULL; - if (!gtk_clist_get_pixmap(GTK_CLIST(self->obj), r, c, - &pixmap, &mask)) { - PyErr_SetString(PyExc_ValueError, "can't get pixmap value"); - return NULL; - } - return Py_BuildValue("(NN)", pygobject_new((GObject *)pixmap), - pygobject_new((GObject *)mask)); -} -%% -override gtk_clist_get_pixtext kwargs -static PyObject * -_wrap_gtk_clist_get_pixtext(PyGObject *self, PyObject *args, PyObject*kwargs) -{ - static char *kwlist[] = { "row", "column", NULL }; - int r, c; - gchar *text; - guint8 spacing; - GdkPixmap *pixmap; - GdkBitmap *mask; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii:GtkCList.get_pixtext", - kwlist, &r, &c)) - return NULL; - if (!gtk_clist_get_pixtext(GTK_CLIST(self->obj), r, c, - &text, &spacing, &pixmap, &mask)) { - PyErr_SetString(PyExc_ValueError, "can't get pixtext value"); - return NULL; - } - return Py_BuildValue("(ziNN)", text, (gint)spacing, - pygobject_new((GObject *)pixmap), - pygobject_new((GObject *)mask)); -} -%% -override gtk_clist_prepend kwargs -static PyObject * -_wrap_gtk_clist_prepend(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "text", NULL }; - int col, i; - PyObject *py_list; - gchar **list; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GtkCList.prepend", - kwlist, &py_list)) - return NULL; - if (!PySequence_Check(py_list)) { - PyErr_SetString(PyExc_TypeError, "argument not a sequence"); - return NULL; - } - col = GTK_CLIST(self->obj)->columns; - if (PySequence_Length(py_list) < col) { - PyErr_SetString(PyExc_TypeError, "sequence too short"); - return NULL; - } - list = g_new(gchar *, col); - for (i = 0; i < col; i++) { - PyObject *item = PySequence_GetItem(py_list, i); - - Py_DECREF(item); - if (!PyString_Check(item) && !PyUnicode_Check(item)) { - PyErr_SetString(PyExc_TypeError, - "sequence item not a string or unicode object"); - g_free(list); - return NULL; - } - list[i] = PyString_AsString(item); - } - i = gtk_clist_prepend(GTK_CLIST(self->obj), list); - g_free(list); - return PyInt_FromLong(i); -} -%% -override gtk_clist_append kwargs -static PyObject * -_wrap_gtk_clist_append(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "text", NULL }; - int col, i; - PyObject *py_list; - gchar **list; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GtkCList.append", - kwlist, &py_list)) - return NULL; - if (!PySequence_Check(py_list)) { - PyErr_SetString(PyExc_TypeError, "argument not a sequence"); - return NULL; - } - col = GTK_CLIST(self->obj)->columns; - if (PySequence_Length(py_list) < col) { - PyErr_SetString(PyExc_TypeError, "sequence too short"); - return NULL; - } - list = g_new(gchar *, col); - for (i = 0; i < col; i++) { - PyObject *item = PySequence_GetItem(py_list, i); - - Py_DECREF(item); - if (!PyString_Check(item) && !PyUnicode_Check(item)) { - PyErr_SetString(PyExc_TypeError, - "sequence item not a string or unicode object"); - g_free(list); - return NULL; - } - list[i] = PyString_AsString(item); - } - i = gtk_clist_append(GTK_CLIST(self->obj), list); - g_free(list); - return PyInt_FromLong(i); -} -%% -override gtk_clist_insert kwargs -static PyObject * -_wrap_gtk_clist_insert(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "row", "text", NULL }; - int col, row, i; - PyObject *py_list; - gchar **list; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iO:GtkCList.insert", - kwlist, &row, &py_list)) - return NULL; - if (!PySequence_Check(py_list)) { - PyErr_SetString(PyExc_TypeError, "argument not a sequence"); - return NULL; - } - col = GTK_CLIST(self->obj)->columns; - if (PySequence_Length(py_list) < col) { - PyErr_SetString(PyExc_TypeError, "sequence too short"); - return NULL; - } - list = g_new(gchar *, col); - for (i = 0; i < col; i++) { - PyObject *item = PySequence_GetItem(py_list, i); - - Py_DECREF(item); - if (!PyString_Check(item) && !PyUnicode_Check(item)) { - PyErr_SetString(PyExc_TypeError, - "sequence item not a string or unicode object"); - g_free(list); - return NULL; - } - list[i] = PyString_AsString(item); - } - i = gtk_clist_insert(GTK_CLIST(self->obj), row, list); - g_free(list); - return PyInt_FromLong(i); -} -%% -override gtk_clist_set_row_data kwargs -static PyObject * -_wrap_gtk_clist_set_row_data(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "row", "data", NULL }; - int row; - PyObject *data; - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iO:GtkCList.set_row_data", - kwlist, &row, &data)) - return NULL; - Py_INCREF(data); - gtk_clist_set_row_data_full(GTK_CLIST(self->obj), row, data, - (GtkDestroyNotify)pyg_destroy_notify); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_clist_get_row_data kwargs -static PyObject * -_wrap_gtk_clist_get_row_data(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "row", NULL }; - PyObject *ret; - int row; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:GtkCList.get_row_data", - kwlist, &row)) - return NULL; - ret = gtk_clist_get_row_data(GTK_CLIST(self->obj), row); - if (!ret) ret = Py_None; - Py_INCREF(ret); - return ret; -} -%% -override gtk_clist_find_row_from_data kwargs -static PyObject * -_wrap_gtk_clist_find_row_from_data(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "data", NULL }; - PyObject *data; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkCList.find_row_from_data", kwlist, - &data)) - return NULL; - return PyInt_FromLong(gtk_clist_find_row_from_data( - GTK_CLIST(self->obj), data)); -} -%% -override gtk_clist_get_selection_info kwargs -static PyObject * -_wrap_gtk_clist_get_selection_info(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "x", "y", NULL }; - gint x, y, row, column; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "ii:GtkCList.get_selection_info", kwlist, - &x, &y)) - return NULL; - if (gtk_clist_get_selection_info(GTK_CLIST(self->obj), x, y, - &row, &column)) - return Py_BuildValue("(ii)", row, column); - else { - Py_INCREF(Py_None); - return Py_None; - } -} -%% -override-attr GtkCList.selection -static PyObject * -_wrap_gtk_clist__get_selection(PyGObject *self, void *closure) -{ - guint row; - GList *selection; - PyObject *py_int, *ret = PyList_New(0); - - if (ret == NULL) - return NULL; - - for (selection = GTK_CLIST(self->obj)->selection; selection != NULL; - selection = selection->next) { - row = GPOINTER_TO_UINT(selection->data); - - py_int = PyInt_FromLong(row); - - if (!py_int) { - Py_DECREF(ret); - return NULL; - } - - PyList_Append(ret, py_int); - Py_DECREF(py_int); - } - return ret; - -} diff --git a/gtk/gtkcontainer.override b/gtk/gtkcontainer.override deleted file mode 100644 index 17a2c8a5..00000000 --- a/gtk/gtkcontainer.override +++ /dev/null @@ -1,1084 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * gtkcontainer.override: overrides for various container widgets. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -ignore - gtk_container_get_toplevels - gtk_container_add_child_arg_type - gtk_container_query_child_args - gtk_container_child_args_collect - gtk_container_child_arg_get_info - gtk_container_foreach_full - gtk_container_add_with_args - gtk_container_addv - gtk_container_child_set_valist - gtk_container_child_get_valist - gtk_container_class_find_child_property -%% -override gtk_container_children noargs -static PyObject * -_wrap_gtk_container_children(PyGObject *self) -{ - if (PyErr_Warn(PyExc_DeprecationWarning, "use GtkContainer.get_children")) - return NULL; - return _wrap_gtk_container_get_children(self); -} -%% -override gtk_container_get_children noargs -static PyObject * -_wrap_gtk_container_get_children(PyGObject *self) -{ - GList *list, *tmp; - PyObject *py_list; - - list = gtk_container_get_children(GTK_CONTAINER(self->obj)); - - if ((py_list = PyList_New(0)) == NULL) { - g_list_free(list); - return NULL; - } - for (tmp = list; tmp != NULL; tmp = tmp->next) { - PyObject *gtk_obj = pygobject_new(G_OBJECT(tmp->data)); - - if (gtk_obj == NULL) { - g_list_free(list); - Py_DECREF(py_list); - return NULL; - } - PyList_Append(py_list, gtk_obj); - Py_DECREF(gtk_obj); - } - g_list_free(list); - return py_list; -} -%% -override gtk_container_set_focus_chain kwargs -static PyObject * -_wrap_gtk_container_set_focus_chain(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "focusable_widgets", NULL }; - PyObject *py_focusable_widgets; - gint len, i; - GList *focusable_widgets = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkContainer.set_focus_chain", kwlist, - &py_focusable_widgets)) - return NULL; - if (!PySequence_Check(py_focusable_widgets)) { - PyErr_SetString(PyExc_TypeError, - "focusable_widgets must be a sequence"); - return NULL; - } - len = PySequence_Length(py_focusable_widgets); - for (i = 0; i < len; i++) { - PyObject *item = PySequence_GetItem(py_focusable_widgets, i); - - if (!pygobject_check(item, &PyGtkWidget_Type)) { - PyErr_SetString(PyExc_TypeError, - "focusable_widgets members must be GtkWidgets"); - Py_DECREF(item); - return NULL; - } - focusable_widgets = g_list_prepend(focusable_widgets, - pygobject_get(item)); - Py_DECREF(item); - } - focusable_widgets = g_list_reverse(focusable_widgets); - gtk_container_set_focus_chain(GTK_CONTAINER(self->obj), focusable_widgets); - g_list_free(focusable_widgets); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_container_get_focus_chain noargs -static PyObject * -_wrap_gtk_container_get_focus_chain(PyGObject *self) -{ - GList *list = NULL; - - if (gtk_container_get_focus_chain(GTK_CONTAINER(self->obj), &list)) { - PyObject *py_list; - GList *tmp; - - if ((py_list = PyList_New(0)) == NULL) { - g_list_free(list); - return NULL; - } - for (tmp = list; tmp != NULL; tmp = tmp->next) { - PyObject *gtk_obj = pygobject_new(G_OBJECT(tmp->data)); - - if (gtk_obj == NULL) { - g_list_free(list); - Py_DECREF(py_list); - return NULL; - } - PyList_Append(py_list, gtk_obj); - Py_DECREF(gtk_obj); - } - g_list_free(list); - return py_list; - } - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_container_child_get_property -static PyObject * -_wrap_gtk_container_child_get_property(PyGObject *self, PyObject *args) -{ - PyGObject *pychild; - gchar *property_name; - GtkContainer *container; - GtkWidget *child; - GList *children; - GObjectClass *class; - GParamSpec *pspec; - GValue value = { 0, } ; - PyObject *ret; - - if (!PyArg_ParseTuple(args, "O!s:GtkContainer.child_get_property", - &PyGtkWidget_Type, &pychild, - &property_name)) { - return NULL; - } - - container = GTK_CONTAINER(self->obj); - child = GTK_WIDGET(pychild->obj); - - children = gtk_container_get_children(container); - if (g_list_find(children, child) == NULL) { - PyErr_SetString(PyExc_TypeError, - "first argument must be a child"); - return NULL; - } - - class = G_OBJECT_GET_CLASS(container); - pspec = gtk_container_class_find_child_property(class, property_name); - if (!pspec) { - gchar buf[512]; - g_snprintf(buf, sizeof(buf), - "container does not support property `%s'", - property_name); - - PyErr_SetString(PyExc_TypeError, buf); - return NULL; - } - - g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec)); - - gtk_container_child_get_property(container, - child, - property_name, - &value); - - ret = pyg_value_as_pyobject(&value, TRUE); - g_value_unset(&value); - - return ret; -} -%% -override gtk_container_child_set_property -static PyObject * -_wrap_gtk_container_child_set_property(PyGObject *self, PyObject *args) -{ - gchar *property_name; - PyGObject *pychild; - GtkContainer *container; - GtkWidget *child; - GList *children; - PyGObject *pyvalue; - GObjectClass *class; - GParamSpec *pspec; - GValue value = { 0, } ; - - if (!PyArg_ParseTuple(args, "O!sO:GtkContainer.child_set_property", - &PyGtkWidget_Type, &pychild, - &property_name, &pyvalue)) { - return NULL; - } - - container = GTK_CONTAINER(self->obj); - child = GTK_WIDGET(pychild->obj); - - children = gtk_container_get_children(container); - if (g_list_find(children, child) == NULL) { - PyErr_SetString(PyExc_TypeError, - "first argument must be a child"); - return NULL; - } - - class = G_OBJECT_GET_CLASS(self->obj); - pspec = gtk_container_class_find_child_property(class, property_name); - if (!pspec) { - gchar buf[512]; - g_snprintf(buf, sizeof(buf), - "container does not support property `%s'", - property_name); - PyErr_SetString(PyExc_TypeError, buf); - - return NULL; - } - - g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec)); - - pyg_value_from_pyobject(&value, (PyObject*)pyvalue); - - gtk_container_child_set_property(container, - child, - property_name, - &value); - g_value_unset(&value); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_container_child_set -static PyObject * -_wrap_gtk_container_child_set(PyGObject *self, PyObject *args) -{ - PyGObject *pychild; - GtkContainer *container; - GtkWidget *child; - GList *children; - GObjectClass *class; - int len, i; - - if ((len = PyTuple_Size(args)) < 1) { - PyErr_SetString(PyExc_TypeError, "requires at least one argument"); - return NULL; - } - pychild = (PyGObject*)PyTuple_GetItem(args, 0); - if (!pygobject_check(pychild, &PyGtkWidget_Type)) { - PyErr_SetString(PyExc_TypeError, - "first argument should be a GtkWidget"); - return NULL; - } - - container = GTK_CONTAINER(self->obj); - child = GTK_WIDGET(pychild->obj); - - children = gtk_container_get_children(container); - if (g_list_find(children, child) == NULL) { - PyErr_SetString(PyExc_TypeError, - "first argument must be a child"); - return NULL; - } - - if ((len - 1) % 2) { - PyErr_SetString(PyExc_TypeError, - "Argument list must be column, value pairs. No -1 " - "termination is needed."); - return NULL; - } - - class = G_OBJECT_GET_CLASS(self->obj); - for (i = 1; i < len; i+=2) { - PyObject *py_property = PyTuple_GetItem(args, i); - PyObject *py_value = PyTuple_GetItem(args, i + 1); - gchar *property_name; - GParamSpec *pspec; - GValue value = { 0 }; - - if (!PyString_Check(py_property)) { - PyErr_SetString(PyExc_TypeError, - "Expected string argument for property."); - return NULL; - } - - property_name = PyString_AsString(py_property); - - pspec = gtk_container_class_find_child_property(class, property_name); - if (!pspec) { - gchar buf[512]; - g_snprintf(buf, sizeof(buf), - "container does not support property `%s'", - property_name); - PyErr_SetString(PyExc_TypeError, buf); - - return NULL; - } - - g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec)); - - pyg_value_from_pyobject(&value, (PyObject*)py_value); - - gtk_container_child_set_property(container, child, property_name, &value); - - g_value_unset(&value); - } - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_container_child_get -static PyObject * -_wrap_gtk_container_child_get(PyGObject *self, PyObject *args) -{ - PyGObject *pychild; - GtkContainer *container; - GtkWidget *child; - GList *children; - GObjectClass *class; - int len, i; - PyObject *tuple; - - if ((len = PyTuple_Size(args)) < 1) { - PyErr_SetString(PyExc_TypeError, "requires at least one argument"); - return NULL; - } - pychild = (PyGObject*)PyTuple_GetItem(args, 0); - if (!pygobject_check(pychild, &PyGtkWidget_Type)) { - PyErr_SetString(PyExc_TypeError, - "first argument should be a GtkWidget"); - return NULL; - } - - container = GTK_CONTAINER(self->obj); - child = GTK_WIDGET(pychild->obj); - - children = gtk_container_get_children(container); - if (g_list_find(children, child) == NULL) { - PyErr_SetString(PyExc_TypeError, - "first argument must be a child"); - return NULL; - } - - tuple = PyTuple_New(len-1); - class = G_OBJECT_GET_CLASS(self->obj); - for (i = 1; i < len; i++) { - PyObject *py_property = PyTuple_GetItem(args, i); - gchar *property_name; - GParamSpec *pspec; - GValue value = { 0 }; - PyObject *item; - - if (!PyString_Check(py_property)) { - PyErr_SetString(PyExc_TypeError, - "Expected string argument for property."); - return NULL; - } - - property_name = PyString_AsString(py_property); - - pspec = gtk_container_class_find_child_property(class, property_name); - if (!pspec) { - gchar buf[512]; - g_snprintf(buf, sizeof(buf), - "container does not support property `%s'", - property_name); - PyErr_SetString(PyExc_TypeError, buf); - - return NULL; - } - - g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec)); - - gtk_container_child_get_property(container, child, property_name, &value); - - item = pyg_value_as_pyobject(&value, TRUE); - PyTuple_SetItem(tuple, i-1, item); - - g_value_unset(&value); - } - return tuple; -} -%% -override gtk_container_add_with_properties -static PyObject * -_wrap_gtk_container_add_with_properties(PyGObject *self, PyObject *args) -{ - PyGObject *pychild; - GtkContainer *container; - GtkWidget *child; - GObjectClass *class; - int len, i; - - if ((len = PyTuple_Size(args)) < 1) { - PyErr_SetString(PyExc_TypeError, "requires at least one argument"); - return NULL; - } - pychild = (PyGObject*)PyTuple_GetItem(args, 0); - if (!pygobject_check(pychild, &PyGtkWidget_Type)) { - PyErr_SetString(PyExc_TypeError, - "first argument should be a GtkWidget"); - return NULL; - } - - container = GTK_CONTAINER(self->obj); - child = GTK_WIDGET(pychild->obj); - - if ((len - 1) % 2) { - PyErr_SetString(PyExc_TypeError, - "Argument list must be column, value pairs. No -1 " - "termination is needed."); - return NULL; - } - - gtk_widget_freeze_child_notify(child); - - gtk_container_add(container, child); - - class = G_OBJECT_GET_CLASS(self->obj); - for (i = 1; i < len; i+=2) { - PyObject *py_property = PyTuple_GetItem(args, i); - PyObject *py_value = PyTuple_GetItem(args, i + 1); - gchar *property_name; - GParamSpec *pspec; - GValue value = { 0 }; - - if (!PyString_Check(py_property)) { - PyErr_SetString(PyExc_TypeError, - "Expected string argument for property."); - return NULL; - } - - property_name = PyString_AsString(py_property); - - pspec = gtk_container_class_find_child_property(class, property_name); - if (!pspec) { - gchar buf[512]; - g_snprintf(buf, sizeof(buf), - "container does not support property `%s'", - property_name); - PyErr_SetString(PyExc_TypeError, buf); - - return NULL; - } - - g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec)); - - pyg_value_from_pyobject(&value, (PyObject*)py_value); - - gtk_container_child_set_property(container, child, property_name, &value); - - g_value_unset(&value); - } - - gtk_widget_thaw_child_notify(child); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_container_foreach -static void -pygtk_container_for_common_marshal(GtkWidget *widget, - gpointer data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = data; - PyObject *py_widget, *retobj; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - py_widget = pygobject_new((GObject*)widget); - if (cunote->data) - retobj = PyEval_CallFunction(cunote->func, "(NO)", - py_widget, cunote->data); - else - retobj = PyEval_CallFunction(cunote->func, "(N)", - py_widget); - - if (retobj == NULL) { - PyErr_Print(); - } - - Py_XDECREF(retobj); - - pyg_gil_state_release(state); -} -static PyObject * -pygtk_container_for_common(PyGObject *self, PyObject *args, unsigned for_index) -{ - PyObject *pyfunc, *pyarg = NULL; - PyGtkCustomNotify cunote; - static struct { - char *parse_arg; - void (*for_func)(GtkContainer *container, GtkCallback callback, - gpointer callback_data); - } table[] = { - { "O|O:GtkContainer.foreach", gtk_container_foreach }, - { "O|O:GtkContainer.forall", gtk_container_forall } - }; - - if (for_index >= countof(table)) { - PyErr_SetString(PyExc_TypeError, "for_index > 2"); - return NULL; - } - - if (!PyArg_ParseTuple(args, table[for_index].parse_arg, - &pyfunc, &pyarg)) - return NULL; - - cunote.func = pyfunc; - cunote.data = pyarg; - table[for_index].for_func(GTK_CONTAINER(self->obj), - pygtk_container_for_common_marshal, - &cunote); - Py_INCREF(Py_None); - return Py_None; -} -static PyObject * -_wrap_gtk_container_foreach(PyGObject *self, PyObject *args) -{ - return pygtk_container_for_common(self, args, PYGTK_CONTAINER_FOREACH); -} -%% -override gtk_container_forall -static PyObject * -_wrap_gtk_container_forall(PyGObject *self, PyObject *args) -{ - return pygtk_container_for_common(self, args, PYGTK_CONTAINER_FORALL); -} -%% -override gtk_container_class_list_child_properties kwargs -static PyObject * -_wrap_gtk_container_class_list_child_properties (PyObject *self, PyObject *args, - PyObject*kwargs) -{ - static char *kwlist[] = { "klass", NULL }; - GParamSpec **specs; - PyObject *py_itype, *list; - GType itype; - GObjectClass *class; - guint nprops; - guint i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:gtk.container_class_list_child_properties", kwlist, - &py_itype)) - return NULL; - - if ((itype = pyg_type_from_object(py_itype)) == 0) - return NULL; - - if (!g_type_is_a(itype, G_TYPE_OBJECT)) { - PyErr_SetString(PyExc_TypeError, "type must be derived from GObject"); - return NULL; - } - - class = g_type_class_ref(itype); - if (!class) { - PyErr_SetString(PyExc_RuntimeError, - "could not get a reference to type class"); - return NULL; - } - - specs = gtk_container_class_list_child_properties(class, &nprops); - list = PyTuple_New(nprops); - if (list == NULL) { - g_free(specs); - g_type_class_unref(class); - return NULL; - } - - for (i = 0; i < nprops; i++) { - PyTuple_SetItem(list, i, pyg_param_spec_new(specs[i])); - } - - g_free(specs); - g_type_class_unref(class); - - return list; -} -%% -define GtkContainer.list_child_properties noargs classmethod -static PyObject * -_wrap_gtk_container_list_child_properties (PyObject *self, PyObject *args, - PyObject*kwargs) -{ - GParamSpec **specs; - PyObject *list; - GType itype; - GObjectClass *class; - guint nprops; - guint i; - - if ((itype = pyg_type_from_object(self)) == 0) - return NULL; - - class = g_type_class_ref(itype); - if (!class) { - PyErr_SetString(PyExc_RuntimeError, - "could not get a reference to type class"); - return NULL; - } - - specs = gtk_container_class_list_child_properties(class, &nprops); - list = PyList_New(nprops); - if (list == NULL) { - g_free(specs); - g_type_class_unref(class); - return NULL; - } - - for (i = 0; i < nprops; i++) { - PyList_SetItem(list, i, pyg_param_spec_new(specs[i])); - } - - g_free(specs); - g_type_class_unref(class); - - return list; -} - -%% -override gtk_container_class_install_child_property kwargs -static PyObject * -_wrap_gtk_container_class_install_child_property (PyObject *self, - PyObject *args, - PyObject* kwargs) -{ - static char *kwlist[] = { "klass", "property_id", "pspec", NULL }; - PyObject *py_itype, *property; - GType itype; - GtkContainerClass *class; - guint property_id; - GParamSpec *pspec; - - if (PyErr_Warn(PyExc_DeprecationWarning, "use the gtk.Container.install_child_property classmethod")) - return NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OiO:container_class_install_child_property", - kwlist, - &py_itype, &property_id, &property)) - return NULL; - - - if ((itype = pyg_type_from_object(py_itype)) == 0) - return NULL; - - if (!g_type_is_a(itype, GTK_TYPE_CONTAINER)) { - PyErr_SetString(PyExc_TypeError, "type must be derived from GtkContainer"); - return NULL; - } - - class = g_type_class_ref(itype); - if (!class) { - PyErr_SetString(PyExc_RuntimeError, - "could not get a reference to type class"); - return NULL; - } - - pspec = pyg_param_spec_from_object(property); - if(!pspec) { - g_type_class_unref(class); - return NULL; - } - - if (gtk_container_class_find_child_property(G_OBJECT_CLASS(class), pspec->name)) { - PyErr_Format(PyExc_TypeError, - "there is already a '%s' property installed", pspec->name); - g_type_class_unref(class); - return NULL; - } - - gtk_container_class_install_child_property(class, property_id, pspec); - - g_type_class_unref(class); - - Py_INCREF(Py_None); - return Py_None; -} - -%% -define GtkContainer.install_child_property kwargs classmethod -static PyObject * -_wrap_gtk_container_install_child_property (PyObject *self, - PyObject *args, - PyObject* kwargs) -{ - static char *kwlist[] = { "property_id", "pspec", NULL }; - PyObject *property; - GType itype; - GtkContainerClass *class; - guint property_id; - GParamSpec *pspec; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "iO:container_class_install_child_property", - kwlist, - &property_id, &property)) - return NULL; - - - if ((itype = pyg_type_from_object(self)) == 0) - return NULL; - - class = g_type_class_ref(itype); - if (!class) { - PyErr_SetString(PyExc_RuntimeError, - "could not get a reference to type class"); - return NULL; - } - - pspec = pyg_param_spec_from_object(property); - if(!pspec) { - g_type_class_unref(class); - return NULL; - } - - if (gtk_container_class_find_child_property(G_OBJECT_CLASS(class), pspec->name)) { - PyErr_Format(PyExc_TypeError, - "there is already a '%s' property installed", pspec->name); - g_type_class_unref(class); - return NULL; - } - - gtk_container_class_install_child_property(class, property_id, pspec); - - g_type_class_unref(class); - - Py_INCREF(Py_None); - return Py_None; -} - -%% -override-slot GtkContainer.tp_iter - -typedef struct { - PyObject_HEAD - GList *list; -} PyGContainerIter; - -static void -pyg_container_iter_dealloc(PyGContainerIter *self) -{ - g_list_free(self->list); - PyObject_Del((PyObject*) self); -} - -static PyObject* -pygobject_container_iter_next(PyGContainerIter *iter) -{ - PyObject *child; - - if (!iter->list) { - PyErr_SetNone(PyExc_StopIteration); - return NULL; - } - - child = pygobject_new((GObject*)iter->list->data); - iter->list = g_list_next(iter->list); - return child; -} - -static PyTypeObject PyGContainerIter_Type = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ - "gobject.GContainerIter", /* tp_name */ - sizeof(PyGContainerIter), /* tp_basicsize */ - 0, /* tp_itemsize */ - (destructor)pyg_container_iter_dealloc, /* tp_dealloc */ - 0, /* tp_print */ - 0, /* tp_getattr */ - 0, /* tp_setattr */ - 0, /* tp_compare */ - 0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - 0, /* tp_hash */ - 0, /* tp_call */ - 0, /* tp_str */ - 0, /* tp_getattro */ - 0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - "GtkContainer child iterator", /* tp_doc */ - 0, /* tp_traverse */ - 0, /* tp_clear */ - 0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - 0, /* tp_iter */ - (iternextfunc)pygobject_container_iter_next, /* tp_iternext */ -}; - -static PyObject* -_wrap_gtk_container_tp_iter(PyGObject *self) -{ - PyGContainerIter *iter; - iter = PyObject_NEW(PyGContainerIter, &PyGContainerIter_Type); - iter->list = gtk_container_get_children(GTK_CONTAINER(self->obj)); - return (PyObject *) iter; -} -%% -override-slot GtkContainer.tp_as_sequence -static Py_ssize_t -_wrap_gtk_container_sq_length(PyGObject *self) -{ - return g_list_length(gtk_container_get_children(GTK_CONTAINER(self->obj))); -} - -static PySequenceMethods _wrap_gtk_container_tp_as_sequence = { - (lenfunc)_wrap_gtk_container_sq_length, - 0, - 0, - 0, - 0, - 0, - 0, -}; -%% -override-slot GtkContainer.tp_as_number -static int -_wrap_gtk_container_nb_nonzero(PyGObject *self) -{ - return 1; -} - -static PyNumberMethods _wrap_gtk_container_tp_as_number = { - (binaryfunc)0, - (binaryfunc)0, - (binaryfunc)0, - (binaryfunc)0, - (binaryfunc)0, - (binaryfunc)0, - (ternaryfunc)0, - (unaryfunc)0, - (unaryfunc)0, - (unaryfunc)0, - (inquiry)_wrap_gtk_container_nb_nonzero -}; - -%% -override GtkContainer__proxy_do_forall - -typedef struct { - GtkCallback func; - gpointer func_data; -} PyGtkContainerDataFuncData; - - -static PyObject * -_wrap_GtkContainerDataFunc(PyObject *self, PyObject *args) -{ - PyObject *py_widget; - PyObject *py_data; - PyGtkContainerDataFuncData *data; - - if (!PyArg_ParseTuple(args, "O!O!", - &PyGtkWidget_Type, &py_widget, - &PyCObject_Type, &py_data)) - return NULL; - - data = PyCObject_AsVoidPtr(py_data); - data->func(GTK_WIDGET(pygobject_get(py_widget)), data->func_data); - - Py_INCREF(Py_None); - return Py_None; -} - -static void -_wrap_GtkContainer__proxy_do_forall (GtkContainer *container, - gboolean include_internals, - GtkCallback callback, - gpointer callback_data) -{ - PyGILState_STATE state; - PyObject *self, *py_func, *py_func_data; - PyMethodDef pyfunc_def = { "GtkContainer.do_forall callback", - (PyCFunction)_wrap_GtkContainerDataFunc, - METH_VARARGS|METH_KEYWORDS }; - PyGtkContainerDataFuncData *data; - - state = pyg_gil_state_ensure(); - - self = pygobject_new((GObject *)container); - py_func = PyCFunction_NewEx(&pyfunc_def, NULL, NULL); - - data = g_new(PyGtkContainerDataFuncData, 1); - data->func = callback; - data->func_data = callback_data; - PyObject_Repr(self); - PyObject_Repr(py_func); - py_func_data = PyCObject_FromVoidPtr(data, NULL); - if (!PyObject_CallMethod(self, "do_forall", "ONN", - include_internals ? Py_True : Py_False, py_func, - py_func_data)) - PyErr_Print(); - - pyg_gil_state_release(state); -} -%% -override GtkContainer__proxy_do_set_child_property -static void -_wrap_GtkContainer__proxy_do_set_child_property (GtkContainer *container, - GtkWidget *child, - guint property_id, - const GValue *value, - GParamSpec *pspec) -{ - PyGILState_STATE state; - PyObject *self, *py_ret; - - state = pyg_gil_state_ensure(); - self = pygobject_new((GObject *) container); - - py_ret = PyObject_CallMethod(self, "do_set_child_property", "NNNN", - pygobject_new((GObject *) child), - PyLong_FromUnsignedLong(property_id), - pyg_value_as_pyobject(value, FALSE), - pyg_param_spec_new(pspec)); - if (!py_ret) { - PyErr_Print(); - Py_DECREF(self); - pyg_gil_state_release(state); - return; - } - Py_DECREF(self); - if (py_ret != Py_None) - PyErr_Warn(PyExc_Warning, "do_set_child_property must return None"); - Py_DECREF(py_ret); - - pyg_gil_state_release(state); -} - -%% -override GtkContainer__proxy_do_get_child_property -static void -_wrap_GtkContainer__proxy_do_get_child_property (GtkContainer *container, - GtkWidget *child, - guint property_id, - GValue *value, - GParamSpec *pspec) -{ - PyGILState_STATE state; - PyObject *self, *py_ret; - - state = pyg_gil_state_ensure(); - - self = pygobject_new((GObject*)container); - py_ret = PyObject_CallMethod(self, "do_get_child_property", "NNN", - pygobject_new((GObject *) child), - PyLong_FromUnsignedLong(property_id), - pyg_param_spec_new(pspec)); - if (!py_ret) { - PyErr_Print(); - Py_DECREF(self); - pyg_gil_state_release(state); - return; - } - Py_DECREF(self); - pyg_value_from_pyobject(value, py_ret); - Py_DECREF(py_ret); - - pyg_gil_state_release(state); -} - -%% -override GtkContainer__do_set_child_property kwargs -static PyObject * -_wrap_GtkContainer__do_set_child_property(PyObject *cls, PyObject *args, PyObject *kwargs) -{ - gpointer klass; - static char *kwlist[] = { "self", "child", "property_id", "value", "pspec", NULL }; - PyGObject *self, *child; - PyObject *py_property_id = NULL, *py_value, *py_pspec; - guint property_id = 0; - GValue value = {0, }; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!O!OOO!:GtkContainer.set_child_property", - kwlist, &PyGtkContainer_Type, &self, - &PyGtkWidget_Type, &child, - &py_property_id, - &py_value, - &PyGParamSpec_Type, &py_pspec)) - return NULL; - - if (pyg_value_from_pyobject(&value, py_value)) { - PyErr_SetString(PyExc_TypeError, "unable to convert value"); - return NULL; - } - - if (py_property_id) { - if (PyLong_Check(py_property_id)) - property_id = PyLong_AsUnsignedLong(py_property_id); - else if (PyInt_Check(py_property_id)) - property_id = PyInt_AsLong(py_property_id); - else - PyErr_SetString(PyExc_TypeError, "Parameter 'property_id' must be an int or a long"); - if (PyErr_Occurred()) - return NULL; - } - klass = g_type_class_ref(pyg_type_from_object(cls)); - if (GTK_CONTAINER_CLASS(klass)->set_child_property) - GTK_CONTAINER_CLASS(klass)->set_child_property(GTK_CONTAINER(self->obj), GTK_WIDGET(child->obj), property_id, - &value, ((PyGParamSpec *)py_pspec)->pspec); - else { - PyErr_SetString(PyExc_NotImplementedError, "virtual method GtkContainer.set_child_property not implemented"); - g_type_class_unref(klass); - return NULL; - } - g_type_class_unref(klass); - Py_INCREF(Py_None); - return Py_None; -} - -%% -override GtkContainer__do_get_child_property kwargs -static PyObject * -_wrap_GtkContainer__do_get_child_property(PyObject *cls, PyObject *args, PyObject *kwargs) -{ - gpointer klass; - static char *kwlist[] = { "self", "child", "property_id", "pspec", NULL }; - PyGObject *self, *child; - PyObject *py_property_id = NULL; - guint property_id = 0; - GValue value = {0, }; - PyObject *py_value, *py_pspec; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!O!OO!:GtkContainer.get_child_property", kwlist, - &PyGtkContainer_Type, &self, - &PyGtkWidget_Type, &child, - &py_property_id, - &PyGParamSpec_Type, &py_pspec)) - return NULL; - if (py_property_id) { - if (PyLong_Check(py_property_id)) - property_id = PyLong_AsUnsignedLong(py_property_id); - else if (PyInt_Check(py_property_id)) - property_id = PyInt_AsLong(py_property_id); - else - PyErr_SetString(PyExc_TypeError, "Parameter 'property_id' must be an int or a long"); - if (PyErr_Occurred()) - return NULL; - } - klass = g_type_class_ref(pyg_type_from_object(cls)); - if (GTK_CONTAINER_CLASS(klass)->get_child_property) - GTK_CONTAINER_CLASS(klass)->get_child_property(GTK_CONTAINER(self->obj), GTK_WIDGET(child->obj), property_id, - &value, ((PyGParamSpec *)py_pspec)->pspec); - else { - PyErr_SetString(PyExc_NotImplementedError, "virtual method GtkContainer.get_child_property not implemented"); - g_type_class_unref(klass); - return NULL; - } - g_type_class_unref(klass); - - py_value = pyg_value_as_pyobject(&value, TRUE); - g_value_unset(&value); - return py_value; -} diff --git a/gtk/gtkctree.override b/gtk/gtkctree.override deleted file mode 100644 index 9b962161..00000000 --- a/gtk/gtkctree.override +++ /dev/null @@ -1,527 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * gtkctree.override: overrides for the gtk.CTree widget. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -ignore gtk_ctree_construct - 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_find_node_ptr -%% -ignore gtk_ctree_new -%% -override-attr GtkCTree.selection -static PyObject * -_wrap_gtk_ctree__get_selection(PyGObject *self, void *closure) -{ - GList *selection; - GtkCTreeNode *node; - PyObject *ret, *py_node; - if ((ret = PyList_New(0)) == NULL) - return NULL; - - for (selection = GTK_CLIST(self->obj)->selection; selection != NULL; - selection = selection->next) { - node = selection->data; - if ((py_node = pyg_pointer_new(GTK_TYPE_CTREE_NODE, node)) == NULL) { - Py_DECREF(ret); - return NULL; - } - PyList_Append(ret, py_node); - Py_DECREF(py_node); - } - - return ret; -} -%% -override gtk_ctree_new_with_titles kwargs -static int -_wrap_gtk_ctree_new_with_titles(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "columns", "tree_column", "titles", NULL }; - int columns = 1, tree_column = 0; - PyObject *py_titles = NULL; - - if (PyErr_Warn(PyExc_DeprecationWarning, "use gtk.TreeView") < 0) - return -1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|iiO:GtkCTree.__init__", - kwlist, &columns, &tree_column, - &py_titles)) - return -1; - if (py_titles) { - gchar **titles; - gint i; - - if (!PySequence_Check(py_titles)) { - PyErr_SetString(PyExc_TypeError, "titles must be a sequence"); - return -1; - } - if (PySequence_Length(py_titles) < columns) { - PyErr_SetString(PyExc_TypeError, "titles too short"); - return -1; - } - titles = g_new(gchar *, columns); - for (i = 0; i < columns; i++) { - PyObject *item = PySequence_GetItem(py_titles, i); - - Py_DECREF(item); - if (!PyString_Check(item) && !PyUnicode_Check(item)) { - PyErr_SetString(PyExc_TypeError, - "sequence item not a string or unicode object"); - g_free(titles); - return -1; - } - titles[i] = PyString_AsString(item); - } - self->obj = (GObject *)gtk_ctree_new_with_titles(columns, - tree_column, titles); - g_free(titles); - } else - self->obj = (GObject *)gtk_ctree_new(columns, tree_column); - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError,"could not create GtkCTree object"); - return -1; - } - pygobject_register_wrapper((PyObject *)self); - return 0; -} -%% -override gtk_ctree_base_nodes -static PyObject* -_wrap_gtk_ctree_base_nodes(PyGObject *self, PyObject *args) -{ - PyObject *ret; - GtkCTreeNode *node; - - /* the first row is always a base node */ - node = GTK_CTREE_NODE(GTK_CLIST(self->obj)->row_list); - if ((ret = PyList_New(0)) == NULL) - return NULL; - while (node) { - PyObject *obj = pyg_pointer_new(GTK_TYPE_CTREE_NODE, node); - if (obj == NULL) { - Py_DECREF(ret); - return NULL; - } - PyList_Append(ret, obj); - Py_DECREF(obj); - node = GTK_CTREE_ROW(node)->sibling; - } - return ret; -} -%% -override gtk_ctree_insert_node kwargs -static PyObject * -_wrap_gtk_ctree_insert_node(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "parent", "sibling", "text", "spacing", - "pixmap_closed", "mask_closed", "pixmap_opened", - "mask_opened", "is_leaf", "expanded", NULL }; - PyObject *py_text; - PyGPointer *py_parent, *py_sibling; - PyGObject *py_pixmap_closed = (PyGObject *) Py_None; - PyGObject *py_mask_closed = (PyGObject *) Py_None; - PyGObject *py_pixmap_opened = (PyGObject *) Py_None; - PyGObject *py_mask_opened = (PyGObject *) Py_None; - GtkCTreeNode *parent = NULL, *sibling = NULL, *ret; - gchar **text = NULL; - GdkPixmap *pixmap_closed = NULL, *pixmap_opened = NULL; - GdkBitmap *mask_closed = NULL, *mask_opened = NULL; - gint spacing = 5, is_leaf = 1, expanded = 0, columns, i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OOO|iOOOOii:GtkCTree.insert_node", - kwlist, - &py_parent, &py_sibling, &py_text, - &spacing, &py_pixmap_closed, - &py_mask_closed, &py_pixmap_opened, - &py_mask_opened, &is_leaf, &expanded)) - return NULL; - if (pyg_pointer_check(py_parent, GTK_TYPE_CTREE_NODE)) - parent = pyg_pointer_get(py_parent, GtkCTreeNode); - else if ((PyObject *)py_parent != Py_None) { - PyErr_SetString(PyExc_TypeError, "parent must be a CTreeNode or None"); - return NULL; - } - if (pyg_pointer_check(py_sibling, GTK_TYPE_CTREE_NODE)) - sibling = pyg_pointer_get(py_sibling, GtkCTreeNode); - else if ((PyObject *)py_sibling != Py_None) { - PyErr_SetString(PyExc_TypeError,"sibling must be a CTreeNode or None"); - return NULL; - } - if (pygobject_check(py_pixmap_closed, &PyGdkPixmap_Type)) - pixmap_closed = GDK_PIXMAP(py_pixmap_closed->obj); - else if ((PyObject *)py_pixmap_closed != Py_None) { - PyErr_SetString(PyExc_TypeError, - "pixmap_closed must be a GdkPixmap or None"); - return NULL; - } - if (pygobject_check(py_mask_closed, &PyGdkPixmap_Type)) - mask_closed = GDK_PIXMAP(py_mask_closed->obj); - else if ((PyObject *)py_mask_closed != Py_None) { - PyErr_SetString(PyExc_TypeError, - "mask_closed must be a GdkBitmap or None"); - return NULL; - } - if (pygobject_check(py_pixmap_opened, &PyGdkPixmap_Type)) - pixmap_opened = GDK_PIXMAP(py_pixmap_opened->obj); - else if ((PyObject *)py_pixmap_opened != Py_None) { - PyErr_SetString(PyExc_TypeError, - "pixmap_opened must be a GdkPixmap or None"); - return NULL; - } - if (pygobject_check(py_mask_opened, &PyGdkPixmap_Type)) - mask_opened = GDK_PIXMAP(py_mask_opened->obj); - else if ((PyObject *)py_mask_opened != Py_None) { - PyErr_SetString(PyExc_TypeError, - "mask_opened must be a GdkBitmap or None"); - return NULL; - } - if (!PySequence_Check(py_text)) { - PyErr_SetString(PyExc_TypeError, "text must be a sequence"); - return NULL; - } - columns = GTK_CLIST(self->obj)->columns; - if (PySequence_Length(py_text) < columns) { - PyErr_SetString(PyExc_TypeError, "text is too short"); - return NULL; - } - text = g_new(gchar *, columns); - for (i = 0; i < columns; i++) { - PyObject *item = PySequence_GetItem(py_text, i); - - Py_DECREF(item); - if (!PyString_Check(item) && !PyUnicode_Check(item)) { - PyErr_SetString(PyExc_TypeError, - "sequence item not a string or unicode object"); - g_free(text); - return NULL; - } - text[i] = PyString_AsString(item); - } - ret = gtk_ctree_insert_node(GTK_CTREE(self->obj), parent, sibling, text, - spacing, pixmap_closed, mask_closed, - pixmap_opened, mask_opened, is_leaf, expanded); - g_free(text); - return pyg_pointer_new(GTK_TYPE_CTREE_NODE, ret); -} -%% -ignore gtk_ctree_find_by_row_data_custom gtk_ctree_find_all_by_row_data_custom -%% -override gtk_ctree_find_by_row_data kwargs -static PyObject * -_wrap_gtk_ctree_find_by_row_data(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "node", "data", NULL }; - PyObject *data; - PyGPointer *py_node; - GtkCTreeNode *node = NULL, *ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OO:GtkCTree.find_by_row_data", kwlist, - &py_node, &data)) - return NULL; - if (pyg_pointer_check(py_node, GTK_TYPE_CTREE_NODE)) - node = pyg_pointer_get(py_node, GtkCTreeNode); - else if ((PyObject *)py_node != Py_None) { - PyErr_SetString(PyExc_TypeError, "node must be a CTreeNode or None"); - return NULL; - } - ret = gtk_ctree_find_by_row_data(GTK_CTREE(self->obj), node, data); - if (ret) - return pyg_pointer_new(GTK_TYPE_CTREE_NODE, ret); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_ctree_find_all_by_row_data kwargs -static PyObject * -_wrap_gtk_ctree_find_all_by_row_data(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "node", "data", NULL }; - PyGPointer *py_node; - PyObject *data, *list; - GtkCTreeNode *node = NULL; - GList *ret, *tmp; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OO:GtkCTree.find_all_by_row_data",kwlist, - &py_node, &data)) - return NULL; - if (pyg_pointer_check(py_node, GTK_TYPE_CTREE_NODE)) - node = pyg_pointer_get(py_node, GtkCTreeNode); - else if ((PyObject *)py_node != Py_None) { - PyErr_SetString(PyExc_TypeError, "node must be a CTreeNode or None"); - return NULL; - } - ret = gtk_ctree_find_all_by_row_data(GTK_CTREE(self->obj), node, data); - if ((list = PyList_New(0)) == NULL) - return NULL; - for (tmp = ret; tmp != NULL; tmp = tmp->next) { - PyObject *item = pyg_pointer_new(GTK_TYPE_CTREE_NODE, - (GtkCTreeNode *) tmp->data); - if (item == NULL) { - Py_DECREF(list); - return NULL; - } - PyList_Append(list, item); - Py_DECREF(item); - } - g_list_free(ret); - return list; -} -%% -override gtk_ctree_node_get_text kwargs -static PyObject * -_wrap_gtk_ctree_node_get_text(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "node", "column", NULL }; - PyGPointer *node; - int column; - char *text = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "Oi:GtkCTree.node_get_text", kwlist, - &node, &column)) - return NULL; - - if (!pyg_pointer_check(node, GTK_TYPE_CTREE_NODE)) { - PyErr_SetString(PyExc_TypeError, "node must be a CTreeNode"); - return NULL; - } - - if (!gtk_ctree_node_get_text(GTK_CTREE(self->obj), - pyg_pointer_get(node, GtkCTreeNode), column, - &text)) { - PyErr_SetString(PyExc_ValueError, "can't get text value"); - return NULL; - } - return PyString_FromString(text); -} -%% -override gtk_ctree_node_get_pixmap kwargs -static PyObject * -_wrap_gtk_ctree_node_get_pixmap(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "node", "column", NULL }; - PyObject *node; - int column; - GdkPixmap *pixmap = NULL; - GdkBitmap *mask = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "Oi:GtkCTree.node_get_pixmap", kwlist, - &node, &column)) - return NULL; - - if (!pyg_pointer_check(node, GTK_TYPE_CTREE_NODE)) { - PyErr_SetString(PyExc_TypeError, "node must be a CTreeNode"); - return NULL; - } - - if (!gtk_ctree_node_get_pixmap(GTK_CTREE(self->obj), - pyg_pointer_get(node, GtkCTreeNode), column, - &pixmap, &mask)) { - PyErr_SetString(PyExc_ValueError, "can't get pixmap value"); - return NULL; - } - return Py_BuildValue("(NN)", pygobject_new((GObject *)pixmap), - pygobject_new((GObject *)mask)); -} -%% -override gtk_ctree_node_get_pixtext kwargs -static PyObject * -_wrap_gtk_ctree_node_get_pixtext(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "node", "column", NULL }; - PyObject *node; - int column; - gchar *text = NULL; - guint8 spacing; - GdkPixmap *pixmap = NULL; - GdkBitmap *mask = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "Oi:GtkCTree.node_get_pixtext", kwlist, - &node, &column)) - return NULL; - - if (!pyg_pointer_check(node, GTK_TYPE_CTREE_NODE)) { - PyErr_SetString(PyExc_TypeError, "node must be a CTreeNode"); - return NULL; - } - - if (!gtk_ctree_node_get_pixtext(GTK_CTREE(self->obj), - pyg_pointer_get(node, GtkCTreeNode), column, - &text, &spacing, &pixmap, &mask)) { - PyErr_SetString(PyExc_ValueError, "can't get pixtext value"); - return NULL; - } - return Py_BuildValue("(siNN)", text, (int)spacing, - pygobject_new((GObject *)pixmap), - pygobject_new((GObject *)mask)); -} -%% -override gtk_ctree_get_node_info kwargs -static PyObject * -_wrap_gtk_ctree_get_node_info(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "node", NULL }; - PyObject *node; - gchar *text; - guint8 spacing; - GdkPixmap *pixmap_closed, *pixmap_opened; - GdkBitmap *mask_closed, *mask_opened; - gboolean is_leaf, expanded; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GtkCTree.get_node_info", - kwlist, &node)) - return NULL; - - if (!pyg_pointer_check(node, GTK_TYPE_CTREE_NODE)) { - PyErr_SetString(PyExc_TypeError, "node must be a CTreeNode"); - return NULL; - } - - if (!gtk_ctree_get_node_info(GTK_CTREE(self->obj), pyg_pointer_get(node, GtkCTreeNode), - &text, &spacing, &pixmap_closed, &mask_closed, - &pixmap_opened, &mask_opened, - &is_leaf, &expanded)) { - PyErr_SetString(PyExc_ValueError, "can't get node info"); - return NULL; - } - return Py_BuildValue("(siNNNNii)", text, (int)spacing, - pygobject_new((GObject *)pixmap_opened), - pygobject_new((GObject *)mask_closed), - pygobject_new((GObject *)pixmap_opened), - pygobject_new((GObject *)mask_opened), - (int)is_leaf, (int)expanded); -} -%% -ignore gtk_ctree_node_set_row_data_full -%% -override gtk_ctree_node_set_row_data kwargs -static PyObject * -_wrap_gtk_ctree_node_set_row_data(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "node", "data", NULL }; - PyObject *node, *data; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OO:GtkCTree.node_set_row_data", kwlist, - &node, &data)) - return NULL; - - if (!pyg_pointer_check(node, GTK_TYPE_CTREE_NODE)) { - PyErr_SetString(PyExc_TypeError, "node must be a CTreeNode"); - return NULL; - } - - Py_INCREF(data); - gtk_ctree_node_set_row_data_full(GTK_CTREE(self->obj), - pyg_pointer_get(node, GtkCTreeNode), data, - (GDestroyNotify)pyg_destroy_notify); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_ctree_node_get_row_data kwargs -static PyObject * -_wrap_gtk_ctree_node_get_row_data(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "node", NULL }; - PyObject *node, *data; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkCTree.node_get_row_data", kwlist, - &node)) - return NULL; - - if (!pyg_pointer_check(node, GTK_TYPE_CTREE_NODE)) { - PyErr_SetString(PyExc_TypeError, "node must be a CTreeNode"); - return NULL; - } - - data = gtk_ctree_node_get_row_data(GTK_CTREE(self->obj), - pyg_pointer_get(node, GtkCTreeNode)); - if (!data) data = Py_None; - Py_INCREF(data); - return data; -} -%% -override-slot GtkCTreeNode.tp_getattr -static PyObject * -_wrap_gtk_ctree_node_tp_getattr(PyGPointer *self, char *attr) -{ - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[ssssss]", "children", "expanded", "is_leaf", - "level", "parent", "sibling"); - if (!strcmp(attr, "parent")) { - GtkCTreeNode *node = GTK_CTREE_ROW(pyg_pointer_get(self, GtkCTreeNode))->parent; - if (node) - return pyg_pointer_new(GTK_TYPE_CTREE_NODE, node); - Py_INCREF(Py_None); - return Py_None; - } else if (!strcmp(attr, "sibling")) { - GtkCTreeNode *node = GTK_CTREE_ROW(pyg_pointer_get(self, GtkCTreeNode))->sibling; - if (node) - return pyg_pointer_new(GTK_TYPE_CTREE_NODE, node); - Py_INCREF(Py_None); - return Py_None; - } else if (!strcmp(attr, "children")) { - GtkCTreeNode *node = GTK_CTREE_ROW(pyg_pointer_get(self, GtkCTreeNode))->children; - PyObject *ret = PyList_New(0); - if (ret == NULL) - return NULL; - while (node) { - PyObject *py_node = pyg_pointer_new(GTK_TYPE_CTREE_NODE, node); - if (py_node == NULL) { - Py_DECREF(ret); - return NULL; - } - PyList_Append(ret, py_node); - Py_DECREF(py_node); - node = GTK_CTREE_ROW(node)->sibling; - } - return ret; - } else if (!strcmp(attr, "level")) - return PyInt_FromLong(GTK_CTREE_ROW(pyg_pointer_get(self, GtkCTreeNode))->level); - else if (!strcmp(attr, "is_leaf")) - return PyInt_FromLong(GTK_CTREE_ROW(pyg_pointer_get(self, GtkCTreeNode))->is_leaf); - else if (!strcmp(attr, "expanded")) - return PyInt_FromLong(GTK_CTREE_ROW(pyg_pointer_get(self, GtkCTreeNode))->expanded); - PyErr_SetString(PyExc_AttributeError, attr); - return NULL; -} diff --git a/gtk/gtkiconview.override b/gtk/gtkiconview.override deleted file mode 100644 index f309ca3e..00000000 --- a/gtk/gtkiconview.override +++ /dev/null @@ -1,336 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 2005 John Finlay, Johan Dahlin - * - * gtkiconview.override: overrides for the gtk.IconView object. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -ignore - gtk_icon_view_new_with_model -%% -new-constructor GTK_TYPE_ICON_VIEW -%% -override gtk_icon_view_new kwargs -static int -_wrap_gtk_icon_view_new(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "model", NULL }; - PyGObject *pymodel = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:GtkIconView.__init__", - kwlist, &pymodel)) - return -1; - if (pymodel == NULL || (PyObject *)pymodel == Py_None) - pygobject_construct(self, NULL); - else if (pygobject_check(pymodel, &PyGtkTreeModel_Type)) - pygobject_construct(self, "model", GTK_TREE_MODEL(pymodel->obj), NULL); - else { - PyErr_SetString(PyExc_TypeError, - "model must be a gtk.TreeModel or None"); - return -1; - } - - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkIconView object"); - return -1; - } - return 0; -} -%% -override gtk_icon_view_get_selected_items noargs -static PyObject * -_wrap_gtk_icon_view_get_selected_items(PyGObject *self) -{ - GList *paths; - PyObject *py_paths; - int plen, i; - - paths = gtk_icon_view_get_selected_items(GTK_ICON_VIEW(self->obj)); - - plen = g_list_length(paths); - if ((py_paths = PyList_New(plen)) == NULL) - return NULL; - for (i = 0; i < plen; i++) { - GtkTreePath *path = (GtkTreePath *)g_list_nth_data(paths, i); - PyObject *pypath = pygtk_tree_path_to_pyobject(path); - PyList_SET_ITEM(py_paths, i, pypath); - } - g_list_foreach(paths, (GFunc)gtk_tree_path_free, NULL); - g_list_free(paths); - return py_paths; -} -%% -override gtk_icon_view_selected_foreach kwargs -static void -pygtk_icon_view_selected_foreach_cb(GtkIconView *iconview, - GtkTreePath *path, - gpointer user_data) -{ - PyGILState_STATE state; - PyObject *callback, *args, *ret; - - state = pyg_gil_state_ensure(); - callback = PyTuple_GetItem((PyObject *)user_data, 0); - args = Py_BuildValue("(NNO)", - pygobject_new((GObject *)iconview), - pygtk_tree_path_to_pyobject(path), - PyTuple_GetItem((PyObject *)user_data, 1)); - ret = PyObject_CallObject(callback, args); - if (!ret) - PyErr_Print(); - Py_XDECREF(ret); - Py_DECREF(args); - pyg_gil_state_release(state); -} -static PyObject * -_wrap_gtk_icon_view_selected_foreach(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "func", "data", NULL }; - PyObject *func, *data, *py_data = Py_None; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:GtkIconView.foreach", - kwlist, &func, &py_data)) { - return NULL; - } - if (!PyCallable_Check(func)) { - PyErr_SetString(PyExc_TypeError, "func must be callable"); - return NULL; - } - - data = Py_BuildValue("(OO)", func, py_data); - - gtk_icon_view_selected_foreach(GTK_ICON_VIEW(self->obj), - pygtk_icon_view_selected_foreach_cb, - (gpointer)data); - Py_DECREF(data); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_icon_view_get_item_at_pos kwargs -static PyObject * -_wrap_gtk_icon_view_get_item_at_pos(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "x", "y", NULL }; - GtkTreePath *path; - GtkCellRenderer *renderer; - gint x,y; - gboolean r; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "ii:GtkIconView.get_item_at_pos", - kwlist, - &x, &y)) - return NULL; - - - r = gtk_icon_view_get_item_at_pos(GTK_ICON_VIEW(self->obj), x, y, &path, &renderer); - if (r && path) { - PyObject *py_path = pygtk_tree_path_to_pyobject(path); - gtk_tree_path_free(path); - return Py_BuildValue("(NN)", py_path, pygobject_new((GObject*)renderer)); - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_icon_view_get_visible_range noargs -static PyObject * -_wrap_gtk_icon_view_get_visible_range(PyGObject *self) -{ - GtkTreePath *start_path, *end_path; - gboolean r; - - r = gtk_icon_view_get_visible_range(GTK_ICON_VIEW(self->obj), - &start_path, &end_path); - if (r) { - PyObject *py_start_path = pygtk_tree_path_to_pyobject(start_path); - PyObject *py_end_path = pygtk_tree_path_to_pyobject(end_path); - gtk_tree_path_free(start_path); - gtk_tree_path_free(end_path); - return Py_BuildValue("(NN)", py_start_path, py_end_path); - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_icon_view_get_cursor noargs -static PyObject * -_wrap_gtk_icon_view_get_cursor(PyGObject *self) -{ - GtkTreePath *path; - GtkCellRenderer *renderer; - gboolean r; - - r = gtk_icon_view_get_cursor(GTK_ICON_VIEW(self->obj), &path, &renderer); - if (r && path) { - PyObject *py_path = pygtk_tree_path_to_pyobject(path); - gtk_tree_path_free(path); - return Py_BuildValue("(NN)", py_path, pygobject_new((GObject*)renderer)); - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_icon_view_get_drag_dest_item noargs -static PyObject * -_wrap_gtk_icon_view_get_drag_dest_item(PyGObject *self) -{ - GtkTreePath *path; - GtkIconViewDropPosition pos; - - gtk_icon_view_get_drag_dest_item(GTK_ICON_VIEW(self->obj), &path, &pos); - if (path) { - PyObject *py_path = pygtk_tree_path_to_pyobject(path); - gtk_tree_path_free(path); - return Py_BuildValue("(NN)", py_path, - pyg_enum_from_gtype(GTK_TYPE_ICON_VIEW_DROP_POSITION, (gint)pos)); - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_icon_view_get_dest_item_at_pos kwargs -static PyObject * -_wrap_gtk_icon_view_get_dest_item_at_pos(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "x", "y", NULL }; - GtkTreePath *path; - GtkIconViewDropPosition pos; - gint drag_x, drag_y; - gboolean r; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "ii:GtkIconView.get_dest_item_at_pos", - kwlist, &drag_x, &drag_y)) - return NULL; - - - r = gtk_icon_view_get_dest_item_at_pos(GTK_ICON_VIEW(self->obj), - drag_x, drag_y, &path, &pos); - if (r && path) { - PyObject *py_path = pygtk_tree_path_to_pyobject(path); - gtk_tree_path_free(path); - return Py_BuildValue("(NN)", py_path, - pyg_enum_from_gtype(GTK_TYPE_ICON_VIEW_DROP_POSITION, (gint) pos)); - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_icon_view_enable_model_drag_source kwargs -static PyObject * -_wrap_gtk_icon_view_enable_model_drag_source(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "start_button_mask", "targets", "actions", NULL }; - PyObject *py_sbmask, *py_targets, *py_actions; - GdkModifierType sbmask; - GtkTargetEntry *targets; - GdkDragAction actions; - gint n_targets, i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OOO:GtkIconView.enable_model_drag_source", - kwlist, - &py_sbmask, &py_targets, &py_actions)) - return NULL; - if (pyg_flags_get_value(GDK_TYPE_MODIFIER_TYPE, - py_sbmask, (gint *)&sbmask)) - return NULL; - if (pyg_flags_get_value(GDK_TYPE_DRAG_ACTION, - py_actions, (gint *)&actions)) - return NULL; - if (!PySequence_Check(py_targets)) { - PyErr_SetString(PyExc_TypeError, "targets must be a sequence"); - return NULL; - } - n_targets = PySequence_Length(py_targets); - targets = g_new(GtkTargetEntry, n_targets); - for (i = 0; i < n_targets; i++) { - PyObject *item = PySequence_GetItem(py_targets, i); - Py_DECREF(item); - if (!PyArg_ParseTuple(item, "zii", &targets[i].target, - &targets[i].flags, &targets[i].info)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "list items should be of form (string,int,int)"); - g_free(targets); - return NULL; - } - } - gtk_icon_view_enable_model_drag_source(GTK_ICON_VIEW(self->obj), - sbmask, targets, n_targets, actions); - g_free(targets); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_icon_view_enable_model_drag_dest kwargs -static PyObject * -_wrap_gtk_icon_view_enable_model_drag_dest(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "targets", "actions", NULL }; - PyObject *py_targets, *py_actions; - GtkTargetEntry *targets; - GdkDragAction actions; - gint n_targets, i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OO:GtkIconView.enable_model_drag_dest", - kwlist, - &py_targets, &py_actions)) - return NULL; - if (pyg_flags_get_value(GDK_TYPE_DRAG_ACTION, - py_actions, (gint *)&actions)) - return NULL; - if (!PySequence_Check(py_targets)) { - PyErr_SetString(PyExc_TypeError, "targets must be a sequence"); - return NULL; - } - n_targets = PySequence_Length(py_targets); - targets = g_new(GtkTargetEntry, n_targets); - for (i = 0; i < n_targets; i++) { - PyObject *item = PySequence_GetItem(py_targets, i); - Py_DECREF(item); - if (!PyArg_ParseTuple(item, "zii", &targets[i].target, - &targets[i].flags, &targets[i].info)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "list items should be of form (string,int,int)"); - g_free(targets); - return NULL; - } - } - gtk_icon_view_enable_model_drag_dest(GTK_ICON_VIEW(self->obj), - targets, n_targets, actions); - g_free(targets); - Py_INCREF(Py_None); - return Py_None; -} diff --git a/gtk/gtkmodule.c b/gtk/gtkmodule.c deleted file mode 100644 index be8ee6c9..00000000 --- a/gtk/gtkmodule.c +++ /dev/null @@ -1,249 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * gtkmodule.c: module wrapping the GTK library - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -/* include this first, before NO_IMPORT_PYGOBJECT is defined */ -#include -#include "pygtk-private.h" -#include - -#ifdef HAVE_PYCAIRO -# include -Pycairo_CAPI_t *Pycairo_CAPI; -#endif - -void _pygtk_register_boxed_types(PyObject *moddict); -void pygtk_register_classes(PyObject *d); -void pygdk_register_classes(PyObject *d); -void pygtk_add_constants(PyObject *module, const gchar *strip_prefix); -void pygdk_add_constants(PyObject *module, const gchar *strip_prefix); - -extern PyMethodDef pygtk_functions[]; -extern PyMethodDef pygdk_functions[]; - -static PyObject *PyGtkDeprecationWarning; -PyObject *PyGtkWarning; - -static struct _PyGtk_FunctionStruct functions = { - VERSION, - - &PyGdkAtom_Type, PyGdkAtom_New, - pygdk_rectangle_from_pyobject, - pygtk_tree_path_to_pyobject, - pygtk_tree_path_from_pyobject, -}; - -static void -sink_gtkwindow(GObject *object) -{ - if (object->ref_count == 1 - && GTK_WINDOW(object)->has_user_ref_count) { - g_object_ref(object); - } -} - -static void -sink_gtkinvisible(GObject *object) -{ - if (object->ref_count == 1 - && GTK_INVISIBLE(object)->has_user_ref_count) { - g_object_ref(object); - } -} - -static void -sink_gtkobject(GObject *object) -{ - if (GTK_OBJECT_FLOATING(object)) { - g_object_ref(object); - gtk_object_sink(GTK_OBJECT(object)); - } -} - -static void -pygtk_add_stock_items(PyObject *d) -{ - GSList *stock_ids, *cur; - char buf[128]; - - stock_ids = gtk_stock_list_ids(); - strcpy(buf, "STOCK_"); - for (cur = stock_ids; cur; cur = stock_ids) { - char *ctmp; - PyObject *obj; - int i; - - ctmp = cur->data; - if(strncmp(ctmp, "gtk-", 4)) { - g_free(cur->data); - stock_ids = cur->next; - g_slist_free_1(cur); - continue; - } - ctmp += 4; - - strcpy(buf + sizeof("STOCK"), ctmp); - ctmp = buf + sizeof("STOCK"); - for (i = 0; ctmp[i]; i++) { - if (ctmp[i] == '-') - ctmp[i] = '_'; - else if (ctmp[i] >= 'a' && ctmp[i] <= 'z') - ctmp[i] -= 'a'-'A'; - } - - obj = PyString_FromString(cur->data); - PyDict_SetItemString(d, buf, obj); - Py_DECREF(obj); - g_free(cur->data); - stock_ids = cur->next; - g_slist_free_1(cur); - } - -} - -static void -pygdk_add_extra_constants(PyObject *m) -{ - gchar * aname; - - PyModule_AddObject(m, "PARENT_RELATIVE", - PyLong_FromLong(GDK_PARENT_RELATIVE)); - /* Add predefined atoms */ -#define add_atom(name) { aname = gdk_atom_name((GDK_##name)); \ -PyModule_AddObject(m, #name, PyString_FromString(aname)); \ -g_free(aname); } - - add_atom(SELECTION_PRIMARY); - add_atom(SELECTION_SECONDARY); - add_atom(SELECTION_CLIPBOARD); - add_atom(TARGET_BITMAP); - add_atom(TARGET_COLORMAP); - add_atom(TARGET_DRAWABLE); - add_atom(TARGET_PIXMAP); - add_atom(TARGET_STRING); - add_atom(SELECTION_TYPE_ATOM); - add_atom(SELECTION_TYPE_BITMAP); - add_atom(SELECTION_TYPE_COLORMAP); - add_atom(SELECTION_TYPE_DRAWABLE); - add_atom(SELECTION_TYPE_INTEGER); - add_atom(SELECTION_TYPE_PIXMAP); - add_atom(SELECTION_TYPE_WINDOW); - add_atom(SELECTION_TYPE_STRING); -#undef add_atom -} - -static void -pygtk_add_extra_constants(PyObject *m) -{ -#if GTK_CHECK_VERSION(2, 9, 3) - PyModule_AddObject(m, "PAPER_NAME_A3", - PyString_FromString(GTK_PAPER_NAME_A3)); - PyModule_AddObject(m, "PAPER_NAME_A4", - PyString_FromString(GTK_PAPER_NAME_A4)); - PyModule_AddObject(m, "PAPER_NAME_A5", - PyString_FromString(GTK_PAPER_NAME_A5)); - PyModule_AddObject(m, "PAPER_NAME_B5", - PyString_FromString(GTK_PAPER_NAME_B5)); - PyModule_AddObject(m, "PAPER_NAME_LETTER", - PyString_FromString(GTK_PAPER_NAME_LETTER)); - PyModule_AddObject(m, "PAPER_NAME_EXECUTIVE", - PyString_FromString(GTK_PAPER_NAME_EXECUTIVE)); - PyModule_AddObject(m, "PAPER_NAME_LEGAL", - PyString_FromString(GTK_PAPER_NAME_LEGAL)); -#endif -} - -static gboolean -init_pycairo(void) -{ -#ifdef HAVE_PYCAIRO - Pycairo_IMPORT; - if (Pycairo_CAPI == NULL) - return FALSE; -#endif - return TRUE; -} - -DL_EXPORT(void) -init_gtk(void) -{ - PyObject *m, *d, *tuple, *o; - - /* initialise pygobject */ - init_pygobject_check(2, 12, 0); - g_assert(pygobject_register_class != NULL); - - /* initialise pycairo */ - if (!init_pycairo()) - return; - - /* initialise pygtk */ - gtk_type_init(0); - - pygobject_register_sinkfunc(GTK_TYPE_WINDOW, sink_gtkwindow); - pygobject_register_sinkfunc(GTK_TYPE_INVISIBLE, sink_gtkinvisible); - pygobject_register_sinkfunc(GTK_TYPE_OBJECT, sink_gtkobject); - - m = Py_InitModule("gtk._gtk", pygtk_functions); - d = PyModule_GetDict(m); - - /* gtk+ version */ - tuple = Py_BuildValue("(iii)", gtk_major_version, gtk_minor_version, - gtk_micro_version); - PyDict_SetItemString(d, "gtk_version", tuple); - Py_DECREF(tuple); - - /* pygtk version */ - tuple = Py_BuildValue("(iii)", PYGTK_MAJOR_VERSION, PYGTK_MINOR_VERSION, - PYGTK_MICRO_VERSION); - PyDict_SetItemString(d, "pygtk_version", tuple); - Py_DECREF(tuple); - - _pygtk_register_boxed_types(d); - pygtk_register_classes(d); - pygtk_add_constants(m, "GTK_"); - pygtk_add_extra_constants(m); - pygtk_add_stock_items(d); - - /* extension API */ - PyDict_SetItemString(d, "_PyGtk_API", - o=PyCObject_FromVoidPtr(&functions, NULL)); - Py_DECREF(o); - - PyGtkDeprecationWarning = PyErr_NewException("gtk.GtkDeprecationWarning", - PyExc_DeprecationWarning, NULL); - PyDict_SetItemString(d, "DeprecationWarning", PyGtkDeprecationWarning); - - PyGtkWarning = PyErr_NewException("gtk.GtkWarning", PyExc_Warning, NULL); - PyDict_SetItemString(d, "Warning", PyGtkWarning); - - /* namespace all the gdk stuff in gtk.gdk ... */ - m = Py_InitModule("gtk.gdk", pygdk_functions); - d = PyModule_GetDict(m); - - pygdk_register_classes(d); - pygdk_add_constants(m, "GDK_"); - pygdk_add_extra_constants(m); -} diff --git a/gtk/gtkobject-support.c b/gtk/gtkobject-support.c deleted file mode 100644 index 1871ef15..00000000 --- a/gtk/gtkobject-support.c +++ /dev/null @@ -1,138 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2006 James Henstridge - * - * gtkobject-support.c: some helper routines for the GTK module. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -/* this module provides some of the base functionality of the GtkObject - * wrapper system */ - -#include "pygtk-private.h" - -/* ------------------- object support */ - -void -pygtk_custom_destroy_notify(gpointer user_data) -{ - PyGtkCustomNotify *cunote = user_data; - PyGILState_STATE state; - - g_return_if_fail(user_data); - state = pyg_gil_state_ensure(); - Py_XDECREF(cunote->func); - Py_XDECREF(cunote->data); - pyg_gil_state_release(state); - - g_free(cunote); -} - -GdkAtom* -pygdk_atom_vector_from_sequence(PyObject *py_targets, gint *n_targets) -{ - gint i; - GdkAtom *targets; - - if (!(py_targets = PySequence_Fast(py_targets, - "targets must be a sequence"))) - return NULL; - - *n_targets = PySequence_Fast_GET_SIZE(py_targets); - targets = g_new(GdkAtom, *n_targets); - for (i = 0; i < *n_targets; i++) { - PyObject *trgt = PySequence_Fast_GET_ITEM(py_targets, i); - targets[i] = pygdk_atom_from_pyobject(trgt); - if (PyErr_Occurred()) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "each 'targets' item must be a GdkAtom or string"); - g_free(targets); - Py_DECREF(py_targets); - return NULL; - } - } - Py_DECREF(py_targets); - return targets; -} - -GtkTargetList * -pygtk_target_list_from_sequence(PyObject *py_targets) -{ - gint n_targets, i; - GtkTargetEntry *targets; - GtkTargetList *target_list; - - if (!(py_targets = PySequence_Fast(py_targets, - "target list must be a sequence"))) - return NULL; - n_targets = PySequence_Fast_GET_SIZE(py_targets); - targets = g_new(GtkTargetEntry, n_targets); - for (i = 0; i < n_targets; i++) { - PyObject *item = PySequence_Fast_GET_ITEM(py_targets, i); - if (!PyArg_ParseTuple(item, "sii", &targets[i].target, - &targets[i].flags, &targets[i].info)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "target list items should be of form (string,int,int)"); - g_free(targets); - Py_DECREF(py_targets); - return NULL; - } - } - target_list = gtk_target_list_new(targets, n_targets); - g_free(targets); - Py_DECREF(py_targets); - return target_list; -} - -PyObject * -pygtk_target_list_to_list(GtkTargetList *targets) -{ - GList *tmp; - PyObject *list = PyList_New(0); - - for (tmp = targets->list; tmp != NULL; tmp = tmp->next) { - GtkTargetPair *pair = tmp->data; - PyObject *item; - gchar * name = gdk_atom_name(pair->target); - item = Py_BuildValue("(Nii)", - PyString_FromString(name), - pair->flags, pair->info); - PyList_Append(list, item); - g_free(name); - Py_DECREF(item); - } - return list; -} - -void -pygtk_boxed_unref_shared(PyObject *boxed) -{ - PyGBoxed *pyboxed; - g_return_if_fail(boxed != NULL && PyObject_TypeCheck(boxed, &PyGBoxed_Type)); - pyboxed = (PyGBoxed *) boxed; - if (pyboxed->ob_refcnt != 1) { - if (!pyboxed->free_on_dealloc) { - pyboxed->boxed = g_boxed_copy(pyboxed->gtype, - pyboxed->boxed); - pyboxed->free_on_dealloc = TRUE; - } - } - Py_DECREF(boxed); -} - diff --git a/gtk/gtkstyle.override b/gtk/gtkstyle.override deleted file mode 100644 index 40dd2f1f..00000000 --- a/gtk/gtkstyle.override +++ /dev/null @@ -1,277 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * gtkstyle.override: overrides for the gtk.Style object. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -override-attr GtkStyle.fg -static PyObject * -_wrap_gtk_style__get_fg(PyGObject *self, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - return _pygtk_style_helper_new(style, STYLE_COLOUR_ARRAY, style->fg); -} -%% -override-attr GtkStyle.bg -static PyObject * -_wrap_gtk_style__get_bg(PyGObject *self, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - return _pygtk_style_helper_new(style, STYLE_COLOUR_ARRAY, style->bg); -} -%% -override-attr GtkStyle.light -static PyObject * -_wrap_gtk_style__get_light(PyGObject *self, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - return _pygtk_style_helper_new(style, STYLE_COLOUR_ARRAY, style->light); -} -%% -override-attr GtkStyle.dark -static PyObject * -_wrap_gtk_style__get_dark(PyGObject *self, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - return _pygtk_style_helper_new(style, STYLE_COLOUR_ARRAY, style->dark); -} -%% -override-attr GtkStyle.mid -static PyObject * -_wrap_gtk_style__get_mid(PyGObject *self, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - return _pygtk_style_helper_new(style, STYLE_COLOUR_ARRAY, style->mid); -} -%% -override-attr GtkStyle.text -static PyObject * -_wrap_gtk_style__get_text(PyGObject *self, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - return _pygtk_style_helper_new(style, STYLE_COLOUR_ARRAY, style->text); -} -%% -override-attr GtkStyle.base -static PyObject * -_wrap_gtk_style__get_base(PyGObject *self, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - return _pygtk_style_helper_new(style, STYLE_COLOUR_ARRAY, style->base); -} -%% -override-attr GtkStyle.text_aa -static PyObject * -_wrap_gtk_style__get_text_aa(PyGObject *self, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - return _pygtk_style_helper_new(style, STYLE_COLOUR_ARRAY, style->text_aa); -} -%% -override-attr GtkStyle.white -static PyObject * -_wrap_gtk_style__get_white(PyGObject *self, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - return pyg_boxed_new(GDK_TYPE_COLOR, &style->white, TRUE, TRUE); -} -static int -_wrap_gtk_style__set_white(PyGObject *self, PyObject *value, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - if (!pyg_boxed_check(value, GDK_TYPE_COLOR)) { - PyErr_SetString(PyExc_TypeError, "can only assign a GdkColor"); - return -1; - } - style->white = *pyg_boxed_get(value, GdkColor); - return 0; -} -%% -override-attr GtkStyle.black -static PyObject * -_wrap_gtk_style__get_black(PyGObject *self, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - return pyg_boxed_new(GDK_TYPE_COLOR, &style->black, TRUE, TRUE); -} -static int -_wrap_gtk_style__set_black(PyGObject *self, PyObject *value, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - if (!pyg_boxed_check(value, GDK_TYPE_COLOR)) { - PyErr_SetString(PyExc_TypeError, "can only assign a GdkColor"); - return -1; - } - style->black = *pyg_boxed_get(value, GdkColor); - return 0; -} -%% -override-attr GtkStyle.fg_gc -static PyObject * -_wrap_gtk_style__get_fg_gc(PyGObject *self, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - return _pygtk_style_helper_new(style, STYLE_GC_ARRAY, style->fg_gc); -} -%% -override-attr GtkStyle.bg_gc -static PyObject * -_wrap_gtk_style__get_bg_gc(PyGObject *self, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - return _pygtk_style_helper_new(style, STYLE_GC_ARRAY, style->bg_gc); -} -%% -override-attr GtkStyle.light_gc -static PyObject * -_wrap_gtk_style__get_light_gc(PyGObject *self, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - return _pygtk_style_helper_new(style, STYLE_GC_ARRAY, style->light_gc); -} -%% -override-attr GtkStyle.dark_gc -static PyObject * -_wrap_gtk_style__get_dark_gc(PyGObject *self, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - return _pygtk_style_helper_new(style, STYLE_GC_ARRAY, style->dark_gc); -} -%% -override-attr GtkStyle.mid_gc -static PyObject * -_wrap_gtk_style__get_mid_gc(PyGObject *self, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - return _pygtk_style_helper_new(style, STYLE_GC_ARRAY, style->mid_gc); -} -%% -override-attr GtkStyle.text_gc -static PyObject * -_wrap_gtk_style__get_text_gc(PyGObject *self, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - return _pygtk_style_helper_new(style, STYLE_GC_ARRAY, style->text_gc); -} -%% -override-attr GtkStyle.base_gc -static PyObject * -_wrap_gtk_style__get_base_gc(PyGObject *self, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - return _pygtk_style_helper_new(style, STYLE_GC_ARRAY, style->base_gc); -} -%% -override-attr GtkStyle.text_aa_gc -static PyObject * -_wrap_gtk_style__get_text_aa_gc(PyGObject *self, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - return _pygtk_style_helper_new(style, STYLE_GC_ARRAY, style->text_aa_gc); -} -%% -override-attr GtkStyle.white_gc -static PyObject * -_wrap_gtk_style__get_white_gc(PyGObject *self, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - return pygobject_new((GObject *)style->white_gc); -} -static int -_wrap_gtk_style__set_white_gc(PyGObject *self, PyObject *value, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - if (!pygobject_check(value, &PyGdkGC_Type)) { - PyErr_SetString(PyExc_TypeError, "can only assign a GdkGC"); - return -1; - } - style->white_gc = GDK_GC(pygobject_get(value)); - return 0; -} -%% -override-attr GtkStyle.black_gc -static PyObject * -_wrap_gtk_style__get_black_gc(PyGObject *self, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - return pygobject_new((GObject *)style->black_gc); -} -static int -_wrap_gtk_style__set_black_gc(PyGObject *self, PyObject *value, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - if (!pygobject_check(value, &PyGdkGC_Type)) { - PyErr_SetString(PyExc_TypeError, "can only assign a GdkGC"); - return -1; - } - style->black_gc = GDK_GC(pygobject_get(value)); - return 0; -} -%% -override-attr GtkStyle.bg_pixmap -static PyObject * -_wrap_gtk_style__get_bg_pixmap(PyGObject *self, void *closure) -{ - GtkStyle *style = GTK_STYLE(self->obj); - - return _pygtk_style_helper_new(style, STYLE_PIXMAP_ARRAY, style->bg_pixmap); -} -%% -override gtk_style_lookup_color kwargs -static PyObject * -_wrap_gtk_style_lookup_color(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "color_name", NULL }; - char *color_name; - GdkColor color; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s:GtkStyle.lookup_color", - kwlist, &color_name)) - return NULL; - - if (gtk_style_lookup_color(GTK_STYLE(self->obj), color_name, &color)) - return pyg_boxed_new(GDK_TYPE_COLOR, &color, TRUE, TRUE); - - Py_INCREF(Py_None); - return Py_None; -} diff --git a/gtk/gtktextview.override b/gtk/gtktextview.override deleted file mode 100644 index 5cded4c2..00000000 --- a/gtk/gtktextview.override +++ /dev/null @@ -1,1600 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2006 James Henstridge - * - * gtktextview.override: overrides for the gtk.TextView object. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -ignore-glob - gtk_text_view_new - -%% -override gtk_text_view_get_visible_rect noargs -static PyObject * -_wrap_gtk_text_view_get_visible_rect(PyGObject *self) -{ - GdkRectangle visible_rect; - - gtk_text_view_get_visible_rect(GTK_TEXT_VIEW(self->obj), &visible_rect); - return pyg_boxed_new(GDK_TYPE_RECTANGLE, &visible_rect, TRUE, TRUE); -} -%% -override gtk_text_view_buffer_to_window_coords kwargs -static PyObject * -_wrap_gtk_text_view_buffer_to_window_coords(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "win", "buffer_x", "buffer_y", NULL }; - GtkTextWindowType win; - gint buffer_x, buffer_y, window_x = 0, window_y = 0; - PyObject *py_win; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "Oii:GtkTextView.buffer_to_window_coords", - kwlist, &py_win, &buffer_x, &buffer_y)) - return NULL; - if (pyg_enum_get_value(GTK_TYPE_TEXT_WINDOW_TYPE, py_win, (gint *)&win)) - return NULL; - gtk_text_view_buffer_to_window_coords(GTK_TEXT_VIEW(self->obj), win, - buffer_x, buffer_y, - &window_x, &window_y); - return Py_BuildValue("(ii)", window_x, window_y); -} -%% -override gtk_text_view_window_to_buffer_coords kwargs -static PyObject * -_wrap_gtk_text_view_window_to_buffer_coords(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "win", "window_x", "window_y", NULL }; - GtkTextWindowType win; - gint window_x, window_y, buffer_x = 0, buffer_y = 0; - PyObject *py_win; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "Oii:GtkTextView.window_to_buffer_coords", - kwlist, &py_win, &window_x, &window_y)) - return NULL; - if (pyg_enum_get_value(GTK_TYPE_TEXT_WINDOW_TYPE, py_win, (gint *)&win)) - return NULL; - gtk_text_view_window_to_buffer_coords(GTK_TEXT_VIEW(self->obj), win, - window_x, window_y, - &buffer_x, &buffer_y); - return Py_BuildValue("(ii)", buffer_x, buffer_y); -} -%% -override gtk_text_view_get_iter_location kwargs -static PyObject * -_wrap_gtk_text_view_get_iter_location(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "iter", NULL }; - PyObject *py_iter; - GdkRectangle location; - GtkTextIter *iter = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkTextView.get_iter_location", - kwlist, &py_iter)) - return NULL; - if (pyg_boxed_check(py_iter, GTK_TYPE_TEXT_ITER)) - iter = pyg_boxed_get(py_iter, GtkTextIter); - else { - PyErr_SetString(PyExc_TypeError, "iter should be a GtkTextIter"); - return NULL; - } - gtk_text_view_get_iter_location(GTK_TEXT_VIEW(self->obj), iter, &location); - return pyg_boxed_new(GDK_TYPE_RECTANGLE, &location, TRUE, TRUE); -} -%% -override gtk_text_view_get_line_at_y kwargs -static PyObject * -_wrap_gtk_text_view_get_line_at_y(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "y", NULL }; - GtkTextIter iter; - gint y, line_top; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "i:GtkTextView.get_line_at_y", - kwlist, &y)) - return NULL; - gtk_text_view_get_line_at_y(GTK_TEXT_VIEW(self->obj), - &iter, y, &line_top); - return Py_BuildValue("(Ni)", - pyg_boxed_new(GTK_TYPE_TEXT_ITER, &iter, TRUE, TRUE), - line_top); -} -%% -override gtk_text_view_get_line_yrange kwargs -static PyObject * -_wrap_gtk_text_view_get_line_yrange(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "iter", NULL }; - GtkTextIter *iter = NULL; - gint y = -1, height = -1; - PyObject *py_iter; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkTextView.get_line_yrange", - kwlist, &py_iter)) - return NULL; - if (pyg_boxed_check(py_iter, GTK_TYPE_TEXT_ITER)) - iter = pyg_boxed_get(py_iter, GtkTextIter); - else { - PyErr_SetString(PyExc_TypeError, "iter should be a GtkTextIter"); - return NULL; - } - gtk_text_view_get_line_yrange(GTK_TEXT_VIEW(self->obj), - iter, &y, &height); - return Py_BuildValue("(ii)", y, height); -} -%% -override gtk_text_view_get_iter_at_location kwargs -static PyObject * -_wrap_gtk_text_view_get_iter_at_location(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "x", "y", NULL }; - GtkTextIter iter; - gint x, y; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "ii:GtkTextView.get_iter_at_location", - kwlist, &x, &y)) - return NULL; - gtk_text_view_get_iter_at_location(GTK_TEXT_VIEW(self->obj), - &iter, x, y); - return pyg_boxed_new(GTK_TYPE_TEXT_ITER, &iter, TRUE, TRUE); -} -%% -override gtk_text_view_set_border_window_size kwargs -static PyObject * -_wrap_gtk_text_view_set_border_window_size(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "type", "size", NULL }; - PyObject *py_type = NULL; - int size; - GtkTextWindowType type; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "Oi:GtkTextView.set_border_window_size", - kwlist, &py_type, &size)) - return NULL; - - if (size < 0) { - PyErr_SetString(PyExc_ValueError, "size must be >= 0"); - return NULL; - } - - if (pyg_enum_get_value(GTK_TYPE_TEXT_WINDOW_TYPE, py_type, (gint *)&type)) - return NULL; - - switch (type) - { - case GTK_TEXT_WINDOW_LEFT: - case GTK_TEXT_WINDOW_RIGHT: - case GTK_TEXT_WINDOW_TOP: - case GTK_TEXT_WINDOW_BOTTOM: - gtk_text_view_set_border_window_size(GTK_TEXT_VIEW(self->obj), type, - size); - break; - default: - PyErr_SetString(PyExc_ValueError, "type must be one of: " - "gtk.TEXT_WINDOW_LEFT, gtk.TEXT_WINDOW_RIGHT, " - "gtk.TEXT_WINDOW_TOP or gtk.TEXT_WINDOW_BOTTOM"); - return NULL; - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -ignore gtk_text_iter_free -%% -override gtk_text_iter_copy noargs -static PyObject * -_wrap_gtk_text_iter_copy(PyGBoxed *self) -{ - return pyg_boxed_new(GTK_TYPE_TEXT_ITER, pyg_boxed_get(self, GtkTextIter), - TRUE, TRUE); -} -%% -override gtk_text_iter_get_slice kwargs -static PyObject * -_wrap_gtk_text_iter_get_slice(PyGBoxed *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "end", NULL }; - PyGBoxed *end; - gchar *text; - PyObject *pytext; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GtkTextIter.get_slice", - kwlist, &end)) - return NULL; - if (!pyg_boxed_check(end, GTK_TYPE_TEXT_ITER)) { - PyErr_SetString(PyExc_TypeError, "end must be a GtkTextIter"); - return NULL; - } - text = gtk_text_iter_get_slice(pyg_boxed_get(self, GtkTextIter), - pyg_boxed_get(end, GtkTextIter)); - pytext = PyUnicode_DecodeUTF8(text, strlen(text), "strict"); - g_free(text); - return pytext; -} -%% -override gtk_text_iter_get_text kwargs -static PyObject * -_wrap_gtk_text_iter_get_text(PyGBoxed *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "end", NULL }; - PyGBoxed *end; - gchar *text; - PyObject *pytext; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GtkTextIter.get_text", - kwlist, &end)) - return NULL; - if (!pyg_boxed_check(end, GTK_TYPE_TEXT_ITER)) { - PyErr_SetString(PyExc_TypeError, "end must be a GtkTextIter"); - return NULL; - } - text = gtk_text_iter_get_text(pyg_boxed_get(self, GtkTextIter), - pyg_boxed_get(end, GtkTextIter)); - pytext = PyUnicode_DecodeUTF8(text, strlen(text), "strict"); - g_free(text); - return pytext; -} -%% -override gtk_text_iter_get_visible_slice kwargs -static PyObject * -_wrap_gtk_text_iter_get_visible_slice(PyGBoxed *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "end", NULL }; - PyGBoxed *end; - gchar *text; - PyObject *pytext; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkTextIter.get_visible_slice", kwlist, - &end)) - return NULL; - if (!pyg_boxed_check(end, GTK_TYPE_TEXT_ITER)) { - PyErr_SetString(PyExc_TypeError, "end must be a GtkTextIter"); - return NULL; - } - text = gtk_text_iter_get_visible_slice(pyg_boxed_get(self, GtkTextIter), - pyg_boxed_get(end, GtkTextIter)); - pytext = PyUnicode_DecodeUTF8(text, strlen(text), "strict"); - g_free(text); - return pytext; -} -%% -override gtk_text_iter_get_visible_text kwargs -static PyObject * -_wrap_gtk_text_iter_get_visible_text(PyGBoxed *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "end", NULL }; - PyGBoxed *end; - gchar *text; - PyObject *pytext; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkTextIter.get_visible_text", kwlist, - &end)) - return NULL; - if (!pyg_boxed_check(end, GTK_TYPE_TEXT_ITER)) { - PyErr_SetString(PyExc_TypeError, "end must be a GtkTextIter"); - return NULL; - } - text = gtk_text_iter_get_visible_text(pyg_boxed_get(self, GtkTextIter), - pyg_boxed_get(end, GtkTextIter)); - pytext = PyUnicode_DecodeUTF8(text, strlen(text), "strict"); - g_free(text); - return pytext; -} -%% -override gtk_text_iter_get_marks noargs -static PyObject * -_wrap_gtk_text_iter_get_marks(PyGBoxed *self) -{ - GSList *ret, *tmp; - PyObject *pyret; - - ret = gtk_text_iter_get_marks(pyg_boxed_get(self, GtkTextIter)); - pyret = PyList_New(0); - for (tmp = ret; tmp != NULL; tmp = tmp->next) { - PyObject *mark = pygobject_new((GObject *)tmp->data); - PyList_Append(pyret, mark); - Py_DECREF(mark); - } - g_slist_free(ret); - return pyret; -} -%% -override gtk_text_iter_get_toggled_tags kwargs -static PyObject * -_wrap_gtk_text_iter_get_toggled_tags(PyGBoxed *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "toggled_on", NULL }; - GSList *ret, *tmp; - int toggled_on; - PyObject *pyret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "i:GtkTextIter.get_toggled_tags", kwlist, - &toggled_on)) - return NULL; - ret = gtk_text_iter_get_toggled_tags(pyg_boxed_get(self, GtkTextIter), - toggled_on); - pyret = PyList_New(0); - for (tmp = ret; tmp != NULL; tmp = tmp->next) { - PyObject *tag = pygobject_new((GObject *)tmp->data); - PyList_Append(pyret, tag); - Py_DECREF(tag); - } - g_slist_free(ret); - return pyret; -} -%% -override gtk_text_iter_get_tags noargs -static PyObject * -_wrap_gtk_text_iter_get_tags(PyGBoxed *self) -{ - GSList *ret, *tmp; - PyObject *pyret; - - ret = gtk_text_iter_get_tags(pyg_boxed_get(self, GtkTextIter)); - pyret = PyList_New(0); - for (tmp = ret; tmp != NULL; tmp = tmp->next) { - PyObject *tag = pygobject_new((GObject *)tmp->data); - PyList_Append(pyret, tag); - Py_DECREF(tag); - } - g_slist_free(ret); - return pyret; -} -%% -override gtk_text_iter_forward_search kwargs -static PyObject * -_wrap_gtk_text_iter_forward_search(PyGBoxed *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "str", "flags", "limit", NULL }; - gchar *str; - PyObject *py_flags, *py_limit = Py_None; - GtkTextIter match_start, match_end, *limit = NULL; - GtkTextSearchFlags flags; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "sO|O:GtkTextIter.forward_search", - kwlist, &str, &py_flags, &py_limit)) - return NULL; - if (pyg_boxed_check(py_limit, GTK_TYPE_TEXT_ITER)) - limit = pyg_boxed_get(py_limit, GtkTextIter); - else if (py_limit != Py_None) { - PyErr_SetString(PyExc_TypeError,"limit must be a GtkTextIter or None"); - return NULL; - } - if (pyg_flags_get_value(GTK_TYPE_TEXT_SEARCH_FLAGS, py_flags, - (gint *)&flags)) - return NULL; - if (gtk_text_iter_forward_search(pyg_boxed_get(self, GtkTextIter), str, - flags, &match_start, &match_end, limit)) - return Py_BuildValue("(NN)", - pyg_boxed_new(GTK_TYPE_TEXT_ITER, &match_start, - TRUE, TRUE), - pyg_boxed_new(GTK_TYPE_TEXT_ITER, &match_end, - TRUE, TRUE)); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_text_iter_backward_search kwargs -static PyObject * -_wrap_gtk_text_iter_backward_search(PyGBoxed *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "str", "flags", "limit", NULL }; - gchar *str; - PyObject *py_flags, *py_limit = Py_None; - GtkTextIter match_start, match_end, *limit = NULL; - GtkTextSearchFlags flags; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "sO|O:GtkTextIter.backward_search", - kwlist, &str, &py_flags, &py_limit)) - return NULL; - if (pyg_boxed_check(py_limit, GTK_TYPE_TEXT_ITER)) - limit = pyg_boxed_get(py_limit, GtkTextIter); - else if (py_limit != Py_None) { - PyErr_SetString(PyExc_TypeError,"limit must be a GtkTextIter or None"); - return NULL; - } - if (pyg_flags_get_value(GTK_TYPE_TEXT_SEARCH_FLAGS, py_flags, - (gint *)&flags)) - return NULL; - if (gtk_text_iter_backward_search(pyg_boxed_get(self, GtkTextIter), str, - flags, &match_start, &match_end, limit)) - return Py_BuildValue("(NN)", - pyg_boxed_new(GTK_TYPE_TEXT_ITER, &match_start, - TRUE, TRUE), - pyg_boxed_new(GTK_TYPE_TEXT_ITER, &match_end, - TRUE, TRUE)); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_text_buffer_insert_with_tags -static PyObject * -_wrap_gtk_text_buffer_insert_with_tags(PyGObject *self, PyObject *args) -{ - PyObject *first, *py_iter; - gint len, i, start_offset; - Py_ssize_t text_len; - gchar *text; - GtkTextIter *iter, start; - - len = PyTuple_Size(args); - if (len < 2) { - PyErr_SetString(PyExc_TypeError, - "GtkTextBuffer.insert_with_tags requires at least 2 arguments"); - return NULL; - } - first = PySequence_GetSlice(args, 0, 2); - if (!PyArg_ParseTuple(first, "Os#:GtkTextBuffer.insert_with_tags", - &py_iter, &text, &text_len)) { - Py_DECREF(first); - return NULL; - } - Py_DECREF(first); - if (!pyg_boxed_check(py_iter, GTK_TYPE_TEXT_ITER)) { - PyErr_SetString(PyExc_TypeError, "iter must be a GtkTextIter"); - return NULL; - } - iter = pyg_boxed_get(py_iter, GtkTextIter); - - /* check types */ - for (i = 2; i < len; i++) { - PyObject *item = PyTuple_GetItem(args, i); - - if (!pygobject_check(item, &PyGtkTextTag_Type)) { - PyErr_SetString(PyExc_TypeError, - "additional argument must be a GtkTextTag"); - return NULL; - } - } - - start_offset = gtk_text_iter_get_offset(iter); - gtk_text_buffer_insert(GTK_TEXT_BUFFER(self->obj), iter, text, text_len); - gtk_text_buffer_get_iter_at_offset(GTK_TEXT_BUFFER(self->obj), - &start, start_offset); - - for (i = 2; i < len; i++) { - PyObject *item = PyTuple_GetItem(args, i); - GtkTextTag *tag = GTK_TEXT_TAG(pygobject_get(item)); - - gtk_text_buffer_apply_tag(GTK_TEXT_BUFFER(self->obj), tag,&start,iter); - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_text_buffer_insert_with_tags_by_name -static PyObject * -_wrap_gtk_text_buffer_insert_with_tags_by_name(PyGObject *self, PyObject *args) -{ - PyObject *first, *py_iter; - gint len, i, start_offset; - Py_ssize_t text_len; - gchar *text; - GtkTextIter *iter, start; - - len = PyTuple_Size(args); - if (len < 2) { - PyErr_SetString(PyExc_TypeError, - "GtkTextBuffer.insert_with_tags_by_name " - "requires at least 2 arguments"); - return NULL; - } - first = PySequence_GetSlice(args, 0, 2); - if (!PyArg_ParseTuple(first, "Os#:GtkTextBuffer.insert_with_tags_by_name", - &py_iter, &text, &text_len)) { - Py_DECREF(first); - return NULL; - } - Py_DECREF(first); - if (!pyg_boxed_check(py_iter, GTK_TYPE_TEXT_ITER)) { - PyErr_SetString(PyExc_TypeError, "iter must be a GtkTextIter"); - return NULL; - } - iter = pyg_boxed_get(py_iter, GtkTextIter); - - /* check types */ - for (i = 2; i < len; i++) { - PyObject *item = PyTuple_GetItem(args, i); - - if (!PyString_Check(item)) { - PyErr_SetString(PyExc_TypeError, - "additional argument must be a string"); - return NULL; - } - } - - start_offset = gtk_text_iter_get_offset(iter); - gtk_text_buffer_insert(GTK_TEXT_BUFFER(self->obj), iter, text, text_len); - gtk_text_buffer_get_iter_at_offset(GTK_TEXT_BUFFER(self->obj), - &start, start_offset); - - for (i = 2; i < len; i++) { - PyObject *item = PyTuple_GetItem(args, i); - const gchar *tagname = PyString_AsString(item); - - gtk_text_buffer_apply_tag_by_name(GTK_TEXT_BUFFER(self->obj), - tagname, &start, iter); - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_text_buffer_create_tag kwargs -static PyObject * -_wrap_gtk_text_buffer_create_tag(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - gchar *tag_name = NULL; - GtkTextTag *tag; - GtkTextTagTable *table; - - if (!PyArg_ParseTuple(args, "|z:GtkTextBuffer.create_tag", - &tag_name)) { - return NULL; - } - - table = GTK_TEXT_TAG_TABLE(GTK_TEXT_BUFFER(self->obj)->tag_table); - if (tag_name && table && g_hash_table_lookup(table->hash, tag_name)) { - gchar buf[512]; - g_snprintf(buf, sizeof(buf), - "A tag named '%s' is already in the tag table", - tag_name); - - PyErr_SetString(PyExc_TypeError, buf); - return NULL; - } - - tag = gtk_text_buffer_create_tag(GTK_TEXT_BUFFER(self->obj), - tag_name, NULL); - - /* set tag properties if any */ - if (kwargs) { - Py_ssize_t i = 0; - PyObject *prop, *val; - - while (PyDict_Next(kwargs, &i, &prop, &val)) { - GParamSpec *pspec; - GValue value = { 0, }; - gchar *prop_str = PyString_AsString(prop); - - pspec = g_object_class_find_property (G_OBJECT_GET_CLASS(tag), - prop_str); - if (!pspec) { - PyErr_Format(PyExc_TypeError, - "unsupported tag property `%s'", - prop_str); - /* XXX: Free tag? */ - return NULL; - } - - g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec)); - if (pyg_value_from_pyobject(&value, val) < 0) { - PyErr_Format(PyExc_TypeError, - "could not convert tag property '%s' to correct type", - prop_str); - /* XXX: Free tag? */ - return NULL; - } - g_object_set_property((GObject *)tag, prop_str, &value); - g_value_unset(&value); - } - } - return pygobject_new((GObject *)tag); -} -%% -override gtk_text_buffer_get_iter_at_line_offset kwargs -static PyObject * -_wrap_gtk_text_buffer_get_iter_at_line_offset(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "line_number", "char_offset", NULL }; - GtkTextIter iter; - int line_number, char_offset; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii:GtkTextBuffer.get_iter_at_line_offset", kwlist, &line_number, &char_offset)) - return NULL; - - gtk_text_buffer_get_iter_at_line_offset(GTK_TEXT_BUFFER(self->obj), &iter, - line_number, char_offset); - return pyg_boxed_new(GTK_TYPE_TEXT_ITER, &iter, TRUE, TRUE); -} -%% -override gtk_text_buffer_get_iter_at_line_index kwargs -static PyObject * -_wrap_gtk_text_buffer_get_iter_at_line_index(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "line_number", "byte_offset", NULL }; - GtkTextIter iter; - int line_number, byte_offset; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii:GtkTextBuffer.get_iter_at_line_index", kwlist, &line_number, &byte_offset)) - return NULL; - - gtk_text_buffer_get_iter_at_line_index(GTK_TEXT_BUFFER(self->obj), &iter, - line_number, byte_offset); - return pyg_boxed_new(GTK_TYPE_TEXT_ITER, &iter, TRUE, TRUE); -} -%% -override gtk_text_buffer_get_iter_at_offset kwargs -static PyObject * -_wrap_gtk_text_buffer_get_iter_at_offset(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - int char_offset; - static char *kwlist[] = { "char_offset", NULL }; - GtkTextIter iter; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:GtkTextBuffer.get_iter_at_offset", kwlist, &char_offset)) - return NULL; - - gtk_text_buffer_get_iter_at_offset(GTK_TEXT_BUFFER(self->obj), - &iter, char_offset); - return pyg_boxed_new(GTK_TYPE_TEXT_ITER, &iter, TRUE, TRUE); -} -%% -override gtk_text_buffer_get_iter_at_line kwargs -static PyObject * -_wrap_gtk_text_buffer_get_iter_at_line(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - int line_number; - static char *kwlist[] = { "line_number", NULL }; - GtkTextIter iter; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:GtkTextBuffer.get_iter_at_line", kwlist, &line_number)) - return NULL; - - gtk_text_buffer_get_iter_at_line(GTK_TEXT_BUFFER(self->obj), - &iter, line_number); - return pyg_boxed_new(GTK_TYPE_TEXT_ITER, &iter, TRUE, TRUE); -} -%% -override gtk_text_buffer_get_start_iter noargs -static PyObject * -_wrap_gtk_text_buffer_get_start_iter(PyGObject *self) -{ - GtkTextIter iter; - - gtk_text_buffer_get_start_iter(GTK_TEXT_BUFFER(self->obj), &iter); - return pyg_boxed_new(GTK_TYPE_TEXT_ITER, &iter, TRUE, TRUE); -} -%% -override gtk_text_buffer_get_end_iter noargs -static PyObject * -_wrap_gtk_text_buffer_get_end_iter(PyGObject *self) -{ - GtkTextIter iter; - - gtk_text_buffer_get_end_iter(GTK_TEXT_BUFFER(self->obj), &iter); - return pyg_boxed_new(GTK_TYPE_TEXT_ITER, &iter, TRUE, TRUE); -} -%% -override gtk_text_buffer_get_bounds noargs -static PyObject * -_wrap_gtk_text_buffer_get_bounds(PyGObject *self) -{ - GtkTextIter start, end; - - gtk_text_buffer_get_bounds(GTK_TEXT_BUFFER(self->obj), &start, &end); - return Py_BuildValue("(NN)", - pyg_boxed_new(GTK_TYPE_TEXT_ITER, &start, TRUE, TRUE), - pyg_boxed_new(GTK_TYPE_TEXT_ITER, &end, TRUE, TRUE)); -} -%% -override gtk_text_buffer_get_iter_at_mark kwargs -static PyObject * -_wrap_gtk_text_buffer_get_iter_at_mark(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - PyGObject *mark; - static char *kwlist[] = { "mark", NULL }; - GtkTextIter iter; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GtkTextBuffer.get_iter_at_mark", kwlist, &mark)) - return NULL; - if (!pygobject_check(mark, &PyGtkTextMark_Type)) { - PyErr_SetString(PyExc_TypeError, "mark should be a GtkTextMark"); - return NULL; - } - - gtk_text_buffer_get_iter_at_mark(GTK_TEXT_BUFFER(self->obj), &iter, - GTK_TEXT_MARK(mark->obj)); - return pyg_boxed_new(GTK_TYPE_TEXT_ITER, &iter, TRUE, TRUE); -} -%% -override gtk_text_buffer_set_text kwargs -static PyObject * -_wrap_gtk_text_buffer_set_text(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - char *text; - static char *kwlist[] = { "text", "len", NULL }; - Py_ssize_t len; - int oldlen = -1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s#|i:GtkTextBuffer.set_text", kwlist, - &text, &len, &oldlen)) { - return NULL; - } - - if (oldlen > 0) { - if (oldlen > len) { - PyErr_SetString(PyExc_ValueError, "len greater than text length"); - return NULL; - } - len = oldlen; - } - - gtk_text_buffer_set_text(GTK_TEXT_BUFFER(self->obj), text, len); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_text_buffer_get_selection_bounds noargs -static PyObject * -_wrap_gtk_text_buffer_get_selection_bounds(PyGObject *self, PyObject *args) -{ - GtkTextIter start, end; - - if (!gtk_text_buffer_get_selection_bounds(GTK_TEXT_BUFFER(self->obj), - &start, &end)) { - return Py_BuildValue ("()"); - } - - return Py_BuildValue("(NN)", - pyg_boxed_new(GTK_TYPE_TEXT_ITER, &start, TRUE, TRUE), - pyg_boxed_new(GTK_TYPE_TEXT_ITER, &end, TRUE, TRUE)); -} -%% -override gtk_text_buffer_insert kwargs -static PyObject * -_wrap_gtk_text_buffer_insert(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "iter", "text", "len", NULL }; - PyObject *py_iter; - char *text; - Py_ssize_t len; - int oldlen = -1; - GtkTextIter *iter = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Os#|i:GtkTextBuffer.insert", - kwlist, &py_iter, &text, &len, &oldlen)) { - return NULL; - } - - if (oldlen > 0) { - if (oldlen > len) { - PyErr_SetString(PyExc_ValueError, "len greater than text length"); - return NULL; - } - len = oldlen; - } - - if (pyg_boxed_check(py_iter, GTK_TYPE_TEXT_ITER)) { - iter = pyg_boxed_get(py_iter, GtkTextIter); - } else { - PyErr_SetString(PyExc_TypeError, "iter should be a GtkTextIter"); - return NULL; - } - gtk_text_buffer_insert(GTK_TEXT_BUFFER(self->obj), iter, text, len); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_text_buffer_insert_at_cursor kwargs -static PyObject * -_wrap_gtk_text_buffer_insert_at_cursor(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "text", "len", NULL }; - char *text; - Py_ssize_t len; - int oldlen = -1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s#|i:GtkTextBuffer.insert_at_cursor", - kwlist, &text, &len, &oldlen)) { - return NULL; - } - - if (oldlen > 0) { - if (oldlen > len) { - PyErr_SetString(PyExc_ValueError, "len greater than text length"); - return NULL; - } - len = oldlen; - } - - gtk_text_buffer_insert_at_cursor(GTK_TEXT_BUFFER(self->obj), text, len); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_text_buffer_insert_interactive kwargs -static PyObject * -_wrap_gtk_text_buffer_insert_interactive(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "iter", "text", "default_editable", "len", NULL }; - PyObject *py_iter; - char *text; - int default_editable, ret, oldlen = -1; - Py_ssize_t len; - GtkTextIter *iter = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "Os#i|i:GtkTextBuffer.insert_interactive", - kwlist, &py_iter, &text, &len, - &default_editable, &oldlen)) { - return NULL; - } - - if (oldlen > 0) { - if (oldlen > len) { - PyErr_SetString(PyExc_ValueError, "len greater than text length"); - return NULL; - } - if (oldlen > len) { - PyErr_SetString(PyExc_ValueError, "len greater than text length"); - return NULL; - } - len = oldlen; - } - - if (pyg_boxed_check(py_iter, GTK_TYPE_TEXT_ITER)) { - iter = pyg_boxed_get(py_iter, GtkTextIter); - } else { - PyErr_SetString(PyExc_TypeError, "iter should be a GtkTextIter"); - return NULL; - } - ret = gtk_text_buffer_insert_interactive(GTK_TEXT_BUFFER(self->obj), iter, - text, len, default_editable); - return PyBool_FromLong(ret); -} -%% -override gtk_text_buffer_insert_interactive_at_cursor kwargs -static PyObject * -_wrap_gtk_text_buffer_insert_interactive_at_cursor(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "text", "default_editable", "len", NULL }; - char *text; - Py_ssize_t len; - int default_editable, ret, oldlen = -1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s#i|i:GtkTextBuffer.insert_interactive_at_cursor", - kwlist, &text, &len, &default_editable, &oldlen)) { - return NULL; - } - - if (oldlen > 0) { - len = oldlen; - } - - ret = gtk_text_buffer_insert_interactive_at_cursor(GTK_TEXT_BUFFER(self->obj), - text, len, default_editable); - return PyBool_FromLong(ret); -} -%% -override gtk_text_buffer_get_iter_at_child_anchor kwargs -static PyObject * -_wrap_gtk_text_buffer_get_iter_at_child_anchor(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "anchor", NULL }; - PyGObject *anchor; - GtkTextIter iter; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:GtkTextBuffer.get_iter_at_child_anchor", kwlist, &PyGtkTextChildAnchor_Type, &anchor)) - return NULL; - - gtk_text_buffer_get_iter_at_child_anchor(GTK_TEXT_BUFFER(self->obj), - &iter, - GTK_TEXT_CHILD_ANCHOR(anchor->obj)); - return pyg_boxed_new(GTK_TYPE_TEXT_ITER, &iter, TRUE, TRUE); -} -%% -override gtk_text_tag_table_add kwargs -static PyObject * -_wrap_gtk_text_tag_table_add(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "tag", NULL }; - GtkTextTag *tag; - GtkTextTagTable *table; - PyGObject *pytag; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:GtkTextTagTable.add", - kwlist, &PyGtkTextTag_Type, &pytag)) { - return NULL; - } - - tag = GTK_TEXT_TAG(pytag->obj); - table = GTK_TEXT_TAG_TABLE(self->obj); - - if (tag->table) { - gchar buf[512]; - g_snprintf(buf, sizeof(buf), - "The tag is already in a tag table"); - - PyErr_SetString(PyExc_ValueError, buf); - return NULL; - } - - if (tag->name && table && g_hash_table_lookup(table->hash, tag->name)) { - gchar buf[512]; - g_snprintf(buf, sizeof(buf), - "A tag named '%s' is already in the tag table", - tag->name); - - PyErr_SetString(PyExc_ValueError, buf); - return NULL; - } - - gtk_text_tag_table_add(table, tag); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_text_tag_table_remove kwargs -static PyObject * -_wrap_gtk_text_tag_table_remove(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "tag", NULL }; - GtkTextTag *tag; - GtkTextTagTable *table; - PyGObject *pytag; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!:GtkTextTagTable.remove", - kwlist, &PyGtkTextTag_Type, &pytag)) { - return NULL; - } - - tag = GTK_TEXT_TAG(pytag->obj); - table = GTK_TEXT_TAG_TABLE(self->obj); - - if (tag->table != table) { - gchar buf[512]; - if (tag->name) - g_snprintf(buf, sizeof(buf), - "The tag named '%s' is not in the tag table", - tag->name); - else - g_snprintf(buf, sizeof(buf), - "The tag is not in the tag table"); - - PyErr_SetString(PyExc_ValueError, buf); - return NULL; - } - - gtk_text_tag_table_remove(table, tag); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override-attr GtkTextAttributes.bg_color -static PyObject * -_wrap_gtk_text_attributes__get_bg_color(PyObject *self, void *closure) -{ - GdkColor ret; - - ret = pyg_boxed_get(self, GtkTextAttributes)->appearance.bg_color; - /* pyg_boxed_new handles NULL checking */ - return pyg_boxed_new(GDK_TYPE_COLOR, &ret, TRUE, TRUE); -} -%% -override-attr GtkTextAttributes.fg_color -static PyObject * -_wrap_gtk_text_attributes__get_fg_color(PyObject *self, void *closure) -{ - GdkColor ret; - - ret = pyg_boxed_get(self, GtkTextAttributes)->appearance.fg_color; - /* pyg_boxed_new handles NULL checking */ - return pyg_boxed_new(GDK_TYPE_COLOR, &ret, TRUE, TRUE); -} -%% -override-attr GtkTextAttributes.bg_stipple -static PyObject * -_wrap_gtk_text_attributes__get_bg_stipple(PyObject *self, void *closure) -{ - GdkBitmap *ret; - - ret = pyg_boxed_get(self, GtkTextAttributes)->appearance.bg_stipple; - /* pygobject_new handles NULL checking */ - return pygobject_new((GObject *)ret); -} -%% -override-attr GtkTextAttributes.fg_stipple -static PyObject * -_wrap_gtk_text_attributes__get_fg_stipple(PyObject *self, void *closure) -{ - GdkBitmap *ret; - - ret = pyg_boxed_get(self, GtkTextAttributes)->appearance.fg_stipple; - /* pygobject_new handles NULL checking */ - return pygobject_new((GObject *)ret); -} -%% -override-attr GtkTextAttributes.rise -static PyObject * -_wrap_gtk_text_attributes__get_rise(PyObject *self, void *closure) -{ - int ret; - - ret = pyg_boxed_get(self, GtkTextAttributes)->appearance.rise; - return PyInt_FromLong(ret); -} -%% -override-attr GtkTextAttributes.underline -static PyObject * -_wrap_gtk_text_attributes__get_underline(PyObject *self, void *closure) -{ - int ret; - - ret = pyg_boxed_get(self, GtkTextAttributes)->appearance.underline; - return PyInt_FromLong(ret); -} -%% -override-attr GtkTextAttributes.strikethrough -static PyObject * -_wrap_gtk_text_attributes__get_strikethrough(PyObject *self, void *closure) -{ - return PyBool_FromLong(pyg_boxed_get(self, GtkTextAttributes)->appearance.strikethrough); -} -%% -override-attr GtkTextAttributes.draw_bg -static PyObject * -_wrap_gtk_text_attributes__get_draw_bg(PyObject *self, void *closure) -{ - return PyBool_FromLong(pyg_boxed_get(self, GtkTextAttributes)->appearance.draw_bg); -} -%% -override gtk_text_tag_table_foreach kwargs -static void -pygtk_text_tag_table_foreach_cb(GtkTextTag *tag, gpointer user_data) -{ - PyGILState_STATE state; - PyObject *callback, *args, *ret; - - state = pyg_gil_state_ensure(); - callback = PyTuple_GetItem((PyObject *)user_data, 0); - args = Py_BuildValue("(NO)", - pygobject_new((GObject *)tag), - PyTuple_GetItem((PyObject *)user_data, 1)); - ret = PyObject_CallObject(callback, args); - if (!ret) - PyErr_Print(); - Py_DECREF(args); - Py_XDECREF(ret); - pyg_gil_state_release(state); -} -static PyObject * -_wrap_gtk_text_tag_table_foreach(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "func", "data", NULL }; - PyObject *func, *data, *py_data = Py_None; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:GtkTextTagTable.foreach", - kwlist, &func, &py_data)) { - return NULL; - } - if (!PyCallable_Check(func)) { - PyErr_SetString(PyExc_TypeError, "func must be callable"); - return NULL; - } - - data = Py_BuildValue("(OO)", func, py_data); - - gtk_text_tag_table_foreach(GTK_TEXT_TAG_TABLE(self->obj), - pygtk_text_tag_table_foreach_cb, - (gpointer)data); - Py_DECREF(data); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_text_iter_forward_find_char kwargs -static gboolean -pygtk_find_char_pred(gunichar ch, gpointer user_data) -{ - PyGILState_STATE state; - PyObject *pred, *args, *pyret = Py_False; - gboolean ret; - - state = pyg_gil_state_ensure(); - -#if !defined(Py_UNICODE_SIZE) || Py_UNICODE_SIZE == 2 - if (ch > 0xffff) { - PyErr_SetString(PyExc_RuntimeError, - "character can not be represented in 16-bit unicode"); - PyErr_Print(); - return FALSE; - } -#endif - pred = PyTuple_GetItem((PyObject *)user_data, 0); - args = Py_BuildValue("(NO)", PyUnicode_FromUnicode((Py_UNICODE *)&ch, 1), - PyTuple_GetItem((PyObject *)user_data, 1)); - - pyret = PyObject_CallObject(pred, args); - if (!pyret) - PyErr_Print(); - ret = (pyret == Py_True) ? TRUE : FALSE; - - Py_XDECREF(pyret); - pyg_gil_state_release(state); - - return ret; -} -static PyObject * -_wrap_gtk_text_iter_forward_find_char(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "pred", "user_data", "limit", NULL }; - GtkTextIter *iter, *limit = NULL; - gboolean ret; - PyObject *pylimit = Py_None, *pred, *data, *pydata = Py_None; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|OO:gtk.TextIter.forward_find_char", - kwlist, &pred, &pydata, &pylimit)) - return NULL; - - if (pylimit != Py_None) { - if (pyg_boxed_check(pylimit, GTK_TYPE_TEXT_ITER)) { - limit = pyg_boxed_get(pylimit, GtkTextIter); - } else { - PyErr_SetString(PyExc_TypeError, - "limit should be a gtk.TextIter or None"); - return NULL; - } - } - if (!PyCallable_Check(pred)) { - PyErr_SetString(PyExc_TypeError, "pred must be callable"); - return NULL; - } - - data = Py_BuildValue("(OO)", pred, pydata); - iter = pyg_boxed_get(self, GtkTextIter); - - ret = gtk_text_iter_forward_find_char(iter, pygtk_find_char_pred, - (gpointer)data, limit); - - return PyBool_FromLong(ret); -} -%% -override gtk_text_iter_backward_find_char kwargs -static PyObject * -_wrap_gtk_text_iter_backward_find_char(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "pred", "user_data", "limit", NULL }; - GtkTextIter *iter, *limit = NULL; - gboolean ret; - PyObject *pylimit = Py_None, *pred, *data, *pydata = Py_None; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|OO:gtk.TextIter.backward_find_char", - kwlist, &pred, &pydata, &pylimit)) - return NULL; - - if (pylimit != Py_None) { - if (pyg_boxed_check(pylimit, GTK_TYPE_TEXT_ITER)) { - limit = pyg_boxed_get(pylimit, GtkTextIter); - } else { - PyErr_SetString(PyExc_TypeError, - "limit should be a gtk.TextIter or None"); - return NULL; - } - } - if (!PyCallable_Check(pred)) { - PyErr_SetString(PyExc_TypeError, "pred must be callable"); - return NULL; - } - - data = Py_BuildValue("(OO)", pred, pydata); - iter = pyg_boxed_get(self, GtkTextIter); - - ret = gtk_text_iter_backward_find_char(iter, pygtk_find_char_pred, - (gpointer)data, limit); - - return PyBool_FromLong(ret); -} -%% -override gtk_text_view_get_default_attributes noargs -/* Workaround gtk bug #317455; moreover, copy_boxed should have been FALSE - * in the first place (missing caller-owns-return in the defs) */ -static PyObject * -_wrap_gtk_text_view_get_default_attributes(PyGObject *self) -{ - GtkTextAttributes *ret; - - ret = gtk_text_view_get_default_attributes(GTK_TEXT_VIEW(self->obj)); - /* pyg_boxed_new handles NULL checking */ - return pyg_boxed_new(GTK_TYPE_TEXT_ATTRIBUTES, ret, FALSE, TRUE); -} -%% -override gtk_text_view_get_iter_at_position kwargs -static PyObject * -_wrap_gtk_text_view_get_iter_at_position(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "x", "y", NULL }; - GtkTextIter iter; - gint x, y, trailing; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "ii:GtkTextView.get_iter_at_position", - kwlist, &x, &y)) - return NULL; - gtk_text_view_get_iter_at_position(GTK_TEXT_VIEW(self->obj), - &iter, &trailing, x, y); - return Py_BuildValue("Oi", - pyg_boxed_new(GTK_TYPE_TEXT_ITER, &iter, TRUE, TRUE), - trailing); -} -%% -override gtk_text_buffer_get_copy_target_list noargs -static PyObject* -_wrap_gtk_text_buffer_get_copy_target_list(PyGObject *self) -{ - GtkTargetList *targets; - PyObject *py_targets; - - targets = gtk_text_buffer_get_copy_target_list(GTK_TEXT_BUFFER(self->obj)); - py_targets = pygtk_target_list_to_list(targets); - gtk_target_list_unref(targets); - return py_targets; -} -%% -override gtk_text_buffer_get_paste_target_list noargs -static PyObject* -_wrap_gtk_text_buffer_get_paste_target_list(PyGObject *self) -{ - GtkTargetList *targets; - PyObject *py_targets; - - targets = gtk_text_buffer_get_paste_target_list(GTK_TEXT_BUFFER(self->obj)); - py_targets = pygtk_target_list_to_list(targets); - gtk_target_list_unref(targets); - return py_targets; -} -%% -override gtk_text_buffer_deserialize kwargs -static PyObject * -_wrap_gtk_text_buffer_deserialize(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "content_buffer", "format", "iter", "data", - NULL }; - Py_ssize_t length; - PyObject *py_format = NULL, *py_iter; - GdkAtom format; - GError *error = NULL; - int ret; - guint8 *data; - PyGObject *content_buffer; - GtkTextIter *iter = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!OOs#:GtkTextBuffer.deserialize", - kwlist, &PyGtkTextBuffer_Type, - &content_buffer, &py_format, &py_iter, - &data, &length)) - return NULL; - - format = pygdk_atom_from_pyobject(py_format); - if (PyErr_Occurred()) - return NULL; - - if (pyg_boxed_check(py_iter, GTK_TYPE_TEXT_ITER)) - iter = pyg_boxed_get(py_iter, GtkTextIter); - else { - PyErr_SetString(PyExc_TypeError, "iter should be a GtkTextIter"); - return NULL; - } - - ret = gtk_text_buffer_deserialize(GTK_TEXT_BUFFER(self->obj), - GTK_TEXT_BUFFER(content_buffer->obj), - format, iter, data, length, &error); - if (pyg_error_check(&error)) - return NULL; - return PyBool_FromLong(ret); -} -%% -override gtk_text_buffer_serialize kwargs -static PyObject * -_wrap_gtk_text_buffer_serialize(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "content_buffer", "format", "start", "end", - NULL }; - PyObject *py_format = NULL, *py_start, *py_end; - GdkAtom format; - gsize length; - guint8 *ret; - PyGObject *content_buffer; - GtkTextIter *start = NULL, *end = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!OOO:GtkTextBuffer.serialize", - kwlist, &PyGtkTextBuffer_Type, - &content_buffer, &py_format, &py_start, - &py_end)) - return NULL; - - format = pygdk_atom_from_pyobject(py_format); - if (PyErr_Occurred()) - return NULL; - - if (pyg_boxed_check(py_start, GTK_TYPE_TEXT_ITER)) - start = pyg_boxed_get(py_start, GtkTextIter); - else { - PyErr_SetString(PyExc_TypeError, "start should be a GtkTextIter"); - return NULL; - } - if (pyg_boxed_check(py_end, GTK_TYPE_TEXT_ITER)) - end = pyg_boxed_get(py_end, GtkTextIter); - else { - PyErr_SetString(PyExc_TypeError, "end should be a GtkTextIter"); - return NULL; - } - - ret = gtk_text_buffer_serialize(GTK_TEXT_BUFFER(self->obj), - GTK_TEXT_BUFFER(content_buffer->obj), - format, start, end, &length); - return PyString_FromStringAndSize((char *) ret, (Py_ssize_t) length); -} -%% -override gtk_text_buffer_register_deserialize_format kwargs -static gint -pygtk_text_buffer_register_deserialize_format_cb(GtkTextBuffer *register_buf, - GtkTextBuffer *content_buf, - GtkTextIter *iter, - const guint8 *data, - gsize length, - gboolean create_tags, - gpointer user_data, - GError **error) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = user_data; - PyObject *py_register_buf, *py_content_buf, *py_iter, *py_data, *retobj; - gboolean ret = FALSE; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - py_register_buf = pygobject_new((GObject*)register_buf); - py_content_buf = pygobject_new((GObject*)content_buf); - py_iter = pyg_boxed_new(GTK_TYPE_TEXT_ITER, iter, TRUE, TRUE); - py_data = PyString_FromStringAndSize((char *) data, length); - if (cunote->data) { - retobj = PyEval_CallFunction(cunote->func, "(NNNNiO)", - py_register_buf, py_content_buf, - py_iter, py_data, create_tags, - cunote->data); - } else { - retobj = PyEval_CallFunction(cunote->func, "(NNNNi)", py_register_buf, - py_content_buf, py_iter, py_data, - create_tags); - } - - if (retobj != NULL) { - ret = PyInt_AsLong(retobj); - Py_DECREF(retobj); - } else { - PyErr_Print(); - } - - pyg_gil_state_release(state); - return ret; -} -static PyObject * -_wrap_gtk_text_buffer_register_deserialize_format(PyGObject *self, - PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "mime_type", "function", "user_data", NULL }; - PyObject *pyfunc, *pyarg = NULL, *ret; - PyGtkCustomNotify *cunote; - const gchar *mimetype; - GdkAtom atom; - gchar *name; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "sO|O:GtkTextBuffer.register_deserialize_format", - kwlist, &mimetype, &pyfunc, &pyarg)) - return NULL; - - if (!PyCallable_Check(pyfunc)) { - PyErr_SetString(PyExc_TypeError, - "function must be a callable object"); - return NULL; - } - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = pyfunc; - cunote->data = pyarg; - Py_INCREF(cunote->func); - Py_XINCREF(cunote->data); - - atom = gtk_text_buffer_register_deserialize_format( - GTK_TEXT_BUFFER(self->obj), mimetype, - pygtk_text_buffer_register_deserialize_format_cb, cunote, - pygtk_custom_destroy_notify); - - name = gdk_atom_name(atom); - ret = PyString_FromString(name); - g_free(name); - return ret; -} -%% -override gtk_text_buffer_register_serialize_format kwargs -static guint8* -pygtk_text_buffer_register_serialize_format_cb(GtkTextBuffer *register_buf, - GtkTextBuffer *content_buf, - const GtkTextIter *start, - const GtkTextIter *end, - gsize *length, - gpointer user_data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = user_data; - PyObject *py_register_buf, *py_content_buf, *py_start, *py_end; - PyObject *retobj; - guint8 *ret; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - py_register_buf = pygobject_new((GObject*)register_buf); - py_content_buf = pygobject_new((GObject*)content_buf); - py_start = pyg_boxed_new(GTK_TYPE_TEXT_ITER, (gpointer)start, TRUE, TRUE); - py_end = pyg_boxed_new(GTK_TYPE_TEXT_ITER, (gpointer)end, TRUE, TRUE); - if (cunote->data) { - retobj = PyEval_CallFunction(cunote->func, "(NNNNO)", - py_register_buf, py_content_buf, - py_start, py_end, - cunote->data); - } else { - retobj = PyEval_CallFunction(cunote->func, "(NNNN)", py_register_buf, - py_content_buf, py_start, py_end); - } - - if (retobj != NULL) { - PyString_AsStringAndSize(retobj, (gchar**)&ret, (Py_ssize_t*) length); - Py_DECREF(retobj); - } else { - PyErr_Print(); - ret = NULL; - } - - pyg_gil_state_release(state); - return ret; -} -static PyObject * -_wrap_gtk_text_buffer_register_serialize_format(PyGObject *self, - PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "mime_type", "function", "user_data", - NULL }; - PyObject *pyfunc, *pyarg = NULL, *ret; - PyGtkCustomNotify *cunote; - const gchar *mimetype; - GdkAtom atom; - gchar *name; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "sO|O:GtkTextBuffer.register_serialize_format", - kwlist, &mimetype, &pyfunc, &pyarg)) - return NULL; - - if (!PyCallable_Check(pyfunc)) { - PyErr_SetString(PyExc_TypeError, - "function must be a callable object"); - return NULL; - } - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = pyfunc; - cunote->data = pyarg; - Py_INCREF(cunote->func); - Py_XINCREF(cunote->data); - - atom = gtk_text_buffer_register_serialize_format( - GTK_TEXT_BUFFER(self->obj), mimetype, - pygtk_text_buffer_register_serialize_format_cb, - cunote, pygtk_custom_destroy_notify); - - name = gdk_atom_name(atom); - ret = PyString_FromString(name); - g_free(name); - return ret; -} -%% -override gtk_text_buffer_get_deserialize_formats noargs -static PyObject * -_wrap_gtk_text_buffer_get_deserialize_formats(PyGObject *self) -{ - GdkAtom *formats; - gint n_formats, i; - PyObject *py_formats; - - formats = gtk_text_buffer_get_deserialize_formats( - GTK_TEXT_BUFFER(self->obj), &n_formats); - - py_formats = PyList_New(n_formats); - for (i = 0; i < n_formats; i++) { - gchar *name = gdk_atom_name(formats[i]); - PyList_SetItem(py_formats, i, PyString_FromString(name)); - g_free(name); - } - g_free(formats); - return py_formats; -} -%% -override gtk_text_buffer_get_serialize_formats noargs -static PyObject * -_wrap_gtk_text_buffer_get_serialize_formats(PyGObject *self) -{ - GdkAtom *formats; - gint n_formats, i; - PyObject *py_formats; - - formats = gtk_text_buffer_get_serialize_formats( - GTK_TEXT_BUFFER(self->obj), &n_formats); - - py_formats = PyList_New(n_formats); - for (i = 0; i < n_formats; i++) { - gchar *name = gdk_atom_name(formats[i]); - PyList_SetItem(py_formats, i, PyString_FromString(name)); - g_free(name); - } - g_free(formats); - return py_formats; -} diff --git a/gtk/gtktoolbar.override b/gtk/gtktoolbar.override deleted file mode 100644 index fddab8e2..00000000 --- a/gtk/gtktoolbar.override +++ /dev/null @@ -1,578 +0,0 @@ -%% -ignore - gtk_tool_button_new_from_stock - gtk_menu_tool_button_new_from_stock - gtk_toggle_tool_button_new_from_stock -%% -ignore-glob - gtk_radio_tool_button_new_* -%% -override gtk_toolbar_append_item kwargs -static PyObject * -_wrap_gtk_toolbar_append_item(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "text", "tooltip_text", "tooltip_private_text", - "icon", "callback", "user_data", NULL }; - char *text, *tooltip_text, *tooltip_private_text; - PyGObject *py_icon; - PyObject *callback, *param = NULL, *py_ret; - GtkWidget *icon = NULL, *ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "zzzOO|O:GtkToolbar.append_item", kwlist, - &text, &tooltip_text, - &tooltip_private_text, &py_icon, - &callback, ¶m)) - return NULL; - if (PyErr_Warn(PyExc_DeprecationWarning, "") < 0) - return NULL; - if (pygobject_check(py_icon, &PyGtkWidget_Type)) - icon = GTK_WIDGET(py_icon->obj); - else if ((PyObject *)py_icon != Py_None) { - PyErr_SetString(PyExc_TypeError, - "forth argument must be a GtkWidget or None"); - return NULL; - } - ret = gtk_toolbar_append_item(GTK_TOOLBAR(self->obj), text, tooltip_text, - tooltip_private_text, icon, NULL, NULL); - py_ret = pygobject_new((GObject *)ret); - if (ret && PyCallable_Check(callback)) { - GClosure *closure; - - closure = pyg_closure_new(callback, param, NULL); - g_signal_connect_closure(ret, "clicked", closure, FALSE); - pygobject_watch_closure(py_ret, closure); - } - return py_ret; -} -%% -override gtk_toolbar_prepend_item kwargs -static PyObject * -_wrap_gtk_toolbar_prepend_item(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "text", "tooltip_text", "tooltip_private_text", - "icon", "callback", "user_data", NULL }; - char *text, *tooltip_text, *tooltip_private_text; - PyGObject *py_icon; - PyObject *callback, *param, *py_ret; - GtkWidget *icon = NULL, *ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "zzzOOO:GtkToolbar.prepend_item", kwlist, - &text, &tooltip_text, - &tooltip_private_text, &py_icon, - &callback, ¶m)) - return NULL; - if (PyErr_Warn(PyExc_DeprecationWarning, "") < 0) - return NULL; - if (pygobject_check(py_icon, &PyGtkWidget_Type)) - icon = GTK_WIDGET(py_icon->obj); - else if ((PyObject *)py_icon != Py_None) { - PyErr_SetString(PyExc_TypeError, - "forth argument must be a GtkWidget or None"); - return NULL; - } - ret = gtk_toolbar_prepend_item(GTK_TOOLBAR(self->obj), text, tooltip_text, - tooltip_private_text, icon, NULL, NULL); - py_ret = pygobject_new((GObject *)ret); - if (ret && PyCallable_Check(callback)) { - GClosure *closure; - - closure = pyg_closure_new(callback, param, NULL); - g_signal_connect_closure(ret, "clicked", closure, FALSE); - pygobject_watch_closure(py_ret, closure); - } - return py_ret; -} -%% -override gtk_toolbar_insert_item kwargs -static PyObject * -_wrap_gtk_toolbar_insert_item(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "text", "tooltip_text", "tooltip_private_text", - "icon", "callback", "user_data", "position", - NULL }; - char *text, *tooltip_text, *tooltip_private_text; - PyGObject *py_icon; - PyObject *callback, *param, *py_ret; - GtkWidget *icon = NULL, *ret; - int position; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "zzzOOOi:GtkToolbar.insert_item", kwlist, - &text, &tooltip_text, - &tooltip_private_text, &py_icon, - &callback, ¶m, &position)) - return NULL; - if (PyErr_Warn(PyExc_DeprecationWarning, "") < 0) - return NULL; - if (pygobject_check(py_icon, &PyGtkWidget_Type)) - icon = GTK_WIDGET(py_icon->obj); - else if ((PyObject *)py_icon != Py_None) { - PyErr_SetString(PyExc_TypeError, - "forth argument must be a GtkWidget or None"); - return NULL; - } - ret = gtk_toolbar_insert_item(GTK_TOOLBAR(self->obj), text, tooltip_text, - tooltip_private_text, icon, NULL, NULL, - position); - py_ret = pygobject_new((GObject *)ret); - if (ret && PyCallable_Check(callback)) { - GClosure *closure; - - closure = pyg_closure_new(callback, param, NULL); - g_signal_connect_closure(ret, "clicked", closure, FALSE); - pygobject_watch_closure(py_ret, closure); - } - return py_ret; -} -%% -override gtk_toolbar_insert_stock kwargs -static PyObject * -_wrap_gtk_toolbar_insert_stock(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "stock_id", "tooltip_text", "tooltip_private_text", - "callback", "user_data", "position", - NULL }; - char *stock_id, *tooltip_text, *tooltip_private_text; - PyObject *callback, *param, *py_ret; - GtkWidget *ret; - int position; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "zzzOOi:GtkToolbar.insert_stock", kwlist, - &stock_id, &tooltip_text, - &tooltip_private_text, - &callback, ¶m, &position)) - return NULL; - if (PyErr_Warn(PyExc_DeprecationWarning, "") < 0) - return NULL; - - ret = gtk_toolbar_insert_stock(GTK_TOOLBAR(self->obj), stock_id, tooltip_text, - tooltip_private_text, NULL, NULL, - position); - py_ret = pygobject_new((GObject *)ret); - if (ret && PyCallable_Check(callback)) { - GClosure *closure; - - closure = pyg_closure_new(callback, param, NULL); - g_signal_connect_closure(ret, "clicked", closure, FALSE); - pygobject_watch_closure(py_ret, closure); - } - return py_ret; -} -%% -override gtk_toolbar_append_element kwargs -static PyObject * -_wrap_gtk_toolbar_append_element(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "type", "widget", "text", "tooltip_text", - "tooltip_private_text", "icon", "callback", - "user_data", NULL }; - char *text, *tooltip_text, *tooltip_private_text; - PyObject *py_type, *callback, *param, *py_ret; - PyGObject *py_widget, *py_icon; - GtkWidget *widget = NULL, *icon = NULL, *ret; - GtkToolbarChildType type; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OOzzzOOO:GtkToolbar.append_element", - kwlist, - &py_type, &py_widget, - &text, &tooltip_text, - &tooltip_private_text, &py_icon, - &callback, ¶m)) - return NULL; - if (PyErr_Warn(PyExc_DeprecationWarning, "") < 0) - return NULL; - if (pyg_enum_get_value(GTK_TYPE_TOOLBAR_CHILD_TYPE, - py_type, (gint *)&type)) - return NULL; - if (pygobject_check(py_widget, &PyGtkWidget_Type)) - widget = GTK_WIDGET(py_widget->obj); - else if ((PyObject *)py_widget != Py_None) { - PyErr_SetString(PyExc_TypeError, - "second argument must be a GtkWidget or None"); - return NULL; - } - if (pygobject_check(py_icon, &PyGtkWidget_Type)) - icon = GTK_WIDGET(py_icon->obj); - else if ((PyObject *)py_icon != Py_None) { - PyErr_SetString(PyExc_TypeError, - "sixth argument must be a GtkWidget or None"); - return NULL; - } - ret = gtk_toolbar_append_element(GTK_TOOLBAR(self->obj), type, widget, - text, tooltip_text, tooltip_private_text, - icon, NULL, NULL); - py_ret = pygobject_new((GObject *)ret); - if (ret && PyCallable_Check(callback) && - (type == GTK_TOOLBAR_CHILD_BUTTON || - type == GTK_TOOLBAR_CHILD_TOGGLEBUTTON || - type == GTK_TOOLBAR_CHILD_RADIOBUTTON)) { - GClosure *closure; - - closure = pyg_closure_new(callback, param, NULL); - g_signal_connect_closure(ret, "clicked", closure, FALSE); - pygobject_watch_closure(py_ret, closure); - } - return py_ret; -} -%% -override gtk_toolbar_prepend_element kwargs -static PyObject * -_wrap_gtk_toolbar_prepend_element(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "type", "widget", "text", "tooltip_text", - "tooltip_private_text", "icon", "callback", - "user_data", NULL }; - char *text, *tooltip_text, *tooltip_private_text; - PyObject *py_type, *callback, *param, *py_ret; - PyGObject *py_widget, *py_icon; - GtkWidget *widget = NULL, *icon = NULL, *ret; - GtkToolbarChildType type; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OOzzzOOO:GtkToolbar.prepend_element", - kwlist, - &py_type, &py_widget, - &text, &tooltip_text, - &tooltip_private_text, &py_icon, - &callback, ¶m)) - return NULL; - if (PyErr_Warn(PyExc_DeprecationWarning, "") < 0) - return NULL; - if (pyg_enum_get_value(GTK_TYPE_TOOLBAR_CHILD_TYPE, - py_type, (gint *)&type)) - return NULL; - if (pygobject_check(py_widget, &PyGtkWidget_Type)) - widget = GTK_WIDGET(py_widget->obj); - else if ((PyObject *)py_widget != Py_None) { - PyErr_SetString(PyExc_TypeError, - "second argument must be a GtkWidget or None"); - return NULL; - } - if (pygobject_check(py_icon, &PyGtkWidget_Type)) - icon = GTK_WIDGET(py_icon->obj); - else if ((PyObject *)py_icon != Py_None) { - PyErr_SetString(PyExc_TypeError, - "sixth argument must be a GtkWidget or None"); - return NULL; - } - ret = gtk_toolbar_prepend_element(GTK_TOOLBAR(self->obj), type, widget, - text, tooltip_text, tooltip_private_text, - icon, NULL, NULL); - py_ret = pygobject_new((GObject *)ret); - if (ret && PyCallable_Check(callback) && - (type == GTK_TOOLBAR_CHILD_BUTTON || - type == GTK_TOOLBAR_CHILD_TOGGLEBUTTON || - type == GTK_TOOLBAR_CHILD_RADIOBUTTON)) { - GClosure *closure; - - closure = pyg_closure_new(callback, param, NULL); - g_signal_connect_closure(ret, "clicked", closure, FALSE); - pygobject_watch_closure(py_ret, closure); - } - return py_ret; -} -%% -override gtk_toolbar_insert_element kwargs -static PyObject * -_wrap_gtk_toolbar_insert_element(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "type", "widget", "text", "tooltip_text", - "tooltip_private_text", "icon", "callback", - "user_data", "position", NULL }; - char *text, *tooltip_text, *tooltip_private_text; - PyObject *py_type, *callback, *param, *py_ret; - PyGObject *py_widget, *py_icon; - GtkWidget *widget = NULL, *icon = NULL, *ret; - GtkToolbarChildType type; - int position; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OOzzzOOOi:GtkToolbar.insert_element", - kwlist, - &py_type, &py_widget, - &text, &tooltip_text, - &tooltip_private_text, &py_icon, - &callback, ¶m, &position)) - return NULL; - if (PyErr_Warn(PyExc_DeprecationWarning, "") < 0) - return NULL; - if (pyg_enum_get_value(GTK_TYPE_TOOLBAR_CHILD_TYPE, - py_type, (gint *)&type)) - return NULL; - if (pygobject_check(py_widget, &PyGtkWidget_Type)) - widget = GTK_WIDGET(py_widget->obj); - else if ((PyObject *)py_widget != Py_None) { - PyErr_SetString(PyExc_TypeError, - "second argument must be a GtkWidget or None"); - return NULL; - } - if (pygobject_check(py_icon, &PyGtkWidget_Type)) - icon = GTK_WIDGET(py_icon->obj); - else if ((PyObject *)py_icon != Py_None) { - PyErr_SetString(PyExc_TypeError, - "sixth argument must be a GtkWidget or None"); - return NULL; - } - ret = gtk_toolbar_insert_element(GTK_TOOLBAR(self->obj), type, widget, - text, tooltip_text, tooltip_private_text, - icon, NULL, NULL, position); - py_ret = pygobject_new((GObject *)ret); - if (ret && PyCallable_Check(callback) && - (type == GTK_TOOLBAR_CHILD_BUTTON || - type == GTK_TOOLBAR_CHILD_TOGGLEBUTTON || - type == GTK_TOOLBAR_CHILD_RADIOBUTTON)) { - GClosure *closure; - - closure = pyg_closure_new(callback, param, NULL); - g_signal_connect_closure(ret, "clicked", closure, FALSE); - pygobject_watch_closure(py_ret, closure); - } - return py_ret; -} -%% -override gtk_toggle_tool_button_new kwargs -static int -_wrap_gtk_toggle_tool_button_new(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "stock_id", NULL }; - char *stock_id = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|z:GtkToggleToolButton.__init__", - kwlist, &stock_id)) - return -1; - - if (stock_id) - pygobject_construct(self, "stock-id", stock_id, NULL); - else - pygobject_construct(self, NULL); - - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkToggleToolButton object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_TOGGLE_TOOL_BUTTON -%% -override gtk_tool_button_new kwargs -static int -_wrap_gtk_tool_button_new(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist1[] = { "stock_id", NULL }; - static char *kwlist2[] = { "icon_widget", "label", NULL }; - PyGObject *py_icon_widget = NULL; - GtkWidget *icon_widget = NULL; - char *label = NULL; - char *stock_id = NULL; - - if (PyArg_ParseTupleAndKeywords(args, kwargs, - "s:GtkToolButton.__init__", kwlist1, - &stock_id)) { - pygobject_construct(self, "stock-id", stock_id, NULL); - } else { - PyErr_Clear(); - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|Oz:GtkToolButton.__init__", kwlist2, - &py_icon_widget, &label)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "Usage: one of:\n" - " gtk.ToolButton(icon_widget=None, label=None)\n" - " gtk.ToolButton(stock_id)"); - return -1; - } - - if (py_icon_widget && (PyObject *)py_icon_widget != Py_None) { - if (!pygobject_check(py_icon_widget, &PyGtkWidget_Type)) { - PyErr_SetString(PyExc_TypeError, - "Usage: one of:\n" - " gtk.ToolButton(icon_widget=None, label=None)\n" - " gtk.ToolButton(stock_id)"); - return -1; - } - icon_widget = GTK_WIDGET(py_icon_widget->obj); - } - pygobject_construct(self, "icon-widget", icon_widget, - "label", label, NULL); - } - - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkToolButton object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_TOOL_BUTTON -%% -override gtk_radio_tool_button_new kwargs -static int -_wrap_gtk_radio_tool_button_new(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "group", "stock_id", NULL }; - gchar *stock = NULL; - PyObject *py_widget = Py_None; - GtkRadioToolButton *widget = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|Oz:GtkRadioToolButton.__init__", kwlist, - &py_widget, &stock)) - return -1; - - if (py_widget != Py_None) { - if (pygobject_check(py_widget, &PyGtkRadioToolButton_Type)) - widget = GTK_RADIO_TOOL_BUTTON(pygobject_get(py_widget)); - else { - PyErr_SetString(PyExc_TypeError, - "first argument must be a GtkRadioToolButton or None"); - return -1; - } - } - - /* various configs for create radio tool buttons ... */ - if (stock == NULL) { - if (widget == NULL) - pygobject_construct(self, NULL); - else - pygobject_construct(self, "group", widget, NULL); - } else { - if (widget == NULL) - pygobject_construct(self, "stock-id", stock, NULL); - else - pygobject_construct(self, "stock-id", stock, "group", widget, NULL); - } - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkRadioToolButton object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_RADIO_TOOL_BUTTON -%% -override gtk_radio_tool_button_set_group kwargs -static PyObject * -_wrap_gtk_radio_tool_button_set_group(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "group", NULL }; - GSList *list; - GtkRadioToolButton *group; - PyObject *py_group; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkRadioToolButton.set_group", - kwlist, &py_group)) - return NULL; - - if (pygobject_check(py_group, &PyGtkRadioToolButton_Type)) { - group = GTK_RADIO_TOOL_BUTTON(pygobject_get(py_group)); - list = gtk_radio_tool_button_get_group(group); - if (list == gtk_radio_tool_button_get_group(GTK_RADIO_TOOL_BUTTON(self->obj))) { - PyErr_SetString(PyExc_ValueError, "radio tool button already in group"); - return NULL; - } - } else if (py_group == Py_None) { - list = NULL; - } else { - PyErr_SetString(PyExc_TypeError, "group must be a RadioToolButton or None"); - return NULL; - } - - gtk_radio_tool_button_set_group(GTK_RADIO_TOOL_BUTTON(self->obj), list); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_radio_tool_button_get_group noargs -static PyObject * -_wrap_gtk_radio_tool_button_get_group(PyGObject *self) { - PyObject *py_list; - GSList *list, *tmp; - PyObject *gtk_obj; - - list = gtk_radio_tool_button_get_group(GTK_RADIO_TOOL_BUTTON(self->obj)); - - if ((py_list = PyList_New(0)) == NULL) { - return NULL; - } - for (tmp = list; tmp != NULL; tmp = tmp->next) { - gtk_obj = pygobject_new(G_OBJECT(tmp->data)); - if (gtk_obj == NULL) { - Py_DECREF(py_list); - return NULL; - } - PyList_Append(py_list, gtk_obj); - Py_DECREF(gtk_obj); - } - return py_list; -} -%% -override gtk_menu_tool_button_new kwargs -static int -_wrap_gtk_menu_tool_button_new(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist1[] = { "stock_id", NULL }; - static char *kwlist2[] = { "icon_widget", "label", NULL }; - gchar *stock_id, *label; - PyObject *py_icon_widget; - GtkWidget *icon_widget = NULL; - - if (PyArg_ParseTupleAndKeywords(args, kwargs, - "s:GtkMenuToolButton.__init__", - kwlist1, &stock_id)) - pygobject_construct(self, "stock-id", stock_id, NULL); - else { - PyErr_Clear(); - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "Oz:GtkFileChooserButton.__init__", - kwlist2, &py_icon_widget, &label)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "Usage: one of:\n" - " gtk.MenuToolButton(stock_id)\n" - " gtk.MenuToolButton(icon_widget, label)"); - return -1; - } - if (py_icon_widget != Py_None) { - if (pygobject_check(py_icon_widget, &PyGtkWidget_Type)) { - icon_widget = GTK_WIDGET(pygobject_get(py_icon_widget)); - } else { - PyErr_SetString(PyExc_TypeError, - "icon_widget must be a GtkWidget type or None"); - return -1; - } - } - pygobject_construct(self, "icon-widget", icon_widget, - "label", label, NULL); - } - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkMenuToolButton object"); - return -1; - } - return 0; -} -%% -new-constructor GTK_TYPE_MENU_TOOL_BUTTON diff --git a/gtk/gtktreeview.override b/gtk/gtktreeview.override deleted file mode 100644 index 2207c3d4..00000000 --- a/gtk/gtktreeview.override +++ /dev/null @@ -1,3322 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * gtktreeview.override: overrides for the gtk.TreeView object. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -headers -#include "pygtktreemodel.h" -#include "pygtkcellrenderer.h" - -static void -pygtk_cell_data_func_marshal (GtkCellLayout *cell_layout, - GtkCellRenderer *cell, - GtkTreeModel *tree_model, - GtkTreeIter *iter, - gpointer data); - -%% -init - PyGtkListStore_Type.tp_as_number = PyGtkTreeModel_Type.tp_as_number; - PyGtkListStore_Type.tp_as_mapping = PyGtkTreeModel_Type.tp_as_mapping; - PyGtkListStore_Type.tp_iter = PyGtkTreeModel_Type.tp_iter; - PyGtkTreeStore_Type.tp_as_number = PyGtkTreeModel_Type.tp_as_number; - PyGtkTreeStore_Type.tp_as_mapping = PyGtkTreeModel_Type.tp_as_mapping; - PyGtkTreeStore_Type.tp_iter = PyGtkTreeModel_Type.tp_iter; - PyPyGtkGenericTreeModel_Type.tp_as_number = PyGtkTreeModel_Type.tp_as_number; - PyPyGtkGenericTreeModel_Type.tp_as_mapping = PyGtkTreeModel_Type.tp_as_mapping; - PyPyGtkGenericTreeModel_Type.tp_iter = PyGtkTreeModel_Type.tp_iter; - PyGtkTreeModelSort_Type.tp_as_number = PyGtkTreeModel_Type.tp_as_number; - PyGtkTreeModelSort_Type.tp_as_mapping = PyGtkTreeModel_Type.tp_as_mapping; - PyGtkTreeModelSort_Type.tp_iter = PyGtkTreeModel_Type.tp_iter; - PyGtkTreeModelFilter_Type.tp_as_number = PyGtkTreeModel_Type.tp_as_number; - PyGtkTreeModelFilter_Type.tp_as_mapping = PyGtkTreeModel_Type.tp_as_mapping; - PyGtkTreeModelFilter_Type.tp_iter = PyGtkTreeModel_Type.tp_iter; -%% -ignore-glob - gtk_tree_path_* -%% -ignore - gtk_tree_view_new - gtk_tree_model_get_valist - gtk_tree_row_reference_new_proxy - gtk_tree_row_reference_inserted - gtk_tree_row_reference_deleted - gtk_tree_row_reference_reordered - gtk_tree_view_column_set_cell_data_func - gtk_tree_view_column_pack_start - gtk_tree_view_column_pack_end - gtk_tree_view_column_clear - gtk_tree_view_column_set_attributes - gtk_tree_view_get_row_separator_func - gtk_tree_view_get_search_equal_func - gtk_tree_view_get_search_position_func - gtk_list_store_insert_with_values - gtk_list_store_insert_with_valuesv - gtk_tree_store_insert_with_values - gtk_tree_store_insert_with_valuesv -%% -override gtk_tree_view_column_new kwargs -static int -_wrap_gtk_tree_view_column_new(PyGObject *self, PyObject*args, PyObject*kwargs) -{ - PyObject *py_cell = NULL, *key, *item; - GtkTreeViewColumn *tvc; - gchar *title = NULL; - GtkCellRenderer *cell = NULL; - Py_ssize_t i = 0; - - if (!PyArg_ParseTuple(args, "|zO:GtkTreeViewColumn.__init__", &title, - &py_cell)) - return -1; - if (py_cell != NULL) { - if (pygobject_check(py_cell, &PyGtkCellRenderer_Type)) - cell = GTK_CELL_RENDERER(pygobject_get(py_cell)); - else if (py_cell != Py_None) { - PyErr_SetString(PyExc_TypeError, - "cell must be a GtkCellRenderer or None"); - return -1; - } - } - tvc = GTK_TREE_VIEW_COLUMN( - g_object_new(pyg_type_from_object((PyObject *) self), NULL)); - - if (title) - gtk_tree_view_column_set_title(tvc, title); - if (cell) - gtk_tree_view_column_pack_start(tvc, cell, TRUE); - if (kwargs) { - while (PyDict_Next(kwargs, &i, &key, &item)) { - gchar *attr = PyString_AsString(key); - - if (!PyInt_Check(item)) { - gchar err[128]; - g_snprintf(err, sizeof(err), - "%s must be an integer column number", attr); - PyErr_SetString(PyExc_TypeError, err); - g_object_unref(tvc); - return -1; - } - gtk_tree_view_column_add_attribute(tvc, cell, attr, - PyInt_AsLong(item)); - } - } - self->obj = (GObject *)tvc; - pygobject_register_wrapper((PyObject *)self); - return 0; -} -%% -override gtk_tree_view_column_cell_get_size kwargs -static PyObject * -_wrap_gtk_tree_view_column_cell_get_size(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "cell_area", NULL }; - PyObject *py_cell_area = Py_None; - GdkRectangle cell_area = { 0, 0, 0, 0}; - gint x_offset = 0, y_offset = 0, width, height; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|O:GtkTreeViewColumn.cell_get_size", - kwlist, &py_cell_area)) - return NULL; - - if (py_cell_area != Py_None) { - if (!pygdk_rectangle_from_pyobject(py_cell_area, &cell_area)) - return NULL; - } - - gtk_tree_view_column_cell_get_size(GTK_TREE_VIEW_COLUMN(self->obj), - (py_cell_area == Py_None) ? NULL : &cell_area, - &x_offset, &y_offset, &width, &height); - - return Py_BuildValue("(Niiii)", - pyg_boxed_new(GDK_TYPE_RECTANGLE, - &cell_area, TRUE, TRUE), - x_offset, y_offset, width, height); -} -%% -override gtk_tree_view_column_get_cell_renderers noargs -static PyObject * -_wrap_gtk_tree_view_column_get_cell_renderers(PyGObject *self) -{ - GList *list, *tmp; - PyObject *ret; - - list = gtk_tree_view_column_get_cell_renderers( - GTK_TREE_VIEW_COLUMN(self->obj)); - - ret = PyList_New(0); - for (tmp = list; tmp != NULL; tmp = tmp->next) { - GtkWidget *renderer = tmp->data; - PyObject *item = pygobject_new((GObject *)renderer); - - PyList_Append(ret, item); - Py_DECREF(item); - } - g_list_free(list); - return ret; -} -%% -override gtk_cell_layout_set_cell_data_func kwargs -static void -pygtk_cell_data_func_marshal (GtkCellLayout *cell_layout, - GtkCellRenderer *cell, - GtkTreeModel *tree_model, - GtkTreeIter *iter, gpointer data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = data; - PyObject *retobj; - PyObject *pycelllayout, *pycell, *pytreemodel, *pyiter; - - g_assert (cunote->func); - - state = pyg_gil_state_ensure(); - - pycelllayout = pygobject_new((GObject *)cell_layout); - pycell = pygobject_new((GObject *)cell); - pytreemodel = pygobject_new((GObject *)tree_model); - pyiter = pyg_boxed_new(GTK_TYPE_TREE_ITER, iter, - FALSE, FALSE); - if (cunote->data) - retobj = PyEval_CallFunction(cunote->func, "(NNNNO)", - pycelllayout, pycell, - pytreemodel, pyiter, cunote->data); - else - retobj = PyEval_CallFunction(cunote->func, "(NNNN)", - pycelllayout, pycell, - pytreemodel, pyiter); - - if (retobj == NULL) { - PyErr_Print(); - } else - Py_DECREF(retobj); - - pyg_gil_state_release(state); -} - -static PyObject * -_wrap_gtk_cell_layout_set_cell_data_func (PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - PyObject *pycell, *pyfunc, *pyarg = NULL; - GtkCellRenderer *cell; - PyGtkCustomNotify *cunote; - - if (!PyArg_ParseTuple(args, "OO|O:GtkCellLayout.set_cell_data_func", - &pycell, &pyfunc, &pyarg)) - return NULL; - - if (pygobject_check(pycell, &PyGtkCellRenderer_Type)) - cell = GTK_CELL_RENDERER(pygobject_get(pycell)); - else { - PyErr_SetString(PyExc_TypeError, - "first argument must be a GtkCellRenderer"); - return NULL; - } - - if (pyfunc == Py_None) { - gtk_cell_layout_set_cell_data_func(GTK_CELL_LAYOUT(self->obj), cell, - NULL, NULL, NULL); - } else { - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = pyfunc; - cunote->data = pyarg; - Py_INCREF(cunote->func); - Py_XINCREF(cunote->data); - - gtk_cell_layout_set_cell_data_func(GTK_CELL_LAYOUT(self->obj), cell, - pygtk_cell_data_func_marshal, - cunote, - pygtk_custom_destroy_notify); - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_view_insert_column_with_data_func kwargs -static PyObject * -_wrap_gtk_tree_view_insert_column_with_data_func (PyGObject *self, - PyObject *args, - PyObject *kwargs) -{ - int position; - gchar *title; - PyObject *pycell,*pyfunc, *pyarg = NULL; - GtkCellRenderer *cell; - PyGtkCustomNotify *cunote; - gint retval; - - if (!PyArg_ParseTuple(args, - "isOO|O:GtkTreeView.insert_column_with_data_func", - &position, &title, &pycell, &pyfunc, &pyarg)) - return NULL; - - if (pygobject_check(pycell, &PyGtkCellRenderer_Type)) - cell = GTK_CELL_RENDERER(pygobject_get(pycell)); - else { - PyErr_SetString(PyExc_TypeError, - "first argument must be a GtkCellRenderer"); - return NULL; - } - - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = pyfunc; - cunote->data = pyarg; - Py_INCREF(cunote->func); - Py_XINCREF(cunote->data); - - retval = gtk_tree_view_insert_column_with_data_func ( - GTK_TREE_VIEW (self->obj), - position, - title, - cell, - (GtkTreeCellDataFunc)pygtk_cell_data_func_marshal, - cunote, - pygtk_custom_destroy_notify); - return PyInt_FromLong(retval); -} -%% -override gtk_tree_view_get_path_at_pos kwargs -static PyObject * -_wrap_gtk_tree_view_get_path_at_pos(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "x", "y", NULL }; - gint x, y; - GtkTreePath *path; - GtkTreeViewColumn *column; - gint cell_x, cell_y; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "ii:GtkTreeView.get_path_at_pos", - kwlist, &x, &y)) - return NULL; - if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(self->obj), x, y, - &path, &column, &cell_x, &cell_y)) { - PyObject *ret = PyTuple_New(4); - - if (path) { - PyTuple_SetItem(ret, 0, pygtk_tree_path_to_pyobject(path)); - gtk_tree_path_free(path); - } else { - Py_INCREF(Py_None); - PyTuple_SetItem(ret, 0, Py_None); - } - PyTuple_SetItem(ret, 1, pygobject_new((GObject *)column)); - PyTuple_SetItem(ret, 2, PyInt_FromLong(cell_x)); - PyTuple_SetItem(ret, 3, PyInt_FromLong(cell_y)); - return ret; - } else { - Py_INCREF(Py_None); - return Py_None; - } -} -%% -override gtk_tree_view_insert_column_with_attributes kwargs -static PyObject * -_wrap_gtk_tree_view_insert_column_with_attributes(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - gint position, columns, real_position; - GtkTreeViewColumn *column; - GtkCellRenderer *cell; - PyObject *py_cell, *key, *item; - const char *title; - Py_ssize_t i = 0; - - if (!PyArg_ParseTuple(args, - "isO!:GtkTreeView.insert_column_with_attributes", - &position, &title, &PyGtkCellRenderer_Type, &py_cell)) - return NULL; - - cell = GTK_CELL_RENDERER(pygobject_get(py_cell)); - - columns = - gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW(self->obj), - position, title, cell, - NULL); - if (position == -1) { - real_position = columns - 1; - } else { - real_position = position; - } - - column = gtk_tree_view_get_column (GTK_TREE_VIEW(self->obj), - real_position); - - if (kwargs) { - while (PyDict_Next(kwargs, &i, &key, &item)) { - gchar *attr = PyString_AsString(key); - - if (!PyInt_Check(item)) { - gchar err[128]; - g_snprintf(err, sizeof(err), - "%s must be an integer column number", attr); - PyErr_SetString(PyExc_TypeError, err); - return NULL; - } - gtk_tree_view_column_add_attribute(column, cell, attr, - PyInt_AsLong(item)); - } - } - return pygobject_new ((GObject *) column); -} -%% -override gtk_tree_view_get_visible_rect noargs -static PyObject * -_wrap_gtk_tree_view_get_visible_rect(PyGObject *self) -{ - GdkRectangle visible_rect; - - gtk_tree_view_get_visible_rect(GTK_TREE_VIEW(self->obj), &visible_rect); - - return pyg_boxed_new(GDK_TYPE_RECTANGLE, &visible_rect, TRUE, TRUE); -} -%% -override gtk_tree_view_get_cell_area kwargs -static PyObject * -_wrap_gtk_tree_view_get_cell_area(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "path", "column", NULL }; - PyObject *py_path; - PyGObject *column; - GdkRectangle rect; - GtkTreePath *path; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO!:GtkTreeView.get_cell_area", kwlist, &py_path, &PyGtkTreeViewColumn_Type, &column)) - return NULL; - path = pygtk_tree_path_from_pyobject(py_path); - if (!path) { - PyErr_SetString(PyExc_TypeError, "could not convert path to a GtkTreePath"); - return NULL; - } - gtk_tree_view_get_cell_area(GTK_TREE_VIEW(self->obj), path, GTK_TREE_VIEW_COLUMN(column->obj), &rect); - if (path) - gtk_tree_path_free(path); - return pyg_boxed_new(GDK_TYPE_RECTANGLE, &rect, TRUE, TRUE); -} -%% -override gtk_tree_view_get_background_area kwargs -static PyObject * -_wrap_gtk_tree_view_get_background_area(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "path", "column", NULL }; - PyObject *py_path; - PyGObject *column; - GdkRectangle rect; - GtkTreePath *path; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO!:GtkTreeView.get_background_area", kwlist, &py_path, &PyGtkTreeViewColumn_Type, &column)) - return NULL; - path = pygtk_tree_path_from_pyobject(py_path); - if (!path) { - PyErr_SetString(PyExc_TypeError, "could not convert path to a GtkTreePath"); - return NULL; - } - gtk_tree_view_get_background_area(GTK_TREE_VIEW(self->obj), path, GTK_TREE_VIEW_COLUMN(column->obj), &rect); - if (path) - gtk_tree_path_free(path); - return pyg_boxed_new(GDK_TYPE_RECTANGLE, &rect, TRUE, TRUE); -} -%% -override gtk_tree_view_widget_to_tree_coords args -static PyObject * -_wrap_gtk_tree_view_widget_to_tree_coords(PyGObject *self, PyObject *args) -{ - gint wx, wy, tx, ty; - - if (!PyArg_ParseTuple(args, "ii:GtkTreeView.widget_to_tree_coords", - &wx, &wy)) { - return NULL; - } - - gtk_tree_view_widget_to_tree_coords(GTK_TREE_VIEW(self->obj), wx, wy, &tx, &ty); - - return Py_BuildValue("(ii)", tx, ty); -} -%% -override gtk_tree_view_tree_to_widget_coords args -static PyObject * -_wrap_gtk_tree_view_tree_to_widget_coords(PyGObject *self, PyObject *args) -{ - gint tx, ty, wx, wy; - - if (!PyArg_ParseTuple(args, "ii:GtkTreeView.tree_to_widget_coords", - &tx, &ty)) { - return NULL; - } - - gtk_tree_view_tree_to_widget_coords(GTK_TREE_VIEW(self->obj), tx, ty, &wx, &wy); - - return Py_BuildValue("(ii)", wx, wy); -} -%% -override gtk_tree_view_get_cursor noargs -static PyObject * -_wrap_gtk_tree_view_get_cursor(PyGObject *self) -{ - PyObject *py_path; - PyObject *py_column; - GtkTreePath *path; - GtkTreeViewColumn *column; - - gtk_tree_view_get_cursor(GTK_TREE_VIEW(self->obj), - &path, &column); - - if (path != NULL) { - py_path = pygtk_tree_path_to_pyobject(path); - } else { - Py_INCREF(Py_None); - py_path = Py_None; - } - - if (column != NULL) { - py_column = pygobject_new((GObject*)column); - } else { - Py_INCREF(Py_None); - py_column = Py_None; - } - - return Py_BuildValue("(NN)", py_path, py_column); -} -%% -override gtk_tree_view_get_columns noargs -static PyObject * -_wrap_gtk_tree_view_get_columns(PyGObject *self) -{ - GList *list, *tmp; - PyObject *py_list; - - list = gtk_tree_view_get_columns(GTK_TREE_VIEW(self->obj)); - - if ((py_list = PyList_New(0)) == NULL) { - g_list_free(list); - return NULL; - } - for (tmp = list; tmp != NULL; tmp = tmp->next) { - PyObject *gtk_obj = pygobject_new(G_OBJECT(tmp->data)); - - if (gtk_obj == NULL) { - g_list_free(list); - Py_DECREF(py_list); - return NULL; - } - PyList_Append(py_list, gtk_obj); - Py_DECREF(gtk_obj); - } - g_list_free(list); - return py_list; -} -%% -override gtk_tree_selection_get_selected noargs -static PyObject * -_wrap_gtk_tree_selection_get_selected(PyGObject *self) -{ - GtkTreeModel *model; - GtkTreeIter iter; - GtkSelectionMode mode; - - mode = gtk_tree_selection_get_mode(GTK_TREE_SELECTION(self->obj)); - if (mode == GTK_SELECTION_MULTIPLE) { - PyErr_SetString(PyExc_TypeError, - "GtkTreeSelection.get_selected can not be used when" - " selection mode is gtk.SELECTION_MULTIPLE"); - return NULL; - } - - if (gtk_tree_selection_get_selected(GTK_TREE_SELECTION(self->obj), - &model, &iter)) { - return Py_BuildValue("(NN)", - pygobject_new((GObject *)model), - pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, - TRUE, TRUE)); - } else { - return Py_BuildValue ("(NO)", - pygobject_new((GObject *)model), - Py_None); - } -} -%% -override gtk_tree_selection_get_selected_rows noargs -static PyObject * -_wrap_gtk_tree_selection_get_selected_rows(PyGObject *self) -{ - GtkTreeModel *model = NULL; - GList *selected, *tmp; - PyObject *py_selected; - - selected = gtk_tree_selection_get_selected_rows - (GTK_TREE_SELECTION(self->obj), &model); - py_selected = PyList_New(0); - for (tmp = selected; tmp != NULL; tmp = tmp->next) { - GtkTreePath *path = tmp->data; - PyObject *item = pygtk_tree_path_to_pyobject(path); - - PyList_Append(py_selected, item); - Py_DECREF(item); - gtk_tree_path_free(path); - } - g_list_free(selected); - return Py_BuildValue("(NN)", pygobject_new((GObject *)model), py_selected); -} -%% -override gtk_tree_selection_selected_foreach - -static void -pygtk_tree_selection_foreach_marshal(GtkTreeModel *model, - GtkTreePath *path, - GtkTreeIter *iter, - gpointer data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = data; - PyObject *py_model, *py_path, *py_iter, *retobj; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - py_model = pygobject_new((GObject *)model); - py_path = pygtk_tree_path_to_pyobject(path); - py_iter = pyg_boxed_new(GTK_TYPE_TREE_ITER, iter, FALSE, FALSE); - if (cunote->data) - retobj = PyEval_CallFunction(cunote->func, "(NNOO)", - py_model, py_path, py_iter, - cunote->data); - else - retobj = PyEval_CallFunction(cunote->func, "(NNO)", - py_model, py_path, py_iter); - - if (retobj == NULL) { - PyErr_Print(); - } - pygtk_boxed_unref_shared(py_iter); - Py_XDECREF(retobj); - - pyg_gil_state_release(state); -} -static PyObject * -_wrap_gtk_tree_selection_selected_foreach(PyGObject *self, PyObject *args) -{ - PyObject *pyfunc, *pyarg = NULL; - PyGtkCustomNotify cunote; - - if(!PyArg_ParseTuple(args, "O|O:GtkTreeSelection.selected_foreach", - &pyfunc, &pyarg)) - return NULL; - - cunote.func = pyfunc; - cunote.data = pyarg; - gtk_tree_selection_selected_foreach(GTK_TREE_SELECTION(self->obj), - pygtk_tree_selection_foreach_marshal, - &cunote); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_selection_set_select_function kwargs -static gboolean -pygtk_tree_selection_marshal(GtkTreeSelection *selection, - GtkTreeModel *model, - GtkTreePath *path, - gboolean path_currently_selected, - gpointer data) -{ - PyGILState_STATE state; - gboolean retval = FALSE; - PyGtkCustomNotify *cunote = data; - PyObject *pypath, *retobj; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - pypath = pygtk_tree_path_to_pyobject(path); - if (cunote->data) - retobj = PyEval_CallFunction(cunote->func, "(NO)", pypath, - cunote->data); - else - retobj = PyEval_CallFunction(cunote->func, "(N)", pypath); - - if (retobj == NULL) { - PyErr_Print(); - } - - Py_DECREF(pypath); - if (retobj) { - if(retobj == Py_None); - else if(PyInt_Check(retobj)) - retval = PyInt_AsLong(retobj) && TRUE; - else if(PyLong_Check(retobj)) - retval = PyLong_AsLongLong(retobj) && TRUE; - else if(PyString_Check(retobj)) - retval = PyString_GET_SIZE(retobj) && TRUE; - - Py_DECREF(retobj); - } - - - pyg_gil_state_release(state); - - return retval; -} -static gboolean -pygtk_tree_selection_marshal_full(GtkTreeSelection *selection, - GtkTreeModel *model, - GtkTreePath *path, - gboolean path_currently_selected, - gpointer data) -{ - PyGILState_STATE state; - gboolean retval = FALSE; - PyGtkCustomNotify *cunote = data; - PyObject *pyselection, *pymodel, *pypath, *retobj; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - pyselection = pygobject_new((GObject*)selection); - pymodel = pygobject_new((GObject*)model); - pypath = pygtk_tree_path_to_pyobject(path); - if (cunote->data) - retobj = PyEval_CallFunction(cunote->func, "(NNNNO)", pyselection, - pymodel, pypath, - PyBool_FromLong(path_currently_selected), - cunote->data); - else - retobj = PyEval_CallFunction(cunote->func, "(NNNN)", pyselection, - pymodel, pypath, - PyBool_FromLong(path_currently_selected)); - - if (retobj == NULL) { - PyErr_Print(); - } - - Py_DECREF(pypath); - if (retobj) { - if(retobj == Py_None); - else if(PyInt_Check(retobj)) - retval = PyInt_AsLong(retobj) && TRUE; - else if(PyLong_Check(retobj)) - retval = PyLong_AsLongLong(retobj) && TRUE; - else if(PyString_Check(retobj)) - retval = PyString_GET_SIZE(retobj) && TRUE; - - Py_DECREF(retobj); - } - - - pyg_gil_state_release(state); - - return retval; -} -static PyObject * -_wrap_gtk_tree_selection_set_select_function(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "func", "data", "full", NULL }; - PyObject *pyfunc, *pyarg = NULL, *pyfull = Py_False; - PyGtkCustomNotify *cunote; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:GtkTreeSelection.set_select_function", - kwlist, &pyfunc, &pyarg, &pyfull)) - return NULL; - - if (!PyCallable_Check(pyfunc)) { - PyErr_SetString(PyExc_TypeError, "func must be a callable object"); - return NULL; - } - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = pyfunc; - cunote->data = pyarg; - Py_INCREF(cunote->func); - Py_XINCREF(cunote->data); - if (PyObject_IsTrue(pyfull)) - gtk_tree_selection_set_select_function(GTK_TREE_SELECTION(self->obj), - pygtk_tree_selection_marshal_full, - cunote, - pygtk_custom_destroy_notify); - else - gtk_tree_selection_set_select_function(GTK_TREE_SELECTION(self->obj), - pygtk_tree_selection_marshal, - cunote, - pygtk_custom_destroy_notify); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_get_row_drag_data noargs -static PyObject * -_wrap_gtk_tree_get_row_drag_data(PyObject *self) -{ - GtkTreeModel *tree_model; - GtkTreePath *path; - - if (gtk_tree_get_row_drag_data(pyg_boxed_get(self, GtkSelectionData), - &tree_model, &path)) { - PyObject *ret = Py_BuildValue("(NN)", - pygobject_new((GObject *)tree_model), - pygtk_tree_path_to_pyobject(path)); - - gtk_tree_path_free(path); - return ret; - } - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_model_get_iter kwargs -static PyObject * -_wrap_gtk_tree_model_get_iter(PyGObject *self, PyObject *args,PyObject *kwargs) -{ - static char *kwlist[] = { "path", NULL }; - PyObject *py_path; - GtkTreeIter iter; - GtkTreePath *path; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GtkTreeModel.get_iter", - kwlist, &py_path)) - return NULL; - - path = pygtk_tree_path_from_pyobject(py_path); - if (!path) { - PyErr_SetString(PyExc_TypeError, "GtkTreeModel.get_iter requires a tree path as its argument"); - return NULL; - } - if (gtk_tree_model_get_iter(GTK_TREE_MODEL(self->obj), &iter, path)) { - gtk_tree_path_free(path); - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE); - } else { - gtk_tree_path_free(path); - PyErr_SetString(PyExc_ValueError, "invalid tree path"); - return NULL; - } -} -%% -override gtk_tree_model_get_iter_from_string kwargs -static PyObject * -_wrap_gtk_tree_model_get_iter_from_string(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "path_string", NULL }; - const gchar *path_string; - GtkTreeIter iter; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s:GtkTreeModel.get_iter_from_string", - kwlist, &path_string)) - return NULL; - - if (gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(self->obj), &iter, - path_string)) { - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE); - } else { - PyErr_SetString(PyExc_ValueError, "invalid tree path"); - return NULL; - } -} -%% -override gtk_tree_model_get_value kwargs -static PyObject * -_wrap_gtk_tree_model_get_value(PyGObject *self, PyObject*args, PyObject*kwargs) -{ - static char *kwlist[] = { "iter", "column", NULL }; - PyObject *iter, *ret; - gint column; - GValue value = { 0, }; - - if (!PyArg_ParseTupleAndKeywords(args,kwargs, "Oi:GtkTreeModel.get_value", - kwlist, &iter, &column)) - return NULL; - if (column < 0 || - column >= gtk_tree_model_get_n_columns(GTK_TREE_MODEL(self->obj))) { - PyErr_SetString(PyExc_ValueError, "column number is out of range"); - return NULL; - } - if (!pyg_boxed_check(iter, GTK_TYPE_TREE_ITER)) { - PyErr_SetString(PyExc_TypeError, "iter must be a GtkTreeIter"); - return NULL; - } - gtk_tree_model_get_value(GTK_TREE_MODEL(self->obj), - pyg_boxed_get(iter, GtkTreeIter), column, &value); - ret = pyg_value_as_pyobject(&value, TRUE); - g_value_unset(&value); - return ret; -} -%% -override gtk_tree_model_rows_reordered kwargs -static PyObject * -_wrap_gtk_tree_model_rows_reordered(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "path", "iter", "new_order", NULL }; - PyObject *py_path, *py_iter, *py_new_order, *sitem; - GtkTreeIter *iter = NULL; - GtkTreePath *path; - gint *new_order; - gint len_model, len_seq; - gint i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OOO:GtkTreeModel.rows_reordered", kwlist, - &py_path, &py_iter, &py_new_order)) - return NULL; - - if (py_path == Py_None || - (PyTuple_Check(py_path) && PyTuple_Size(py_path) == 0) || - (PyString_Check(py_path) && PyString_Size(py_path) == 0)) - path = gtk_tree_path_new(); - else - path = pygtk_tree_path_from_pyobject(py_path); - if (!path) { - PyErr_SetString(PyExc_TypeError, - "could not convert path to a GtkTreePath"); - return NULL; - } - - if (py_iter == Py_None) - iter = NULL; - else if (pyg_boxed_check(py_iter, GTK_TYPE_TREE_ITER)) - iter = pyg_boxed_get(py_iter, GtkTreeIter); - else { - PyErr_SetString(PyExc_TypeError, "iter should be a GtkTreeIter"); - gtk_tree_path_free(path); - return NULL; - } - - if (!PySequence_Check(py_new_order)) { - PyErr_SetString(PyExc_TypeError, - "new_order must be a sequence of ints"); - gtk_tree_path_free(path); - return NULL; - } - - len_model = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(self->obj), iter); - len_seq = PySequence_Size(py_new_order); - if (len_model != len_seq) { - PyErr_Format(PyExc_ValueError, - "new_order should be a sequence with the same size as the " - "number of children of iter (%d, is %d)", len_model, len_seq); - gtk_tree_path_free(path); - return NULL; - } - - // Create on stack: much faster, no free() needed. - new_order = g_newa(gint, len_seq); - for (i = 0; i < len_seq; i++) { - sitem = PySequence_GetItem(py_new_order, i); - Py_DECREF(sitem); - sitem = PyNumber_Int(sitem); - if (sitem) - new_order[i] = (gint) PyInt_AsLong(sitem); - else { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "new_order sequence item not an int"); - gtk_tree_path_free(path); - return NULL; - } - Py_DECREF(sitem); - } - - gtk_tree_model_rows_reordered(GTK_TREE_MODEL(self->obj), - path, iter, new_order); - gtk_tree_path_free(path); - Py_INCREF(Py_None); - return Py_None; -} -%% -override-slot GtkTreeModel.tp_as_number -static int -_wrap_gtk_tree_model_tp_nonzero(PyGObject *self) -{ - return TRUE; -} -static PyNumberMethods _wrap_gtk_tree_model_tp_as_number = { - (binaryfunc)0, - (binaryfunc)0, - (binaryfunc)0, - (binaryfunc)0, - (binaryfunc)0, - (binaryfunc)0, - (ternaryfunc)0, - (unaryfunc)0, - (unaryfunc)0, - (unaryfunc)0, - (inquiry)_wrap_gtk_tree_model_tp_nonzero, - (unaryfunc)0, - (binaryfunc)0, - (binaryfunc)0, - (binaryfunc)0, - (binaryfunc)0, - (binaryfunc)0, - (coercion)0, - (unaryfunc)0, - (unaryfunc)0, - (unaryfunc)0, - (unaryfunc)0, - (unaryfunc)0 -}; -%% -override-slot GtkTreeModel.tp_as_mapping -static Py_ssize_t -_wrap_gtk_tree_model_tp_length(PyGObject *self) -{ - return gtk_tree_model_iter_n_children(GTK_TREE_MODEL(self->obj), NULL); -} -static PyObject * -_wrap_gtk_tree_model_tp_getitem(PyGObject *self, PyObject *item) -{ - GtkTreePath *path; - GtkTreeIter iter; - PyObject *ret = NULL; - - if (pyg_boxed_check(item, GTK_TYPE_TREE_ITER)) { - return _pygtk_tree_model_row_new(GTK_TREE_MODEL(self->obj), - pyg_boxed_get(item, GtkTreeIter)); - } - - if (PyInt_Check(item)) { - int value = PyInt_AsLong(item); - - if (value < 0) { - /* Since value is always negative at this point, - * we need to do an invertion. - */ - value = _wrap_gtk_tree_model_tp_length(self) - -value; - - Py_DECREF(item); - item = PyInt_FromLong(value); - } - } - - path = pygtk_tree_path_from_pyobject(item); - if (!path) { - PyErr_SetString(PyExc_TypeError, - "could not parse subscript as a tree path"); - return NULL; - } - if (gtk_tree_model_get_iter(GTK_TREE_MODEL(self->obj), &iter, path)) { - ret = _pygtk_tree_model_row_new(GTK_TREE_MODEL(self->obj), &iter); - } else { - PyErr_SetString(PyExc_IndexError, "could not find tree path"); - ret = NULL; - } - gtk_tree_path_free(path); - return ret; -} -static int -_wrap_gtk_tree_model_tp_setitem(PyGObject *self, PyObject *item, - PyObject *value) -{ - GtkTreeIter *iter, iter2; - - if (pyg_boxed_check(item, GTK_TYPE_TREE_ITER)) { - iter = pyg_boxed_get(item, GtkTreeIter); - } else { - GtkTreePath *path; - - if (PyInt_Check(item)) { - int value = PyInt_AsLong(item); - - if (value < 0) { - /* Since value is always negative at this point, - * we need to do an invertion. - */ - value = _wrap_gtk_tree_model_tp_length(self) - -value; - - Py_DECREF(item); - item = PyInt_FromLong(value); - } - } - - path = pygtk_tree_path_from_pyobject(item); - - if (!path) { - PyErr_SetString(PyExc_TypeError, - "could not parse subscript as a tree path"); - return -1; - } - if (!gtk_tree_model_get_iter(GTK_TREE_MODEL(self->obj), &iter2,path)) { - PyErr_SetString(PyExc_TypeError, "could not find tree path"); - gtk_tree_path_free(path); - return -1; - } - iter = &iter2; - gtk_tree_path_free(path); - } - - if (value == NULL) { - return _pygtk_tree_model_remove_row(GTK_TREE_MODEL(self->obj), iter); - } else { - return _pygtk_tree_model_set_row(GTK_TREE_MODEL(self->obj), - iter, value); - } -} - -static PyMappingMethods _wrap_gtk_tree_model_tp_as_mapping = { - (lenfunc)_wrap_gtk_tree_model_tp_length, - (binaryfunc)_wrap_gtk_tree_model_tp_getitem, - (objobjargproc)_wrap_gtk_tree_model_tp_setitem -}; -%% -override-slot GtkTreeModel.tp_iter -static PyObject * -_wrap_gtk_tree_model_tp_iter(PyGObject *self) -{ - return _pygtk_tree_model_row_iter_new(GTK_TREE_MODEL(self->obj), NULL); -} -%% -override gtk_tree_sortable_get_sort_column_id noargs -static PyObject * -_wrap_gtk_tree_sortable_get_sort_column_id(PyGObject *self) -{ - gboolean ret; - gint sort_column_id; - GtkSortType order; - - ret = gtk_tree_sortable_get_sort_column_id(GTK_TREE_SORTABLE(self->obj), - &sort_column_id, &order); - - /* if we don't have a sort column set, return (None, None) */ - if (ret) - return Py_BuildValue("(iN)", sort_column_id, - pyg_enum_from_gtype(GTK_TYPE_SORT_TYPE, order)); - else - return Py_BuildValue("(OO)", Py_None, Py_None); -} -%% -override gtk_tree_sortable_set_sort_func -static gint -pygtk_tree_sortable_sort_cb(GtkTreeModel *model, GtkTreeIter *iter1, - GtkTreeIter *iter2, gpointer user_data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = user_data; - PyObject *py_model, *py_iter2, *py_iter1, *retobj; - gint ret = 0; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - py_model = pygobject_new((GObject *)model); - py_iter1 = pyg_boxed_new(GTK_TYPE_TREE_ITER, iter1, FALSE, FALSE); - py_iter2 = pyg_boxed_new(GTK_TYPE_TREE_ITER, iter2, FALSE, FALSE); - - if (cunote->data) { - retobj = PyEval_CallFunction(cunote->func, "(OOOO)", py_model, - py_iter1, py_iter2, cunote->data); - } else { - retobj = PyEval_CallFunction(cunote->func, "(OOO)", py_model, - py_iter1, py_iter2); - } - pygtk_boxed_unref_shared(py_iter1); - pygtk_boxed_unref_shared(py_iter2); - if (retobj) - ret = PyInt_AsLong(retobj); - if (PyErr_Occurred()) { - PyErr_Print(); - ret = 0; - } - Py_XDECREF(retobj); - - pyg_gil_state_release(state); - return ret; -} -static PyObject * -_wrap_gtk_tree_sortable_set_sort_func(PyGObject *self, PyObject *args) -{ - gint column; - PyObject *callback, *data = NULL; - PyGtkCustomNotify *cunote; - - if (!PyArg_ParseTuple(args, "iO|O:GtkTreeSortable.set_sort_func", - &column, &callback, &data)) - return NULL; - - if (!PyCallable_Check(callback)) { - PyErr_SetString(PyExc_TypeError, "callback must be a callable object"); - return NULL; - } - cunote = g_new(PyGtkCustomNotify, 1); - Py_INCREF(callback); - cunote->func = callback; - Py_XINCREF(data); - cunote->data = data; - - gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(self->obj), column, - pygtk_tree_sortable_sort_cb, cunote, - pygtk_custom_destroy_notify); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_sortable_set_default_sort_func -static PyObject * -_wrap_gtk_tree_sortable_set_default_sort_func(PyGObject *self, PyObject *args) -{ - PyObject *callback, *data = NULL; - PyGtkCustomNotify *cunote; - - if (!PyArg_ParseTuple(args, "O|O:GtkTreeSortable.set_default_sort_func", - &callback, &data)) - return NULL; - - if (callback == Py_None) { - gtk_tree_sortable_set_default_sort_func(GTK_TREE_SORTABLE(self->obj), - NULL, - NULL, - NULL); - goto beach; - } - - if (!PyCallable_Check(callback)) { - PyErr_SetString(PyExc_TypeError, "callback must be a callable object"); - return NULL; - } - cunote = g_new(PyGtkCustomNotify, 1); - Py_INCREF(callback); - cunote->func = callback; - Py_XINCREF(data); - cunote->data = data; - - gtk_tree_sortable_set_default_sort_func(GTK_TREE_SORTABLE(self->obj), - pygtk_tree_sortable_sort_cb, - cunote, - pygtk_custom_destroy_notify); - beach: - Py_INCREF(Py_None); - return Py_None; -} -%% -ignore gtk_list_store_newv -%% -override gtk_list_store_new -static int -_wrap_gtk_list_store_new(PyGObject *self, PyObject *args) -{ - guint len, i; - GType *column_types; - - len = PyTuple_Size(args); - if (len == 0) { - PyErr_SetString(PyExc_TypeError, - "GtkListStore requires at least one argument"); - return -1; - } - - column_types = g_new(GType, len); - for (i = 0; i < len; i++) { - PyObject *item = PyTuple_GetItem(args, i); - - column_types[i] = pyg_type_from_object(item); - if (column_types[i] == 0) { - g_free(column_types); - return -1; - } - } - self->obj = g_object_newv(pyg_type_from_object((PyObject *) self), 0, NULL); - gtk_list_store_set_column_types(GTK_LIST_STORE(self->obj), len, column_types); - g_free(column_types); - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkListStore object"); - return -1; - } - pygobject_register_wrapper((PyObject *)self); - return 0; -} -%% -override gtk_list_store_set_column_types args -static PyObject* -_wrap_gtk_list_store_set_column_types(PyGObject *self, PyObject *args) -{ - guint len, i; - GType *column_types; - - len = PyTuple_Size(args); - if (len == 0) { - PyErr_SetString(PyExc_TypeError, - "GtkListStore set_column_types requires at least one argument"); - return NULL; - } - - column_types = g_new(GType, len); - for (i = 0; i < len; i++) { - PyObject *item = PyTuple_GetItem(args, i); - - column_types[i] = pyg_type_from_object(item); - if (column_types[i] == 0) { - g_free(column_types); - return NULL; - } - } - - gtk_list_store_set_column_types(GTK_LIST_STORE(self->obj), len, column_types); - g_free(column_types); - - Py_INCREF(Py_None); - return Py_None; -} -%% -ignore gtk_list_store_set_valist -%% -override gtk_list_store_set -static PyObject * -_wrap_gtk_list_store_set(PyGObject *self, PyObject *args) -{ - PyObject *iter; - int len, i; - - len = PyTuple_Size(args); - if (len == 0) { - PyErr_SetString(PyExc_TypeError, "GtkListStore.set requires at least three arguments"); - return NULL; - } - - iter = PyTuple_GetItem(args, 0); - if (!pyg_boxed_check(iter, GTK_TYPE_TREE_ITER)) { - PyErr_SetString(PyExc_TypeError, "iter must be a GtkTreeIter"); - return NULL; - } - - if ((len - 1) % 2) { - PyErr_SetString(PyExc_TypeError, - "Argument list must be column, value pairs. No -1 " - "termination is needed."); - return NULL; - } - for (i = 1; i < len; i+=2) { - gint column; - GValue value = { 0 }; - PyObject *py_column = PyTuple_GetItem(args, i); - PyObject *py_value = PyTuple_GetItem(args, i + 1); - - if (!PyInt_Check(py_column)) { - PyErr_SetString(PyExc_TypeError, - "Expected numeric argument for column."); - return NULL; - } - column = PyInt_AsLong(py_column); - if (column < 0 || - column >= gtk_tree_model_get_n_columns(GTK_TREE_MODEL(self->obj))) { - PyErr_SetString(PyExc_ValueError, "column number is out of range"); - return NULL; - } - g_value_init(&value, - gtk_tree_model_get_column_type(GTK_TREE_MODEL(self->obj), - column)); - if (pyg_value_from_pyobject(&value, py_value)) { - PyErr_SetString(PyExc_TypeError, - "value is of the wrong type for this column"); - return NULL; - } - gtk_list_store_set_value(GTK_LIST_STORE(self->obj), - pyg_boxed_get(iter, GtkTreeIter), column, &value); - g_value_unset(&value); - } - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_list_store_set_value kwargs -static PyObject * -_wrap_gtk_list_store_set_value(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "iter", "column", "value", NULL }; - PyObject *iter, *pyvalue; - gint column; - GValue value = { 0 }; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OiO:GtkListStore.set_value", - kwlist, &iter, &column, &pyvalue)) - return NULL; - if (column < 0 || - column >= gtk_tree_model_get_n_columns(GTK_TREE_MODEL(self->obj))) { - PyErr_SetString(PyExc_ValueError, "column number is out of range"); - return NULL; - } - if (!pyg_boxed_check(iter, GTK_TYPE_TREE_ITER)) { - PyErr_SetString(PyExc_TypeError, "iter must be a GtkTreeIter"); - return NULL; - } - g_value_init(&value, - gtk_tree_model_get_column_type(GTK_TREE_MODEL(self->obj), - column)); - if (pyg_value_from_pyobject(&value, pyvalue)) { - PyErr_SetString(PyExc_TypeError, - "value is of the wrong type for this column"); - return NULL; - } - gtk_list_store_set_value(GTK_LIST_STORE(self->obj), - pyg_boxed_get(iter, GtkTreeIter), column, &value); - g_value_unset(&value); - Py_INCREF(Py_None); - return Py_None; -} -%% -ignore - gtk_list_store_setv -%% -override gtk_list_store_insert kwargs -static PyObject * -_wrap_gtk_list_store_insert(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "position", "row", NULL }; - GtkTreeIter iter; - gint position; - PyObject *items = NULL; - gint n_columns = 0; - gint *columns = NULL; - GValue *values = NULL; - gint i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i|O:GtkListStore.insert", - kwlist, &position, &items)) { - return NULL; - } - - if (items) { - if (!PySequence_Check(items)) { - PyErr_SetString(PyExc_TypeError, "expecting a sequence"); - return NULL; - } - - n_columns = gtk_tree_model_get_n_columns(GTK_TREE_MODEL(self->obj)); - if (PySequence_Length(items) != n_columns) { - PyErr_SetString(PyExc_ValueError, "row sequence has wrong length"); - return NULL; - } - } - - columns = g_new0(gint, n_columns); - values = g_new0(GValue, n_columns); - for (i = 0; i < n_columns; i++) { - PyObject *item; - - item = PySequence_GetItem(items, i); - if (!item) - return NULL; - - g_value_init(&values[i], gtk_tree_model_get_column_type(GTK_TREE_MODEL(self->obj), i)); - - if (pyg_value_from_pyobject(&values[i], item)) { - Py_DECREF(item); - PyErr_SetString(PyExc_TypeError, - "value is of wrong type for this column"); - return NULL; - } - - columns[i] = i; - - Py_DECREF(item); - } - - gtk_list_store_insert_with_valuesv(GTK_LIST_STORE(self->obj), &iter, position, - columns, - values, - n_columns); - - for (i = 0; i < n_columns; i++) { - g_value_unset(&values[i]); - } - if (values) - g_free(values); - if (columns) - g_free(columns); - - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE); -} -%% -override gtk_list_store_insert_before kwargs -static PyObject * -_wrap_gtk_list_store_insert_before(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "sibling", "row", NULL }; - PyObject *py_sibling; - GtkTreeIter iter, *sibling = NULL; - PyObject *row = Py_None; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:GtkListStore.insert_before", - kwlist, &py_sibling, &row)) { - return NULL; - } - - if (pyg_boxed_check(py_sibling, GTK_TYPE_TREE_ITER)) - sibling = pyg_boxed_get(py_sibling, GtkTreeIter); - else if (py_sibling != Py_None) { - PyErr_SetString(PyExc_TypeError, - "sibling must be a GtkTreeIter or None"); - return NULL; - } - gtk_list_store_insert_before(GTK_LIST_STORE(self->obj), &iter, sibling); - - /* optionally set items in the new row */ - if (row != Py_None && - _pygtk_tree_model_set_row(GTK_TREE_MODEL(self->obj), &iter, row) < 0) - return NULL; - - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE); -} -%% -override gtk_list_store_insert_after kwargs -static PyObject * -_wrap_gtk_list_store_insert_after(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "sibling", "row", NULL }; - PyObject *py_sibling; - GtkTreeIter iter, *sibling = NULL; - PyObject *row = Py_None; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:GtkListStore.insert_after", - kwlist, &py_sibling, &row)) - return NULL; - if (pyg_boxed_check(py_sibling, GTK_TYPE_TREE_ITER)) - sibling = pyg_boxed_get(py_sibling, GtkTreeIter); - else if (py_sibling != Py_None) { - PyErr_SetString(PyExc_TypeError, - "sibling must be a GtkTreeIter or None"); - return NULL; - } - gtk_list_store_insert_after(GTK_LIST_STORE(self->obj), &iter, sibling); - - /* optionally set items in the new row */ - if (row != Py_None && - _pygtk_tree_model_set_row(GTK_TREE_MODEL(self->obj), &iter, row) < 0) - return NULL; - - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE); -} -%% -override gtk_list_store_prepend kwargs -static PyObject * -_wrap_gtk_list_store_prepend(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "row", NULL }; - GtkTreeIter iter; - PyObject *row = Py_None; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:GtkListStore.prepend", - kwlist, &row)) - return NULL; - - gtk_list_store_prepend(GTK_LIST_STORE(self->obj), &iter); - - /* optionally set items in the new row */ - if (row != Py_None && - _pygtk_tree_model_set_row(GTK_TREE_MODEL(self->obj), &iter, row) < 0) - return NULL; - - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE); -} -%% -override gtk_list_store_append kwargs -static PyObject * -_wrap_gtk_list_store_append(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "row", NULL }; - GtkTreeIter iter; - PyObject *row = Py_None; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:GtkListStore.append", - kwlist, &row)) - return NULL; - - gtk_list_store_append(GTK_LIST_STORE(self->obj), &iter); - - /* optionally set items in the new row */ - if (row != Py_None && - _pygtk_tree_model_set_row(GTK_TREE_MODEL(self->obj), &iter, row) < 0) - return NULL; - - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE); -} -%% -override gtk_list_store_reorder args -static PyObject * -_wrap_gtk_list_store_reorder(PyGObject *self, PyObject *args) -{ - PyObject *list; - gint *new_order; - GtkListStore *store; - int i; - int length; - - if (!PyArg_ParseTuple(args, "O:GtkListStore.reorder", &list)) - return NULL; - - if (!PyList_Check(list)) { - PyErr_SetString(PyExc_TypeError, "first argument should be a list"); - return NULL; - } - store = GTK_LIST_STORE(self->obj); - length = gtk_tree_model_iter_n_children (GTK_TREE_MODEL(store), NULL); - - if (PyList_Size(list) < length) { - PyErr_SetString(PyExc_TypeError, "list must at least have the same size as the number of items in the store"); - return NULL; - } - - new_order = g_new0(gint, length); - for (i = 0; i < length; i++) { - PyObject *item = PyList_GetItem(list, i); - int index; - if (!PyInt_Check(item)) { - PyErr_SetString(PyExc_TypeError, "all items must be of type int"); - g_free(new_order); - return NULL; - } - index = PyInt_AsLong(item); - if (index < 0 || index >= length) { - PyErr_SetString(PyExc_ValueError, "position index out of range"); - g_free(new_order); - return NULL; - } - new_order[i] = index; - } - gtk_list_store_reorder(GTK_LIST_STORE(self->obj), new_order); - - g_free(new_order); - - Py_INCREF(Py_None); - return Py_None; -} -%% -ignore gtk_tree_store_newv -%% -override gtk_tree_store_new -static int -_wrap_gtk_tree_store_new(PyGObject *self, PyObject *args) -{ - guint len, i; - GType *column_types; - - len = PyTuple_Size(args); - if (len == 0) { - PyErr_SetString(PyExc_TypeError, "GtkTreeStore requires at least one argument"); - return -1; - } - - column_types = g_new(GType, len); - for (i = 0; i < len; i++) { - PyObject *item = PyTuple_GetItem(args, i); - - column_types[i] = pyg_type_from_object(item); - if (column_types[i] == 0) { - g_free(column_types); - return -1; - } - } - - self->obj = g_object_newv(pyg_type_from_object((PyObject *) self), 0, NULL); - gtk_tree_store_set_column_types(GTK_TREE_STORE(self->obj), len, column_types); - - g_free(column_types); - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, - "could not create GtkTreeStore object"); - return -1; - } - pygobject_register_wrapper((PyObject *)self); - return 0; -} -%% -ignore gtk_tree_store_set_valist -%% -override gtk_tree_store_set -static PyObject * -_wrap_gtk_tree_store_set(PyGObject *self, PyObject *args) -{ - PyObject *iter; - int len, i; - - len = PyTuple_Size(args); - if (len == 0) { - PyErr_SetString(PyExc_TypeError, "GtkTreeStore.set requires at least three arguments"); - return NULL; - } - - iter = PyTuple_GetItem(args, 0); - if (!pyg_boxed_check(iter, GTK_TYPE_TREE_ITER)) { - PyErr_SetString(PyExc_TypeError, "iter must be a GtkTreeIter"); - return NULL; - } - - if ((len - 1) % 2) { - PyErr_SetString(PyExc_TypeError, - "Argument list must be column, value pairs. No -1 " - "termination is needed."); - return NULL; - } - for (i = 1; i < len; i+=2) { - gint column; - GValue value = { 0 }; - PyObject *py_column = PyTuple_GetItem(args, i); - PyObject *py_value = PyTuple_GetItem(args, i + 1); - - if (!PyInt_Check(py_column)) { - PyErr_SetString(PyExc_TypeError, - "Expected numeric argument for column."); - return NULL; - } - column = PyInt_AsLong(py_column); - if (column < 0 || - column >= gtk_tree_model_get_n_columns(GTK_TREE_MODEL(self->obj))) { - PyErr_SetString(PyExc_ValueError, "column number is out of range"); - return NULL; - } - g_value_init(&value, - gtk_tree_model_get_column_type(GTK_TREE_MODEL(self->obj), - column)); - if (pyg_value_from_pyobject(&value, py_value)) { - PyErr_SetString(PyExc_TypeError, - "value is of the wrong type for this column"); - return NULL; - } - gtk_tree_store_set_value(GTK_TREE_STORE(self->obj), - pyg_boxed_get(iter, GtkTreeIter), column, - &value); - g_value_unset(&value); - } - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_store_set_value kwargs -static PyObject * -_wrap_gtk_tree_store_set_value(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "iter", "column", "value", NULL }; - PyObject *iter, *pyvalue; - gint column; - GValue value = { 0 }; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OiO:GtkTreeStore.set_value", - kwlist, &iter, &column, &pyvalue)) - return NULL; - if (column < 0 || - column >= gtk_tree_model_get_n_columns(GTK_TREE_MODEL(self->obj))) { - PyErr_SetString(PyExc_ValueError, "column number is out of range"); - return NULL; - } - if (!pyg_boxed_check(iter, GTK_TYPE_TREE_ITER)) { - PyErr_SetString(PyExc_TypeError, "iter must be a GtkTreeIter"); - return NULL; - } - g_value_init(&value, - gtk_tree_model_get_column_type(GTK_TREE_MODEL(self->obj), - column)); - if (pyg_value_from_pyobject(&value, pyvalue)) { - PyErr_SetString(PyExc_TypeError, - "value is of the wrong type for this column"); - return NULL; - } - gtk_tree_store_set_value(GTK_TREE_STORE(self->obj), - pyg_boxed_get(iter, GtkTreeIter), column, &value); - g_value_unset(&value); - Py_INCREF(Py_None); - return Py_None; -} -%% -ignore - gtk_tree_store_setv -%% -override gtk_tree_store_insert kwargs -#if GTK_CHECK_VERSION(2, 10, 0) -static PyObject * -_wrap_gtk_tree_store_insert(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "parent", "position", "row", NULL }; - PyObject *py_parent; - GtkTreeIter iter, *parent = NULL; - gint position; - PyObject *items = NULL; - gint n_columns = 0; - gint *columns = NULL; - GValue *values = NULL; - gint i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Oi|O:GtkTreeStore.insert", - kwlist, &py_parent, &position, &items)) - return NULL; - if (pyg_boxed_check(py_parent, GTK_TYPE_TREE_ITER)) - parent = pyg_boxed_get(py_parent, GtkTreeIter); - else if (py_parent != Py_None) { - PyErr_SetString(PyExc_TypeError, - "parent must be a GtkTreeIter or None"); - return NULL; - } - if (items) { - if (!PySequence_Check(items)) { - PyErr_SetString(PyExc_TypeError, "expecting a sequence"); - return NULL; - } - - n_columns = gtk_tree_model_get_n_columns(GTK_TREE_MODEL(self->obj)); - if (PySequence_Length(items) != n_columns) { - PyErr_SetString(PyExc_ValueError, "row sequence has wrong length"); - return NULL; - } - } - - columns = g_new0(gint, n_columns); - values = g_new0(GValue, n_columns); - for (i = 0; i < n_columns; i++) { - PyObject *item; - - item = PySequence_GetItem(items, i); - if (!item) - return NULL; - - g_value_init(&values[i], - gtk_tree_model_get_column_type(GTK_TREE_MODEL(self->obj), - i)); - - if (pyg_value_from_pyobject(&values[i], item)) { - Py_DECREF(item); - PyErr_SetString(PyExc_TypeError, - "value is of wrong type for this column"); - return NULL; - } - - columns[i] = i; - - Py_DECREF(item); - } - - gtk_tree_store_insert_with_valuesv(GTK_TREE_STORE(self->obj), &iter, - parent, position, columns, values, - n_columns); - - for (i = 0; i < n_columns; i++) { - g_value_unset(&values[i]); - } - if (values) - g_free(values); - if (columns) - g_free(columns); - - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE); -} -#else -static PyObject * -_wrap_gtk_tree_store_insert(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "parent", "position", "row", NULL }; - PyObject *py_parent; - GtkTreeIter iter, *parent = NULL; - gint position; - PyObject *row = Py_None; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Oi|O:GtkTreeStore.insert", - kwlist, &py_parent, &position, &row)) - return NULL; - if (pyg_boxed_check(py_parent, GTK_TYPE_TREE_ITER)) - parent = pyg_boxed_get(py_parent, GtkTreeIter); - else if (py_parent != Py_None) { - PyErr_SetString(PyExc_TypeError, - "parent must be a GtkTreeIter or None"); - return NULL; - } - gtk_tree_store_insert(GTK_TREE_STORE(self->obj), &iter, parent, position); - - /* optionally set items in the new row */ - if (row != Py_None && - _pygtk_tree_model_set_row(GTK_TREE_MODEL(self->obj), &iter, row) < 0) - return NULL; - - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE); -} -#endif -%% -override gtk_tree_store_insert_before kwargs -static PyObject * -_wrap_gtk_tree_store_insert_before(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "parent", "sibling", "row", NULL }; - PyObject *py_parent, *py_sibling; - GtkTreeIter iter, *parent = NULL, *sibling = NULL; - PyObject *row = Py_None; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OO|O:GtkTreeStore.insert_before", - kwlist, &py_parent, &py_sibling, &row)) - return NULL; - if (pyg_boxed_check(py_parent, GTK_TYPE_TREE_ITER)) - parent = pyg_boxed_get(py_parent, GtkTreeIter); - else if (py_parent != Py_None) { - PyErr_SetString(PyExc_TypeError, - "parent must be a GtkTreeIter or None"); - return NULL; - } - if (pyg_boxed_check(py_sibling, GTK_TYPE_TREE_ITER)) - sibling = pyg_boxed_get(py_sibling, GtkTreeIter); - else if (py_sibling != Py_None) { - PyErr_SetString(PyExc_TypeError, - "sibling must be a GtkTreeIter or None"); - return NULL; - } - gtk_tree_store_insert_before(GTK_TREE_STORE(self->obj), &iter, parent, - sibling); - - /* optionally set items in the new row */ - if (row != Py_None && - _pygtk_tree_model_set_row(GTK_TREE_MODEL(self->obj), &iter, row) < 0) - return NULL; - - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE); -} -%% -override gtk_tree_store_insert_after kwargs -static PyObject * -_wrap_gtk_tree_store_insert_after(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "parent", "sibling", "row", NULL }; - PyObject *py_parent, *py_sibling; - GtkTreeIter iter, *parent = NULL, *sibling = NULL; - PyObject *row = Py_None; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OO|O:GtkTreeStore.insert_after", - kwlist, &py_parent, &py_sibling, &row)) - return NULL; - if (pyg_boxed_check(py_parent, GTK_TYPE_TREE_ITER)) - parent = pyg_boxed_get(py_parent, GtkTreeIter); - else if (py_parent != Py_None) { - PyErr_SetString(PyExc_TypeError, - "parent must be a GtkTreeIter or None"); - return NULL; - } - if (pyg_boxed_check(py_sibling, GTK_TYPE_TREE_ITER)) - sibling = pyg_boxed_get(py_sibling, GtkTreeIter); - else if (py_sibling != Py_None) { - PyErr_SetString(PyExc_TypeError, - "sibling must be a GtkTreeIter or None"); - return NULL; - } - gtk_tree_store_insert_after(GTK_TREE_STORE(self->obj), &iter, parent, - sibling); - - /* optionally set items in the new row */ - if (row != Py_None && - _pygtk_tree_model_set_row(GTK_TREE_MODEL(self->obj), &iter, row) < 0) - return NULL; - - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE); -} -%% -override gtk_tree_store_prepend kwargs -static PyObject * -_wrap_gtk_tree_store_prepend(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "parent", "row", NULL }; - PyObject *py_parent; - GtkTreeIter iter, *parent = NULL; - PyObject *row = Py_None; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:GtkTreeStore.prepend", - kwlist, &py_parent, &row)) - return NULL; - if (pyg_boxed_check(py_parent, GTK_TYPE_TREE_ITER)) - parent = pyg_boxed_get(py_parent, GtkTreeIter); - else if (py_parent != Py_None) { - PyErr_SetString(PyExc_TypeError, - "parent must be a GtkTreeIter or None"); - return NULL; - } - gtk_tree_store_prepend(GTK_TREE_STORE(self->obj), &iter, parent); - - /* optionally set items in the new row */ - if (row != Py_None && - _pygtk_tree_model_set_row(GTK_TREE_MODEL(self->obj), &iter, row) < 0) - return NULL; - - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE); -} -%% -override gtk_tree_store_append kwargs -static PyObject * -_wrap_gtk_tree_store_append(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "parent", "row", NULL }; - PyObject *py_parent; - GtkTreeIter iter, *parent = NULL; - PyObject *row = Py_None; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:GtkTreeStore.append", - kwlist, &py_parent, &row)) - return NULL; - if (pyg_boxed_check(py_parent, GTK_TYPE_TREE_ITER)) - parent = pyg_boxed_get(py_parent, GtkTreeIter); - else if (py_parent != Py_None) { - PyErr_SetString(PyExc_TypeError, - "parent must be a GtkTreeIter or None"); - return NULL; - } - gtk_tree_store_append(GTK_TREE_STORE(self->obj), &iter, parent); - - /* optionally set items in the new row */ - if (row != Py_None && - _pygtk_tree_model_set_row(GTK_TREE_MODEL(self->obj), &iter, row) < 0) - return NULL; - - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE); -} -%% -override gtk_tree_model_get_iter_first noargs -static PyObject * -_wrap_gtk_tree_model_get_iter_first(PyGObject *self) -{ - GtkTreeIter iter; - - if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(self->obj), &iter)) - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE); - else { - Py_INCREF(Py_None); - return Py_None; - } -} -%% -override gtk_tree_model_iter_next kwargs -static PyObject * -_wrap_gtk_tree_model_iter_next(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "iter", NULL }; - PyObject *py_iter; - GtkTreeIter iter; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkTreeModel.iter_next", kwlist, - &py_iter)) - return NULL; - if (pyg_boxed_check(py_iter, GTK_TYPE_TREE_ITER)) - iter = *pyg_boxed_get(py_iter, GtkTreeIter); - else { - PyErr_SetString(PyExc_TypeError, "iter should be a GtkTreeIter"); - return NULL; - } - - if (gtk_tree_model_iter_next(GTK_TREE_MODEL(self->obj), &iter)) - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE); - else { - Py_INCREF(Py_None); - return Py_None; - } -} -%% -override gtk_tree_model_iter_children kwargs -static PyObject * -_wrap_gtk_tree_model_iter_children(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "parent", NULL }; - PyObject *py_parent; - GtkTreeIter iter, *parent = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkTreeModel.iter_children", kwlist, - &py_parent)) - return NULL; - if (pyg_boxed_check(py_parent, GTK_TYPE_TREE_ITER)) - parent = pyg_boxed_get(py_parent, GtkTreeIter); - else if (py_parent == Py_None) - parent = NULL; - else { - PyErr_SetString(PyExc_TypeError, "parent should be a GtkTreeIter or None"); - return NULL; - } - - if (gtk_tree_model_iter_children(GTK_TREE_MODEL(self->obj), - &iter, parent)) - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE); - else { - Py_INCREF(Py_None); - return Py_None; - } -} -%% -override gtk_tree_model_iter_nth_child kwargs -static PyObject * -_wrap_gtk_tree_model_iter_nth_child(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "parent", "n", NULL }; - PyObject *py_parent; - gint n; - GtkTreeIter iter, *parent = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "Oi:GtkTreeModel.iter_nth_child", kwlist, - &py_parent, &n)) - return NULL; - if (pyg_boxed_check(py_parent, GTK_TYPE_TREE_ITER)) - parent = pyg_boxed_get(py_parent, GtkTreeIter); - else if (py_parent == Py_None) - parent = NULL; - else { - PyErr_SetString(PyExc_TypeError, "parent should be a GtkTreeIter or None"); - return NULL; - } - - if (gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(self->obj), - &iter, parent, n)) - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE); - else { - Py_INCREF(Py_None); - return Py_None; - } -} -%% -override gtk_tree_model_iter_parent kwargs -static PyObject * -_wrap_gtk_tree_model_iter_parent(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "child", NULL }; - PyObject *py_child; - GtkTreeIter iter, *child = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GtkTreeModel.iter_parent", kwlist, - &py_child)) - return NULL; - if (pyg_boxed_check(py_child, GTK_TYPE_TREE_ITER)) - child = pyg_boxed_get(py_child, GtkTreeIter); - else { - PyErr_SetString(PyExc_TypeError, "child should be a GtkTreeIter"); - return NULL; - } - - if (gtk_tree_model_iter_parent(GTK_TREE_MODEL(self->obj), - &iter, child)) - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE); - else { - Py_INCREF(Py_None); - return Py_None; - } -} -%% -override gtk_tree_model_foreach -static gboolean -pygtk_tree_foreach_marshal(GtkTreeModel *model, - GtkTreePath *path, - GtkTreeIter *iter, - gpointer data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = data; - PyObject *py_model, *py_path, *py_iter, *retobj; - gboolean ret; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - py_model = pygobject_new((GObject *)model); - py_path = pygtk_tree_path_to_pyobject(path); - py_iter = pyg_boxed_new(GTK_TYPE_TREE_ITER, iter, FALSE, FALSE); - if (cunote->data) - retobj = PyEval_CallFunction(cunote->func, "(NNOO)", - py_model, py_path, py_iter, - cunote->data); - else - retobj = PyEval_CallFunction(cunote->func, "(NNO)", - py_model, py_path, py_iter); - - if (retobj != NULL) { - ret = PyObject_IsTrue(retobj); - Py_DECREF(retobj); - } else { - ret = TRUE; - } - pygtk_boxed_unref_shared(py_iter); - pyg_gil_state_release(state); - return ret; -} -static PyObject * -_wrap_gtk_tree_model_foreach(PyGObject *self, PyObject *args) -{ - gboolean pygtk_tree_foreach_marshal(GtkTreeModel *model, - GtkTreePath *path, - GtkTreeIter *iter, - gpointer data); - PyObject *pyfunc, *pyarg = NULL; - PyGtkCustomNotify cunote; - - if(!PyArg_ParseTuple(args, "O|O:GtkTreeModel.foreach", - &pyfunc, &pyarg)) - return NULL; - - cunote.func = pyfunc; - cunote.data = pyarg; - gtk_tree_model_foreach(GTK_TREE_MODEL(self->obj), - pygtk_tree_foreach_marshal, &cunote); - - if (PyErr_Occurred()) - return NULL; - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_cell_renderer_get_size kwargs -static PyObject * -_wrap_gtk_cell_renderer_get_size(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "widget", "cell_area", NULL }; - gint x_offset = 0, y_offset = 0, width = 0, height = 0; - GdkRectangle cell_area; - PyObject *py_widget, *py_cell_area = Py_None; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:GtkCellRenderer.get_size", kwlist, - &py_widget, &py_cell_area)) - return NULL; - - if (!pygobject_check(py_widget, &PyGtkWidget_Type)) { - PyErr_SetString(PyExc_TypeError, "widget must be a GtkWidget"); - return NULL; - } - if (py_cell_area != Py_None) { - if (!pygdk_rectangle_from_pyobject(py_cell_area, &cell_area)) - return NULL; - } - - gtk_cell_renderer_get_size(GTK_CELL_RENDERER(self->obj), - GTK_WIDGET(pygobject_get(py_widget)), - (py_cell_area == Py_None) ? NULL : &cell_area, - &x_offset, &y_offset, &width, &height); - - return Py_BuildValue("(iiii)", x_offset, y_offset, width, height); -} -%% -override gtk_cell_renderer_get_fixed_size noargs -static PyObject * -_wrap_gtk_cell_renderer_get_fixed_size(PyGObject *self) -{ - gint width, height; - - gtk_cell_renderer_get_fixed_size(GTK_CELL_RENDERER(self->obj), - &width, &height); - - return Py_BuildValue("(ii)", width, height); -} -%% -override gtk_tree_model_sort_convert_child_iter_to_iter kwargs -static PyObject * -_wrap_gtk_tree_model_sort_convert_child_iter_to_iter(PyGObject *self, - PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "sort_iter", "child_iter", NULL }; - PyObject *py_sort_iter = Py_None, *py_child_iter; - GtkTreeIter iter, *sort_iter, *child_iter = NULL; - - sort_iter = &iter; - if (!PyArg_ParseTupleAndKeywords( - args, kwargs, "OO:GtkTreeModelSort.convert_child_iter_to_iter", - kwlist, &py_sort_iter, &py_child_iter)) - return NULL; - if (pyg_boxed_check(py_sort_iter, GTK_TYPE_TREE_ITER)) - sort_iter = pyg_boxed_get(py_sort_iter, GtkTreeIter); - else if (py_sort_iter != Py_None) { - PyErr_SetString(PyExc_TypeError, - "sort_iter should be a GtkTreeIter or None"); - return NULL; - } - if (pyg_boxed_check(py_child_iter, GTK_TYPE_TREE_ITER)) - child_iter = pyg_boxed_get(py_child_iter, GtkTreeIter); - else { - PyErr_SetString(PyExc_TypeError, "child_iter should be a GtkTreeIter"); - return NULL; - } - gtk_tree_model_sort_convert_child_iter_to_iter( - GTK_TREE_MODEL_SORT(self->obj), sort_iter, child_iter); - return pyg_boxed_new(GTK_TYPE_TREE_ITER, sort_iter, TRUE, TRUE); -} -%% -override gtk_tree_model_sort_convert_iter_to_child_iter kwargs -static PyObject * -_wrap_gtk_tree_model_sort_convert_iter_to_child_iter(PyGObject *self, - PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "child_iter", "sorted_iter", NULL }; - PyObject *py_child_iter = Py_None, *py_sorted_iter; - GtkTreeIter iter, *child_iter, *sorted_iter = NULL; - - child_iter = &iter; - if (!PyArg_ParseTupleAndKeywords( - args, kwargs, "OO:GtkTreeModelSort.convert_iter_to_child_iter", - kwlist, &py_child_iter, &py_sorted_iter)) - return NULL; - if (pyg_boxed_check(py_child_iter, GTK_TYPE_TREE_ITER)) - child_iter = pyg_boxed_get(py_child_iter, GtkTreeIter); - else if (py_child_iter != Py_None) { - PyErr_SetString(PyExc_TypeError, - "child_iter should be a GtkTreeIter or None"); - return NULL; - } - if (pyg_boxed_check(py_sorted_iter, GTK_TYPE_TREE_ITER)) - sorted_iter = pyg_boxed_get(py_sorted_iter, GtkTreeIter); - else { - PyErr_SetString(PyExc_TypeError, - "sorted_iter should be a GtkTreeIter"); - return NULL; - } - gtk_tree_model_sort_convert_iter_to_child_iter( - GTK_TREE_MODEL_SORT(self->obj), child_iter, sorted_iter); - return pyg_boxed_new(GTK_TYPE_TREE_ITER, child_iter, TRUE, TRUE); -} -%% -override gtk_tree_view_enable_model_drag_source kwargs -static PyObject * -_wrap_gtk_tree_view_enable_model_drag_source(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "start_button_mask", "targets", "actions", NULL }; - PyObject *py_sbmask, *py_targets, *py_actions; - GdkModifierType sbmask; - GtkTargetEntry *targets; - GdkDragAction actions; - gint n_targets, i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OOO:GtkTreeView.enable_model_drag_source", - kwlist, - &py_sbmask, &py_targets, &py_actions)) - return NULL; - if (pyg_flags_get_value(GDK_TYPE_MODIFIER_TYPE, - py_sbmask, (gint *)&sbmask)) - return NULL; - if (pyg_flags_get_value(GDK_TYPE_DRAG_ACTION, - py_actions, (gint *)&actions)) - return NULL; - if (!PySequence_Check(py_targets)) { - PyErr_SetString(PyExc_TypeError, "targets must be a sequence"); - return NULL; - } - n_targets = PySequence_Length(py_targets); - targets = g_new(GtkTargetEntry, n_targets); - for (i = 0; i < n_targets; i++) { - PyObject *item = PySequence_GetItem(py_targets, i); - Py_DECREF(item); - if (!PyArg_ParseTuple(item, "zii", &targets[i].target, - &targets[i].flags, &targets[i].info)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "list items should be of form (string,int,int)"); - g_free(targets); - return NULL; - } - } - gtk_tree_view_enable_model_drag_source(GTK_TREE_VIEW(self->obj), - sbmask, targets, n_targets, actions); - g_free(targets); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_view_enable_model_drag_dest kwargs -static PyObject * -_wrap_gtk_tree_view_enable_model_drag_dest(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "targets", "actions", NULL }; - PyObject *py_targets, *py_actions; - GtkTargetEntry *targets; - GdkDragAction actions; - gint n_targets, i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OO:GtkTreeView.enable_model_drag_dest", - kwlist, - &py_targets, &py_actions)) - return NULL; - if (pyg_flags_get_value(GDK_TYPE_DRAG_ACTION, - py_actions, (gint *)&actions)) - return NULL; - if (!PySequence_Check(py_targets)) { - PyErr_SetString(PyExc_TypeError, "targets must be a sequence"); - return NULL; - } - n_targets = PySequence_Length(py_targets); - targets = g_new(GtkTargetEntry, n_targets); - for (i = 0; i < n_targets; i++) { - PyObject *item = PySequence_GetItem(py_targets, i); - Py_DECREF(item); - if (!PyArg_ParseTuple(item, "zii", &targets[i].target, - &targets[i].flags, &targets[i].info)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "list items should be of form (string,int,int)"); - g_free(targets); - return NULL; - } - } - gtk_tree_view_enable_model_drag_dest(GTK_TREE_VIEW(self->obj), - targets, n_targets, actions); - g_free(targets); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_view_get_drag_dest_row noargs -static PyObject * -_wrap_gtk_tree_view_get_drag_dest_row(PyGObject *self) -{ - GtkTreePath *path; - GtkTreeViewDropPosition pos; - - gtk_tree_view_get_drag_dest_row(GTK_TREE_VIEW(self->obj), &path, &pos); - if (path) { - PyObject *py_path = pygtk_tree_path_to_pyobject(path); - gint py_pos = (gint) pos; - gtk_tree_path_free(path); - return Py_BuildValue("(NN)", py_path, - pyg_enum_from_gtype(GTK_TYPE_TREE_VIEW_DROP_POSITION, py_pos)); - } else { - Py_INCREF(Py_None); - return Py_None; - } -} -%% -override gtk_tree_view_set_drag_dest_row kwargs -static PyObject * -_wrap_gtk_tree_view_set_drag_dest_row(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "path", "pos", NULL }; - PyObject *py_path; - gint py_pos; - GtkTreePath *path; - GtkTreeViewDropPosition pos; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "Oi:GtkTreeView.set_drag_dest_row", - kwlist, - &py_path, &py_pos)) - return NULL; - - path = pygtk_tree_path_from_pyobject(py_path); - if (!path) { - PyErr_SetString(PyExc_TypeError, - "set_drag_dest_row muts be a TreePath"); - return NULL; - } - pos = (GtkTreeViewDropPosition) py_pos; - gtk_tree_view_set_drag_dest_row(GTK_TREE_VIEW(self->obj), path, pos); - gtk_tree_path_free(path); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_view_get_dest_row_at_pos kwargs -static PyObject * -_wrap_gtk_tree_view_get_dest_row_at_pos(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "x", "y", NULL }; - GtkTreePath *path; - GtkTreeViewDropPosition pos; - - gint x,y; - gboolean r; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "ii:GtkTreeView.get_drag_dest_row_at_pos", - kwlist, - &x, &y)) - return NULL; - - - r = gtk_tree_view_get_dest_row_at_pos(GTK_TREE_VIEW(self->obj), x, y, &path, &pos); - if (r && path) { - PyObject *py_path = pygtk_tree_path_to_pyobject(path); - gint py_pos = (gint) pos; - gtk_tree_path_free(path); - return Py_BuildValue("(NN)", py_path, - pyg_enum_from_gtype(GTK_TYPE_TREE_VIEW_DROP_POSITION, py_pos)); - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_view_map_expanded_rows kwargs - -typedef struct { - PyObject *func; - PyObject *user_data; -} _map_expanded_rows_data_t; - -static void map_expanded_rows_cb(GtkTreeView *tree_view, GtkTreePath *path, - gpointer user_data) -{ - PyObject *py_path, *py_view, *ret; - _map_expanded_rows_data_t *data = - (_map_expanded_rows_data_t *) user_data; - - /* If exception is pending, just return */ - if (PyErr_Occurred()) - return; - - py_path = pygtk_tree_path_to_pyobject(path); - if (py_path == NULL) - return; - py_view = pygobject_new((GObject *)tree_view); - if (py_view == NULL) { - Py_DECREF(py_path); - return; - } - if (data->user_data) - ret = PyObject_CallFunction(data->func, "NNO", py_view, py_path, data->user_data); - else - ret = PyObject_CallFunction(data->func, "NN", py_view, py_path); - Py_XDECREF(ret); -} - -static PyObject * -_wrap_gtk_tree_view_map_expanded_rows(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "func", "data", NULL }; - _map_expanded_rows_data_t data = { NULL, NULL }; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:GtkTreeView.map_expanded_rows", - kwlist, - &data.func, &data.user_data)) - return NULL; - - if (!PyCallable_Check(data.func)) { - PyErr_SetString(PyExc_TypeError, "func must be callable"); - return NULL; - } - - gtk_tree_view_map_expanded_rows(GTK_TREE_VIEW(self->obj), map_expanded_rows_cb, - &data); - - /* Return NULL if exception occurred in the callback */ - if (PyErr_Occurred()) - return NULL; - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_model_filter_set_visible_func kwargs -static gboolean -pygtk_tree_model_filter_visible_cb(GtkTreeModel *model, GtkTreeIter *iter, - gpointer data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = data; - PyObject *py_model, *py_iter, *retobj; - gboolean ret = FALSE; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - py_model = pygobject_new((GObject *)model); - py_iter = pyg_boxed_new(GTK_TYPE_TREE_ITER, iter, FALSE, FALSE); - - if (cunote->data) { - retobj = PyEval_CallFunction(cunote->func, "(NNO)", py_model, - py_iter, cunote->data); - } else { - retobj = PyEval_CallFunction(cunote->func, "(NN)", py_model, - py_iter); - } - if (retobj) - ret = retobj == Py_True ? TRUE : FALSE; - if (PyErr_Occurred()) { - PyErr_Print(); - } - Py_XDECREF(retobj); - - pyg_gil_state_release(state); - return ret; -} -static PyObject * -_wrap_gtk_tree_model_filter_set_visible_func(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "func", "data", NULL }; - PyObject *pyfunc, *pyarg = NULL; - PyGtkCustomNotify *cunote; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:GtkTreeModelFilter.set_visible_func", - kwlist, &pyfunc, &pyarg)) - return NULL; - - if (!PyCallable_Check(pyfunc)) { - PyErr_SetString(PyExc_TypeError, "func must be a callable object"); - return NULL; - } - cunote = g_new(PyGtkCustomNotify, 1); - Py_INCREF(pyfunc); - cunote->func = pyfunc; - Py_XINCREF(pyarg); - cunote->data = pyarg; - - gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER(self->obj), - pygtk_tree_model_filter_visible_cb, - (gpointer)cunote, - pygtk_custom_destroy_notify); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_model_filter_convert_child_iter_to_iter kwargs -static PyObject * -_wrap_gtk_tree_model_filter_convert_child_iter_to_iter(PyGObject *self, - PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "child_iter", NULL }; - PyObject *py_child_iter; - GtkTreeIter iter, *child_iter; - GtkTreePath *child_path, *path; - GtkTreeModel *child_model; - GtkTreeModelFilter *filter = GTK_TREE_MODEL_FILTER(self->obj); - - if (!PyArg_ParseTupleAndKeywords( - args, kwargs, "O:GtkTreeModelFilter.convert_child_iter_to_iter", - kwlist, &py_child_iter)) - return NULL; - if (pyg_boxed_check(py_child_iter, GTK_TYPE_TREE_ITER)) - child_iter = pyg_boxed_get(py_child_iter, GtkTreeIter); - else { - PyErr_SetString(PyExc_TypeError, "child_iter should be a GtkTreeIter"); - return NULL; - } - - child_model = gtk_tree_model_filter_get_model(filter); - child_path = gtk_tree_model_get_path(child_model, child_iter); - if (child_path == NULL) { - PyErr_SetString(PyExc_ValueError, "child_iter invalid"); - return NULL; - } - - path = gtk_tree_model_filter_convert_child_path_to_path(filter, - child_path); - gtk_tree_path_free (child_path); - if (path == NULL) { - PyErr_SetString(PyExc_RuntimeError, "couldn't convert child_iter"); - return NULL; - } - - gtk_tree_model_filter_convert_child_iter_to_iter( - GTK_TREE_MODEL_FILTER(self->obj), &iter, child_iter); - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE); -} -%% -override gtk_tree_model_filter_convert_iter_to_child_iter kwargs -static PyObject * -_wrap_gtk_tree_model_filter_convert_iter_to_child_iter(PyGObject *self, - PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "filter_iter", NULL }; - PyObject *py_filter_iter; - GtkTreeIter iter, *filter_iter; - - if (!PyArg_ParseTupleAndKeywords( - args, kwargs, "O:GtkTreeModelFilter.convert_iter_to_child_iter", - kwlist, &py_filter_iter)) - return NULL; - if (pyg_boxed_check(py_filter_iter, GTK_TYPE_TREE_ITER)) - filter_iter = pyg_boxed_get(py_filter_iter, GtkTreeIter); - else { - PyErr_SetString(PyExc_TypeError, - "filter_iter should be a GtkTreeIter"); - return NULL; - } - gtk_tree_model_filter_convert_iter_to_child_iter( - GTK_TREE_MODEL_FILTER(self->obj), &iter, filter_iter); - return pyg_boxed_new(GTK_TYPE_TREE_ITER, &iter, TRUE, TRUE); -} -%% -override gtk_tree_view_column_cell_get_position kwargs -static PyObject * -_wrap_gtk_tree_view_column_cell_get_position(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "cell_renderer", NULL }; - PyGObject *py_cell; - gint start, width; - - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!:GtkTreeViewColumn.cell_get_position", - kwlist, &PyGtkCellRenderer_Type, - &py_cell)) - return NULL; - - if (gtk_tree_view_column_cell_get_position(GTK_TREE_VIEW_COLUMN(self->obj), - GTK_CELL_RENDERER(py_cell->obj), - &start, &width)) - return Py_BuildValue("(ii)", start, width); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_store_reorder kwargs -static PyObject * -_wrap_gtk_tree_store_reorder(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "parent", "new_order", NULL }; - PyObject *list, *pyparent; - gint *new_order; - GtkTreeStore *store; - GtkTreeIter *parent = NULL; - int i, slen; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OO!:gtk.TreeStore.reorder", kwlist, - &pyparent, &PyList_Type, &list)) - return NULL; - - if (pyparent != Py_None) { - if (pyg_boxed_check(pyparent, GTK_TYPE_TREE_ITER)) { - parent = pyg_boxed_get(pyparent, GtkTreeIter); - } else { - PyErr_SetString(PyExc_TypeError, - "parent must be a valid gtk.TreeIter or None"); - return NULL; - } - } - store = GTK_TREE_STORE(self->obj); - slen = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(self->obj), parent); - if (PyList_Size(list) < slen) { - PyErr_SetString(PyExc_TypeError, - "list size must be >= the number of " - "children of parent"); - return NULL; - } - - new_order = g_new0(gint, slen); - for (i = 0; i < slen; i++) { - PyObject *item = PyList_GetItem(list, i); - int index; - if (!PyInt_Check(item)) { - PyErr_SetString(PyExc_TypeError, "all items must be of type int"); - g_free(new_order); - return NULL; - } - index = PyInt_AsLong(item); - if (index < 0 || index >= slen) { - PyErr_SetString(PyExc_ValueError, "position index out of range"); - g_free(new_order); - return NULL; - } - new_order[i] = index; - } - gtk_tree_store_reorder(GTK_TREE_STORE(self->obj), parent, new_order); - - g_free(new_order); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_model_get args -static PyObject * -_wrap_gtk_tree_model_get(PyGObject *self, PyObject *args) -{ - PyObject *py_iter, *ret; - gint len, i, n_columns; - GtkTreeIter *iter; - - len = PyTuple_Size(args) - 1; - - if (len < 1) { - PyErr_SetString(PyExc_TypeError, - "gtk.TreeModel.get requires at least two arguments"); - return NULL; - } - - py_iter = PyTuple_GetItem(args, 0); - - if (!pyg_boxed_check(py_iter, GTK_TYPE_TREE_ITER)) { - PyErr_SetString(PyExc_TypeError, "iter must be a GtkTreeIter"); - return NULL; - } - iter = pyg_boxed_get(py_iter, GtkTreeIter); - - ret = PyTuple_New(len); - - n_columns = gtk_tree_model_get_n_columns(GTK_TREE_MODEL(self->obj)); - for (i = 0; i < len; i++) { - GValue value = { 0, }; - gint column; - PyObject *py_column = PyTuple_GetItem(args, i+1); - - if (!PyInt_Check(py_column)) { - PyErr_SetString(PyExc_TypeError, "column numbers must be ints"); - Py_DECREF(ret); - return NULL; - } - column = PyInt_AsLong(py_column); - if (column < 0 || column >= n_columns) { - PyErr_SetString(PyExc_ValueError, "column number is out of range"); - Py_DECREF(ret); - return NULL; - } - gtk_tree_model_get_value(GTK_TREE_MODEL(self->obj), iter, - column, &value); - PyTuple_SetItem(ret, i, pyg_value_as_pyobject(&value, TRUE)); - g_value_unset(&value); - } - return ret; -} -%% -override gtk_tree_selection_select_all noargs -static PyObject * -_wrap_gtk_tree_selection_select_all(PyGObject *self) -{ - GtkSelectionMode mode; - - mode = gtk_tree_selection_get_mode(GTK_TREE_SELECTION(self->obj)); - if (mode != GTK_SELECTION_MULTIPLE) { - PyErr_SetString(PyExc_TypeError, - "gtk.TreeSelection.select_all requires that" - " selection mode is gtk.SELECTION_MULTIPLE"); - return NULL; - } - - gtk_tree_selection_select_all(GTK_TREE_SELECTION(self->obj)); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_selection_select_range kwargs -static PyObject * -_wrap_gtk_tree_selection_select_range(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "start_path", "end_path", NULL }; - PyObject *py_start_path, *py_end_path; - GtkTreePath *start_path, *end_path; - GtkSelectionMode mode; - - mode = gtk_tree_selection_get_mode(GTK_TREE_SELECTION(self->obj)); - if (mode != GTK_SELECTION_MULTIPLE) { - PyErr_SetString(PyExc_TypeError, - "gtk.TreeSelection.select_range requires that" - " selection mode is gtk.SELECTION_MULTIPLE"); - return NULL; - } - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OO:GtkTreeSelection.select_range", - kwlist, &py_start_path, &py_end_path)) - return NULL; - start_path = pygtk_tree_path_from_pyobject(py_start_path); - if (!start_path) { - PyErr_SetString(PyExc_TypeError, - "could not convert start_path to a GtkTreePath"); - return NULL; - } - end_path = pygtk_tree_path_from_pyobject(py_end_path); - if (!end_path) { - gtk_tree_path_free(start_path); - PyErr_SetString(PyExc_TypeError, - "could not convert end_path to a GtkTreePath"); - return NULL; - } - gtk_tree_selection_select_range(GTK_TREE_SELECTION(self->obj), - start_path, end_path); - - gtk_tree_path_free(start_path); - gtk_tree_path_free(end_path); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_model_filter_set_modify_func kwargs -static void -pygtk_filter_modify_func_marshal(GtkTreeModel *model, GtkTreeIter *iter, - GValue *value, gint column, gpointer data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = data; - PyObject *py_value, *py_model, *py_iter; - - g_assert (cunote->func); - - state = pyg_gil_state_ensure(); - - py_model = pygobject_new((GObject *)model); - py_iter = pyg_boxed_new(GTK_TYPE_TREE_ITER, iter, FALSE, FALSE); - if (cunote->data) - py_value = PyEval_CallFunction(cunote->func, "(NNiO)", - py_model, py_iter, column, cunote->data); - else - py_value = PyEval_CallFunction(cunote->func, "(NNi)", - py_model, py_iter, column); - - if (PyErr_Occurred()) { - PyErr_Print(); - } else if (pyg_value_from_pyobject(value, py_value)) { - PyErr_Format(PyExc_TypeError, - "value is of the wrong type for column %i", column); - PyErr_Print(); - } - - Py_XDECREF(py_value); - - pyg_gil_state_release(state); -} - -static PyObject * -_wrap_gtk_tree_model_filter_set_modify_func(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "types", "func", "data", NULL }; - GType *types; - PyObject *py_types, *py_func, *py_arg = NULL; - PyGtkCustomNotify *cunote; - gint tlen, i; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OO|O:GtkTreeModelFilter.set_modify_func", - kwlist, &py_types, &py_func, &py_arg)) - return NULL; - - if (!PyCallable_Check(py_func)) { - PyErr_SetString(PyExc_TypeError, "func must be a callable object"); - return NULL; - } - if (!PySequence_Check(py_types) || (tlen = PySequence_Size(py_types)) <= 0) { - PyErr_SetString(PyExc_TypeError, - "types must be a tuple containing one or more arguments"); - return NULL; - } - - types = g_new0(GType, tlen); - for (i = 0; i < tlen; i++) { - PyObject *item = PySequence_GetItem(py_types, i); - - types[i] = pyg_type_from_object(item); - if (types[i] == 0) { - Py_DECREF(item); - g_free(types); - return NULL; - } - Py_DECREF(item); - } - - cunote = g_new(PyGtkCustomNotify, 1); - Py_INCREF(py_func); - cunote->func = py_func; - Py_XINCREF(py_arg); - cunote->data = py_arg; - - gtk_tree_model_filter_set_modify_func(GTK_TREE_MODEL_FILTER(self->obj), - tlen, types, - pygtk_filter_modify_func_marshal, - cunote, - pygtk_custom_destroy_notify); - - g_free(types); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_view_set_column_drag_function kwargs -static gboolean -pygtk_column_drag_func_marshal(GtkTreeView *tree_view, - GtkTreeViewColumn *column, - GtkTreeViewColumn *prev_column, - GtkTreeViewColumn *next_column, - gpointer data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = data; - PyObject *py_tree_view, *py_column, *py_prev_column, *py_next_column; - PyObject *retobj; - gboolean ret = FALSE; - - g_assert (cunote->func); - - state = pyg_gil_state_ensure(); - - py_tree_view = pygobject_new((GObject *)tree_view); - py_column = pygobject_new((GObject *)column); - py_prev_column = pygobject_new((GObject *)prev_column); - /* Workaround for drag part of GTK+ bug #143355 */ - if (prev_column == next_column) - next_column = NULL; - py_next_column = pygobject_new((GObject *)next_column); - if (cunote->data) - retobj = PyEval_CallFunction(cunote->func, "(NNNNO)", - py_tree_view, py_column, py_prev_column, - py_next_column, cunote->data); - else - retobj = PyEval_CallFunction(cunote->func, "(NNNN)", - py_tree_view, py_column, py_prev_column, - py_next_column); - - if (retobj) - ret = retobj == Py_True ? TRUE : FALSE; - if (PyErr_Occurred()) { - PyErr_Print(); - } - Py_XDECREF(retobj); - - pyg_gil_state_release(state); - return ret; -} -static PyObject * -_wrap_gtk_tree_view_set_column_drag_function(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "func", "user_data", NULL }; - PyObject *py_func = NULL, *py_arg = NULL; - PyGtkCustomNotify *cunote; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|OO:GtkTreeView.set_column_drag_func", - kwlist, &py_func, &py_arg)) - return NULL; - - if (!py_func || py_func == Py_None) { - gtk_tree_view_set_column_drag_function(GTK_TREE_VIEW(self->obj), - NULL, NULL, NULL); - Py_INCREF(Py_None); - return Py_None; - } - - if (!PyCallable_Check(py_func)) { - PyErr_SetString(PyExc_TypeError, "func must be a callable object"); - return NULL; - } - - cunote = g_new(PyGtkCustomNotify, 1); - Py_INCREF(py_func); - cunote->func = py_func; - Py_XINCREF(py_arg); - cunote->data = py_arg; - - gtk_tree_view_set_column_drag_function(GTK_TREE_VIEW(self->obj), - pygtk_column_drag_func_marshal, - cunote, - pygtk_custom_destroy_notify); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_view_set_search_equal_func kwargs -static gboolean -pygtk_set_search_equal_func_marshal(GtkTreeModel *model, - gint column, - const gchar *key, - GtkTreeIter *iter, - gpointer data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = data; - PyObject *py_model, *py_column, *py_key, *py_iter; - PyObject *retobj; - gboolean ret = FALSE; - - /* gracefully guard against NULL values */ - g_return_val_if_fail(cunote->func, TRUE); - g_return_val_if_fail(key, TRUE); - g_return_val_if_fail(iter, TRUE); - - state = pyg_gil_state_ensure(); - - py_model = pygobject_new((GObject *)model); - py_column = PyInt_FromLong(column); - py_key = PyString_FromString(key); - py_iter = pyg_boxed_new(GTK_TYPE_TREE_ITER, iter, FALSE, FALSE); - - if (cunote->data) - retobj = PyEval_CallFunction(cunote->func, "(NNNNO)", - py_model, py_column, py_key, py_iter, - cunote->data); - else - retobj = PyEval_CallFunction(cunote->func, "(NNNN)", - py_model, py_column, py_key, py_iter); - - if (retobj) - ret = (PyObject_IsTrue(retobj)? TRUE : FALSE); - if (PyErr_Occurred()) { - PyErr_Print(); - } - Py_XDECREF(retobj); - - pyg_gil_state_release(state); - return ret; -} - -static PyObject * -_wrap_gtk_tree_view_set_search_equal_func(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "func", "user_data", NULL }; - PyObject *py_func = NULL, *py_arg = NULL; - PyGtkCustomNotify *cunote; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|OO:GtkTreeView.set_search_equal_func", - kwlist, &py_func, &py_arg)) - return NULL; - - if (!py_func || py_func == Py_None) { - gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(self->obj), - NULL, NULL, NULL); - Py_INCREF(Py_None); - return Py_None; - } - - if (!PyCallable_Check(py_func)) { - PyErr_SetString(PyExc_TypeError, "func must be a callable object"); - return NULL; - } - - cunote = g_new(PyGtkCustomNotify, 1); - Py_INCREF(py_func); - cunote->func = py_func; - Py_XINCREF(py_arg); - cunote->data = py_arg; - - gtk_tree_view_set_search_equal_func(GTK_TREE_VIEW(self->obj), - pygtk_set_search_equal_func_marshal, - cunote, - pygtk_custom_destroy_notify); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_view_set_row_separator_func kwargs -static gboolean -pygtk_set_row_separator_func_marshal(GtkTreeModel *model, - GtkTreeIter *iter, - gpointer data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = data; - PyObject *py_model, *py_iter; - PyObject *retobj; - gboolean ret = FALSE; - - g_assert (cunote->func); - - state = pyg_gil_state_ensure(); - - py_model = pygobject_new((GObject *)model); - py_iter = pyg_boxed_new(GTK_TYPE_TREE_ITER, iter, FALSE, FALSE); - - if (cunote->data) - retobj = PyEval_CallFunction(cunote->func, "(NNO)", - py_model, py_iter, cunote->data); - else - retobj = PyEval_CallFunction(cunote->func, "(NN)", - py_model, py_iter); - - if (retobj) - ret = retobj == Py_True ? TRUE : FALSE; - if (PyErr_Occurred()) { - PyErr_Print(); - } - Py_XDECREF(retobj); - - pyg_gil_state_release(state); - return ret; -} - -static PyObject * -_wrap_gtk_tree_view_set_row_separator_func(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "func", "user_data", NULL }; - PyObject *py_func = NULL, *py_arg = NULL; - PyGtkCustomNotify *cunote; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|OO:GtkTreeView.set_row_separator_func", - kwlist, &py_func, &py_arg)) - return NULL; - - if (!py_func || py_func == Py_None) { - gtk_tree_view_set_row_separator_func(GTK_TREE_VIEW(self->obj), - NULL, NULL, NULL); - Py_INCREF(Py_None); - return Py_None; - } - - if (!PyCallable_Check(py_func)) { - PyErr_SetString(PyExc_TypeError, "func must be a callable object"); - return NULL; - } - - cunote = g_new(PyGtkCustomNotify, 1); - Py_INCREF(py_func); - cunote->func = py_func; - Py_XINCREF(py_arg); - cunote->data = py_arg; - - gtk_tree_view_set_row_separator_func(GTK_TREE_VIEW(self->obj), - pygtk_set_row_separator_func_marshal, - cunote, - pygtk_custom_destroy_notify); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_view_get_visible_range noargs -static PyObject * -_wrap_gtk_tree_view_get_visible_range(PyGObject *self) -{ - GtkTreePath *start_path, *end_path; - gboolean r; - - r = gtk_tree_view_get_visible_range(GTK_TREE_VIEW(self->obj), - &start_path, &end_path); - if (r) { - PyObject *py_start_path = pygtk_tree_path_to_pyobject(start_path); - PyObject *py_end_path = pygtk_tree_path_to_pyobject(end_path); - gtk_tree_path_free(start_path); - gtk_tree_path_free(end_path); - return Py_BuildValue("(NN)", py_start_path, py_end_path); - } - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_view_set_search_position_func -static void -pygtk_tree_view_set_search_position_func_cb(GtkTreeView *treeview, - GtkWidget *search_dialog, - gpointer data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = data; - PyObject *retobj; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - if (cunote->data) - retobj = PyEval_CallFunction(cunote->func, "(NNO)", - pygobject_new((GObject*)treeview), - pygobject_new((GObject*)search_dialog), - cunote->data); - else - retobj = PyEval_CallFunction(cunote->func, "(NN)", - pygobject_new((GObject*)treeview), - pygobject_new((GObject*)search_dialog)); - - if (retobj == NULL) { - PyErr_Print(); - } - - Py_XDECREF(retobj); - - pyg_gil_state_release(state); -} -static PyObject * -_wrap_gtk_tree_view_set_search_position_func(PyGObject *self, PyObject *args) -{ - PyObject *pyfunc, *pyarg = NULL; - PyGtkCustomNotify *cunote; - - if(!PyArg_ParseTuple(args, "O|O:GtkTreeView.set_search_position_func", - &pyfunc, &pyarg)) - return NULL; - - if (pyfunc != Py_None) { - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = pyfunc; - cunote->data = pyarg; - Py_INCREF(cunote->func); - Py_XINCREF(cunote->data); - gtk_tree_view_set_search_position_func( - GTK_TREE_VIEW(self->obj), - pygtk_tree_view_set_search_position_func_cb, cunote, - pygtk_custom_destroy_notify); - } else - gtk_tree_view_set_search_position_func(GTK_TREE_VIEW(self->obj), - NULL, NULL, NULL); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_tree_store_set_column_types args -static PyObject* -_wrap_gtk_tree_store_set_column_types(PyGObject *self, PyObject *args) -{ - guint len, i; - GType *column_types; - - len = PyTuple_Size(args); - if (len == 0) { - PyErr_SetString(PyExc_TypeError, - "GtkTreeStore set_column_types requires at least one argument"); - return NULL; - } - - column_types = g_new(GType, len); - for (i = 0; i < len; i++) { - PyObject *item = PyTuple_GetItem(args, i); - - column_types[i] = pyg_type_from_object(item); - if (column_types[i] == 0) { - g_free(column_types); - return NULL; - } - } - - gtk_tree_store_set_column_types(GTK_TREE_STORE(self->obj), len, - column_types); - g_free(column_types); - - Py_INCREF(Py_None); - return Py_None; -} diff --git a/gtk/gtkunixprint.defs b/gtk/gtkunixprint.defs deleted file mode 100644 index 57581caa..00000000 --- a/gtk/gtkunixprint.defs +++ /dev/null @@ -1,408 +0,0 @@ -;; -*- scheme -*- -; object definitions ... -(define-object PageSetupUnixDialog - (in-module "Unixprint") - (parent "GtkDialog") - (c-name "GtkPageSetupUnixDialog") - (gtype-id "GTK_TYPE_PAGE_SETUP_UNIX_DIALOG") -) - -(define-object PrintJob - (in-module "Unixprint") - (parent "GObject") - (c-name "GtkPrintJob") - (gtype-id "GTK_TYPE_PRINT_JOB") -) - -(define-object PrintUnixDialog - (in-module "Unixprint") - (parent "GtkDialog") - (c-name "GtkPrintUnixDialog") - (gtype-id "GTK_TYPE_PRINT_UNIX_DIALOG") -) - -(define-object Printer - (in-module "Unixprint") - (parent "GObject") - (c-name "GtkPrinter") - (gtype-id "GTK_TYPE_PRINTER") -) - -;; Enumerations and flags ... - -(define-flags PrintCapabilities - (in-module "Unixprint") - (c-name "GtkPrintCapabilities") - (gtype-id "GTK_TYPE_PRINT_CAPABILITIES") - (values - '("page-set" "GTK_PRINT_CAPABILITY_PAGE_SET") - '("copies" "GTK_PRINT_CAPABILITY_COPIES") - '("collate" "GTK_PRINT_CAPABILITY_COLLATE") - '("reverse" "GTK_PRINT_CAPABILITY_REVERSE") - '("scale" "GTK_PRINT_CAPABILITY_SCALE") - '("generate-pdf" "GTK_PRINT_CAPABILITY_GENERATE_PDF") - '("generate-ps" "GTK_PRINT_CAPABILITY_GENERATE_PS") - '("preview" "GTK_PRINT_CAPABILITY_PREVIEW") - ) -) - - -;; From gtkpagesetupunixdialog.h - -(define-function gtk_page_setup_unix_dialog_get_type - (c-name "gtk_page_setup_unix_dialog_get_type") - (return-type "GType") -) - -(define-function gtk_page_setup_unix_dialog_new - (c-name "gtk_page_setup_unix_dialog_new") - (is-constructor-of "GtkPageSetupUnixDialog") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "title" (null-ok) (default "NULL")) - '("GtkWindow*" "parent" (null-ok) (default "NULL")) - ) -) - -(define-method set_page_setup - (of-object "GtkPageSetupUnixDialog") - (c-name "gtk_page_setup_unix_dialog_set_page_setup") - (return-type "none") - (parameters - '("GtkPageSetup*" "page_setup") - ) -) - -(define-method get_page_setup - (of-object "GtkPageSetupUnixDialog") - (c-name "gtk_page_setup_unix_dialog_get_page_setup") - (return-type "GtkPageSetup*") -) - -(define-method set_print_settings - (of-object "GtkPageSetupUnixDialog") - (c-name "gtk_page_setup_unix_dialog_set_print_settings") - (return-type "none") - (parameters - '("GtkPrintSettings*" "print_settings") - ) -) - -(define-method get_print_settings - (of-object "GtkPageSetupUnixDialog") - (c-name "gtk_page_setup_unix_dialog_get_print_settings") - (return-type "GtkPrintSettings*") -) - - -;; From gtkprinter.h - -(define-function gtk_printer_get_type - (c-name "gtk_printer_get_type") - (return-type "GType") -) - -(define-function gtk_printer_new - (c-name "gtk_printer_new") - (is-constructor-of "GtkPrinter") - (return-type "GtkPrinter*") - (parameters - '("const-gchar*" "name") - '("GtkPrintBackend*" "backend") - '("gboolean" "is_virtual") - ) -) - -(define-method get_backend - (of-object "GtkPrinter") - (c-name "gtk_printer_get_backend") - (return-type "GtkPrintBackend*") -) - -(define-method get_name - (of-object "GtkPrinter") - (c-name "gtk_printer_get_name") - (return-type "const-gchar*") -) - -(define-method get_state_message - (of-object "GtkPrinter") - (c-name "gtk_printer_get_state_message") - (return-type "const-gchar*") -) - -(define-method get_description - (of-object "GtkPrinter") - (c-name "gtk_printer_get_description") - (return-type "const-gchar*") -) - -(define-method get_location - (of-object "GtkPrinter") - (c-name "gtk_printer_get_location") - (return-type "const-gchar*") -) - -(define-method get_icon_name - (of-object "GtkPrinter") - (c-name "gtk_printer_get_icon_name") - (return-type "const-gchar*") -) - -(define-method get_job_count - (of-object "GtkPrinter") - (c-name "gtk_printer_get_job_count") - (return-type "gint") -) - -(define-method is_active - (of-object "GtkPrinter") - (c-name "gtk_printer_is_active") - (return-type "gboolean") -) - -(define-method is_virtual - (of-object "GtkPrinter") - (c-name "gtk_printer_is_virtual") - (return-type "gboolean") -) - -(define-method is_default - (of-object "GtkPrinter") - (c-name "gtk_printer_is_default") - (return-type "gboolean") -) - -(define-method accepts_pdf - (of-object "GtkPrinter") - (c-name "gtk_printer_accepts_pdf") - (return-type "gboolean") -) - -(define-method accepts_ps - (of-object "GtkPrinter") - (c-name "gtk_printer_accepts_ps") - (return-type "gboolean") -) - -(define-method compare - (of-object "GtkPrinter") - (c-name "gtk_printer_compare") - (return-type "gint") - (parameters - '("GtkPrinter*" "b") - ) -) - -(define-function enumerate_printers - (c-name "gtk_enumerate_printers") - (return-type "none") - (parameters - '("GtkPrinterFunc" "func") - '("gpointer" "data") - '("GDestroyNotify" "destroy") - '("gboolean" "wait") - ) -) - -(define-virtual details_acquired - (of-object "GtkPrinter") - (return-type "none") - (parameters - '("gboolean" "success") - ) -) - - - - -;; From gtkprintjob.h - -(define-function gtk_print_job_get_type - (c-name "gtk_print_job_get_type") - (return-type "GType") -) - -(define-function gtk_print_job_new - (c-name "gtk_print_job_new") - (is-constructor-of "GtkPrintJob") - (return-type "GtkPrintJob*") - (parameters - '("const-gchar*" "title") - '("GtkPrinter*" "printer") - '("GtkPrintSettings*" "settings") - '("GtkPageSetup*" "page_setup") - ) -) - -(define-method get_settings - (of-object "GtkPrintJob") - (c-name "gtk_print_job_get_settings") - (return-type "GtkPrintSettings*") -) - -(define-method get_printer - (of-object "GtkPrintJob") - (c-name "gtk_print_job_get_printer") - (return-type "GtkPrinter*") -) - -(define-method get_title - (of-object "GtkPrintJob") - (c-name "gtk_print_job_get_title") - (return-type "const-gchar*") -) - -(define-method get_status - (of-object "GtkPrintJob") - (c-name "gtk_print_job_get_status") - (return-type "GtkPrintStatus") -) - -(define-method set_source_file - (of-object "GtkPrintJob") - (c-name "gtk_print_job_set_source_file") - (return-type "gboolean") - (parameters - '("const-gchar*" "filename") - '("GError**" "error") - ) -) - -(define-method get_surface - (of-object "GtkPrintJob") - (c-name "gtk_print_job_get_surface") - (return-type "cairo_surface_t*") - (parameters - '("GError**" "error") - ) -) - -(define-method set_track_print_status - (of-object "GtkPrintJob") - (c-name "gtk_print_job_set_track_print_status") - (return-type "none") - (parameters - '("gboolean" "track_status") - ) -) - -(define-method get_track_print_status - (of-object "GtkPrintJob") - (c-name "gtk_print_job_get_track_print_status") - (return-type "gboolean") -) - -(define-method send - (of-object "GtkPrintJob") - (c-name "gtk_print_job_send") - (return-type "gboolean") - (parameters - '("GtkPrintJobCompleteFunc" "callback") - '("gpointer" "user_data") - '("GDestroyNotify" "dnotify") - '("GError**" "error") - ) -) - -(define-function print_capabilities_get_type - (c-name "gtk_print_capabilities_get_type") - (return-type "GType") -) - -(define-virtual status_changed - (of-object "GtkPrintJob") - (return-type "none") -) - - - -;; From gtkprintunixdialog.h - -(define-function gtk_print_unix_dialog_get_type - (c-name "gtk_print_unix_dialog_get_type") - (return-type "GType") -) - -(define-function gtk_print_unix_dialog_new - (c-name "gtk_print_unix_dialog_new") - (is-constructor-of "GtkPrintUnixDialog") - (return-type "GtkWidget*") - (parameters - '("const-gchar*" "title" (null-ok) (default "NULL")) - '("GtkWindow*" "parent" (null-ok) (default "NULL")) - ) -) - -(define-method set_page_setup - (of-object "GtkPrintUnixDialog") - (c-name "gtk_print_unix_dialog_set_page_setup") - (return-type "none") - (parameters - '("GtkPageSetup*" "page_setup") - ) -) - -(define-method get_page_setup - (of-object "GtkPrintUnixDialog") - (c-name "gtk_print_unix_dialog_get_page_setup") - (return-type "GtkPageSetup*") -) - -(define-method set_current_page - (of-object "GtkPrintUnixDialog") - (c-name "gtk_print_unix_dialog_set_current_page") - (return-type "none") - (parameters - '("gint" "current_page") - ) -) - -(define-method get_current_page - (of-object "GtkPrintUnixDialog") - (c-name "gtk_print_unix_dialog_get_current_page") - (return-type "gint") -) - -(define-method set_settings - (of-object "GtkPrintUnixDialog") - (c-name "gtk_print_unix_dialog_set_settings") - (return-type "none") - (parameters - '("GtkPrintSettings*" "settings" (null-ok) (default "NULL")) - ) -) - -(define-method get_settings - (of-object "GtkPrintUnixDialog") - (c-name "gtk_print_unix_dialog_get_settings") - (return-type "GtkPrintSettings*") -) - -(define-method get_selected_printer - (of-object "GtkPrintUnixDialog") - (c-name "gtk_print_unix_dialog_get_selected_printer") - (return-type "GtkPrinter*") -) - -(define-method add_custom_tab - (of-object "GtkPrintUnixDialog") - (c-name "gtk_print_unix_dialog_add_custom_tab") - (return-type "none") - (parameters - '("GtkWidget*" "child") - '("GtkWidget*" "tab_label") - ) -) - -(define-method set_manual_capabilities - (of-object "GtkPrintUnixDialog") - (c-name "gtk_print_unix_dialog_set_manual_capabilities") - (return-type "none") - (parameters - '("GtkPrintCapabilities" "capabilities") - ) -) - - - diff --git a/gtk/gtkunixprint.override b/gtk/gtkunixprint.override deleted file mode 100644 index 12b68d90..00000000 --- a/gtk/gtkunixprint.override +++ /dev/null @@ -1,236 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 2006 John Finlay - * - * gtkunixprint.override: overrides for the gtkunixprint module. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -headers -#define NO_IMPORT_PYGOBJECT -#include -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include - -#include -#include "pygtk-private.h" -#include -#include -#include -#include -#include - -#include -extern Pycairo_CAPI_t *Pycairo_CAPI; - -#ifndef GTK_TYPE_PRINT_CAPABILITIES -GType gtk_print_capabilites_get_type (void) G_GNUC_CONST; -#define GTK_TYPE_PRINT_CAPABILITIES (gtk_print_capabilites_get_type()) - -GType -gtk_print_capabilites_get_type (void) -{ - static GType etype = 0; - if (etype == 0) { - static const GFlagsValue values[] = { - { GTK_PRINT_CAPABILITY_PAGE_SET, "GTK_PRINT_CAPABILITY_PAGE_SET", "page_set" }, - { GTK_PRINT_CAPABILITY_COPIES, "GTK_PRINT_CAPABILITY_COPIES", "copies" }, - { GTK_PRINT_CAPABILITY_COLLATE, "GTK_PRINT_CAPABILITY_COLLATE", "collate" }, - { GTK_PRINT_CAPABILITY_REVERSE, "GTK_PRINT_CAPABILITY_REVERSE", "reverse" }, - { GTK_PRINT_CAPABILITY_SCALE, "GTK_PRINT_CAPABILITY_SCALE", "scale" }, - { 0, NULL, NULL } - }; - etype = g_flags_register_static (g_intern_static_string ("GtkPrintCapabilites"), values); - } - return etype; -} -#endif - - -void -pygtk_custom_destroy_notify(gpointer user_data) -{ - PyGtkCustomNotify *cunote = user_data; - PyGILState_STATE state; - - g_return_if_fail(user_data); - state = pyg_gil_state_ensure(); - Py_XDECREF(cunote->func); - Py_XDECREF(cunote->data); - pyg_gil_state_release(state); - - g_free(cunote); -} - - -%% -modulename gtkunixprint -%% -import gobject.GObject as PyGObject_Type -import gtk.Dialog as PyGtkDialog_Type -import gtk.PageSetup as PyGtkPageSetup_Type -import gtk.PrintSettings as PyGtkPrintSettings_Type -import gtk.Widget as PyGtkWidget_Type -import gtk.Window as PyGtkWindow_Type -%% -ignore-glob *_get_type -%% -ignore -%% -override gtk_print_job_get_surface noargs -static PyObject* -_wrap_gtk_print_job_get_surface(PyGObject *self) -{ - GError *error = NULL; - cairo_surface_t * surface; - - surface = gtk_print_job_get_surface(GTK_PRINT_JOB(self->obj), &error); - - if (pyg_error_check(&error)) - return NULL; - -#if PYCAIRO_VERSION_HEX >= 0x1010600 - return PycairoSurface_FromSurface(surface, NULL); -#else - return PycairoSurface_FromSurface(surface, NULL, NULL); -#endif -} -%% -override gtk_print_job_send kwargs -static void -pygtk_print_job_complete_func_cb(GtkPrintJob *print_job, gpointer user_data, - GError *error) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = user_data; - PyObject *retobj, *data; - gchar *errorstr = NULL; - - g_assert(cunote->func); - - state = pyg_gil_state_ensure(); - - if (cunote->data) - data = cunote->data; - else - data = Py_None; - - if (error) - errorstr = error->message; - - retobj = PyEval_CallFunction(cunote->func, "(NOz)", - pygobject_new((GObject *)print_job), - data, errorstr); - - if (retobj == NULL) - PyErr_Print(); - - Py_XDECREF(retobj); - - pyg_gil_state_release(state); -} -static PyObject* -_wrap_gtk_print_job_send(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "callback", "user_data", NULL }; - PyObject *pyfunc, *pyarg = NULL; - PyGtkCustomNotify *cunote; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:gtkunixprint.PrintJob.send", - kwlist, &pyfunc, &pyarg)) - return NULL; - - if (!PyCallable_Check(pyfunc)) { - PyErr_SetString(PyExc_TypeError, "callback must be a callable object"); - return NULL; - } - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = pyfunc; - cunote->data = pyarg; - Py_INCREF(cunote->func); - Py_XINCREF(cunote->data); - - gtk_print_job_send(GTK_PRINT_JOB(self->obj), - pygtk_print_job_complete_func_cb, - cunote, pygtk_custom_destroy_notify); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_enumerate_printers kwargs -static gboolean -pygtk_printer_func_cb(GtkPrinter *printer, gpointer user_data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = user_data; - PyObject *retobj; - gboolean ret = TRUE; - - g_assert(cunote->func); - state = pyg_gil_state_ensure(); - - if (cunote->data) - retobj = PyEval_CallFunction(cunote->func, "(NO)", - pygobject_new((GObject *)printer), - cunote->data); - else - retobj = PyEval_CallFunction(cunote->func, "(N)", - pygobject_new((GObject *)printer)); - - if (retobj == NULL) - PyErr_Print(); - else if (retobj == Py_False) - ret = FALSE; - - Py_XDECREF(retobj); - pyg_gil_state_release(state); - - return ret; -} -static PyObject* -_wrap_gtk_enumerate_printers(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "func", "data", "wait", NULL }; - PyObject *pyfunc, *pyarg = NULL; - PyGtkCustomNotify *cunote; - gboolean wait = TRUE; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|Oi:gtkunixprint.enumerate_printers", - kwlist, &pyfunc, &pyarg, &wait)) - return NULL; - - if (!PyCallable_Check(pyfunc)) { - PyErr_SetString(PyExc_TypeError, "func must be a callable object"); - return NULL; - } - cunote = g_new0(PyGtkCustomNotify, 1); - cunote->func = pyfunc; - cunote->data = pyarg; - Py_INCREF(cunote->func); - Py_XINCREF(cunote->data); - - gtk_enumerate_printers(pygtk_printer_func_cb, cunote, - pygtk_custom_destroy_notify, wait); - - Py_INCREF(Py_None); - return Py_None; -} diff --git a/gtk/gtkunixprintmodule.c b/gtk/gtkunixprintmodule.c deleted file mode 100644 index 55377859..00000000 --- a/gtk/gtkunixprintmodule.c +++ /dev/null @@ -1,56 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 2006 John Finlay - * - * gtkunixprintmodule.c: wrapper for the gtkunixprint library. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include -/* include this first, before NO_IMPORT_PYGOBJECT is defined */ -#include -#include -#include -#include -#include -#include -#include - -# include -Pycairo_CAPI_t *Pycairo_CAPI; - -void pygtkunixprint_register_classes(PyObject *d); -void pygtkunixprint_add_constants(PyObject *module, const gchar *strip_prefix); -extern PyMethodDef pygtkunixprint_functions[]; - -DL_EXPORT(void) -initgtkunixprint(void) -{ - PyObject *m, *d; - - m = Py_InitModule("gtkunixprint", pygtkunixprint_functions); - d = PyModule_GetDict(m); - - init_pygobject(); - Pycairo_IMPORT; - init_pygtk(); - - pygtkunixprint_register_classes(d); - pygtkunixprint_add_constants(m, "GTK_"); -} diff --git a/gtk/gtkwidget.override b/gtk/gtkwidget.override deleted file mode 100644 index 7fb080ae..00000000 --- a/gtk/gtkwidget.override +++ /dev/null @@ -1,575 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * gtkwidget.override: overrides for the gtk.Widget object. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -ignore - gtk_widget_destroyed - gtk_widget_get - gtk_widget_getv - gtk_widget_newv - gtk_widget_new - gtk_widget_set - gtk_widget_setv - gtk_widget_style_get_valist - gtk_widget_class_install_style_property_parser -%% -override gtk_widget_translate_coordinates kwargs -static PyObject * -_wrap_gtk_widget_translate_coordinates(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "dest_widget", "src_x", "src_y", NULL }; - PyObject *py_dest_widget; - int src_x, src_y; - GtkWidget *dest_widget = NULL; - int dest_x, dest_y; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "Oii:GtkWidget.translate_coordinates", - kwlist, &py_dest_widget, &src_x, &src_y)) { - return NULL; - } - - if (pygobject_check(py_dest_widget, &PyGtkWidget_Type)) { - dest_widget = GTK_WIDGET(pygobject_get(py_dest_widget)); - } else if (py_dest_widget != Py_None) { - PyErr_SetString(PyExc_TypeError, - "dest_widget must be a GtkWidget or None"); - return NULL; - } - - if (!gtk_widget_translate_coordinates(GTK_WIDGET(self->obj), - dest_widget, - src_x, - src_y, - &dest_x, - &dest_y)) { - return Py_BuildValue ("()"); - } - - return Py_BuildValue ("(ii)", dest_x, dest_y); -} -%% -override gtk_widget_size_request noargs -static PyObject * -_wrap_gtk_widget_size_request(PyGObject *self) -{ - GtkRequisition requisition; - - gtk_widget_size_request(GTK_WIDGET(self->obj), &requisition); - return Py_BuildValue("(ii)", requisition.width, requisition.height); -} -%% -override gtk_widget_get_child_requisition noargs -static PyObject * -_wrap_gtk_widget_get_child_requisition(PyGObject *self) -{ - GtkRequisition requisition; - - gtk_widget_get_child_requisition(GTK_WIDGET(self->obj), &requisition); - return Py_BuildValue("(ii)", requisition.width, requisition.height); -} -%% -override gtk_widget_get_allocation noargs -static PyObject * -_wrap_gtk_widget_get_allocation(PyGObject *self) -{ - GtkAllocation allocation; - - allocation = GTK_WIDGET(self->obj)->allocation; - return pyg_boxed_new(GDK_TYPE_RECTANGLE, &allocation, TRUE, TRUE); -} -%% -override gtk_widget_intersect kwargs -static PyObject * -_wrap_gtk_widget_intersect(PyGObject *self, PyObject *args, PyObject*kwargs) -{ - static char *kwlist[] = { "area", NULL }; - PyObject *py_area; - GdkRectangle area, intersect; - - if(!PyArg_ParseTupleAndKeywords(args, kwargs, "O:GtkWidget.intersect", - kwlist, &py_area)) - return NULL; - if (!pygdk_rectangle_from_pyobject(py_area, &area)) - return NULL; - if (gtk_widget_intersect(GTK_WIDGET(self->obj), &area, &intersect)) - return pyg_boxed_new(GDK_TYPE_RECTANGLE, &intersect, TRUE, TRUE); - else { - Py_INCREF(Py_None); - return Py_None; - } -} -%% -override gtk_widget_get_pointer noargs -static PyObject * -_wrap_gtk_widget_get_pointer(PyGObject *self) -{ - int x, y; - - gtk_widget_get_pointer(GTK_WIDGET(self->obj), &x, &y); - return Py_BuildValue("(ii)", x, y); -} -%% -override gtk_widget_path noargs -static PyObject * -_wrap_gtk_widget_path(PyGObject *self) -{ - guint length; - gchar *path; - gchar *path_reversed; - PyObject *result; - - gtk_widget_path(GTK_WIDGET(self->obj), &length, &path, &path_reversed); - result = PyString_FromString(path); - g_free(path); - g_free(path_reversed); - - return result; -} -%% -override gtk_widget_class_path noargs -static PyObject * -_wrap_gtk_widget_class_path(PyGObject *self) -{ - guint length; - gchar *path; - gchar *path_reversed; - PyObject *result; - - gtk_widget_class_path(GTK_WIDGET(self->obj), &length, &path, - &path_reversed); - result = PyString_FromString(path); - g_free(path); - g_free(path_reversed); - - return result; -} -%% -override gtk_widget_class_list_style_properties kwargs -static PyObject * -_wrap_gtk_widget_class_list_style_properties (PyObject *self, PyObject *args, - PyObject*kwargs) -{ - static char *kwlist[] = { "widget", NULL }; - GParamSpec **specs; - PyObject *py_itype, *list; - GType itype; - GtkWidgetClass *class; - guint nprops; - guint i; - - if (!PyArg_ParseTupleAndKeywords( - args, kwargs, "O:gtk.widget_class_list_style_properties", kwlist, - &py_itype)) - return NULL; - if ((itype = pyg_type_from_object(py_itype)) == 0) - return NULL; - - if (!g_type_is_a(itype, GTK_TYPE_WIDGET)) { - PyErr_SetString(PyExc_TypeError, "type must be derived from GtkWidget"); - return NULL; - } - - class = g_type_class_ref(itype); - if (!class) { - PyErr_SetString(PyExc_RuntimeError, - "could not get a reference to type class"); - return NULL; - } - - specs = gtk_widget_class_list_style_properties(class, &nprops); - list = PyTuple_New(nprops); - if (list == NULL) { - g_free(specs); - g_type_class_unref(class); - return NULL; - } - for (i = 0; i < nprops; i++) { - PyTuple_SetItem(list, i, pyg_param_spec_new(specs[i])); - } - g_free(specs); - g_type_class_unref(class); - - return list; -} -%% -override gtk_widget_class_install_style_property kwargs -static PyObject * -_wrap_gtk_widget_class_install_style_property (PyObject *self, - PyObject *args, - PyObject* kwargs) -{ - static char *kwlist[] = { "widget", "pspec", NULL }; - PyObject *py_itype, *property; - GType itype; - GtkWidgetClass *class; - GParamSpec *pspec; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OO:widget_class_install_style_property", - kwlist, - &py_itype, &property)) - return NULL; - - - if ((itype = pyg_type_from_object(py_itype)) == 0) - return NULL; - - if (!g_type_is_a(itype, GTK_TYPE_WIDGET)) { - PyErr_SetString(PyExc_TypeError, "type must be derived from GtkWidget"); - return NULL; - } - - class = g_type_class_ref(itype); - if (!class) { - PyErr_SetString(PyExc_RuntimeError, - "could not get a reference to type class"); - return NULL; - } - - pspec = pyg_param_spec_from_object(property); - if(!pspec) { - g_type_class_unref(class); - return NULL; - } - - if (gtk_widget_class_find_style_property(class, pspec->name)) { - PyErr_Format(PyExc_TypeError, - "there is already a '%s' property installed", pspec->name); - g_type_class_unref(class); - return NULL; - } - - gtk_widget_class_install_style_property(class, pspec); - - g_type_class_unref(class); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_widget_style_get_property kwargs -static PyObject * -_wrap_gtk_widget_style_get_property(PyGObject *self, PyObject *args, - PyObject*kwargs) -{ - static char *kwlist[] = { "property_name", NULL }; - gchar *param_name; - GParamSpec *pspec; - GValue value = { 0, }; - PyObject *ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s:GtkWidget.style_get_property", kwlist, - ¶m_name)) - return NULL; - pspec = gtk_widget_class_find_style_property(GTK_WIDGET_GET_CLASS(self->obj), - param_name); - if (!pspec) { - PyErr_SetString(PyExc_TypeError, - "the widget does not support the given style parameter"); - return NULL; - } - if (!(pspec->flags & G_PARAM_READABLE)) { - PyErr_Format(PyExc_TypeError, "style property %s is not readable", - param_name); - return NULL; - } - g_value_init(&value, G_PARAM_SPEC_VALUE_TYPE(pspec)); - gtk_widget_style_get_property(GTK_WIDGET(self->obj), (const gchar*)param_name, &value); - ret = pyg_value_as_pyobject(&value, TRUE); - g_value_unset(&value); - return ret; -} -%% -override gtk_widget_list_mnemonic_labels noargs -static PyObject * -_wrap_gtk_widget_list_mnemonic_labels(PyGObject *self) -{ - GList *labels; - PyObject *py_labels; - gint i, len; - - labels = gtk_widget_list_mnemonic_labels(GTK_WIDGET(self->obj)); - len = g_list_length(labels); - - py_labels = PyList_New(len); - - for (i = 0; i < len; i++) { - PyObject *obj; - - obj = pygobject_new((GObject *)g_list_nth_data(labels, i)); - PyList_SetItem(py_labels, i, obj); - } - - g_list_free(labels); - - return py_labels; -} -%% -override-attr GtkWidget.window -static int -_wrap_gtk_widget__set_window(PyGObject *self, PyGObject *value, void *closure) -{ - if (!pygobject_check(value, &PyGdkWindow_Type)) { - PyErr_SetString(PyExc_TypeError, "must be a GdkWindow object"); - return -1; - } - - GTK_WIDGET(self->obj)->window = g_object_ref(GDK_WINDOW(value->obj)); - - return 0; -} -%% -override-attr GtkWidget.allocation -static int -_wrap_gtk_widget__set_allocation(PyGObject *self, PyObject *value, void *closure) -{ - if (!pygobject_check(value, &PyGdkRectangle_Type)) { - PyErr_SetString(PyExc_TypeError, "must be a GdkRectangle object"); - return -1; - } - - pygdk_rectangle_from_pyobject(value, >K_WIDGET(self->obj)->allocation); - - return 0; -} -%% -override gtk_widget_hide_on_delete -static PyObject * -_wrap_gtk_widget_hide_on_delete(PyGObject *self, PyObject *args) -{ - /* args is just ignored, so obj.connect(signal, func) always works */ - - return PyBool_FromLong(gtk_widget_hide_on_delete(GTK_WIDGET(self->obj))); -} -%% -override gtk_menu_get_for_attach_widget noargs -static PyObject * -_wrap_gtk_menu_get_for_attach_widget(PyGObject *self) -{ - GList *menus; - gint len, i; - PyObject *pymenus; - - menus = gtk_menu_get_for_attach_widget(GTK_WIDGET(self->obj)); - len = g_list_length(menus); - if ((pymenus = PyTuple_New(len)) == NULL) - return NULL; - - for (i = 0; i < len; i++) { - GtkMenu *menu = GTK_MENU(g_list_nth_data(menus, i)); - PyObject *pymenu = pygobject_new((GObject *)menu); - PyTuple_SET_ITEM(pymenus, i, pymenu); - } - return pymenus; -} -%% -define GtkWidget.set_activate_signal kwargs classmethod -static PyObject * -_wrap_gtk_widget_set_activate_signal(PyObject *cls, - PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "signal_name", NULL }; - gchar *signal_name; - guint signal_id; - GType gtype; - GtkWidgetClass *klass; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s:gtk.Widget.set_activate_signal", - kwlist, - &signal_name)) - return NULL; - - if ((gtype = pyg_type_from_object(cls)) == 0) - return NULL; - signal_id = g_signal_lookup(signal_name, gtype); - if (signal_id == 0) { - PyErr_Format(PyExc_ValueError, "class has no signal named '%s'", - signal_name); - return NULL; - } - klass = (GtkWidgetClass *) g_type_class_ref(gtype); - klass->activate_signal = signal_id; - g_type_class_unref(klass); - Py_INCREF(Py_None); - return Py_None; -} -%% -define GtkWidget.set_set_scroll_adjustments_signal kwargs classmethod -static PyObject * -_wrap_gtk_widget_set_set_scroll_adjustments_signal(PyObject *cls, - PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "signal_name", NULL }; - gchar *signal_name; - guint signal_id; - GType gtype; - GtkWidgetClass *klass; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s:gtk.Widget.set_set_scroll_adjustments_signal", kwlist, - &signal_name)) - return NULL; - - if ((gtype = pyg_type_from_object(cls)) == 0) - return NULL; - signal_id = g_signal_lookup(signal_name, gtype); - if (signal_id == 0) { - PyErr_Format(PyExc_ValueError, - "class has no signal named '%s'", signal_name); - return NULL; - } - klass = (GtkWidgetClass *) g_type_class_ref(gtype); - klass->set_scroll_adjustments_signal = signal_id; - g_type_class_unref(klass); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_drag_source_set_icon_name1 kwargs -static PyObject * -_wrap_gtk_drag_source_set_icon_name1(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "widget", "icon_name", NULL }; - PyGObject *widget; - PyObject *icon_name, *ret, *nargs; - - if (PyErr_Warn(PyExc_DeprecationWarning, "use gtk.Widget.drag_source_set_icon_name") < 0) - return NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!s:gtk.drag_source_set_icon_name", - kwlist, &PyGtkWidget_Type, &widget, - &icon_name)) - return NULL; - nargs = Py_BuildValue("(s)", icon_name); - ret = _wrap_gtk_drag_source_set_icon_name(widget, nargs, NULL); - Py_DECREF(nargs); - return ret; -} -%% -override gtk_widget_class_find_style_property kwargs -static PyObject * -_wrap_gtk_widget_class_find_style_property (PyObject *self, PyObject *args, - PyObject*kwargs) -{ - static char *kwlist[] = { "widget", "property_name", NULL }; - GParamSpec *spec; - PyObject *py_itype, *pyspec; - GType itype; - GtkWidgetClass *class; - const gchar *property_name; - - if (!PyArg_ParseTupleAndKeywords( - args, kwargs, "Os:gtk.widget_class_find_style_property", kwlist, - &py_itype, &property_name)) - return NULL; - if ((itype = pyg_type_from_object(py_itype)) == 0) - return NULL; - - if (!g_type_is_a(itype, GTK_TYPE_WIDGET)) { - PyErr_SetString(PyExc_TypeError, - "type must be derived from GtkWidget"); - return NULL; - } - - class = g_type_class_ref(itype); - if (!class) { - PyErr_SetString(PyExc_RuntimeError, - "could not get a reference to type class"); - return NULL; - } - - spec = gtk_widget_class_find_style_property(class, property_name); - if (spec) { - pyspec = pyg_param_spec_new(spec); - } else { - pyspec = Py_None; - Py_INCREF(pyspec); - } - g_type_class_unref(class); - - return pyspec; -} -%% -define GtkWidget.set_activate_signal kwargs classmethod -static PyObject * -_wrap_gtk_widget_set_activate_signal(PyObject *cls, - PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "signal_name", NULL }; - gchar *signal_name; - guint signal_id; - GType gtype; - GtkWidgetClass *klass; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s:gtk.Widget.set_activate_signal", kwlist, - &signal_name)) - return NULL; - - if ((gtype = pyg_type_from_object(cls)) == 0) - return NULL; - signal_id = g_signal_lookup(signal_name, gtype); - if (signal_id == 0) { - PyErr_Format(PyExc_ValueError, - "class has no signal named '%s'", signal_name); - return NULL; - } - klass = (GtkWidgetClass *) g_type_class_ref(gtype); - klass->activate_signal = signal_id; - g_type_class_unref(klass); - Py_INCREF(Py_None); - return Py_None; -} - -%% -define GtkWidget.get_activate_signal noargs classmethod -static PyObject * -_wrap_gtk_widget_get_activate_signal(PyObject *cls, - PyObject *args, - PyObject *kwargs) -{ - PyObject *signame; - GType gtype; - GtkWidgetClass *klass; - GSignalQuery query; - - if ((gtype = pyg_type_from_object(cls)) == 0) - return NULL; - klass = (GtkWidgetClass *) g_type_class_ref(gtype); - - g_signal_query(klass->activate_signal, &query); - if (query.signal_id == 0) { - PyErr_SetString(PyExc_ValueError, - "class has invalid signal ID"); - signame = NULL; - goto out; - } - signame = PyString_FromString(query.signal_name); -out: - g_type_class_unref(klass); - return signame; -} diff --git a/gtk/gtkwindow.override b/gtk/gtkwindow.override deleted file mode 100644 index 6ace8124..00000000 --- a/gtk/gtkwindow.override +++ /dev/null @@ -1,286 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * gtkwindow.override: overrides for the gtk.Window object. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -ignore - gtk_window_add_embedded_xid - gtk_window_remove_embedded_xid -%% -override gtk_window_list_toplevels noargs -static PyObject * -_wrap_gtk_window_list_toplevels(PyGObject *self) -{ - GList *list, *tmp; - PyObject *py_list; - PyObject *gtk_obj; - - list = gtk_window_list_toplevels(); - - if ((py_list = PyList_New(0)) == NULL) { - g_list_free(list); - return NULL; - } - for (tmp = list; tmp != NULL; tmp = tmp->next) { - gtk_obj = pygobject_new(G_OBJECT(tmp->data)); - if (gtk_obj == NULL) { - g_list_free(list); - Py_DECREF(py_list); - return NULL; - } - PyList_Append(py_list, gtk_obj); - Py_DECREF(gtk_obj); - } - g_list_free(list); - return py_list; -} -%% -override gtk_window_set_geometry_hints kwargs -static PyObject * -_wrap_gtk_window_set_geometry_hints(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "geometry_widget", "min_width", "min_height", - "max_width", "max_height", "base_width", - "base_height", "width_inc", "height_inc", - "min_aspect", "max_aspect", NULL }; - PyObject *py_geometry_widget = Py_None; - GtkWidget *geometry_widget = NULL; - gint min_width = -1, min_height = -1, max_width = -1, max_height = -1; - gint base_width = -1, base_height = -1, width_inc = -1, height_inc = -1; - gdouble min_aspect = -1.0, max_aspect = -1.0; - GdkGeometry geometry = { 0 }; - GdkWindowHints geom_mask = 0; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|Oiiiiiiiidd:GtkWindow.set_geometry_hints", kwlist, - &py_geometry_widget, &min_width, - &min_height, &max_width, &max_height, - &base_width, &base_height, &width_inc, - &height_inc, &min_aspect, &max_aspect)) - return NULL; - if (pygobject_check(py_geometry_widget, &PyGtkWidget_Type)) - geometry_widget = GTK_WIDGET(pygobject_get(py_geometry_widget)); - else if (py_geometry_widget != Py_None) { - PyErr_SetString(PyExc_TypeError, - "geometry_widget must be a GtkWidget or None"); - return NULL; - } - if (min_width >= 0 || min_height >= 0) { - geometry.min_width = MAX(min_width, 0); - geometry.min_height = MAX(min_height, 0); - geom_mask |= GDK_HINT_MIN_SIZE; - } - if (max_width >= 0 || max_height >= 0) { - geometry.max_width = MAX(max_width, 0); - geometry.max_height = MAX(max_height, 0); - geom_mask |= GDK_HINT_MAX_SIZE; - } - if (base_width >= 0 || base_height >= 0) { - geometry.base_width = MAX(base_width, 0); - geometry.base_height = MAX(base_height, 0); - geom_mask |= GDK_HINT_BASE_SIZE; - } - if (width_inc >= 0 || height_inc >= 0) { - geometry.width_inc = MAX(width_inc, 0); - geometry.height_inc = MAX(height_inc, 0); - geom_mask |= GDK_HINT_RESIZE_INC; - } - if (min_aspect >= 0.0 || max_aspect >= 0.0) { - if (min_aspect <= 0.0 || max_aspect <= 0.0) { - PyErr_SetString(PyExc_TypeError, "aspect ratios must be positive"); - return NULL; - } - geometry.min_aspect = min_aspect; - geometry.max_aspect = max_aspect; - geom_mask |= GDK_HINT_ASPECT; - } - gtk_window_set_geometry_hints(GTK_WINDOW(self->obj), geometry_widget, - &geometry, geom_mask); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_window_get_position -static PyObject * -_wrap_gtk_window_get_position(PyGObject *self) -{ - gint root_x, root_y; - - gtk_window_get_position(GTK_WINDOW(self->obj), &root_x, &root_y); - return Py_BuildValue("(ii)", root_x, root_y); -} -%% -override gtk_window_get_size -static PyObject * -_wrap_gtk_window_get_size(PyGObject *self) -{ - gint width, height; - - gtk_window_get_size(GTK_WINDOW(self->obj), &width, &height); - return Py_BuildValue("(ii)", width, height); -} -%% -override gtk_window_get_default_size -static PyObject * -_wrap_gtk_window_get_default_size(PyGObject *self) -{ - gint width, height; - - gtk_window_get_default_size(GTK_WINDOW(self->obj), &width, &height); - return Py_BuildValue("(ii)", width, height); -} -%% -override gtk_window_get_frame_dimensions noargs -static PyObject * -_wrap_gtk_window_get_frame_dimensions(PyGObject *self) -{ - int left, top, right, bottom; - - gtk_window_get_frame_dimensions(GTK_WINDOW(self->obj), - &left, &top, &right, &bottom); - return Py_BuildValue("(iiii)", left, top, right, bottom); -} -%% -override gtk_widget_get_size_request noargs -static PyObject * -_wrap_gtk_widget_get_size_request(PyGObject *self) -{ - int width, height; - - gtk_widget_get_size_request(GTK_WIDGET(self->obj), &width, &height); - return Py_BuildValue("(ii)", width, height); -} -%% -override gtk_window_set_icon_list args -static PyObject * -_wrap_gtk_window_set_icon_list(PyGObject *self, PyObject *args) -{ - GList *icon_list = NULL; - PyObject *pyicon; - gint len, i; - - len = PyTuple_Size(args); - for (i = 0; i < len; i++) { - pyicon = PyTuple_GetItem(args, i); - if (!pygobject_check(pyicon, &PyGdkPixbuf_Type)) { - PyErr_SetString(PyExc_TypeError, - "icons must be GdkPixbufs"); - g_list_free(icon_list); - return NULL; - } - icon_list = g_list_prepend(icon_list, pygobject_get(pyicon)); - } - gtk_window_set_icon_list(GTK_WINDOW(self->obj), icon_list); - g_list_free(icon_list); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_window_get_icon_list noargs -static PyObject * -_wrap_gtk_window_get_icon_list(PyGObject *self) -{ - GList *icon_list = NULL; - PyObject *pyicon; - - if ((icon_list = gtk_window_get_icon_list(GTK_WINDOW(self->obj)))) { - PyObject *py_list; - GList *tmp; - - if ((py_list = PyList_New(0)) == NULL) { - g_list_free(icon_list); - return NULL; - } - for (tmp = icon_list; tmp != NULL; tmp = tmp->next) { - pyicon = pygobject_new(G_OBJECT(tmp->data)); - - if (pyicon == NULL) { - g_list_free(icon_list); - Py_DECREF(py_list); - return NULL; - } - PyList_Append(py_list, pyicon); - Py_DECREF(pyicon); - } - g_list_free(icon_list); - return py_list; - } - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_window_set_default_icon_list args -static PyObject * -_wrap_gtk_window_set_default_icon_list(PyGObject *self, PyObject *args) -{ - GList *icon_list = NULL; - PyObject *pyicon; - gint len, i; - - len = PyTuple_Size(args); - for (i = 0; i < len; i++) { - pyicon = PyTuple_GetItem(args, i); - if (!pygobject_check(pyicon, &PyGdkPixbuf_Type)) { - PyErr_SetString(PyExc_TypeError, - "icons must be GdkPixbufs"); - g_list_free(icon_list); - return NULL; - } - icon_list = g_list_prepend(icon_list, pygobject_get(pyicon)); - } - gtk_window_set_default_icon_list(icon_list); - g_list_free(icon_list); - Py_INCREF(Py_None); - return Py_None; -} -%% -override gtk_window_get_default_icon_list noargs -static PyObject * -_wrap_gtk_window_get_default_icon_list(PyGObject *self) -{ - GList *icon_list = NULL; - PyObject *pyicon; - - if ((icon_list = gtk_window_get_default_icon_list())) { - PyObject *py_list; - GList *tmp; - - if ((py_list = PyList_New(0)) == NULL) { - g_list_free(icon_list); - return NULL; - } - for (tmp = icon_list; tmp != NULL; tmp = tmp->next) { - pyicon = pygobject_new(G_OBJECT(tmp->data)); - - if (pyicon == NULL) { - g_list_free(icon_list); - Py_DECREF(py_list); - return NULL; - } - PyList_Append(py_list, pyicon); - Py_DECREF(pyicon); - } - g_list_free(icon_list); - return py_list; - } - Py_INCREF(Py_None); - return Py_None; -} diff --git a/gtk/keysyms.py b/gtk/keysyms.py deleted file mode 100644 index 55da5c0f..00000000 --- a/gtk/keysyms.py +++ /dev/null @@ -1,1499 +0,0 @@ -# -*- Mode: Python; py-indent-offset: 4 -*- -# pygtk - Python bindings for the GTK toolkit. -# Copyright (C) 1998-2003 James Henstridge -# -# gtk/keysyms.py: list of keysyms. -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public -# License as published by the Free Software Foundation; either -# version 2.1 of the License, or (at your option) any later version. -# -# This library is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public -# License along with this library; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 -# USA - -VoidSymbol = 0xFFFFFF -BackSpace = 0xFF08 -Tab = 0xFF09 -Linefeed = 0xFF0A -Clear = 0xFF0B -Return = 0xFF0D -Pause = 0xFF13 -Scroll_Lock = 0xFF14 -Sys_Req = 0xFF15 -Escape = 0xFF1B -Delete = 0xFFFF -Multi_key = 0xFF20 -Codeinput = 0xFF37 -SingleCandidate = 0xFF3C -MultipleCandidate = 0xFF3D -PreviousCandidate = 0xFF3E -Kanji = 0xFF21 -Muhenkan = 0xFF22 -Henkan_Mode = 0xFF23 -Henkan = 0xFF23 -Romaji = 0xFF24 -Hiragana = 0xFF25 -Katakana = 0xFF26 -Hiragana_Katakana = 0xFF27 -Zenkaku = 0xFF28 -Hankaku = 0xFF29 -Zenkaku_Hankaku = 0xFF2A -Touroku = 0xFF2B -Massyo = 0xFF2C -Kana_Lock = 0xFF2D -Kana_Shift = 0xFF2E -Eisu_Shift = 0xFF2F -Eisu_toggle = 0xFF30 -Kanji_Bangou = 0xFF37 -Zen_Koho = 0xFF3D -Mae_Koho = 0xFF3E -Home = 0xFF50 -Left = 0xFF51 -Up = 0xFF52 -Right = 0xFF53 -Down = 0xFF54 -Prior = 0xFF55 -Page_Up = 0xFF55 -Next = 0xFF56 -Page_Down = 0xFF56 -End = 0xFF57 -Begin = 0xFF58 -Select = 0xFF60 -Print = 0xFF61 -Execute = 0xFF62 -Insert = 0xFF63 -Undo = 0xFF65 -Redo = 0xFF66 -Menu = 0xFF67 -Find = 0xFF68 -Cancel = 0xFF69 -Help = 0xFF6A -Break = 0xFF6B -Mode_switch = 0xFF7E -script_switch = 0xFF7E -Num_Lock = 0xFF7F -KP_Space = 0xFF80 -KP_Tab = 0xFF89 -KP_Enter = 0xFF8D -KP_F1 = 0xFF91 -KP_F2 = 0xFF92 -KP_F3 = 0xFF93 -KP_F4 = 0xFF94 -KP_Home = 0xFF95 -KP_Left = 0xFF96 -KP_Up = 0xFF97 -KP_Right = 0xFF98 -KP_Down = 0xFF99 -KP_Prior = 0xFF9A -KP_Page_Up = 0xFF9A -KP_Next = 0xFF9B -KP_Page_Down = 0xFF9B -KP_End = 0xFF9C -KP_Begin = 0xFF9D -KP_Insert = 0xFF9E -KP_Delete = 0xFF9F -KP_Equal = 0xFFBD -KP_Multiply = 0xFFAA -KP_Add = 0xFFAB -KP_Separator = 0xFFAC -KP_Subtract = 0xFFAD -KP_Decimal = 0xFFAE -KP_Divide = 0xFFAF -KP_0 = 0xFFB0 -KP_1 = 0xFFB1 -KP_2 = 0xFFB2 -KP_3 = 0xFFB3 -KP_4 = 0xFFB4 -KP_5 = 0xFFB5 -KP_6 = 0xFFB6 -KP_7 = 0xFFB7 -KP_8 = 0xFFB8 -KP_9 = 0xFFB9 -F1 = 0xFFBE -F2 = 0xFFBF -F3 = 0xFFC0 -F4 = 0xFFC1 -F5 = 0xFFC2 -F6 = 0xFFC3 -F7 = 0xFFC4 -F8 = 0xFFC5 -F9 = 0xFFC6 -F10 = 0xFFC7 -F11 = 0xFFC8 -L1 = 0xFFC8 -F12 = 0xFFC9 -L2 = 0xFFC9 -F13 = 0xFFCA -L3 = 0xFFCA -F14 = 0xFFCB -L4 = 0xFFCB -F15 = 0xFFCC -L5 = 0xFFCC -F16 = 0xFFCD -L6 = 0xFFCD -F17 = 0xFFCE -L7 = 0xFFCE -F18 = 0xFFCF -L8 = 0xFFCF -F19 = 0xFFD0 -L9 = 0xFFD0 -F20 = 0xFFD1 -L10 = 0xFFD1 -F21 = 0xFFD2 -R1 = 0xFFD2 -F22 = 0xFFD3 -R2 = 0xFFD3 -F23 = 0xFFD4 -R3 = 0xFFD4 -F24 = 0xFFD5 -R4 = 0xFFD5 -F25 = 0xFFD6 -R5 = 0xFFD6 -F26 = 0xFFD7 -R6 = 0xFFD7 -F27 = 0xFFD8 -R7 = 0xFFD8 -F28 = 0xFFD9 -R8 = 0xFFD9 -F29 = 0xFFDA -R9 = 0xFFDA -F30 = 0xFFDB -R10 = 0xFFDB -F31 = 0xFFDC -R11 = 0xFFDC -F32 = 0xFFDD -R12 = 0xFFDD -F33 = 0xFFDE -R13 = 0xFFDE -F34 = 0xFFDF -R14 = 0xFFDF -F35 = 0xFFE0 -R15 = 0xFFE0 -Shift_L = 0xFFE1 -Shift_R = 0xFFE2 -Control_L = 0xFFE3 -Control_R = 0xFFE4 -Caps_Lock = 0xFFE5 -Shift_Lock = 0xFFE6 -Meta_L = 0xFFE7 -Meta_R = 0xFFE8 -Alt_L = 0xFFE9 -Alt_R = 0xFFEA -Super_L = 0xFFEB -Super_R = 0xFFEC -Hyper_L = 0xFFED -Hyper_R = 0xFFEE -ISO_Lock = 0xFE01 -ISO_Level2_Latch = 0xFE02 -ISO_Level3_Shift = 0xFE03 -ISO_Level3_Latch = 0xFE04 -ISO_Level3_Lock = 0xFE05 -ISO_Group_Shift = 0xFF7E -ISO_Group_Latch = 0xFE06 -ISO_Group_Lock = 0xFE07 -ISO_Next_Group = 0xFE08 -ISO_Next_Group_Lock = 0xFE09 -ISO_Prev_Group = 0xFE0A -ISO_Prev_Group_Lock = 0xFE0B -ISO_First_Group = 0xFE0C -ISO_First_Group_Lock = 0xFE0D -ISO_Last_Group = 0xFE0E -ISO_Last_Group_Lock = 0xFE0F -ISO_Left_Tab = 0xFE20 -ISO_Move_Line_Up = 0xFE21 -ISO_Move_Line_Down = 0xFE22 -ISO_Partial_Line_Up = 0xFE23 -ISO_Partial_Line_Down = 0xFE24 -ISO_Partial_Space_Left = 0xFE25 -ISO_Partial_Space_Right = 0xFE26 -ISO_Set_Margin_Left = 0xFE27 -ISO_Set_Margin_Right = 0xFE28 -ISO_Release_Margin_Left = 0xFE29 -ISO_Release_Margin_Right = 0xFE2A -ISO_Release_Both_Margins = 0xFE2B -ISO_Fast_Cursor_Left = 0xFE2C -ISO_Fast_Cursor_Right = 0xFE2D -ISO_Fast_Cursor_Up = 0xFE2E -ISO_Fast_Cursor_Down = 0xFE2F -ISO_Continuous_Underline = 0xFE30 -ISO_Discontinuous_Underline = 0xFE31 -ISO_Emphasize = 0xFE32 -ISO_Center_Object = 0xFE33 -ISO_Enter = 0xFE34 -dead_grave = 0xFE50 -dead_acute = 0xFE51 -dead_circumflex = 0xFE52 -dead_tilde = 0xFE53 -dead_macron = 0xFE54 -dead_breve = 0xFE55 -dead_abovedot = 0xFE56 -dead_diaeresis = 0xFE57 -dead_abovering = 0xFE58 -dead_doubleacute = 0xFE59 -dead_caron = 0xFE5A -dead_cedilla = 0xFE5B -dead_ogonek = 0xFE5C -dead_iota = 0xFE5D -dead_voiced_sound = 0xFE5E -dead_semivoiced_sound = 0xFE5F -dead_belowdot = 0xFE60 -First_Virtual_Screen = 0xFED0 -Prev_Virtual_Screen = 0xFED1 -Next_Virtual_Screen = 0xFED2 -Last_Virtual_Screen = 0xFED4 -Terminate_Server = 0xFED5 -AccessX_Enable = 0xFE70 -AccessX_Feedback_Enable = 0xFE71 -RepeatKeys_Enable = 0xFE72 -SlowKeys_Enable = 0xFE73 -BounceKeys_Enable = 0xFE74 -StickyKeys_Enable = 0xFE75 -MouseKeys_Enable = 0xFE76 -MouseKeys_Accel_Enable = 0xFE77 -Overlay1_Enable = 0xFE78 -Overlay2_Enable = 0xFE79 -AudibleBell_Enable = 0xFE7A -Pointer_Left = 0xFEE0 -Pointer_Right = 0xFEE1 -Pointer_Up = 0xFEE2 -Pointer_Down = 0xFEE3 -Pointer_UpLeft = 0xFEE4 -Pointer_UpRight = 0xFEE5 -Pointer_DownLeft = 0xFEE6 -Pointer_DownRight = 0xFEE7 -Pointer_Button_Dflt = 0xFEE8 -Pointer_Button1 = 0xFEE9 -Pointer_Button2 = 0xFEEA -Pointer_Button3 = 0xFEEB -Pointer_Button4 = 0xFEEC -Pointer_Button5 = 0xFEED -Pointer_DblClick_Dflt = 0xFEEE -Pointer_DblClick1 = 0xFEEF -Pointer_DblClick2 = 0xFEF0 -Pointer_DblClick3 = 0xFEF1 -Pointer_DblClick4 = 0xFEF2 -Pointer_DblClick5 = 0xFEF3 -Pointer_Drag_Dflt = 0xFEF4 -Pointer_Drag1 = 0xFEF5 -Pointer_Drag2 = 0xFEF6 -Pointer_Drag3 = 0xFEF7 -Pointer_Drag4 = 0xFEF8 -Pointer_Drag5 = 0xFEFD -Pointer_EnableKeys = 0xFEF9 -Pointer_Accelerate = 0xFEFA -Pointer_DfltBtnNext = 0xFEFB -Pointer_DfltBtnPrev = 0xFEFC -_3270_Duplicate = 0xFD01 -_3270_FieldMark = 0xFD02 -_3270_Right2 = 0xFD03 -_3270_Left2 = 0xFD04 -_3270_BackTab = 0xFD05 -_3270_EraseEOF = 0xFD06 -_3270_EraseInput = 0xFD07 -_3270_Reset = 0xFD08 -_3270_Quit = 0xFD09 -_3270_PA1 = 0xFD0A -_3270_PA2 = 0xFD0B -_3270_PA3 = 0xFD0C -_3270_Test = 0xFD0D -_3270_Attn = 0xFD0E -_3270_CursorBlink = 0xFD0F -_3270_AltCursor = 0xFD10 -_3270_KeyClick = 0xFD11 -_3270_Jump = 0xFD12 -_3270_Ident = 0xFD13 -_3270_Rule = 0xFD14 -_3270_Copy = 0xFD15 -_3270_Play = 0xFD16 -_3270_Setup = 0xFD17 -_3270_Record = 0xFD18 -_3270_ChangeScreen = 0xFD19 -_3270_DeleteWord = 0xFD1A -_3270_ExSelect = 0xFD1B -_3270_CursorSelect = 0xFD1C -_3270_PrintScreen = 0xFD1D -_3270_Enter = 0xFD1E -space = 0x020 -exclam = 0x021 -quotedbl = 0x022 -numbersign = 0x023 -dollar = 0x024 -percent = 0x025 -ampersand = 0x026 -apostrophe = 0x027 -quoteright = 0x027 -parenleft = 0x028 -parenright = 0x029 -asterisk = 0x02a -plus = 0x02b -comma = 0x02c -minus = 0x02d -period = 0x02e -slash = 0x02f -_0 = 0x030 -_1 = 0x031 -_2 = 0x032 -_3 = 0x033 -_4 = 0x034 -_5 = 0x035 -_6 = 0x036 -_7 = 0x037 -_8 = 0x038 -_9 = 0x039 -colon = 0x03a -semicolon = 0x03b -less = 0x03c -equal = 0x03d -greater = 0x03e -question = 0x03f -at = 0x040 -A = 0x041 -B = 0x042 -C = 0x043 -D = 0x044 -E = 0x045 -F = 0x046 -G = 0x047 -H = 0x048 -I = 0x049 -J = 0x04a -K = 0x04b -L = 0x04c -M = 0x04d -N = 0x04e -O = 0x04f -P = 0x050 -Q = 0x051 -R = 0x052 -S = 0x053 -T = 0x054 -U = 0x055 -V = 0x056 -W = 0x057 -X = 0x058 -Y = 0x059 -Z = 0x05a -bracketleft = 0x05b -backslash = 0x05c -bracketright = 0x05d -asciicircum = 0x05e -underscore = 0x05f -grave = 0x060 -quoteleft = 0x060 -a = 0x061 -b = 0x062 -c = 0x063 -d = 0x064 -e = 0x065 -f = 0x066 -g = 0x067 -h = 0x068 -i = 0x069 -j = 0x06a -k = 0x06b -l = 0x06c -m = 0x06d -n = 0x06e -o = 0x06f -p = 0x070 -q = 0x071 -r = 0x072 -s = 0x073 -t = 0x074 -u = 0x075 -v = 0x076 -w = 0x077 -x = 0x078 -y = 0x079 -z = 0x07a -braceleft = 0x07b -bar = 0x07c -braceright = 0x07d -asciitilde = 0x07e -nobreakspace = 0x0a0 -exclamdown = 0x0a1 -cent = 0x0a2 -sterling = 0x0a3 -currency = 0x0a4 -yen = 0x0a5 -brokenbar = 0x0a6 -section = 0x0a7 -diaeresis = 0x0a8 -copyright = 0x0a9 -ordfeminine = 0x0aa -guillemotleft = 0x0ab -notsign = 0x0ac -hyphen = 0x0ad -registered = 0x0ae -macron = 0x0af -degree = 0x0b0 -plusminus = 0x0b1 -twosuperior = 0x0b2 -threesuperior = 0x0b3 -acute = 0x0b4 -mu = 0x0b5 -paragraph = 0x0b6 -periodcentered = 0x0b7 -cedilla = 0x0b8 -onesuperior = 0x0b9 -masculine = 0x0ba -guillemotright = 0x0bb -onequarter = 0x0bc -onehalf = 0x0bd -threequarters = 0x0be -questiondown = 0x0bf -Agrave = 0x0c0 -Aacute = 0x0c1 -Acircumflex = 0x0c2 -Atilde = 0x0c3 -Adiaeresis = 0x0c4 -Aring = 0x0c5 -AE = 0x0c6 -Ccedilla = 0x0c7 -Egrave = 0x0c8 -Eacute = 0x0c9 -Ecircumflex = 0x0ca -Ediaeresis = 0x0cb -Igrave = 0x0cc -Iacute = 0x0cd -Icircumflex = 0x0ce -Idiaeresis = 0x0cf -ETH = 0x0d0 -Eth = 0x0d0 -Ntilde = 0x0d1 -Ograve = 0x0d2 -Oacute = 0x0d3 -Ocircumflex = 0x0d4 -Otilde = 0x0d5 -Odiaeresis = 0x0d6 -multiply = 0x0d7 -Ooblique = 0x0d8 -Ugrave = 0x0d9 -Uacute = 0x0da -Ucircumflex = 0x0db -Udiaeresis = 0x0dc -Yacute = 0x0dd -THORN = 0x0de -Thorn = 0x0de -ssharp = 0x0df -agrave = 0x0e0 -aacute = 0x0e1 -acircumflex = 0x0e2 -atilde = 0x0e3 -adiaeresis = 0x0e4 -aring = 0x0e5 -ae = 0x0e6 -ccedilla = 0x0e7 -egrave = 0x0e8 -eacute = 0x0e9 -ecircumflex = 0x0ea -ediaeresis = 0x0eb -igrave = 0x0ec -iacute = 0x0ed -icircumflex = 0x0ee -idiaeresis = 0x0ef -eth = 0x0f0 -ntilde = 0x0f1 -ograve = 0x0f2 -oacute = 0x0f3 -ocircumflex = 0x0f4 -otilde = 0x0f5 -odiaeresis = 0x0f6 -division = 0x0f7 -oslash = 0x0f8 -ugrave = 0x0f9 -uacute = 0x0fa -ucircumflex = 0x0fb -udiaeresis = 0x0fc -yacute = 0x0fd -thorn = 0x0fe -ydiaeresis = 0x0ff -Aogonek = 0x1a1 -breve = 0x1a2 -Lstroke = 0x1a3 -Lcaron = 0x1a5 -Sacute = 0x1a6 -Scaron = 0x1a9 -Scedilla = 0x1aa -Tcaron = 0x1ab -Zacute = 0x1ac -Zcaron = 0x1ae -Zabovedot = 0x1af -aogonek = 0x1b1 -ogonek = 0x1b2 -lstroke = 0x1b3 -lcaron = 0x1b5 -sacute = 0x1b6 -caron = 0x1b7 -scaron = 0x1b9 -scedilla = 0x1ba -tcaron = 0x1bb -zacute = 0x1bc -doubleacute = 0x1bd -zcaron = 0x1be -zabovedot = 0x1bf -Racute = 0x1c0 -Abreve = 0x1c3 -Lacute = 0x1c5 -Cacute = 0x1c6 -Ccaron = 0x1c8 -Eogonek = 0x1ca -Ecaron = 0x1cc -Dcaron = 0x1cf -Dstroke = 0x1d0 -Nacute = 0x1d1 -Ncaron = 0x1d2 -Odoubleacute = 0x1d5 -Rcaron = 0x1d8 -Uring = 0x1d9 -Udoubleacute = 0x1db -Tcedilla = 0x1de -racute = 0x1e0 -abreve = 0x1e3 -lacute = 0x1e5 -cacute = 0x1e6 -ccaron = 0x1e8 -eogonek = 0x1ea -ecaron = 0x1ec -dcaron = 0x1ef -dstroke = 0x1f0 -nacute = 0x1f1 -ncaron = 0x1f2 -odoubleacute = 0x1f5 -udoubleacute = 0x1fb -rcaron = 0x1f8 -uring = 0x1f9 -tcedilla = 0x1fe -abovedot = 0x1ff -Hstroke = 0x2a1 -Hcircumflex = 0x2a6 -Iabovedot = 0x2a9 -Gbreve = 0x2ab -Jcircumflex = 0x2ac -hstroke = 0x2b1 -hcircumflex = 0x2b6 -idotless = 0x2b9 -gbreve = 0x2bb -jcircumflex = 0x2bc -Cabovedot = 0x2c5 -Ccircumflex = 0x2c6 -Gabovedot = 0x2d5 -Gcircumflex = 0x2d8 -Ubreve = 0x2dd -Scircumflex = 0x2de -cabovedot = 0x2e5 -ccircumflex = 0x2e6 -gabovedot = 0x2f5 -gcircumflex = 0x2f8 -ubreve = 0x2fd -scircumflex = 0x2fe -kra = 0x3a2 -kappa = 0x3a2 -Rcedilla = 0x3a3 -Itilde = 0x3a5 -Lcedilla = 0x3a6 -Emacron = 0x3aa -Gcedilla = 0x3ab -Tslash = 0x3ac -rcedilla = 0x3b3 -itilde = 0x3b5 -lcedilla = 0x3b6 -emacron = 0x3ba -gcedilla = 0x3bb -tslash = 0x3bc -ENG = 0x3bd -eng = 0x3bf -Amacron = 0x3c0 -Iogonek = 0x3c7 -Eabovedot = 0x3cc -Imacron = 0x3cf -Ncedilla = 0x3d1 -Omacron = 0x3d2 -Kcedilla = 0x3d3 -Uogonek = 0x3d9 -Utilde = 0x3dd -Umacron = 0x3de -amacron = 0x3e0 -iogonek = 0x3e7 -eabovedot = 0x3ec -imacron = 0x3ef -ncedilla = 0x3f1 -omacron = 0x3f2 -kcedilla = 0x3f3 -uogonek = 0x3f9 -utilde = 0x3fd -umacron = 0x3fe -OE = 0x13bc -oe = 0x13bd -Ydiaeresis = 0x13be -overline = 0x47e -kana_fullstop = 0x4a1 -kana_openingbracket = 0x4a2 -kana_closingbracket = 0x4a3 -kana_comma = 0x4a4 -kana_conjunctive = 0x4a5 -kana_middledot = 0x4a5 -kana_WO = 0x4a6 -kana_a = 0x4a7 -kana_i = 0x4a8 -kana_u = 0x4a9 -kana_e = 0x4aa -kana_o = 0x4ab -kana_ya = 0x4ac -kana_yu = 0x4ad -kana_yo = 0x4ae -kana_tsu = 0x4af -kana_tu = 0x4af -prolongedsound = 0x4b0 -kana_A = 0x4b1 -kana_I = 0x4b2 -kana_U = 0x4b3 -kana_E = 0x4b4 -kana_O = 0x4b5 -kana_KA = 0x4b6 -kana_KI = 0x4b7 -kana_KU = 0x4b8 -kana_KE = 0x4b9 -kana_KO = 0x4ba -kana_SA = 0x4bb -kana_SHI = 0x4bc -kana_SU = 0x4bd -kana_SE = 0x4be -kana_SO = 0x4bf -kana_TA = 0x4c0 -kana_CHI = 0x4c1 -kana_TI = 0x4c1 -kana_TSU = 0x4c2 -kana_TU = 0x4c2 -kana_TE = 0x4c3 -kana_TO = 0x4c4 -kana_NA = 0x4c5 -kana_NI = 0x4c6 -kana_NU = 0x4c7 -kana_NE = 0x4c8 -kana_NO = 0x4c9 -kana_HA = 0x4ca -kana_HI = 0x4cb -kana_FU = 0x4cc -kana_HU = 0x4cc -kana_HE = 0x4cd -kana_HO = 0x4ce -kana_MA = 0x4cf -kana_MI = 0x4d0 -kana_MU = 0x4d1 -kana_ME = 0x4d2 -kana_MO = 0x4d3 -kana_YA = 0x4d4 -kana_YU = 0x4d5 -kana_YO = 0x4d6 -kana_RA = 0x4d7 -kana_RI = 0x4d8 -kana_RU = 0x4d9 -kana_RE = 0x4da -kana_RO = 0x4db -kana_WA = 0x4dc -kana_N = 0x4dd -voicedsound = 0x4de -semivoicedsound = 0x4df -kana_switch = 0xFF7E -Arabic_comma = 0x5ac -Arabic_semicolon = 0x5bb -Arabic_question_mark = 0x5bf -Arabic_hamza = 0x5c1 -Arabic_maddaonalef = 0x5c2 -Arabic_hamzaonalef = 0x5c3 -Arabic_hamzaonwaw = 0x5c4 -Arabic_hamzaunderalef = 0x5c5 -Arabic_hamzaonyeh = 0x5c6 -Arabic_alef = 0x5c7 -Arabic_beh = 0x5c8 -Arabic_tehmarbuta = 0x5c9 -Arabic_teh = 0x5ca -Arabic_theh = 0x5cb -Arabic_jeem = 0x5cc -Arabic_hah = 0x5cd -Arabic_khah = 0x5ce -Arabic_dal = 0x5cf -Arabic_thal = 0x5d0 -Arabic_ra = 0x5d1 -Arabic_zain = 0x5d2 -Arabic_seen = 0x5d3 -Arabic_sheen = 0x5d4 -Arabic_sad = 0x5d5 -Arabic_dad = 0x5d6 -Arabic_tah = 0x5d7 -Arabic_zah = 0x5d8 -Arabic_ain = 0x5d9 -Arabic_ghain = 0x5da -Arabic_tatweel = 0x5e0 -Arabic_feh = 0x5e1 -Arabic_qaf = 0x5e2 -Arabic_kaf = 0x5e3 -Arabic_lam = 0x5e4 -Arabic_meem = 0x5e5 -Arabic_noon = 0x5e6 -Arabic_ha = 0x5e7 -Arabic_heh = 0x5e7 -Arabic_waw = 0x5e8 -Arabic_alefmaksura = 0x5e9 -Arabic_yeh = 0x5ea -Arabic_fathatan = 0x5eb -Arabic_dammatan = 0x5ec -Arabic_kasratan = 0x5ed -Arabic_fatha = 0x5ee -Arabic_damma = 0x5ef -Arabic_kasra = 0x5f0 -Arabic_shadda = 0x5f1 -Arabic_sukun = 0x5f2 -Arabic_switch = 0xFF7E -Serbian_dje = 0x6a1 -Macedonia_gje = 0x6a2 -Cyrillic_io = 0x6a3 -Ukrainian_ie = 0x6a4 -Ukranian_je = 0x6a4 -Macedonia_dse = 0x6a5 -Ukrainian_i = 0x6a6 -Ukranian_i = 0x6a6 -Ukrainian_yi = 0x6a7 -Ukranian_yi = 0x6a7 -Cyrillic_je = 0x6a8 -Serbian_je = 0x6a8 -Cyrillic_lje = 0x6a9 -Serbian_lje = 0x6a9 -Cyrillic_nje = 0x6aa -Serbian_nje = 0x6aa -Serbian_tshe = 0x6ab -Macedonia_kje = 0x6ac -Ukrainian_ghe_with_upturn = 0x6ad -Byelorussian_shortu = 0x6ae -Cyrillic_dzhe = 0x6af -Serbian_dze = 0x6af -numerosign = 0x6b0 -Serbian_DJE = 0x6b1 -Macedonia_GJE = 0x6b2 -Cyrillic_IO = 0x6b3 -Ukrainian_IE = 0x6b4 -Ukranian_JE = 0x6b4 -Macedonia_DSE = 0x6b5 -Ukrainian_I = 0x6b6 -Ukranian_I = 0x6b6 -Ukrainian_YI = 0x6b7 -Ukranian_YI = 0x6b7 -Cyrillic_JE = 0x6b8 -Serbian_JE = 0x6b8 -Cyrillic_LJE = 0x6b9 -Serbian_LJE = 0x6b9 -Cyrillic_NJE = 0x6ba -Serbian_NJE = 0x6ba -Serbian_TSHE = 0x6bb -Macedonia_KJE = 0x6bc -Ukrainian_GHE_WITH_UPTURN = 0x6bd -Byelorussian_SHORTU = 0x6be -Cyrillic_DZHE = 0x6bf -Serbian_DZE = 0x6bf -Cyrillic_yu = 0x6c0 -Cyrillic_a = 0x6c1 -Cyrillic_be = 0x6c2 -Cyrillic_tse = 0x6c3 -Cyrillic_de = 0x6c4 -Cyrillic_ie = 0x6c5 -Cyrillic_ef = 0x6c6 -Cyrillic_ghe = 0x6c7 -Cyrillic_ha = 0x6c8 -Cyrillic_i = 0x6c9 -Cyrillic_shorti = 0x6ca -Cyrillic_ka = 0x6cb -Cyrillic_el = 0x6cc -Cyrillic_em = 0x6cd -Cyrillic_en = 0x6ce -Cyrillic_o = 0x6cf -Cyrillic_pe = 0x6d0 -Cyrillic_ya = 0x6d1 -Cyrillic_er = 0x6d2 -Cyrillic_es = 0x6d3 -Cyrillic_te = 0x6d4 -Cyrillic_u = 0x6d5 -Cyrillic_zhe = 0x6d6 -Cyrillic_ve = 0x6d7 -Cyrillic_softsign = 0x6d8 -Cyrillic_yeru = 0x6d9 -Cyrillic_ze = 0x6da -Cyrillic_sha = 0x6db -Cyrillic_e = 0x6dc -Cyrillic_shcha = 0x6dd -Cyrillic_che = 0x6de -Cyrillic_hardsign = 0x6df -Cyrillic_YU = 0x6e0 -Cyrillic_A = 0x6e1 -Cyrillic_BE = 0x6e2 -Cyrillic_TSE = 0x6e3 -Cyrillic_DE = 0x6e4 -Cyrillic_IE = 0x6e5 -Cyrillic_EF = 0x6e6 -Cyrillic_GHE = 0x6e7 -Cyrillic_HA = 0x6e8 -Cyrillic_I = 0x6e9 -Cyrillic_SHORTI = 0x6ea -Cyrillic_KA = 0x6eb -Cyrillic_EL = 0x6ec -Cyrillic_EM = 0x6ed -Cyrillic_EN = 0x6ee -Cyrillic_O = 0x6ef -Cyrillic_PE = 0x6f0 -Cyrillic_YA = 0x6f1 -Cyrillic_ER = 0x6f2 -Cyrillic_ES = 0x6f3 -Cyrillic_TE = 0x6f4 -Cyrillic_U = 0x6f5 -Cyrillic_ZHE = 0x6f6 -Cyrillic_VE = 0x6f7 -Cyrillic_SOFTSIGN = 0x6f8 -Cyrillic_YERU = 0x6f9 -Cyrillic_ZE = 0x6fa -Cyrillic_SHA = 0x6fb -Cyrillic_E = 0x6fc -Cyrillic_SHCHA = 0x6fd -Cyrillic_CHE = 0x6fe -Cyrillic_HARDSIGN = 0x6ff -Greek_ALPHAaccent = 0x7a1 -Greek_EPSILONaccent = 0x7a2 -Greek_ETAaccent = 0x7a3 -Greek_IOTAaccent = 0x7a4 -Greek_IOTAdiaeresis = 0x7a5 -Greek_OMICRONaccent = 0x7a7 -Greek_UPSILONaccent = 0x7a8 -Greek_UPSILONdieresis = 0x7a9 -Greek_OMEGAaccent = 0x7ab -Greek_accentdieresis = 0x7ae -Greek_horizbar = 0x7af -Greek_alphaaccent = 0x7b1 -Greek_epsilonaccent = 0x7b2 -Greek_etaaccent = 0x7b3 -Greek_iotaaccent = 0x7b4 -Greek_iotadieresis = 0x7b5 -Greek_iotaaccentdieresis = 0x7b6 -Greek_omicronaccent = 0x7b7 -Greek_upsilonaccent = 0x7b8 -Greek_upsilondieresis = 0x7b9 -Greek_upsilonaccentdieresis = 0x7ba -Greek_omegaaccent = 0x7bb -Greek_ALPHA = 0x7c1 -Greek_BETA = 0x7c2 -Greek_GAMMA = 0x7c3 -Greek_DELTA = 0x7c4 -Greek_EPSILON = 0x7c5 -Greek_ZETA = 0x7c6 -Greek_ETA = 0x7c7 -Greek_THETA = 0x7c8 -Greek_IOTA = 0x7c9 -Greek_KAPPA = 0x7ca -Greek_LAMDA = 0x7cb -Greek_LAMBDA = 0x7cb -Greek_MU = 0x7cc -Greek_NU = 0x7cd -Greek_XI = 0x7ce -Greek_OMICRON = 0x7cf -Greek_PI = 0x7d0 -Greek_RHO = 0x7d1 -Greek_SIGMA = 0x7d2 -Greek_TAU = 0x7d4 -Greek_UPSILON = 0x7d5 -Greek_PHI = 0x7d6 -Greek_CHI = 0x7d7 -Greek_PSI = 0x7d8 -Greek_OMEGA = 0x7d9 -Greek_alpha = 0x7e1 -Greek_beta = 0x7e2 -Greek_gamma = 0x7e3 -Greek_delta = 0x7e4 -Greek_epsilon = 0x7e5 -Greek_zeta = 0x7e6 -Greek_eta = 0x7e7 -Greek_theta = 0x7e8 -Greek_iota = 0x7e9 -Greek_kappa = 0x7ea -Greek_lamda = 0x7eb -Greek_lambda = 0x7eb -Greek_mu = 0x7ec -Greek_nu = 0x7ed -Greek_xi = 0x7ee -Greek_omicron = 0x7ef -Greek_pi = 0x7f0 -Greek_rho = 0x7f1 -Greek_sigma = 0x7f2 -Greek_finalsmallsigma = 0x7f3 -Greek_tau = 0x7f4 -Greek_upsilon = 0x7f5 -Greek_phi = 0x7f6 -Greek_chi = 0x7f7 -Greek_psi = 0x7f8 -Greek_omega = 0x7f9 -Greek_switch = 0xFF7E -leftradical = 0x8a1 -topleftradical = 0x8a2 -horizconnector = 0x8a3 -topintegral = 0x8a4 -botintegral = 0x8a5 -vertconnector = 0x8a6 -topleftsqbracket = 0x8a7 -botleftsqbracket = 0x8a8 -toprightsqbracket = 0x8a9 -botrightsqbracket = 0x8aa -topleftparens = 0x8ab -botleftparens = 0x8ac -toprightparens = 0x8ad -botrightparens = 0x8ae -leftmiddlecurlybrace = 0x8af -rightmiddlecurlybrace = 0x8b0 -topleftsummation = 0x8b1 -botleftsummation = 0x8b2 -topvertsummationconnector = 0x8b3 -botvertsummationconnector = 0x8b4 -toprightsummation = 0x8b5 -botrightsummation = 0x8b6 -rightmiddlesummation = 0x8b7 -lessthanequal = 0x8bc -notequal = 0x8bd -greaterthanequal = 0x8be -integral = 0x8bf -therefore = 0x8c0 -variation = 0x8c1 -infinity = 0x8c2 -nabla = 0x8c5 -approximate = 0x8c8 -similarequal = 0x8c9 -ifonlyif = 0x8cd -implies = 0x8ce -identical = 0x8cf -radical = 0x8d6 -includedin = 0x8da -includes = 0x8db -intersection = 0x8dc -union = 0x8dd -logicaland = 0x8de -logicalor = 0x8df -partialderivative = 0x8ef -function = 0x8f6 -leftarrow = 0x8fb -uparrow = 0x8fc -rightarrow = 0x8fd -downarrow = 0x8fe -blank = 0x9df -soliddiamond = 0x9e0 -checkerboard = 0x9e1 -ht = 0x9e2 -ff = 0x9e3 -cr = 0x9e4 -lf = 0x9e5 -nl = 0x9e8 -vt = 0x9e9 -lowrightcorner = 0x9ea -uprightcorner = 0x9eb -upleftcorner = 0x9ec -lowleftcorner = 0x9ed -crossinglines = 0x9ee -horizlinescan1 = 0x9ef -horizlinescan3 = 0x9f0 -horizlinescan5 = 0x9f1 -horizlinescan7 = 0x9f2 -horizlinescan9 = 0x9f3 -leftt = 0x9f4 -rightt = 0x9f5 -bott = 0x9f6 -topt = 0x9f7 -vertbar = 0x9f8 -emspace = 0xaa1 -enspace = 0xaa2 -em3space = 0xaa3 -em4space = 0xaa4 -digitspace = 0xaa5 -punctspace = 0xaa6 -thinspace = 0xaa7 -hairspace = 0xaa8 -emdash = 0xaa9 -endash = 0xaaa -signifblank = 0xaac -ellipsis = 0xaae -doubbaselinedot = 0xaaf -onethird = 0xab0 -twothirds = 0xab1 -onefifth = 0xab2 -twofifths = 0xab3 -threefifths = 0xab4 -fourfifths = 0xab5 -onesixth = 0xab6 -fivesixths = 0xab7 -careof = 0xab8 -figdash = 0xabb -leftanglebracket = 0xabc -decimalpoint = 0xabd -rightanglebracket = 0xabe -marker = 0xabf -oneeighth = 0xac3 -threeeighths = 0xac4 -fiveeighths = 0xac5 -seveneighths = 0xac6 -trademark = 0xac9 -signaturemark = 0xaca -trademarkincircle = 0xacb -leftopentriangle = 0xacc -rightopentriangle = 0xacd -emopencircle = 0xace -emopenrectangle = 0xacf -leftsinglequotemark = 0xad0 -rightsinglequotemark = 0xad1 -leftdoublequotemark = 0xad2 -rightdoublequotemark = 0xad3 -prescription = 0xad4 -minutes = 0xad6 -seconds = 0xad7 -latincross = 0xad9 -hexagram = 0xada -filledrectbullet = 0xadb -filledlefttribullet = 0xadc -filledrighttribullet = 0xadd -emfilledcircle = 0xade -emfilledrect = 0xadf -enopencircbullet = 0xae0 -enopensquarebullet = 0xae1 -openrectbullet = 0xae2 -opentribulletup = 0xae3 -opentribulletdown = 0xae4 -openstar = 0xae5 -enfilledcircbullet = 0xae6 -enfilledsqbullet = 0xae7 -filledtribulletup = 0xae8 -filledtribulletdown = 0xae9 -leftpointer = 0xaea -rightpointer = 0xaeb -club = 0xaec -diamond = 0xaed -heart = 0xaee -maltesecross = 0xaf0 -dagger = 0xaf1 -doubledagger = 0xaf2 -checkmark = 0xaf3 -ballotcross = 0xaf4 -musicalsharp = 0xaf5 -musicalflat = 0xaf6 -malesymbol = 0xaf7 -femalesymbol = 0xaf8 -telephone = 0xaf9 -telephonerecorder = 0xafa -phonographcopyright = 0xafb -caret = 0xafc -singlelowquotemark = 0xafd -doublelowquotemark = 0xafe -cursor = 0xaff -leftcaret = 0xba3 -rightcaret = 0xba6 -downcaret = 0xba8 -upcaret = 0xba9 -overbar = 0xbc0 -downtack = 0xbc2 -upshoe = 0xbc3 -downstile = 0xbc4 -underbar = 0xbc6 -jot = 0xbca -quad = 0xbcc -uptack = 0xbce -circle = 0xbcf -upstile = 0xbd3 -downshoe = 0xbd6 -rightshoe = 0xbd8 -leftshoe = 0xbda -lefttack = 0xbdc -righttack = 0xbfc -hebrew_doublelowline = 0xcdf -hebrew_aleph = 0xce0 -hebrew_bet = 0xce1 -hebrew_beth = 0xce1 -hebrew_gimel = 0xce2 -hebrew_gimmel = 0xce2 -hebrew_dalet = 0xce3 -hebrew_daleth = 0xce3 -hebrew_he = 0xce4 -hebrew_waw = 0xce5 -hebrew_zain = 0xce6 -hebrew_zayin = 0xce6 -hebrew_chet = 0xce7 -hebrew_het = 0xce7 -hebrew_tet = 0xce8 -hebrew_teth = 0xce8 -hebrew_yod = 0xce9 -hebrew_finalkaph = 0xcea -hebrew_kaph = 0xceb -hebrew_lamed = 0xcec -hebrew_finalmem = 0xced -hebrew_mem = 0xcee -hebrew_finalnun = 0xcef -hebrew_nun = 0xcf0 -hebrew_samech = 0xcf1 -hebrew_samekh = 0xcf1 -hebrew_ayin = 0xcf2 -hebrew_finalpe = 0xcf3 -hebrew_pe = 0xcf4 -hebrew_finalzade = 0xcf5 -hebrew_finalzadi = 0xcf5 -hebrew_zade = 0xcf6 -hebrew_zadi = 0xcf6 -hebrew_qoph = 0xcf7 -hebrew_kuf = 0xcf7 -hebrew_resh = 0xcf8 -hebrew_shin = 0xcf9 -hebrew_taw = 0xcfa -hebrew_taf = 0xcfa -Hebrew_switch = 0xFF7E -Thai_kokai = 0xda1 -Thai_khokhai = 0xda2 -Thai_khokhuat = 0xda3 -Thai_khokhwai = 0xda4 -Thai_khokhon = 0xda5 -Thai_khorakhang = 0xda6 -Thai_ngongu = 0xda7 -Thai_chochan = 0xda8 -Thai_choching = 0xda9 -Thai_chochang = 0xdaa -Thai_soso = 0xdab -Thai_chochoe = 0xdac -Thai_yoying = 0xdad -Thai_dochada = 0xdae -Thai_topatak = 0xdaf -Thai_thothan = 0xdb0 -Thai_thonangmontho = 0xdb1 -Thai_thophuthao = 0xdb2 -Thai_nonen = 0xdb3 -Thai_dodek = 0xdb4 -Thai_totao = 0xdb5 -Thai_thothung = 0xdb6 -Thai_thothahan = 0xdb7 -Thai_thothong = 0xdb8 -Thai_nonu = 0xdb9 -Thai_bobaimai = 0xdba -Thai_popla = 0xdbb -Thai_phophung = 0xdbc -Thai_fofa = 0xdbd -Thai_phophan = 0xdbe -Thai_fofan = 0xdbf -Thai_phosamphao = 0xdc0 -Thai_moma = 0xdc1 -Thai_yoyak = 0xdc2 -Thai_rorua = 0xdc3 -Thai_ru = 0xdc4 -Thai_loling = 0xdc5 -Thai_lu = 0xdc6 -Thai_wowaen = 0xdc7 -Thai_sosala = 0xdc8 -Thai_sorusi = 0xdc9 -Thai_sosua = 0xdca -Thai_hohip = 0xdcb -Thai_lochula = 0xdcc -Thai_oang = 0xdcd -Thai_honokhuk = 0xdce -Thai_paiyannoi = 0xdcf -Thai_saraa = 0xdd0 -Thai_maihanakat = 0xdd1 -Thai_saraaa = 0xdd2 -Thai_saraam = 0xdd3 -Thai_sarai = 0xdd4 -Thai_saraii = 0xdd5 -Thai_saraue = 0xdd6 -Thai_sarauee = 0xdd7 -Thai_sarau = 0xdd8 -Thai_sarauu = 0xdd9 -Thai_phinthu = 0xdda -Thai_maihanakat_maitho = 0xdde -Thai_baht = 0xddf -Thai_sarae = 0xde0 -Thai_saraae = 0xde1 -Thai_sarao = 0xde2 -Thai_saraaimaimuan = 0xde3 -Thai_saraaimaimalai = 0xde4 -Thai_lakkhangyao = 0xde5 -Thai_maiyamok = 0xde6 -Thai_maitaikhu = 0xde7 -Thai_maiek = 0xde8 -Thai_maitho = 0xde9 -Thai_maitri = 0xdea -Thai_maichattawa = 0xdeb -Thai_thanthakhat = 0xdec -Thai_nikhahit = 0xded -Thai_leksun = 0xdf0 -Thai_leknung = 0xdf1 -Thai_leksong = 0xdf2 -Thai_leksam = 0xdf3 -Thai_leksi = 0xdf4 -Thai_lekha = 0xdf5 -Thai_lekhok = 0xdf6 -Thai_lekchet = 0xdf7 -Thai_lekpaet = 0xdf8 -Thai_lekkao = 0xdf9 -Hangul = 0xff31 -Hangul_Start = 0xff32 -Hangul_End = 0xff33 -Hangul_Hanja = 0xff34 -Hangul_Jamo = 0xff35 -Hangul_Romaja = 0xff36 -Hangul_Codeinput = 0xff37 -Hangul_Jeonja = 0xff38 -Hangul_Banja = 0xff39 -Hangul_PreHanja = 0xff3a -Hangul_PostHanja = 0xff3b -Hangul_SingleCandidate = 0xff3c -Hangul_MultipleCandidate = 0xff3d -Hangul_PreviousCandidate = 0xff3e -Hangul_Special = 0xff3f -Hangul_switch = 0xFF7E -Hangul_Kiyeog = 0xea1 -Hangul_SsangKiyeog = 0xea2 -Hangul_KiyeogSios = 0xea3 -Hangul_Nieun = 0xea4 -Hangul_NieunJieuj = 0xea5 -Hangul_NieunHieuh = 0xea6 -Hangul_Dikeud = 0xea7 -Hangul_SsangDikeud = 0xea8 -Hangul_Rieul = 0xea9 -Hangul_RieulKiyeog = 0xeaa -Hangul_RieulMieum = 0xeab -Hangul_RieulPieub = 0xeac -Hangul_RieulSios = 0xead -Hangul_RieulTieut = 0xeae -Hangul_RieulPhieuf = 0xeaf -Hangul_RieulHieuh = 0xeb0 -Hangul_Mieum = 0xeb1 -Hangul_Pieub = 0xeb2 -Hangul_SsangPieub = 0xeb3 -Hangul_PieubSios = 0xeb4 -Hangul_Sios = 0xeb5 -Hangul_SsangSios = 0xeb6 -Hangul_Ieung = 0xeb7 -Hangul_Jieuj = 0xeb8 -Hangul_SsangJieuj = 0xeb9 -Hangul_Cieuc = 0xeba -Hangul_Khieuq = 0xebb -Hangul_Tieut = 0xebc -Hangul_Phieuf = 0xebd -Hangul_Hieuh = 0xebe -Hangul_A = 0xebf -Hangul_AE = 0xec0 -Hangul_YA = 0xec1 -Hangul_YAE = 0xec2 -Hangul_EO = 0xec3 -Hangul_E = 0xec4 -Hangul_YEO = 0xec5 -Hangul_YE = 0xec6 -Hangul_O = 0xec7 -Hangul_WA = 0xec8 -Hangul_WAE = 0xec9 -Hangul_OE = 0xeca -Hangul_YO = 0xecb -Hangul_U = 0xecc -Hangul_WEO = 0xecd -Hangul_WE = 0xece -Hangul_WI = 0xecf -Hangul_YU = 0xed0 -Hangul_EU = 0xed1 -Hangul_YI = 0xed2 -Hangul_I = 0xed3 -Hangul_J_Kiyeog = 0xed4 -Hangul_J_SsangKiyeog = 0xed5 -Hangul_J_KiyeogSios = 0xed6 -Hangul_J_Nieun = 0xed7 -Hangul_J_NieunJieuj = 0xed8 -Hangul_J_NieunHieuh = 0xed9 -Hangul_J_Dikeud = 0xeda -Hangul_J_Rieul = 0xedb -Hangul_J_RieulKiyeog = 0xedc -Hangul_J_RieulMieum = 0xedd -Hangul_J_RieulPieub = 0xede -Hangul_J_RieulSios = 0xedf -Hangul_J_RieulTieut = 0xee0 -Hangul_J_RieulPhieuf = 0xee1 -Hangul_J_RieulHieuh = 0xee2 -Hangul_J_Mieum = 0xee3 -Hangul_J_Pieub = 0xee4 -Hangul_J_PieubSios = 0xee5 -Hangul_J_Sios = 0xee6 -Hangul_J_SsangSios = 0xee7 -Hangul_J_Ieung = 0xee8 -Hangul_J_Jieuj = 0xee9 -Hangul_J_Cieuc = 0xeea -Hangul_J_Khieuq = 0xeeb -Hangul_J_Tieut = 0xeec -Hangul_J_Phieuf = 0xeed -Hangul_J_Hieuh = 0xeee -Hangul_RieulYeorinHieuh = 0xeef -Hangul_SunkyeongeumMieum = 0xef0 -Hangul_SunkyeongeumPieub = 0xef1 -Hangul_PanSios = 0xef2 -Hangul_KkogjiDalrinIeung = 0xef3 -Hangul_SunkyeongeumPhieuf = 0xef4 -Hangul_YeorinHieuh = 0xef5 -Hangul_AraeA = 0xef6 -Hangul_AraeAE = 0xef7 -Hangul_J_PanSios = 0xef8 -Hangul_J_KkogjiDalrinIeung = 0xef9 -Hangul_J_YeorinHieuh = 0xefa -Korean_Won = 0xeff -Armenian_eternity = 0x14a1 -Armenian_section_sign = 0x14a2 -Armenian_full_stop = 0x14a3 -Armenian_verjaket = 0x14a3 -Armenian_parenright = 0x14a4 -Armenian_parenleft = 0x14a5 -Armenian_guillemotright = 0x14a6 -Armenian_guillemotleft = 0x14a7 -Armenian_em_dash = 0x14a8 -Armenian_dot = 0x14a9 -Armenian_mijaket = 0x14a9 -Armenian_separation_mark = 0x14aa -Armenian_but = 0x14aa -Armenian_comma = 0x14ab -Armenian_en_dash = 0x14ac -Armenian_hyphen = 0x14ad -Armenian_yentamna = 0x14ad -Armenian_ellipsis = 0x14ae -Armenian_exclam = 0x14af -Armenian_amanak = 0x14af -Armenian_accent = 0x14b0 -Armenian_shesht = 0x14b0 -Armenian_question = 0x14b1 -Armenian_paruyk = 0x14b1 -Armenian_AYB = 0x14b2 -Armenian_ayb = 0x14b3 -Armenian_BEN = 0x14b4 -Armenian_ben = 0x14b5 -Armenian_GIM = 0x14b6 -Armenian_gim = 0x14b7 -Armenian_DA = 0x14b8 -Armenian_da = 0x14b9 -Armenian_YECH = 0x14ba -Armenian_yech = 0x14bb -Armenian_ZA = 0x14bc -Armenian_za = 0x14bd -Armenian_E = 0x14be -Armenian_e = 0x14bf -Armenian_AT = 0x14c0 -Armenian_at = 0x14c1 -Armenian_TO = 0x14c2 -Armenian_to = 0x14c3 -Armenian_ZHE = 0x14c4 -Armenian_zhe = 0x14c5 -Armenian_INI = 0x14c6 -Armenian_ini = 0x14c7 -Armenian_LYUN = 0x14c8 -Armenian_lyun = 0x14c9 -Armenian_KHE = 0x14ca -Armenian_khe = 0x14cb -Armenian_TSA = 0x14cc -Armenian_tsa = 0x14cd -Armenian_KEN = 0x14ce -Armenian_ken = 0x14cf -Armenian_HO = 0x14d0 -Armenian_ho = 0x14d1 -Armenian_DZA = 0x14d2 -Armenian_dza = 0x14d3 -Armenian_GHAT = 0x14d4 -Armenian_ghat = 0x14d5 -Armenian_TCHE = 0x14d6 -Armenian_tche = 0x14d7 -Armenian_MEN = 0x14d8 -Armenian_men = 0x14d9 -Armenian_HI = 0x14da -Armenian_hi = 0x14db -Armenian_NU = 0x14dc -Armenian_nu = 0x14dd -Armenian_SHA = 0x14de -Armenian_sha = 0x14df -Armenian_VO = 0x14e0 -Armenian_vo = 0x14e1 -Armenian_CHA = 0x14e2 -Armenian_cha = 0x14e3 -Armenian_PE = 0x14e4 -Armenian_pe = 0x14e5 -Armenian_JE = 0x14e6 -Armenian_je = 0x14e7 -Armenian_RA = 0x14e8 -Armenian_ra = 0x14e9 -Armenian_SE = 0x14ea -Armenian_se = 0x14eb -Armenian_VEV = 0x14ec -Armenian_vev = 0x14ed -Armenian_TYUN = 0x14ee -Armenian_tyun = 0x14ef -Armenian_RE = 0x14f0 -Armenian_re = 0x14f1 -Armenian_TSO = 0x14f2 -Armenian_tso = 0x14f3 -Armenian_VYUN = 0x14f4 -Armenian_vyun = 0x14f5 -Armenian_PYUR = 0x14f6 -Armenian_pyur = 0x14f7 -Armenian_KE = 0x14f8 -Armenian_ke = 0x14f9 -Armenian_O = 0x14fa -Armenian_o = 0x14fb -Armenian_FE = 0x14fc -Armenian_fe = 0x14fd -Armenian_apostrophe = 0x14fe -Armenian_ligature_ew = 0x14ff -Georgian_an = 0x15d0 -Georgian_ban = 0x15d1 -Georgian_gan = 0x15d2 -Georgian_don = 0x15d3 -Georgian_en = 0x15d4 -Georgian_vin = 0x15d5 -Georgian_zen = 0x15d6 -Georgian_tan = 0x15d7 -Georgian_in = 0x15d8 -Georgian_kan = 0x15d9 -Georgian_las = 0x15da -Georgian_man = 0x15db -Georgian_nar = 0x15dc -Georgian_on = 0x15dd -Georgian_par = 0x15de -Georgian_zhar = 0x15df -Georgian_rae = 0x15e0 -Georgian_san = 0x15e1 -Georgian_tar = 0x15e2 -Georgian_un = 0x15e3 -Georgian_phar = 0x15e4 -Georgian_khar = 0x15e5 -Georgian_ghan = 0x15e6 -Georgian_qar = 0x15e7 -Georgian_shin = 0x15e8 -Georgian_chin = 0x15e9 -Georgian_can = 0x15ea -Georgian_jil = 0x15eb -Georgian_cil = 0x15ec -Georgian_char = 0x15ed -Georgian_xan = 0x15ee -Georgian_jhan = 0x15ef -Georgian_hae = 0x15f0 -Georgian_he = 0x15f1 -Georgian_hie = 0x15f2 -Georgian_we = 0x15f3 -Georgian_har = 0x15f4 -Georgian_hoe = 0x15f5 -Georgian_fi = 0x15f6 -EcuSign = 0x20a0 -ColonSign = 0x20a1 -CruzeiroSign = 0x20a2 -FFrancSign = 0x20a3 -LiraSign = 0x20a4 -MillSign = 0x20a5 -NairaSign = 0x20a6 -PesetaSign = 0x20a7 -RupeeSign = 0x20a8 -WonSign = 0x20a9 -NewSheqelSign = 0x20aa -DongSign = 0x20ab -EuroSign = 0x20ac diff --git a/gtk/libglade.defs b/gtk/libglade.defs deleted file mode 100644 index c7bb0789..00000000 --- a/gtk/libglade.defs +++ /dev/null @@ -1,196 +0,0 @@ -;; -*- scheme -*- -; object definitions ... -(define-object XML - (in-module "Glade") - (parent "GObject") - (c-name "GladeXML") - (gtype-id "GLADE_TYPE_XML") -) - -;; Enumerations and flags ... - - -;; From /opt/gtk2/include/glade-2.0/glade/glade-init.h - -(define-function require - (c-name "glade_require") - (return-type "none") - (parameters - '("const-gchar*" "library") - ) -) - -(define-function provide - (c-name "glade_provide") - (return-type "none") - (parameters - '("const-gchar*" "library") - ) -) - - - -;; From /opt/gtk2/include/glade-2.0/glade/glade-xml.h - -(define-function glade_xml_get_type - (c-name "glade_xml_get_type") - (return-type "GType") -) - -(define-function glade_xml_new - (c-name "glade_xml_new") - (is-constructor-of "GladeXML") - (return-type "GladeXML*") - (parameters - '("const-char*" "fname") - '("const-char*" "root" (null-ok) (default "NULL")) - '("const-char*" "domain" (null-ok) (default "NULL")) - ) -) - -(define-function xml_new_from_buffer - (c-name "glade_xml_new_from_buffer") - (return-type "GladeXML*") - (parameters - '("const-char*" "buffer") - '("int" "size") - '("const-char*" "root" (null-ok) (default "NULL")) - '("const-char*" "domain" (null-ok) (default "NULL")) - ) -) - -(define-method construct - (of-object "GladeXML") - (c-name "glade_xml_construct") - (return-type "gboolean") - (parameters - '("const-char*" "fname") - '("const-char*" "root" (null-ok) (default "NULL")) - '("const-char*" "domain" (null-ok) (default "NULL")) - ) -) - -(define-method signal_connect - (of-object "GladeXML") - (c-name "glade_xml_signal_connect") - (return-type "none") - (parameters - '("const-char*" "handlername") - '("GtkSignalFunc" "func") - ) -) - -(define-method signal_connect_data - (of-object "GladeXML") - (c-name "glade_xml_signal_connect_data") - (return-type "none") - (parameters - '("const-char*" "handlername") - '("GtkSignalFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-method signal_autoconnect - (of-object "GladeXML") - (c-name "glade_xml_signal_autoconnect") - (return-type "none") -) - -(define-method signal_connect_full - (of-object "GladeXML") - (c-name "glade_xml_signal_connect_full") - (return-type "none") - (parameters - '("const-gchar*" "handler_name") - '("GladeXMLConnectFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-method signal_autoconnect_full - (of-object "GladeXML") - (c-name "glade_xml_signal_autoconnect_full") - (return-type "none") - (parameters - '("GladeXMLConnectFunc" "func") - '("gpointer" "user_data") - ) -) - -(define-method get_widget - (of-object "GladeXML") - (c-name "glade_xml_get_widget") - (return-type "GtkWidget*") - (parameters - '("const-char*" "name") - ) -) - -(define-method get_widget_prefix - (of-object "GladeXML") - (c-name "glade_xml_get_widget_prefix") - (return-type "GList*") - (parameters - '("const-char*" "name") - ) -) - -(define-method relative_file - (of-object "GladeXML") - (c-name "glade_xml_relative_file") - (return-type "gchar*") - (parameters - '("const-gchar*" "filename") - ) -) - -(define-function get_widget_name - (c-name "glade_get_widget_name") - (return-type "const-char*") - (parameters - '("GtkWidget*" "widget") - ) -) - -(define-function get_widget_tree - (c-name "glade_get_widget_tree") - (return-type "GladeXML*") - (parameters - '("GtkWidget*" "widget") - ) -) - -(define-function set_custom_handler - (c-name "glade_set_custom_handler") - (return-type "none") - (parameters - '("GladeXMLCustomWidgetHandler" "handler") - '("gpointer" "user_data") - ) -) - - -;; pylibglade2 extras - -(define-function bindtextdomain - (c-name "glade_bindtextdomain") - (return-type "char*") - (parameters - '("const-char*" "domainname") - '("const-char*" "dirname" (null-ok) (default "NULL")) - ) -) - -(define-function textdomain - (c-name "glade_textdomain") - (return-type "char*") - (parameters - '("const-char*" "domainname") - ) -) - -(define-function set_custom_widget_callbacks - (c-name "glade_set_custom_widget_callbacks") - (return-type "none") -) diff --git a/gtk/libglade.override b/gtk/libglade.override deleted file mode 100644 index 45ddb7b6..00000000 --- a/gtk/libglade.override +++ /dev/null @@ -1,549 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * libglade.override: overrides for the gtk.glade module. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -headers -#define NO_IMPORT_PYGOBJECT -#include -#include -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif -#include - -#include - -typedef struct { - GladeXML parent; - PyObject *typedict; -} PyGladeXML; - -typedef struct { - GladeXMLClass parent_class; -} PyGladeXMLClass; - -static void pyglade_xml_init (PyGladeXML *self); -static void pyglade_xml_class_init (PyGladeXMLClass *class); -static GType pyglade_xml_get_type (void); -static GType pyglade_xml_lookup_type (GladeXML*self, const char *gtypename); - -#define PYGLADE_TYPE_XML (pyglade_xml_get_type()) -#define PYGLADE_XML(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), PYGLADE_TYPE_XML, PyGladeXML)) -#define PYGLADE_XML_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), PYGLADE_TYPE_XML, PyGladeXMLClass)) -#define PYGLADE_IS_XML(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), PYGLADE_TYPE_XML)) -#define PYGLADE_IS_XML_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), PYGLADE_TYPE_XML)) -#define PYGLADE_XML_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PYGLADE_TYPE_XML, PygladeXMLClass)) - -static GType -pyglade_xml_get_type (void) -{ - static GType xml_type = 0; - - if (!xml_type) { - static const GTypeInfo xml_info = { - sizeof(PyGladeXMLClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) pyglade_xml_class_init, - (GClassFinalizeFunc) NULL, - NULL, - - sizeof (PyGladeXML), - 0, /* n_preallocs */ - (GInstanceInitFunc) pyglade_xml_init, - }; - - xml_type = g_type_register_static(GLADE_TYPE_XML, "PyGladeXML", - &xml_info, 0); - } - return xml_type; - -} - -static void -pyglade_xml_init (PyGladeXML *self) -{ - self->typedict = PyDict_New(); -} - -static void -pyglade_xml_class_init (PyGladeXMLClass *class) -{ - GladeXMLClass *xml_class = (GladeXMLClass*)class; - xml_class->lookup_type = pyglade_xml_lookup_type; -} - -static GType -pyglade_xml_lookup_type(GladeXML *glade, const char *gtypename) -{ - PyGladeXML *self; - PyObject *item; - - g_return_val_if_fail (PYGLADE_IS_XML (glade), G_TYPE_INVALID); - - self = PYGLADE_XML(glade); - if (self->typedict) { - item = PyMapping_GetItemString(self->typedict, (char *) gtypename); - if (!item) { - PyErr_Clear(); - item = NULL; - } - } else - item = NULL; - - if (item != NULL) { - GType type; - - if ((type = pyg_type_from_object(item)) == 0) - type = G_TYPE_INVALID; - - Py_DECREF(item); - return type; - } - - return g_type_from_name(gtypename); -} - -static PyGladeXML * -pyglade_xml_new (char * fname, char * root, char *domain, PyObject *dict) -{ - PyGladeXML *self = g_object_new(PYGLADE_TYPE_XML, NULL); - - /* This must be done before, since it's used inside of - * glade_xml_construct - */ - self->typedict = dict; - if (!glade_xml_construct(GLADE_XML(self), fname, root, domain)) { - g_object_unref(self); - return NULL; - } - /* the reference is borrowed, and we don't need anymore */ - self->typedict = NULL; - - return self; -} - -%% -modulename glade -%% -import gobject.GObject as PyGObject_Type -import gtk.Widget as PyGtkWidget_Type -%% -ignore-glob *_get_type -%% -ignore - glade_init - glade_provide - glade_require - glade_xml_construct - glade_xml_signal_connect_data - glade_xml_signal_connect_full - glade_xml_signal_autoconnect_full -%% -override glade_xml_signal_connect -static void -connect_one(const gchar *handler_name, GObject *obj, - const gchar *signal_name, const gchar *signal_data, - GObject *connect_object, gboolean after, gpointer user_data) -{ - GClosure *closure = NULL; - PyObject *callback = PyTuple_GetItem((PyObject *)user_data, 0); - PyObject *extra = PyTuple_GetItem((PyObject *)user_data, 1); - PyObject *self; - - if (connect_object) { - PyObject *other; - - other = pygobject_new(connect_object); - closure = pyg_closure_new(callback, extra, other); - } else { - closure = pyg_closure_new(callback, extra, NULL); - } - - self = pygobject_new(obj); - g_signal_connect_closure(obj, signal_name, closure, after); - pygobject_watch_closure(self, closure); - Py_DECREF(self); -} - -static PyObject * -_wrap_glade_xml_signal_connect(PyGObject *self, PyObject *args) -{ - guint len; - PyObject *first, *callback, *extra_args = NULL, *data; - gchar *handler_name; - - len = PyTuple_Size(args); - if (len < 2) { - PyErr_SetString(PyExc_TypeError, - "GladeXML.signal_connect requires at least 2 arguments"); - return NULL; - } - first = PySequence_GetSlice(args, 0, 2); - if (!PyArg_ParseTuple(first, "sO:GladeXML.signal_connect", &handler_name, - &callback)) { - Py_DECREF(first); - return NULL; - } - Py_DECREF(first); - if (!PyCallable_Check(callback)) { - PyErr_SetString(PyExc_TypeError, "second argument must be callable"); - return NULL; - } - extra_args = PySequence_GetSlice(args, 2, len); - if (extra_args == NULL) - return NULL; - data = Py_BuildValue("(ON)", callback, extra_args); - glade_xml_signal_connect_full(GLADE_XML(self->obj), handler_name, - connect_one, data); - Py_DECREF(data); - Py_INCREF(Py_None); - return Py_None; -} -%% -override glade_xml_signal_autoconnect kwargs -static void -connect_many(const gchar *handler_name, GObject *obj, - const gchar *signal_name, const gchar *signal_data, - GObject *connect_object, gboolean after, gpointer user_data) -{ - PyObject *handler_dict = user_data; - PyObject *tuple, *self; - GClosure *closure = NULL; - - tuple = PyMapping_GetItemString(handler_dict, (gchar *)handler_name); - if (!tuple) { - PyErr_Clear(); - tuple = PyObject_GetAttrString(handler_dict, (gchar *)handler_name); - if (!tuple) { - PyErr_Clear(); - return; - } - } - - if (PyTuple_Check(tuple)) { - PyObject *callback = PyTuple_GetItem(tuple, 0); - PyObject *extra = PySequence_GetSlice(tuple, 1, PyTuple_Size(tuple)); - PyObject *other = NULL; - - if (connect_object) - other = pygobject_new((GObject *)connect_object); - - closure = pyg_closure_new(callback, extra, other); - Py_DECREF(extra); - } else if (PyCallable_Check(tuple)) { - PyObject *other = NULL; - - if (connect_object) - other = pygobject_new((GObject *)connect_object); - - closure = pyg_closure_new(tuple, NULL, other); - } else { - g_warning("handler for `%s' not callable or a tuple", handler_name); - Py_DECREF(tuple); - return; - } - Py_DECREF(tuple); - self = pygobject_new(obj); - g_signal_connect_closure(obj, signal_name, closure, after); - pygobject_watch_closure(self, closure); - Py_DECREF(self); -} - -static PyObject * -_wrap_glade_xml_signal_autoconnect(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "dict", NULL }; - PyObject *object; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GladeXML.signal_autoconnect", kwlist, - &object)) - return NULL; - - glade_xml_signal_autoconnect_full(GLADE_XML(self->obj), - connect_many, - object); - Py_INCREF(Py_None); - return Py_None; -} -%% -override glade_xml_get_widget_prefix kwargs -static PyObject * -_wrap_glade_xml_get_widget_prefix(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "name", NULL }; - char *name; - GList *ret, *tmp; - PyObject *py_ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s:GladeXML.get_widget_prefix", kwlist, - &name)) - return NULL; - ret = glade_xml_get_widget_prefix(GLADE_XML(self->obj), name); - py_ret = PyList_New(0); - for (tmp = ret; tmp != NULL; tmp = tmp->next) { - GtkWidget *widget = tmp->data; - PyObject *py_widget = pygobject_new((GObject *)widget); - - if (!py_widget) { - g_list_free(ret); - Py_DECREF(py_ret); - return NULL; - } - PyList_Append(py_ret, py_widget); - Py_DECREF(py_widget); - } - g_list_free(ret); - return py_ret; -} -%% -override glade_bindtextdomain kwargs -static PyObject * -_wrap_glade_bindtextdomain(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "domainname", "dirname", NULL }; - char *domainname, *dirname = NULL, *ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s|s:glade.bindtextdomain", kwlist, - &domainname, &dirname)) - return NULL; - ret = bindtextdomain(domainname, dirname); - if (!ret) { - PyErr_SetString(PyExc_MemoryError, "Not enough memory available."); - return NULL; - } -#ifdef HAVE_BIND_TEXTDOMAIN_CODESET - bind_textdomain_codeset(domainname, "UTF-8"); -#endif - return PyString_FromString(ret); -} -%% -override glade_textdomain kwargs -static PyObject * -_wrap_glade_textdomain(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "domainname", NULL }; - char *domainname = NULL, *ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|s:glade.textdomain", kwlist, - &domainname)) - return NULL; - ret = textdomain(domainname); - if (!ret) { - PyErr_SetString(PyExc_MemoryError, "Not enough memory available."); - return NULL; - } - return PyString_FromString(ret); -} -%% -override glade_set_custom_handler - -/* stores the handler set by set_custom_handler */ -static PyObject *pyglade_handler = NULL; -static PyObject *pyglade_user_data = NULL; - -static GtkWidget * -pyglade_custom_widget_handler(GladeXML *xml, - gchar *func_name, - gchar *name, - gchar *string1, - gchar *string2, - gint int1, - gint int2, - gpointer user_data) -{ - PyObject *firstargs, *args; - PyObject *widget; - GtkWidget *ret; - - g_return_val_if_fail(pyglade_handler != NULL, NULL); - g_return_val_if_fail(pyglade_user_data != NULL, NULL); - - firstargs = Py_BuildValue("Nssssii", pygobject_new((GObject *)xml), - func_name, name, string1, string2, - int1, int2); - args = PySequence_Concat(firstargs, pyglade_user_data); - Py_DECREF(firstargs); - - widget = PyObject_CallObject(pyglade_handler, args); - Py_DECREF(args); - if (!widget) { - PyErr_Print(); - ret = NULL; - } else if (pygobject_check(widget, &PyGtkWidget_Type)) { - /* this leaks a reference :( */ - ret = GTK_WIDGET(pygobject_get(widget)); - } else { - Py_DECREF(widget); - g_warning("return value of custom widget handler was not a GtkWidget"); - ret = NULL; - } - - return ret; -} - -static PyObject * -_wrap_glade_set_custom_handler(PyObject *self, PyObject *args) -{ - PyObject *first, *handler, *user_data; - gint len; - - len = PyTuple_Size(args); - if (len < 1) { - PyErr_SetString(PyExc_TypeError, "set_custom_handler requires at least 1 argument"); - return NULL; - } - first = PySequence_GetSlice(args, 0, 1); - if (!PyArg_ParseTuple(first, "O:set_custom_handler", &handler)) { - Py_DECREF(first); - return NULL; - } - Py_DECREF(first); - if (!PyCallable_Check(handler)) { - PyErr_SetString(PyExc_TypeError, "handler must be callable"); - return NULL; - } - user_data = PySequence_GetSlice(args, 1, len); - - /* clear saved data */ - Py_XDECREF(pyglade_handler); - pyglade_handler = NULL; - Py_XDECREF(pyglade_user_data); - pyglade_user_data = NULL; - - /* store new handlers */ - Py_INCREF(handler); - pyglade_handler = handler; - pyglade_user_data = user_data; - - /* set handler */ - glade_set_custom_handler(pyglade_custom_widget_handler, NULL); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override glade_set_custom_widget_callbacks kwargs -static GtkWidget * -pyglade_custom_widget_callbacks_handler(GladeXML *xml, - gchar *func_name, - gchar *name, - gchar *string1, - gchar *string2, - gint int1, - gint int2, - gpointer user_data) -{ - PyObject *handler, *widget; - GtkWidget *ret; - - handler = PyMapping_GetItemString(pyglade_user_data, func_name); - if (!handler) { - PyErr_Clear(); - handler = PyObject_GetAttrString(pyglade_user_data, func_name); - if (!handler) { - PyErr_Clear(); - g_warning("could not find handler %s", func_name); - return NULL; - } - } - if (!PyCallable_Check(handler)) { - g_warning("object is not callable"); - return NULL; - } - - widget = PyObject_CallFunction(handler, NULL); - if (pygobject_check(widget, &PyGtkWidget_Type)) { - /* this leaks a reference :( */ - ret = GTK_WIDGET(pygobject_get(widget)); - } else { - Py_DECREF(widget); - g_warning("return value of custom widget handler was not a GtkWidget"); - ret = NULL; - } - return ret; -} -static PyObject * -_wrap_glade_set_custom_widget_callbacks(PyObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "dict", NULL }; - PyObject *object; - - if (PyErr_Warn(PyExc_DeprecationWarning, "use set_custom_handler instead") < 0) - return NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:GladeXML.set_custom_widget_callbacks", - kwlist, &object)) - return NULL; - - /* clear saved data */ - Py_XDECREF(pyglade_handler); - pyglade_handler = NULL; - Py_XDECREF(pyglade_user_data); - pyglade_user_data = NULL; - - /* store new handlers */ - Py_INCREF(object); - pyglade_user_data = object; - - glade_set_custom_handler(pyglade_custom_widget_callbacks_handler, NULL); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override glade_xml_new kwargs -static int -_wrap_glade_xml_new(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "fname", "root", "domain", "typedict", NULL }; - char *fname, *root = NULL, *domain = NULL; - PyObject *pydict = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s|zzO:GladeXML.__init__", - kwlist, &fname, &root, &domain, - &pydict)) - return -1; - - if (pydict && !PyMapping_Check(pydict)) { - PyErr_SetString(PyExc_TypeError, - "typedict must be a mapping"); - return -1; - } - - self->obj = (GObject *) pyglade_xml_new(fname, root, domain, pydict); - - if (!self->obj) { - PyErr_SetString(PyExc_RuntimeError, "could not create GladeXML object"); - return -1; - } - pygobject_register_wrapper((PyObject *)self); - return 0; -} diff --git a/gtk/libglademodule.c b/gtk/libglademodule.c deleted file mode 100644 index 0fc20c7a..00000000 --- a/gtk/libglademodule.c +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * libglademodule.c: wrapper for the libglade library. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include "pygtk.h" -#include - -void pylibglade_register_classes(PyObject *d); -extern PyMethodDef pylibglade_functions[]; - -DL_EXPORT(void) -initglade(void) -{ - PyObject *m, *d; - - m = Py_InitModule("gtk.glade", pylibglade_functions); - d = PyModule_GetDict(m); - - init_pygobject(); - init_pygtk(); - - glade_init(); - - pylibglade_register_classes(d); -} diff --git a/gtk/pygtk-private.h b/gtk/pygtk-private.h deleted file mode 100644 index aab41e1f..00000000 --- a/gtk/pygtk-private.h +++ /dev/null @@ -1,75 +0,0 @@ -#ifndef _PYGTK_PRIVATE_H_ -#define _PYGTK_PRIVATE_H_ - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#define PYCAIRO_VERSION_HEX ((PYCAIRO_MAJOR_VERSION<<24)|(PYCAIRO_MINOR_VERSION<<16)|(PYCAIRO_MICRO_VERSION<<8)) - -#ifdef _PYGTK_H_ -#error "don't include pygtk.h and pygtk-private.h together" -#endif - -#define _INSIDE_PYGTK_ -#include "pygtk.h" -#undef WITH_THREAD - -/* type objects */ -extern PyTypeObject PyGdkAtom_Type; - -/* check the type of a PyObject */ -#define PyGdkAtom_Check(v) ((v)->ob_type == &PyGdkAtom_Type) - -/* constructors for PyObject wrappers ... */ -PyObject *PyGdkAtom_New(GdkAtom atom); - -void pygtk_handler_marshal(gpointer a, PyObject *func, int nargs,GtkArg *args); -void pygtk_input_marshal(gpointer a, PyObject *func, int nargs, GtkArg *args); - -/* private */ -PyObject *pygtk_tree_path_to_pyobject(GtkTreePath *path); -GtkTreePath *pygtk_tree_path_from_pyobject(PyObject *object); -gboolean pygdk_rectangle_from_pyobject(PyObject *object, - GdkRectangle *rectangle); - -GdkAtom pygdk_atom_from_pyobject(PyObject *object); -GdkAtom *pygdk_atom_vector_from_sequence(PyObject *sequence, gint *num); -PyObject *pygtk_target_list_to_list(GtkTargetList *targets); -GtkTargetList *pygtk_target_list_from_sequence(PyObject *py_targets); - -typedef struct { - PyObject *func, *data; -} PyGtkCustomNotify; - -void pygtk_custom_destroy_notify(gpointer user_data); - -/* helper object for the style helper */ -typedef struct { - PyObject_HEAD - GtkStyle *style; /* parent style */ - enum {STYLE_COLOUR_ARRAY, STYLE_GC_ARRAY, STYLE_PIXMAP_ARRAY} type; - gpointer array; -} PyGtkStyleHelper_Object; - -PyObject *_pygtk_style_helper_new(GtkStyle *style, int type, gpointer array); - -PyObject *_pygtk_tree_model_row_new(GtkTreeModel *model, GtkTreeIter *iter); -PyObject *_pygtk_tree_model_row_iter_new(GtkTreeModel *model, - GtkTreeIter *parent_iter); -int _pygtk_tree_model_set_row(GtkTreeModel *model, GtkTreeIter *iter, - PyObject *items); -int _pygtk_tree_model_remove_row(GtkTreeModel *model, GtkTreeIter *iter); - -/* A boxed type for GdkRegion until one gets into gtk+ itself. */ -#ifdef GDK_TYPE_REGION -#define PYGDK_TYPE_REGION GDK_TYPE_REGION -#else -GType pygdk_region_get_type (void) G_GNUC_CONST; - -#define PYGDK_TYPE_REGION (pygdk_region_get_type ()) -#endif /* GDK_TYPE_REGION */ - -void pygtk_boxed_unref_shared(PyObject *boxed); - -#endif diff --git a/gtk/pygtk.h b/gtk/pygtk.h deleted file mode 100644 index 573c3b9e..00000000 --- a/gtk/pygtk.h +++ /dev/null @@ -1,85 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- */ -#ifndef _PYGTK_H_ -#define _PYGTK_H_ - -#define NO_IMPORT_PYGOBJECT -#include -#include -#include - -struct _PyGtk_FunctionStruct { - char *pygtkVersion; - - PyTypeObject *gdkAtom_type; - PyObject *(* gdkAtom_new)(GdkAtom atom); - gboolean (* rectangle_from_pyobject)(PyObject *object, - GdkRectangle *rectangle); - PyObject * (*tree_path_to_pyobject) (GtkTreePath *path); - GtkTreePath * (*tree_path_from_pyobject) (PyObject *object); -}; - -/* structure definitions for the various object types in PyGTK */ -typedef struct { - PyObject_HEAD - gchar *name; - GdkAtom atom; -} PyGdkAtom_Object; - -/* routines to get the C object value out of the PyObject wrapper */ -#define PyGdkAtom_Get(v) (((PyGdkAtom_Object *)(v))->atom) - -/* this section is dependent on whether we are being included from gtkmodule.c - * or not. A similar source level interface should be provided in both - * instances. */ -#ifndef _INSIDE_PYGTK_ - -/* for multi file extensions, define one of these in all but the main file - * of the module */ -#if defined(NO_IMPORT) || defined(NO_IMPORT_PYGTK) -extern struct _PyGtk_FunctionStruct *_PyGtk_API; -#else -struct _PyGtk_FunctionStruct *_PyGtk_API; -#endif - -/* type objects */ -#define PyGdkAtom_Type *(_PyGtk_API->gdkAtom_type) - -/* type checking routines */ -#define PyGdkAtom_Check(v) ((v)->ob_type == _PyGtk_API->gdkAtom_type) - -/* type objects */ -#define PyGdkAtom_New (_PyGtk_API->gdkAtom_new) - -/* some variables */ -#define PYGTK_VERSION (_PyGtk_API->pygtkVersion) - -/* public functions */ -#define pygdk_rectangle_from_pyobject (_PyGtk_API->rectangle_from_pyobject) -#define pygtk_tree_path_to_pyobject (_PyGtk_API->tree_path_to_pyobject) -#define pygtk_tree_path_from_pyobject (_PyGtk_API->tree_path_from_pyobject) - - -/* a function to initialise the pygtk functions */ -#define init_pygtk() G_STMT_START { \ - PyObject *pygtk = PyImport_ImportModule("gtk"); \ - if (pygtk != NULL) { \ - PyObject *module_dict = PyModule_GetDict(pygtk); \ - PyObject *cobject = PyDict_GetItemString(module_dict, "_PyGtk_API"); \ - if (PyCObject_Check(cobject)) \ - _PyGtk_API = (struct _PyGtk_FunctionStruct*) \ - PyCObject_AsVoidPtr(cobject); \ - else { \ - PyErr_SetString(PyExc_RuntimeError, \ - "could not find _PyGtk_API object"); \ - return; \ - } \ - } else { \ - PyErr_SetString(PyExc_ImportError, \ - "could not import gtk"); \ - return; \ - } \ -} G_STMT_END - -#endif - -#endif /* !_PYGTK_H_ */ diff --git a/gtk/pygtkcellrenderer.c b/gtk/pygtkcellrenderer.c deleted file mode 100644 index 627d0422..00000000 --- a/gtk/pygtkcellrenderer.c +++ /dev/null @@ -1,328 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * pygtkcellrenderer.c: stub class to help implement cell renderers. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "pygtkcellrenderer.h" -#include -#include "pygtk-private.h" - -/* define this to print out debug messages */ -#undef DEBUG_CELL_RENDERER - -#ifndef _ -# define _(s) (s) -#endif - -static void pygtk_generic_cell_renderer_class_init (PyGtkGenericCellRendererClass *klass); -static void pygtk_generic_cell_renderer_get_size (GtkCellRenderer *cell, - GtkWidget *widget, - GdkRectangle *cell_area, - gint *x_offset, - gint *y_offset, - gint *width, - gint *height); -static void pygtk_generic_cell_renderer_render (GtkCellRenderer *cell, - GdkWindow *window, - GtkWidget *widget, - GdkRectangle *background_area, - GdkRectangle *cell_area, - GdkRectangle *expose_area, - GtkCellRendererState flags); -static gboolean pygtk_generic_cell_renderer_activate (GtkCellRenderer *cell, - GdkEvent *event, - GtkWidget *widget, - const gchar *path, - GdkRectangle *background_area, - GdkRectangle *cell_area, - GtkCellRendererState flags); -static GtkCellEditable *pygtk_generic_cell_renderer_start_editing (GtkCellRenderer *cell, - GdkEvent *event, - GtkWidget *widget, - const gchar *path, - GdkRectangle *background_area, - GdkRectangle *cell_area, - GtkCellRendererState flags); - - - -GType -pygtk_generic_cell_renderer_get_type(void) -{ - static GType object_type = 0; - - if (!object_type) { - static const GTypeInfo object_info = { - sizeof(PyGtkGenericCellRendererClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) pygtk_generic_cell_renderer_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof(PyGtkGenericCellRenderer), - 0, /* n_preallocs */ - (GInstanceInitFunc) NULL, - }; - object_type = g_type_register_static(GTK_TYPE_CELL_RENDERER, - "PyGtkGenericCellRenderer", - &object_info, 0); - } - - return object_type; -} - -static void -pygtk_generic_cell_renderer_class_init(PyGtkGenericCellRendererClass *klass) -{ - GtkCellRendererClass *cell_renderer_class = (GtkCellRendererClass*) klass; - cell_renderer_class->get_size = pygtk_generic_cell_renderer_get_size; - cell_renderer_class->render = pygtk_generic_cell_renderer_render; - cell_renderer_class->activate = pygtk_generic_cell_renderer_activate; - cell_renderer_class->start_editing = pygtk_generic_cell_renderer_start_editing; -} - -#define METHOD_PREFIX "on_" - -static void -pygtk_generic_cell_renderer_get_size (GtkCellRenderer *cell, - GtkWidget *widget, - GdkRectangle *cell_area, - gint *x_offset, - gint *y_offset, - gint *width, - gint *height) -{ - PyGILState_STATE state; - PyObject *self, *py_ret, *py_widget, *py_cell_area; - gint my_x, my_y, my_width, my_height; - - g_return_if_fail(PYGTK_IS_GENERIC_CELL_RENDERER (cell)); - - state = pyg_gil_state_ensure(); - - self = pygobject_new((GObject *)cell); - -#ifdef DEBUG_CELL_RENDERER - g_message ("get_size()"); -#endif - py_widget = pygobject_new((GObject *)widget); - py_cell_area = pyg_boxed_new(GDK_TYPE_RECTANGLE, cell_area, TRUE, TRUE); - - py_ret = PyObject_CallMethod(self, METHOD_PREFIX "get_size", "OO", - py_widget, py_cell_area); - if (!py_ret) { - PyErr_Print(); - Py_DECREF(py_widget); - Py_DECREF(py_cell_area); - pyg_gil_state_release(state); - return; - } - Py_DECREF(py_widget); - Py_DECREF(py_cell_area); - - if (!PyArg_ParseTuple(py_ret, "iiii", - &my_x, &my_y, &my_width, &my_height)) { - PyErr_Clear(); - Py_DECREF(py_ret); - pyg_gil_state_release(state); - g_warning("could not parse return value of get_size() method. " - "Should be of form (x_offset, y_offset, width, height)"); - return; - } - - pyg_gil_state_release(state); - - /* success */ - if (x_offset) - *x_offset = my_x; - - if (y_offset) - *y_offset = my_y; - - if (width) - *width = my_width; - - if (height) - *height = my_height; - -} - -static void -pygtk_generic_cell_renderer_render (GtkCellRenderer *cell, - GdkWindow *window, - GtkWidget *widget, - GdkRectangle *background_area, - GdkRectangle *cell_area, - GdkRectangle *expose_area, - GtkCellRendererState flags) -{ - PyGILState_STATE state; - PyObject *self, *py_ret, *py_window, *py_widget; - PyObject *py_background_area, *py_cell_area, *py_expose_area; - - g_return_if_fail(PYGTK_IS_GENERIC_CELL_RENDERER (cell)); - - state = pyg_gil_state_ensure(); - - self = pygobject_new((GObject *)cell); - -#ifdef DEBUG_CELL_RENDERER - g_message ("render()"); -#endif - py_window = pygobject_new((GObject *)window); - py_widget = pygobject_new((GObject *)widget); - py_background_area = pyg_boxed_new(GDK_TYPE_RECTANGLE, background_area, TRUE, TRUE); - py_cell_area = pyg_boxed_new(GDK_TYPE_RECTANGLE, cell_area, TRUE, TRUE); - py_expose_area = pyg_boxed_new(GDK_TYPE_RECTANGLE, expose_area, TRUE, TRUE); - py_ret = PyObject_CallMethod(self, METHOD_PREFIX "render", "OOOOOi", - py_window, py_widget, py_background_area, - py_cell_area, py_expose_area, flags); - if (!py_ret) { - PyErr_Print(); - } - - Py_DECREF(py_window); - Py_DECREF(py_widget); - Py_DECREF(py_background_area); - Py_DECREF(py_cell_area); - Py_DECREF(py_expose_area); - - pyg_gil_state_release(state); -} - -static gboolean -pygtk_generic_cell_renderer_activate (GtkCellRenderer *cell, - GdkEvent *event, - GtkWidget *widget, - const gchar *path, - GdkRectangle *background_area, - GdkRectangle *cell_area, - GtkCellRendererState flags) -{ - PyGILState_STATE state; - PyObject *self, *py_ret, *py_event, *py_widget; - PyObject *py_background_area, *py_cell_area; - gboolean ret = FALSE; - - g_return_val_if_fail(PYGTK_IS_GENERIC_CELL_RENDERER (cell), FALSE); - - state = pyg_gil_state_ensure(); - - self = pygobject_new((GObject *)cell); - -#ifdef DEBUG_CELL_RENDERER - g_message ("activate()"); -#endif - py_event = pyg_boxed_new(GDK_TYPE_EVENT, event, FALSE, FALSE); - py_widget = pygobject_new((GObject *)widget); - py_background_area = pyg_boxed_new(GDK_TYPE_RECTANGLE, background_area, TRUE, TRUE); - py_cell_area = pyg_boxed_new(GDK_TYPE_RECTANGLE, cell_area, TRUE, TRUE); - - py_ret = PyObject_CallMethod(self, METHOD_PREFIX "activate", "OOzOOi", - py_event, py_widget, path, py_background_area, - py_cell_area, flags); - if (!py_ret) { - PyErr_Print(); - goto out; - } - - ret = PyObject_IsTrue(py_ret); - Py_DECREF(py_ret); - -out: - pygtk_boxed_unref_shared(py_event); - Py_DECREF(py_widget); - Py_DECREF(py_background_area); - Py_DECREF(py_cell_area); - pyg_gil_state_release(state); - return ret; -} - -static GtkCellEditable * -pygtk_generic_cell_renderer_start_editing (GtkCellRenderer *cell, - GdkEvent *event, - GtkWidget *widget, - const gchar *path, - GdkRectangle *background_area, - GdkRectangle *cell_area, - GtkCellRendererState flags) -{ - PyGILState_STATE state; - PyObject *self, *py_ret, *py_event, *py_widget; - PyObject *py_background_area, *py_cell_area; - GtkCellEditable *ret = NULL; - extern PyTypeObject PyGtkCellEditable_Type; - - g_return_val_if_fail(PYGTK_IS_GENERIC_CELL_RENDERER (cell), NULL); - - state = pyg_gil_state_ensure(); - - self = pygobject_new((GObject *)cell); - -#ifdef DEBUG_CELL_RENDERER - g_message ("start_editing()"); -#endif - py_event = pyg_boxed_new(GDK_TYPE_EVENT, event, FALSE, FALSE); - py_widget = pygobject_new((GObject *)widget); - py_background_area = pyg_boxed_new(GDK_TYPE_RECTANGLE, background_area, TRUE, TRUE); - py_cell_area = pyg_boxed_new(GDK_TYPE_RECTANGLE, cell_area, TRUE, TRUE); - - py_ret = PyObject_CallMethod(self, METHOD_PREFIX "start_editing", "OOzOOi", - py_event, py_widget, path, py_background_area, - py_cell_area, flags); - if (!py_ret) { - PyErr_Print(); - Py_DECREF(py_event); - Py_DECREF(py_widget); - Py_DECREF(py_background_area); - Py_DECREF(py_cell_area); - pyg_gil_state_release(state); - return NULL; - } - Py_DECREF(py_event); - Py_DECREF(py_widget); - Py_DECREF(py_background_area); - Py_DECREF(py_cell_area); - if (py_ret == Py_None) { - ret = NULL; - } - else if (pygobject_check(py_ret, &PyGtkCellEditable_Type)) { - ret = GTK_CELL_EDITABLE(g_object_ref(pygobject_get(py_ret))); - } - else { - g_warning("return of start_editing() was not a GtkCellEditable"); - } - Py_DECREF(py_ret); - pyg_gil_state_release(state); - return ret; -} - -GtkCellRenderer * -pygtk_generic_cell_renderer_new(void) -{ - if (PyErr_Warn(PyExc_DeprecationWarning, - "subclass gtk.CellRenderer and override do_xxx methods") < 0) - return NULL; - return GTK_CELL_RENDERER( - g_object_new(PYGTK_TYPE_GENERIC_CELL_RENDERER, NULL)); -} diff --git a/gtk/pygtkcellrenderer.h b/gtk/pygtkcellrenderer.h deleted file mode 100644 index 5c71069b..00000000 --- a/gtk/pygtkcellrenderer.h +++ /dev/null @@ -1,44 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * pygtkcellrenderer.h: stub class to help implement cell renderers. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -#include - -#define PYGTK_TYPE_GENERIC_CELL_RENDERER (pygtk_generic_cell_renderer_get_type()) -#define PYGTK_GENERIC_CELL_RENDERER(object) (G_TYPE_CHECK_INSTANCE_CAST((object), PYGTK_TYPE_GENERIC_CELL_RENDERER, PyGtkGenericCellRenderer)) -#define PYGTK_GENERIC_CELL_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PYGTK_TYPE_GENERIC_CELL_RENDERER, PyGtkGenericCellRendererClass)) -#define PYGTK_IS_GENERIC_CELL_RENDERER(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), PYGTK_TYPE_GENERIC_CELL_RENDERER)) -#define PYGTK_IS_GENERIC_CELL_RENDERER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PYGTK_TYPE_GENERIC_CELL_RENDERER)) -#define PYGTK_GENERIC_CELL_RENDERER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PYGTK_TYPE_GENERIC_CELL_RENDERER, PyGtkGenericCellRendererClass)) - -typedef struct _PyGtkGenericCellRenderer PyGtkGenericCellRenderer; -typedef struct _PyGtkGenericCellRendererClass PyGtkGenericCellRendererClass; - -struct _PyGtkGenericCellRenderer { - GtkCellRenderer parent_instance; -}; - -struct _PyGtkGenericCellRendererClass { - GtkCellRendererClass parent_class; -}; - -GType pygtk_generic_cell_renderer_get_type (void); -GtkCellRenderer *pygtk_generic_cell_renderer_new (void); diff --git a/gtk/pygtktreemodel.c b/gtk/pygtktreemodel.c deleted file mode 100644 index a3f85805..00000000 --- a/gtk/pygtktreemodel.c +++ /dev/null @@ -1,803 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * pygtktreemodel.c: stub class to help implement tree models. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "pygtktreemodel.h" -#include -#include "pygtk-private.h" - -/* define this to print out debug messages */ -#undef DEBUG_TREE_MODEL - -#ifndef _ -# define _(s) (s) -#endif - -#define VALID_ITER(iter, tree_model) \ - (iter != NULL && iter->stamp == PYGTK_GENERIC_TREE_MODEL(tree_model)->stamp) - -enum { - PROP_LEAK_REFERENCES = 1 -}; - -static void pygtk_generic_tree_model_class_init(PyGtkGenericTreeModelClass *klass); -static void pygtk_generic_tree_model_init(PyGtkGenericTreeModel *self); -static void pygtk_generic_tree_model_iface_init(GtkTreeModelIface *iface); -static void pygtk_generic_tree_model_set_property (GObject *object, - guint property_id, - const GValue *value, - GParamSpec *pspec); -static void pygtk_generic_tree_model_get_property (GObject *object, - guint property_id, - GValue *value, - GParamSpec *pspec); - - -GType -pygtk_generic_tree_model_get_type(void) -{ - static GType object_type = 0; - - if (!object_type) { - static const GTypeInfo object_info = { - sizeof(PyGtkGenericTreeModelClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) pygtk_generic_tree_model_class_init, - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof(PyGtkGenericTreeModel), - 0, /* n_preallocs */ - (GInstanceInitFunc) pygtk_generic_tree_model_init, - }; - static const GInterfaceInfo tree_model_info = { - (GInterfaceInitFunc) pygtk_generic_tree_model_iface_init, - NULL, - NULL, - }; - - object_type = g_type_register_static(G_TYPE_OBJECT, - "PyGtkGenericTreeModel", - &object_info, 0); - g_type_add_interface_static(object_type, - GTK_TYPE_TREE_MODEL, - &tree_model_info); - } - return object_type; -} - -static void -pygtk_generic_tree_model_class_init(PyGtkGenericTreeModelClass *klass) -{ - GObjectClass *object_class = (GObjectClass*) klass; - - object_class->get_property = pygtk_generic_tree_model_get_property; - object_class->set_property = pygtk_generic_tree_model_set_property; - - g_object_class_install_property (object_class, - PROP_LEAK_REFERENCES, - g_param_spec_boolean ("leak_references", - _("Leak references"), - _("Enable referencing iterator " - "objects (this will cause a memory leak or at least a reference " - "counting leak). You might need it though, if you return newly " - "created objects."), - TRUE, - G_PARAM_READWRITE)); -} - -static guint pygtk_generic_tree_model_get_flags(GtkTreeModel *tree_model); -static gint pygtk_generic_tree_model_get_n_columns(GtkTreeModel *tree_model); -static GType pygtk_generic_tree_model_get_column_type(GtkTreeModel *tree_model, - gint index); -static gboolean pygtk_generic_tree_model_get_iter(GtkTreeModel *tree_model, - GtkTreeIter *iter, - GtkTreePath *path); -static GtkTreePath *pygtk_generic_tree_model_get_path(GtkTreeModel *tree_model, - GtkTreeIter *iter); -static void pygtk_generic_tree_model_get_value(GtkTreeModel*tree_model, - GtkTreeIter *iter, - gint column, GValue *value); -static gboolean pygtk_generic_tree_model_iter_next(GtkTreeModel *tree_model, - GtkTreeIter *iter); -static gboolean pygtk_generic_tree_model_iter_children(GtkTreeModel *tree_model, - GtkTreeIter *iter, - GtkTreeIter *parent); -static gboolean pygtk_generic_tree_model_iter_has_child(GtkTreeModel *tree_model, - GtkTreeIter *iter); -static gint pygtk_generic_tree_model_iter_n_children(GtkTreeModel *tree_model, - GtkTreeIter *iter); -static gboolean pygtk_generic_tree_model_iter_nth_child(GtkTreeModel *tree_model, - GtkTreeIter *iter, - GtkTreeIter *parent, - gint n); -static gboolean pygtk_generic_tree_model_iter_parent(GtkTreeModel *tree_model, - GtkTreeIter *iter, - GtkTreeIter *child); -static void pygtk_generic_tree_model_unref_node(GtkTreeModel *tree_model, - GtkTreeIter *iter); -static void pygtk_generic_tree_model_ref_node(GtkTreeModel *tree_model, - GtkTreeIter *iter); - -static void -pygtk_generic_tree_model_iface_init(GtkTreeModelIface *iface) -{ - iface->get_flags = pygtk_generic_tree_model_get_flags; - iface->get_n_columns = pygtk_generic_tree_model_get_n_columns; - iface->get_column_type = pygtk_generic_tree_model_get_column_type; - iface->get_iter = pygtk_generic_tree_model_get_iter; - iface->get_path = pygtk_generic_tree_model_get_path; - iface->get_value = pygtk_generic_tree_model_get_value; - iface->iter_next = pygtk_generic_tree_model_iter_next; - iface->iter_children = pygtk_generic_tree_model_iter_children; - iface->iter_has_child = pygtk_generic_tree_model_iter_has_child; - iface->iter_n_children = pygtk_generic_tree_model_iter_n_children; - iface->iter_nth_child = pygtk_generic_tree_model_iter_nth_child; - iface->iter_parent = pygtk_generic_tree_model_iter_parent; - iface->ref_node = pygtk_generic_tree_model_ref_node; - iface->unref_node = pygtk_generic_tree_model_unref_node; - -} - -static void -pygtk_generic_tree_model_init(PyGtkGenericTreeModel *self) -{ - self->leak_references = TRUE; - do { - self->stamp = g_random_int(); - } while (self->stamp == 0); -} - -static void -pygtk_generic_tree_model_set_property (GObject *object, guint property_id, - const GValue *value, GParamSpec *pspec) -{ - switch (property_id) { - case PROP_LEAK_REFERENCES: - PYGTK_GENERIC_TREE_MODEL (object)->leak_references = g_value_get_boolean (value); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } - } - -static void -pygtk_generic_tree_model_get_property (GObject *object, guint property_id, - GValue *value, GParamSpec *pspec) -{ - switch (property_id) { - case PROP_LEAK_REFERENCES: - g_value_set_boolean (value, - PYGTK_GENERIC_TREE_MODEL (object)->leak_references); - break; - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); - break; - } -} - - -PyGtkGenericTreeModel * -pygtk_generic_tree_model_new(void) -{ - return PYGTK_GENERIC_TREE_MODEL( - g_object_new(PYGTK_TYPE_GENERIC_TREE_MODEL, NULL)); -} - - -/* format of GtkTreeIter's for PyGtkGenericTreeModel: - * user_data == python object - * user_data2 == floating reference? - * - * I haven't worked out how everything should work. For now I will - * leak references. - */ - -#define METHOD_PREFIX "on_" - -static guint -pygtk_generic_tree_model_get_flags(GtkTreeModel *tree_model) -{ - PyGILState_STATE state; - PyObject *self, *py_ret; - guint ret = 0; - g_return_val_if_fail(PYGTK_IS_GENERIC_TREE_MODEL(tree_model), 0); - - state = pyg_gil_state_ensure(); - - /* this call finds the wrapper for this GObject */ - self = pygobject_new((GObject *)tree_model); - -#ifdef DEBUG_TREE_MODEL - g_message("get_flags()"); -#endif - py_ret = PyObject_CallMethod(self, METHOD_PREFIX "get_flags", ""); - Py_DECREF(self); - if (py_ret) { - ret = PyInt_AsLong(py_ret); - Py_DECREF(py_ret); - } else { - PyErr_Print(); - } - - pyg_gil_state_release(state); - return ret; -} - -static gint -pygtk_generic_tree_model_get_n_columns(GtkTreeModel *tree_model) -{ - PyGILState_STATE state; - PyObject *self, *py_ret; - gint ret = 0; - - g_return_val_if_fail(tree_model != NULL, 0); - g_return_val_if_fail(PYGTK_IS_GENERIC_TREE_MODEL(tree_model), 0); - - state = pyg_gil_state_ensure(); - - /* this call finds the wrapper for this GObject */ - self = pygobject_new((GObject *)tree_model); - -#ifdef DEBUG_TREE_MODEL - g_message("get_n_columns()"); -#endif - py_ret = PyObject_CallMethod(self, METHOD_PREFIX "get_n_columns", ""); - Py_DECREF(self); - if (py_ret) { - ret = PyInt_AsLong(py_ret); - Py_DECREF(py_ret); - } else { - PyErr_Print(); - } - pyg_gil_state_release(state); - return ret; -} - -static GType -pygtk_generic_tree_model_get_column_type(GtkTreeModel *tree_model, gint index) -{ - PyGILState_STATE state; - PyObject *self, *py_ret; - GType ret = G_TYPE_INVALID; - - g_return_val_if_fail(tree_model != NULL, G_TYPE_INVALID); - g_return_val_if_fail(PYGTK_IS_GENERIC_TREE_MODEL(tree_model), G_TYPE_INVALID); - state = pyg_gil_state_ensure(); - - /* this call finds the wrapper for this GObject */ - self = pygobject_new((GObject *)tree_model); - -#ifdef DEBUG_TREE_MODEL - g_message("get_column_type(%d)", index); -#endif - py_ret = PyObject_CallMethod(self, METHOD_PREFIX "get_column_type", - "(i)", index); - Py_DECREF(self); - if (py_ret) { - ret = pyg_type_from_object(py_ret); - Py_DECREF(py_ret); - } else { - PyErr_Print(); - } - pyg_gil_state_release(state); - return ret; -} - -static gboolean -pygtk_generic_tree_model_get_iter(GtkTreeModel *tree_model, - GtkTreeIter *iter, GtkTreePath *path) -{ - PyGILState_STATE state; - PyObject *self, *py_path, *py_ret; - gboolean ret = FALSE; - - g_return_val_if_fail(tree_model != NULL, FALSE); - g_return_val_if_fail(PYGTK_IS_GENERIC_TREE_MODEL(tree_model), FALSE); - g_return_val_if_fail(iter != NULL, FALSE); - g_return_val_if_fail(path != NULL, FALSE); - - state = pyg_gil_state_ensure(); - - /* this call finds the wrapper for this GObject */ - self = pygobject_new((GObject *)tree_model); - -#ifdef DEBUG_TREE_MODEL - g_message("get_iter(%p)", path); -#endif - py_path = pygtk_tree_path_to_pyobject(path); - py_ret = PyObject_CallMethod(self, METHOD_PREFIX "get_iter", - "(O)", py_path); - Py_DECREF(self); - Py_DECREF(py_path); - - if (py_ret) { - if (py_ret != Py_None) { - iter->user_data = py_ret; - iter->stamp = PYGTK_GENERIC_TREE_MODEL(tree_model)->stamp; - if (!PYGTK_GENERIC_TREE_MODEL(tree_model)->leak_references) { - Py_DECREF((PyObject *)iter->user_data); - } - ret = TRUE; - } else { - iter->user_data = NULL; - Py_DECREF(py_ret); - } - } else { - PyErr_Print(); - iter->user_data = NULL; - } - - pyg_gil_state_release(state); - return ret; -} - -static GtkTreePath * -pygtk_generic_tree_model_get_path(GtkTreeModel *tree_model, GtkTreeIter *iter) -{ - PyGILState_STATE state; - PyObject *self, *py_ret, *py_iter; - GtkTreePath *path = NULL; - - g_return_val_if_fail(tree_model != NULL, NULL); - g_return_val_if_fail(PYGTK_IS_GENERIC_TREE_MODEL(tree_model), NULL); - g_return_val_if_fail(VALID_ITER(iter, tree_model), NULL); - - state = pyg_gil_state_ensure(); - - /* this call finds the wrapper for this GObject */ - self = pygobject_new((GObject *)tree_model); - -#ifdef DEBUG_TREE_MODEL - g_message("get_path(%p)", iter); -#endif - py_iter = (PyObject *)iter->user_data; - if (py_iter == NULL) - py_iter = Py_None; - - py_ret = PyObject_CallMethod(self, METHOD_PREFIX "get_path", "(O)", - py_iter); - Py_DECREF(self); - if (py_ret) { - path = pygtk_tree_path_from_pyobject(py_ret); - - if (!path) - g_warning("could not convert return value of get_path() to " - "a GtkTreePath"); - Py_DECREF(py_ret); - } else { - PyErr_Print(); - } - - pyg_gil_state_release(state); - return path; -} - -static void -pygtk_generic_tree_model_get_value(GtkTreeModel*tree_model, GtkTreeIter *iter, - gint column, GValue *value) -{ - PyGILState_STATE state; - PyObject *self, *py_value, *py_iter; - - g_return_if_fail(tree_model != NULL); - g_return_if_fail(PYGTK_IS_GENERIC_TREE_MODEL(tree_model)); - g_return_if_fail(VALID_ITER(iter, tree_model)); - - state = pyg_gil_state_ensure(); - - /* this call finds the wrapper for this GObject */ - self = pygobject_new((GObject *)tree_model); - -#ifdef DEBUG_TREE_MODEL - g_message("get_value(%p, %d)", iter, column); - _PyObject_Dump (iter->user_data); -#endif - /* init value to column type */ - g_value_init(value, pygtk_generic_tree_model_get_column_type(tree_model, - column)); - - py_iter = (PyObject *)iter->user_data; - if (py_iter == NULL) - py_iter = Py_None; - py_value = PyObject_CallMethod(self, METHOD_PREFIX "get_value", - "(Oi)", py_iter,column); - Py_DECREF(self); - - if (py_value) { - if (py_value != Py_None) - pyg_value_from_pyobject(value, py_value); - Py_DECREF(py_value); - } else { - PyErr_Print(); - } - pyg_gil_state_release(state); -} - -static gboolean -pygtk_generic_tree_model_iter_next(GtkTreeModel *tree_model, GtkTreeIter *iter) -{ - PyGILState_STATE state; - PyObject *self, *py_ret, *py_iter; - gboolean ret = FALSE; - - g_return_val_if_fail(tree_model != NULL, FALSE); - g_return_val_if_fail(PYGTK_IS_GENERIC_TREE_MODEL(tree_model), FALSE); - g_return_val_if_fail(VALID_ITER(iter, tree_model), FALSE); - - state = pyg_gil_state_ensure(); - - /* this call finds the wrapper for this GObject */ - self = pygobject_new((GObject *)tree_model); - -#ifdef DEBUG_TREE_MODEL - g_message("iter_next(%p)", iter); -#endif - py_iter = (PyObject *)iter->user_data; - if (py_iter == NULL) - py_iter = Py_None; - - py_ret = PyObject_CallMethod(self, METHOD_PREFIX "iter_next", "(O)", - py_iter); - Py_DECREF(self); - if (py_ret) { - if (py_ret != Py_None) { - /* XXXX handle reference counting here */ - iter->user_data = py_ret; - if (!PYGTK_GENERIC_TREE_MODEL(tree_model)->leak_references) { - Py_DECREF((PyObject *)iter->user_data); - } - ret = TRUE; - } else { - iter->user_data = NULL; - Py_DECREF(py_ret); - } - } else { - iter->user_data = NULL; - PyErr_Print(); - } - - pyg_gil_state_release(state); - return ret; -} - -static gboolean -pygtk_generic_tree_model_iter_children(GtkTreeModel *tree_model, - GtkTreeIter *iter, - GtkTreeIter *parent) -{ - PyGILState_STATE state; - PyObject *self, *py_ret, *py_parent = Py_None; - gboolean ret = FALSE; - - g_return_val_if_fail(tree_model != NULL, FALSE); - g_return_val_if_fail(PYGTK_IS_GENERIC_TREE_MODEL(tree_model), FALSE); - g_return_val_if_fail(iter != NULL, FALSE); - g_return_val_if_fail(parent == NULL || parent->stamp == PYGTK_GENERIC_TREE_MODEL(tree_model)->stamp, FALSE); - - state = pyg_gil_state_ensure(); - - /* this call finds the wrapper for this GObject */ - self = pygobject_new((GObject *)tree_model); - -#ifdef DEBUG_TREE_MODEL - g_message("iter_children(%p, %p)", iter, parent); -#endif - if (parent && parent->user_data != NULL) - py_parent = (PyObject *)parent->user_data; - py_ret = PyObject_CallMethod(self, METHOD_PREFIX "iter_children", - "(O)", py_parent); - Py_DECREF(self); - if (py_ret) { - if (py_ret != Py_None) { - /* XXXX handle reference counting here */ - iter->user_data = py_ret; - iter->stamp = PYGTK_GENERIC_TREE_MODEL(tree_model)->stamp; - if (!PYGTK_GENERIC_TREE_MODEL(tree_model)->leak_references) { - Py_DECREF((PyObject *)iter->user_data); - } - ret = TRUE; - } else { - iter->user_data = NULL; - Py_DECREF(py_ret); - } - } else { - iter->user_data = NULL; - PyErr_Print(); - } - - pyg_gil_state_release(state); - return ret; -} - -static gboolean -pygtk_generic_tree_model_iter_has_child(GtkTreeModel *tree_model, - GtkTreeIter *iter) -{ - PyGILState_STATE state; - PyObject *self, *py_ret, *py_iter; - gboolean ret = FALSE; - - g_return_val_if_fail(tree_model != NULL, FALSE); - g_return_val_if_fail(PYGTK_IS_GENERIC_TREE_MODEL(tree_model), FALSE); - g_return_val_if_fail(VALID_ITER(iter, tree_model), FALSE); - - state = pyg_gil_state_ensure(); - - /* this call finds the wrapper for this GObject */ - self = pygobject_new((GObject *)tree_model); - -#ifdef DEBUG_TREE_MODEL - g_message("iter_has_child(%p)", iter); -#endif - py_iter = (PyObject *)iter->user_data; - if (py_iter == NULL) - py_iter = Py_None; - - py_ret = PyObject_CallMethod(self, METHOD_PREFIX "iter_has_child", - "(O)", py_iter); - Py_DECREF(self); - if (py_ret) { - ret = PyObject_IsTrue(py_ret); - - Py_DECREF(py_ret); - } else { - PyErr_Print(); - } - - pyg_gil_state_release(state); - return ret; -} - -static gint -pygtk_generic_tree_model_iter_n_children(GtkTreeModel *tree_model, - GtkTreeIter *iter) -{ - PyGILState_STATE state; - PyObject *self, *py_ret, *py_iter; - guint ret = FALSE; - - g_return_val_if_fail(tree_model != NULL, 0); - g_return_val_if_fail(PYGTK_IS_GENERIC_TREE_MODEL(tree_model), 0); - g_return_val_if_fail(iter == NULL || iter->stamp == PYGTK_GENERIC_TREE_MODEL(tree_model)->stamp, 0); - - state = pyg_gil_state_ensure(); - - /* this call finds the wrapper for this GObject */ - self = pygobject_new((GObject *)tree_model); - -#ifdef DEBUG_TREE_MODEL - g_message("iter_n_children(%p)", iter); -#endif - - py_iter = iter != NULL ? (PyObject *)iter->user_data : Py_None; - - py_ret = PyObject_CallMethod(self, METHOD_PREFIX "iter_n_children", - "(O)", py_iter); - Py_DECREF(self); - if (py_ret) { - ret = PyInt_AsLong(py_ret); - - Py_DECREF(py_ret); - } else { - PyErr_Print(); - } - - pyg_gil_state_release(state); - return ret; -} - -static gboolean -pygtk_generic_tree_model_iter_nth_child(GtkTreeModel *tree_model, - GtkTreeIter *iter, - GtkTreeIter *parent, gint n) -{ - PyGILState_STATE state; - PyObject *self, *py_ret, *py_parent = Py_None; - gboolean ret = FALSE; - - g_return_val_if_fail(tree_model != NULL, FALSE); - g_return_val_if_fail(PYGTK_IS_GENERIC_TREE_MODEL(tree_model), FALSE); - g_return_val_if_fail(iter != NULL, FALSE); - g_return_val_if_fail(parent == NULL || parent->stamp == PYGTK_GENERIC_TREE_MODEL(tree_model)->stamp, FALSE); - - state = pyg_gil_state_ensure(); - - /* this call finds the wrapper for this GObject */ - self = pygobject_new((GObject *)tree_model); - -#ifdef DEBUG_TREE_MODEL - g_message("iter_nth_child(%p, %p, %d)", iter, parent, n); -#endif - if (parent && parent->user_data != NULL) - py_parent = (PyObject *)parent->user_data; - py_ret = PyObject_CallMethod(self, METHOD_PREFIX "iter_nth_child", - "(Oi)", py_parent, n); - Py_DECREF(self); - if (py_ret) { - if (py_ret != Py_None) { - /* XXXX handle reference counting here */ - iter->user_data = py_ret; - iter->stamp = PYGTK_GENERIC_TREE_MODEL(tree_model)->stamp; - if (!PYGTK_GENERIC_TREE_MODEL(tree_model)->leak_references) { - Py_DECREF((PyObject *)iter->user_data); - } - ret = TRUE; - } else { - iter->user_data = NULL; - Py_DECREF(py_ret); - } - } else { - iter->user_data = NULL; - PyErr_Print(); - } - - pyg_gil_state_release(state); - return ret; -} - -static gboolean -pygtk_generic_tree_model_iter_parent(GtkTreeModel *tree_model, - GtkTreeIter *iter, - GtkTreeIter *child) -{ - PyGILState_STATE state; - PyObject *self, *py_ret, *py_child = Py_None; - gboolean ret = FALSE; - - g_return_val_if_fail(tree_model != NULL, FALSE); - g_return_val_if_fail(PYGTK_IS_GENERIC_TREE_MODEL(tree_model), FALSE); - g_return_val_if_fail(iter != NULL, FALSE); - g_return_val_if_fail(VALID_ITER(child, tree_model), FALSE); - - state = pyg_gil_state_ensure(); - - /* this call finds the wrapper for this GObject */ - self = pygobject_new((GObject *)tree_model); - -#ifdef DEBUG_TREE_MODEL - g_message("iter_parent(%p, %p)", iter, child); -#endif - if (child && child->user_data != NULL) - py_child = (PyObject *)child->user_data; - py_ret = PyObject_CallMethod(self, METHOD_PREFIX "iter_parent", - "(O)", py_child); - Py_DECREF(self); - if (py_ret) { - if (py_ret != Py_None) { - /* XXXX handle reference counting here */ - iter->user_data = py_ret; - iter->stamp = PYGTK_GENERIC_TREE_MODEL(tree_model)->stamp; - if (!PYGTK_GENERIC_TREE_MODEL(tree_model)->leak_references) { - Py_DECREF((PyObject *)iter->user_data); - } - ret = TRUE; - } else { - iter->user_data = NULL; - Py_DECREF(py_ret); - } - } else { - iter->user_data = NULL; - PyErr_Print(); - } - - pyg_gil_state_release(state); - return ret; -} - -static void -pygtk_generic_tree_model_unref_node(GtkTreeModel *tree_model, GtkTreeIter *iter) -{ - PyGILState_STATE state; - PyObject *self, *py_ret, *py_iter, *method; - - g_return_if_fail(tree_model != NULL); - g_return_if_fail(PYGTK_IS_GENERIC_TREE_MODEL(tree_model)); - g_return_if_fail(VALID_ITER(iter, tree_model)); - - state = pyg_gil_state_ensure(); - - /* this call finds the wrapper for this GObject */ - self = pygobject_new((GObject *)tree_model); - -#ifdef DEBUG_TREE_MODEL - g_message("unref_node(%p)", iter); -#endif - py_iter = (PyObject *)iter->user_data; - if (py_iter == NULL) - py_iter = Py_None; - - method = PyObject_GetAttrString(self, METHOD_PREFIX "unref_node"); - if (method == NULL) - PyErr_Clear(); - else { - py_ret = PyObject_CallFunction(method, "(O)", py_iter); - if (py_ret) { - Py_DECREF(py_ret); - } else { - PyErr_Print(); - } - } - Py_DECREF(self); - - pyg_gil_state_release(state); -} - -static void -pygtk_generic_tree_model_ref_node(GtkTreeModel *tree_model, GtkTreeIter *iter) -{ - PyGILState_STATE state; - PyObject *self, *py_ret, *py_iter, *method; - - g_return_if_fail(tree_model != NULL); - g_return_if_fail(PYGTK_IS_GENERIC_TREE_MODEL(tree_model)); - g_return_if_fail(VALID_ITER(iter, tree_model)); - - state = pyg_gil_state_ensure(); - - /* this call finds the wrapper for this GObject */ - self = pygobject_new((GObject *)tree_model); - -#ifdef DEBUG_TREE_MODEL - g_message("ref_node(%p)", iter); -#endif - py_iter = (PyObject *)iter->user_data; - if (py_iter == NULL) - py_iter = Py_None; - - method = PyObject_GetAttrString(self, METHOD_PREFIX "ref_node"); - if (method == NULL) - PyErr_Clear(); - else { - py_ret = PyObject_CallFunction(method, "(O)", py_iter); - if (py_ret) { - Py_DECREF(py_ret); - } else { - PyErr_Print(); - } - } - Py_DECREF(self); - - pyg_gil_state_release(state); -} - -void -pygtk_generic_tree_model_invalidate_iters(PyGtkGenericTreeModel *tree_model) -{ - g_return_if_fail(tree_model != NULL); - - do { - tree_model->stamp++; - } while (tree_model->stamp == 0); -} - -gboolean -pygtk_generic_tree_model_iter_is_valid(PyGtkGenericTreeModel *tree_model, - GtkTreeIter *iter) -{ - g_return_val_if_fail(tree_model != NULL, FALSE); - - return VALID_ITER(iter, tree_model); -} diff --git a/gtk/pygtktreemodel.h b/gtk/pygtktreemodel.h deleted file mode 100644 index 703eefb0..00000000 --- a/gtk/pygtktreemodel.h +++ /dev/null @@ -1,50 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * pygtktreemodel.h: stub class to help implement tree models. - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ - -#include - -#define PYGTK_TYPE_GENERIC_TREE_MODEL (pygtk_generic_tree_model_get_type()) -#define PYGTK_GENERIC_TREE_MODEL(object) (G_TYPE_CHECK_INSTANCE_CAST((object), PYGTK_TYPE_GENERIC_TREE_MODEL, PyGtkGenericTreeModel)) -#define PYGTK_GENERIC_TREE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), PYGTK_TYPE_GENERIC_TREE_MODEL, PyGtkGenericTreeModelClass)) -#define PYGTK_IS_GENERIC_TREE_MODEL(object) (G_TYPE_CHECK_INSTANCE_TYPE((object), PYGTK_TYPE_GENERIC_TREE_MODEL)) -#define PYGTK_IS_GENERIC_TREE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), PYGTK_TYPE_GENERIC_TREE_MODEL)) -#define PYGTK_GENERIC_TREE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), PYGTK_TYPE_GENERIC_TREE_MODEL, PyGtkGenericTreeModelClass)) - -typedef struct _PyGtkGenericTreeModel PyGtkGenericTreeModel; -typedef struct _PyGtkGenericTreeModelClass PyGtkGenericTreeModelClass; - -struct _PyGtkGenericTreeModel { - GObject parent_instance; - - gboolean leak_references; - gint stamp; -}; - -struct _PyGtkGenericTreeModelClass { - GObjectClass parent_class; -}; - -GType pygtk_generic_tree_model_get_type (void); -PyGtkGenericTreeModel * pygtk_generic_tree_model_new (void); -void pygtk_generic_tree_model_invalidate_iters(PyGtkGenericTreeModel *); -gboolean pygtk_generic_tree_model_iter_is_valid(PyGtkGenericTreeModel *, - GtkTreeIter *); diff --git a/ltihooks.py b/ltihooks.py deleted file mode 100644 index ae1d6040..00000000 --- a/ltihooks.py +++ /dev/null @@ -1,60 +0,0 @@ -# -*- Mode: Python; py-indent-offset: 4 -*- -# ltihooks.py: python import hooks that understand libtool libraries. -# Copyright (C) 2000 James Henstridge. -# -# 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 - -import os, ihooks - -class LibtoolHooks(ihooks.Hooks): - def get_suffixes(self): - """Like normal get_suffixes, but adds .la suffixes to list""" - ret = ihooks.Hooks.get_suffixes(self) - ret.insert(0, ('module.la', 'rb', 3)) - ret.insert(0, ('.la', 'rb', 3)) - return ret - - def load_dynamic(self, name, filename, file=None): - """Like normal load_dynamic, but treat .la files specially""" - if len(filename) > 3 and filename[-3:] == '.la': - fp = open(filename, 'r') - dlname = '' - installed = 1 - line = fp.readline() - while line: - if len(line) > 7 and line[:7] == 'dlname=': - dlname = line[8:-2] - elif len(line) > 10 and line[:10] == 'installed=': - installed = line[10:-1] == 'yes' - line = fp.readline() - fp.close() - if dlname: - if installed: - filename = os.path.join(os.path.dirname(filename), - dlname) - else: - filename = os.path.join(os.path.dirname(filename), - '.libs', dlname) - return ihooks.Hooks.load_dynamic(self, name, filename, file) - -importer = ihooks.ModuleImporter() -importer.set_hooks(LibtoolHooks()) - -def install(): - importer.install() -def uninstall(): - importer.uninstall() - -install() diff --git a/m4/jhflags.m4 b/m4/jhflags.m4 deleted file mode 100644 index 222e4b09..00000000 --- a/m4/jhflags.m4 +++ /dev/null @@ -1,21 +0,0 @@ -dnl -dnl JH_ADD_CFLAG(FLAG) -dnl checks whether the C compiler supports the given flag, and if so, adds -dnl it to $CFLAGS. If the flag is already present in the list, then the -dnl check is not performed. -AC_DEFUN([JH_ADD_CFLAG], -[ -case " $CFLAGS " in -*@<:@\ \ @:>@$1@<:@\ \ @:>@*) - ;; -*) - save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $1" - AC_MSG_CHECKING([whether [$]CC understands $1]) - AC_TRY_COMPILE([], [], [jh_has_option=yes], [jh_has_option=no]) - AC_MSG_RESULT($jh_has_option) - if test $jh_has_option = no; then - CFLAGS="$save_CFLAGS" - fi - ;; -esac]) diff --git a/m4/python.m4 b/m4/python.m4 deleted file mode 100644 index e1c5266d..00000000 --- a/m4/python.m4 +++ /dev/null @@ -1,62 +0,0 @@ -## this one is commonly used with AM_PATH_PYTHONDIR ... -dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]]) -dnl Check if a module containing a given symbol is visible to python. -AC_DEFUN([AM_CHECK_PYMOD], -[AC_REQUIRE([AM_PATH_PYTHON]) -py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` -AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1) -AC_CACHE_VAL(py_cv_mod_$py_mod_var, [ -ifelse([$2],[], [prog=" -import sys -try: - import $1 -except ImportError: - sys.exit(1) -except: - sys.exit(0) -sys.exit(0)"], [prog=" -import $1 -$1.$2"]) -if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC - then - eval "py_cv_mod_$py_mod_var=yes" - else - eval "py_cv_mod_$py_mod_var=no" - fi -]) -py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"` -if test "x$py_val" != xno; then - AC_MSG_RESULT(yes) - ifelse([$3], [],, [$3 -])dnl -else - AC_MSG_RESULT(no) - ifelse([$4], [],, [$4 -])dnl -fi -]) - -dnl a macro to check for ability to create python extensions -dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE]) -dnl function also defines PYTHON_INCLUDES -AC_DEFUN([AM_CHECK_PYTHON_HEADERS], -[AC_REQUIRE([AM_PATH_PYTHON]) -AC_MSG_CHECKING(for headers required to compile python extensions) -dnl deduce PYTHON_INCLUDES -py_prefix=`$PYTHON -c "import sys; print sys.prefix"` -py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` -PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" -if test "$py_prefix" != "$py_exec_prefix"; then - PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" -fi -AC_SUBST(PYTHON_INCLUDES) -dnl check if the headers exist: -save_CPPFLAGS="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" -AC_TRY_CPP([#include ],dnl -[AC_MSG_RESULT(found) -$1],dnl -[AC_MSG_RESULT(not found) -$2]) -CPPFLAGS="$save_CPPFLAGS" -]) diff --git a/pango-types.defs b/pango-types.defs deleted file mode 100644 index 2f9e734a..00000000 --- a/pango-types.defs +++ /dev/null @@ -1,463 +0,0 @@ -;; -*- scheme -*- -;; boxed definitions ... - -(define-boxed AttrList - (in-module "Pango") - (c-name "PangoAttrList") - (gtype-id "PANGO_TYPE_ATTR_LIST") - (copy-func "pango_attr_list_ref") - (release-func "pango_attr_list_unref") -) - -(define-boxed Color - (in-module "Pango") - (c-name "PangoColor") - (gtype-id "PANGO_TYPE_COLOR") - (copy-func "pango_color_copy") - (release-func "pango_color_free") - (fields - '("guint16" "red") - '("guint16" "green") - '("guint16" "blue") - ) -) - -(define-boxed FontDescription - (in-module "Pango") - (c-name "PangoFontDescription") - (gtype-id "PANGO_TYPE_FONT_DESCRIPTION") - (copy-func "pango_font_description_copy") - (release-func "pango_font_description_free") -) - -(define-boxed FontMetrics - (in-module "Pango") - (c-name "PangoFontMetrics") - (gtype-id "PANGO_TYPE_FONT_METRICS") - (copy-func "pango_font_metrics_ref") - (release-func "pango_font_metrics_unref") -) - -(define-boxed GlyphString - (in-module "Pango") - (c-name "PangoGlyphString") - (gtype-id "PANGO_TYPE_GLYPH_STRING") - (copy-func "pango_glyph_string_copy") - (release-func "pango_glyph_string_free") - (fields - '("gint" "num_glyphs") - '("PangoGlyphInfo*" "glyphs") - '("gint*" "log_clusters") - ) -) - -(define-boxed Item - (in-module "Pango") - (c-name "PangoItem") - (fields - '("gint" "offset") - '("gint" "length") - '("gint" "num_chars") - '("PangoEngineShape*" "analysis.shape_engine") - '("PangoEngineLang*" "analysis.lang_engine") - '("PangoFont*" "analysis.font") - '("guint8" "analysis.level") - '("PangoLanguage*" "analysis.language") - '("GSList*" "analysis.extra_attrs") - ) - (gtype-id "PANGO_TYPE_ITEM") -) - -(define-boxed Language - (in-module "Pango") - (c-name "PangoLanguage") - (gtype-id "PANGO_TYPE_LANGUAGE") -) - -(define-boxed LayoutIter - (in-module "Pango") - (c-name "PangoLayoutIter") - (gtype-id "PANGO_TYPE_LAYOUT_ITER") - (release-func "pango_layout_iter_free") -) - - -(define-boxed LayoutLine - (in-module "Pango") - (c-name "PangoLayoutLine") - (gtype-id "PANGO_TYPE_LAYOUT_LINE") - (fields - ; '("PangoLayout*" "layout") ;; omitted for fear of creating reference cycles - '("gint" "start_index") - '("gint" "length") - '("GSList*" "runs") - '("guint" "is_paragraph_start") - '("guint" "resolved_dir") - ) -) - -(define-boxed Matrix - (in-module "Pango") - (c-name "PangoMatrix") - (gtype-id "PANGO_TYPE_MATRIX") -) - -(define-boxed TabArray - (in-module "Pango") - (c-name "PangoTabArray") - (gtype-id "PANGO_TYPE_TAB_ARRAY") - (copy-func "pango_tab_array_copy") - (release-func "pango_tab_array_free") -) - - -; object definitions ... - -(define-object Context - (in-module "Pango") - (parent "GObject") - (c-name "PangoContext") - (gtype-id "PANGO_TYPE_CONTEXT") -) - -(define-object Engine - (in-module "Pango") - (parent "GObject") - (c-name "PangoEngine") - (gtype-id "PANGO_TYPE_ENGINE") -) - -(define-object EngineLang - (in-module "Pango") - (parent "PangoEngine") - (c-name "PangoEngineLang") - (gtype-id "PANGO_TYPE_ENGINE_LANG") -) - -(define-object EngineShape - (in-module "Pango") - (parent "PangoEngine") - (c-name "PangoEngineShape") - (gtype-id "PANGO_TYPE_ENGINE_SHAPE") -) - -(define-object Font - (in-module "Pango") - (parent "GObject") - (c-name "PangoFont") - (gtype-id "PANGO_TYPE_FONT") -) - -(define-object FontFace - (in-module "Pango") - (parent "GObject") - (c-name "PangoFontFace") - (gtype-id "PANGO_TYPE_FONT_FACE") -) - -(define-object FontFamily - (in-module "Pango") - (parent "GObject") - (c-name "PangoFontFamily") - (gtype-id "PANGO_TYPE_FONT_FAMILY") -) - -(define-object FontMap - (in-module "Pango") - (parent "GObject") - (c-name "PangoFontMap") - (gtype-id "PANGO_TYPE_FONT_MAP") -) - -(define-object Fontset - (in-module "Pango") - (parent "GObject") - (c-name "PangoFontset") - (gtype-id "PANGO_TYPE_FONTSET") -) - -(define-object FontsetSimple - (in-module "Pango") - (parent "PangoFontset") - (c-name "PangoFontsetSimple") - (gtype-id "PANGO_TYPE_FONTSET_SIMPLE") -) - -(define-object Layout - (in-module "Pango") - (parent "GObject") - (c-name "PangoLayout") - (gtype-id "PANGO_TYPE_LAYOUT") -) - -(define-object Renderer - (in-module "Pango") - (parent "GObject") - (c-name "PangoRenderer") - (gtype-id "PANGO_TYPE_RENDERER") -) - - -;; Enumerations and flags ... - -(define-enum Alignment - (in-module "Pango") - (c-name "PangoAlignment") - (gtype-id "PANGO_TYPE_ALIGNMENT") - (values - '("left" "PANGO_ALIGN_LEFT") - '("center" "PANGO_ALIGN_CENTER") - '("right" "PANGO_ALIGN_RIGHT") - ) -) - -(define-enum AttrType - (in-module "Pango") - (c-name "PangoAttrType") - (gtype-id "PANGO_TYPE_ATTR_TYPE") - (values - '("invalid" "PANGO_ATTR_INVALID") - '("language" "PANGO_ATTR_LANGUAGE") - '("family" "PANGO_ATTR_FAMILY") - '("style" "PANGO_ATTR_STYLE") - '("weight" "PANGO_ATTR_WEIGHT") - '("variant" "PANGO_ATTR_VARIANT") - '("stretch" "PANGO_ATTR_STRETCH") - '("size" "PANGO_ATTR_SIZE") - '("font-desc" "PANGO_ATTR_FONT_DESC") - '("foreground" "PANGO_ATTR_FOREGROUND") - '("background" "PANGO_ATTR_BACKGROUND") - '("underline" "PANGO_ATTR_UNDERLINE") - '("strikethrough" "PANGO_ATTR_STRIKETHROUGH") - '("rise" "PANGO_ATTR_RISE") - '("shape" "PANGO_ATTR_SHAPE") - '("scale" "PANGO_ATTR_SCALE") - '("fallback" "PANGO_ATTR_FALLBACK") - '("letter-spacing" "PANGO_ATTR_LETTER_SPACING") - '("underline-color" "PANGO_ATTR_UNDERLINE_COLOR") - '("strikethrough-color" "PANGO_ATTR_STRIKETHROUGH_COLOR") - '("absolute-size" "PANGO_ATTR_ABSOLUTE_SIZE") - ) -) - -(define-enum CoverageLevel - (in-module "Pango") - (c-name "PangoCoverageLevel") - (gtype-id "PANGO_TYPE_COVERAGE_LEVEL") - (values - '("none" "PANGO_COVERAGE_NONE") - '("fallback" "PANGO_COVERAGE_FALLBACK") - '("approximate" "PANGO_COVERAGE_APPROXIMATE") - '("exact" "PANGO_COVERAGE_EXACT") - ) -) - -(define-enum Direction - (in-module "Pango") - (c-name "PangoDirection") - (gtype-id "PANGO_TYPE_DIRECTION") - (values - '("ltr" "PANGO_DIRECTION_LTR") - '("rtl" "PANGO_DIRECTION_RTL") - '("ttb-ltr" "PANGO_DIRECTION_TTB_LTR") - '("ttb-rtl" "PANGO_DIRECTION_TTB_RTL") - '("weak-ltr" "PANGO_DIRECTION_WEAK_LTR") - '("weak-rtl" "PANGO_DIRECTION_WEAK_RTL") - '("neutral" "PANGO_DIRECTION_NEUTRAL") - ) -) - -(define-enum EllipsizeMode - (in-module "Pango") - (c-name "PangoEllipsizeMode") - (gtype-id "PANGO_TYPE_ELLIPSIZE_MODE") - (values - '("none" "PANGO_ELLIPSIZE_NONE") - '("start" "PANGO_ELLIPSIZE_START") - '("middle" "PANGO_ELLIPSIZE_MIDDLE") - '("end" "PANGO_ELLIPSIZE_END") - ) -) - -(define-enum RenderPart - (in-module "Pango") - (c-name "PangoRenderPart") - (gtype-id "PANGO_TYPE_RENDER_PART") - (values - '("foreground" "PANGO_RENDER_PART_FOREGROUND") - '("background" "PANGO_RENDER_PART_BACKGROUND") - '("underline" "PANGO_RENDER_PART_UNDERLINE") - '("strikethrough" "PANGO_RENDER_PART_STRIKETHROUGH") - ) -) - -(define-enum Script - (in-module "Pango") - (c-name "PangoScript") - (gtype-id "PANGO_TYPE_SCRIPT") - (values - '("invalid-code" "PANGO_SCRIPT_INVALID_CODE") - '("common" "PANGO_SCRIPT_COMMON") - '("inherited" "PANGO_SCRIPT_INHERITED") - '("arabic" "PANGO_SCRIPT_ARABIC") - '("armenian" "PANGO_SCRIPT_ARMENIAN") - '("bengali" "PANGO_SCRIPT_BENGALI") - '("bopomofo" "PANGO_SCRIPT_BOPOMOFO") - '("cherokee" "PANGO_SCRIPT_CHEROKEE") - '("coptic" "PANGO_SCRIPT_COPTIC") - '("cyrillic" "PANGO_SCRIPT_CYRILLIC") - '("deseret" "PANGO_SCRIPT_DESERET") - '("devanagari" "PANGO_SCRIPT_DEVANAGARI") - '("ethiopic" "PANGO_SCRIPT_ETHIOPIC") - '("georgian" "PANGO_SCRIPT_GEORGIAN") - '("gothic" "PANGO_SCRIPT_GOTHIC") - '("greek" "PANGO_SCRIPT_GREEK") - '("gujarati" "PANGO_SCRIPT_GUJARATI") - '("gurmukhi" "PANGO_SCRIPT_GURMUKHI") - '("han" "PANGO_SCRIPT_HAN") - '("hangul" "PANGO_SCRIPT_HANGUL") - '("hebrew" "PANGO_SCRIPT_HEBREW") - '("hiragana" "PANGO_SCRIPT_HIRAGANA") - '("kannada" "PANGO_SCRIPT_KANNADA") - '("katakana" "PANGO_SCRIPT_KATAKANA") - '("khmer" "PANGO_SCRIPT_KHMER") - '("lao" "PANGO_SCRIPT_LAO") - '("latin" "PANGO_SCRIPT_LATIN") - '("malayalam" "PANGO_SCRIPT_MALAYALAM") - '("mongolian" "PANGO_SCRIPT_MONGOLIAN") - '("myanmar" "PANGO_SCRIPT_MYANMAR") - '("ogham" "PANGO_SCRIPT_OGHAM") - '("old-italic" "PANGO_SCRIPT_OLD_ITALIC") - '("oriya" "PANGO_SCRIPT_ORIYA") - '("runic" "PANGO_SCRIPT_RUNIC") - '("sinhala" "PANGO_SCRIPT_SINHALA") - '("syriac" "PANGO_SCRIPT_SYRIAC") - '("tamil" "PANGO_SCRIPT_TAMIL") - '("telugu" "PANGO_SCRIPT_TELUGU") - '("thaana" "PANGO_SCRIPT_THAANA") - '("thai" "PANGO_SCRIPT_THAI") - '("tibetan" "PANGO_SCRIPT_TIBETAN") - '("canadian-aboriginal" "PANGO_SCRIPT_CANADIAN_ABORIGINAL") - '("yi" "PANGO_SCRIPT_YI") - '("tagalog" "PANGO_SCRIPT_TAGALOG") - '("hanunoo" "PANGO_SCRIPT_HANUNOO") - '("buhid" "PANGO_SCRIPT_BUHID") - '("tagbanwa" "PANGO_SCRIPT_TAGBANWA") - '("braille" "PANGO_SCRIPT_BRAILLE") - '("cypriot" "PANGO_SCRIPT_CYPRIOT") - '("limbu" "PANGO_SCRIPT_LIMBU") - '("osmanya" "PANGO_SCRIPT_OSMANYA") - '("shavian" "PANGO_SCRIPT_SHAVIAN") - '("linear-b" "PANGO_SCRIPT_LINEAR_B") - '("tai-le" "PANGO_SCRIPT_TAI_LE") - '("ugaritic" "PANGO_SCRIPT_UGARITIC") - '("new-tai-lue" "PANGO_SCRIPT_NEW_TAI_LUE") - '("buginese" "PANGO_SCRIPT_BUGINESE") - '("glagolitic" "PANGO_SCRIPT_GLAGOLITIC") - '("tifinagh" "PANGO_SCRIPT_TIFINAGH") - '("syloti-nagri" "PANGO_SCRIPT_SYLOTI_NAGRI") - '("old-persian" "PANGO_SCRIPT_OLD_PERSIAN") - '("kharoshthi" "PANGO_SCRIPT_KHAROSHTHI") - ) -) - -(define-enum Stretch - (in-module "Pango") - (c-name "PangoStretch") - (gtype-id "PANGO_TYPE_STRETCH") - (values - '("ultra-condensed" "PANGO_STRETCH_ULTRA_CONDENSED") - '("extra-condensed" "PANGO_STRETCH_EXTRA_CONDENSED") - '("condensed" "PANGO_STRETCH_CONDENSED") - '("semi-condensed" "PANGO_STRETCH_SEMI_CONDENSED") - '("normal" "PANGO_STRETCH_NORMAL") - '("semi-expanded" "PANGO_STRETCH_SEMI_EXPANDED") - '("expanded" "PANGO_STRETCH_EXPANDED") - '("extra-expanded" "PANGO_STRETCH_EXTRA_EXPANDED") - '("ultra-expanded" "PANGO_STRETCH_ULTRA_EXPANDED") - ) -) - -(define-enum Style - (in-module "Pango") - (c-name "PangoStyle") - (gtype-id "PANGO_TYPE_STYLE") - (values - '("normal" "PANGO_STYLE_NORMAL") - '("oblique" "PANGO_STYLE_OBLIQUE") - '("italic" "PANGO_STYLE_ITALIC") - ) -) - -(define-enum TabAlign - (in-module "Pango") - (c-name "PangoTabAlign") - (gtype-id "PANGO_TYPE_TAB_ALIGN") - (values - '("left" "PANGO_TAB_LEFT") - ) -) - -(define-enum Underline - (in-module "Pango") - (c-name "PangoUnderline") - (gtype-id "PANGO_TYPE_UNDERLINE") - (values - '("none" "PANGO_UNDERLINE_NONE") - '("single" "PANGO_UNDERLINE_SINGLE") - '("double" "PANGO_UNDERLINE_DOUBLE") - '("low" "PANGO_UNDERLINE_LOW") - '("error" "PANGO_UNDERLINE_ERROR") - ) -) - -(define-enum Variant - (in-module "Pango") - (c-name "PangoVariant") - (gtype-id "PANGO_TYPE_VARIANT") - (values - '("normal" "PANGO_VARIANT_NORMAL") - '("small-caps" "PANGO_VARIANT_SMALL_CAPS") - ) -) - -(define-enum Weight - (in-module "Pango") - (c-name "PangoWeight") - (gtype-id "PANGO_TYPE_WEIGHT") - (values - '("ultralight" "PANGO_WEIGHT_ULTRALIGHT") - '("light" "PANGO_WEIGHT_LIGHT") - '("normal" "PANGO_WEIGHT_NORMAL") - '("semibold" "PANGO_WEIGHT_SEMIBOLD") - '("bold" "PANGO_WEIGHT_BOLD") - '("ultrabold" "PANGO_WEIGHT_ULTRABOLD") - '("heavy" "PANGO_WEIGHT_HEAVY") - ) -) - -(define-enum WrapMode - (in-module "Pango") - (c-name "PangoWrapMode") - (gtype-id "PANGO_TYPE_WRAP_MODE") - (values - '("word" "PANGO_WRAP_WORD") - '("char" "PANGO_WRAP_CHAR") - '("word-char" "PANGO_WRAP_WORD_CHAR") - ) -) - -(define-flags FontMask - (in-module "Pango") - (c-name "PangoFontMask") - (gtype-id "PANGO_TYPE_FONT_MASK") - (values - '("family" "PANGO_FONT_MASK_FAMILY") - '("style" "PANGO_FONT_MASK_STYLE") - '("variant" "PANGO_FONT_MASK_VARIANT") - '("weight" "PANGO_FONT_MASK_WEIGHT") - '("stretch" "PANGO_FONT_MASK_STRETCH") - '("size" "PANGO_FONT_MASK_SIZE") - ) -) - diff --git a/pango.defs b/pango.defs deleted file mode 100644 index 1b91550d..00000000 --- a/pango.defs +++ /dev/null @@ -1,3053 +0,0 @@ -;; -*- scheme -*- - -(include "pango-types.defs") - -;; From /opt/gtk2/include/pango-1.0/pango/pango-attributes.h - -(define-function pango_color_get_type - (c-name "pango_color_get_type") - (return-type "GType") -) - -(define-method copy - (of-object "PangoColor") - (c-name "pango_color_copy") - (return-type "PangoColor*") -) - -(define-method free - (of-object "PangoColor") - (c-name "pango_color_free") - (return-type "none") -) - -(define-function color_parse - (c-name "pango_color_parse") - (is-constructor-of "PangoColor") - (return-type "gboolean") - (parameters - '("const-char*" "spec") - ) -) - -(define-function pango_attr_type_register - (c-name "pango_attr_type_register") - (return-type "PangoAttrType") - (parameters - '("const-gchar*" "name") - ) -) - -(define-method copy - (of-object "PangoAttribute") - (c-name "pango_attribute_copy") - (return-type "PangoAttribute*") -) - -(define-method destroy - (of-object "PangoAttribute") - (c-name "pango_attribute_destroy") - (return-type "none") -) - -(define-method equal - (of-object "PangoAttribute") - (c-name "pango_attribute_equal") - (return-type "gboolean") - (parameters - '("const-PangoAttribute*" "attr2") - ) -) - -(define-function AttrLanguage - (c-name "pango_attr_language_new") - (return-type "PangoAttribute*") - (parameters - '("PangoLanguage*" "language") - ) -) - -(define-function AttrFamily - (c-name "pango_attr_family_new") - (return-type "PangoAttribute*") - (parameters - '("const-char*" "family") - ) -) - -(define-function AttrForeground - (c-name "pango_attr_foreground_new") - (return-type "PangoAttribute*") - (parameters - '("guint16" "red") - '("guint16" "green") - '("guint16" "blue") - ) -) - -(define-function AttrBackground - (c-name "pango_attr_background_new") - (return-type "PangoAttribute*") - (parameters - '("guint16" "red") - '("guint16" "green") - '("guint16" "blue") - ) -) - -(define-function AttrSize - (c-name "pango_attr_size_new") - (return-type "PangoAttribute*") - (parameters - '("int" "size") - ) -) - -(define-function AttrSizeAbsolute - (c-name "pango_attr_size_new_absolute") - (return-type "PangoAttribute*") - (parameters - '("int" "size") - ) -) - -(define-function AttrStyle - (c-name "pango_attr_style_new") - (return-type "PangoAttribute*") - (parameters - '("PangoStyle" "style") - ) -) - -(define-function AttrWeight - (c-name "pango_attr_weight_new") - (return-type "PangoAttribute*") - (parameters - '("PangoWeight" "weight") - ) -) - -(define-function AttrVariant - (c-name "pango_attr_variant_new") - (return-type "PangoAttribute*") - (parameters - '("PangoVariant" "variant") - ) -) - -(define-function AttrStretch - (c-name "pango_attr_stretch_new") - (return-type "PangoAttribute*") - (parameters - '("PangoStretch" "stretch") - ) -) - -(define-function AttrFontDesc - (c-name "pango_attr_font_desc_new") - (return-type "PangoAttribute*") - (parameters - '("const-PangoFontDescription*" "desc") - ) -) - -(define-function AttrUnderline - (c-name "pango_attr_underline_new") - (return-type "PangoAttribute*") - (parameters - '("PangoUnderline" "underline") - ) -) - -(define-function AttrUnderlineColor - (c-name "pango_attr_underline_color_new") - (return-type "PangoAttribute*") - (parameters - '("guint16" "red") - '("guint16" "green") - '("guint16" "blue") - ) -) - -(define-function AttrStrikethrough - (c-name "pango_attr_strikethrough_new") - (return-type "PangoAttribute*") - (parameters - '("gboolean" "strikethrough") - ) -) - -(define-function AttrStrikethroughColor - (c-name "pango_attr_strikethrough_color_new") - (return-type "PangoAttribute*") - (parameters - '("guint16" "red") - '("guint16" "green") - '("guint16" "blue") - ) -) - -(define-function AttrRise - (c-name "pango_attr_rise_new") - (return-type "PangoAttribute*") - (parameters - '("int" "rise") - ) -) - -(define-function AttrScale - (c-name "pango_attr_scale_new") - (return-type "PangoAttribute*") - (parameters - '("double" "scale_factor") - ) -) - -(define-function AttrFallback - (c-name "pango_attr_fallback_new") - (return-type "PangoAttribute*") - (parameters - '("gboolean" "fallback") - ) -) - -(define-function AttrLetterSpacing - (c-name "pango_attr_letter_spacing_new") - (return-type "PangoAttribute*") - (parameters - '("int" "letter_spacing") - ) -) - -(define-function AttrShape - (c-name "pango_attr_shape_new") - (return-type "PangoAttribute*") - (parameters - '("const-PangoRectangle*" "ink_rect") - '("const-PangoRectangle*" "logical_rect") - ) -) - -(define-function attr_shape_new_with_data - (c-name "pango_attr_shape_new_with_data") - (return-type "PangoAttribute*") - (parameters - '("const-PangoRectangle*" "ink_rect") - '("const-PangoRectangle*" "logical_rect") - '("gpointer" "data") - '("PangoAttrDataCopyFunc" "copy_func") - '("GDestroyNotify" "destroy_func") - ) -) - -(define-function pango_attr_list_get_type - (c-name "pango_attr_list_get_type") - (return-type "GType") -) - -(define-function pango_attr_list_new - (c-name "pango_attr_list_new") - (return-type "PangoAttrList*") - (is-constructor-of "PangoAttrList") -) - -(define-method ref - (of-object "PangoAttrList") - (c-name "pango_attr_list_ref") - (return-type "none") -) - -(define-method unref - (of-object "PangoAttrList") - (c-name "pango_attr_list_unref") - (return-type "none") -) - -(define-method copy - (of-object "PangoAttrList") - (c-name "pango_attr_list_copy") - (return-type "PangoAttrList*") -) - -(define-method insert - (of-object "PangoAttrList") - (c-name "pango_attr_list_insert") - (return-type "none") - (parameters - '("PangoAttribute*" "attr") - ) -) - -(define-method insert_before - (of-object "PangoAttrList") - (c-name "pango_attr_list_insert_before") - (return-type "none") - (parameters - '("PangoAttribute*" "attr") - ) -) - -(define-method change - (of-object "PangoAttrList") - (c-name "pango_attr_list_change") - (return-type "none") - (parameters - '("PangoAttribute*" "attr") - ) -) - -(define-method splice - (of-object "PangoAttrList") - (c-name "pango_attr_list_splice") - (return-type "none") - (parameters - '("PangoAttrList*" "other") - '("gint" "pos") - '("gint" "len") - ) -) - -(define-method filter - (of-object "PangoAttrList") - (c-name "pango_attr_list_filter") - (return-type "PangoAttrList*") - (parameters - '("PangoAttrFilterFunc" "func") - '("gpointer" "data") - ) -) - -(define-method get_iterator - (of-object "PangoAttrList") - (c-name "pango_attr_list_get_iterator") - (return-type "PangoAttrIterator*") -) - -(define-method range - (of-object "PangoAttrIterator") - (c-name "pango_attr_iterator_range") - (return-type "none") - (parameters - '("gint*" "start") - '("gint*" "end") - ) -) - -(define-method next - (of-object "PangoAttrIterator") - (c-name "pango_attr_iterator_next") - (return-type "gboolean") -) - -(define-method copy - (of-object "PangoAttrIterator") - (c-name "pango_attr_iterator_copy") - (return-type "PangoAttrIterator*") -) - -(define-method destroy - (of-object "PangoAttrIterator") - (c-name "pango_attr_iterator_destroy") - (return-type "none") -) - -(define-method get - (of-object "PangoAttrIterator") - (c-name "pango_attr_iterator_get") - (return-type "PangoAttribute*") - (parameters - '("PangoAttrType" "type") - ) -) - -(define-method get_font - (of-object "PangoAttrIterator") - (c-name "pango_attr_iterator_get_font") - (return-type "none") - (parameters - '("PangoFontDescription*" "desc") - '("PangoLanguage**" "language") - '("GSList**" "extra_attrs") - ) -) - -(define-method get_attrs - (of-object "PangoAttrIterator") - (c-name "pango_attr_iterator_get_attrs") - (return-type "GSList*") -) - -(define-function parse_markup - (c-name "pango_parse_markup") - (return-type "gboolean") - (parameters - '("const-char*" "markup_text") - '("int" "length") - '("gunichar" "accel_marker") - '("PangoAttrList**" "attr_list") - '("char**" "text") - '("gunichar*" "accel_char") - '("GError**" "error") - ) -) - -(define-virtual copy - (of-object "PangoAttr") - (return-type "PangoAttribute*") -) - -(define-virtual destroy - (of-object "PangoAttr") - (return-type "none") -) - -(define-virtual equal - (of-object "PangoAttr") - (return-type "gboolean") - (parameters - '("const-PangoAttribute*" "attr2") - ) -) - - - -;; From /opt/gtk2/include/pango-1.0/pango/pango-break.h - -(define-function break - (c-name "pango_break") - (return-type "none") - (parameters - '("const-gchar*" "text") - '("gint" "length") - '("PangoAnalysis*" "analysis") - '("PangoLogAttr*" "attrs") - ) -) - -(define-function find_paragraph_boundary - (c-name "pango_find_paragraph_boundary") - (return-type "none") - (parameters - '("const-gchar*" "text") - '("gint" "length") - '("gint*" "paragraph_delimiter_index") - '("gint*" "next_paragraph_start") - ) -) - -(define-function get_log_attrs - (c-name "pango_get_log_attrs") - (return-type "none") - (parameters - '("const-char*" "text") - '("int" "length") - '("int" "level") - '("PangoLanguage*" "language") - '("PangoLogAttr*" "log_attrs") - ) -) - -(define-function default_break - (c-name "pango_default_break") - (return-type "none") - (parameters - '("const-gchar*" "text") - '("int" "length") - '("PangoAnalysis*" "analysis") - '("PangoLogAttr*" "attrs") - '("int" "attrs_len") - ) -) - - - -;; From /opt/gtk2/include/pango-1.0/pango/pango-context.h - -(define-function context_get_type - (c-name "pango_context_get_type") - (return-type "GType") -) - -(define-function pango_context_new - (c-name "pango_context_new") - (return-type "PangoContext*") - (is-constructor-of "PangoContext") -) - -(define-method add_font_map - (of-object "PangoContext") - (c-name "pango_context_set_font_map") - (return-type "none") - (parameters - '("PangoFontMap*" "font_map") - ) -) - -(define-method get_font_map - (of-object "PangoContext") - (c-name "pango_context_get_font_map") - (return-type "PangoFontMap*") -) - -(define-method list_families - (of-object "PangoContext") - (c-name "pango_context_list_families") - (return-type "none") - (parameters - '("PangoFontFamily***" "families") - '("int*" "n_families") - ) -) - -(define-method load_font - (of-object "PangoContext") - (c-name "pango_context_load_font") - (return-type "PangoFont*") - (parameters - '("const-PangoFontDescription*" "desc") - ) -) - -(define-method load_fontset - (of-object "PangoContext") - (c-name "pango_context_load_fontset") - (return-type "PangoFontset*") - (parameters - '("const-PangoFontDescription*" "desc") - '("PangoLanguage*" "language") - ) -) - -(define-method get_metrics - (of-object "PangoContext") - (c-name "pango_context_get_metrics") - (return-type "PangoFontMetrics*") - (caller-owns-return #t) - (parameters - '("const-PangoFontDescription*" "desc") - '("PangoLanguage*" "language" (null-ok) (default "NULL")) - ) -) - -(define-method set_font_description - (of-object "PangoContext") - (c-name "pango_context_set_font_description") - (return-type "none") - (parameters - '("const-PangoFontDescription*" "desc") - ) -) - -(define-method get_font_description - (of-object "PangoContext") - (c-name "pango_context_get_font_description") - (return-type "PangoFontDescription*") -) - -(define-method get_language - (of-object "PangoContext") - (c-name "pango_context_get_language") - (return-type "PangoLanguage*") -) - -(define-method set_language - (of-object "PangoContext") - (c-name "pango_context_set_language") - (return-type "none") - (parameters - '("PangoLanguage*" "language") - ) -) - -(define-method set_base_dir - (of-object "PangoContext") - (c-name "pango_context_set_base_dir") - (return-type "none") - (parameters - '("PangoDirection" "direction") - ) -) - -(define-method get_base_dir - (of-object "PangoContext") - (c-name "pango_context_get_base_dir") - (return-type "PangoDirection") -) - -(define-method set_matrix - (of-object "PangoContext") - (c-name "pango_context_set_matrix") - (return-type "none") - (parameters - '("const-PangoMatrix*" "matrix") - ) -) - -(define-method get_matrix - (of-object "PangoContext") - (c-name "pango_context_get_matrix") - (return-type "const-PangoMatrix*") -) - -(define-function itemize - (c-name "pango_itemize") - (return-type "GList*") - (parameters - '("PangoContext*" "context") - '("const-char*" "text") - '("int" "start_index") - '("int" "length") - '("PangoAttrList*" "attrs") - '("PangoAttrIterator*" "cached_iter" (null-ok) (default "NULL")) - ) -) - -(define-function itemize_with_base_dir - (c-name "pango_itemize_with_base_dir") - (return-type "GList*") - (parameters - '("PangoContext*" "context") - '("PangoDirection" "base_dir") - '("const-char*" "text") - '("int" "start_index") - '("int" "length") - '("PangoAttrList*" "attrs") - '("PangoAttrIterator*" "cached_iter") - ) -) - - - -;; From /opt/gtk2/include/pango-1.0/pango/pango-coverage.h - -(define-function coverage_new - (c-name "pango_coverage_new") - (is-constructor-of "PangoCoverage") - (return-type "PangoCoverage*") -) - -(define-method ref - (of-object "PangoCoverage") - (c-name "pango_coverage_ref") - (return-type "PangoCoverage*") -) - -(define-method unref - (of-object "PangoCoverage") - (c-name "pango_coverage_unref") - (return-type "none") -) - -(define-method copy - (of-object "PangoCoverage") - (c-name "pango_coverage_copy") - (return-type "PangoCoverage*") -) - -(define-method get - (of-object "PangoCoverage") - (c-name "pango_coverage_get") - (return-type "PangoCoverageLevel") - (parameters - '("int" "index") - ) -) - -(define-method set - (of-object "PangoCoverage") - (c-name "pango_coverage_set") - (return-type "none") - (parameters - '("int" "index") - '("PangoCoverageLevel" "level") - ) -) - -(define-method max - (of-object "PangoCoverage") - (c-name "pango_coverage_max") - (return-type "none") - (parameters - '("PangoCoverage*" "other") - ) -) - -(define-method to_bytes - (of-object "PangoCoverage") - (c-name "pango_coverage_to_bytes") - (return-type "none") - (parameters - '("guchar**" "bytes") - '("int*" "n_bytes") - ) -) - -(define-function coverage_from_bytes - (c-name "pango_coverage_from_bytes") - (is-constructor-of "PangoCoverage") - (return-type "PangoCoverage*") - (parameters - '("guchar*" "bytes") - '("int" "n_bytes") - ) -) - - - -;; From pango-engine.h - -(ifdef PANGO_ENABLE_ENGINE - -(define-function engine_get_type - (c-name "pango_engine_get_type") - (return-type "GType") -) - -(define-function engine_lang_get_type - (c-name "pango_engine_lang_get_type") - (return-type "GType") -) - -(define-function engine_shape_get_type - (c-name "pango_engine_shape_get_type") - (return-type "GType") -) - -(define-virtual script_break - (of-object "PangoEngineLang") - (return-type "none") - (parameters - '("const-char*" "text") - '("int" "len") - '("PangoAnalysis*" "analysis") - '("PangoLogAttr*" "attrs") - '("int" "attrs_len") - ) -) - -(define-virtual script_shape - (of-object "PangoEngineShape") - (return-type "none") - (parameters - '("PangoFont*" "font") - '("const-char*" "text") - '("int" "length") - '("PangoAnalysis*" "analysis") - '("PangoGlyphString*" "glyphs") - ) -) - -(define-virtual covers - (of-object "PangoEngineShape") - (return-type "PangoCoverageLevel") - (parameters - '("PangoFont*" "font") - '("PangoLanguage*" "language") - '("gunichar" "wc") - ) -) -) ;; PANGO_ENABLE_ENGINE - - -;; From pango-enum-types.h - -(define-function attr_type_get_type - (c-name "pango_attr_type_get_type") - (return-type "GType") -) - -(define-function underline_get_type - (c-name "pango_underline_get_type") - (return-type "GType") -) - -(define-function coverage_level_get_type - (c-name "pango_coverage_level_get_type") - (return-type "GType") -) - -(define-function style_get_type - (c-name "pango_style_get_type") - (return-type "GType") -) - -(define-function variant_get_type - (c-name "pango_variant_get_type") - (return-type "GType") -) - -(define-function weight_get_type - (c-name "pango_weight_get_type") - (return-type "GType") -) - -(define-function stretch_get_type - (c-name "pango_stretch_get_type") - (return-type "GType") -) - -(define-function font_mask_get_type - (c-name "pango_font_mask_get_type") - (return-type "GType") -) - -(define-function alignment_get_type - (c-name "pango_alignment_get_type") - (return-type "GType") -) - -(define-function wrap_mode_get_type - (c-name "pango_wrap_mode_get_type") - (return-type "GType") -) - -(define-function ellipsize_mode_get_type - (c-name "pango_ellipsize_mode_get_type") - (return-type "GType") -) - -(define-function render_part_get_type - (c-name "pango_render_part_get_type") - (return-type "GType") -) - -(define-function script_get_type - (c-name "pango_script_get_type") - (return-type "GType") -) - -(define-function tab_align_get_type - (c-name "pango_tab_align_get_type") - (return-type "GType") -) - -(define-function direction_get_type - (c-name "pango_direction_get_type") - (return-type "GType") -) - - - -;; From /opt/gtk2/include/pango-1.0/pango/pango-font.h - - -(define-function font_description_get_type - (c-name "pango_font_description_get_type") - (return-type "GType") -) - -(define-function pango_font_description_new - (c-name "pango_font_description_new") - (is-constructor-of "PangoFontDescription") - (return-type "PangoFontDescription*") -) - -(define-method copy - (of-object "PangoFontDescription") - (c-name "pango_font_description_copy") - (return-type "PangoFontDescription*") -) - -(define-method copy_static - (of-object "PangoFontDescription") - (c-name "pango_font_description_copy_static") - (return-type "PangoFontDescription*") -) - -(define-method hash - (of-object "PangoFontDescription") - (c-name "pango_font_description_hash") - (return-type "guint") -) - -(define-method equal - (of-object "PangoFontDescription") - (c-name "pango_font_description_equal") - (return-type "gboolean") - (parameters - '("const-PangoFontDescription*" "desc2") - ) -) - -(define-method free - (of-object "PangoFontDescription") - (c-name "pango_font_description_free") - (return-type "none") -) - -(define-function pango_font_descriptions_free - (c-name "pango_font_descriptions_free") - (return-type "none") - (parameters - '("PangoFontDescription**" "descs") - '("int" "n_descs") - ) -) - -(define-method set_family - (of-object "PangoFontDescription") - (c-name "pango_font_description_set_family") - (return-type "none") - (parameters - '("const-char*" "family") - ) -) - -(define-method set_family_static - (of-object "PangoFontDescription") - (c-name "pango_font_description_set_family_static") - (return-type "none") - (parameters - '("const-char*" "family") - ) -) - -(define-method get_family - (of-object "PangoFontDescription") - (c-name "pango_font_description_get_family") - (return-type "const-char*") -) - -(define-method set_style - (of-object "PangoFontDescription") - (c-name "pango_font_description_set_style") - (return-type "none") - (parameters - '("PangoStyle" "style") - ) -) - -(define-method get_style - (of-object "PangoFontDescription") - (c-name "pango_font_description_get_style") - (return-type "PangoStyle") -) - -(define-method set_variant - (of-object "PangoFontDescription") - (c-name "pango_font_description_set_variant") - (return-type "none") - (parameters - '("PangoVariant" "variant") - ) -) - -(define-method get_variant - (of-object "PangoFontDescription") - (c-name "pango_font_description_get_variant") - (return-type "PangoVariant") -) - -(define-method set_weight - (of-object "PangoFontDescription") - (c-name "pango_font_description_set_weight") - (return-type "none") - (parameters - '("PangoWeight" "weight") - ) -) - -(define-method get_weight - (of-object "PangoFontDescription") - (c-name "pango_font_description_get_weight") - (return-type "PangoWeight") -) - -(define-method set_stretch - (of-object "PangoFontDescription") - (c-name "pango_font_description_set_stretch") - (return-type "none") - (parameters - '("PangoStretch" "stretch") - ) -) - -(define-method get_stretch - (of-object "PangoFontDescription") - (c-name "pango_font_description_get_stretch") - (return-type "PangoStretch") -) - -(define-method set_size - (of-object "PangoFontDescription") - (c-name "pango_font_description_set_size") - (return-type "none") - (parameters - '("gint" "size") - ) -) - -(define-method get_size - (of-object "PangoFontDescription") - (c-name "pango_font_description_get_size") - (return-type "gint") -) - -(define-method set_absolute_size - (of-object "PangoFontDescription") - (c-name "pango_font_description_set_absolute_size") - (return-type "none") - (parameters - '("double" "size") - ) -) - -(define-method get_size_is_absolute - (of-object "PangoFontDescription") - (c-name "pango_font_description_get_size_is_absolute") - (return-type "gboolean") -) - -(define-method get_set_fields - (of-object "PangoFontDescription") - (c-name "pango_font_description_get_set_fields") - (return-type "PangoFontMask") -) - -(define-method unset_fields - (of-object "PangoFontDescription") - (c-name "pango_font_description_unset_fields") - (return-type "none") - (parameters - '("PangoFontMask" "to_unset") - ) -) - -(define-method merge - (of-object "PangoFontDescription") - (c-name "pango_font_description_merge") - (return-type "none") - (parameters - '("const-PangoFontDescription*" "desc_to_merge") - '("gboolean" "replace_existing") - ) -) - -(define-method merge_static - (of-object "PangoFontDescription") - (c-name "pango_font_description_merge_static") - (return-type "none") - (parameters - '("const-PangoFontDescription*" "desc_to_merge") - '("gboolean" "replace_existing") - ) -) - -(define-method better_match - (of-object "PangoFontDescription") - (c-name "pango_font_description_better_match") - (return-type "gboolean") - (parameters - '("const-PangoFontDescription*" "old_match" (null-ok) (default "NULL")) - '("const-PangoFontDescription*" "new_match") - ) -) - -(define-function pango_font_description_from_string - (c-name "pango_font_description_from_string") - (is-constructor-of "PangoFontDescription") - (return-type "PangoFontDescription*") - (parameters - '("const-char*" "str") - ) -) - -(define-method to_string - (of-object "PangoFontDescription") - (c-name "pango_font_description_to_string") - (return-type "char*") -) - -(define-method to_filename - (of-object "PangoFontDescription") - (c-name "pango_font_description_to_filename") - (return-type "char*") -) - -(define-function pango_font_metrics_get_type - (c-name "pango_font_metrics_get_type") - (return-type "GType") -) - -(define-method ref - (of-object "PangoFontMetrics") - (c-name "pango_font_metrics_ref") - (return-type "PangoFontMetrics*") -) - -(define-method unref - (of-object "PangoFontMetrics") - (c-name "pango_font_metrics_unref") - (return-type "none") -) - -(define-method get_ascent - (of-object "PangoFontMetrics") - (c-name "pango_font_metrics_get_ascent") - (return-type "int") -) - -(define-method get_descent - (of-object "PangoFontMetrics") - (c-name "pango_font_metrics_get_descent") - (return-type "int") -) - -(define-method get_approximate_char_width - (of-object "PangoFontMetrics") - (c-name "pango_font_metrics_get_approximate_char_width") - (return-type "int") -) - -(define-method get_approximate_digit_width - (of-object "PangoFontMetrics") - (c-name "pango_font_metrics_get_approximate_digit_width") - (return-type "int") -) - -(define-method get_underline_position - (of-object "PangoFontMetrics") - (c-name "pango_font_metrics_get_underline_position") - (return-type "int") -) - -(define-method get_underline_thickness - (of-object "PangoFontMetrics") - (c-name "pango_font_metrics_get_underline_thickness") - (return-type "int") -) - -(define-method get_strikethrough_position - (of-object "PangoFontMetrics") - (c-name "pango_font_metrics_get_strikethrough_position") - (return-type "int") -) - -(define-method get_strikethrough_thickness - (of-object "PangoFontMetrics") - (c-name "pango_font_metrics_get_strikethrough_thickness") - (return-type "int") -) - -(ifdef PANGO_ENABLE_BACKEND - -(define-function font_metrics_new - (c-name "pango_font_metrics_new") - (is-constructor-of "PangoFontMetrics") - (return-type "PangoFontMetrics*") -) -) ;; PANGO_ENABLE_BACKEND - -(define-function pango_font_family_get_type - (c-name "pango_font_family_get_type") - (return-type "GType") -) - -(define-method list_faces - (of-object "PangoFontFamily") - (c-name "pango_font_family_list_faces") - (return-type "none") - (parameters - '("PangoFontFace***" "faces") - '("int*" "n_faces") - ) -) - -(define-method get_name - (of-object "PangoFontFamily") - (c-name "pango_font_family_get_name") - (return-type "const-char*") -) - -(define-method is_monospace - (of-object "PangoFontFamily") - (c-name "pango_font_family_is_monospace") - (return-type "gboolean") -) - -(define-function pango_font_face_get_type - (c-name "pango_font_face_get_type") - (return-type "GType") -) - -(define-method describe - (of-object "PangoFontFace") - (c-name "pango_font_face_describe") - (return-type "PangoFontDescription*") -) - -(define-method get_face_name - (of-object "PangoFontFace") - (c-name "pango_font_face_get_face_name") - (return-type "const-char*") -) - -(define-method list_sizes - (of-object "PangoFontFace") - (c-name "pango_font_face_list_sizes") - (return-type "none") - (parameters - '("int**" "sizes") - '("int*" "n_sizes") - ) -) - -(define-function pango_font_get_type - (c-name "pango_font_get_type") - (return-type "GType") -) - -(define-method describe - (of-object "PangoFont") - (c-name "pango_font_describe") - (return-type "PangoFontDescription*") -) - -(define-method get_coverage - (of-object "PangoFont") - (c-name "pango_font_get_coverage") - (return-type "PangoCoverage*") - (parameters - '("PangoLanguage*" "language") - ) -) - -(define-method find_shaper - (of-object "PangoFont") - (c-name "pango_font_find_shaper") - (return-type "PangoEngineShape*") - (parameters - '("PangoLanguage*" "language") - '("guint32" "ch") - ) -) - -(define-method get_metrics - (of-object "PangoFont") - (c-name "pango_font_get_metrics") - (return-type "PangoFontMetrics*") - (parameters - '("PangoLanguage*" "language" (null-ok) (default "NULL")) - ) -) - -(define-method get_glyph_extents - (of-object "PangoFont") - (c-name "pango_font_get_glyph_extents") - (return-type "none") - (parameters - '("PangoGlyph" "glyph") - '("PangoRectangle*" "ink_rect") - '("PangoRectangle*" "logical_rect") - ) -) - -(define-method get_font_map - (of-object "PangoFont") - (c-name "pango_font_get_font_map") - (return-type "PangoFontMap*") -) - -(define-virtual list_faces - (of-object "PangoFontFamily") - (return-type "none") - (parameters - '("PangoFontFace***" "faces") - '("int*" "n_faces") - ) -) - -(define-virtual get_name - (of-object "PangoFontFamily") - (return-type "const-char*") -) - -(define-virtual is_monospace - (of-object "PangoFontFamily") - (return-type "gboolean") -) - -(define-virtual get_face_name - (of-object "PangoFontFace") - (return-type "const-char*") -) - -(define-virtual describe - (of-object "PangoFontFace") - (return-type "PangoFontDescription*") -) - -(define-virtual list_sizes - (of-object "PangoFontFace") - (return-type "none") - (parameters - '("int**" "sizes") - '("int*" "n_sizes") - ) -) - -(define-virtual describe - (of-object "PangoFont") - (return-type "PangoFontDescription*") -) - -(define-virtual get_coverage - (of-object "PangoFont") - (return-type "PangoCoverage*") - (parameters - '("PangoLanguage*" "lang") - ) -) - -(define-virtual find_shaper - (of-object "PangoFont") - (return-type "PangoEngineShape*") - (parameters - '("PangoLanguage*" "lang") - '("guint32" "ch") - ) -) - -(define-virtual get_glyph_extents - (of-object "PangoFont") - (return-type "none") - (parameters - '("PangoGlyph" "glyph") - '("PangoRectangle*" "ink_rect") - '("PangoRectangle*" "logical_rect") - ) -) - -(define-virtual get_metrics - (of-object "PangoFont") - (return-type "PangoFontMetrics*") - (parameters - '("PangoLanguage*" "language") - ) -) - -(define-virtual get_font_map - (of-object "PangoFont") - (return-type "PangoFontMap*") -) - - - - - -;; From /opt/gtk2/include/pango-1.0/pango/pango-fontmap.h - -(define-function font_map_get_type - (c-name "pango_font_map_get_type") - (return-type "GType") -) - -(define-method load_font - (of-object "PangoFontMap") - (c-name "pango_font_map_load_font") - (return-type "PangoFont*") - (parameters - '("PangoContext*" "context") - '("const-PangoFontDescription*" "desc") - ) -) - -(define-method load_fontset - (of-object "PangoFontMap") - (c-name "pango_font_map_load_fontset") - (return-type "PangoFontset*") - (parameters - '("PangoContext*" "context") - '("const-PangoFontDescription*" "desc") - '("PangoLanguage*" "language") - ) -) - -(define-method list_families - (of-object "PangoFontMap") - (c-name "pango_font_map_list_families") - (return-type "none") - (parameters - '("PangoFontFamily***" "families") - '("int*" "n_families") - ) -) - -(define-method get_shape_engine_type - (of-object "PangoFontMap") - (c-name "pango_font_map_get_shape_engine_type") - (return-type "const-char*") -) - -(define-virtual load_font - (of-object "PangoFontMap") - (return-type "PangoFont*") - (parameters - '("PangoContext*" "context") - '("const-PangoFontDescription*" "desc") - ) -) - -(define-virtual list_families - (of-object "PangoFontMap") - (return-type "none") - (parameters - '("PangoFontFamily***" "families") - '("int*" "n_families") - ) -) - -(define-virtual load_fontset - (of-object "PangoFontMap") - (return-type "PangoFontset*") - (parameters - '("PangoContext*" "context") - '("const-PangoFontDescription*" "desc") - '("PangoLanguage*" "language") - ) -) - - - -;; From /opt/gtk2/include/pango-1.0/pango/pango-fontset.h - -(define-function fontset_get_type - (c-name "pango_fontset_get_type") - (return-type "GType") -) - -(define-method get_font - (of-object "PangoFontset") - (c-name "pango_fontset_get_font") - (return-type "PangoFont*") - (parameters - '("guint" "wc") - ) -) - -(define-method get_metrics - (of-object "PangoFontset") - (c-name "pango_fontset_get_metrics") - (return-type "PangoFontMetrics*") -) - -(define-method foreach - (of-object "PangoFontset") - (c-name "pango_fontset_foreach") - (return-type "none") - (parameters - '("PangoFontsetForeachFunc" "func") - '("gpointer" "data") - ) -) - -(define-function fontset_simple_get_type - (c-name "pango_fontset_simple_get_type") - (return-type "GType") -) - -(define-function pango_fontset_simple_new - (c-name "pango_fontset_simple_new") - (is-constructor-of "PangoFontsetSimple") - (return-type "PangoFontsetSimple*") - (parameters - '("PangoLanguage*" "language") - ) -) - -(define-method append - (of-object "PangoFontsetSimple") - (c-name "pango_fontset_simple_append") - (return-type "none") - (parameters - '("PangoFont*" "font") - ) -) - -(define-method size - (of-object "PangoFontsetSimple") - (c-name "pango_fontset_simple_size") - (return-type "int") -) - -(define-virtual get_font - (of-object "PangoFontset") - (return-type "PangoFont*") - (parameters - '("guint" "wc") - ) -) - -(define-virtual get_metrics - (of-object "PangoFontset") - (return-type "PangoFontMetrics*") -) - -(define-virtual get_language - (of-object "PangoFontset") - (return-type "PangoLanguage*") -) - -(define-virtual foreach - (of-object "PangoFontset") - (return-type "none") - (parameters - '("PangoFontsetForeachFunc" "func") - '("gpointer" "data") - ) -) - - - -;; From pango-glyph-item.h - -(define-method split - (of-object "PangoGlyphItem") - (c-name "pango_glyph_item_split") - (return-type "PangoGlyphItem*") - (parameters - '("const-char*" "text") - '("int" "split_index") - ) -) - -(define-method free - (of-object "PangoGlyphItem") - (c-name "pango_glyph_item_free") - (return-type "none") -) - -(define-method apply_attrs - (of-object "PangoGlyphItem") - (c-name "pango_glyph_item_apply_attrs") - (return-type "GSList*") - (parameters - '("const-char*" "text") - '("PangoAttrList*" "list") - ) -) - -(define-method letter_space - (of-object "PangoGlyphItem") - (c-name "pango_glyph_item_letter_space") - (return-type "none") - (parameters - '("const-char*" "text") - '("PangoLogAttr*" "log_attrs") - '("int" "letter_spacing") - ) -) - - - -;; From /opt/gtk2/include/pango-1.0/pango/pango-glyph.h - -(define-function pango_glyph_string_new - (c-name "pango_glyph_string_new") - (is-constructor-of "PangoGlyphString") - (return-type "PangoGlyphString*") -) - -(define-method set_size - (of-object "PangoGlyphString") - (c-name "pango_glyph_string_set_size") - (return-type "none") - (parameters - '("gint" "new_len") - ) -) - -(define-function pango_glyph_string_get_type - (c-name "pango_glyph_string_get_type") - (return-type "GType") -) - -(define-method copy - (of-object "PangoGlyphString") - (c-name "pango_glyph_string_copy") - (return-type "PangoGlyphString*") -) - -(define-method free - (of-object "PangoGlyphString") - (c-name "pango_glyph_string_free") - (return-type "none") -) - -(define-method extents - (of-object "PangoGlyphString") - (c-name "pango_glyph_string_extents") - (return-type "none") - (parameters - '("PangoFont*" "font") - '("PangoRectangle*" "ink_rect") - '("PangoRectangle*" "logical_rect") - ) -) - -(define-method extents_range - (of-object "PangoGlyphString") - (c-name "pango_glyph_string_extents_range") - (return-type "none") - (parameters - '("int" "start") - '("int" "end") - '("PangoFont*" "font") - '("PangoRectangle*" "ink_rect") - '("PangoRectangle*" "logical_rect") - ) -) - -(define-method get_logical_widths - (of-object "PangoGlyphString") - (c-name "pango_glyph_string_get_logical_widths") - (return-type "none") - (parameters - '("const-char*" "text") - '("int" "length") - '("int" "embedding_level") - '("int*" "logical_widths") - ) -) - -(define-method index_to_x - (of-object "PangoGlyphString") - (c-name "pango_glyph_string_index_to_x") - (return-type "none") - (parameters - '("char*" "text") - '("int" "length") - '("PangoAnalysis*" "analysis") - '("int" "index") - '("gboolean" "trailing") - '("int*" "x_pos") - ) -) - -(define-method x_to_index - (of-object "PangoGlyphString") - (c-name "pango_glyph_string_x_to_index") - (return-type "none") - (parameters - '("char*" "text") - '("int" "length") - '("PangoAnalysis*" "analysis") - '("int" "x_pos") - '("int*" "index") - '("int*" "trailing") - ) -) - -(define-function shape - (c-name "pango_shape") - (return-type "none") - (parameters - '("const-gchar*" "text") - '("gint" "length") - '("PangoAnalysis*" "analysis") - '("PangoGlyphString*" "glyphs") - ) -) - -(define-function reorder_items - (c-name "pango_reorder_items") - (return-type "GList*") - (parameters - '("GList*" "logical_items") - ) -) - - - -;; From pango-item.h - -(define-function item_get_type - (c-name "pango_item_get_type") - (return-type "GType") -) - -(define-function item_new - (c-name "pango_item_new") - (is-constructor-of "PangoItem") - (return-type "PangoItem*") -) - -(define-method copy - (of-object "PangoItem") - (c-name "pango_item_copy") - (return-type "PangoItem*") -) - -(define-method free - (of-object "PangoItem") - (c-name "pango_item_free") - (return-type "none") -) - -(define-method split - (of-object "PangoItem") - (c-name "pango_item_split") - (return-type "PangoItem*") - (parameters - '("int" "split_index") - '("int" "split_offset") - ) -) - - - -;; From /opt/gtk2/include/pango-1.0/pango/pango-layout.h - -(define-function pango_layout_get_type - (c-name "pango_layout_get_type") - (return-type "GType") -) - -(define-function pango_layout_new - (c-name "pango_layout_new") - (is-constructor-of "PangoLayout") - (return-type "PangoLayout*") - (parameters - '("PangoContext*" "context") - ) -) - -(define-method copy - (of-object "PangoLayout") - (c-name "pango_layout_copy") - (return-type "PangoLayout*") -) - -(define-method get_context - (of-object "PangoLayout") - (c-name "pango_layout_get_context") - (return-type "PangoContext*") -) - -(define-method set_attributes - (of-object "PangoLayout") - (c-name "pango_layout_set_attributes") - (return-type "none") - (parameters - '("PangoAttrList*" "attrs") - ) -) - -(define-method get_attributes - (of-object "PangoLayout") - (c-name "pango_layout_get_attributes") - (return-type "PangoAttrList*") -) - -(define-method set_text - (of-object "PangoLayout") - (c-name "pango_layout_set_text") - (return-type "none") - (parameters - '("const-char*" "text") - '("int" "length") - ) -) - -(define-method get_text - (of-object "PangoLayout") - (c-name "pango_layout_get_text") - (return-type "const-char*") -) - -(define-method set_markup - (of-object "PangoLayout") - (c-name "pango_layout_set_markup") - (return-type "none") - (parameters - '("const-char*" "markup") - '("int" "length") - ) -) - -(define-method set_markup_with_accel - (of-object "PangoLayout") - (c-name "pango_layout_set_markup_with_accel") - (return-type "none") - (parameters - '("const-char*" "markup") - '("int" "length") - '("gunichar" "accel_marker") - '("gunichar*" "accel_char") - ) -) - -(define-method set_font_description - (of-object "PangoLayout") - (c-name "pango_layout_set_font_description") - (return-type "none") - (parameters - '("const-PangoFontDescription*" "desc" (null-ok)) - ) -) - -(define-method get_font_description - (of-object "PangoLayout") - (c-name "pango_layout_get_font_description") - (return-type "const-PangoFontDescription*") -) - -(define-method set_width - (of-object "PangoLayout") - (c-name "pango_layout_set_width") - (return-type "none") - (parameters - '("int" "width") - ) -) - -(define-method get_width - (of-object "PangoLayout") - (c-name "pango_layout_get_width") - (return-type "int") -) - -(define-method set_wrap - (of-object "PangoLayout") - (c-name "pango_layout_set_wrap") - (return-type "none") - (parameters - '("PangoWrapMode" "wrap") - ) -) - -(define-method get_wrap - (of-object "PangoLayout") - (c-name "pango_layout_get_wrap") - (return-type "PangoWrapMode") -) - -(define-method set_indent - (of-object "PangoLayout") - (c-name "pango_layout_set_indent") - (return-type "none") - (parameters - '("int" "indent") - ) -) - -(define-method get_indent - (of-object "PangoLayout") - (c-name "pango_layout_get_indent") - (return-type "int") -) - -(define-method set_spacing - (of-object "PangoLayout") - (c-name "pango_layout_set_spacing") - (return-type "none") - (parameters - '("int" "spacing") - ) -) - -(define-method get_spacing - (of-object "PangoLayout") - (c-name "pango_layout_get_spacing") - (return-type "int") -) - -(define-method set_justify - (of-object "PangoLayout") - (c-name "pango_layout_set_justify") - (return-type "none") - (parameters - '("gboolean" "justify") - ) -) - -(define-method get_justify - (of-object "PangoLayout") - (c-name "pango_layout_get_justify") - (return-type "gboolean") -) - -(define-method set_auto_dir - (of-object "PangoLayout") - (c-name "pango_layout_set_auto_dir") - (return-type "none") - (parameters - '("gboolean" "auto_dir") - ) -) - -(define-method get_auto_dir - (of-object "PangoLayout") - (c-name "pango_layout_get_auto_dir") - (return-type "gboolean") -) - -(define-method set_alignment - (of-object "PangoLayout") - (c-name "pango_layout_set_alignment") - (return-type "none") - (parameters - '("PangoAlignment" "alignment") - ) -) - -(define-method get_alignment - (of-object "PangoLayout") - (c-name "pango_layout_get_alignment") - (return-type "PangoAlignment") -) - -(define-method set_tabs - (of-object "PangoLayout") - (c-name "pango_layout_set_tabs") - (return-type "none") - (parameters - '("PangoTabArray*" "tabs" (null-ok)) - ) -) - -(define-method get_tabs - (of-object "PangoLayout") - (c-name "pango_layout_get_tabs") - (return-type "PangoTabArray*") -) - -(define-method set_single_paragraph_mode - (of-object "PangoLayout") - (c-name "pango_layout_set_single_paragraph_mode") - (return-type "none") - (parameters - '("gboolean" "setting") - ) -) - -(define-method get_single_paragraph_mode - (of-object "PangoLayout") - (c-name "pango_layout_get_single_paragraph_mode") - (return-type "gboolean") -) - -(define-method set_ellipsize - (of-object "PangoLayout") - (c-name "pango_layout_set_ellipsize") - (return-type "none") - (parameters - '("PangoEllipsizeMode" "ellipsize") - ) -) - -(define-method get_ellipsize - (of-object "PangoLayout") - (c-name "pango_layout_get_ellipsize") - (return-type "PangoEllipsizeMode") -) - -(define-method context_changed - (of-object "PangoLayout") - (c-name "pango_layout_context_changed") - (return-type "none") -) - -(define-method get_log_attrs - (of-object "PangoLayout") - (c-name "pango_layout_get_log_attrs") - (return-type "none") - (parameters - '("PangoLogAttr**" "attrs") - '("gint*" "n_attrs") - ) -) - -(define-method index_to_pos - (of-object "PangoLayout") - (c-name "pango_layout_index_to_pos") - (return-type "none") - (parameters - '("int" "index") - '("PangoRectangle*" "pos") - ) -) - -(define-method get_cursor_pos - (of-object "PangoLayout") - (c-name "pango_layout_get_cursor_pos") - (return-type "none") - (parameters - '("int" "index") - '("PangoRectangle*" "strong_pos") - '("PangoRectangle*" "weak_pos") - ) -) - -(define-method move_cursor_visually - (of-object "PangoLayout") - (c-name "pango_layout_move_cursor_visually") - (return-type "none") - (parameters - '("gboolean" "strong") - '("int" "old_index") - '("int" "old_trailing") - '("int" "direction") - '("int*" "new_index") - '("int*" "new_trailing") - ) -) - -(define-method xy_to_index - (of-object "PangoLayout") - (c-name "pango_layout_xy_to_index") - (return-type "gboolean") - (parameters - '("int" "x") - '("int" "y") - '("int*" "index") - '("int*" "trailing") - ) -) - -(define-method get_extents - (of-object "PangoLayout") - (c-name "pango_layout_get_extents") - (return-type "none") - (parameters - '("PangoRectangle*" "ink_rect") - '("PangoRectangle*" "logical_rect") - ) -) - -(define-method get_pixel_extents - (of-object "PangoLayout") - (c-name "pango_layout_get_pixel_extents") - (return-type "none") - (parameters - '("PangoRectangle*" "ink_rect") - '("PangoRectangle*" "logical_rect") - ) -) - -(define-method get_size - (of-object "PangoLayout") - (c-name "pango_layout_get_size") - (return-type "none") - (parameters - '("int*" "width") - '("int*" "height") - ) -) - -(define-method get_pixel_size - (of-object "PangoLayout") - (c-name "pango_layout_get_pixel_size") - (return-type "none") - (parameters - '("int*" "width") - '("int*" "height") - ) -) - -(define-method get_line_count - (of-object "PangoLayout") - (c-name "pango_layout_get_line_count") - (return-type "int") -) - -(define-method get_line - (of-object "PangoLayout") - (c-name "pango_layout_get_line") - (return-type "PangoLayoutLine*") - (parameters - '("int" "line") - ) -) - -(define-method get_lines - (of-object "PangoLayout") - (c-name "pango_layout_get_lines") - (return-type "GSList*") -) - -(define-function layout_line_get_type - (c-name "pango_layout_line_get_type") - (return-type "GType") -) - -(define-method ref - (of-object "PangoLayoutLine") - (c-name "pango_layout_line_ref") - (return-type "PangoLayoutLine*") -) - -(define-method unref - (of-object "PangoLayoutLine") - (c-name "pango_layout_line_unref") - (return-type "none") -) - -(define-method x_to_index - (of-object "PangoLayoutLine") - (c-name "pango_layout_line_x_to_index") - (return-type "gboolean") - (parameters - '("int" "x_pos") - '("int*" "index") - '("int*" "trailing") - ) -) - -(define-method index_to_x - (of-object "PangoLayoutLine") - (c-name "pango_layout_line_index_to_x") - (return-type "none") - (parameters - '("int" "index") - '("gboolean" "trailing") - '("int*" "x_pos") - ) -) - -(define-method get_x_ranges - (of-object "PangoLayoutLine") - (c-name "pango_layout_line_get_x_ranges") - (return-type "none") - (parameters - '("int" "start_index") - '("int" "end_index") - '("int**" "ranges") - '("int*" "n_ranges") - ) -) - -(define-method get_extents - (of-object "PangoLayoutLine") - (c-name "pango_layout_line_get_extents") - (return-type "none") - (parameters - '("PangoRectangle*" "ink_rect") - '("PangoRectangle*" "logical_rect") - ) -) - -(define-method get_pixel_extents - (of-object "PangoLayoutLine") - (c-name "pango_layout_line_get_pixel_extents") - (return-type "none") - (parameters - '("PangoRectangle*" "ink_rect") - '("PangoRectangle*" "logical_rect") - ) -) - -(define-function pango_layout_iter_get_type - (c-name "pango_layout_iter_get_type") - (return-type "GType") -) - -(define-method get_iter - (of-object "PangoLayout") - (c-name "pango_layout_get_iter") - (return-type "PangoLayoutIter*") -) - -(define-method free - (of-object "PangoLayoutIter") - (c-name "pango_layout_iter_free") - (return-type "none") -) - -(define-method get_index - (of-object "PangoLayoutIter") - (c-name "pango_layout_iter_get_index") - (return-type "int") -) - -(define-method get_run - (of-object "PangoLayoutIter") - (c-name "pango_layout_iter_get_run") - (return-type "PangoLayoutRun*") -) - -(define-method get_line - (of-object "PangoLayoutIter") - (c-name "pango_layout_iter_get_line") - (return-type "PangoLayoutLine*") -) - -(define-method at_last_line - (of-object "PangoLayoutIter") - (c-name "pango_layout_iter_at_last_line") - (return-type "gboolean") -) - -(define-method next_char - (of-object "PangoLayoutIter") - (c-name "pango_layout_iter_next_char") - (return-type "gboolean") -) - -(define-method next_cluster - (of-object "PangoLayoutIter") - (c-name "pango_layout_iter_next_cluster") - (return-type "gboolean") -) - -(define-method next_run - (of-object "PangoLayoutIter") - (c-name "pango_layout_iter_next_run") - (return-type "gboolean") -) - -(define-method next_line - (of-object "PangoLayoutIter") - (c-name "pango_layout_iter_next_line") - (return-type "gboolean") -) - -(define-method get_char_extents - (of-object "PangoLayoutIter") - (c-name "pango_layout_iter_get_char_extents") - (return-type "none") - (parameters - '("PangoRectangle*" "logical_rect") - ) -) - -(define-method get_cluster_extents - (of-object "PangoLayoutIter") - (c-name "pango_layout_iter_get_cluster_extents") - (return-type "none") - (parameters - '("PangoRectangle*" "ink_rect") - '("PangoRectangle*" "logical_rect") - ) -) - -(define-method get_run_extents - (of-object "PangoLayoutIter") - (c-name "pango_layout_iter_get_run_extents") - (return-type "none") - (parameters - '("PangoRectangle*" "ink_rect") - '("PangoRectangle*" "logical_rect") - ) -) - -(define-method get_line_extents - (of-object "PangoLayoutIter") - (c-name "pango_layout_iter_get_line_extents") - (return-type "none") - (parameters - '("PangoRectangle*" "ink_rect") - '("PangoRectangle*" "logical_rect") - ) -) - -(define-method get_line_yrange - (of-object "PangoLayoutIter") - (c-name "pango_layout_iter_get_line_yrange") - (return-type "none") - (parameters - '("int*" "y0") - '("int*" "y1") - ) -) - -(define-method get_layout_extents - (of-object "PangoLayoutIter") - (c-name "pango_layout_iter_get_layout_extents") - (return-type "none") - (parameters - '("PangoRectangle*" "ink_rect") - '("PangoRectangle*" "logical_rect") - ) -) - -(define-method get_baseline - (of-object "PangoLayoutIter") - (c-name "pango_layout_iter_get_baseline") - (return-type "int") -) - - - -;; From pango-modules.h - -(ifdef PANGO_ENABLE_BACKEND - -(define-function find_map - (c-name "pango_find_map") - (return-type "PangoMap*") - (parameters - '("PangoLanguage*" "language") - '("guint" "engine_type_id") - '("guint" "render_type_id") - ) -) - -(define-method get_engine - (of-object "PangoMap") - (c-name "pango_map_get_engine") - (return-type "PangoEngine*") - (parameters - '("PangoScript" "script") - ) -) - -(define-method get_engines - (of-object "PangoMap") - (c-name "pango_map_get_engines") - (return-type "none") - (parameters - '("PangoScript" "script") - '("GSList**" "exact_engines") - '("GSList**" "fallback_engines") - ) -) - -(define-function module_register - (c-name "pango_module_register") - (return-type "none") - (parameters - '("PangoIncludedModule*" "module") - ) -) -) ;; PANGO_ENABLE_BACKEND - - -;; From /home/jdahlin/dev/gtk-2.8/pango/pango/pango-renderer.h - -(define-function pango_renderer_get_type - (c-name "pango_renderer_get_type") - (return-type "GType") -) - -(define-method draw_layout - (of-object "PangoRenderer") - (c-name "pango_renderer_draw_layout") - (return-type "none") - (parameters - '("PangoLayout*" "layout") - '("int" "x") - '("int" "y") - ) -) - -(define-method draw_layout_line - (of-object "PangoRenderer") - (c-name "pango_renderer_draw_layout_line") - (return-type "none") - (parameters - '("PangoLayoutLine*" "line") - '("int" "x") - '("int" "y") - ) -) - -(define-method draw_glyphs - (of-object "PangoRenderer") - (c-name "pango_renderer_draw_glyphs") - (return-type "none") - (parameters - '("PangoFont*" "font") - '("PangoGlyphString*" "glyphs") - '("int" "x") - '("int" "y") - ) -) - -(define-method draw_rectangle - (of-object "PangoRenderer") - (c-name "pango_renderer_draw_rectangle") - (return-type "none") - (parameters - '("PangoRenderPart" "part") - '("int" "x") - '("int" "y") - '("int" "width") - '("int" "height") - ) -) - -(define-method draw_error_underline - (of-object "PangoRenderer") - (c-name "pango_renderer_draw_error_underline") - (return-type "none") - (parameters - '("int" "x") - '("int" "y") - '("int" "width") - '("int" "height") - ) -) - -(define-method draw_trapezoid - (of-object "PangoRenderer") - (c-name "pango_renderer_draw_trapezoid") - (return-type "none") - (parameters - '("PangoRenderPart" "part") - '("double" "y1_") - '("double" "x11") - '("double" "x21") - '("double" "y2") - '("double" "x12") - '("double" "x22") - ) -) - -(define-method draw_glyph - (of-object "PangoRenderer") - (c-name "pango_renderer_draw_glyph") - (return-type "none") - (parameters - '("PangoFont*" "font") - '("PangoGlyph" "glyph") - '("double" "x") - '("double" "y") - ) -) - -(define-method activate - (of-object "PangoRenderer") - (c-name "pango_renderer_activate") - (return-type "none") -) - -(define-method deactivate - (of-object "PangoRenderer") - (c-name "pango_renderer_deactivate") - (return-type "none") -) - -(define-method part_changed - (of-object "PangoRenderer") - (c-name "pango_renderer_part_changed") - (return-type "none") - (parameters - '("PangoRenderPart" "part") - ) -) - -(define-method set_color - (of-object "PangoRenderer") - (c-name "pango_renderer_set_color") - (return-type "none") - (parameters - '("PangoRenderPart" "part") - '("const-PangoColor*" "color") - ) -) - -(define-method get_color - (of-object "PangoRenderer") - (c-name "pango_renderer_get_color") - (return-type "PangoColor*") - (parameters - '("PangoRenderPart" "part") - ) -) - -(define-method set_matrix - (of-object "PangoRenderer") - (c-name "pango_renderer_set_matrix") - (return-type "none") - (parameters - '("const-PangoMatrix*" "matrix") - ) -) - -(define-method get_matrix - (of-object "PangoRenderer") - (c-name "pango_renderer_get_matrix") - (return-type "const-PangoMatrix*") -) - -(define-virtual draw_glyphs - (of-object "PangoRenderer") - (return-type "none") - (parameters - '("PangoFont*" "font") - '("PangoGlyphString*" "glyphs") - '("int" "x") - '("int" "y") - ) -) - -(define-virtual draw_rectangle - (of-object "PangoRenderer") - (return-type "none") - (parameters - '("PangoRenderPart" "part") - '("int" "x") - '("int" "y") - '("int" "width") - '("int" "height") - ) -) - -(define-virtual draw_error_underline - (of-object "PangoRenderer") - (return-type "none") - (parameters - '("int" "x") - '("int" "y") - '("int" "width") - '("int" "height") - ) -) - -(define-virtual draw_shape - (of-object "PangoRenderer") - (return-type "none") - (parameters - '("PangoAttrShape*" "attr") - '("int" "x") - '("int" "y") - ) -) - -(define-virtual draw_trapezoid - (of-object "PangoRenderer") - (return-type "none") - (parameters - '("PangoRenderPart" "part") - '("double" "y1_") - '("double" "x11") - '("double" "x21") - '("double" "y2") - '("double" "x12") - '("double" "x22") - ) -) - -(define-virtual draw_glyph - (of-object "PangoRenderer") - (return-type "none") - (parameters - '("PangoFont*" "font") - '("PangoGlyph" "glyph") - '("double" "x") - '("double" "y") - ) -) - -(define-virtual part_changed - (of-object "PangoRenderer") - (return-type "none") - (parameters - '("PangoRenderPart" "part") - ) -) - -(define-virtual begin - (of-object "PangoRenderer") - (return-type "none") -) - -(define-virtual end - (of-object "PangoRenderer") - (return-type "none") -) - -(define-virtual prepare_run - (of-object "PangoRenderer") - (return-type "none") - (parameters - '("PangoLayoutRun*" "run") - ) -) - -;; From pango-script.h - -(define-function script_for_unichar - (c-name "pango_script_for_unichar") - (return-type "PangoScript") - (parameters - '("gunichar" "ch") - ) -) - -(define-function script_iter_new - (c-name "pango_script_iter_new") - (is-constructor-of "PangoScriptIter") - (return-type "PangoScriptIter*") - (parameters - '("const-char*" "text") - '("int" "length") - ) -) - -(define-method get_range - (of-object "PangoScriptIter") - (c-name "pango_script_iter_get_range") - (return-type "none") - (parameters - '("const-char**" "start") - '("const-char**" "end") - '("PangoScript*" "script") - ) -) - -(define-method next - (of-object "PangoScriptIter") - (c-name "pango_script_iter_next") - (return-type "gboolean") -) - -(define-method free - (of-object "PangoScriptIter") - (c-name "pango_script_iter_free") - (return-type "none") -) - -(define-function get_sample_language - (c-name "pango_script_get_sample_language") - (return-type "PangoLanguage*") - (parameters - '("PangoScript" "script") - ) -) - -(define-method includes_script - (of-object "PangoLanguage") - (c-name "pango_language_includes_script") - (return-type "gboolean") - (parameters - '("PangoScript" "script") - ) -) - - - -;; From /opt/gtk2/include/pango-1.0/pango/pango-tabs.h - -(define-function pango_tab_array_new - (c-name "pango_tab_array_new") - (is-constructor-of "PangoTabArray") - (return-type "PangoTabArray*") - (parameters - '("gint" "initial_size") - '("gboolean" "positions_in_pixels") - ) -) - -(define-function pango_tab_array_new_with_positions - (c-name "pango_tab_array_new_with_positions") - (is-constructor-of "PangoTabArray") - (return-type "PangoTabArray*") - (parameters - '("gint" "size") - '("gboolean" "positions_in_pixels") - '("PangoTabAlign" "first_alignment") - '("gint" "first_position") - ) - (varargs #t) -) - -(define-function pango_tab_array_get_type - (c-name "pango_tab_array_get_type") - (return-type "GType") -) - -(define-method copy - (of-object "PangoTabArray") - (c-name "pango_tab_array_copy") - (return-type "PangoTabArray*") -) - -(define-method free - (of-object "PangoTabArray") - (c-name "pango_tab_array_free") - (return-type "none") -) - -(define-method get_size - (of-object "PangoTabArray") - (c-name "pango_tab_array_get_size") - (return-type "gint") -) - -(define-method resize - (of-object "PangoTabArray") - (c-name "pango_tab_array_resize") - (return-type "none") - (parameters - '("gint" "new_size") - ) -) - -(define-method set_tab - (of-object "PangoTabArray") - (c-name "pango_tab_array_set_tab") - (return-type "none") - (parameters - '("gint" "tab_index") - '("PangoTabAlign" "alignment") - '("gint" "location") - ) -) - -(define-method get_tab - (of-object "PangoTabArray") - (c-name "pango_tab_array_get_tab") - (return-type "none") - (parameters - '("gint" "tab_index") - '("PangoTabAlign*" "alignment") - '("gint*" "location") - ) -) - -(define-method get_tabs - (of-object "PangoTabArray") - (c-name "pango_tab_array_get_tabs") - (return-type "none") - (parameters - '("PangoTabAlign**" "alignments") - '("gint**" "locations") - ) -) - -(define-method get_positions_in_pixels - (of-object "PangoTabArray") - (c-name "pango_tab_array_get_positions_in_pixels") - (return-type "gboolean") -) - - - -;; From /opt/gtk2/include/pango-1.0/pango/pango-types.h - -(define-function matrix_get_type - (c-name "pango_matrix_get_type") - (return-type "GType") -) - -(define-method copy - (of-object "PangoMatrix") - (c-name "pango_matrix_copy") - (return-type "PangoMatrix*") -) - -(define-method free - (of-object "PangoMatrix") - (c-name "pango_matrix_free") - (return-type "none") -) - -(define-method translate - (of-object "PangoMatrix") - (c-name "pango_matrix_translate") - (return-type "none") - (parameters - '("double" "tx") - '("double" "ty") - ) -) - -(define-method scale - (of-object "PangoMatrix") - (c-name "pango_matrix_scale") - (return-type "none") - (parameters - '("double" "scale_x") - '("double" "scale_y") - ) -) - -(define-method rotate - (of-object "PangoMatrix") - (c-name "pango_matrix_rotate") - (return-type "none") - (parameters - '("double" "degrees") - ) -) - -(define-method concat - (of-object "PangoMatrix") - (c-name "pango_matrix_concat") - (return-type "none") - (parameters - '("const-PangoMatrix*" "new_matrix") - ) -) - -(define-function language_get_type - (c-name "pango_language_get_type") - (return-type "GType") -) - -(define-function pango_language_from_string - (is-constructor-of "PangoLanguage") - (c-name "pango_language_from_string") - (return-type "PangoLanguage*") - (parameters - '("const-char*" "language") - ) -) - -(define-function pango_language_from_string - (c-name "pango_language_from_string1") - (return-type "PangoLanguage*") - (parameters - '("const-char*" "language") - ) - (deprecated "use pango.Language instead") -) - -(define-function pango_language_matches - (c-name "pango_language_matches1") - (return-type "gboolean") - (parameters - '("PangoLanguage*" "language" (null-ok)) - '("const-char*" "range_list") - ) - (deprecated "use pango.Language.matches instead") -) - -(define-method matches - (of-object "PangoLanguage") - (c-name "pango_language_matches") - (return-type "gboolean") - (parameters - '("const-char*" "range_list") - ) -) - -(define-method to_string - (of-object "PangoLanguage") - (c-name "pango_language_to_string") - (return-type "const-char*") -) - -(define-function get_mirror_char - (c-name "pango_get_mirror_char") - (return-type "gboolean") - (parameters - '("gunichar" "ch") - '("gunichar*" "mirrored_ch") - ) - (deprecated "deprecated") -) - -(define-function unichar_direction - (c-name "pango_unichar_direction") - (return-type "PangoDirection") - (parameters - '("gunichar" "ch") - ) -) - -(define-function find_base_dir - (c-name "pango_find_base_dir") - (return-type "PangoDirection") - (parameters - '("const-gchar*" "text") - '("gint" "length") - ) -) - - -;; - -(define-function PIXELS - (c-name "PANGO_PIXELS") - (return-type "gint") - (parameters - '("gint" "size") - ) - ) - -(define-function ASCENT - (c-name "PANGO_ASCENT") - (return-type "gint") - (parameters - '("PangoRectangle" "rect") - ) - ) - -(define-function DESCENT - (c-name "PANGO_DESCENT") - (return-type "gint") - (parameters - '("PangoRectangle" "rect") - ) - ) - -(define-function LBEARING - (c-name "PANGO_LBEARING") - (return-type "gint") - (parameters - '("PangoRectangle" "rect") - ) - ) - -(define-function RBEARING - (c-name "PANGO_RBEARING") - (return-type "gint") - (parameters - '("PangoRectangle" "rect") - ) - ) - - - -;; From pango-utils.h - -(ifdef USE_PANGO_UTILS - -(define-function split_file_list - (c-name "pango_split_file_list") - (return-type "char**") - (parameters - '("const-char*" "str") - ) -) - -(define-function trim_string - (c-name "pango_trim_string") - (return-type "char*") - (parameters - '("const-char*" "str") - ) -) - -(define-function read_line - (c-name "pango_read_line") - (return-type "gint") - (parameters - '("FILE*" "stream") - '("GString*" "str") - ) -) - -(define-function skip_space - (c-name "pango_skip_space") - (return-type "gboolean") - (parameters - '("const-char**" "pos") - ) -) - -(define-function scan_word - (c-name "pango_scan_word") - (return-type "gboolean") - (parameters - '("const-char**" "pos") - '("GString*" "out") - ) -) - -(define-function scan_string - (c-name "pango_scan_string") - (return-type "gboolean") - (parameters - '("const-char**" "pos") - '("GString*" "out") - ) -) - -(define-function scan_int - (c-name "pango_scan_int") - (return-type "gboolean") - (parameters - '("const-char**" "pos") - '("int*" "out") - ) -) - -(define-function config_key_get - (c-name "pango_config_key_get") - (return-type "char*") - (parameters - '("const-char*" "key") - ) -) - -(define-function lookup_aliases - (c-name "pango_lookup_aliases") - (return-type "none") - (parameters - '("const-char*" "fontname") - '("char***" "families") - '("int*" "n_families") - ) -) - -(define-function parse_style - (c-name "pango_parse_style") - (return-type "gboolean") - (parameters - '("const-char*" "str") - '("PangoStyle*" "style") - '("gboolean" "warn") - ) -) - -(define-function parse_variant - (c-name "pango_parse_variant") - (return-type "gboolean") - (parameters - '("const-char*" "str") - '("PangoVariant*" "variant") - '("gboolean" "warn") - ) -) - -(define-function parse_weight - (c-name "pango_parse_weight") - (return-type "gboolean") - (parameters - '("const-char*" "str") - '("PangoWeight*" "weight") - '("gboolean" "warn") - ) -) - -(define-function parse_stretch - (c-name "pango_parse_stretch") - (return-type "gboolean") - (parameters - '("const-char*" "str") - '("PangoStretch*" "stretch") - '("gboolean" "warn") - ) -) - -(define-function get_sysconf_subdirectory - (c-name "pango_get_sysconf_subdirectory") - (return-type "const-char*") -) - -(define-function get_lib_subdirectory - (c-name "pango_get_lib_subdirectory") - (return-type "const-char*") -) - -(define-function log2vis_get_embedding_levels - (c-name "pango_log2vis_get_embedding_levels") - (return-type "guint8*") - (parameters - '("const-gchar*" "text") - '("int" "length") - '("PangoDirection*" "pbase_dir") - ) -) - -(define-method get_sample_string - (of-object "PangoLanguage") - (c-name "pango_language_get_sample_string") - (return-type "const-char*") -) - -(define-function is_zero_width - (c-name "pango_is_zero_width") - (return-type "gboolean") - (parameters - '("gunichar" "ch") - ) -) -) ;; USE_PANGO_UTILS - - - diff --git a/pango.override b/pango.override deleted file mode 100644 index 043c3199..00000000 --- a/pango.override +++ /dev/null @@ -1,2023 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * pango.override: overrides for the Pango library - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -%% -headers -#define NO_IMPORT_PYGOBJECT -#define PANGO_ENABLE_BACKEND -#define PANGO_ENABLE_ENGINE -#include -#include - -typedef struct { - PyObject *func, *data; -} PyGtkCustomNotify; - -#ifndef PANGO_TYPE_LAYOUT_LINE -# define PANGO_TYPE_LAYOUT_LINE pypango_layout_line_get_type() - -static PangoLayoutLine * -_layout_line_boxed_copy(PangoLayoutLine *line) -{ - pango_layout_line_ref(line); - return line; -} - -static GType -pypango_layout_line_get_type(void) -{ - static GType our_type = 0; - - if (our_type == 0) - our_type = g_boxed_type_register_static("PangoLayoutLine", - (GBoxedCopyFunc)_layout_line_boxed_copy, - (GBoxedFreeFunc)pango_layout_line_unref); - return our_type; -} -#endif /* #ifndef PANGO_TYPE_LAYOUT_LINE */ - -#ifndef PANGO_TYPE_ITEM -# define PANGO_TYPE_ITEM (pypango_item_get_type ()) - -static GType -pypango_item_get_type (void) -{ - static GType our_type = 0; - - if (our_type == 0) - our_type = g_boxed_type_register_static ("PangoItem", - (GBoxedCopyFunc) pango_item_copy, - (GBoxedFreeFunc) pango_item_free); - return our_type; -} -#endif /* #ifndef PANGO_TYPE_ITEM */ - -/* ------------- PangoAttribute ------------- */ - -typedef struct { - PyObject_HEAD - PangoAttribute *attr; -} PyPangoAttribute; -staticforward PyTypeObject PyPangoAttribute_Type; - -static PyObject * -pypango_attr_new(PangoAttribute *attr, guint start, guint end) -{ - PyPangoAttribute *self; - - self = (PyPangoAttribute *)PyObject_NEW(PyPangoAttribute, - &PyPangoAttribute_Type); - if (self == NULL) - return NULL; - self->attr = attr; - attr->start_index = start; - attr->end_index = end; - - return (PyObject *)self; -} - -static void -pypango_attr_dealloc(PyPangoAttribute *self) -{ - pango_attribute_destroy(self->attr); - PyObject_DEL(self); -} - -static int -pypango_attr_compare(PyPangoAttribute *self, PyPangoAttribute *v) -{ - if (pango_attribute_equal(self->attr, v->attr)) - return 0; - if (self->attr > v->attr) - return -1; - return 1; -} - -static long -pypango_attr_hash(PyPangoAttribute *self) -{ - return (long)self->attr; -} - -static PyObject * -pypango_attr_copy(PyPangoAttribute *self) -{ - return pypango_attr_new(pango_attribute_copy(self->attr), - self->attr->start_index, self->attr->end_index); -} - -static PyMethodDef pypango_attr_methods[] = { - { "copy", (PyCFunction)pypango_attr_copy, METH_NOARGS }, - { NULL, NULL, 0 } -}; - -static PyObject * -pypango_attr_get_index(PyPangoAttribute *self, void *closure) -{ - gboolean is_end = GPOINTER_TO_INT(closure) != 0; - - if (is_end) - return PyInt_FromLong(self->attr->end_index); - else - return PyInt_FromLong(self->attr->start_index); -} - -static int -pypango_attr_set_index(PyPangoAttribute *self, PyObject *value, void *closure) -{ - gboolean is_end = GPOINTER_TO_INT(closure) != 0; - gint val; - - val = PyInt_AsLong(value); - if (PyErr_Occurred()) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, "index must be an integer"); - return -1; - } - if (is_end) - self->attr->end_index = val; - else - self->attr->start_index = val; - return 0; -} - -static PyObject * -pypango_attr_get_type(PyPangoAttribute *self, void *closure) -{ - return PyInt_FromLong(self->attr->klass->type); -} - -static PyGetSetDef pypango_attr_getsets[] = { - { "start_index", (getter)pypango_attr_get_index, - (setter)pypango_attr_set_index, NULL, GINT_TO_POINTER(0) }, - { "end_index", (getter)pypango_attr_get_index, - (setter)pypango_attr_set_index, NULL, GINT_TO_POINTER(1) }, - { "type", (getter)pypango_attr_get_type, (setter)0, NULL, NULL }, - { NULL, (getter)0, (setter)0, NULL, NULL } -}; - -static PyObject * -pypango_attr_tp_getattr(PyPangoAttribute *self, char *attr) -{ - PangoAttribute *attribute = self->attr; - PyObject *name, *ret; - - switch (attribute->klass->type) { - case PANGO_ATTR_LANGUAGE: - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[s]", "value"); - if (!strcmp(attr, "value")) - return pyg_boxed_new(PANGO_TYPE_LANGUAGE, - ((PangoAttrLanguage *)attribute)->value, - TRUE, TRUE); - break; - case PANGO_ATTR_FAMILY: - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[s]", "value"); - if (!strcmp(attr, "value")) - return PyString_FromString(((PangoAttrString *)attribute)->value); - break; - case PANGO_ATTR_STYLE: - case PANGO_ATTR_WEIGHT: - case PANGO_ATTR_VARIANT: - case PANGO_ATTR_STRETCH: - case PANGO_ATTR_SIZE: - case PANGO_ATTR_UNDERLINE: - case PANGO_ATTR_STRIKETHROUGH: - case PANGO_ATTR_RISE: - case PANGO_ATTR_FALLBACK: - case PANGO_ATTR_LETTER_SPACING: - case PANGO_ATTR_ABSOLUTE_SIZE: - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[s]", "value"); - if (!strcmp(attr, "value")) - return PyInt_FromLong(((PangoAttrInt *)attribute)->value); - break; - case PANGO_ATTR_FONT_DESC: - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[s]", "desc"); - if (!strcmp(attr, "desc")) - return pyg_boxed_new(PANGO_TYPE_FONT_DESCRIPTION, - ((PangoAttrFontDesc *)attribute)->desc, - TRUE, TRUE); - break; - case PANGO_ATTR_FOREGROUND: - case PANGO_ATTR_BACKGROUND: - case PANGO_ATTR_UNDERLINE_COLOR: - case PANGO_ATTR_STRIKETHROUGH_COLOR: - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[s]", "color"); - if (!strcmp(attr, "color")) - return pyg_boxed_new(PANGO_TYPE_COLOR, - &((PangoAttrColor *)attribute)->color, - TRUE, TRUE); - break; - case PANGO_ATTR_SHAPE: - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[ss]", "ink_rect", "logical_rect"); - if (!strcmp(attr, "ink_rect")) { - PangoRectangle rect = ((PangoAttrShape *)attribute)->ink_rect; - - return Py_BuildValue("iiii", rect.x, rect.y, - rect.width, rect.height); - } - if (!strcmp(attr, "logical_rect")) { - PangoRectangle rect = ((PangoAttrShape *)attribute)->logical_rect; - - return Py_BuildValue("iiii", rect.x, rect.y, - rect.width, rect.height); - } - break; - case PANGO_ATTR_SCALE: - if (!strcmp(attr, "__members__")) - return Py_BuildValue("[s]", "value"); - if (!strcmp(attr, "value")) - return PyFloat_FromDouble(((PangoAttrFloat *)attribute)->value); - break; - default: - break; - } - - name = PyString_FromString(attr); - ret = PyObject_GenericGetAttr((PyObject *)self, name); - Py_DECREF(name); - return ret; -} - -static PyTypeObject PyPangoAttribute_Type = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ - "pango.Attribute", /* tp_name */ - sizeof(PyPangoAttribute), /* tp_basicsize */ - 0, /* tp_itemsize */ - /* methods */ - (destructor)pypango_attr_dealloc, /* tp_dealloc */ - (printfunc)0, /* tp_print */ - (getattrfunc)pypango_attr_tp_getattr, /* tp_getattr */ - (setattrfunc)0, /* tp_setattr */ - (cmpfunc)pypango_attr_compare, /* tp_compare */ - (reprfunc)0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)pypango_attr_hash, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - (reprfunc)0, /* tp_str */ - (getattrofunc)0, /* tp_getattro */ - (setattrofunc)0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - NULL, /* Documentation string */ - (traverseproc)0, /* tp_traverse */ - (inquiry)0, /* tp_clear */ - (richcmpfunc)0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc)0, /* tp_iter */ - (iternextfunc)0, /* tp_iternext */ - pypango_attr_methods, /* tp_methods */ - 0, /* tp_members */ - pypango_attr_getsets, /* tp_getset */ - (PyTypeObject *)0, /* tp_base */ - (PyObject *)0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)0, /* tp_init */ - (allocfunc)0, /* tp_alloc */ - (newfunc)0, /* tp_new */ - 0, /* tp_free */ - (inquiry)0, /* tp_is_gc */ - (PyObject *)0, /* tp_bases */ -}; - -/* ------------- PangoAttrIterator ------------- */ - -typedef struct { - PyObject_HEAD - PangoAttrIterator *iter; -} PyPangoAttrIterator; -staticforward PyTypeObject PyPangoAttrIterator_Type; - -static PyObject * -pypango_attr_iterator_new(PangoAttrIterator *iter) -{ - PyPangoAttrIterator *self; - - self = (PyPangoAttrIterator *)PyObject_NEW(PyPangoAttrIterator, - &PyPangoAttrIterator_Type); - if (self == NULL) - return NULL; - self->iter = iter; - - return (PyObject *)self; -} - -static void -pypango_attr_iterator_dealloc(PyPangoAttrIterator *self) -{ - pango_attr_iterator_destroy(self->iter); - PyObject_DEL(self); -} - -static int -pypango_attr_iterator_compare(PyPangoAttrIterator *self, - PyPangoAttrIterator *v) -{ - if (self->iter == v->iter) - return 0; - if (self->iter > v->iter) - return -1; - return 1; -} - -static long -pypango_attr_iterator_hash(PyPangoAttrIterator *self) -{ - return (long)self->iter; -} - -static PyObject * -pypango_attr_iterator_copy(PyPangoAttrIterator *self) -{ - return pypango_attr_iterator_new(pango_attr_iterator_copy(self->iter)); -} - -static PyObject * -pypango_attr_iterator_range(PyPangoAttrIterator *self) -{ - gint start, end; - - pango_attr_iterator_range(self->iter, &start, &end); - return Py_BuildValue("ii", start, end); -} - -static PyObject * -pypango_attr_iterator_next(PyPangoAttrIterator *self) -{ - return PyBool_FromLong(pango_attr_iterator_next(self->iter)); -} - -static PyObject * -pypango_attr_iterator_get(PyPangoAttrIterator *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "type", NULL }; - PyObject *py_type; - PangoAttrType type; - PangoAttribute *attr; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:pango.AttrIterator.get", - kwlist, &py_type)) - return NULL; - - if (pyg_enum_get_value(PANGO_TYPE_ATTR_TYPE, py_type, (gint*)&type)) - return NULL; - - if (!(attr = pango_attr_iterator_get(self->iter, type))) { - Py_INCREF(Py_None); - return Py_None; - } - - return pypango_attr_new(attr, attr->start_index, attr->end_index); -} - -static PyObject * -pypango_attr_iterator_get_font(PyPangoAttrIterator *self) -{ - PangoFontDescription *desc; - PangoLanguage *language; - GSList *extra_attrs, *tmp; - PyObject *py_desc, *py_language, *py_extra_attrs; - - if (!(desc = pango_font_description_new())) { - PyErr_SetString(PyExc_RuntimeError, "can't get font info"); - return NULL; - } - pango_attr_iterator_get_font(self->iter, desc, &language, &extra_attrs); - py_desc = pyg_boxed_new(PANGO_TYPE_FONT_DESCRIPTION, desc, TRUE, TRUE); - py_language = pyg_boxed_new(PANGO_TYPE_LANGUAGE, language, TRUE, TRUE); - - py_extra_attrs = PyList_New(0); - for (tmp = extra_attrs; tmp != NULL; tmp = tmp->next) { - PangoAttribute *attr = (PangoAttribute *)tmp->data; - PyObject *py_attr = pypango_attr_new(attr, attr->start_index, - attr->end_index); - PyList_Append(py_extra_attrs, py_attr); - Py_DECREF(py_attr); - } - g_slist_free(extra_attrs); - - return Py_BuildValue("NNN", py_desc, py_language, py_extra_attrs); -} - -static PyObject * -pypango_attr_iterator_get_attrs(PyPangoAttrIterator *self) -{ - GSList *alist; - PyObject *py_list; - guint i, len; - - alist = pango_attr_iterator_get_attrs(self->iter); - - len = g_slist_length(alist); - py_list = PyTuple_New(len); - for (i = 0; i < len; i++) { - PangoAttribute *attr = (PangoAttribute *)g_slist_nth_data(alist, i); - - PyTuple_SetItem(py_list, i, pypango_attr_new(attr, attr->start_index, - attr->end_index)); - } - /* don't have to destroy attributes since we use them */ - g_slist_free(alist); - return py_list; -} - -static PyMethodDef pypango_attr_iterator_methods[] = { - { "copy", (PyCFunction)pypango_attr_iterator_copy, METH_NOARGS }, - { "range", (PyCFunction)pypango_attr_iterator_range, METH_NOARGS }, - { "next", (PyCFunction)pypango_attr_iterator_next, METH_NOARGS }, - { "get", (PyCFunction)pypango_attr_iterator_get, METH_VARARGS|METH_KEYWORDS }, - { "get_font", (PyCFunction)pypango_attr_iterator_get_font, METH_NOARGS }, - { "get_attrs", (PyCFunction)pypango_attr_iterator_get_attrs, METH_NOARGS }, - { NULL, NULL, 0 } -}; - -static PyTypeObject PyPangoAttrIterator_Type = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ - "pango.AttrIterator", /* tp_name */ - sizeof(PyPangoAttrIterator), /* tp_basicsize */ - 0, /* tp_itemsize */ - /* methods */ - (destructor)pypango_attr_iterator_dealloc, /* tp_dealloc */ - (printfunc)0, /* tp_print */ - (getattrfunc)0, /* tp_getattr */ - (setattrfunc)0, /* tp_setattr */ - (cmpfunc)pypango_attr_iterator_compare, /* tp_compare */ - (reprfunc)0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)pypango_attr_iterator_hash, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - (reprfunc)0, /* tp_str */ - (getattrofunc)0, /* tp_getattro */ - (setattrofunc)0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - NULL, /* Documentation string */ - (traverseproc)0, /* tp_traverse */ - (inquiry)0, /* tp_clear */ - (richcmpfunc)0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc)0, /* tp_iter */ - (iternextfunc)0, /* tp_iternext */ - pypango_attr_iterator_methods, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - (PyTypeObject *)0, /* tp_base */ - (PyObject *)0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)0, /* tp_init */ - (allocfunc)0, /* tp_alloc */ - (newfunc)0, /* tp_new */ - 0, /* tp_free */ - (inquiry)0, /* tp_is_gc */ - (PyObject *)0, /* tp_bases */ -}; - -%% -init - PyPangoAttribute_Type.tp_alloc = PyType_GenericAlloc; - PyPangoAttribute_Type.tp_new = PyType_GenericNew; - if (PyType_Ready(&PyPangoAttribute_Type) < 0) - return; - - PyPangoAttrIterator_Type.tp_alloc = PyType_GenericAlloc; - PyPangoAttrIterator_Type.tp_new = PyType_GenericNew; - if (PyType_Ready(&PyPangoAttrIterator_Type) < 0) - return; -%% -modulename pango -%% -import gobject.GObject as PyGObject_Type -%% -ignore-glob - *_get_type - *_ref - *_unref - *_free -%% -ignore - pango_color_copy - pango_attribute_copy - pango_attribute_destroy - pango_attribute_equal - pango_font_description_equal - pango_font_map_free_families - pango_font_get_coverage - pango_font_find_shaper - pango_layout_get_log_attrs -%% -ignore - pango_context_new - pango_context_set_font_map - pango_glyph_string_index_to_x - pango_glyph_string_x_to_index - pango_break - pango_default_break - pango_shape -%% -override pango_attr_language_new kwargs -static PyObject * -_wrap_pango_attr_language_new(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "language", "start_index", "end_index", NULL }; - char *slanguage; - PangoLanguage *language; - guint start = 0, end = 1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|ii:PangoAttrLanguage", - kwlist, &slanguage, &start, &end)) - return NULL; - - language = pango_language_from_string(slanguage); - - return pypango_attr_new(pango_attr_language_new(language), start, end); -} -%% -override pango_attr_family_new kwargs -static PyObject * -_wrap_pango_attr_family_new(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "family", "start_index", "end_index", NULL }; - char *family; - guint start = 0, end = 1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s|ii:PangoAttrFamily", - kwlist, &family, &start, &end)) - return NULL; - - return pypango_attr_new(pango_attr_family_new(family), start, end); -} -%% -override pango_attr_foreground_new kwargs -static PyObject * -_wrap_pango_attr_foreground_new(PyObject *self,PyObject *args,PyObject *kwargs) -{ - static char *kwlist[] = { "red", "green", "blue", "start_index", - "end_index", NULL }; - guint16 red, green, blue; - guint start = 0, end = 1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "HHH|ii:PangoAttrForeground", - kwlist, &red, &green, &blue, - &start, &end)) - return NULL; - - return pypango_attr_new(pango_attr_foreground_new(red, green, blue), - start, end); -} -%% -override pango_attr_background_new kwargs -static PyObject * -_wrap_pango_attr_background_new(PyObject *self,PyObject *args,PyObject *kwargs) -{ - static char *kwlist[] = { "red", "green", "blue", "start_index", - "end_index", NULL }; - guint16 red, green, blue; - guint start = 0, end = 1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "HHH|ii:PangoAttrBackground", - kwlist, &red, &green, &blue, - &start, &end)) - return NULL; - - return pypango_attr_new(pango_attr_background_new(red, green, blue), - start, end); -} -%% -override pango_attr_size_new kwargs -static PyObject * -_wrap_pango_attr_size_new(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "size", "start_index", "end_index", NULL }; - int size; - guint start = 0, end = 1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i|ii:PangoAttrSize", - kwlist, &size, &start, &end)) - return NULL; - - return pypango_attr_new(pango_attr_size_new(size), start, end); -} -%% -override pango_attr_style_new kwargs -static PyObject * -_wrap_pango_attr_style_new(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "style", "start_index", "end_index", NULL }; - PyObject *py_style; - PangoStyle style; - guint start = 0, end = 1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|ii:PangoAttrStyle", - kwlist, &py_style, &start, &end)) - return NULL; - if (pyg_enum_get_value(PANGO_TYPE_STYLE, py_style, (gint *)&style)) - return NULL; - - return pypango_attr_new(pango_attr_style_new(style), start, end); -} -%% -override pango_attr_weight_new kwargs -static PyObject * -_wrap_pango_attr_weight_new(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "weight", "start_index", "end_index", NULL }; - PyObject *py_weight; - PangoWeight weight; - guint start = 0, end = 1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|ii:PangoAttrWeight", - kwlist, &py_weight, &start, &end)) - return NULL; - if (pyg_enum_get_value(PANGO_TYPE_WEIGHT, py_weight, (gint *)&weight)) - return NULL; - - return pypango_attr_new(pango_attr_weight_new(weight), start, end); -} -%% -override pango_attr_variant_new kwargs -static PyObject * -_wrap_pango_attr_variant_new(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "variant", "start_index", "end_index", NULL }; - PyObject *py_variant; - PangoVariant variant; - guint start = 0, end = 1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|ii:PangoAttrVariant", - kwlist, &py_variant, &start, &end)) - return NULL; - if (pyg_enum_get_value(PANGO_TYPE_VARIANT, py_variant, (gint *)&variant)) - return NULL; - - return pypango_attr_new(pango_attr_variant_new(variant), start, end); -} -%% -override pango_attr_stretch_new kwargs -static PyObject * -_wrap_pango_attr_stretch_new(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "stretch", "start_index", "end_index", NULL }; - PyObject *py_stretch; - PangoStretch stretch; - guint start = 0, end = 1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|ii:PangoAttrStretch", - kwlist, &py_stretch, &start, &end)) - return NULL; - if (pyg_enum_get_value(PANGO_TYPE_STRETCH, py_stretch, (gint *)&stretch)) - return NULL; - - return pypango_attr_new(pango_attr_stretch_new(stretch), start, end); -} -%% -override pango_attr_font_desc_new kwargs -static PyObject * -_wrap_pango_attr_font_desc_new(PyObject *self, PyObject *args,PyObject *kwargs) -{ - static char *kwlist[] = { "desc", "start_index", "end_index", NULL }; - PyObject *font_desc; - PangoFontDescription *desc; - guint start = 0, end = 1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|ii:PangoAttrFontDesc", - kwlist, &font_desc, &start, &end)) - return NULL; - if (!pyg_boxed_check(font_desc, PANGO_TYPE_FONT_DESCRIPTION)) { - PyErr_SetString(PyExc_TypeError,"desc must be a PangoFontDescription"); - return NULL; - } - desc = pyg_boxed_get(font_desc, PangoFontDescription); - return pypango_attr_new(pango_attr_font_desc_new(desc), start, end); -} -%% -override pango_attr_underline_new kwargs -static PyObject * -_wrap_pango_attr_underline_new(PyObject *self, PyObject *args,PyObject *kwargs) -{ - static char *kwlist[] = { "underline", "start_index", "end_index", NULL }; - PyObject *py_underline; - PangoUnderline underline; - guint start = 0, end = 1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|ii:PangoAttrUnderline", - kwlist, &py_underline, &start, &end)) - return NULL; - if (pyg_enum_get_value(PANGO_TYPE_UNDERLINE, py_underline, - (gint *)&underline)) - return NULL; - - return pypango_attr_new(pango_attr_underline_new(underline), start, end); -} -%% -override pango_attr_strikethrough_new kwargs -static PyObject * -_wrap_pango_attr_strikethrough_new(PyObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "strikethrough", "start_index", - "end_index", NULL }; - gboolean strikethrough; - guint start = 0, end = 1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "i|ii:PangoAttrStrikethrough", - kwlist, &strikethrough, &start, &end)) - return NULL; - - return pypango_attr_new(pango_attr_strikethrough_new(strikethrough), - start, end); -} -%% -override pango_attr_rise_new kwargs -static PyObject * -_wrap_pango_attr_rise_new(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "rise", "start_index", "end_index", NULL }; - gint rise; - guint start = 0, end = 1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i|ii:PangoAttrRise", - kwlist, &rise, &start, &end)) - return NULL; - - return pypango_attr_new(pango_attr_rise_new(rise), start, end); -} -%% -override pango_attr_shape_new kwargs -static PyObject * -_wrap_pango_attr_shape_new(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "ink_rect", "logical_rect", "start_index", - "end_index", NULL }; - PangoRectangle ink_rect, logical_rect; - PyObject *py_ink_rect, *py_logical_rect; - guint start = 0, end = 1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "OO|ii:PangoAttrShape", kwlist, - &py_ink_rect, &py_logical_rect, - &start, &end)) - return NULL; - - if (!PyTuple_Check(py_ink_rect) - || !PyArg_ParseTuple(py_ink_rect, "iiii", - &ink_rect.x, &ink_rect.y, - &ink_rect.width, &ink_rect.height)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "ink_rect must be a 4-tuple of integers"); - return NULL; - } - - if (!PyTuple_Check(py_logical_rect) - || !PyArg_ParseTuple(py_logical_rect, "iiii", - &logical_rect.x, &logical_rect.y, - &logical_rect.width,&logical_rect.height)) { - PyErr_Clear(); - PyErr_SetString(PyExc_TypeError, - "logical_rect must be a 4-tuple of integers"); - return NULL; - } - - return pypango_attr_new(pango_attr_shape_new(&ink_rect, &logical_rect), - start, end); -} -%% -override pango_attr_scale_new kwargs -static PyObject * -_wrap_pango_attr_scale_new(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "scale", "start_index", "end_index", NULL }; - double scale; - guint start = 0, end = 1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "d|ii:PangoAttrScale", - kwlist, &scale, &start, &end)) - return NULL; - - return pypango_attr_new(pango_attr_scale_new(scale), start, end); -} -%% -override pango_attr_list_insert kwargs -static PyObject * -_wrap_pango_attr_list_insert(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "attr", NULL }; - PyPangoAttribute *py_attr; - PangoAttribute *attr; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!:PangoAttrList.insert", kwlist, - &PyPangoAttribute_Type, &py_attr)) - return NULL; - attr = pango_attribute_copy(py_attr->attr); - - pango_attr_list_insert(pyg_boxed_get(self, PangoAttrList), attr); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override pango_attr_list_insert_before kwargs -static PyObject * -_wrap_pango_attr_list_insert_before(PyObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "attr", NULL }; - PyPangoAttribute *py_attr; - PangoAttribute *attr; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!:PangoAttrList.insert_before", kwlist, - &PyPangoAttribute_Type, &py_attr)) - return NULL; - attr = pango_attribute_copy(py_attr->attr); - - pango_attr_list_insert_before(pyg_boxed_get(self, PangoAttrList), attr); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override pango_attr_list_change kwargs -static PyObject * -_wrap_pango_attr_list_change(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "attr", NULL }; - PyPangoAttribute *py_attr; - PangoAttribute *attr; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O!:PangoAttrList.change", kwlist, - &PyPangoAttribute_Type, &py_attr)) - return NULL; - attr = pango_attribute_copy(py_attr->attr); - - pango_attr_list_change(pyg_boxed_get(self, PangoAttrList), attr); - - Py_INCREF(Py_None); - return Py_None; -} -%% -ignore pango_font_description_from_string -%% -override pango_font_description_new kwargs -static int -_wrap_pango_font_description_new(PyGBoxed *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "str", NULL }; - char *str = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "|z:PangoFontDescription.__init__", - kwlist, &str)) - return -1; - - self->gtype = PANGO_TYPE_FONT_DESCRIPTION; - self->free_on_dealloc = FALSE; - if (str) - self->boxed = pango_font_description_from_string(str); - else - self->boxed = pango_font_description_new(); - if (!self->boxed) { - PyErr_SetString(PyExc_RuntimeError, - "could not create PangoFontDescription object"); - return -1; - } - self->free_on_dealloc = TRUE; - return 0; -} -%% -override-slot PangoFontDescription.tp_compare -static int -_wrap_pango_font_description_tp_compare(PyGBoxed *self, PyGBoxed *other) -{ - if (self->boxed == other->boxed || - pango_font_description_equal(pyg_boxed_get(self, PangoFontDescription), - pyg_boxed_get(other, PangoFontDescription))) - return 0; - if (self->boxed > other->boxed) - return -1; - return 1; -} -%% -override-slot PangoFontDescription.tp_hash -static long -_wrap_pango_font_description_tp_hash(PyGBoxed *self) -{ - return (long)pango_font_description_hash( - pyg_boxed_get(self, PangoFontDescription)); -} -%% -override pango_font_description_copy noargs -static PyObject * -_wrap_pango_font_description_copy(PyObject *self) -{ - return pyg_boxed_new(PANGO_TYPE_FONT_DESCRIPTION, - pyg_boxed_get(self, PangoFontDescription), - TRUE, TRUE); -} -%% -override pango_context_list_families noargs -static PyObject * -_wrap_pango_context_list_families(PyGObject *self) -{ - PangoFontFamily **families; - gint n_families, i; - PyObject *ret; - - pango_context_list_families(PANGO_CONTEXT(self->obj), &families, - &n_families); - ret = PyTuple_New(n_families); - for (i = 0; i < n_families; i++) { - PyObject *family; - - family = pygobject_new((GObject *)families[i]); - PyTuple_SetItem(ret, i, family); - } - g_free(families); - return ret; -} -%% -override pango_font_get_glyph_extents kwargs -static PyObject * -_wrap_pango_font_get_glyph_extents(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "glyph", NULL }; - gint glyph; - PangoRectangle ink_rect, logical_rect; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "i:PangoFont.get_glyph_extents", kwlist, - &glyph)) - return NULL; - pango_font_get_glyph_extents(PANGO_FONT(self->obj), (PangoGlyph)glyph, - &ink_rect, &logical_rect); - return Py_BuildValue("((iiii)(iiii))", - ink_rect.x, ink_rect.y, - ink_rect.width, ink_rect.height, - logical_rect.x, logical_rect.y, - logical_rect.width, logical_rect.height); -} -%% -override pango_font_family_list_faces noargs -static PyObject * -_wrap_pango_font_family_list_faces(PyGObject *self) -{ - PangoFontFace **faces; - gint n_faces, i; - PyObject *ret; - - pango_font_family_list_faces(PANGO_FONT_FAMILY(self->obj), - &faces, &n_faces); - ret = PyTuple_New(n_faces); - for (i = 0; i < n_faces; i++) { - PyObject *face; - - face = pygobject_new((GObject *)faces[i]); - PyTuple_SetItem(ret, i, face); - } - g_free(faces); - return ret; -} -%% -override pango_font_map_list_families noargs -static PyObject * -_wrap_pango_font_map_list_families(PyGObject *self) -{ - PangoFontFamily **families; - gint n_families, i; - PyObject *ret; - - pango_font_map_list_families(PANGO_FONT_MAP(self->obj), &families, - &n_families); - ret = PyTuple_New(n_families); - for (i = 0; i < n_families; i++) { - PyObject *family; - - family = pygobject_new((GObject *)families[i]); - PyTuple_SetItem(ret, i, family); - } - g_free(families); - return ret; -} -%% -override pango_glyph_string_extents kwargs -static PyObject * -_wrap_pango_glyph_string_extents(PyObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "font", NULL }; - PyObject *font; - PangoRectangle ink_rect, logical_rect; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O:PangoGlyphString.extents", kwlist, - &font)) - return NULL; - if (!pygobject_check(font, &PyPangoFont_Type)) { - PyErr_SetString(PyExc_TypeError, "font must be a PangoFont"); - return NULL; - } - - pango_glyph_string_extents(pyg_boxed_get(self, PangoGlyphString), - PANGO_FONT(pygobject_get(font)), - &ink_rect, &logical_rect); - - return Py_BuildValue("((iiii)(iiii))", - ink_rect.x, ink_rect.y, - ink_rect.width, ink_rect.height, - logical_rect.x, logical_rect.y, - logical_rect.width, logical_rect.height); -} -%% -override pango_glyph_string_extents_range kwargs -static PyObject * -_wrap_pango_glyph_string_extents_range(PyObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "start", "end", "font", NULL }; - gint start, end; - PyObject *font; - PangoRectangle ink_rect, logical_rect; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "iiO:PangoGlyphString.extents_range", - kwlist, &start, &end, &font)) - return NULL; - if (!pygobject_check(font, &PyPangoFont_Type)) { - PyErr_SetString(PyExc_TypeError, "font must be a PangoFont"); - return NULL; - } - - pango_glyph_string_extents_range(pyg_boxed_get(self, PangoGlyphString), - start, end, - PANGO_FONT(pygobject_get(font)), - &ink_rect, &logical_rect); - - return Py_BuildValue("((iiii)(iiii))", - ink_rect.x, ink_rect.y, - ink_rect.width, ink_rect.height, - logical_rect.x, logical_rect.y, - logical_rect.width, logical_rect.height); -} -%% -override pango_glyph_string_get_logical_widths kwargs -static PyObject * -_wrap_pango_glyph_string_get_logical_widths(PyObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "text", "embedding_level", NULL }; - const char *text; - gint length, embedding_level, *logical_widths; - Py_ssize_t i, slen; - PyObject *ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s#i:PangoGlyphString.get_logical_widths", - kwlist, &text, &length, &embedding_level)) - return NULL; - slen = g_utf8_strlen(text, length); - logical_widths = g_new(int, slen); - pango_glyph_string_get_logical_widths(pyg_boxed_get(self,PangoGlyphString), - text, length, embedding_level, - logical_widths); - ret = PyTuple_New(slen); - for (i = 0; i < slen; i++) { - PyObject *item = PyInt_FromLong(logical_widths[i]); - - PyTuple_SetItem(ret, i, item); - } - g_free(logical_widths); - return ret; -} -%% -override pango_layout_set_markup kwargs -static PyObject * -_wrap_pango_layout_set_markup(PyGObject *self, PyObject *args,PyObject *kwargs) -{ - static char *kwlist[] = { "markup", NULL }; - char *markup; - Py_ssize_t length; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#:PangoLayout.set_markup", - kwlist, &markup, &length)) - return NULL; - - pango_layout_set_markup(PANGO_LAYOUT(self->obj), markup, length); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override pango_layout_set_markup_with_accel kwargs -static PyObject * -_wrap_pango_layout_set_markup_with_accel(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "markup", "accel_marker", NULL }; - char *markup; - Py_ssize_t length, accel_length; - Py_UNICODE *accel_marker, pychr; - gunichar accel_char; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s#u#:PangoLayout.set_markup_with_accel", - kwlist, &markup, &length, - &accel_marker, &accel_length)) - return NULL; - if (accel_length != 1) { - PyErr_SetString(PyExc_TypeError, "accel_marker must be a unicode string of length 1"); - return NULL; - } - pango_layout_set_markup_with_accel(PANGO_LAYOUT(self->obj), markup, length, - (gunichar)accel_marker[0], &accel_char); - -#if !defined(Py_UNICODE_SIZE) || Py_UNICODE_SIZE == 2 - if (accel_char >= 0xffff) { - PyErr_SetString(PyExc_ValueError, "unicode character is too big to fit in a 16-bit unicode character"); - return NULL; - } -#endif - pychr = (Py_UNICODE)accel_char; - return PyUnicode_FromUnicode(&pychr, 1); -} -%% -override pango_layout_index_to_pos kwargs -static PyObject * -_wrap_pango_layout_index_to_pos(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "index", NULL }; - gint index; - PangoRectangle pos; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "i:PangoLayout.index_to_pos", kwlist, - &index)) - return NULL; - - pango_layout_index_to_pos(PANGO_LAYOUT(self->obj), index, &pos); - return Py_BuildValue("(iiii)", pos.x, pos.y, pos.width, pos.height); -} -%% -override pango_layout_get_cursor_pos kwargs -static PyObject * -_wrap_pango_layout_get_cursor_pos(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "index", NULL }; - gint index; - PangoRectangle strong_pos, weak_pos; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "i:PangoLayout.get_cursor_pos", kwlist, - &index)) - return NULL; - - pango_layout_get_cursor_pos(PANGO_LAYOUT(self->obj), index, - &strong_pos, &weak_pos); - return Py_BuildValue("((iiii)(iiii))", - strong_pos.x, strong_pos.y, - strong_pos.width, strong_pos.height, - weak_pos.x, weak_pos.y, - weak_pos.width, weak_pos.height); -} -%% -override pango_layout_move_cursor_visually kwargs -static PyObject * -_wrap_pango_layout_move_cursor_visually(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "strong", "old_index", "old_trailing", "direction", NULL }; - gboolean strong; - gint old_index, old_trailing, direction, new_index = 0, new_trailing = 0; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "iiii:PangoLayout.move_cursor_visually", - kwlist, &strong, &old_index, - &old_trailing, &direction)) - return NULL; - - pango_layout_move_cursor_visually(PANGO_LAYOUT(self->obj), strong, - old_index, old_trailing, direction, - &new_index, &new_trailing); - return Py_BuildValue("(ii)", new_index, new_trailing); -} -%% -override pango_layout_xy_to_index kwargs -static PyObject * -_wrap_pango_layout_xy_to_index(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "x", "y", NULL }; - gint x, y, index, trailing; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "ii:PangoLayout.xy_to_index", kwlist, - &x, &y)) - return NULL; - - pango_layout_xy_to_index(PANGO_LAYOUT(self->obj), x, y, &index, &trailing); - - return Py_BuildValue("(ii)", index, trailing); -} -%% -override pango_layout_get_extents noargs -static PyObject * -_wrap_pango_layout_get_extents(PyGObject *self) -{ - PangoRectangle ink_rect, logical_rect; - - pango_layout_get_extents(PANGO_LAYOUT(self->obj), - &ink_rect, &logical_rect); - - return Py_BuildValue("((iiii)(iiii))", - ink_rect.x, ink_rect.y, - ink_rect.width, ink_rect.height, - logical_rect.x, logical_rect.y, - logical_rect.width, logical_rect.height); -} -%% -override pango_layout_get_pixel_extents noargs -static PyObject * -_wrap_pango_layout_get_pixel_extents(PyGObject *self) -{ - PangoRectangle ink_rect, logical_rect; - - pango_layout_get_pixel_extents(PANGO_LAYOUT(self->obj), - &ink_rect, &logical_rect); - - return Py_BuildValue("((iiii)(iiii))", - ink_rect.x, ink_rect.y, - ink_rect.width, ink_rect.height, - logical_rect.x, logical_rect.y, - logical_rect.width, logical_rect.height); -} -%% -override pango_layout_get_size noargs -static PyObject * -_wrap_pango_layout_get_size(PyGObject *self) -{ - gint width, height; - - pango_layout_get_size(PANGO_LAYOUT(self->obj), &width, &height); - - return Py_BuildValue("(ii)", width, height); -} -%% -override pango_layout_get_pixel_size noargs -static PyObject * -_wrap_pango_layout_get_pixel_size(PyGObject *self) -{ - gint width, height; - - pango_layout_get_pixel_size(PANGO_LAYOUT(self->obj), &width, &height); - - return Py_BuildValue("(ii)", width, height); -} -%% -override pango_parse_markup kwargs -static PyObject * -_wrap_pango_parse_markup(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "markup_text", "accel_marker", NULL }; - char *markup_text, *text = NULL; - Py_ssize_t length; - Py_UNICODE *py_accel_marker = NULL, py_accel_char; - Py_ssize_t py_accel_marker_len; - gunichar accel_marker, accel_char = 0; - PangoAttrList *attr_list = NULL; - GError *error = NULL; - gboolean ret; - PyObject *py_ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#|u#:pango.parse_markup", - kwlist, &markup_text, &length, - &py_accel_marker, &py_accel_marker_len)) - return NULL; - if (py_accel_marker != NULL) { - if (py_accel_marker_len != 1) { - PyErr_SetString(PyExc_TypeError, "accel_mark must be one character"); - return NULL; - } - accel_marker = py_accel_marker[0]; - } else - accel_marker = 0; - - ret = pango_parse_markup(markup_text, length, accel_marker, - &attr_list, &text, &accel_char, &error); - if (pyg_error_check(&error)) - return NULL; - -#if !defined(Py_UNICODE_SIZE) || Py_UNICODE_SIZE == 2 - if (accel_char >= 0xffff) { - PyErr_SetString(PyExc_ValueError, "unicode character is too big to fit in a 16-bit unicode character"); - return NULL; - } -#endif - py_accel_char = (Py_UNICODE)accel_char; - - py_ret = Py_BuildValue("(Nsu#)", pyg_boxed_new(PANGO_TYPE_ATTR_LIST, - attr_list, FALSE, TRUE), - text, &py_accel_char, (Py_ssize_t) 1); - g_free(text); - return py_ret; -} -%% -override pango_tab_array_get_tab kwargs -static PyObject * -_wrap_pango_tab_array_get_tab(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "tab_index", NULL }; - gint tab_index, location; - PangoTabAlign alignment; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:PangoTabArray.get_tab", - kwlist, &tab_index)) - return NULL; - - pango_tab_array_get_tab(pyg_boxed_get(self, PangoTabArray), - tab_index, &alignment, &location); - return Py_BuildValue("(ii)", (int)alignment, location); -} -%% -override pango_tab_array_get_tabs noargs -static PyObject * -_wrap_pango_tab_array_get_tabs(PyObject *self) -{ - PangoTabAlign *alignments; - gint *locations, length, i; - PyObject *ret; - - length = pango_tab_array_get_size(pyg_boxed_get(self, PangoTabArray)); - pango_tab_array_get_tabs(pyg_boxed_get(self, PangoTabArray), - &alignments, &locations); - ret = PyTuple_New(length); - for (i = 0; i < length; i++) { - PyObject *item; - - item = Py_BuildValue("(ii)", (int)alignments[i], locations[i]); - PyTuple_SetItem(ret, i, item); - } - g_free(alignments); - g_free(locations); - return ret; -} -%% -override pango_layout_set_text kwargs -static PyObject * -_wrap_pango_layout_set_text(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "text", NULL }; - char *text; - Py_ssize_t length; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s#:PangoLayout.set_text", - kwlist, &text, &length)) - return NULL; - pango_layout_set_text(PANGO_LAYOUT(self->obj), text, length); - Py_INCREF(Py_None); - return Py_None; -} -%% -override pango_color_parse kwargs -static int -_wrap_pango_color_parse(PyGBoxed *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "spec", NULL }; - char *spec; - PangoColor color; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s:PangoColor.__init__", - kwlist, &spec)) - return -1; - - self->gtype = PANGO_TYPE_COLOR; - self->free_on_dealloc = FALSE; - - if (pango_color_parse(&color, spec) != TRUE - || !(self->boxed = pango_color_copy(&color))) { - PyErr_SetString(PyExc_RuntimeError, - "could not create PangoColor object"); - return -1; - } - - self->free_on_dealloc = TRUE; - - return 0; -} -%% -override pango_attr_list_get_iterator noargs -static PyObject * -_wrap_pango_attr_list_get_iterator(PyGBoxed *self) -{ - PangoAttrList *list = pyg_boxed_get(self, PangoAttrList); - PangoAttrIterator *iter = pango_attr_list_get_iterator(list); - - return pypango_attr_iterator_new(iter); -} -%% -override PANGO_ASCENT kwargs -static PyObject * -_wrap_PANGO_ASCENT(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "rect", NULL }; - int ret; - PangoRectangle rect; - PyObject *py_rect; - - if (PyArg_ParseTupleAndKeywords(args, kwargs, "O!:ASCENT", - kwlist, &PyTuple_Type, &py_rect) - && PyArg_ParseTuple(py_rect, "iiii:ASCENT", &rect.x, &rect.y, - &rect.width, &rect.height)) { - ret = PANGO_ASCENT(rect); - return PyInt_FromLong(ret); - } - PyErr_Clear(); - PyErr_SetString(PyExc_ValueError, "rect must be a 4-tuple of integers"); - return NULL; -} -%% -override PANGO_DESCENT kwargs -static PyObject * -_wrap_PANGO_DESCENT(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "rect", NULL }; - int ret; - PangoRectangle rect; - PyObject *py_rect; - - if (PyArg_ParseTupleAndKeywords(args, kwargs, "O!:DESCENT", - kwlist, &PyTuple_Type, &py_rect) - && PyArg_ParseTuple(py_rect, "iiii:DESCENT", &rect.x, &rect.y, - &rect.width, &rect.height)) { - ret = PANGO_DESCENT(rect); - return PyInt_FromLong(ret); - } - PyErr_Clear(); - PyErr_SetString(PyExc_ValueError, "rect must be a 4-tuple of integers"); - return NULL; -} -%% -override PANGO_LBEARING kwargs -static PyObject * -_wrap_PANGO_LBEARING(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "rect", NULL }; - int ret; - PangoRectangle rect; - PyObject *py_rect; - - if (PyArg_ParseTupleAndKeywords(args, kwargs, "O!:LBEARING", - kwlist, &PyTuple_Type, &py_rect) - && PyArg_ParseTuple(py_rect, "iiii:LBEARING", &rect.x, &rect.y, - &rect.width, &rect.height)) { - ret = PANGO_LBEARING(rect); - return PyInt_FromLong(ret); - } - PyErr_Clear(); - PyErr_SetString(PyExc_ValueError, "rect must be a 4-tuple of integers"); - return NULL; -} -%% -override PANGO_RBEARING kwargs -static PyObject * -_wrap_PANGO_RBEARING(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "rect", NULL }; - int ret; - PangoRectangle rect; - PyObject *py_rect; - - if (PyArg_ParseTupleAndKeywords(args, kwargs, "O!:RBEARING", - kwlist, &PyTuple_Type, &py_rect) - && PyArg_ParseTuple(py_rect, "iiii:RBEARING", &rect.x, &rect.y, - &rect.width, &rect.height)) { - ret = PANGO_RBEARING(rect); - return PyInt_FromLong(ret); - } - PyErr_Clear(); - PyErr_SetString(PyExc_ValueError, "rect must be a 4-tuple of integers"); - return NULL; -} -%% -override pango_attr_fallback_new kwargs -static PyObject * -_wrap_pango_attr_fallback_new(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "fallback", "start_index", "end_index", NULL }; - gboolean fallback; - guint start = 0, end = 1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i|ii:PangoAttrFallback", - kwlist, &fallback, &start, &end)) - return NULL; - - return pypango_attr_new(pango_attr_fallback_new(fallback), - start, end); -} -%% -override pango_attr_list_filter kwargs -static gboolean -pypango_attr_list_filter_cb(PangoAttribute *attr, gpointer data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = data; - PyObject *retobj, *py_attr; - gboolean ret = FALSE; - - state = pyg_gil_state_ensure(); - - py_attr = pypango_attr_new(pango_attribute_copy(attr), - attr->start_index, attr->end_index); - - if (cunote->data) - retobj = PyObject_CallFunction(cunote->func, "NO", py_attr, - cunote->data); - else - retobj = PyObject_CallFunction(cunote->func, "N", py_attr); - - if (retobj != NULL) { - ret = PyObject_IsTrue(retobj); - Py_DECREF(retobj); - } else { - PyErr_Print(); - } - - pyg_gil_state_release(state); - return ret; -} -static PyObject * -_wrap_pango_attr_list_filter(PyGBoxed *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "func", "data", NULL }; - PyObject *py_func, *py_data = NULL; - PangoAttrList *attr_list, *filtered_list; - PyGtkCustomNotify cunote; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:pango.AttrList.filter", - kwlist, &py_func, &py_data)) - return NULL; - - if (!PyCallable_Check(py_func)) { - PyErr_SetString(PyExc_TypeError, "func must be callable"); - return NULL; - } - - cunote.func = py_func; - cunote.data = py_data; - Py_INCREF(cunote.func); - Py_XINCREF(cunote.data); - - attr_list = (PangoAttrList *)pyg_boxed_get(self, PangoAttrList); - filtered_list = pango_attr_list_filter(attr_list, - pypango_attr_list_filter_cb, - (gpointer)&cunote); - - Py_DECREF(cunote.func); - Py_XDECREF(cunote.data); - - if (filtered_list) - return pyg_boxed_new(PANGO_TYPE_ATTR_LIST, filtered_list, FALSE, TRUE); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override pango_font_face_list_sizes noargs -static PyObject * -_wrap_pango_font_face_list_sizes(PyGObject *self) -{ - PyObject *py_sizes; - int *sizes, n_sizes, i; - - pango_font_face_list_sizes(PANGO_FONT_FACE(self->obj), &sizes, &n_sizes); - - - if (!sizes) { - Py_INCREF(Py_None); - return Py_None; - } - - py_sizes = PyTuple_New(n_sizes); - - for (i = 0; i < n_sizes; i++) - PyTuple_SetItem(py_sizes, i, PyInt_FromLong(sizes[i])); - - g_free(sizes); - - return py_sizes; -} -%% -override pango_fontset_foreach kwargs -static gboolean -pypango_fontset_foreach_cb(PangoFontset *fontset, PangoFont *font, - gpointer data) -{ - PyGILState_STATE state; - PyGtkCustomNotify *cunote = data; - PyObject *retobj, *py_font, *py_fontset; - gboolean ret = FALSE; - - state = pyg_gil_state_ensure(); - - py_fontset = pygobject_new((GObject *)fontset); - py_font = pygobject_new((GObject *)font); - - if (cunote->data) - retobj = PyObject_CallFunction(cunote->func, "NNO", py_fontset, - py_font, cunote->data); - else - retobj = PyObject_CallFunction(cunote->func, "NN", py_fontset, - py_font); - - if (retobj != NULL) { - ret = PyObject_IsTrue(retobj); - Py_DECREF(retobj); - } else { - PyErr_Print(); - } - - pyg_gil_state_release(state); - return ret; -} -static PyObject * -_wrap_pango_fontset_foreach(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "func", "data", NULL }; - PyObject *py_func, *py_data = NULL; - PyGtkCustomNotify cunote; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "O|O:pango.Fontset.fforeach", - kwlist, &py_func, &py_data)) - return NULL; - - if (!PyCallable_Check(py_func)) { - PyErr_SetString(PyExc_TypeError, "func must be callable"); - return NULL; - } - - cunote.func = py_func; - cunote.data = py_data; - Py_INCREF(cunote.func); - Py_XINCREF(cunote.data); - - pango_fontset_foreach(PANGO_FONTSET(self->obj), - pypango_fontset_foreach_cb, - (gpointer)&cunote); - - Py_DECREF(cunote.func); - Py_XDECREF(cunote.data); - - Py_INCREF(Py_None); - return Py_None; -} -%% -override pango_language_from_string1 kwargs -static PyObject * -_wrap_pango_language_from_string1(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "language", NULL }; - char *language; - PangoLanguage *ret; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "s:pango_language_from_string", - kwlist, &language)) - return NULL; - if (PyErr_Warn(PyExc_DeprecationWarning, - "use pango.Language instead") < 0) - return NULL; - - ret = pango_language_from_string(language); - /* pyg_boxed_new handles NULL checking */ - return pyg_boxed_new(PANGO_TYPE_LANGUAGE, ret, TRUE, TRUE); -} - -%% -override pango_language_matches1 kwargs -static PyObject * -_wrap_pango_language_matches1(PyGObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "language", "range_list", NULL }; - PyObject *py_language = Py_None; - char *range_list; - PangoLanguage *language = NULL; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "Os:pango_language_matches", - kwlist, &py_language, &range_list)) - return NULL; - if (PyErr_Warn(PyExc_DeprecationWarning, - "use pango.Language.matches instead") < 0) - return NULL; - - if (pyg_boxed_check(py_language, PANGO_TYPE_LANGUAGE)) - language = pyg_boxed_get(py_language, PangoLanguage); - else if (py_language != Py_None) { - PyErr_SetString(PyExc_TypeError, - "language should be a PangoLanguage or None"); - return NULL; - } - - return PyBool_FromLong(pango_language_matches(language, range_list)); -} -%% -override pango_layout_iter_get_char_extents noargs -static PyObject * -_wrap_pango_layout_iter_get_char_extents(PyGObject *self) -{ - PangoRectangle logical_rect; - - pango_layout_iter_get_char_extents(pyg_boxed_get(self, PangoLayoutIter), - &logical_rect); - return Py_BuildValue("(iiii)", - logical_rect.x, logical_rect.y, - logical_rect.width, logical_rect.height); -} -%% -override pango_layout_iter_get_cluster_extents noargs -static PyObject * -_wrap_pango_layout_iter_get_cluster_extents(PyGObject *self) -{ - PangoRectangle ink_rect, logical_rect; - - pango_layout_iter_get_cluster_extents(pyg_boxed_get(self, PangoLayoutIter), - &ink_rect, &logical_rect); - return Py_BuildValue("((iiii)(iiii))", - ink_rect.x, ink_rect.y, - ink_rect.width, ink_rect.height, - logical_rect.x, logical_rect.y, - logical_rect.width, logical_rect.height); -} -%% -override pango_layout_iter_get_line_extents noargs -static PyObject * -_wrap_pango_layout_iter_get_line_extents(PyGObject *self) -{ - PangoRectangle ink_rect, logical_rect; - - pango_layout_iter_get_line_extents(pyg_boxed_get(self, PangoLayoutIter), - &ink_rect, &logical_rect); - return Py_BuildValue("((iiii)(iiii))", - ink_rect.x, ink_rect.y, - ink_rect.width, ink_rect.height, - logical_rect.x, logical_rect.y, - logical_rect.width, logical_rect.height); -} -%% -override pango_layout_iter_get_run_extents noargs -static PyObject * -_wrap_pango_layout_iter_get_run_extents(PyGObject *self) -{ - PangoRectangle ink_rect, logical_rect; - - pango_layout_iter_get_run_extents(pyg_boxed_get(self, PangoLayoutIter), - &ink_rect, &logical_rect); - return Py_BuildValue("((iiii)(iiii))", - ink_rect.x, ink_rect.y, - ink_rect.width, ink_rect.height, - logical_rect.x, logical_rect.y, - logical_rect.width, logical_rect.height); -} -%% -override pango_layout_iter_get_layout_extents noargs -static PyObject * -_wrap_pango_layout_iter_get_layout_extents(PyGObject *self) -{ - PangoRectangle ink_rect, logical_rect; - - pango_layout_iter_get_layout_extents(pyg_boxed_get(self, PangoLayoutIter), - &ink_rect, &logical_rect); - return Py_BuildValue("((iiii)(iiii))", - ink_rect.x, ink_rect.y, - ink_rect.width, ink_rect.height, - logical_rect.x, logical_rect.y, - logical_rect.width, logical_rect.height); -} -%% -override pango_layout_iter_get_line_yrange noargs -static PyObject * -_wrap_pango_layout_iter_get_line_yrange(PyGObject *self) -{ - int start, end; - - pango_layout_iter_get_line_yrange(pyg_boxed_get(self, PangoLayoutIter), - &start, &end); - return Py_BuildValue("(ii)", start, end); -} -%% -override pango_layout_line_x_to_index kwargs -static PyObject * -_wrap_pango_layout_line_x_to_index(PyObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "x_pos", NULL }; - gboolean inside; - int x_pos, index, trailing; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "i:PangoLayoutLine.x_to_index", - kwlist, &x_pos)) - return NULL; - - inside = pango_layout_line_x_to_index(pyg_boxed_get(self, PangoLayoutLine), - x_pos, &index, &trailing); - return Py_BuildValue("Nii", PyBool_FromLong(inside), index, trailing); -} -%% -override pango_layout_line_index_to_x kwargs -static PyObject * -_wrap_pango_layout_line_index_to_x(PyObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "index", "trailing", NULL }; - int x_pos, index; - PyObject *trailing; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "iO:PangoLayoutLine.index_to_x", - kwlist, &index, &trailing)) - return NULL; - pango_layout_line_index_to_x(pyg_boxed_get(self, PangoLayoutLine), - index, PyObject_IsTrue(trailing), - &x_pos); - return PyInt_FromLong(x_pos); -} -%% -override pango_layout_line_get_extents noargs -static PyObject * -_wrap_pango_layout_line_get_extents(PyGObject *self) -{ - PangoRectangle ink_rect, logical_rect; - - pango_layout_line_get_extents(pyg_boxed_get(self, PangoLayoutLine), - &ink_rect, &logical_rect); - - return Py_BuildValue("((iiii)(iiii))", - ink_rect.x, ink_rect.y, - ink_rect.width, ink_rect.height, - logical_rect.x, logical_rect.y, - logical_rect.width, logical_rect.height); -} -%% -override pango_layout_line_get_pixel_extents noargs -static PyObject * -_wrap_pango_layout_line_get_pixel_extents(PyGObject *self) -{ - PangoRectangle ink_rect, logical_rect; - - pango_layout_line_get_pixel_extents(pyg_boxed_get(self, PangoLayoutLine), - &ink_rect, &logical_rect); - - return Py_BuildValue("((iiii)(iiii))", - ink_rect.x, ink_rect.y, - ink_rect.width, ink_rect.height, - logical_rect.x, logical_rect.y, - logical_rect.width, logical_rect.height); -} - -%% -override-attr PangoLayoutLine.runs - -static inline PyObject * -pypango_glyph_item_new(PangoGlyphItem *gitem) -{ - return Py_BuildValue("NN", pyg_boxed_new(PANGO_TYPE_ITEM, gitem->item, TRUE, TRUE), - pyg_boxed_new(PANGO_TYPE_GLYPH_STRING, gitem->glyphs, TRUE, TRUE)); -} - -static PyObject * -_wrap_pango_layout_line__get_runs(PyGObject *self, void *closure) -{ - PangoLayoutLine *line = pyg_boxed_get(self, PangoLayoutLine); - PyObject *list, *item; - GSList *l; - - list = PyList_New(0); - for (l = line->runs; l; l = l->next) { - item = pypango_glyph_item_new((PangoGlyphItem *) l->data); - PyList_Append(list, item); - Py_DECREF(item); - } - return list; -} -%% -override pango_attr_underline_color_new kwargs -static PyObject * -_wrap_pango_attr_underline_color_new(PyObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "red", "green", "blue", "start_index", - "end_index", NULL }; - guint16 red, green, blue; - guint start = 0, end = 1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "HHH|ii:PangoAttrUnderlineColor", - kwlist, &red, &green, &blue, - &start, &end)) - return NULL; - - return pypango_attr_new(pango_attr_underline_color_new(red, green, blue), - start, end); -} -%% -override pango_attr_strikethrough_color_new kwargs -static PyObject * -_wrap_pango_attr_strikethrough_color_new(PyObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "red", "green", "blue", "start_index", - "end_index", NULL }; - guint16 red, green, blue; - guint start = 0, end = 1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "HHH|ii:PangoAttrStrikethroughColor", - kwlist, &red, &green, &blue, - &start, &end)) - return NULL; - - return pypango_attr_new(pango_attr_strikethrough_color_new(red, green, blue), - start, end); -} -%% -override pango_attr_size_new_absolute kwargs -static PyObject * -_wrap_pango_attr_size_new_absolute(PyObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "size", "start_index", "end_index", NULL }; - int size; - guint start = 0, end = 1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "i|ii:PangoAttrSizeAbsolute", - kwlist, &size, &start, &end)) - return NULL; - - return pypango_attr_new(pango_attr_size_new_absolute(size), start, end); -} -%% -override pango_attr_letter_spacing_new kwargs -static PyObject * -_wrap_pango_attr_letter_spacing_new(PyObject *self, PyObject *args, - PyObject *kwargs) -{ - static char *kwlist[] = { "letter_spacing", "start_index", "end_index", - NULL }; - int spacing; - guint start = 0, end = 1; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, - "i|ii:PangoAttrLetterSpacing", - kwlist, &spacing, &start, &end)) - return NULL; - - return pypango_attr_new(pango_attr_letter_spacing_new(spacing), - start, end); -} diff --git a/pangocairo.defs b/pangocairo.defs deleted file mode 100644 index 207ef8a1..00000000 --- a/pangocairo.defs +++ /dev/null @@ -1,162 +0,0 @@ -;; From /opt/gnome-devel/include/pango-1.0/pango/pangocairo.h - -(define-interface CairoFontMap - (in-module "Pango") - (c-name "PangoCairoFontMap") - (gtype-id "PANGO_TYPE_CAIRO_FONT_MAP") - (prerequisite "PangoFontMap") -) - -(define-function font_map_get_type - (c-name "pango_cairo_font_map_get_type") - (return-type "GType") -) - -(define-function cairo_font_map_new - (c-name "pango_cairo_font_map_new") - (return-type "PangoFontMap*") -) - -(define-function cairo_font_map_get_default - (c-name "pango_cairo_font_map_get_default") - (return-type "PangoFontMap*") -) - -(define-method set_resolution - (of-object "PangoCairoFontMap") - (c-name "pango_cairo_font_map_set_resolution") - (return-type "none") - (parameters - '("double" "dpi") - ) -) - -(define-method get_resolution - (of-object "PangoCairoFontMap") - (c-name "pango_cairo_font_map_get_resolution") - (return-type "double") -) - -(define-method create_context - (of-object "PangoCairoFontMap") - (c-name "pango_cairo_font_map_create_context") - (return-type "PangoContext*") -) - -(define-function update_context - (c-name "pango_cairo_update_context") - (return-type "none") - (parameters - '("cairo_t*" "cr") - '("PangoContext*" "context") - ) -) - -(define-function context_set_font_options - (c-name "pango_cairo_context_set_font_options") - (return-type "none") - (parameters - '("PangoContext*" "context") - '("const-cairo_font_options_t*" "options") - ) -) - -(define-function context_get_font_options - (c-name "pango_cairo_context_get_font_options") - (return-type "const-cairo_font_options_t*") - (parameters - '("PangoContext*" "context") - ) -) - -(define-function context_set_resolution - (c-name "pango_cairo_context_set_resolution") - (return-type "none") - (parameters - '("PangoContext*" "context") - '("double" "dpi") - ) -) - -(define-function context_get_resolution - (c-name "pango_cairo_context_get_resolution") - (return-type "double") - (parameters - '("PangoContext*" "context") - ) -) - -(define-function create_layout - (c-name "pango_cairo_create_layout") - (return-type "PangoLayout*") - (parameters - '("cairo_t*" "cr") - ) -) - -(define-function update_layout - (c-name "pango_cairo_update_layout") - (return-type "none") - (parameters - '("cairo_t*" "cr") - '("PangoLayout*" "layout") - ) -) - -(define-function show_glyph_string - (c-name "pango_cairo_show_glyph_string") - (return-type "none") - (parameters - '("cairo_t*" "cr") - '("PangoFont*" "font") - '("PangoGlyphString*" "glyphs") - ) -) - -(define-function show_layout_line - (c-name "pango_cairo_show_layout_line") - (return-type "none") - (parameters - '("cairo_t*" "cr") - '("PangoLayoutLine*" "line") - ) -) - -(define-function show_layout - (c-name "pango_cairo_show_layout") - (return-type "none") - (parameters - '("cairo_t*" "cr") - '("PangoLayout*" "layout") - ) -) - -(define-function glyph_string_path - (c-name "pango_cairo_glyph_string_path") - (return-type "none") - (parameters - '("cairo_t*" "cr") - '("PangoFont*" "font") - '("PangoGlyphString*" "glyphs") - ) -) - -(define-function layout_line_path - (c-name "pango_cairo_layout_line_path") - (return-type "none") - (parameters - '("cairo_t*" "cr") - '("PangoLayoutLine*" "line") - ) -) - -(define-function layout_path - (c-name "pango_cairo_layout_path") - (return-type "none") - (parameters - '("cairo_t*" "cr") - '("PangoLayout*" "layout") - ) -) - - diff --git a/pangocairo.override b/pangocairo.override deleted file mode 100644 index bb923e63..00000000 --- a/pangocairo.override +++ /dev/null @@ -1,315 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- */ -%% -headers -#define NO_IMPORT_PYGOBJECT -#include -#include -#include - - -extern Pycairo_CAPI_t *Pycairo_CAPI; - -GType pypango_layout_line_type; /* See bug 305975 */ - -#ifndef PANGO_TYPE_LAYOUT_LINE -# define PANGO_TYPE_LAYOUT_LINE pypango_layout_line_type -#endif - -%% -import pango.FontMap as PyPangoFontMap_Type -import pango.Context as PyPangoContext_Type -import pango.Layout as PyPangoLayout_Type -import pango.Font as PyPangoFont_Type - -%% -ignore - pango_cairo_update_context - pango_cairo_create_layout - pango_cairo_update_layout - pango_cairo_show_glyph_string - pango_cairo_show_layout_line - pango_cairo_show_layout - pango_cairo_glyph_string_path - pango_cairo_layout_line_path - pango_cairo_layout_path -%% -ignore-glob - *_get_type -%% -define context_get_font_options kwargs -static PyObject * -_wrap_context_get_font_options(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "context", NULL }; - PyGObject *context; - const cairo_font_options_t *font_options; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:pangocairo.context_get_font_options", - kwlist, &PyPangoContext_Type, &context)) - return NULL; - font_options = pango_cairo_context_get_font_options(PANGO_CONTEXT(context->obj)); - if (!font_options) { - Py_INCREF(Py_None); - return Py_None; - } - return PycairoFontOptions_FromFontOptions(cairo_font_options_copy(font_options)); -} - -%% -define context_set_font_options kwargs -static PyObject * -_wrap_context_set_font_options(PyObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "context", "font_options", NULL }; - PyGObject *context; - PyGObject *py_options; - const cairo_font_options_t *options; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O:pangocairo.context_set_font_options", - kwlist, &PyPangoContext_Type, &context, - &py_options)) - return NULL; - if ((PyObject*)py_options == Py_None) - options = NULL; - else if (pygobject_check(py_options, &PycairoFontOptions_Type)) - options = ((PycairoFontOptions *)py_options)->font_options; - else { - PyErr_SetString(PyExc_TypeError, "font_options must be a cairo.FontOptions or None"); - return NULL; - } - pango_cairo_context_set_font_options(PANGO_CONTEXT(context->obj), options); - Py_INCREF(Py_None); - return Py_None; -} - - -%% -body - -static PyObject * -pypango_cairo_new(PyTypeObject *type, PyObject *args, PyObject *kwds) -{ - PyObject *o; - PycairoContext *ctx; - - if (!PyArg_ParseTuple(args, "O!:CairoContext.__new__", - &PycairoContext_Type, &ctx)) - return NULL; - - cairo_reference(ctx->ctx); - o = PycairoContext_FromContext(ctx->ctx, type, NULL); - return o; -} - -static PyObject * -_wrap_pango_cairo_update_context(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "context", NULL }; - PyGObject *context; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:CairoContext.update_context", kwlist, - &PyPangoContext_Type, &context)) - return NULL; - pango_cairo_update_context(PycairoContext_GET(self), PANGO_CONTEXT(context->obj)); - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -_wrap_pango_cairo_create_layout(PyGObject *self) -{ - PangoLayout *ret; - - ret = pango_cairo_create_layout(PycairoContext_GET(self)); - /* pygobject_new handles NULL checking */ - return pygobject_new((GObject *)ret); -} - -static PyObject * -_wrap_pango_cairo_update_layout(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "layout", NULL }; - PyGObject *layout; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:CairoContext.update_layout", - kwlist, &PyPangoLayout_Type, &layout)) - return NULL; - pango_cairo_update_layout(PycairoContext_GET(self), PANGO_LAYOUT(layout->obj)); - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -_wrap_pango_cairo_show_glyph_string(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "font", "glyphs", NULL }; - PyGObject *font; - PangoGlyphString *glyphs = NULL; - PyObject *py_glyphs; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O:CairoContext.show_glyph_string", - kwlist, &PyPangoFont_Type, &font, &py_glyphs)) - return NULL; - if (pyg_boxed_check(py_glyphs, PANGO_TYPE_GLYPH_STRING)) - glyphs = pyg_boxed_get(py_glyphs, PangoGlyphString); - else { - PyErr_SetString(PyExc_TypeError, "glyphs should be a PangoGlyphString"); - return NULL; - } - pango_cairo_show_glyph_string(PycairoContext_GET(self), PANGO_FONT(font->obj), glyphs); - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -_wrap_pango_cairo_show_layout_line(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "line", NULL }; - PangoLayoutLine *line = NULL; - PyObject *py_line; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:CairoContext.show_layout_line", - kwlist, &py_line)) - return NULL; - if (pyg_boxed_check(py_line, PANGO_TYPE_LAYOUT_LINE)) - line = pyg_boxed_get(py_line, PangoLayoutLine); - else { - PyErr_SetString(PyExc_TypeError, "line should be a PangoLayoutLine"); - return NULL; - } - pango_cairo_show_layout_line(PycairoContext_GET(self), line); - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -_wrap_pango_cairo_show_layout(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "layout", NULL }; - PyGObject *layout; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:CairoContext.show_layout", - kwlist, &PyPangoLayout_Type, &layout)) - return NULL; - pango_cairo_show_layout(PycairoContext_GET(self), PANGO_LAYOUT(layout->obj)); - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -_wrap_pango_cairo_glyph_string_path(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "font", "glyphs", NULL }; - PyGObject *font; - PangoGlyphString *glyphs = NULL; - PyObject *py_glyphs; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!O:CairoContext.glyph_string_path", - kwlist, &PyPangoFont_Type, &font, &py_glyphs)) - return NULL; - if (pyg_boxed_check(py_glyphs, PANGO_TYPE_GLYPH_STRING)) - glyphs = pyg_boxed_get(py_glyphs, PangoGlyphString); - else { - PyErr_SetString(PyExc_TypeError, "glyphs should be a PangoGlyphString"); - return NULL; - } - pango_cairo_glyph_string_path(PycairoContext_GET(self), PANGO_FONT(font->obj), glyphs); - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -_wrap_pango_cairo_layout_line_path(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "line", NULL }; - PangoLayoutLine *line = NULL; - PyObject *py_line; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:CairoContext.layout_line_path", - kwlist, &py_line)) - return NULL; - if (pyg_boxed_check(py_line, PANGO_TYPE_LAYOUT_LINE)) - line = pyg_boxed_get(py_line, PangoLayoutLine); - else { - PyErr_SetString(PyExc_TypeError, "line should be a PangoLayoutLine"); - return NULL; - } - pango_cairo_layout_line_path(PycairoContext_GET(self), line); - Py_INCREF(Py_None); - return Py_None; -} - -static PyObject * -_wrap_pango_cairo_layout_path(PyGObject *self, PyObject *args, PyObject *kwargs) -{ - static char *kwlist[] = { "layout", NULL }; - PyGObject *layout; - - if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:CairoContext.layout_path", - kwlist, &PyPangoLayout_Type, &layout)) - return NULL; - pango_cairo_layout_path(PycairoContext_GET(self), PANGO_LAYOUT(layout->obj)); - Py_INCREF(Py_None); - return Py_None; -} - -static PyMethodDef _PyCairoContext_methods[] = { - { "update_context", (PyCFunction)_wrap_pango_cairo_update_context, METH_VARARGS|METH_KEYWORDS }, - { "create_layout", (PyCFunction)_wrap_pango_cairo_create_layout, METH_NOARGS }, - { "update_layout", (PyCFunction)_wrap_pango_cairo_update_layout, METH_VARARGS|METH_KEYWORDS }, - { "show_glyph_string", (PyCFunction)_wrap_pango_cairo_show_glyph_string, METH_VARARGS|METH_KEYWORDS }, - { "show_layout_line", (PyCFunction)_wrap_pango_cairo_show_layout_line, METH_VARARGS|METH_KEYWORDS }, - { "show_layout", (PyCFunction)_wrap_pango_cairo_show_layout, METH_VARARGS|METH_KEYWORDS }, - { "glyph_string_path", (PyCFunction)_wrap_pango_cairo_glyph_string_path, METH_VARARGS|METH_KEYWORDS }, - { "layout_line_path", (PyCFunction)_wrap_pango_cairo_layout_line_path, METH_VARARGS|METH_KEYWORDS }, - { "layout_path", (PyCFunction)_wrap_pango_cairo_layout_path, METH_VARARGS|METH_KEYWORDS }, - { NULL, NULL, 0 } -}; - - -PyTypeObject PyPangoCairoContext_Type = { - PyObject_HEAD_INIT(NULL) - 0, /* ob_size */ - "pangocairo.CairoContext", /* tp_name */ - 0, /* tp_basicsize */ - 0, /* tp_itemsize */ - /* methods */ - (destructor)0, /* tp_dealloc */ - (printfunc)0, /* tp_print */ - (getattrfunc)0, /* tp_getattr */ - (setattrfunc)0, /* tp_setattr */ - (cmpfunc)0, /* tp_compare */ - (reprfunc)0, /* tp_repr */ - 0, /* tp_as_number */ - 0, /* tp_as_sequence */ - 0, /* tp_as_mapping */ - (hashfunc)0, /* tp_hash */ - (ternaryfunc)0, /* tp_call */ - (reprfunc)0, /* tp_str */ - (getattrofunc)0, /* tp_getattro */ - (setattrofunc)0, /* tp_setattro */ - 0, /* tp_as_buffer */ - Py_TPFLAGS_DEFAULT, /* tp_flags */ - "A cairo.Context enhanced with some additional pango methods", /* Documentation string */ - (traverseproc)0, /* tp_traverse */ - (inquiry)0, /* tp_clear */ - (richcmpfunc)0, /* tp_richcompare */ - 0, /* tp_weaklistoffset */ - (getiterfunc)0, /* tp_iter */ - (iternextfunc)0, /* tp_iternext */ - _PyCairoContext_methods, /* tp_methods */ - 0, /* tp_members */ - 0, /* tp_getset */ - (PyTypeObject *)0, /* tp_base */ - (PyObject *)0, /* tp_dict */ - 0, /* tp_descr_get */ - 0, /* tp_descr_set */ - 0, /* tp_dictoffset */ - (initproc)0, /* tp_init */ - 0, /* tp_alloc */ - pypango_cairo_new, /* tp_new */ - 0, /* tp_free */ - (inquiry)0, /* tp_is_gc */ - (PyObject *)0, /* tp_bases */ -}; - diff --git a/pangocairomodule.c b/pangocairomodule.c deleted file mode 100644 index f9db189f..00000000 --- a/pangocairomodule.c +++ /dev/null @@ -1,70 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * pangomodule.c: module wrapping the Pango library - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include -#include - -#include -#include - -/* include any extra headers needed here */ - -void pypangocairo_register_classes(PyObject *d); -void pypangocairo_add_constants(PyObject *module, const gchar *strip_prefix); - -extern PyMethodDef pypangocairo_functions[]; -extern PyTypeObject PyPangoCairoContext_Type; -extern GType pypango_layout_line_type; - -Pycairo_CAPI_t *Pycairo_CAPI; - - -DL_EXPORT(void) -initpangocairo(void) -{ - PyObject *m, *d; - - /* perform any initialisation required by the library here */ - - m = Py_InitModule("pangocairo", pypangocairo_functions); - d = PyModule_GetDict(m); - - Pycairo_IMPORT; - if (Pycairo_CAPI == NULL) - return; - - PyPangoCairoContext_Type.tp_base = &PycairoContext_Type; - if (PyType_Ready(&PyPangoCairoContext_Type) < 0) { - g_return_if_reached(); - } - init_pygobject(); - - pypangocairo_register_classes(d); - - Py_INCREF(&PyPangoCairoContext_Type); - PyModule_AddObject(m, "CairoContext", (PyObject *)&PyPangoCairoContext_Type); - - pypango_layout_line_type = g_type_from_name("PangoLayoutLine"); -} - diff --git a/pangomodule.c b/pangomodule.c deleted file mode 100644 index 439a86b9..00000000 --- a/pangomodule.c +++ /dev/null @@ -1,100 +0,0 @@ -/* -*- Mode: C; c-basic-offset: 4 -*- - * pygtk- Python bindings for the GTK toolkit. - * Copyright (C) 1998-2003 James Henstridge - * - * pangomodule.c: module wrapping the Pango library - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 - * USA - */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include -#include - -#include - -/* include any extra headers needed here */ - -void pypango_register_classes(PyObject *d); -void pypango_add_constants(PyObject *module, const gchar *strip_prefix); -extern PyMethodDef pypango_functions[]; - -#ifndef pyg_add_warning_redirection - -static void -_log_func(const gchar *log_domain, - GLogLevelFlags log_level, - const gchar *message, - gpointer user_data) -{ - PyGILState_STATE state; - PyObject* warning = user_data; - - state = pyg_gil_state_ensure(); - PyErr_Warn(warning, (char *) message); - pyg_gil_state_release(state); -} - -#endif - - -DL_EXPORT(void) -initpango(void) -{ - PyObject *m, *d; - PyObject *warning; - - /* perform any initialisation required by the library here */ - - m = Py_InitModule("pango", pypango_functions); - d = PyModule_GetDict(m); - - init_pygobject_check(2, 11, 1); - - /* set the default python encoding to utf-8 */ - PyUnicode_SetDefaultEncoding("utf-8"); - - pypango_register_classes(d); - pypango_add_constants(m, "PANGO_"); - - PyModule_AddObject(m, "SCALE_XX_SMALL", - PyFloat_FromDouble(PANGO_SCALE_XX_SMALL)); - PyModule_AddObject(m, "SCALE_X_SMALL", - PyFloat_FromDouble(PANGO_SCALE_X_SMALL)); - PyModule_AddObject(m, "SCALE_SMALL", - PyFloat_FromDouble(PANGO_SCALE_SMALL)); - PyModule_AddObject(m, "SCALE_MEDIUM", - PyFloat_FromDouble(PANGO_SCALE_MEDIUM)); - PyModule_AddObject(m, "SCALE_LARGE", - PyFloat_FromDouble(PANGO_SCALE_LARGE)); - PyModule_AddObject(m, "SCALE_X_LARGE", - PyFloat_FromDouble(PANGO_SCALE_X_LARGE)); - PyModule_AddObject(m, "SCALE_XX_LARGE", - PyFloat_FromDouble(PANGO_SCALE_XX_LARGE)); - PyModule_AddObject(m, "SCALE", - PyInt_FromLong(PANGO_SCALE)); - - /* add anything else to the module dictionary (such as constants) */ - warning = PyErr_NewException("pango.PangoWarning", PyExc_Warning, NULL); - PyDict_SetItemString(d, "Warning", warning); -#ifdef pyg_add_warning_redirection - pyg_add_warning_redirection("Pango", warning); -#else - g_log_set_handler("Pango", G_LOG_LEVEL_CRITICAL|G_LOG_LEVEL_WARNING, - _log_func, warning); -#endif -} diff --git a/pygobject-2.0.pc.in b/pygobject-2.0.pc.in deleted file mode 100644 index cb04d333..00000000 --- a/pygobject-2.0.pc.in +++ /dev/null @@ -1,20 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -includedir=@includedir@ -datarootdir=@datarootdir@ -datadir=@datadir@ - -# you can use the --variable=pygtkincludedir argument to -# pkg-config to get this value. You might want to use this to -# install additional headers. -pygtkincludedir=${includedir}/pygtk-2.0 - -# same here. Useful when calling the code generator in addon packages. -defsdir=${datadir}/pygtk/2.0/defs -codegendir=${datadir}/pygtk/2.0/codegen - -Name: PyGObject -Description: Python bindings for GObject -Requires: gobject-2.0 -Version: @VERSION@ -Cflags: -I${pygtkincludedir} diff --git a/pygtk-2.0.pc.in b/pygtk-2.0.pc.in deleted file mode 100644 index f5734c8b..00000000 --- a/pygtk-2.0.pc.in +++ /dev/null @@ -1,21 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -includedir=@includedir@ -datarootdir=@datarootdir@ -datadir=@datadir@ -pyexecdir=@pyexecdir@ - -# you can use the --variable=pygtkincludedir argument to -# pkg-config to get this value. You might want to use this to -# install additional headers. -pygtkincludedir=${includedir}/pygtk-2.0 - -# same here. Useful when calling the code generator in addon packages. -defsdir=${datadir}/pygtk/2.0/defs -codegendir=${datadir}/pygtk/2.0/codegen - -Name: PyGTK -Description: Python bindings for GTK+ and related libraries -Requires: pygobject-2.0 -Version: @VERSION@ -Cflags: -I${pygtkincludedir} @THREADING_CFLAGS@ diff --git a/pygtk.spec.in b/pygtk.spec.in deleted file mode 100644 index b4a4356b..00000000 --- a/pygtk.spec.in +++ /dev/null @@ -1,127 +0,0 @@ -# -*- mode: rpm-spec -*- -%define buildglade %(pkg-config libglade-2.0 && echo 1 || echo 0) -%define python python2 - -Summary: Python bindings for the GTK+ widget set. -Name: pygtk2 -Version: @VERSION@ -Release: 1 -Copyright: LGPL -Group: Development/Languages -Source: ftp://ftp.gtk.org/pub/gtk/python/pygtk-%{version}.tar.gz -BuildRoot: /var/tmp/pygtk-root -Packager: James Henstridge -Requires: gtk2 >= 2.0.0 -Requires: %{python} >= 2.2 -Buildrequires: %{python}-devel >= 2.2 -Buildrequires: libglade2-devel - -%description -PyGTK is an extension module for python that gives you access to the GTK+ -widget set. Just about anything you can write in C with GTK+ you can write -in python with PyGTK (within reason), but with all the benefits of python. - -%package libglade -Summary: A wrapper for the libglade library for use with PyGTK -Group: Development/Languages -Requires: pygtk2 = %{version} - -%description libglade -This module contains a wrapper for the libglade library. Libglade allows -a program to construct its user interface from an XML description, which -allows the programmer to keep the UI and program logic separate. - -%package devel -Summary: files needed to build wrappers for GTK+ addon libraries -Group: Development/Languages -Requires: pygtk2 = %{version} - -%description devel -This package contains files required to build wrappers for GTK+ addon -libraries so that they interoperate with pygtk. - -%changelog -* Thu Oct 31 2002 Matt Wilson -- use libdir for .pc files - -* Wed Feb 27 2002 Matt Wilson -- 1.99.8 - -* Mon Jan 28 2002 Matt Wilson -- added atkmodule.so to file list - -* Thu Oct 18 2001 Matt Wilson -- fix devel filelist to match new header location - -* Mon Oct 15 2001 Matt Wilson -- get the headers from their new version-specific location - -* Thu Oct 11 2001 Matt Wilson -- fixed typo in devel filelist -- added macro that tests to see if we have libglade2, make the - filelist a condition of that -- changed name to 'pygtk2' to avoid name conflict with pygtk - -%prep -%setup -q -n pygtk-%{version} -[ -x /usr/bin/python2.2 ] && export PYTHON=/usr/bin/python2.2 -./configure --prefix=%{_prefix} - -%build -make - -%install -rm -rf $RPM_BUILD_ROOT -make DESTDIR=$RPM_BUILD_ROOT install -find $RPM_BUILD_ROOT -type f -name "*.la" -exec rm -f {} ';' - -%files -%defattr(644, root, root, 755) -%{_prefix}/lib/python?.?/site-packages/pygtk.pth -%{_prefix}/lib/python?.?/site-packages/pygtk.py* -%dir %{_prefix}/lib/python?.?/site-packages/gtk-2.0 -%dir %{_prefix}/lib/python?.?/site-packages/gtk-2.0/gtk -%{_prefix}/lib/python?.?/site-packages/gtk-2.0/gtk/__init__.py* -%{_prefix}/lib/python?.?/site-packages/gtk-2.0/gtk/compat.* -%{_prefix}/lib/python?.?/site-packages/gtk-2.0/gtk/keysyms.py* -%{_prefix}/lib/python?.?/site-packages/gtk-2.0/dsextras* - -%defattr(755, root, root, 755) -%{_prefix}/lib/python?.?/site-packages/gtk-2.0/atk.so -%{_prefix}/lib/python?.?/site-packages/gtk-2.0/gobject.so -%{_prefix}/lib/python?.?/site-packages/gtk-2.0/pango.so -%{_prefix}/lib/python?.?/site-packages/gtk-2.0/gtk/_gtk.so - -%doc AUTHORS NEWS README MAPPING ChangeLog -%doc examples - -%if %{buildglade} -%files libglade -%defattr(755, root, root, 755) -%{_prefix}/lib/python?.?/site-packages/gtk-2.0/gtk/glade.so -%endif - -%files devel -%defattr(755, root, root, 755) -%{_prefix}/bin/pygtk-codegen-2.0 -%defattr(644, root, root, 755) -%dir %{_prefix}/include/pygtk-2.0 -%{_prefix}/include/pygtk-2.0/*.h -%dir %{_prefix}/include/pygtk-2.0/pygtk -%{_prefix}/include/pygtk-2.0/pygtk/*.h -%{_libdir}/pkgconfig/pygtk-2.0.pc -%dir %{_prefix}/share/pygtk -%dir %{_prefix}/share/pygtk/2.0 -%dir %{_prefix}/share/pygtk/2.0/codegen -%dir %{_prefix}/share/pygtk/2.0/defs -%{_prefix}/share/pygtk/2.0/codegen/* -%{_prefix}/share/pygtk/2.0/defs/atk.defs -%{_prefix}/share/pygtk/2.0/defs/atk-types.defs -%{_prefix}/share/pygtk/2.0/defs/pango.defs -%{_prefix}/share/pygtk/2.0/defs/pango-types.defs -%{_prefix}/share/pygtk/2.0/defs/gdk.defs -%{_prefix}/share/pygtk/2.0/defs/gdk-types.defs -%{_prefix}/share/pygtk/2.0/defs/gtk.defs -%{_prefix}/share/pygtk/2.0/defs/gtk-types.defs -%{_prefix}/share/pygtk/2.0/defs/gtk-extrafuncs.defs -%{_prefix}/share/pygtk/2.0/defs/libglade.defs diff --git a/pygtk_postinstall.py b/pygtk_postinstall.py deleted file mode 100644 index 627bc12b..00000000 --- a/pygtk_postinstall.py +++ /dev/null @@ -1,108 +0,0 @@ - -"""pygtk is now installed on your machine. - -Local configuration files were successfully updated.""" - -import os, os.path, re, sys -import distutils.sysconfig -import distutils.file_util -import distutils.errors - -PYGOBJECT_XSL_DIR = os.path.join('share', 'pygobject','xsl') -PYGOBJECT_HTML_DIR = os.path.join('share', 'gtk-doc', 'html', 'pygobject') -HTML_DIR = os.path.join('share', 'gtk-doc', 'html', 'pygtk') - -prefix_pattern=re.compile("^prefix=.*") -exec_pattern=re.compile("^exec\s.*") -codegendir_pattern=re.compile("^codegendir=.*") - -def replace_prefix(s): - if prefix_pattern.match(s): - s='prefix='+sys.prefix.replace("\\","/")+'\n' - if exec_pattern.match(s): - s=('exec '+sys.prefix+'\\python.exe '+ - '$codegendir/codegen.py \"$@\"\n').replace("\\","/") - if codegendir_pattern.match(s): - s=('codegendir=' - +distutils.sysconfig.get_python_lib().replace("\\","/")+ - '/gtk-2.0/codegen' + '\n') - return s - -def copy_pygobject_css(): - # Copy style.css from pygobject docs to pygtk docs - try: - distutils.file_util.copy_file( - os.path.normpath(os.path.join(sys.prefix, PYGOBJECT_HTML_DIR, - 'style.css')), - os.path.normpath(os.path.join(sys.prefix,HTML_DIR))) - except distutils.errors.DistutilsFileError: - # probably pygobject has not been installed yet - pass - - - -def html_fixxref(): - sys.path.insert(0, os.path.normpath(os.path.join(sys.prefix, - PYGOBJECT_XSL_DIR))) - try: - import fixxref - fixxref.scan_index_dir(fixxref.DOCDIR) - fixxref.fix_xrefs(os.path.normpath(os.path.join(sys.prefix, - HTML_DIR))) - except ImportError, e: - pass - -# TODO : Check that shortcuts are created system-wide when the user -# has admin rights (hint: see pywin32 postinstall) -def create_shortcuts(): - progs_folder= get_special_folder_path("CSIDL_COMMON_PROGRAMS") - site_packages_dir = os.path.join(sys.prefix , 'lib','site-packages') - - pygtk_shortcuts = os.path.join(progs_folder, 'PyGTK') - if not os.path.isdir(pygtk_shortcuts): - os.mkdir(pygtk_shortcuts) - - pygtk_doc_link=os.path.join(pygtk_shortcuts, - 'PyGTK Documentation.lnk') - if os.path.isfile(pygtk_doc_link): - os.remove(pygtk_doc_link) - - create_shortcut(os.path.join(sys.prefix,'share','gtk-doc','html', - 'pygtk','index.html'), - 'PyGTK Documentation', pygtk_doc_link) - - homepage_link = os.path.join(pygtk_shortcuts, - "PyGTK Home.lnk") - if os.path.isfile(homepage_link): - os.remove(homepage_link) - create_shortcut("http://www.pygtk.org",'PyGTK Homepage', homepage_link) - -def remove_shortcuts(): - pygtk_shortcuts = os.path.join( - get_special_folder_path('CSIDL_COMMON_PROGRAMS'), 'PyGTK') - os.remove(os.path.join(pygtk_shortcuts,'PyGTK Documentation.lnk')) - os.remove(os.path.join(pygtk_shortcuts,'PyGTK Home.lnk')) - try: - os.rmdir(pygtk_shortcuts) - except OSError, e: - # Directory is not empty, so leave it like that ! - pass - -if len(sys.argv) == 2: - if sys.argv[1] == "-install": - filenames=['lib/pkgconfig/pygtk-2.0.pc','bin/pygtk-codegen-2.0'] - for filename in filenames: - pkgconfig_file = os.path.normpath( - os.path.join(sys.prefix,filename)) - - lines=open(pkgconfig_file).readlines() - open(pkgconfig_file, 'w').writelines(map(replace_prefix,lines)) - copy_pygobject_css() - html_fixxref() - # TODO: Add an installer option for shortcut creation - # create_shortcuts() - print __doc__ - elif sys.argv[1] == "-remove": - # remove_shortcuts() - os.remove(os.path.normpath( - os.path.join(sys.prefix,HTML_DIR,'style.css'))) diff --git a/setup.py b/setup.py deleted file mode 100755 index 3c075c24..00000000 --- a/setup.py +++ /dev/null @@ -1,320 +0,0 @@ -#!/usr/bin/env python -# -# setup.py - distutils configuration for pygtk -# -# TODO: -# pygtk.spec(.in) -# install *.pyc for codegen -# -"""Python Bindings for the GTK Widget Set. - -PyGTK is a set of bindings for the GTK widget set. It provides an object -oriented interface that is slightly higher level than the C one. It -automatically does all the type casting and reference counting that you -would have to do normally with the C API. You can find out more on the -official homepage, http://www.daa.com.au/~james/pygtk/""" - -from distutils.command.build import build -from distutils.core import setup -import glob -import os -import sys - -from dsextras import get_m4_define, getoutput, have_pkgconfig, \ - pkgc_version_check, \ - GLOBAL_INC, GLOBAL_MACROS, InstallLib, InstallData, BuildExt, \ - PkgConfigExtension, Template, TemplateExtension - - -if '--yes-i-know-its-not-supported' in sys.argv: - sys.argv.remove('--yes-i-know-its-not-supported') -else: - print '*'*70 - print 'Building PyGTK using distutils is NOT SUPPORTED.' - print "It's mainly included to be able to easily build win32 installers" - print "You may continue, but only if you agree to not ask any questions" - print "To build PyGTK in a supported way, read the INSTALL file" - print - print "Build fixes are of course welcome and should be filed in bugzilla" - print '*'*70 - input = raw_input('Not supported, ok [y/N]? ') - if not input.startswith('y'): - raise SystemExit - - if sys.version_info[:3] < (2, 3, 5): - raise SystemExit, \ - "Python 2.3.5 or higher is required, %d.%d.%d found" % sys.version_info[:3] - -MAJOR_VERSION = int(get_m4_define('pygtk_major_version')) -MINOR_VERSION = int(get_m4_define('pygtk_minor_version')) -MICRO_VERSION = int(get_m4_define('pygtk_micro_version')) - -VERSION = "%d.%d.%d" % (MAJOR_VERSION, MINOR_VERSION, MICRO_VERSION) - -GOBJECT_REQUIRED = get_m4_define('glib_required_version') -ATK_REQUIRED = get_m4_define('atk_required_version') -PANGO_REQUIRED = get_m4_define('pango_required_version') -GTK_REQUIRED = get_m4_define('gtk_required_version') -LIBGLADE_REQUIRED = get_m4_define('libglade_required_version') -PYCAIRO_REQUIRED = get_m4_define('pycairo_required_version') - -PYGTK_SUFFIX = '2.0' -PYGTK_SUFFIX_LONG = 'gtk-' + PYGTK_SUFFIX - -GLOBAL_INC += ['.', 'gtk'] -GLOBAL_MACROS += [('PYGTK_MAJOR_VERSION', MAJOR_VERSION), - ('PYGTK_MINOR_VERSION', MINOR_VERSION), - ('PYGTK_MICRO_VERSION', MICRO_VERSION)] - -if sys.platform == 'win32': - GLOBAL_MACROS.append(('VERSION', '"""%s"""' % VERSION)) - GLOBAL_MACROS.append(('PLATFORM_WIN32',1)) - GLOBAL_MACROS.append(('HAVE_BIND_TEXTDOMAIN_CODESET',1)) -else: - GLOBAL_MACROS.append(('VERSION', '"%s"' % VERSION)) - -DEFS_DIR = os.path.join('share', 'pygtk', PYGTK_SUFFIX, 'defs') -CODEGEN_DIR = os.path.join('share', 'pygtk', PYGTK_SUFFIX, 'codegen') -INCLUDE_DIR = os.path.join('include', 'pygtk-%s' % PYGTK_SUFFIX) -HTML_DIR = os.path.join('share', 'gtk-doc', 'html', 'pygtk') - -class PyGtkInstallLib(InstallLib): - def run(self): - - # Install pygtk.pth, pygtk.py[c] and templates - self.install_pth() - - # Modify the base installation dir - install_dir = os.path.join(self.install_dir, PYGTK_SUFFIX_LONG) - self.set_install_dir(install_dir) - - InstallLib.run(self) - - def install_pth(self): - """Write the pygtk.pth file""" - file = os.path.join(self.install_dir, 'pygtk.pth') - self.mkpath(self.install_dir) - open(file, 'w').write(PYGTK_SUFFIX_LONG) - self.local_outputs.append(file) - self.local_inputs.append('pygtk.pth') - -class PyGtkInstallData(InstallData): - def run(self): - self.add_template_option('VERSION', VERSION) - self.prepare() - - # Install templates - self.install_templates() - - InstallData.run(self) - - def install_templates(self): - file = self.install_template('codegen/pygtk-codegen-2.0.in', - os.path.join(self.install_dir, 'bin')) - os.chmod(file, 0755) - self.install_template('pygtk-2.0.pc.in', - os.path.join(self.install_dir, - 'lib','pkgconfig')) - -class PyGtkBuild(build): - enable_threading = 1 -PyGtkBuild.user_options.append(('enable-threading', None, - 'enable threading support')) - -# Atk -atk = TemplateExtension(name='atk', pkc_name='atk', - pkc_version=ATK_REQUIRED, - sources=['atkmodule.c', 'atk.c'], - register=['atk-types.defs'], - override='atk.override', - defs='atk.defs', - py_ssize_t_clean=True) -# Pango -pango = TemplateExtension(name='pango', pkc_name='pango', - pkc_version=PANGO_REQUIRED, - sources=['pango.c', 'pangomodule.c'], - register=['pango-types.defs'], - override='pango.override', - defs='pango.defs', - py_ssize_t_clean=True) -# Pangocairo -pangocairo = TemplateExtension(name='pangocairo', - pkc_name=('pycairo', 'pangocairo'), - pkc_version=(PYCAIRO_REQUIRED, - PANGO_REQUIRED), - sources=['pangocairo.c', 'pangocairomodule.c'], - register=['pango-types.defs'], - override='pangocairo.override', - defs='pangocairo.defs', - py_ssize_t_clean=True) - -# Gdk (template only) -gdk_template = Template('gtk/gdk.override', 'gtk/gdk.c', - defs=('gtk/gdk.defs', - ['gtk/gdk-2.10.defs','gtk/gdk-base.defs']), - prefix='pygdk', - register=['atk-types.defs', - 'pango-types.defs', - ('gtk/gdk-types.defs', - ['gtk/gdk-base-types.defs'])], - py_ssize_t_clean=True) -# Gtk+ -if pangocairo.can_build(): - gtk_pkc_name=('gtk+-2.0','pycairo') - gtk_pkc_version=(GTK_REQUIRED,PYCAIRO_REQUIRED) -else: - gtk_pkc_name='gtk+-2.0' - gtk_pkc_version=GTK_REQUIRED - -if pkgc_version_check('gtk+-2.0', '2.10.0'): - gtk_pkc_defs=('gtk/gtk.defs',['gtk/gtk-2.10.defs','gtk/gtk-base.defs']) - gtk_pkc_register=['pango-types.defs', - ('gtk/gdk-types.defs',['gtk/gdk-base-types.defs']), - ('gtk/gtk-types.defs',['gtk/gtk-base-types.defs', - 'gtk/gtk-2.10-types.defs'])] - libglade_pkc_register=[('gtk/gtk-types.defs', - ['gtk/gtk-base-types.defs', - 'gtk/gtk-2.10-types.defs']), - 'gtk/libglade.defs'] -else: - gtk_pkc_defs=('gtk/gtk.defs',['gtk/gtk-base.defs']) - gtk_pkc_register=['pango-types.defs', - ('gtk/gdk-types.defs',['gtk/gdk-base-types.defs']), - ('gtk/gtk-types.defs',['gtk/gtk-base-types.defs'])] - libglade_pkc_register=[('gtk/gtk-types.defs',['gtk/gtk-base-types.defs']), - 'gtk/libglade.defs'] - -gtk = TemplateExtension(name='gtk', pkc_name=gtk_pkc_name, - pkc_version=gtk_pkc_version, - output='gtk._gtk', - sources=['gtk/gtkmodule.c', - 'gtk/gtkobject-support.c', - 'gtk/gtk-types.c', - 'gtk/pygtktreemodel.c', - 'gtk/pygtkcellrenderer.c', - 'gtk/gdk.c', - 'gtk/gtk.c'], - register=gtk_pkc_register, - override='gtk/gtk.override', - defs=gtk_pkc_defs, - py_ssize_t_clean=True) -gtk.templates.append(gdk_template) - -# Libglade -libglade = TemplateExtension(name='libglade', pkc_name='libglade-2.0', - pkc_version=LIBGLADE_REQUIRED, - output='gtk.glade', - defs='gtk/libglade.defs', - sources=['gtk/libglademodule.c', - 'gtk/libglade.c'], - register=libglade_pkc_register, - override='gtk/libglade.override', - py_ssize_t_clean=True) - -data_files = [] -ext_modules = [] -py_modules = [] -packages = ['codegen'] - -if not have_pkgconfig(): - print "Error, could not find pkg-config" - raise SystemExit - -if atk.can_build(): - ext_modules.append(atk) - data_files.append((DEFS_DIR, ('atk.defs', 'atk-types.defs'))) -if pango.can_build(): - ext_modules.append(pango) - data_files.append((DEFS_DIR, ('pango.defs', 'pango-types.defs'))) - if pangocairo.can_build(): - ext_modules.append(pangocairo) - data_files.append((DEFS_DIR, ('pangocairo.defs',))) - GLOBAL_MACROS.append(('HAVE_PYCAIRO',1)) -if gtk.can_build(): - if '--disable-numeric' in sys.argv: - sys.argv.remove('--disable-numeric') - else: - try: - import Numeric - Numeric # pyflakes - GLOBAL_MACROS.append(('HAVE_NUMPY', 1)) - except ImportError: - print ('* Numeric module could not be found, ' - 'will build without Numeric support.') - ext_modules.append(gtk) - data_files.append((os.path.join(INCLUDE_DIR, 'pygtk'), ('gtk/pygtk.h',))) - data_files.append((DEFS_DIR, ('gtk/gdk.defs', 'gtk/gdk-types.defs', - 'gtk/gdk-base.defs', - 'gtk/gdk-base-types.defs', - 'gtk/gtk.defs', 'gtk/gtk-types.defs', - 'gtk/gtk-2.10.defs', - 'gtk/gtk-2.10-types.defs', - 'gtk/gtk-base.defs', - 'gtk/gtk-base-types.defs', - 'gtk/gtk-extrafuncs.defs'))) - data_files.append((HTML_DIR, glob.glob('docs/html/*.html'))) - py_modules += ['gtk.compat', 'gtk.deprecation', 'gtk.keysyms', - 'gtk._lazyutils'] - -if libglade.can_build(): - ext_modules.append(libglade) - data_files.append((DEFS_DIR, ('gtk/libglade.defs',))) - -# Threading support -if '--disable-threading' in sys.argv: - sys.argv.remove('--disable-threading') - enable_threading = False -else: - if '--enable-threading' in sys.argv: - sys.argv.remove('--enable-threading') - try: - import thread - thread # pyflakes - except ImportError: - print "Warning: Could not import thread module, disabling threading" - enable_threading = False - else: - enable_threading = True - -if enable_threading: - name = 'gthread-2.0' - for module in ext_modules: - raw = getoutput('pkg-config --libs-only-l %s' % name) - for arg in raw.split(): - if arg.startswith('-l'): - module.libraries.append(arg[2:]) - else: - module.extra_link_args.append(arg) - raw = getoutput('pkg-config --cflags-only-I %s' % name) - for arg in raw.split(): - if arg.startswith('-I'): - module.include_dirs.append(arg[2:]) - else: - module.extra_compile_args.append(arg) -else: - GLOBAL_MACROS.append(('DISABLE_THREADING', 1)) - - -doclines = __doc__.split("\n") - -options = {"bdist_wininst": {"install_script": "pygtk_postinstall.py"}} - -setup(name="pygtk", - url='http://www.daa.com.au/~james/pygtk/', - version=VERSION, - license='LGPL', - platforms=['yes'], - maintainer="James Henstridge", - maintainer_email="james@daa.com.au", - description = doclines[0], - long_description = "\n".join(doclines[2:]), - py_modules=py_modules, - packages=packages, - ext_modules=ext_modules, - data_files=data_files, - scripts = ["pygtk_postinstall.py"], - options=options, - cmdclass={'install_lib': PyGtkInstallLib, - 'install_data': PyGtkInstallData, - 'build_ext': BuildExt, - 'build': PyGtkBuild}) diff --git a/tests/Makefile.am b/tests/Makefile.am deleted file mode 100644 index 5c259064..00000000 --- a/tests/Makefile.am +++ /dev/null @@ -1,33 +0,0 @@ -EXTRA_DIST = $(tests) common.py runtests.py testmodule.py leak.glade - -tests = \ - test_actiongroup.py \ - test_api.py \ - test_container.py - test_conversion.py \ - test_dialog.py \ - test_enum.py \ - test_gdk.py \ - test_glade.py \ - test_liststore.py - test_pango.py \ - test_radiobutton.py \ - test_style.py \ - test_textview.py \ - test_treeview.py - -GTK_PY_FILES = __init__.py _lazyutils.py compat.py deprecation.py keysyms.py - -check-local: $(top_srcdir)/gtk/__init__.py - @if test "$(top_builddir)" != "$(top_srcdir)"; then \ - for gtk_py in $(GTK_PY_FILES) ; do \ - cp $(top_srcdir)/gtk/$${gtk_py} $(top_builddir)/gtk/; \ - done \ - fi - @$(PYTHON) $(srcdir)/runtests.py $(top_builddir) $(top_srcdir) - @if test "$(top_builddir)" != "$(top_srcdir)"; then \ - for gtk_py in $(GTK_PY_FILES) ; do \ - rm -f $(top_builddir)/gtk/$${gtk_py}*; \ - done \ - fi - @rm -fr *.pyc diff --git a/tests/common.py b/tests/common.py deleted file mode 100644 index dfc34012..00000000 --- a/tests/common.py +++ /dev/null @@ -1,68 +0,0 @@ -import os -import sys - -import gobject - -def importModules(buildDir, srcDir): - # Be very careful when you change this code, it's - # fragile and the order is really significant - - # ltihooks - sys.path.insert(0, srcDir) - # atk, pango - sys.path.insert(0, buildDir) - # _gtk, keysyms, glade - sys.path.insert(0, os.path.join(buildDir, 'gtk')) - sys.argv.append('--g-fatal-warnings') - import ltihooks - - atk = importModule('atk', buildDir) - pango = importModule('pango', buildDir) - gtk = importModule('gtk', buildDir, 'gtk') - gdk = importModule('gtk.gdk', buildDir, '_gdk.la') - - # gtk/__init__.py removes the ltihooks, readd them - import gtk - - ltihooks.install() - glade = importModule('gtk.glade', buildDir) - - ltihooks.uninstall() - del ltihooks - - globals().update(locals()) - - os.environ['PYGTK_USE_GIL_STATE_API'] = '' - gobject.threads_init() - -def importModule(module, directory, name=None): - global isDistCheck - - origName = module - if '.' in module: - fromlist = '.'.join(module.split('.')[:-1]) - else: - fromlist = None - - if not name: - name = module + '.la' - - try: - obj = __import__(module, {}, {}, fromlist) - except ImportError: - raise - - if hasattr(obj, '__file__'): - location = obj.__file__ - else: - package = __import__(fromlist) - location = os.path.join(package.__file__, name) - - current = os.getcwd() - expected = os.path.abspath(os.path.join(current, location)) - current = os.path.abspath(location) - if current != expected: - raise AssertionError('module %s imported from wrong location. Expected %s, got %s' % ( - module, expected, current)) - - return obj diff --git a/tests/leak.glade b/tests/leak.glade deleted file mode 100644 index 50161c0a..00000000 --- a/tests/leak.glade +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - 25 - True - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - - - - - diff --git a/tests/runtests.py b/tests/runtests.py deleted file mode 100644 index 7c5a3086..00000000 --- a/tests/runtests.py +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env python -import glob -import os -import sys -import unittest - -import common - -program = None -if len(sys.argv) == 3: - buildDir = sys.argv[1] - srcDir = sys.argv[2] -else: - if len(sys.argv) == 2: - program = sys.argv[1] - if program.endswith('.py'): - program = program[:-3] - buildDir = '..' - srcDir = '.' - -common.importModules(buildDir=buildDir, - srcDir=srcDir) - -SKIP_FILES = ['common', 'runtests', 'testmodule'] - -dir = os.path.split(os.path.abspath(__file__))[0] -os.chdir(dir) - -def gettestnames(): - files = glob.glob('*.py') - names = map(lambda x: x[:-3], files) - map(names.remove, SKIP_FILES) - return names - -suite = unittest.TestSuite() -loader = unittest.TestLoader() - -for name in gettestnames(): - if program and program not in name: - continue - suite.addTest(loader.loadTestsFromName(name)) - -testRunner = unittest.TextTestRunner() -testRunner.run(suite) diff --git a/tests/test_actiongroup.py b/tests/test_actiongroup.py deleted file mode 100644 index a4fb97d8..00000000 --- a/tests/test_actiongroup.py +++ /dev/null @@ -1,129 +0,0 @@ -# Test for Bug #162874 - -import gc -import unittest - -from common import gtk, gobject - - -class ActionGroupTest(unittest.TestCase): - ui0 = ''' - - - - - - - - - - - - - - - - - - - - - - - - - ''' - - def build_gui(self): - # Create the toplevel window - window = gtk.Window() - vbox = gtk.VBox() - window.add(vbox) - - # Create a UIManager instance - uimanager = gtk.UIManager() - self.uimanager = uimanager - - # Create the base ActionGroup - actiongroup = gtk.ActionGroup('UIMergeExampleBase') - - actiongroup.add_actions([('File', None, '_File'), - ('Sound', None, '_Sound'), - ('RadioBand', None, '_Radio Band')]) - uimanager.insert_action_group(actiongroup, 0) - - # Create an ActionGroup - actiongroup0 = gtk.ActionGroup('UIMergeExample0') - - # Create a ToggleAction, etc. - actiongroup0.add_toggle_actions([('Mute', None, '_Mute', 'm', - 'Mute the volume', self.cb)]) - - # Create actions - actiongroup0.add_actions([('Quit', gtk.STOCK_QUIT, '_Quit me!', None, - 'Quit the Program', self.cb)]) - - # Create some RadioActions - actiongroup0.add_radio_actions([('AM', None, '_AM', 'a', - 'AM Radio', 0), - ('FM', None, '_FM', 'f', - 'FM Radio', 1), - ('SSB', None, '_SSB', 'b', - 'SSB Radio', 2), - ], 0, self.cb) - - # Add the actiongroup to the uimanager - uimanager.insert_action_group(actiongroup0, 1) - - self.ag0 = actiongroup0 - del actiongroup0 - - # Add a UI description - self.merge_id0 = uimanager.add_ui_from_string(self.ui0) - - # Create a MenuBar - menubar = uimanager.get_widget('/MenuBar') - vbox.pack_start(menubar, False) - - # Create a Toolbar - toolbar = uimanager.get_widget('/Toolbar') - vbox.pack_start(toolbar, False) - - gobject.timeout_add(50, self.timeout_cb) - - gtk.main() - return - - def timeout_cb(self): - ag0 = self.ag0 - uimanager = self.uimanager - del self.ag0, self.uimanager - - uimanager.remove_ui(self.merge_id0) - uimanager.remove_action_group(ag0) - - gc.collect() # Clean out unreachable objects - - del ag0 - self.assertEqual(gc.collect(), 1) # Collect just the ActionGroup - - uimanager.ensure_update() - self.assertEqual(gc.collect(), 6) # Now the GtkActions have lost their last - # GObject reference; they should be collected. - # We have a ToggleAction, an Action and a - # RadioAction, plus self.cb is bound in three - # closures. - - gtk.main_quit() - - def setUp(self): - gc.collect() - - def testActionGroups(self): - self.build_gui() - - def cb(self, action): - return - -if __name__ == '__main__': - unittest.main() diff --git a/tests/test_api.py b/tests/test_api.py deleted file mode 100644 index 77984a9e..00000000 --- a/tests/test_api.py +++ /dev/null @@ -1,36 +0,0 @@ -import os -import sys -import unittest - -from common import gobject, gtk, glade - -class APITest(unittest.TestCase): - def testKeysyms(self): - self.failUnless('Escape' in dir(gtk.keysyms)) - self.failUnless(hasattr(gtk.keysyms, 'Escape')) - self.assertEqual(gtk.keysyms.Escape, 0xFF1B) - - def testWindow(self): - self.failUnless(hasattr(gtk, 'Window')) - self.failUnless(issubclass(gtk.Window, gobject.GObject)) - self.failUnless(issubclass(gtk.Window, gtk.Object)) - self.failUnless(issubclass(gtk.Window, gtk.Widget)) - self.failUnless(issubclass(gtk.Window, gtk.Container)) - self.failUnless(issubclass(gtk.Window, gtk.Bin)) - w = gtk.Window() - self.failUnless(isinstance(w, gtk.Window)) - - def testAccelLabel(self): - ra = gtk.RadioMenuItem(None, 'label') - self.failUnless(hasattr(ra.get_child(), 'get_text')) - self.assertEqual(ra.get_child().get_text(), 'label') - - def testGlade(self): - self.failUnless(hasattr(glade, 'XML')) - self.failUnless(issubclass(glade.XML, gobject.GObject)) - - def testReload(self): - # test for #349026 - del sys.modules['gtk'] - import gtk - reload(gtk) diff --git a/tests/test_container.py b/tests/test_container.py deleted file mode 100644 index a970fa44..00000000 --- a/tests/test_container.py +++ /dev/null @@ -1,56 +0,0 @@ -import unittest - -from common import gtk, gobject - -class MyContainer(gtk.Container): - __gtype_name__ = 'MyContainer' - def __init__(self): - gtk.Container.__init__(self) - self.children = [] - self.props = {} - - def do_add(self, child): - child.set_parent(self) - self.children.append(child) - self.props[child] = '' # we just have one child property - - def do_remove(self, child): - widget_was_visible = child.flags() & gtk.VISIBLE - child.unparent() - self.children.remove(child) - del self.props[child] - - if widget_was_visible: - self.queue_resize() - - def do_forall(self, internal, callback, data): - for child in self.children: - callback(child, data) - - def do_set_child_property(self, child, property_id, value, pspec): - if pspec.name == 'dumb-prop': - self.props[child] = value - - def do_get_child_property(self, child, property_id, pspec): - if pspec.name == 'dumb-prop': - return self.props[child] - -MyContainer.install_child_property(1, - ('dumb_prop', - gobject.TYPE_STRING, - 'Dumb Prop', - 'Dumb Property for testing purposes', - '', gobject.PARAM_READWRITE)) - -class ContainerTest(unittest.TestCase): - - def testChildProperties(self): - obj = MyContainer() - label = gtk.Label() - obj.add(label) - v = 'dumb value' - obj.child_set_property(label, 'dumb_prop', v) - self.assertEqual(v, obj.child_get_property(label, 'dumb_prop')) - -if __name__ == '__main__': - unittest.main() diff --git a/tests/test_conversion.py b/tests/test_conversion.py deleted file mode 100644 index 30d29df8..00000000 --- a/tests/test_conversion.py +++ /dev/null @@ -1,83 +0,0 @@ -# -*- Mode: Python -*- - -import unittest - -from common import gtk, gobject - -class Tests(unittest.TestCase): - - def testUnicharArg(self): - """ Test unichar values when used as arguments. """ - - entry = gtk.Entry() - for valid_value in ['a', u'b', u'\ufff0', u'\ufff0'.encode()]: - entry.set_invisible_char(valid_value) - self.assertEqual(entry.get_invisible_char(), - unicode(valid_value), - valid_value) - - for invalid_value in ('12', None, 1, ''): - try: - entry.set_invisible_char(invalid_value) - except: - pass - else: - raise AssertionError( - 'exception not raised on invalid value w/ ' - 'set_invisible_char: %s' % invalid_value) - - - def testUnicharProperty(self): - """ Test unichar values when used as properties. """ - - entry = gtk.Entry() - for valid_value in ['a', u'b', u'\ufff0', u'\ufff0'.encode()]: - entry.set_property('invisible_char', valid_value) - self.assertEqual(entry.get_property('invisible_char'), - valid_value, valid_value) - - for invalid_value in ('12', None, 1, ''): - try: - entry.set_property('invisible_char', invalid_value) - except TypeError: - pass - else: - raise AssertionError( - 'exception not raised on invalid value w/ ' - 'set_invisible_char: %s' % invalid_value) - - def testUnicharConstructor(self): - for valid_value in ['a', u'b', u'\ufff0', u'\ufff0'.encode()]: - entry = gobject.new(gtk.Entry, invisible_char=valid_value) - self.assertEqual(entry.get_property('invisible_char'), - valid_value, valid_value) - - def testColorCreation(self): - """ Test GdkColor creation """ - - c = gtk.gdk.Color(1, 2, 3) - self.assertEqual(c.red, 1) - self.assertEqual(c.green, 2) - self.assertEqual(c.blue, 3) - - c = gtk.gdk.Color(pixel=0xffff) - self.assertEqual(c.pixel, 0xffff) - - c = gtk.gdk.Color(pixel=0xffffL) - self.assertEqual(c.pixel, 0xffff) - - c = gtk.gdk.Color(pixel=0xffffffffL) - self.assertEqual(c.pixel, 0xffffffffL) - - def testUIntArg(self): - child = gtk.DrawingArea() - table = gtk.Table(2, 2, False) - table.attach(child, 1, 2, 0, 1, ypadding=2) - self.assertEqual(table.child_get_property(child, 'y-padding'), 2) - - child = gtk.DrawingArea() - table.attach(child, 1, 2, 0, 1, ypadding=2L) - self.assertEqual(table.child_get_property(child, 'y-padding'), 2) - -if __name__ == '__main__': - unittest.main() diff --git a/tests/test_dialog.py b/tests/test_dialog.py deleted file mode 100644 index 9102af65..00000000 --- a/tests/test_dialog.py +++ /dev/null @@ -1,35 +0,0 @@ -import sys -import unittest -import gc -import weakref - -from common import gtk - -class MessageDialogTest(unittest.TestCase): - def testDialogAdd(self): - dialog = gtk.MessageDialog() - - response_id = sys.maxint + 1 - self.assertRaises(OverflowError, dialog.add_button, "Foo", response_id) - self.assertRaises(OverflowError, dialog.add_buttons, "Foo", response_id) - - def testSubclass(self): - # Normal subclassing should not register a type - sub = type('sub', (gtk.MessageDialog,), {}) - self.assertEqual(sub.__gtype__.name, 'GtkMessageDialog') - - # This depends on 311254 - #type('Sub', (gtk.MessageDialog,), {'__gtype_name__': 'SubDialog'}) - #self.assertEqual(sub.__gtype__.name, 'SubDialog') - - def testDialogLeak(self): - dlg = gtk.Dialog() - dlg.destroy() - ref = weakref.ref(dlg) - del dlg - while gc.collect(): - pass - self.assertEqual(ref(), None) - -if __name__ == '__main__': - unittest.main() diff --git a/tests/test_enum.py b/tests/test_enum.py deleted file mode 100644 index 8f02250a..00000000 --- a/tests/test_enum.py +++ /dev/null @@ -1,229 +0,0 @@ -import unittest -import warnings - -from gobject import GEnum, GFlags, GObject, GType, PARAM_READWRITE -from common import gobject, atk, gtk, gdk - -class PObject(GObject): - __gproperties__ = { - 'enum': (gtk.WindowType, 'blurb', 'description', - gtk.WINDOW_TOPLEVEL, PARAM_READWRITE), - 'enum2': (gtk.WindowType, 'blurb', 'description', - int(gtk.WINDOW_TOPLEVEL), PARAM_READWRITE), - 'flags': (gtk.AttachOptions, 'blurb', 'description', - gtk.EXPAND, PARAM_READWRITE), - 'flags2': (gtk.AttachOptions, 'blurb', 'description', - int(gtk.EXPAND), PARAM_READWRITE), - } - -class EnumTest(unittest.TestCase): - def testEnums(self): - self.failUnless(issubclass(GEnum, int)) - self.failUnless(isinstance(atk.LAYER_OVERLAY, atk.Layer)) - self.failUnless(isinstance(atk.LAYER_OVERLAY, int)) - self.failUnless('LAYER_OVERLAY' in repr(atk.LAYER_OVERLAY)) - self.failUnless(int(atk.LAYER_OVERLAY)) - self.assertEquals(atk.LAYER_INVALID, 0) - self.assertNotEquals(atk.LAYER_INVALID, 1) - self.assertNotEquals(atk.LAYER_INVALID, -1) - self.assertNotEquals(atk.LAYER_INVALID, atk.LAYER_BACKGROUND) - - def testComparisionWarning(self): - warnings.filterwarnings("error", "", Warning, "", 0) - try: - self.assertNotEquals(atk.LAYER_INVALID, atk.RELATION_NULL) - except Warning: - pass - else: - raise AssertionError - warnings.resetwarnings() - - def testWindowGetState(self): - win = gtk.Window() - win.realize() - - state = win.window.get_state() - self.assertEquals(state, gdk.WINDOW_STATE_WITHDRAWN) - self.failUnless(isinstance(state, gdk.WindowState)) - self.failUnless('WINDOW_STATE_WITHDRAWN' in repr(state)) - - def testProperty(self): - win = gtk.Window() - - wtype = win.get_property('type') - self.assertEquals(wtype, gtk.WINDOW_TOPLEVEL) - self.failUnless(isinstance(wtype, gtk.WindowType)) - self.failUnless('WINDOW_TOPLEVEL' in repr(wtype)) - - def testAtkObj(self): - obj = atk.NoOpObject(GObject()) - self.assertEquals(obj.get_role(), atk.ROLE_INVALID) - - def testGParam(self): - win = gtk.Window() - enums = filter(lambda x: GType.is_a(x.value_type, GEnum), - gobject.list_properties(win)) - self.failUnless(enums) - enum = enums[0] - self.failUnless(hasattr(enum, 'enum_class')) - self.failUnless(issubclass(enum.enum_class, GEnum)) - - def testWeirdEnumValues(self): - self.assertEquals(int(gdk.NOTHING), -1) - self.assertEquals(int(gdk.BUTTON_PRESS), 4) - - def testParamSpec(self): - props = filter(lambda prop: GType.is_a(prop.value_type, GEnum), - gobject.list_properties(gtk.Window)) - self.failUnless(len(props)>= 6) - props = filter(lambda prop: prop.name == 'type', props) - self.failUnless(props) - pspec = props[0] - klass = pspec.enum_class - self.assertEquals(klass, gtk.WindowType) - self.failUnless(hasattr(klass, '__enum_values__')) - self.failUnless(isinstance(klass.__enum_values__, dict)) - self.failUnless(len(klass.__enum_values__) >= 2) - self.failUnless(isinstance(pspec.default_value, gtk.WindowType)) - - def testOutofBounds(self): - val = gtk.icon_size_register('fake', 24, 24) - self.failUnless(isinstance(val, gobject.GEnum)) - self.assertEquals(int(val), 7) - self.failUnless('7' in repr(val)) - self.failUnless('GtkIconSize' in repr(val)) - - def testEnumProperty(self): - default = PObject.props.enum.default_value - self.failUnless(isinstance(default, gtk.WindowType)) - self.assertEqual(default, gtk.WINDOW_TOPLEVEL) - default = PObject.props.enum2.default_value - self.failUnless(isinstance(default, gtk.WindowType)) - self.assertEqual(default, gtk.WINDOW_TOPLEVEL) - -class FlagsTest(unittest.TestCase): - def testFlags(self): - self.failUnless(issubclass(GFlags, int)) - self.failUnless(isinstance(gdk.BUTTON_PRESS_MASK, gdk.EventMask)) - self.failUnless(isinstance(gdk.BUTTON_PRESS_MASK, int)) - self.assertEquals(gdk.BUTTON_PRESS_MASK, 256) - self.assertNotEquals(gdk.BUTTON_PRESS_MASK, 0) - self.assertNotEquals(gdk.BUTTON_PRESS_MASK, -256) - self.assertNotEquals(gdk.BUTTON_PRESS_MASK, gdk.BUTTON_RELEASE_MASK) - - self.assertEquals(gdk.EventMask.__bases__[0], GFlags) - self.assertEquals(len(gdk.EventMask.__flags_values__), 22) - - def testComparisionWarning(self): - warnings.filterwarnings("error", "", Warning, "", 0) - try: - self.assertNotEquals(gtk.ACCEL_VISIBLE, gtk.EXPAND) - except Warning: - pass - else: - raise AssertionError - warnings.resetwarnings() - - def testFlagOperations(self): - a = gdk.BUTTON_PRESS_MASK - self.failUnless(isinstance(a, GFlags)) - self.assertEquals(a.first_value_name, 'GDK_BUTTON_PRESS_MASK') - self.assertEquals(a.first_value_nick, 'button-press-mask') - self.assertEquals(a.value_names, ['GDK_BUTTON_PRESS_MASK'], - a.value_names) - self.assertEquals(a.value_nicks, ['button-press-mask'], - a.value_names) - b = gdk.BUTTON_PRESS_MASK | gdk.BUTTON_RELEASE_MASK - self.failUnless(isinstance(b, GFlags)) - self.assertEquals(b.first_value_name, 'GDK_BUTTON_PRESS_MASK') - self.assertEquals(b.first_value_nick, 'button-press-mask') - self.assertEquals(b.value_names, ['GDK_BUTTON_PRESS_MASK', - 'GDK_BUTTON_RELEASE_MASK']) - self.assertEquals(b.value_nicks, ['button-press-mask', - 'button-release-mask']) - c = (gdk.BUTTON_PRESS_MASK | - gdk.BUTTON_RELEASE_MASK | - gdk.ENTER_NOTIFY_MASK) - self.failUnless(isinstance(c, GFlags)) - self.assertEquals(c.first_value_name, 'GDK_BUTTON_PRESS_MASK') - self.assertEquals(c.first_value_nick, 'button-press-mask') - self.assertEquals(c.value_names, - ['GDK_BUTTON_PRESS_MASK', - 'GDK_BUTTON_RELEASE_MASK', - 'GDK_ENTER_NOTIFY_MASK']) - self.assertEquals(c.value_nicks, - ['button-press-mask', - 'button-release-mask', - 'enter-notify-mask']) - self.failUnless(int(a)) - self.assertEquals(int(a), int(gdk.BUTTON_PRESS_MASK)) - self.failUnless(int(b)) - self.assertEquals(int(b), (int(gdk.BUTTON_PRESS_MASK) | - int(gdk.BUTTON_RELEASE_MASK))) - self.failUnless(int(c)) - self.assertEquals(int(c), (int(gdk.BUTTON_PRESS_MASK) | - int(gdk.BUTTON_RELEASE_MASK) | - int(gdk.ENTER_NOTIFY_MASK))) - - def testUnsupportedOpertionWarning(self): - warnings.filterwarnings("error", "", Warning, "", 0) - try: - value = gdk.BUTTON_PRESS_MASK + gdk.BUTTON_RELEASE_MASK - except Warning: - pass - else: - raise AssertionError - warnings.resetwarnings() - - def testParamSpec(self): - props = filter(lambda x: GType.is_a(x.value_type, GFlags), - gtk.Table.list_child_properties()) - self.failUnless(len(props) >= 2) - pspec = props[0] - klass = pspec.flags_class - self.assertEquals(klass, gtk.AttachOptions) - self.failUnless(hasattr(klass, '__flags_values__')) - self.failUnless(isinstance(klass.__flags_values__, dict)) - self.failUnless(len(klass.__flags_values__) >= 3) - self.failUnless(isinstance(pspec.default_value, gtk.AttachOptions)) - - def testEnumComparision(self): - enum = gtk.TREE_VIEW_DROP_BEFORE - self.assertEquals(enum, 0) - self.failUnless(not enum == 10) - self.failUnless(not enum != 0) - self.assertNotEquals(enum, 10) - self.failUnless(not enum < 0) - self.failUnless(enum < 10) - self.failUnless(not enum > 0) - self.failUnless(not enum > 10) - self.failUnless(enum >= 0) - self.failUnless(not enum >= 10) - self.failUnless(enum <= 0) - self.failUnless(enum <= 10) - - def testFlagComparision(self): - flag = gdk.EXPOSURE_MASK - self.assertEquals(flag, 2) - self.failUnless(not flag == 10) - self.failUnless(not flag != 2) - self.assertNotEquals(flag, 10) - self.failUnless(not flag < 2) - self.failUnless(flag < 10) - self.failUnless(not flag > 2) - self.failUnless(not flag > 10) - self.failUnless(flag >= 2) - self.failUnless(not flag >= 10) - self.failUnless(flag <= 2) - self.failUnless(flag <= 10) - - def testFlagsProperty(self): - default = PObject.props.flags.default_value - self.failUnless(isinstance(default, gtk.AttachOptions)) - self.assertEqual(default, gtk.EXPAND) - default = PObject.props.flags2.default_value - self.failUnless(isinstance(default, gtk.AttachOptions)) - self.assertEqual(default, gtk.EXPAND) - -if __name__ == '__main__': - unittest.main() diff --git a/tests/test_gdk.py b/tests/test_gdk.py deleted file mode 100644 index e23c4583..00000000 --- a/tests/test_gdk.py +++ /dev/null @@ -1,73 +0,0 @@ -import unittest -import gc - -from common import gtk - -class CallOnDel: - def __init__(self, callback): - self.callback = callback - def __del__(self): - self.callback() - -class GdkTest(unittest.TestCase): - def testBitmapCreateFromData(self): - gtk.gdk.bitmap_create_from_data(None, '\x00', 1, 1) - - def testPixmapCreateFromData(self): - black = gtk.gdk.color_parse('black') - gtk.gdk.pixmap_create_from_data(None, '\x00', 1, 1, 1, - black, black) - - def _testWindow(self): - common = {'finalized': False} - def on_finalize(): - common['finalized'] = True - w = gtk.gdk.Window(None, 200, 200, gtk.gdk.WINDOW_TEMP, 0, 0) - w.set_data('foo', CallOnDel(on_finalize)) - w.destroy() - while gtk.events_pending(): - gtk.main_iteration(block=False) - del w - - # Note that this depends on the mainloop processing an X event so - # if might fail if the timing is off - while gc.collect(): - pass - assert common['finalized'] - - - def testDrawIndexedImage(self): - w = gtk.Window() - w.realize() - w.window.draw_indexed_image(gtk.gdk.GC(w.window), - 0, 0, - 1, 2, - gtk.gdk.RGB_DITHER_NONE, - '\x00\x01', - 1, - [0xdeadbe, 0xbebabe]) - - def _collect(self): - cnt = 0 - while True: - x = gc.collect() - cnt += x - if x: - break - return cnt - - def testDisplay(self): - while gc.collect(): - pass - - display = gtk.gdk.Display(None) - del display - - self.assertEquals(self._collect(), 1) - - display = gtk.gdk.Display(None) - self.assertEquals(display.__grefcount__, 1) - display.close() - self.assertEquals(display.__grefcount__, 1) - del display - self.assertEquals(self._collect(), 1) diff --git a/tests/test_gdkevent.py b/tests/test_gdkevent.py deleted file mode 100644 index 1721a9e4..00000000 --- a/tests/test_gdkevent.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- Mode: Python -*- - -import unittest - -from common import gtk - -class TestGdkEvent(unittest.TestCase): - def testWindowSetter(self): - event = gtk.gdk.Event(gtk.gdk.BUTTON_PRESS) - - win1 = gtk.Window() - win1.realize() - event.window = win1.window - self.assertEqual(event.window, win1.window) - - win2 = gtk.Window() - win2.realize() - event.window = win2.window - self.assertEqual(event.window, win2.window) - -if __name__ == '__main__': - unittest.main() diff --git a/tests/test_glade.py b/tests/test_glade.py deleted file mode 100644 index ce9b99e8..00000000 --- a/tests/test_glade.py +++ /dev/null @@ -1,33 +0,0 @@ -import unittest - -from common import gtk, gobject -import weakref -import gc - -class TestGlade(unittest.TestCase): - - class SimpleTest: - def __init__(self, test): - xml = gtk.glade.XML('leak.glade') - xml.signal_autoconnect(self) - self.test = test - self.window = xml.get_widget("window1") - self.window.destroy() - def on_window1_destroy(self, window): - gobject.idle_add(self.test.leak_check, weakref.ref(self), weakref.ref(self.window)) - - def leak_check(self, objref, windowref): - while gc.collect(): - pass - gtk.main_quit() - self.assertEqual(objref(), None) - self.windowref = windowref - - def testAutoconnectLeak(self): - self.SimpleTest(self) - gtk.main() - self.assertEqual(self.windowref(), None) - - -if __name__ == '__main__': - unittest.main() diff --git a/tests/test_liststore.py b/tests/test_liststore.py deleted file mode 100644 index da53a07e..00000000 --- a/tests/test_liststore.py +++ /dev/null @@ -1,36 +0,0 @@ -import unittest - -from common import gtk - -class ListStoreTest(unittest.TestCase): - def testConstructor(self): - self.assertRaises(TypeError, gtk.ListStore) - - def testInsert(self): - store = gtk.ListStore(int) - - # Old way, with iters - store.set_value(store.insert(0), 0, 2) - self.assertEqual(len(store), 1) - self.assertEqual(store[0][0], 2) - - # New way - store.insert(0, (1,)) - self.assertEqual(len(store), 2) - self.assertEqual(store[0][0], 1) - self.assertEqual(store[1][0], 2) - - # TreeSortable, but... - - def testSetDefaultSortFunc(self): - store = gtk.ListStore(int) - self.failIf(store.has_default_sort_func()) - store.set_default_sort_func(lambda x: None) - store.set_sort_column_id(0, gtk.SORT_ASCENDING) - - self.failUnless(store.has_default_sort_func()) - store.set_default_sort_func(None) - self.failIf(store.has_default_sort_func()) - -if __name__ == '__main__': - unittest.main() diff --git a/tests/test_pango.py b/tests/test_pango.py deleted file mode 100644 index 6d48dd52..00000000 --- a/tests/test_pango.py +++ /dev/null @@ -1,9 +0,0 @@ -import unittest - -from common import pango - -class MarkupTest(unittest.TestCase): - def testMarkupAccelMarker(self): - self.assertRaises(TypeError, pango.parse_markup, 'test', 0) - self.assertEqual(pango.parse_markup('test')[2], u'\x00') - self.assertEqual(pango.parse_markup('test', u't')[2], u'e') diff --git a/tests/test_radiobutton.py b/tests/test_radiobutton.py deleted file mode 100644 index 43a1c4f6..00000000 --- a/tests/test_radiobutton.py +++ /dev/null @@ -1,98 +0,0 @@ -import unittest - -from common import gtk - -class RadioTest(unittest.TestCase): - widget_type = None - constructor_args = () - - def new(self): - return self.widget_type(*self.constructor_args) - - def newLabel(self, label): - return self.widget_type(None, label) - - def newGroup(self, group): - return self.widget_type(group) - - def getLabel(self, obj): - return obj.get_property('label') - - def compareGroups(self, group1, group2): - return self.assertEqual(group1, group2) - - def testCreate(self): - if self.widget_type is None: - return - radio = self.new() - self.assert_(isinstance(radio, self.widget_type)) - - def testLabel(self): - if self.widget_type is None: - return - radio = self.newLabel('test-radio') - self.assertEqual(self.getLabel(radio), 'test-radio') - - def testGroup(self): - if self.widget_type is None: - return - radio = self.new() - radio2 = self.newGroup(radio) - self.compareGroups(radio.get_group(), radio2.get_group()) - self.compareGroups(radio2.get_group(), radio.get_group()) - - def testEmptyGroup(self): - if self.widget_type is None: - return - radio = self.new() - radio2 = self.new() - self.compareGroups(radio.get_group(), [radio]) - self.compareGroups(radio2.get_group(), [radio2]) - radio2.set_group(radio) - self.compareGroups(radio.get_group(), radio2.get_group()) - self.compareGroups(radio2.get_group(), radio.get_group()) - radio2.set_group(None) - self.compareGroups(radio.get_group(), [radio]) - self.compareGroups(radio2.get_group(), [radio2]) - -class RadioButtonTest(RadioTest): - widget_type = gtk.RadioButton - -class RadioActionTest(RadioTest): - widget_type = gtk.RadioAction - constructor_args = ('RadioAction', 'test-radio-action', '', '', 0) - - def newGroup(self, radio): - # No constructor, so set it manually - obj = self.new() - obj.set_group(radio) - return obj - - def newLabel(self, label): - return gtk.RadioAction('RadioAction', label, '', '', 0) - -class RadioToolButtonTest(RadioTest): - widget_type = gtk.RadioToolButton - - def compareGroups(self, group1, group2): - # GtkRadioToolButton.set/get_groups return GtkRadioButtons, - # so instead of doing a normal cmp, compare ids - return cmp(map(id, group1), map(id, group2)) - - def newLabel(self, label): - # We don't have a constructor for which we can pass in a label - # for, so just call set_label instead - radio = gtk.RadioToolButton(None) - radio.set_label(label) - return radio - -class RadioMenuItem(RadioTest): - widget_type = gtk.RadioMenuItem - - def getLabel(self, obj): - # The label is stored in a gtk.AccelLabel, which is the only - # child of the RadioMenuItem. - return obj.get_child().get_text() - -if __name__ == '__main__': - unittest.main() diff --git a/tests/test_style.py b/tests/test_style.py deleted file mode 100644 index e55f1028..00000000 --- a/tests/test_style.py +++ /dev/null @@ -1,29 +0,0 @@ -import unittest - -from common import gtk - -class StylePixmapTest(unittest.TestCase): - def setUp(self): - win = gtk.Window() - win.realize() - self.window = win.window - self.bg_pixmap = win.style.bg_pixmap - - def _test(self, pixmap): - self.bg_pixmap[gtk.STATE_NORMAL] = pixmap - self.assertEqual(self.bg_pixmap[gtk.STATE_NORMAL], pixmap) - - def testNormal(self): - self._test(gtk.gdk.Pixmap(self.window, 1, 1)) - - def testNone(self): - self._test(None) - - def testParentRelative(self): - self._test(gtk.gdk.PARENT_RELATIVE) - - def testInvalid(self): - func = self.bg_pixmap.__setitem__ - self.assertRaises(TypeError, func, gtk.STATE_NORMAL, True) - self.assertRaises(TypeError, func, gtk.STATE_NORMAL, 0L) - self.assertRaises(TypeError, func, gtk.STATE_NORMAL, object()) diff --git a/tests/test_textview.py b/tests/test_textview.py deleted file mode 100644 index 7df602ad..00000000 --- a/tests/test_textview.py +++ /dev/null @@ -1,13 +0,0 @@ -import unittest - -from common import gtk - -class TextViewTest(unittest.TestCase): - def test_default_attributes(self): - textview = gtk.TextView() - attrs = textview.get_default_attributes() - textview.destroy() - self.assertEqual(attrs.font_scale, 1.0) - -if __name__ == '__main__': - unittest.main() diff --git a/tests/test_treeview.py b/tests/test_treeview.py deleted file mode 100644 index e026d84f..00000000 --- a/tests/test_treeview.py +++ /dev/null @@ -1,27 +0,0 @@ -import unittest - -from common import gtk - -class TreeViewTest(unittest.TestCase): - # Check for #350252 - def test_default_attributes(self): - model = gtk.ListStore(str) - treeview = gtk.TreeView(model) - treeview.set_cursor(1) - - # Bug #347273 - def testTreeSelectionForeach(self): - model = gtk.ListStore(str) - treeview = gtk.TreeView(model) - sel = treeview.get_selection() - iter_ = model.append() - model.set_value(iter_, 0, "foo") - sel.select_path((0,)) - list_ = [] - sel.selected_foreach(lambda model, path, iter: list_.append(iter)) - list_ = [model.get_value(iter_, 0) for iter_ in list_] - self.assertEqual(list_, ["foo"]) - - -if __name__ == '__main__': - unittest.main() diff --git a/tests/testmodule.py b/tests/testmodule.py deleted file mode 100644 index 3cff2f28..00000000 --- a/tests/testmodule.py +++ /dev/null @@ -1,7 +0,0 @@ -import gtk - -class PyLabel(gtk.Label): - __gtype_name__ = 'PyLabel' - - def __init__(self): - gtk.Label.__init__(self, "hello") -- cgit v1.2.1